From: Zachary Vance Date: Sat, 3 Oct 2015 00:15:35 +0000 (-0700) Subject: Initial commit X-Git-Url: https://git.za3k.com/?a=commitdiff_plain;h=4e95dd79d8c737f03434a0b417b7bde87e17d98f;p=za3k_blog.git Initial commit --- 4e95dd79d8c737f03434a0b417b7bde87e17d98f diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..7e25e32 --- /dev/null +++ b/.htaccess @@ -0,0 +1,8 @@ + +RewriteEngine On +RewriteBase / +RewriteRule ^index\.php$ - [L] +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule . /index.php [L] + diff --git a/index.php b/index.php new file mode 100644 index 0000000..dd3d554 --- /dev/null +++ b/index.php @@ -0,0 +1,17 @@ + + 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 + +The source code for any program binaries or compressed scripts that are +included with WordPress can be freely obtained at the following URL: + + https://wordpress.org/download/source/ diff --git a/readme.html b/readme.html new file mode 100644 index 0000000..faad3e9 --- /dev/null +++ b/readme.html @@ -0,0 +1,96 @@ + + + + + + WordPress › ReadMe + + + +

+ WordPress +
Version 3.9.1 +

+

Semantic Personal Publishing Platform

+ +

First Things First

+

Welcome. WordPress is a very special project to me. Every developer and contributor adds something unique to the mix, and together we create something beautiful that I’m proud to be a part of. Thousands of hours have gone into WordPress, and we’re dedicated to making it better every day. Thank you for making it part of your world.

+

— Matt Mullenweg

+ +

Installation: Famous 5-minute install

+
    +
  1. Unzip the package in an empty directory and upload everything.
  2. +
  3. Open wp-admin/install.php in your browser. It will take you through the process to set up a wp-config.php file with your database connection details. +
      +
    1. If for some reason this doesn’t work, don’t worry. It doesn’t work on all web hosts. Open up wp-config-sample.php with a text editor like WordPad or similar and fill in your database connection details.
    2. +
    3. Save the file as wp-config.php and upload it.
    4. +
    5. Open wp-admin/install.php in your browser.
    6. +
    +
  4. +
  5. Once the configuration file is set up, the installer will set up the tables needed for your blog. If there is an error, double check your wp-config.php file, and try again. If it fails again, please go to the support forums with as much data as you can gather.
  6. +
  7. If you did not enter a password, note the password given to you. If you did not provide a username, it will be admin.
  8. +
  9. The installer should then send you to the login page. Sign in with the username and password you chose during the installation. If a password was generated for you, you can then click on “Profile” to change the password.
  10. +
+ +

Updating

+

Using the Automatic Updater

+

If you are updating from version 2.7 or higher, you can use the automatic updater:

+
    +
  1. Open wp-admin/update-core.php in your browser and follow the instructions.
  2. +
  3. You wanted more, perhaps? That’s it!
  4. +
+ +

Updating Manually

+
    +
  1. Before you update anything, make sure you have backup copies of any files you may have modified such as index.php.
  2. +
  3. Delete your old WordPress files, saving ones you’ve modified.
  4. +
  5. Upload the new files.
  6. +
  7. Point your browser to /wp-admin/upgrade.php.
  8. +
+ +

Migrating from other systems

+

WordPress can import from a number of systems. First you need to get WordPress installed and working as described above, before using our import tools.

+ +

System Requirements

+
    +
  • PHP version 5.2.4 or higher.
  • +
  • MySQL version 5.0 or higher.
  • +
+ +

System Recommendations

+ + +

Online Resources

+

If you have any questions that aren’t addressed in this document, please take advantage of WordPress’ numerous online resources:

+
+
The WordPress Codex
+
The Codex is the encyclopedia of all things WordPress. It is the most comprehensive source of information for WordPress available.
+
The WordPress Blog
+
This is where you’ll find the latest updates and news related to WordPress. Recent WordPress news appears in your administrative dashboard by default.
+
WordPress Planet
+
The WordPress Planet is a news aggregator that brings together posts from WordPress blogs around the web.
+
WordPress Support Forums
+
If you’ve looked everywhere and still can’t find an answer, the support forums are very active and have a large community ready to help. To help them help you be sure to use a descriptive thread title and describe your question in as much detail as possible.
+
WordPress IRC Channel
+
There is an online chat channel that is used for discussion among people who use WordPress and occasionally support topics. The above wiki page should point you in the right direction. (irc.freenode.net #wordpress)
+
+ +

Final Notes

+
    +
  • If you have any suggestions, ideas, or comments, or if you (gasp!) found a bug, join us in the Support Forums.
  • +
  • WordPress has a robust plugin API that makes extending the code easy. If you are a developer interested in utilizing this, see the plugin documentation in the Codex. You shouldn’t modify any of the core code.
  • +
+ +

Share the Love

+

WordPress has no multi-million dollar marketing campaign or celebrity sponsors, but we do have something even better—you. If you enjoy WordPress please consider telling a friend, setting it up for someone less knowledgable than yourself, or writing the author of a media article that overlooks us.

+ +

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

+ +

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 new file mode 100644 index 0000000..5e9be6e --- /dev/null +++ b/wp-activate.php @@ -0,0 +1,132 @@ +cache_enabled = false; + +// Fix for page title +$wp_query->is_404 = false; + +/** + * Fires before the Site Activation page is loaded. + * + * @since 3.0.0 + */ +do_action( 'activate_header' ); + +/** + * Adds an action hook specific to this page that fires on wp_head + * + * @since MU + */ +function do_activate_header() { + /** + * Fires before the Site Activation page is loaded, but on the wp_head action. + * + * @since 3.0.0 + */ + do_action( 'activate_wp_head' ); +} +add_action( 'wp_head', 'do_activate_header' ); + +/** + * Loads styles specific to this page. + * + * @since MU + */ +function wpmu_activate_stylesheet() { + ?> + + + +
+ + +

+
+

+ +
+

+

+ +

+
+ + get_error_code() || 'blog_taken' == $result->get_error_code() ) { + $signup = $result->get_error_data(); + ?> +

+ '; + 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() ); + } 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() ); + } + echo '

'; + } else { + ?> +

+ '.$result->get_error_message().'

'; + } + } else { + extract($result); + $url = get_blogaddress_by_id( (int) $blog_id); + $user = get_userdata( (int) $user_id); + ?> +

+ +
+

user_login ?>

+

+
+ + +

View your site or Log in'), $url, $url . 'wp-login.php' ); ?>

+ +

Log in or go back to the homepage.' ), network_site_url('wp-login.php', 'login'), network_home_url() ); ?>

+ +
+ + diff --git a/wp-admin/about.php b/wp-admin/about.php new file mode 100644 index 0000000..0a4344b --- /dev/null +++ b/wp-admin/about.php @@ -0,0 +1,280 @@ + + +
+ +

+ +
+ +
+ + + +
+

+

Version %1$s addressed %2$s bug.', + 'Version %1$s addressed %2$s bugs.', 34 ), '3.9.1', number_format_i18n( 34 ) ); ?> + the release notes.' ), 'http://codex.wordpress.org/Version_3.9.1' ); ?> +

+
+ +
+
+ + + + + +
+

+
+
+ +

+

+
+
+ +

+

+
+
+ +

+

+
+
+ +
+ +
+
+ +

+

+
+
+
+
+ +
+
+ + + +
+

+

+
+
+
+ +
+ +
+
+
+ '//s.w.org/images/core/3.9/widgets.mp4', + 'ogv' => '//s.w.org/images/core/3.9/widgets.ogv', + 'webm' => '//s.w.org/images/core/3.9/widgets.webm', + 'loop' => true, + 'autoplay' => true, + 'width' => 499 + ) ); + ?> +

+

+

+
+
+ +

+

+ +

+ +
+
+
+ +
+ +
+

+ +
+
+

+

+ +

+

+
+
+

+

+ +

+

+
+
+

+

doing_action() and doing_filter(), and manipulate custom image sizes with has_image_size() and remove_image_size().' ); ?>

+

+
+
+ +
+ +
+ + | + + +
+ +
+Version %1$s addressed a security issue.', + 'Version %1$s addressed some security issues.' ); + +/* translators: 1: WordPress version number, 2: plural number of bugs. */ +_n_noop( 'Version %1$s addressed %2$s bug.', + 'Version %1$s addressed %2$s bugs.' ); + +/* translators: 1: WordPress version number, 2: plural number of bugs. Singular security issue. */ +_n_noop( 'Version %1$s addressed a security issue and fixed %2$s bug.', + 'Version %1$s addressed a security issue and fixed %2$s bugs.' ); + +/* translators: 1: WordPress version number, 2: plural number of bugs. More than one security issue. */ +_n_noop( 'Version %1$s addressed some security issues and fixed %2$s bug.', + 'Version %1$s addressed some security issues and fixed %2$s bugs.' ); + +__( 'For more information, see the release notes.' ); diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php new file mode 100644 index 0000000..f7aae0f --- /dev/null +++ b/wp-admin/admin-ajax.php @@ -0,0 +1,95 @@ + + +
+
+
+ + + + +
+ + + diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php new file mode 100644 index 0000000..11bd30c --- /dev/null +++ b/wp-admin/admin-functions.php @@ -0,0 +1,15 @@ +site_name ) ); +elseif ( is_user_admin() ) + $admin_title = sprintf( __( 'Global Dashboard: %s' ), esc_html( get_current_site()->site_name ) ); +else + $admin_title = get_bloginfo( 'name' ); + +if ( $admin_title == $title ) + $admin_title = sprintf( __( '%1$s — WordPress' ), $title ); +else + $admin_title = sprintf( __( '%1$s ‹ %2$s — WordPress' ), $title, $admin_title ); + +/** + * Filter the content for an admin page. + * + * @since 3.1.0 + * + * @param string $admin_title The page title, with extra context added. + * @param string $title The original page title. + */ +$admin_title = apply_filters( 'admin_title', $admin_title, $title ); + +wp_user_settings(); + +_wp_admin_html_begin(); +?> +<title><?php echo $admin_title; ?> + + + + for a specific admin page based on $hook_suffix. + * + * @since 2.1.0 + */ +do_action( "admin_head-$hook_suffix" ); + +/** + * Fires in for all admin pages. + * + * @since 2.1.0 + */ +do_action( 'admin_head' ); + +if ( get_user_setting('mfold') == 'f' ) + $admin_body_class .= ' folded'; + +if ( !get_user_setting('unfold') ) + $admin_body_class .= ' auto-fold'; + +if ( is_admin_bar_showing() ) + $admin_body_class .= ' admin-bar'; + +if ( is_rtl() ) + $admin_body_class .= ' rtl'; + +if ( $current_screen->post_type ) + $admin_body_class .= ' post-type-' . $current_screen->post_type; + +if ( $current_screen->taxonomy ) + $admin_body_class .= ' taxonomy-' . $current_screen->taxonomy; + +$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 ( wp_is_mobile() ) + $admin_body_class .= ' mobile'; + +if ( is_multisite() ) + $admin_body_class .= ' multisite'; + +if ( is_network_admin() ) + $admin_body_class .= ' network-admin'; + +$admin_body_class .= ' no-customize-support no-svg'; + +?> + + CSS classes. + * + * This filter differs from the post_class or body_class filters in two important ways: + * 1. $classes is a space-separated string of class names instead of an array. + * 2. Not all core admin classes are filterable, notably: wp-admin, wp-core-ui, and no-js cannot be removed. + * + * @since 2.3.0 + * + * @param string $classes Space-separated string of CSS classes. + */ +?> +"> + + + + +
+ + +
+ + + +
+set_parentage( $parent_file ); + +?> + +
+render_screen_meta(); + +if ( is_network_admin() ) { + /** + * Print network admin screen notices. + * + * @since 3.1.0 + */ + do_action( 'network_admin_notices' ); +} elseif ( is_user_admin() ) { + /** + * Print user admin screen notices. + * + * @since 3.1.0 + */ + do_action( 'user_admin_notices' ); +} else { + /** + * Print admin screen notices. + * + * @since 3.1.0 + */ + do_action( 'admin_notices' ); +} + +/** + * Print generic admin screen notices. + * + * @since 3.1.0 + */ +do_action( 'all_admin_notices' ); + +if ( $parent_file == 'options-general.php' ) + require(ABSPATH . 'wp-admin/options-head.php'); diff --git a/wp-admin/admin-post.php b/wp-admin/admin-post.php new file mode 100644 index 0000000..7103994 --- /dev/null +++ b/wp-admin/admin-post.php @@ -0,0 +1,45 @@ + 50 && mt_rand( 0, (int)( $c / 50 ) ) == 1 ) ) { + require_once( ABSPATH . WPINC . '/http.php' ); + $response = wp_remote_get( admin_url( 'upgrade.php?step=1' ), array( 'timeout' => 120, 'httpversion' => '1.1' ) ); + /** This action is documented in wp-admin/network/upgrade.php */ + do_action( 'after_mu_upgrade', $response ); + unset($response); + } + unset($c); + } +} + +require_once(ABSPATH . 'wp-admin/includes/admin.php'); + +auth_redirect(); + +// Schedule trash collection +if ( !wp_next_scheduled('wp_scheduled_delete') && !defined('WP_INSTALLING') ) + wp_schedule_event(time(), 'daily', 'wp_scheduled_delete'); + +set_screen_options(); + +$date_format = get_option('date_format'); +$time_format = get_option('time_format'); + +wp_enqueue_script( 'common' ); + +$editing = false; + +if ( isset($_GET['page']) ) { + $plugin_page = wp_unslash( $_GET['page'] ); + $plugin_page = plugin_basename($plugin_page); +} + +if ( isset( $_REQUEST['post_type'] ) && post_type_exists( $_REQUEST['post_type'] ) ) + $typenow = $_REQUEST['post_type']; +else + $typenow = ''; + +if ( isset( $_REQUEST['taxonomy'] ) && taxonomy_exists( $_REQUEST['taxonomy'] ) ) + $taxnow = $_REQUEST['taxonomy']; +else + $taxnow = ''; + +if ( WP_NETWORK_ADMIN ) + require(ABSPATH . 'wp-admin/network/menu.php'); +elseif ( WP_USER_ADMIN ) + require(ABSPATH . 'wp-admin/user/menu.php'); +else + require(ABSPATH . 'wp-admin/menu.php'); + +if ( current_user_can( 'manage_options' ) ) { + /** + * Filter the maximum memory limit available for administration screens. + * + * This only applies to administrators, who may require more memory for tasks like updates. + * Memory limits when processing images (uploaded or edited by users of any role) are + * handled separately. + * + * The WP_MAX_MEMORY_LIMIT constant specifically defines the maximum memory limit available + * when in the administration back-end. The default is 256M, or 256 megabytes of memory. + * + * @since 3.0.0 + * + * @param string 'WP_MAX_MEMORY_LIMIT' The maximum WordPress memory limit. Default 256M. + */ + @ini_set( 'memory_limit', apply_filters( 'admin_memory_limit', WP_MAX_MEMORY_LIMIT ) ); +} + +/** + * Fires as an admin screen or script is being initialized. + * + * Note, this does not just run on user-facing admin screens. + * It runs on admin-ajax.php and admin-post.php as well. + * + * This is roughly analgous to the more general 'init' hook, which fires earlier. + * + * @since 2.5.0 + */ +do_action( 'admin_init' ); + +if ( isset($plugin_page) ) { + if ( !empty($typenow) ) + $the_parent = $pagenow . '?post_type=' . $typenow; + else + $the_parent = $pagenow; + if ( ! $page_hook = get_plugin_page_hook($plugin_page, $the_parent) ) { + $page_hook = get_plugin_page_hook($plugin_page, $plugin_page); + // backwards compatibility for plugins using add_management_page + if ( empty( $page_hook ) && 'edit.php' == $pagenow && '' != get_plugin_page_hook($plugin_page, 'tools.php') ) { + // There could be plugin specific params on the URL, so we need the whole query string + if ( !empty($_SERVER[ 'QUERY_STRING' ]) ) + $query_string = $_SERVER[ 'QUERY_STRING' ]; + else + $query_string = 'page=' . $plugin_page; + wp_redirect( admin_url('tools.php?' . $query_string) ); + exit; + } + } + unset($the_parent); +} + +$hook_suffix = ''; +if ( isset($page_hook) ) + $hook_suffix = $page_hook; +else if ( isset($plugin_page) ) + $hook_suffix = $plugin_page; +else if ( isset($pagenow) ) + $hook_suffix = $pagenow; + +set_current_screen(); + +// Handle plugin admin pages. +if ( isset($plugin_page) ) { + if ( $page_hook ) { + /** + * Fires before a particular screen is loaded. + * + * The load-* hook fires in a number of contexts. This hook is for plugin screens + * where a callback is provided when the screen is registered. + * + * The dynamic portion of the hook name, $page_hook, refers to a mixture of plugin + * page information including: + * 1. The page type. If the plugin page is registered as a submenu page, such as for + * Settings, the page type would be 'settings'. Otherwise the type is 'toplevel'. + * 2. A separator of '_page_'. + * 3. The plugin basename minus the file extension. + * + * Together, the three parts form the $page_hook. Citing the example above, + * the hook name used would be 'load-settings_page_pluginbasename'. + * + * @see get_plugin_page_hook() + * + * @since 2.1.0 + */ + do_action( 'load-' . $page_hook ); + if (! isset($_GET['noheader'])) + require_once(ABSPATH . 'wp-admin/admin-header.php'); + + /** + * Used to call the registered callback for a plugin screen. + * + * @access private + * + * @since 1.5.0 + */ + do_action( $page_hook ); + } else { + 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))); + + /** + * Fires before a particular screen is loaded. + * + * The load-* hook fires in a number of contexts. This hook is for plugin screens + * where the file to load is directly included, rather than the use of a function. + * + * The dynamic portion of the hook name, $plugin_page, refers to the plugin basename. + * + * @see plugin_basename() + * + * @since 1.5.0 + */ + do_action( 'load-' . $plugin_page ); + + if ( !isset($_GET['noheader'])) + require_once(ABSPATH . 'wp-admin/admin-header.php'); + + if ( file_exists(WPMU_PLUGIN_DIR . "/$plugin_page") ) + include(WPMU_PLUGIN_DIR . "/$plugin_page"); + else + include(WP_PLUGIN_DIR . "/$plugin_page"); + } + + include(ABSPATH . 'wp-admin/admin-footer.php'); + + exit(); +} else if (isset($_GET['import'])) { + + $importer = $_GET['import']; + + if ( ! current_user_can('import') ) + wp_die(__('You are not allowed to import.')); + + if ( validate_file($importer) ) { + wp_redirect( admin_url( 'import.php?invalid=' . $importer ) ); + exit; + } + + if ( ! isset($wp_importers[$importer]) || ! is_callable($wp_importers[$importer][2]) ) { + wp_redirect( admin_url( 'import.php?invalid=' . $importer ) ); + exit; + } + + /** + * Fires before an importer screen is loaded. + * + * The dynamic portion of the hook name, $importer, refers to the importer slug. + * + * @since 3.5.0 + */ + do_action( 'load-importer-' . $importer ); + + $parent_file = 'tools.php'; + $submenu_file = 'import.php'; + $title = __('Import'); + + if (! isset($_GET['noheader'])) + require_once(ABSPATH . 'wp-admin/admin-header.php'); + + require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); + + define('WP_IMPORTING', true); + + /** + * Whether to filter imported data through kses on import. + * + * Multisite uses this hook to filter all data through kses by default, + * as a super administrator may be assisting an untrusted user. + * + * @since 3.1.0 + * + * @param bool false Whether to force data to be filtered through kses. Default false. + */ + if ( apply_filters( 'force_filtered_html_on_import', false ) ) + kses_init_filters(); // Always filter imported data with kses on multisite. + + call_user_func($wp_importers[$importer][2]); + + include(ABSPATH . 'wp-admin/admin-footer.php'); + + // Make sure rules are flushed + flush_rewrite_rules(false); + + exit(); +} else { + /** + * Fires before a particular screen is loaded. + * + * The load-* hook fires in a number of contexts. This hook is for core screens. + * + * The dynamic portion of the hook name, $pagenow, is a global variable + * referring to the filename of the current page, such as 'admin.php', + * 'post-new.php' etc. A complete hook for the latter would be 'load-post-new.php'. + * + * @since 2.1.0 + */ + do_action( 'load-' . $pagenow ); + // Backwards compatibility with old load-page-new.php, load-page.php, + // and load-categories.php actions. + if ( $typenow == 'page' ) { + if ( $pagenow == 'post-new.php' ) + do_action( 'load-page-new.php' ); + elseif ( $pagenow == 'post.php' ) + do_action( 'load-page.php' ); + } elseif ( $pagenow == 'edit-tags.php' ) { + if ( $taxnow == 'category' ) + do_action( 'load-categories.php' ); + elseif ( $taxnow == 'link_category' ) + do_action( 'load-edit-link-categories.php' ); + } +} + +if ( ! empty( $_REQUEST['action'] ) ) { + /** + * Fires when an 'action' request variable is sent. + * + * The dynamic portion of the hook name, $_REQUEST['action'], + * refers to the action derived from the GET or POST request. + * + * @since 2.6.0 + */ + do_action( 'admin_action_' . $_REQUEST['action'] ); +} diff --git a/wp-admin/async-upload.php b/wp-admin/async-upload.php new file mode 100644 index 0000000..e43fb58 --- /dev/null +++ b/wp-admin/async-upload.php @@ -0,0 +1,112 @@ +post_type ) + wp_die( __( 'Unknown post type.' ) ); + if ( ! current_user_can( 'edit_post', $id ) ) + wp_die( __( 'You are not allowed to edit this item.' ) ); + + switch ( $_REQUEST['fetch'] ) { + case 3 : + if ( $thumb_url = wp_get_attachment_image_src( $id, 'thumbnail', true ) ) + echo ''; + echo '' . _x( 'Edit', 'media item' ) . ''; + $title = $post->post_title ? $post->post_title : wp_basename( $post->guid ); // title shouldn't ever be empty, but use filename just in cas.e + echo '
' . esc_html( wp_html_excerpt( $title, 60, '…' ) ) . '
'; + break; + case 2 : + add_filter('attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2); + echo get_media_item($id, array( 'send' => false, 'delete' => true )); + break; + default: + add_filter('attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2); + echo get_media_item($id); + break; + } + exit; +} + +check_admin_referer('media-form'); + +$post_id = 0; +if ( isset( $_REQUEST['post_id'] ) ) { + $post_id = absint( $_REQUEST['post_id'] ); + if ( ! get_post( $post_id ) || ! current_user_can( 'edit_post', $post_id ) ) + $post_id = 0; +} + +$id = media_handle_upload( 'async-upload', $post_id ); +if ( is_wp_error($id) ) { + echo '
+ ' . __('Dismiss') . ' + ' . sprintf(__('“%s” has failed to upload due to an error'), esc_html($_FILES['async-upload']['name']) ) . '
' . + esc_html($id->get_error_message()) . '
'; + exit; +} + +if ( $_REQUEST['short'] ) { + // short form response - attachment ID only + echo $id; +} else { + // long form response - big chunk o html + $type = $_REQUEST['type']; + + /** + * Filter the returned ID of an uploaded attachment. + * + * The dynamic portion of the hook name, $type, refers to the attachment type, + * such as 'image', 'audio', 'video', 'file', etc. + * + * @since 2.5.0 + * + * @param int $id Uploaded attachment ID. + */ + echo apply_filters( "async_upload_{$type}", $id ); +} diff --git a/wp-admin/comment.php b/wp-admin/comment.php new file mode 100644 index 0000000..30c8d6d --- /dev/null +++ b/wp-admin/comment.php @@ -0,0 +1,302 @@ +

$msg

"; + include( ABSPATH . 'wp-admin/admin-footer.php' ); + die; +} + +switch( $action ) { + +case 'editcomment' : + $title = __('Edit Comment'); + + get_current_screen()->add_help_tab( array( + 'id' => 'overview', + 'title' => __('Overview'), + 'content' => + '

' . __( 'You can edit the information left in a comment if needed. This is often useful when you notice that a commenter has made a typographical error.' ) . '

' . + '

' . __( 'You can also moderate the comment from this screen using the Status box, where you can also change the timestamp of the comment.' ) . '

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

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

' . + '

' . __( 'Documentation on Comments' ) . '

' . + '

' . __( 'Support Forums' ) . '

' + ); + + wp_enqueue_script('comment'); + require_once( ABSPATH . 'wp-admin/admin-header.php' ); + + $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)') ); + + if ( !current_user_can( 'edit_comment', $comment_id ) ) + comment_footer_die( __('You are not allowed to edit this comment.') ); + + if ( 'trash' == $comment->comment_approved ) + comment_footer_die( __('This comment is in the Trash. Please move it out of the Trash if you want to edit it.') ); + + $comment = get_comment_to_edit( $comment_id ); + + include( ABSPATH . 'wp-admin/edit-form-comment.php' ); + + break; + +case 'delete' : +case 'approve' : +case 'trash' : +case 'spam' : + + $title = __('Moderate Comment'); + + $comment_id = absint( $_GET['c'] ); + + if ( !$comment = get_comment_to_edit( $comment_id ) ) { + wp_redirect( admin_url('edit-comments.php?error=1') ); + die(); + } + + if ( !current_user_can( 'edit_comment', $comment->comment_ID ) ) { + wp_redirect( admin_url('edit-comments.php?error=2') ); + die(); + } + + // No need to re-approve/re-trash/re-spam a comment. + if ( $action == str_replace( '1', 'approve', $comment->comment_approved ) ) { + wp_redirect( admin_url( 'edit-comments.php?same=' . $comment_id ) ); + die(); + } + + require_once( ABSPATH . 'wp-admin/admin-header.php' ); + + $formaction = $action . 'comment'; + $nonce_action = 'approve' == $action ? 'approve-comment_' : 'delete-comment_'; + $nonce_action .= $comment_id; + +?> +
+ +
+ +

+ +comment_approved != '0' ) { // if not unapproved + $message = ''; + switch ( $comment->comment_approved ) { + case '1' : + $message = __('This comment is currently approved.'); + break; + case 'spam' : + $message = __('This comment is currently marked as spam.'); + break; + case 'trash' : + $message = __('This comment is currently in the Trash.'); + break; + } + if ( $message ) + echo '

' . $message . '

'; +} +?> +

+ + + + + + +comment_author_email ) { ?> + + + + + +comment_author_url ) { ?> + + + + + + + + + +
comment_author; ?>
comment_author_email; ?>
comment_author_url; ?>
comment_content; ?>
+ +

+ +
+ + + + + + +
+ + + + + +
+ +
+
+' . __('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.') ); + + if ( '' != wp_get_referer() && ! $noredir && false === strpos(wp_get_referer(), 'comment.php') ) + $redir = wp_get_referer(); + elseif ( '' != wp_get_original_referer() && ! $noredir ) + $redir = wp_get_original_referer(); + elseif ( in_array( $action, array( 'approvecomment', 'unapprovecomment' ) ) ) + $redir = admin_url('edit-comments.php?p=' . absint( $comment->comment_post_ID ) ); + else + $redir = admin_url('edit-comments.php'); + + $redir = remove_query_arg( array('spammed', 'unspammed', 'trashed', 'untrashed', 'deleted', 'ids', 'approved', 'unapproved'), $redir ); + + switch ( $action ) { + case 'deletecomment' : + wp_delete_comment( $comment_id ); + $redir = add_query_arg( array('deleted' => '1'), $redir ); + break; + case 'trashcomment' : + wp_trash_comment($comment_id); + $redir = add_query_arg( array('trashed' => '1', 'ids' => $comment_id), $redir ); + break; + case 'untrashcomment' : + wp_untrash_comment($comment_id); + $redir = add_query_arg( array('untrashed' => '1'), $redir ); + break; + case 'spamcomment' : + wp_spam_comment($comment_id); + $redir = add_query_arg( array('spammed' => '1', 'ids' => $comment_id), $redir ); + break; + case 'unspamcomment' : + wp_unspam_comment($comment_id); + $redir = add_query_arg( array('unspammed' => '1'), $redir ); + break; + case 'approvecomment' : + wp_set_comment_status( $comment_id, 'approve' ); + $redir = add_query_arg( array( 'approved' => 1 ), $redir ); + break; + case 'unapprovecomment' : + wp_set_comment_status( $comment_id, 'hold' ); + $redir = add_query_arg( array( 'unapproved' => 1 ), $redir ); + break; + } + + wp_redirect( $redir ); + die; + break; + +case 'editedcomment' : + + $comment_id = absint( $_POST['comment_ID'] ); + $comment_post_id = absint( $_POST['comment_post_ID'] ); + + check_admin_referer( 'update-comment_' . $comment_id ); + + edit_comment(); + + $location = ( empty( $_POST['referredby'] ) ? "edit-comments.php?p=$comment_post_id" : $_POST['referredby'] ) . '#comment-' . $comment_id; + + /** + * Filter the URI the user is redirected to after editing a comment in the admin. + * + * @since 2.1.0 + * + * @param string $location The URI the user will be redirected to. + * @param int $comment_id The ID of the comment being edited. + */ + $location = apply_filters( 'comment_edit_redirect', $location, $comment_id ); + wp_redirect( $location ); + + exit(); + break; + +default: + wp_die( __('Unknown action.') ); + break; + +} // end switch + +include( ABSPATH . 'wp-admin/admin-footer.php' ); diff --git a/wp-admin/credits.php b/wp-admin/credits.php new file mode 100644 index 0000000..87ebc86 --- /dev/null +++ b/wp-admin/credits.php @@ -0,0 +1,191 @@ +' . esc_html( $display_name ) . ''; +} + +/** + * Retrieve the link to an external library used in WordPress. + * + * @access private + * @since 3.2.0 + * + * @param string &$data External library data, passed by reference. + * @return string Link to the external library. + */ +function _wp_credits_build_object_link( &$data ) { + $data = '' . $data[0] . ''; +} + +list( $display_version ) = explode( '-', $wp_version ); + +include( ABSPATH . 'wp-admin/admin-header.php' ); +?> +
+ +

+ +
+ +
+ + + +' . sprintf( __( 'WordPress is created by a worldwide team of passionate individuals. Get involved in WordPress.' ), + 'https://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( ABSPATH . 'wp-admin/admin-footer.php' ); + exit; +} + +echo '

' . __( 'WordPress is created by a worldwide team of passionate individuals.' ) . "

\n"; + +$gravatar = is_ssl() ? 'https://secure.gravatar.com/avatar/' : 'http://0.gravatar.com/avatar/'; + +foreach ( $credits['groups'] as $group_slug => $group_data ) { + if ( $group_data['name'] ) { + if ( 'Translators' == $group_data['name'] ) { + // Considered a special slug in the API response. (Also, will never be returned for en_US.) + $title = _x( 'Translators', 'Translate this to be the equivalent of English Translators in your language for the credits page Translators section' ); + } elseif ( isset( $group_data['placeholders'] ) ) { + $title = vsprintf( translate( $group_data['name'] ), $group_data['placeholders'] ); + } else { + $title = translate( $group_data['name'] ); + } + + echo '

' . $title . "

\n"; + } + + if ( ! empty( $group_data['shuffle'] ) ) + shuffle( $group_data['data'] ); // We were going to sort by ability to pronounce "hierarchical," but that wouldn't be fair to Matt. + + switch ( $group_data['type'] ) { + case 'list' : + array_walk( $group_data['data'], '_wp_credits_add_profile_link', $credits['data']['profiles'] ); + echo '

' . wp_sprintf( '%l.', $group_data['data'] ) . "

\n\n"; + break; + case 'libraries' : + array_walk( $group_data['data'], '_wp_credits_build_object_link' ); + echo '

' . wp_sprintf( '%l.', $group_data['data'] ) . "

\n\n"; + break; + default: + $compact = 'compact' == $group_data['type']; + $classes = 'wp-people-group ' . ( $compact ? 'compact' : '' ); + echo '\n"; + break; + } +} + +?> +

Get involved in WordPress.' ), + /* translators: URL to the Make WordPress 'Get Involved' landing page used on the credits page */ + __( 'https://make.wordpress.org/' ) ); ?>

+ +
+ div { + position: relative; + width: 47.5%; + margin-left: 4.999999999%; + float: right; +} + +.about-wrap .feature-section.three-col > div { + position: relative; + width: 29.95%; + margin-left: 4.999999999%; + float: right; +} + +.about-wrap .feature-section.col .last-feature { + margin-left: 0; +} + +.about-wrap .under-the-hood .feature-section { + margin-top: 0; +} + +.about-wrap .changelog .feature-section { + overflow: hidden; +} + +.about-wrap .feature-section.two-col div p { + margin-left: 3%; +} + +.about-wrap .feature-section div p img { + float: left; + margin-right: 10px; + max-width: 20%; +} + +.about-wrap .changelog li { + list-style-type: disc; + margin-right: 3em; +} + +/* Return to Dashboard Home link */ + +.about-wrap .return-to-dashboard { + margin: 30px -5px 0 0; + 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; +} + +.about-wrap ul.wp-people-group { + overflow: hidden; + padding: 0 5px; + margin: 0 -5px 0 -15px; +} + +.about-wrap ul.compact { + margin-bottom: 0 +} + +.about-wrap li.wp-person { + float: right; + margin-left: 10px; +} + +.about-wrap li.wp-person img.gravatar { + float: right; + margin: 0 0 10px 10px; + padding: 2px; + width: 60px; + height: 60px; +} + +.about-wrap ul.compact li.wp-person img.gravatar { + width: 30px; + height: 30px; +} + +/* @todo: combine this */ +.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; +} + +/* =Media Queries +-------------------------------------------------------------- */ + +@media screen and ( max-width: 782px ) { + .about-wrap .feature-section.one-col > div, + .about-wrap .feature-section.two-col > div, + .about-wrap .feature-section.three-col > div { + width: 100%; + margin: 0 0 40px; + padding: 0 0 40px; + float: none; + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + } + + .about-wrap .under-the-hood .feature-section > div, + .about-wrap .feature-section.col > div.last-feature { + margin: 0; + padding: 0; + border-bottom: none; + } + +} + +@media only screen and (max-width: 500px) { + .about-wrap { + margin-left: 20px; + margin-right: 10px; + } + + .about-wrap h1, + .about-text { + margin-left: 0; + } + + .about-text { + margin-bottom: 0.25em; + } + + .about-wrap .wp-badge { + position: relative; + margin-bottom: 1.5em; + width: 100%; + } + + .about-wrap .feature-section.three-col div { + width: 100%; + float: none; + } + + .about-wrap .three-col.about-updates .col-1 { + padding: 0; + float: none; + } + + .about-wrap .three-col.about-updates .col-2 { + margin: 0 0 20px; + width: 100%; + float: none; + } +} \ No newline at end of file diff --git a/wp-admin/css/about.css b/wp-admin/css/about.css new file mode 100644 index 0000000..44c85c8 --- /dev/null +++ b/wp-admin/css/about.css @@ -0,0 +1,388 @@ +/*------------------------------------------------------------------------------ + 22.0 - About Pages +------------------------------------------------------------------------------*/ + +.about-wrap { + position: relative; + margin: 25px 40px 0 20px; + max-width: 1050px; /* readability */ + + font-size: 15px; +} + +.about-wrap div.updated, +.about-wrap div.error { + display: none !important; +} + +.about-wrap hr { + border: 0; + height: 0; + margin: 0; + border-top: 1px solid rgba(0, 0, 0, 0.1); +} + +.about-wrap img { + margin: 0; + max-width: 100%; + vertical-align: middle; +} + +/* Typography */ + +.about-wrap p { + line-height: 1.6em; + font-size: 14px; +} + +.about-wrap h1 { + margin: 0.2em 200px 0 0; + color: #333; + line-height: 1.2em; + font-size: 2.8em; + font-weight: 400; +} + +.about-wrap h4 { + color: #222; +} + +.about-wrap .about-text, +.about-wrap p.about-description, +.about-wrap li.wp-person a.web { + font-weight: normal; + line-height: 1.6em; + font-size: 19px; +} + +.about-description { + margin-top: 1.4em; +} + +.about-text { + margin: 1em 200px 1em 0; + min-height: 60px; + color: #777; + font-size: 24px; +} + +.about-wrap .changelog h2.about-headline-callout { + margin: 1.1em 0 0.2em; + font-size: 2.4em; + font-weight: 300; + line-height: 1.3; + text-align: center; +} + +.about-wrap h3 { + margin: 1em 0 .6em; + font-size: 1.5em; + line-height: 1.5em; +} + +.customize h3 { + margin-top: 1.75em; + text-align: center; +} + +.about-wrap .feature-section h4 { + margin: 1.4em 0 0.6em 0; + font-size: 1.2em; +} + +.about-wrap .feature-section p { + margin-top: 0.6em; +} + +.about-wrap code, +.about-wrap ol li p { + font-size: 14px; +} + +.about-wrap .button.button-large { + padding: 8px 20px 10px !important; + height: 46px !important; + font-size: 14px; + line-height: 28px !important; +} + +/* 3.8 Images */ + +.about-wrap .about-overview-img { + margin: 0; +} + +/* Point Releases */ + +.about-wrap .point-releases { + margin-top: 5px; + border-bottom: 1px solid #dfdfdf; +} + +.about-wrap .changelog.point-releases h3 { + padding-top: 35px; +} + +.about-wrap .changelog.point-releases h3:first-child { + padding-top: 7px; +} + +/* WordPress Version Badge */ + +.wp-badge { + background: #0074a2 url(../images/w-logo-white.png?ver=20131202) no-repeat; + background: #0074a2, url(../images/wordpress-logo-white.svg?ver=20131110) no-repeat; /* multiple backgrounds are ignored by browsers that don't support SVGs */ + background-position: center 24px; + -webkit-background-size: 85px 85px; + background-size: 85px 85px; + color: #78c8e6; + font-size: 14px; + text-align: center; + font-weight: 600; + margin: 5px 0 0; + padding-top: 120px; + height: 40px; + display: inline-block; + width: 150px; + text-rendering: optimizeLegibility; + -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.2); + box-shadow: 0 1px 3px rgba(0,0,0,0.2); +} + + +.about-wrap .wp-badge { + position: absolute; + top: 0; + right: 0; +} + +/* Tabs */ + +.about-wrap h2.nav-tab-wrapper { + padding-left: 6px; +} + +.about-wrap h2 .nav-tab { + padding: 4px 15px 6px; + margin: 0 3px -1px 0; + font-size: 18px; + vertical-align: top; + border-width: 1px; +} + +/* Changelog / Update screen */ + +.about-overview { + margin-top: 40px; + text-align: center; +} + +.about-overview .wp-video { + margin: 0 auto; +} + +.changelog .wp-playlist .wp-playlist-current-item img { + height: 64px; + width: auto; + max-width: 100%; +} + +.about-wrap .feature-section { + margin-top: 40px; + padding-bottom: 20px; +} + +.about-wrap .feature-section.two-col > div { + position: relative; + width: 47.5%; + margin-right: 4.999999999%; + float: left; +} + +.about-wrap .feature-section.three-col > div { + position: relative; + width: 29.95%; + margin-right: 4.999999999%; + float: left; +} + +.about-wrap .feature-section.col .last-feature { + margin-right: 0; +} + +.about-wrap .under-the-hood .feature-section { + margin-top: 0; +} + +.about-wrap .changelog .feature-section { + overflow: hidden; +} + +.about-wrap .feature-section.two-col div p { + margin-right: 3%; +} + +.about-wrap .feature-section div p img { + float: right; + margin-left: 10px; + max-width: 20%; +} + +.about-wrap .changelog li { + list-style-type: disc; + margin-left: 3em; +} + +/* Return to Dashboard Home link */ + +.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; +} + +/* Credits */ + +.about-wrap h4.wp-people-group { + margin-top: 2.6em; + font-size: 16px; +} + +.about-wrap ul.wp-people-group { + overflow: hidden; + padding: 0 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; +} + +/* @todo: combine this */ +.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; +} + +/* =Media Queries +-------------------------------------------------------------- */ + +@media screen and ( max-width: 782px ) { + .about-wrap .feature-section.one-col > div, + .about-wrap .feature-section.two-col > div, + .about-wrap .feature-section.three-col > div { + width: 100%; + margin: 0 0 40px; + padding: 0 0 40px; + float: none; + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + } + + .about-wrap .under-the-hood .feature-section > div, + .about-wrap .feature-section.col > div.last-feature { + margin: 0; + padding: 0; + border-bottom: none; + } + +} + +@media only screen and (max-width: 500px) { + .about-wrap { + margin-right: 20px; + margin-left: 10px; + } + + .about-wrap h1, + .about-text { + margin-right: 0; + } + + .about-text { + margin-bottom: 0.25em; + } + + .about-wrap .wp-badge { + position: relative; + margin-bottom: 1.5em; + width: 100%; + } + + .about-wrap .feature-section.three-col div { + width: 100%; + float: none; + } + + .about-wrap .three-col.about-updates .col-1 { + padding: 0; + float: none; + } + + .about-wrap .three-col.about-updates .col-2 { + margin: 0 0 20px; + width: 100%; + float: none; + } +} \ No newline at end of file diff --git a/wp-admin/css/admin-menu-rtl.css b/wp-admin/css/admin-menu-rtl.css new file mode 100644 index 0000000..9b10663 --- /dev/null +++ b/wp-admin/css/admin-menu-rtl.css @@ -0,0 +1,917 @@ +#adminmenuback, +#adminmenuwrap, +#adminmenu, +#adminmenu .wp-submenu { + width: 160px; + background-color: #222; +} + +#adminmenuback { + position: absolute; + top: 0; + bottom: 0; + z-index: -1; +} + +#adminmenu { + clear: right; + margin: 12px 0 0; + padding: 0; + list-style: none; +} + +.folded #adminmenuback, +.folded #adminmenuwrap, +.folded #adminmenu, +.folded #adminmenu li.menu-top { + width: 36px; +} + +.icon16 { + height: 18px; + width: 18px; + padding: 6px 6px; + margin: -6px -8px 0 0; + float: right; +} + +/* New Menu icons */ + +.icon16:before { + color: #999; + font: normal 20px/1 'dashicons'; + speak: none; + padding: 6px 0; + height: 34px; + width: 20px; + display: inline-block; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-transition: all .1s ease-in-out; + transition: all .1s ease-in-out; +} + +.icon16.icon-dashboard:before { + content: '\f226'; +} + +.icon16.icon-post:before { + content: '\f109'; +} + +.icon16.icon-media:before { + content: '\f104'; +} + +.icon16.icon-links:before { + content: '\f103'; +} + +.icon16.icon-page:before { + content: '\f105'; +} + +.icon16.icon-comments:before { + content: '\f101'; + margin-top: 1px; +} + +.icon16.icon-appearance:before { + content: '\f100'; +} + +.icon16.icon-plugins:before { + content: '\f106'; +} + +.icon16.icon-users:before { + content: '\f110'; +} + +.icon16.icon-tools:before { + content: '\f107'; +} + +.icon16.icon-settings:before { + content: '\f108'; +} + +.icon16.icon-site:before { + content: '\f112' +} + +.icon16.icon-generic:before { + content: '\f111'; +} + +/* hide background-image for icons above */ +.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, +.icon16.icon-generic, +.menu-icon-generic div.wp-menu-image { + background-image: none !important; +} + +/*------------------------------------------------------------------------------ + 7.0 - Main Navigation (Left Menu) +------------------------------------------------------------------------------*/ + +#adminmenuwrap { + position: relative; + float: right; +} + +/* side admin menu */ +#adminmenu * { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +#adminmenu li { + margin: 0; + padding: 0; + cursor: pointer; +} + +#adminmenu a { + display: block; + line-height: 18px; + padding: 2px 5px; + color: #eee; +} + +#adminmenu .wp-submenu a { + color: #bbb; +} + +#adminmenu .wp-submenu a:hover, +#adminmenu .wp-submenu a:focus { + background: none; +} + +#adminmenu a:hover, +#adminmenu li.menu-top > a:focus, +#adminmenu .wp-submenu a:hover, +#adminmenu .wp-submenu a:focus { + color: #2ea2cc; +} + +#adminmenu li.menu-top { + border: none; + min-height: 34px; + position: relative; +} + +#adminmenu .wp-submenu { + list-style: none; + position: absolute; + top: -1000em; + right: 160px; + overflow: visible; + word-wrap: break-word; +} + +#adminmenu .wp-submenu, +.folded #adminmenu a.wp-has-current-submenu:focus + .wp-submenu, +.folded #adminmenu .wp-has-current-submenu .wp-submenu { + padding: 7px 0 8px; + z-index: 9999; + background-color: #333; + -webkit-box-shadow: 0 3px 5px rgba(0,0,0,0.2); + box-shadow: 0 3px 5px rgba(0,0,0,0.2); +} + +.js #adminmenu .sub-open, +.js #adminmenu .opensub .wp-submenu, +#adminmenu a.menu-top:focus + .wp-submenu, +.no-js li.wp-has-submenu:hover .wp-submenu { + top: -1px; +} + +#adminmenu .wp-has-current-submenu .wp-submenu, +.no-js li.wp-has-current-submenu:hover .wp-submenu, +#adminmenu a.wp-has-current-submenu:focus + .wp-submenu, +#adminmenu .wp-has-current-submenu .wp-submenu.sub-open, +#adminmenu .wp-has-current-submenu.opensub .wp-submenu { + position: relative; + z-index: 3; + top: auto; + right: auto; + left: auto; + bottom: auto; + border: 0 none; + margin-top: 0; + -webkit-box-shadow: none; + box-shadow: none; + background-color: #333; +} + +/* ensure that wp-submenu's box shadow doesn't appear on top of the focused menu item's background. */ +#adminmenu li.menu-top:hover, +#adminmenu li.opensub > a.menu-top, +#adminmenu li > a.menu-top:focus { + position: relative; + background-color: #111; +} + +.folded #adminmenu li.menu-top:hover, +.folded #adminmenu li.opensub > a.menu-top, +.folded #adminmenu li > a.menu-top:focus { + z-index: 10000; +} + +#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, +#adminmenu .wp-menu-arrow div { + background: #0074a2; + color: #fff; +} + +.folded #adminmenu .wp-submenu.sub-open, +.folded #adminmenu .opensub .wp-submenu, +.folded #adminmenu .wp-has-current-submenu .wp-submenu.sub-open, +.folded #adminmenu .wp-has-current-submenu.opensub .wp-submenu, +.folded #adminmenu a.menu-top:focus + .wp-submenu, +.folded #adminmenu .wp-has-current-submenu a.menu-top:focus + .wp-submenu, +.no-js.folded #adminmenu .wp-has-submenu:hover .wp-submenu { + top: 0; + right: 36px; +} + +.folded #adminmenu a.wp-has-current-submenu:focus + .wp-submenu, +.folded #adminmenu .wp-has-current-submenu .wp-submenu { + position: absolute; + top: -1000em; +} + +#adminmenu .wp-not-current-submenu .wp-submenu, +.folded #adminmenu .wp-has-current-submenu .wp-submenu { + min-width: 160px; + width: auto; +} + +#adminmenu .wp-submenu a { + font-size: 13px; + line-height: 1.2; + margin: 0; + padding: 6px 0; +} + +#adminmenu .wp-submenu li.current, +#adminmenu .wp-submenu li.current a, +#adminmenu .opensub .wp-submenu li.current a, +#adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a, +#adminmenu .wp-submenu li.current a:hover, +#adminmenu .wp-submenu li.current a:focus { + color: #fff; +} + +#adminmenu .wp-not-current-submenu li > a, +.folded #adminmenu .wp-has-current-submenu li > a { + padding-left: 16px; + padding-right: 14px; + -webkit-transition: all .1s ease-in-out; + transition: all .1s ease-in-out; +} + +#adminmenu .wp-has-current-submenu ul > li > a, +.folded #adminmenu li.menu-top .wp-submenu > li > a { + padding: 6px 12px; +} + +#adminmenu a.menu-top, +#adminmenu .wp-submenu-head { + font-size: 14px; + font-weight: 400; + line-height: 18px; + padding: 0; +} + +#adminmenu .wp-submenu-head, +.folded #adminmenu .wp-menu-name { + display: none; +} + +.folded #adminmenu .wp-submenu-head { + display: block; +} + +#adminmenu .wp-submenu li { + padding: 0; + margin: 0; + overflow: hidden; +} + +#adminmenu .wp-menu-image img { + padding: 9px 0 0 0; + opacity: 0.6; + filter: alpha(opacity=60); +} + +#adminmenu div.wp-menu-name { + padding: 8px 0; +} + +#adminmenu div.wp-menu-image { + float: right; + width: 36px; + height: 34px; + margin: 0; + text-align: center; +} + +#adminmenu div.wp-menu-image.svg { + background-repeat: no-repeat; + background-position: center; + -webkit-background-size: 20px auto; + background-size: 20px auto; +} + +div.wp-menu-image:before { + color: #999; + padding: 7px 0; + -webkit-transition: all .1s ease-in-out; + transition: all .1s ease-in-out; +} + +#adminmenu div.wp-menu-image:before { + color: #999; +} + +#adminmenu li.wp-has-current-submenu:hover div.wp-menu-image:before, +#adminmenu .wp-has-current-submenu div.wp-menu-image:before, +#adminmenu .current div.wp-menu-image:before, +#adminmenu a.wp-has-current-submenu:hover div.wp-menu-image:before, +#adminmenu a.current:hover div.wp-menu-image:before { + color: #fff; +} + +#adminmenu li:hover div.wp-menu-image:before { + color: #2ea2cc; +} + +.folded #adminmenu div.wp-menu-image { + width: 35px; + height: 30px; + position: absolute; + z-index: 25; +} + +.folded #adminmenu a.menu-top { + height: 34px; +} + +/* No @font-face support */ +.no-font-face #adminmenu .wp-menu-image { + display: none; +} + +.no-font-face #adminmenu div.wp-menu-name { + padding: 8px 12px; +} + +.no-font-face.auto-fold #adminmenu .wp-menu-name { + margin-right: 0; +} +/* End no @font-face support */ + +/* Sticky admin menu */ +.sticky-menu #adminmenuwrap { + position: fixed; + z-index: 9999; /* Match the z-index of .wp-submenu to ensure flyout menus don't appear underneath main column elements */ +} + +/* A new arrow */ + +.wp-menu-arrow { + display: none !important; +} + +ul#adminmenu a.wp-has-current-submenu { + position: relative; +} + +ul#adminmenu a.wp-has-current-submenu:after, +ul#adminmenu > li.current > a.current:after { + left: 0; + border: solid 8px transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + pointer-events: none; + border-left-color: #f1f1f1; + top: 50%; + margin-top: -8px; +} + +.folded ul#adminmenu li:hover a.wp-has-current-submenu:after { + display: none; +} + +.folded ul#adminmenu a.wp-has-current-submenu:after, +.folded ul#adminmenu > li a.current:after { + border-width: 4px; + margin-top: -4px; +} + +/* flyout menu arrow */ +#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after { + left: 0; + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + pointer-events: none; + border-width: 8px; + top: 10px; + z-index: 10000; +} + +.folded ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after { + border-width: 4px; + margin-top: -4px; + top: 18px; +} + +#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after { + border-left-color: #333; +} + +#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: 5px; + padding: 0; + margin: 0 0 6px 0; + cursor: inherit; +} + +/* @todo: is this even needed given that it's nested beneath the above li.wp-menu-separator? */ +#adminmenu div.separator { + height: 2px; + padding: 0; +} + +#adminmenu .wp-submenu .wp-submenu-head { + color: #fff; + font-weight: 400; + font-size: 14px; + padding: 8px 11px 8px 4px; + margin: -7px 0px 4px; +} + +#adminmenu li.current, +.folded #adminmenu li.wp-menu-open { + border: 0 none; +} + +#adminmenu .awaiting-mod, +#adminmenu .update-plugins, +#sidemenu li a span.update-plugins { + display: inline-block; + background-color: #d54e21; + color: #fff; + font-size: 9px; + line-height: 17px; + font-weight: 600; + margin: 1px 2px 0 0; + vertical-align: top; + -webkit-border-radius: 10px; + border-radius: 10px; + z-index: 26; +} + +#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.current a .awaiting-mod, +#adminmenu li a.wp-has-current-submenu .update-plugins { + background-color: #2ea2cc; + color: #fff; +} + +#adminmenu li span.count-0, +#sidemenu li a .count-0 { + display: none; +} + +#collapse-menu { + font-size: 13px; + line-height: 34px; + margin-top: 10px; + color: #aaa; + -webkit-transition: all .1s ease-in-out; + transition: all .1s ease-in-out; +} + +#collapse-menu:hover, +#collapse-menu:hover #collapse-button div:after { + color: #2ea2cc; +} + +.folded #collapse-menu span { + display: none; +} + +#collapse-button, +#collapse-button div { + width: 15px; + height: 15px; +} + +#collapse-button { + float: right; + height: 15px; + margin: 10px 11px 10px 8px; + width: 15px; + -webkit-border-radius: 10px; + border-radius: 10px; +} + +#wpwrap #collapse-button div { + padding: 0; +} + +#collapse-button div:after { + content: '\f148'; + display: block; + line-height: 15px; + right: -3px; + top: -3px; + color: #aaa; + font: normal 20px/1 'dashicons' !important; + speak: none; + margin: 0 auto; + padding: 0 !important; + position: relative; + text-align: center; + width: 20px; + -webkit-transition: all .1s ease-in-out; + transition: all .1s ease-in-out; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.folded #collapse-button div:after, +.rtl #collapse-button div:after { + -webkit-transform: rotate(180deg); + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} + +.rtl.folded #collapse-button div:after { + -webkit-transform: none; + -ms-transform: none; + transform: none; +} + +/** + * Toolbar menu toggle + */ +li#wp-admin-bar-menu-toggle { + display: none; +} + + +/* Auto-folding of the admin menu */ +@media only screen and (max-width: 900px) { + .auto-fold #wpcontent, + .auto-fold #wpfooter { + margin-right: 56px; + } + + .auto-fold #adminmenuback, + .auto-fold #adminmenuwrap, + .auto-fold #adminmenu, + .auto-fold #adminmenu li.menu-top { + width: 36px; + } + + .auto-fold #adminmenu .wp-submenu.sub-open, + .auto-fold #adminmenu .opensub .wp-submenu, + .auto-fold #adminmenu .wp-has-current-submenu .wp-submenu.sub-open, + .auto-fold #adminmenu .wp-has-current-submenu.opensub .wp-submenu, + .auto-fold #adminmenu a.menu-top:focus + .wp-submenu, + .auto-fold #adminmenu .wp-has-current-submenu a.menu-top:focus + .wp-submenu { + top: 0px; + right: 36px; + } + + .auto-fold #adminmenu a.wp-has-current-submenu:focus + .wp-submenu, + .auto-fold #adminmenu .wp-has-current-submenu .wp-submenu { + position: absolute; + top: -1000em; + margin-left: -1px; + padding: 7px 0 8px; + z-index: 9999; + } + + .auto-fold #adminmenu .wp-has-current-submenu .wp-submenu { + min-width: 150px; + width: auto; + } + + .auto-fold #adminmenu .wp-has-current-submenu li > a { + padding-left: 16px; + padding-right: 14px; + } + + + .auto-fold #adminmenu li.menu-top .wp-submenu > li > a { + padding-right: 12px; + } + + .auto-fold #adminmenu .wp-menu-name { + display: none; + } + + .auto-fold #adminmenu .wp-submenu-head { + display: block; + } + + .auto-fold #adminmenu div.wp-menu-image { + height: 30px; + width: 34px; + position: absolute; + z-index: 25; + } + + .auto-fold #adminmenu a.menu-top { + height: 34px; + } + + .auto-fold #adminmenu li.wp-menu-open { + border: 0 none; + } + + .auto-fold #adminmenu .wp-has-current-submenu.menu-top-last { + margin-bottom: 0; + } + + .auto-fold ul#adminmenu li:hover a.wp-has-current-submenu:after { + display: none; + } + + .auto-fold ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after { + border-width: 4px; + margin-top: -4px; + top: 16px; + } + + .auto-fold ul#adminmenu a.wp-has-current-submenu:after, + .auto-fold ul#adminmenu > li a.current:after { + border-width: 4px; + margin-top: -4px; + } + + .auto-fold #adminmenu li.menu-top:hover, + .auto-fold #adminmenu li.opensub > a.menu-top, + .auto-fold #adminmenu li > a.menu-top:focus { + z-index: 10000; + } + + .auto-fold #collapse-menu span { + display: none; + } + + .auto-fold #collapse-button div { + background: none; + } + + .auto-fold #collapse-button div:after { + -webkit-transform: rotate(180deg); + -ms-transform: rotate(180deg); + transform: rotate(180deg); + } + + .rtl.auto-fold #collapse-button div:after { + -webkit-transform: none; + -ms-transform: none; + transform: none; + } + +} + +@media screen and ( max-width: 782px ) { + .auto-fold #wpcontent { + position: relative; + margin-right: 0; + padding-right: 10px; + } + + .sticky-menu #adminmenuwrap { + position: relative; + z-index: auto; + top: 0; + } + + /* Sidebar Adjustments */ + .auto-fold #adminmenu, + .auto-fold #adminmenuback, + .auto-fold #adminmenuwrap { + position: absolute; + width: 190px; + z-index: 100; + } + + .auto-fold #adminmenuback, + .auto-fold #adminmenuwrap { + display: none; + } + + .auto-fold .wp-responsive-open #adminmenuback, + .auto-fold .wp-responsive-open #adminmenuwrap { + display: block; + } + + .auto-fold #adminmenu li.menu-top { + width: 100%; + } + + /* Resize the admin menu items to a comfortable touch size */ + .auto-fold #adminmenu li a { + font-size: 16px; + padding: 5px; + } + + .auto-fold #adminmenu li.menu-top .wp-submenu > li > a { + padding: 10px 20px 10px 10px; + } + + /* Restore the menu names */ + .auto-fold #adminmenu .wp-menu-name { + display: block; + margin-right: 35px; + } + + /* Switch the arrow side */ + .auto-fold ul#adminmenu a.wp-has-current-submenu:after, + .auto-fold ul#adminmenu > li.current > a.current:after { + border-width: 8px; + margin-top: -8px; + } + + .auto-fold ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after { + display: none; + } + + /* Make the submenus appear correctly when tapped. */ + #adminmenu .wp-submenu { + position: relative; + display: none; + } + + .auto-fold #adminmenu .selected .wp-submenu, + .auto-fold #adminmenu .wp-menu-open .wp-submenu { + position: relative; + display: block; + top: 0; + right: -1px; + -webkit-box-shadow: none; + box-shadow: none; + } + + .auto-fold #adminmenu .selected .wp-submenu:after, + .auto-fold #adminmenu .wp-menu-open .wp-submenu:after { + display: none; + } + + .auto-fold #adminmenu .opensub .wp-submenu { + display: none; + } + + .auto-fold #adminmenu .selected .wp-submenu { + display: block; + } + + .auto-fold ul#adminmenu li:hover a.wp-has-current-submenu:after { + display: block; + } + + .auto-fold #adminmenu a.menu-top:focus + .wp-submenu, + .auto-fold #adminmenu .wp-has-current-submenu a.menu-top:focus + .wp-submenu { + position: relative; + right: -1px; + left: 0; + top: 0; + } + + /* Remove submenu headers and adjust sub meu*/ + #adminmenu .wp-submenu .wp-submenu-head { + display: none; + } + + /* Toolbar menu toggle */ + #wp-responsive-toggle { + position: fixed; + top: 5px; + right: 4px; + padding-left: 10px; + z-index: 99999; + border: none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + + #wpadminbar #wp-admin-bar-menu-toggle a { + display: block; + padding: 0; + overflow: hidden; + outline: none; + text-decoration: none; + border: 1px solid transparent; + background: none; + height: 44px; + margin-right: -1px; + } + + .wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a { + background: #333; + } + + li#wp-admin-bar-menu-toggle { + display: block; + } + + #wpadminbar #wp-admin-bar-menu-toggle a:hover { + border: 1px solid transparent; + } + + #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before { + content: '\f228'; + display: inline-block; + float: right; + font: normal 40px/45px 'Dashicons'; + vertical-align: middle; + outline: none; + margin: 0; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + height: 44px; + width: 50px; + padding: 0; + border: none; + text-align: center; + text-decoration: none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } +} + +/* Smartphone */ +@media screen and (max-width: 600px) { + #adminmenuwrap, + #adminmenuback { + display: none; + } + + .wp-responsive-open #adminmenuwrap, + .wp-responsive-open #adminmenuback { + display: block; + } + + .auto-fold #adminmenu { + top: 46px; + } +} + diff --git a/wp-admin/css/admin-menu.css b/wp-admin/css/admin-menu.css new file mode 100644 index 0000000..a0a9f21 --- /dev/null +++ b/wp-admin/css/admin-menu.css @@ -0,0 +1,917 @@ +#adminmenuback, +#adminmenuwrap, +#adminmenu, +#adminmenu .wp-submenu { + width: 160px; + background-color: #222; +} + +#adminmenuback { + position: absolute; + top: 0; + bottom: 0; + z-index: -1; +} + +#adminmenu { + clear: left; + margin: 12px 0 0; + padding: 0; + list-style: none; +} + +.folded #adminmenuback, +.folded #adminmenuwrap, +.folded #adminmenu, +.folded #adminmenu li.menu-top { + width: 36px; +} + +.icon16 { + height: 18px; + width: 18px; + padding: 6px 6px; + margin: -6px 0 0 -8px; + float: left; +} + +/* New Menu icons */ + +.icon16:before { + color: #999; + font: normal 20px/1 'dashicons'; + speak: none; + padding: 6px 0; + height: 34px; + width: 20px; + display: inline-block; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-transition: all .1s ease-in-out; + transition: all .1s ease-in-out; +} + +.icon16.icon-dashboard:before { + content: '\f226'; +} + +.icon16.icon-post:before { + content: '\f109'; +} + +.icon16.icon-media:before { + content: '\f104'; +} + +.icon16.icon-links:before { + content: '\f103'; +} + +.icon16.icon-page:before { + content: '\f105'; +} + +.icon16.icon-comments:before { + content: '\f101'; + margin-top: 1px; +} + +.icon16.icon-appearance:before { + content: '\f100'; +} + +.icon16.icon-plugins:before { + content: '\f106'; +} + +.icon16.icon-users:before { + content: '\f110'; +} + +.icon16.icon-tools:before { + content: '\f107'; +} + +.icon16.icon-settings:before { + content: '\f108'; +} + +.icon16.icon-site:before { + content: '\f112' +} + +.icon16.icon-generic:before { + content: '\f111'; +} + +/* hide background-image for icons above */ +.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, +.icon16.icon-generic, +.menu-icon-generic div.wp-menu-image { + background-image: none !important; +} + +/*------------------------------------------------------------------------------ + 7.0 - Main Navigation (Left Menu) +------------------------------------------------------------------------------*/ + +#adminmenuwrap { + position: relative; + float: left; +} + +/* side admin menu */ +#adminmenu * { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +#adminmenu li { + margin: 0; + padding: 0; + cursor: pointer; +} + +#adminmenu a { + display: block; + line-height: 18px; + padding: 2px 5px; + color: #eee; +} + +#adminmenu .wp-submenu a { + color: #bbb; +} + +#adminmenu .wp-submenu a:hover, +#adminmenu .wp-submenu a:focus { + background: none; +} + +#adminmenu a:hover, +#adminmenu li.menu-top > a:focus, +#adminmenu .wp-submenu a:hover, +#adminmenu .wp-submenu a:focus { + color: #2ea2cc; +} + +#adminmenu li.menu-top { + border: none; + min-height: 34px; + position: relative; +} + +#adminmenu .wp-submenu { + list-style: none; + position: absolute; + top: -1000em; + left: 160px; + overflow: visible; + word-wrap: break-word; +} + +#adminmenu .wp-submenu, +.folded #adminmenu a.wp-has-current-submenu:focus + .wp-submenu, +.folded #adminmenu .wp-has-current-submenu .wp-submenu { + padding: 7px 0 8px; + z-index: 9999; + background-color: #333; + -webkit-box-shadow: 0 3px 5px rgba(0,0,0,0.2); + box-shadow: 0 3px 5px rgba(0,0,0,0.2); +} + +.js #adminmenu .sub-open, +.js #adminmenu .opensub .wp-submenu, +#adminmenu a.menu-top:focus + .wp-submenu, +.no-js li.wp-has-submenu:hover .wp-submenu { + top: -1px; +} + +#adminmenu .wp-has-current-submenu .wp-submenu, +.no-js li.wp-has-current-submenu:hover .wp-submenu, +#adminmenu a.wp-has-current-submenu:focus + .wp-submenu, +#adminmenu .wp-has-current-submenu .wp-submenu.sub-open, +#adminmenu .wp-has-current-submenu.opensub .wp-submenu { + position: relative; + z-index: 3; + top: auto; + left: auto; + right: auto; + bottom: auto; + border: 0 none; + margin-top: 0; + -webkit-box-shadow: none; + box-shadow: none; + background-color: #333; +} + +/* ensure that wp-submenu's box shadow doesn't appear on top of the focused menu item's background. */ +#adminmenu li.menu-top:hover, +#adminmenu li.opensub > a.menu-top, +#adminmenu li > a.menu-top:focus { + position: relative; + background-color: #111; +} + +.folded #adminmenu li.menu-top:hover, +.folded #adminmenu li.opensub > a.menu-top, +.folded #adminmenu li > a.menu-top:focus { + z-index: 10000; +} + +#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, +#adminmenu .wp-menu-arrow div { + background: #0074a2; + color: #fff; +} + +.folded #adminmenu .wp-submenu.sub-open, +.folded #adminmenu .opensub .wp-submenu, +.folded #adminmenu .wp-has-current-submenu .wp-submenu.sub-open, +.folded #adminmenu .wp-has-current-submenu.opensub .wp-submenu, +.folded #adminmenu a.menu-top:focus + .wp-submenu, +.folded #adminmenu .wp-has-current-submenu a.menu-top:focus + .wp-submenu, +.no-js.folded #adminmenu .wp-has-submenu:hover .wp-submenu { + top: 0; + left: 36px; +} + +.folded #adminmenu a.wp-has-current-submenu:focus + .wp-submenu, +.folded #adminmenu .wp-has-current-submenu .wp-submenu { + position: absolute; + top: -1000em; +} + +#adminmenu .wp-not-current-submenu .wp-submenu, +.folded #adminmenu .wp-has-current-submenu .wp-submenu { + min-width: 160px; + width: auto; +} + +#adminmenu .wp-submenu a { + font-size: 13px; + line-height: 1.2; + margin: 0; + padding: 6px 0; +} + +#adminmenu .wp-submenu li.current, +#adminmenu .wp-submenu li.current a, +#adminmenu .opensub .wp-submenu li.current a, +#adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a, +#adminmenu .wp-submenu li.current a:hover, +#adminmenu .wp-submenu li.current a:focus { + color: #fff; +} + +#adminmenu .wp-not-current-submenu li > a, +.folded #adminmenu .wp-has-current-submenu li > a { + padding-right: 16px; + padding-left: 14px; + -webkit-transition: all .1s ease-in-out; + transition: all .1s ease-in-out; +} + +#adminmenu .wp-has-current-submenu ul > li > a, +.folded #adminmenu li.menu-top .wp-submenu > li > a { + padding: 6px 12px; +} + +#adminmenu a.menu-top, +#adminmenu .wp-submenu-head { + font-size: 14px; + font-weight: 400; + line-height: 18px; + padding: 0; +} + +#adminmenu .wp-submenu-head, +.folded #adminmenu .wp-menu-name { + display: none; +} + +.folded #adminmenu .wp-submenu-head { + display: block; +} + +#adminmenu .wp-submenu li { + padding: 0; + margin: 0; + overflow: hidden; +} + +#adminmenu .wp-menu-image img { + padding: 9px 0 0 0; + opacity: 0.6; + filter: alpha(opacity=60); +} + +#adminmenu div.wp-menu-name { + padding: 8px 0; +} + +#adminmenu div.wp-menu-image { + float: left; + width: 36px; + height: 34px; + margin: 0; + text-align: center; +} + +#adminmenu div.wp-menu-image.svg { + background-repeat: no-repeat; + background-position: center; + -webkit-background-size: 20px auto; + background-size: 20px auto; +} + +div.wp-menu-image:before { + color: #999; + padding: 7px 0; + -webkit-transition: all .1s ease-in-out; + transition: all .1s ease-in-out; +} + +#adminmenu div.wp-menu-image:before { + color: #999; +} + +#adminmenu li.wp-has-current-submenu:hover div.wp-menu-image:before, +#adminmenu .wp-has-current-submenu div.wp-menu-image:before, +#adminmenu .current div.wp-menu-image:before, +#adminmenu a.wp-has-current-submenu:hover div.wp-menu-image:before, +#adminmenu a.current:hover div.wp-menu-image:before { + color: #fff; +} + +#adminmenu li:hover div.wp-menu-image:before { + color: #2ea2cc; +} + +.folded #adminmenu div.wp-menu-image { + width: 35px; + height: 30px; + position: absolute; + z-index: 25; +} + +.folded #adminmenu a.menu-top { + height: 34px; +} + +/* No @font-face support */ +.no-font-face #adminmenu .wp-menu-image { + display: none; +} + +.no-font-face #adminmenu div.wp-menu-name { + padding: 8px 12px; +} + +.no-font-face.auto-fold #adminmenu .wp-menu-name { + margin-left: 0; +} +/* End no @font-face support */ + +/* Sticky admin menu */ +.sticky-menu #adminmenuwrap { + position: fixed; + z-index: 9999; /* Match the z-index of .wp-submenu to ensure flyout menus don't appear underneath main column elements */ +} + +/* A new arrow */ + +.wp-menu-arrow { + display: none !important; +} + +ul#adminmenu a.wp-has-current-submenu { + position: relative; +} + +ul#adminmenu a.wp-has-current-submenu:after, +ul#adminmenu > li.current > a.current:after { + right: 0; + border: solid 8px transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + pointer-events: none; + border-right-color: #f1f1f1; + top: 50%; + margin-top: -8px; +} + +.folded ul#adminmenu li:hover a.wp-has-current-submenu:after { + display: none; +} + +.folded ul#adminmenu a.wp-has-current-submenu:after, +.folded ul#adminmenu > li a.current:after { + border-width: 4px; + margin-top: -4px; +} + +/* flyout menu arrow */ +#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after { + right: 0; + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + pointer-events: none; + border-width: 8px; + top: 10px; + z-index: 10000; +} + +.folded ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after { + border-width: 4px; + margin-top: -4px; + top: 18px; +} + +#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after { + border-right-color: #333; +} + +#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: 5px; + padding: 0; + margin: 0 0 6px 0; + cursor: inherit; +} + +/* @todo: is this even needed given that it's nested beneath the above li.wp-menu-separator? */ +#adminmenu div.separator { + height: 2px; + padding: 0; +} + +#adminmenu .wp-submenu .wp-submenu-head { + color: #fff; + font-weight: 400; + font-size: 14px; + padding: 8px 4px 8px 11px; + margin: -7px 0px 4px; +} + +#adminmenu li.current, +.folded #adminmenu li.wp-menu-open { + border: 0 none; +} + +#adminmenu .awaiting-mod, +#adminmenu .update-plugins, +#sidemenu li a span.update-plugins { + display: inline-block; + background-color: #d54e21; + color: #fff; + font-size: 9px; + line-height: 17px; + font-weight: 600; + margin: 1px 0 0 2px; + vertical-align: top; + -webkit-border-radius: 10px; + border-radius: 10px; + z-index: 26; +} + +#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.current a .awaiting-mod, +#adminmenu li a.wp-has-current-submenu .update-plugins { + background-color: #2ea2cc; + color: #fff; +} + +#adminmenu li span.count-0, +#sidemenu li a .count-0 { + display: none; +} + +#collapse-menu { + font-size: 13px; + line-height: 34px; + margin-top: 10px; + color: #aaa; + -webkit-transition: all .1s ease-in-out; + transition: all .1s ease-in-out; +} + +#collapse-menu:hover, +#collapse-menu:hover #collapse-button div:after { + color: #2ea2cc; +} + +.folded #collapse-menu span { + display: none; +} + +#collapse-button, +#collapse-button div { + width: 15px; + height: 15px; +} + +#collapse-button { + float: left; + height: 15px; + margin: 10px 8px 10px 11px; + width: 15px; + -webkit-border-radius: 10px; + border-radius: 10px; +} + +#wpwrap #collapse-button div { + padding: 0; +} + +#collapse-button div:after { + content: '\f148'; + display: block; + line-height: 15px; + left: -3px; + top: -3px; + color: #aaa; + font: normal 20px/1 'dashicons' !important; + speak: none; + margin: 0 auto; + padding: 0 !important; + position: relative; + text-align: center; + width: 20px; + -webkit-transition: all .1s ease-in-out; + transition: all .1s ease-in-out; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.folded #collapse-button div:after, +.rtl #collapse-button div:after { + -webkit-transform: rotate(180deg); + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} + +.rtl.folded #collapse-button div:after { + -webkit-transform: none; + -ms-transform: none; + transform: none; +} + +/** + * Toolbar menu toggle + */ +li#wp-admin-bar-menu-toggle { + display: none; +} + + +/* Auto-folding of the admin menu */ +@media only screen and (max-width: 900px) { + .auto-fold #wpcontent, + .auto-fold #wpfooter { + margin-left: 56px; + } + + .auto-fold #adminmenuback, + .auto-fold #adminmenuwrap, + .auto-fold #adminmenu, + .auto-fold #adminmenu li.menu-top { + width: 36px; + } + + .auto-fold #adminmenu .wp-submenu.sub-open, + .auto-fold #adminmenu .opensub .wp-submenu, + .auto-fold #adminmenu .wp-has-current-submenu .wp-submenu.sub-open, + .auto-fold #adminmenu .wp-has-current-submenu.opensub .wp-submenu, + .auto-fold #adminmenu a.menu-top:focus + .wp-submenu, + .auto-fold #adminmenu .wp-has-current-submenu a.menu-top:focus + .wp-submenu { + top: 0px; + left: 36px; + } + + .auto-fold #adminmenu a.wp-has-current-submenu:focus + .wp-submenu, + .auto-fold #adminmenu .wp-has-current-submenu .wp-submenu { + position: absolute; + top: -1000em; + margin-right: -1px; + padding: 7px 0 8px; + z-index: 9999; + } + + .auto-fold #adminmenu .wp-has-current-submenu .wp-submenu { + min-width: 150px; + width: auto; + } + + .auto-fold #adminmenu .wp-has-current-submenu li > a { + padding-right: 16px; + padding-left: 14px; + } + + + .auto-fold #adminmenu li.menu-top .wp-submenu > li > a { + padding-left: 12px; + } + + .auto-fold #adminmenu .wp-menu-name { + display: none; + } + + .auto-fold #adminmenu .wp-submenu-head { + display: block; + } + + .auto-fold #adminmenu div.wp-menu-image { + height: 30px; + width: 34px; + position: absolute; + z-index: 25; + } + + .auto-fold #adminmenu a.menu-top { + height: 34px; + } + + .auto-fold #adminmenu li.wp-menu-open { + border: 0 none; + } + + .auto-fold #adminmenu .wp-has-current-submenu.menu-top-last { + margin-bottom: 0; + } + + .auto-fold ul#adminmenu li:hover a.wp-has-current-submenu:after { + display: none; + } + + .auto-fold ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after { + border-width: 4px; + margin-top: -4px; + top: 16px; + } + + .auto-fold ul#adminmenu a.wp-has-current-submenu:after, + .auto-fold ul#adminmenu > li a.current:after { + border-width: 4px; + margin-top: -4px; + } + + .auto-fold #adminmenu li.menu-top:hover, + .auto-fold #adminmenu li.opensub > a.menu-top, + .auto-fold #adminmenu li > a.menu-top:focus { + z-index: 10000; + } + + .auto-fold #collapse-menu span { + display: none; + } + + .auto-fold #collapse-button div { + background: none; + } + + .auto-fold #collapse-button div:after { + -webkit-transform: rotate(180deg); + -ms-transform: rotate(180deg); + transform: rotate(180deg); + } + + .rtl.auto-fold #collapse-button div:after { + -webkit-transform: none; + -ms-transform: none; + transform: none; + } + +} + +@media screen and ( max-width: 782px ) { + .auto-fold #wpcontent { + position: relative; + margin-left: 0; + padding-left: 10px; + } + + .sticky-menu #adminmenuwrap { + position: relative; + z-index: auto; + top: 0; + } + + /* Sidebar Adjustments */ + .auto-fold #adminmenu, + .auto-fold #adminmenuback, + .auto-fold #adminmenuwrap { + position: absolute; + width: 190px; + z-index: 100; + } + + .auto-fold #adminmenuback, + .auto-fold #adminmenuwrap { + display: none; + } + + .auto-fold .wp-responsive-open #adminmenuback, + .auto-fold .wp-responsive-open #adminmenuwrap { + display: block; + } + + .auto-fold #adminmenu li.menu-top { + width: 100%; + } + + /* Resize the admin menu items to a comfortable touch size */ + .auto-fold #adminmenu li a { + font-size: 16px; + padding: 5px; + } + + .auto-fold #adminmenu li.menu-top .wp-submenu > li > a { + padding: 10px 10px 10px 20px; + } + + /* Restore the menu names */ + .auto-fold #adminmenu .wp-menu-name { + display: block; + margin-left: 35px; + } + + /* Switch the arrow side */ + .auto-fold ul#adminmenu a.wp-has-current-submenu:after, + .auto-fold ul#adminmenu > li.current > a.current:after { + border-width: 8px; + margin-top: -8px; + } + + .auto-fold ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after { + display: none; + } + + /* Make the submenus appear correctly when tapped. */ + #adminmenu .wp-submenu { + position: relative; + display: none; + } + + .auto-fold #adminmenu .selected .wp-submenu, + .auto-fold #adminmenu .wp-menu-open .wp-submenu { + position: relative; + display: block; + top: 0; + left: -1px; + -webkit-box-shadow: none; + box-shadow: none; + } + + .auto-fold #adminmenu .selected .wp-submenu:after, + .auto-fold #adminmenu .wp-menu-open .wp-submenu:after { + display: none; + } + + .auto-fold #adminmenu .opensub .wp-submenu { + display: none; + } + + .auto-fold #adminmenu .selected .wp-submenu { + display: block; + } + + .auto-fold ul#adminmenu li:hover a.wp-has-current-submenu:after { + display: block; + } + + .auto-fold #adminmenu a.menu-top:focus + .wp-submenu, + .auto-fold #adminmenu .wp-has-current-submenu a.menu-top:focus + .wp-submenu { + position: relative; + left: -1px; + right: 0; + top: 0; + } + + /* Remove submenu headers and adjust sub meu*/ + #adminmenu .wp-submenu .wp-submenu-head { + display: none; + } + + /* Toolbar menu toggle */ + #wp-responsive-toggle { + position: fixed; + top: 5px; + left: 4px; + padding-right: 10px; + z-index: 99999; + border: none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + + #wpadminbar #wp-admin-bar-menu-toggle a { + display: block; + padding: 0; + overflow: hidden; + outline: none; + text-decoration: none; + border: 1px solid transparent; + background: none; + height: 44px; + margin-left: -1px; + } + + .wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a { + background: #333; + } + + li#wp-admin-bar-menu-toggle { + display: block; + } + + #wpadminbar #wp-admin-bar-menu-toggle a:hover { + border: 1px solid transparent; + } + + #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before { + content: '\f228'; + display: inline-block; + float: left; + font: normal 40px/45px 'Dashicons'; + vertical-align: middle; + outline: none; + margin: 0; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + height: 44px; + width: 50px; + padding: 0; + border: none; + text-align: center; + text-decoration: none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } +} + +/* Smartphone */ +@media screen and (max-width: 600px) { + #adminmenuwrap, + #adminmenuback { + display: none; + } + + .wp-responsive-open #adminmenuwrap, + .wp-responsive-open #adminmenuback { + display: block; + } + + .auto-fold #adminmenu { + top: 46px; + } +} + diff --git a/wp-admin/css/color-picker-rtl.css b/wp-admin/css/color-picker-rtl.css new file mode 100644 index 0000000..f95cbc6 --- /dev/null +++ b/wp-admin/css/color-picker-rtl.css @@ -0,0 +1,126 @@ +.wp-color-picker { + width: 80px; +} + +.wp-picker-container .hidden { + display: none; +} + +.wp-color-result { + background-color: #f7f7f7; + border: 1px solid #ccc; + -webkit-border-radius: 3px; + border-radius: 3px; + cursor: pointer; + display: inline-block; + height: 22px; + margin: 0 0px 6px 6px; + position: relative; + top: 1px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + vertical-align: bottom; + display: inline-block; + padding-right: 30px; + -webkit-box-shadow: 0 1px 0 rgba(0,0,0,.08); + box-shadow: 0 1px 0 rgba(0,0,0,.08); +} + +.wp-color-result:after { + background: #f7f7f7; + -webkit-border-radius: 2px 0 0 2px; + border-radius: 2px 0 0 2px; + border-right: 1px solid #ccc; + color: #555; + content: attr( title ); + display: block; + font-size: 11px; + line-height: 22px; + padding: 0 6px; + position: relative; + left: 0; + text-align: center; + top: 0; + -webkit-box-shadow: inset 0 1px 0 #fff; + box-shadow: inset 0 1px 0 #fff; +} + +.wp-color-result:hover { + background: #fafafa; + border-color: #999; + color: #222; +} + +.wp-color-result:hover:after { + color: #222; + border-color: #aaa; + border-right: 1px solid #999; +} + +.wp-color-result { + top: 0; +} + +.wp-color-result.wp-picker-open:after { + content: attr( data-current ); +} + +.wp-picker-container, .wp-picker-container:active { + display: inline-block; + outline: 0; +} + +.wp-color-result:focus { + border-color: #888; + -webkit-box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.2 ); + box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.2 ); +} + +.wp-color-result:focus:after { + border-color: #888; +} + +.wp-picker-open + .wp-picker-input-wrap { + display: inline-block; + vertical-align: top; +} + +.wp-picker-container .button { + margin-right: 6px; +} + +.wp-picker-container .iris-square-slider .ui-slider-handle:focus { + background-color: #555 +} + +.wp-picker-container .iris-picker { + -webkit-border-radius: 0; + border-radius: 0; + border-color: #dfdfdf; + margin-top: 6px; +} + +.wp-picker-container input[type="text"].wp-color-picker { + width: 65px; + font-size: 12px; + font-family: monospace; + text-align: center; + line-height: 16px; + margin: 0; +} + +.wp-picker-container input[type="text"].wp-color-picker:focus::-webkit-input-placeholder { + color: transparent; +} + +.wp-picker-container input[type="text"].wp-color-picker:-moz-placeholder { + color: #999; +} + +.wp-picker-container input[type="text"].iris-error { + background-color: #ffebe8; + border-color: #c00; + color: #000; +} diff --git a/wp-admin/css/color-picker-rtl.min.css b/wp-admin/css/color-picker-rtl.min.css new file mode 100644 index 0000000..023eccb --- /dev/null +++ b/wp-admin/css/color-picker-rtl.min.css @@ -0,0 +1 @@ +.wp-color-picker{width:80px}.wp-picker-container .hidden{display:none}.wp-color-result{background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;cursor:pointer;height:22px;margin:0 0 6px 6px;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:bottom;display:inline-block;padding-right:30px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.08);box-shadow:0 1px 0 rgba(0,0,0,.08)}.wp-color-result:after{background:#f7f7f7;-webkit-border-radius:2px 0 0 2px;border-radius:2px 0 0 2px;border-right:1px solid #ccc;color:#555;content:attr(title);display:block;font-size:11px;line-height:22px;padding:0 6px;position:relative;left:0;text-align:center;top:0;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.wp-color-result:hover{background:#fafafa;border-color:#999;color:#222}.wp-color-result:hover:after{color:#222;border-color:#aaa;border-right:1px solid #999}.wp-color-result{top:0}.wp-color-result.wp-picker-open:after{content:attr(data-current)}.wp-picker-container,.wp-picker-container:active{display:inline-block;outline:0}.wp-color-result:focus{border-color:#888;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.2);box-shadow:0 1px 2px rgba(0,0,0,.2)}.wp-color-result:focus:after{border-color:#888}.wp-picker-open+.wp-picker-input-wrap{display:inline-block;vertical-align:top}.wp-picker-container .button{margin-right:6px}.wp-picker-container .iris-square-slider .ui-slider-handle:focus{background-color:#555}.wp-picker-container .iris-picker{-webkit-border-radius:0;border-radius:0;border-color:#dfdfdf;margin-top:6px}.wp-picker-container input[type=text].wp-color-picker{width:65px;font-size:12px;font-family:monospace;text-align:center;line-height:16px;margin:0}.wp-picker-container input[type=text].wp-color-picker:focus::-webkit-input-placeholder{color:transparent}.wp-picker-container input[type=text].wp-color-picker:-moz-placeholder{color:#999}.wp-picker-container input[type=text].iris-error{background-color:#ffebe8;border-color:#c00;color:#000} \ No newline at end of file diff --git a/wp-admin/css/color-picker.css b/wp-admin/css/color-picker.css new file mode 100644 index 0000000..1d00d96 --- /dev/null +++ b/wp-admin/css/color-picker.css @@ -0,0 +1,126 @@ +.wp-color-picker { + width: 80px; +} + +.wp-picker-container .hidden { + display: none; +} + +.wp-color-result { + background-color: #f7f7f7; + border: 1px solid #ccc; + -webkit-border-radius: 3px; + border-radius: 3px; + cursor: pointer; + display: inline-block; + height: 22px; + margin: 0 6px 6px 0px; + position: relative; + top: 1px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + vertical-align: bottom; + display: inline-block; + padding-left: 30px; + -webkit-box-shadow: 0 1px 0 rgba(0,0,0,.08); + box-shadow: 0 1px 0 rgba(0,0,0,.08); +} + +.wp-color-result:after { + background: #f7f7f7; + -webkit-border-radius: 0 2px 2px 0; + border-radius: 0 2px 2px 0; + border-left: 1px solid #ccc; + color: #555; + content: attr( title ); + display: block; + font-size: 11px; + line-height: 22px; + padding: 0 6px; + position: relative; + right: 0; + text-align: center; + top: 0; + -webkit-box-shadow: inset 0 1px 0 #fff; + box-shadow: inset 0 1px 0 #fff; +} + +.wp-color-result:hover { + background: #fafafa; + border-color: #999; + color: #222; +} + +.wp-color-result:hover:after { + color: #222; + border-color: #aaa; + border-left: 1px solid #999; +} + +.wp-color-result { + top: 0; +} + +.wp-color-result.wp-picker-open:after { + content: attr( data-current ); +} + +.wp-picker-container, .wp-picker-container:active { + display: inline-block; + outline: 0; +} + +.wp-color-result:focus { + border-color: #888; + -webkit-box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.2 ); + box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.2 ); +} + +.wp-color-result:focus:after { + border-color: #888; +} + +.wp-picker-open + .wp-picker-input-wrap { + display: inline-block; + vertical-align: top; +} + +.wp-picker-container .button { + margin-left: 6px; +} + +.wp-picker-container .iris-square-slider .ui-slider-handle:focus { + background-color: #555 +} + +.wp-picker-container .iris-picker { + -webkit-border-radius: 0; + border-radius: 0; + border-color: #dfdfdf; + margin-top: 6px; +} + +.wp-picker-container input[type="text"].wp-color-picker { + width: 65px; + font-size: 12px; + font-family: monospace; + text-align: center; + line-height: 16px; + margin: 0; +} + +.wp-picker-container input[type="text"].wp-color-picker:focus::-webkit-input-placeholder { + color: transparent; +} + +.wp-picker-container input[type="text"].wp-color-picker:-moz-placeholder { + color: #999; +} + +.wp-picker-container input[type="text"].iris-error { + background-color: #ffebe8; + border-color: #c00; + color: #000; +} diff --git a/wp-admin/css/color-picker.min.css b/wp-admin/css/color-picker.min.css new file mode 100644 index 0000000..8c225dd --- /dev/null +++ b/wp-admin/css/color-picker.min.css @@ -0,0 +1 @@ +.wp-color-picker{width:80px}.wp-picker-container .hidden{display:none}.wp-color-result{background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;cursor:pointer;height:22px;margin:0 6px 6px 0;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:bottom;display:inline-block;padding-left:30px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.08);box-shadow:0 1px 0 rgba(0,0,0,.08)}.wp-color-result:after{background:#f7f7f7;-webkit-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0;border-left:1px solid #ccc;color:#555;content:attr(title);display:block;font-size:11px;line-height:22px;padding:0 6px;position:relative;right:0;text-align:center;top:0;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.wp-color-result:hover{background:#fafafa;border-color:#999;color:#222}.wp-color-result:hover:after{color:#222;border-color:#aaa;border-left:1px solid #999}.wp-color-result{top:0}.wp-color-result.wp-picker-open:after{content:attr(data-current)}.wp-picker-container,.wp-picker-container:active{display:inline-block;outline:0}.wp-color-result:focus{border-color:#888;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.2);box-shadow:0 1px 2px rgba(0,0,0,.2)}.wp-color-result:focus:after{border-color:#888}.wp-picker-open+.wp-picker-input-wrap{display:inline-block;vertical-align:top}.wp-picker-container .button{margin-left:6px}.wp-picker-container .iris-square-slider .ui-slider-handle:focus{background-color:#555}.wp-picker-container .iris-picker{-webkit-border-radius:0;border-radius:0;border-color:#dfdfdf;margin-top:6px}.wp-picker-container input[type=text].wp-color-picker{width:65px;font-size:12px;font-family:monospace;text-align:center;line-height:16px;margin:0}.wp-picker-container input[type=text].wp-color-picker:focus::-webkit-input-placeholder{color:transparent}.wp-picker-container input[type=text].wp-color-picker:-moz-placeholder{color:#999}.wp-picker-container input[type=text].iris-error{background-color:#ffebe8;border-color:#c00;color:#000} \ No newline at end of file diff --git a/wp-admin/css/colors/_admin.scss b/wp-admin/css/colors/_admin.scss new file mode 100644 index 0000000..2ce8004 --- /dev/null +++ b/wp-admin/css/colors/_admin.scss @@ -0,0 +1,515 @@ + +@import 'variables'; +@import 'mixins'; + + +html { + background: $body-background; +} + + +/* Links */ + +a { + color: $link; + + &:hover, + &:active, + &:focus { + color: $link-focus; + } +} + +#media-upload a.del-link:hover, +div.dashboard-widget-submit input:hover, +.subsubsub a:hover, +.subsubsub a.current:hover { + color: $link-focus; +} + + +/* Forms */ + +input[type=checkbox]:checked:before { + color: $form-checked; +} + +input[type=radio]:checked:before { + background: $form-checked; +} + +.wp-core-ui input[type="reset"]:hover, +.wp-core-ui input[type="reset"]:active { + color: $link-focus; +} + + +/* Core UI */ + +.wp-core-ui { + .button-primary { + @include button( $button-color ); + } + + .wp-ui-primary { + color: $text-color; + background-color: $base-color; + } + .wp-ui-text-primary { + color: $base-color; + } + + .wp-ui-highlight { + color: $menu-highlight-text; + background-color: $menu-highlight-background; + } + .wp-ui-text-highlight { + color: $menu-highlight-background; + } + + .wp-ui-notification { + color: $menu-bubble-text; + background-color: $menu-bubble-background; + } + .wp-ui-text-notification { + color: $menu-bubble-background; + } + + .wp-ui-text-icon { + color: $menu-icon; + } +} + + +/* List tables */ + +.wrap .add-new-h2:hover, +#add-new-comment a:hover, +.tablenav .tablenav-pages a:hover, +.tablenav .tablenav-pages a:focus { + color: $menu-text; + background-color: $menu-background; +} + +.view-switch a.current:before { + color: $menu-background; +} + +.view-switch a:hover:before { + color: $menu-bubble-background; +} + +.post-com-count:hover:after { + border-top-color: $menu-background; +} +.post-com-count:hover span { + color: $menu-text; + background-color: $menu-background; +} + +strong .post-com-count:after { + border-top-color: $menu-bubble-background; +} +strong .post-com-count span { + background-color: $menu-bubble-background; +} + + +/* Admin Menu */ + +#adminmenuback, +#adminmenuwrap, +#adminmenu { + background: $menu-background; +} + +#adminmenu a { + color: $menu-text; +} + +#adminmenu div.wp-menu-image:before { + color: $menu-icon; +} + +#adminmenu a:hover, +#adminmenu li.menu-top:hover, +#adminmenu li.opensub > a.menu-top, +#adminmenu li > a.menu-top:focus { + color: $menu-highlight-text; + background-color: $menu-highlight-background; +} + +#adminmenu li.menu-top:hover div.wp-menu-image:before, +#adminmenu li.opensub > a.menu-top div.wp-menu-image:before { + color: $menu-highlight-icon; +} + + +/* Active tabs use a bottom border color that matches the page background color. */ + +.about-wrap h2 .nav-tab-active, +.nav-tab-active, +.nav-tab-active:hover { + background-color: $body-background; + border-bottom-color: $body-background; +} + + +/* Admin Menu: submenu */ + +#adminmenu .wp-submenu, +#adminmenu .wp-has-current-submenu .wp-submenu, +#adminmenu .wp-has-current-submenu.opensub .wp-submenu, +.folded #adminmenu .wp-has-current-submenu .wp-submenu, +#adminmenu a.wp-has-current-submenu:focus + .wp-submenu { + background: $menu-submenu-background; +} + +#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after { + border-right-color: $menu-submenu-background; +} + +#adminmenu .wp-submenu .wp-submenu-head { + color: $menu-submenu-text; +} + +#adminmenu .wp-submenu a, +#adminmenu .wp-has-current-submenu .wp-submenu a, +.folded #adminmenu .wp-has-current-submenu .wp-submenu a, +#adminmenu a.wp-has-current-submenu:focus + .wp-submenu a, +#adminmenu .wp-has-current-submenu.opensub .wp-submenu a { + color: $menu-submenu-text; + + &:focus, &:hover { + color: $menu-submenu-focus-text; + } +} + + +/* Admin Menu: current */ + +#adminmenu .wp-submenu li.current a, +#adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a, +#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a { + color: $menu-submenu-current-text; + + &:hover, &:focus { + color: $menu-submenu-focus-text; + } +} + +ul#adminmenu a.wp-has-current-submenu:after, +ul#adminmenu > li.current > a.current:after { + border-right-color: $body-background; +} + +#adminmenu li.current a.menu-top, +#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, +#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head, +.folded #adminmenu li.current.menu-top { + color: $menu-current-text; + background: $menu-current-background; +} + +#adminmenu li.wp-has-current-submenu div.wp-menu-image:before { + color: $menu-current-icon; +} + + +/* Admin Menu: bubble */ + +#adminmenu .awaiting-mod, +#adminmenu .update-plugins { + color: $menu-bubble-text; + background: $menu-bubble-background; +} + +#adminmenu li.current a .awaiting-mod, +#adminmenu li a.wp-has-current-submenu .update-plugins, +#adminmenu li:hover a .awaiting-mod, +#adminmenu li.menu-top:hover > a .update-plugins { + color: $menu-bubble-current-text; + background: $menu-bubble-current-background; +} + + +/* Admin Menu: collapse button */ + +#collapse-menu { + color: $menu-collapse-text; +} + +#collapse-menu:hover { + color: $menu-collapse-focus-text; +} + +#collapse-button div:after { + color: $menu-collapse-icon; +} + +#collapse-menu:hover #collapse-button div:after { + color: $menu-collapse-focus-icon; +} + + +/* Admin Bar */ + +#wpadminbar { + color: $menu-text; + background: $menu-background; +} + +#wpadminbar .ab-item, +#wpadminbar a.ab-item, +#wpadminbar > #wp-toolbar span.ab-label, +#wpadminbar > #wp-toolbar span.noticon { + color: $menu-text; +} + +#wpadminbar .ab-icon, +#wpadminbar .ab-icon:before, +#wpadminbar .ab-item:before, +#wpadminbar .ab-item:after { + color: $menu-icon; +} + +#wpadminbar .ab-top-menu > li:hover > .ab-item, +#wpadminbar .ab-top-menu > li.hover > .ab-item, +#wpadminbar .ab-top-menu > li > .ab-item:focus, +#wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus, +#wpadminbar-nojs .ab-top-menu > li.menupop:hover > .ab-item, +#wpadminbar .ab-top-menu > li.menupop.hover > .ab-item { + color: $menu-submenu-focus-text; + background: $menu-submenu-background; +} + +#wpadminbar > #wp-toolbar li:hover span.ab-label, +#wpadminbar > #wp-toolbar li.hover span.ab-label, +#wpadminbar > #wp-toolbar a:focus span.ab-label { + color: $menu-submenu-focus-text; +} + +#wpadminbar li:hover .ab-icon:before, +#wpadminbar li:hover .ab-item:before, +#wpadminbar li:hover .ab-item:after, +#wpadminbar li:hover #adminbarsearch:before { + color: $menu-highlight-icon; +} + + +/* Admin Bar: submenu */ + +#wpadminbar .menupop .ab-sub-wrapper { + background: $menu-submenu-background; +} + +#wpadminbar .quicklinks .menupop ul.ab-sub-secondary, +#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu { + background: $menu-submenu-background-alt; +} + +#wpadminbar .ab-submenu .ab-item, +#wpadminbar .quicklinks .menupop ul li a, +#wpadminbar .quicklinks .menupop.hover ul li a, +#wpadminbar-nojs .quicklinks .menupop:hover ul li a { + color: $menu-submenu-text; +} + +#wpadminbar .quicklinks li .blavatar, +#wpadminbar .menupop .menupop > .ab-item:before { + color: $menu-icon; +} + +#wpadminbar .quicklinks .menupop ul li a:hover, +#wpadminbar .quicklinks .menupop ul li a:focus, +#wpadminbar .quicklinks .menupop ul li a:hover strong, +#wpadminbar .quicklinks .menupop ul li a:focus strong, +#wpadminbar .quicklinks .menupop.hover ul li a:hover, +#wpadminbar .quicklinks .menupop.hover ul li a:focus, +#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover, +#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus, +#wpadminbar li:hover .ab-icon:before, +#wpadminbar li:hover .ab-item:before, +#wpadminbar li a:focus .ab-icon:before, +#wpadminbar li .ab-item:focus:before, +#wpadminbar li.hover .ab-icon:before, +#wpadminbar li.hover .ab-item:before, +#wpadminbar li:hover .ab-item:after, +#wpadminbar li.hover .ab-item:after, +#wpadminbar li:hover #adminbarsearch:before { + color: $menu-submenu-focus-text; +} + +#wpadminbar .quicklinks li a:hover .blavatar, +#wpadminbar .menupop .menupop > .ab-item:hover:before { + color: $menu-submenu-focus-text; +} + + +/* Admin Bar: search */ + +#wpadminbar #adminbarsearch:before { + color: $menu-icon; +} + +#wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input:focus { + color: $menu-text; + background: $adminbar-input-background; +} + +#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder { color: $menu-text; opacity: .7; } +#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder { color: $menu-text; opacity: .7; } +#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder { color: $menu-text; opacity: .7; } +#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder { color: $menu-text; opacity: .7; } + + +/* Admin Bar: my account */ + +#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img { + border-color: $adminbar-avatar-frame; + background-color: $adminbar-avatar-frame; +} + +#wpadminbar #wp-admin-bar-user-info .display-name { + color: $menu-text; +} + +#wpadminbar #wp-admin-bar-user-info a:hover .display-name { + color: $menu-submenu-focus-text; +} + +#wpadminbar #wp-admin-bar-user-info .username { + color: $menu-submenu-text; +} + + +/* Pointers */ + +.wp-pointer .wp-pointer-content h3 { + background-color: $highlight-color; + border-color: darken( $highlight-color, 5% ); +} + +.wp-pointer .wp-pointer-content h3:before { + color: $highlight-color; +} + +.wp-pointer.wp-pointer-top .wp-pointer-arrow, +.wp-pointer.wp-pointer-undefined .wp-pointer-arrow { + border-bottom-color: $highlight-color; +} + + +/* Media Uploader */ + +.media-item .bar, +.media-progress-bar div { + background-color: $highlight-color; +} + +.details.attachment { + box-shadow: 0 0 0 1px #fff, 0 0 0 5px $highlight-color; +} + +.attachment.details .check { + background-color: $highlight-color; + box-shadow: 0 0 0 1px #fff, 0 0 0 2px $highlight-color; +} + + +/* Themes */ + +.theme-browser .theme.active .theme-name, +.theme-browser .theme.add-new-theme:hover:after { + background: $highlight-color; +} + +.theme-browser .theme.add-new-theme:hover span:after { + color: $highlight-color; +} + +.theme-overlay .theme-header .close:hover, +.theme-overlay .theme-header .right:hover, +.theme-overlay .theme-header .left:hover { + background: $highlight-color; +} + +.theme-section.current, +.theme-filter.current { + border-bottom-color: $menu-background; +} + +body.more-filters-opened .more-filters, +body.more-filters-opened .more-filters:before { + color: $menu-text; + background-color: $menu-background; +} + +body.more-filters-opened .more-filters:hover, +body.more-filters-opened .more-filters:focus, +body.more-filters-opened .more-filters:hover:before, +body.more-filters-opened .more-filters:focus:before { + background-color: $menu-highlight-background; + color: $menu-highlight-text; +} + +/* Widgets */ + +.widgets-chooser li.widgets-chooser-selected { + background-color: $menu-highlight-background; + color: $menu-highlight-text; +} + +.widgets-chooser li.widgets-chooser-selected:before, +.widgets-chooser li.widgets-chooser-selected:focus:before { + color: $menu-highlight-text; +} + +/* Customize */ + +#customize-theme-controls .widget-area-select .selected { + background-color: $menu-highlight-background; + color: $menu-highlight-text; +} + + +/* jQuery UI Slider */ + +.wp-slider .ui-slider-handle, +.wp-slider .ui-slider-handle.ui-state-hover, +.wp-slider .ui-slider-handle.focus { + background: $button-color; + border-color: darken( $button-color, 10% ); + box-shadow: inset 0 1px 0 lighten( $button-color, 15% ), 0 1px 0 rgba(0,0,0,.15); +} + +/* Thickbox: Plugin information */ + +#sidemenu a.current { + background: $body-background; + border-bottom-color: $body-background; +} + +#plugin-information .action-button { + background: $button-color; +} + +/* Responsive Component */ + +div#wp-responsive-toggle a:before { + color: $menu-icon; +} + +.wp-responsive-open div#wp-responsive-toggle a { + // ToDo: make inset border + border-color: transparent; + background: $menu-highlight-background; +} + +.star-rating .star { + color: $highlight-color; +} + +.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a { + background: $menu-submenu-background; +} diff --git a/wp-admin/css/colors/_mixins.scss b/wp-admin/css/colors/_mixins.scss new file mode 100644 index 0000000..14db8a5 --- /dev/null +++ b/wp-admin/css/colors/_mixins.scss @@ -0,0 +1,35 @@ +/* + * Button mixin- creates 3d-ish button effect with correct + * highlights/shadows, based on a base color. + */ +@mixin button( $button-color, $text-color: white ) { + background: $button-color; + border-color: darken( $button-color, 10% ); + color: $text-color; + box-shadow: inset 0 1px 0 lighten( $button-color, 15% ), 0 1px 0 rgba(0,0,0,.15); + + &:hover, + &:focus { + background: darken( $button-color, 5% ); + border-color: darken( $button-color, 15% ); + color: $text-color; + box-shadow: inset 0 1px 0 lighten( $button-color, 10% ), 0 1px 0 rgba(0,0,0,.15); + } + + &:active { + background: darken( $button-color, 10% ); + border-color: darken( $button-color, 15% ); + color: $text-color; + box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 ); + } + + &[disabled], + &:disabled, + &.button-primary-disabled, + &.disabled { + color: hsl( hue( $button-color ), 10%, 80% ) !important; + background: darken( $button-color, 8% ) !important; + border-color: darken( $button-color, 15% ) !important; + text-shadow: none !important; + } +} diff --git a/wp-admin/css/colors/_variables.scss b/wp-admin/css/colors/_variables.scss new file mode 100644 index 0000000..05e46ba --- /dev/null +++ b/wp-admin/css/colors/_variables.scss @@ -0,0 +1,58 @@ +// assign default value to all undefined variables + + +// core variables + +$text-color: #fff !default; +$base-color: #222 !default; +$icon-color: hsl( hue( $base-color ), 7%, 95% ) !default; +$highlight-color: #0074a2 !default; +$notification-color: #d54e21 !default; + + +// global + +$body-background: #f1f1f1 !default; + +$link: #0074a2 !default; +$link-focus: lighten( $link, 10% ) !default; + +$button-color: $highlight-color !default; +$form-checked: $highlight-color !default; + + +// admin menu & admin-bar + +$menu-text: $text-color !default; +$menu-icon: $icon-color !default; +$menu-background: $base-color !default; + +$menu-highlight-text: $text-color !default; +$menu-highlight-icon: $text-color !default; +$menu-highlight-background: $highlight-color !default; + +$menu-current-text: $menu-highlight-text !default; +$menu-current-icon: $menu-highlight-icon !default; +$menu-current-background: $menu-highlight-background !default; + +$menu-submenu-text: mix( $base-color, $text-color, 30% ) !default; +$menu-submenu-background: darken( $base-color, 7% ) !default; +$menu-submenu-background-alt: desaturate( lighten( $menu-background, 7% ), 7% ) !default; + +$menu-submenu-focus-text: $highlight-color !default; +$menu-submenu-current-text: $text-color !default; + +$menu-bubble-text: $text-color !default; +$menu-bubble-background: $notification-color !default; +$menu-bubble-current-text: $text-color !default; +$menu-bubble-current-background: $menu-submenu-background !default; + +$menu-collapse-text: $menu-icon !default; +$menu-collapse-icon: $menu-icon !default; +$menu-collapse-focus-text: $text-color !default; +$menu-collapse-focus-icon: $menu-highlight-icon !default; + +$adminbar-avatar-frame: lighten( $menu-background, 7% ) !default; +$adminbar-input-background: lighten( $menu-background, 7% ) !default; + +$menu-customizer-text: mix( $base-color, $text-color, 40% ) !default; diff --git a/wp-admin/css/colors/blue/colors-rtl.css b/wp-admin/css/colors/blue/colors-rtl.css new file mode 100644 index 0000000..515f2b1 --- /dev/null +++ b/wp-admin/css/colors/blue/colors-rtl.css @@ -0,0 +1,331 @@ +/* + * Button mixin- creates 3d-ish button effect with correct + * highlights/shadows, based on a base color. + */ +html { + background: #f1f1f1; } + +/* Links */ +a { + color: #0074a2; } + a:hover, a:active, a:focus { + color: #0099d5; } + +#media-upload a.del-link:hover, div.dashboard-widget-submit input:hover, .subsubsub a:hover, .subsubsub a.current:hover { + color: #0099d5; } + +/* Forms */ +input[type=checkbox]:checked:before { + color: #096484; } + +input[type=radio]:checked:before { + background: #096484; } + +.wp-core-ui input[type="reset"]:hover, .wp-core-ui input[type="reset"]:active { + color: #0099d5; } + +/* Core UI */ +.wp-core-ui .button-primary { + background: #e1a948; + border-color: #d39323; + color: white; + -webkit-box-shadow: inset 0 1px 0 #ecc88a, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #ecc88a, 0 1px 0 rgba(0, 0, 0, 0.15); } + .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus { + background: #dd9f32; + border-color: #bd831f; + color: white; + -webkit-box-shadow: inset 0 1px 0 #e8be74, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #e8be74, 0 1px 0 rgba(0, 0, 0, 0.15); } + .wp-core-ui .button-primary:active { + background: #d39323; + border-color: #bd831f; + color: white; + -webkit-box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); + box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); } + .wp-core-ui .button-primary[disabled], .wp-core-ui .button-primary:disabled, .wp-core-ui .button-primary.button-primary-disabled, .wp-core-ui .button-primary.disabled { + color: #d1cdc7 !important; + background: #db9825 !important; + border-color: #bd831f !important; + text-shadow: none !important; } +.wp-core-ui .wp-ui-primary { + color: #fff; + background-color: #52accc; } +.wp-core-ui .wp-ui-text-primary { + color: #52accc; } +.wp-core-ui .wp-ui-highlight { + color: #fff; + background-color: #096484; } +.wp-core-ui .wp-ui-text-highlight { + color: #096484; } +.wp-core-ui .wp-ui-notification { + color: #fff; + background-color: #e1a948; } +.wp-core-ui .wp-ui-text-notification { + color: #e1a948; } +.wp-core-ui .wp-ui-text-icon { + color: #e5f8ff; } + +/* List tables */ +.wrap .add-new-h2:hover, #add-new-comment a:hover, .tablenav .tablenav-pages a:hover, .tablenav .tablenav-pages a:focus { + color: #fff; + background-color: #52accc; } + +.view-switch a.current:before { + color: #52accc; } + +.view-switch a:hover:before { + color: #e1a948; } + +.post-com-count:hover:after { + border-top-color: #52accc; } + +.post-com-count:hover span { + color: #fff; + background-color: #52accc; } + +strong .post-com-count:after { + border-top-color: #e1a948; } + +strong .post-com-count span { + background-color: #e1a948; } + +/* Admin Menu */ +#adminmenuback, #adminmenuwrap, #adminmenu { + background: #52accc; } + +#adminmenu a { + color: #fff; } + +#adminmenu div.wp-menu-image:before { + color: #e5f8ff; } + +#adminmenu a:hover, #adminmenu li.menu-top:hover, #adminmenu li.opensub > a.menu-top, #adminmenu li > a.menu-top:focus { + color: #fff; + background-color: #096484; } + +#adminmenu li.menu-top:hover div.wp-menu-image:before, #adminmenu li.opensub > a.menu-top div.wp-menu-image:before { + color: #fff; } + +/* Active tabs use a bottom border color that matches the page background color. */ +.about-wrap h2 .nav-tab-active, .nav-tab-active, .nav-tab-active:hover { + background-color: #f1f1f1; + border-bottom-color: #f1f1f1; } + +/* Admin Menu: submenu */ +#adminmenu .wp-submenu, #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu .wp-has-current-submenu.opensub .wp-submenu, .folded #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu { + background: #4796b3; } + +#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after { + border-left-color: #4796b3; } + +#adminmenu .wp-submenu .wp-submenu-head { + color: #e2ecf1; } + +#adminmenu .wp-submenu a, #adminmenu .wp-has-current-submenu .wp-submenu a, .folded #adminmenu .wp-has-current-submenu .wp-submenu a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a { + color: #e2ecf1; } + #adminmenu .wp-submenu a:focus, #adminmenu .wp-submenu a:hover, #adminmenu .wp-has-current-submenu .wp-submenu a:focus, #adminmenu .wp-has-current-submenu .wp-submenu a:hover, .folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus, .folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a:focus, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a:hover, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover { + color: #fff; } + +/* Admin Menu: current */ +#adminmenu .wp-submenu li.current a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a { + color: #fff; } + #adminmenu .wp-submenu li.current a:hover, #adminmenu .wp-submenu li.current a:focus, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a:hover, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a:focus, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus { + color: #fff; } + +ul#adminmenu a.wp-has-current-submenu:after, ul#adminmenu > li.current > a.current:after { + border-left-color: #f1f1f1; } + +#adminmenu li.current a.menu-top, #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, #adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head, .folded #adminmenu li.current.menu-top { + color: #fff; + background: #096484; } + +#adminmenu li.wp-has-current-submenu div.wp-menu-image:before { + color: #fff; } + +/* Admin Menu: bubble */ +#adminmenu .awaiting-mod, #adminmenu .update-plugins { + color: #fff; + background: #e1a948; } + +#adminmenu li.current a .awaiting-mod, #adminmenu li a.wp-has-current-submenu .update-plugins, #adminmenu li:hover a .awaiting-mod, #adminmenu li.menu-top:hover > a .update-plugins { + color: #fff; + background: #4796b3; } + +/* Admin Menu: collapse button */ +#collapse-menu { + color: #e5f8ff; } + +#collapse-menu:hover { + color: #fff; } + +#collapse-button div:after { + color: #e5f8ff; } + +#collapse-menu:hover #collapse-button div:after { + color: #fff; } + +/* Admin Bar */ +#wpadminbar { + color: #fff; + background: #52accc; } + +#wpadminbar .ab-item, #wpadminbar a.ab-item, #wpadminbar > #wp-toolbar span.ab-label, #wpadminbar > #wp-toolbar span.noticon { + color: #fff; } + +#wpadminbar .ab-icon, #wpadminbar .ab-icon:before, #wpadminbar .ab-item:before, #wpadminbar .ab-item:after { + color: #e5f8ff; } + +#wpadminbar .ab-top-menu > li:hover > .ab-item, #wpadminbar .ab-top-menu > li.hover > .ab-item, #wpadminbar .ab-top-menu > li > .ab-item:focus, #wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus, #wpadminbar-nojs .ab-top-menu > li.menupop:hover > .ab-item, #wpadminbar .ab-top-menu > li.menupop.hover > .ab-item { + color: #fff; + background: #4796b3; } + +#wpadminbar > #wp-toolbar li:hover span.ab-label, #wpadminbar > #wp-toolbar li.hover span.ab-label, #wpadminbar > #wp-toolbar a:focus span.ab-label { + color: #fff; } + +#wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li:hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { + color: #fff; } + +/* Admin Bar: submenu */ +#wpadminbar .menupop .ab-sub-wrapper { + background: #4796b3; } + +#wpadminbar .quicklinks .menupop ul.ab-sub-secondary, #wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu { + background: #74b7ce; } + +#wpadminbar .ab-submenu .ab-item, #wpadminbar .quicklinks .menupop ul li a, #wpadminbar .quicklinks .menupop.hover ul li a, #wpadminbar-nojs .quicklinks .menupop:hover ul li a { + color: #e2ecf1; } + +#wpadminbar .quicklinks li .blavatar, #wpadminbar .menupop .menupop > .ab-item:before { + color: #e5f8ff; } + +#wpadminbar .quicklinks .menupop ul li a:hover, #wpadminbar .quicklinks .menupop ul li a:focus, #wpadminbar .quicklinks .menupop ul li a:hover strong, #wpadminbar .quicklinks .menupop ul li a:focus strong, #wpadminbar .quicklinks .menupop.hover ul li a:hover, #wpadminbar .quicklinks .menupop.hover ul li a:focus, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus, #wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li a:focus .ab-icon:before, #wpadminbar li .ab-item:focus:before, #wpadminbar li.hover .ab-icon:before, #wpadminbar li.hover .ab-item:before, #wpadminbar li:hover .ab-item:after, #wpadminbar li.hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { + color: #fff; } + +#wpadminbar .quicklinks li a:hover .blavatar, #wpadminbar .menupop .menupop > .ab-item:hover:before { + color: #fff; } + +/* Admin Bar: search */ +#wpadminbar #adminbarsearch:before { + color: #e5f8ff; } + +#wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input:focus { + color: #fff; + background: #6ebad4; } + +#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder { + color: #fff; + opacity: 0.7; } + +/* Admin Bar: my account */ +#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img { + border-color: #6ebad4; + background-color: #6ebad4; } + +#wpadminbar #wp-admin-bar-user-info .display-name { + color: #fff; } + +#wpadminbar #wp-admin-bar-user-info a:hover .display-name { + color: #fff; } + +#wpadminbar #wp-admin-bar-user-info .username { + color: #e2ecf1; } + +/* Pointers */ +.wp-pointer .wp-pointer-content h3 { + background-color: #096484; + border-color: #07536c; } + +.wp-pointer .wp-pointer-content h3:before { + color: #096484; } + +.wp-pointer.wp-pointer-top .wp-pointer-arrow, .wp-pointer.wp-pointer-undefined .wp-pointer-arrow { + border-bottom-color: #096484; } + +/* Media Uploader */ +.media-item .bar, .media-progress-bar div { + background-color: #096484; } + +.details.attachment { + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 5px #096484; + box-shadow: 0 0 0 1px #fff, 0 0 0 5px #096484; } + +.attachment.details .check { + background-color: #096484; + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 2px #096484; + box-shadow: 0 0 0 1px #fff, 0 0 0 2px #096484; } + +/* Themes */ +.theme-browser .theme.active .theme-name, .theme-browser .theme.add-new-theme:hover:after { + background: #096484; } + +.theme-browser .theme.add-new-theme:hover span:after { + color: #096484; } + +.theme-overlay .theme-header .close:hover, .theme-overlay .theme-header .right:hover, .theme-overlay .theme-header .left:hover { + background: #096484; } + +.theme-section.current, .theme-filter.current { + border-bottom-color: #52accc; } + +body.more-filters-opened .more-filters, body.more-filters-opened .more-filters:before { + color: #fff; + background-color: #52accc; } + +body.more-filters-opened .more-filters:hover, body.more-filters-opened .more-filters:focus, body.more-filters-opened .more-filters:hover:before, body.more-filters-opened .more-filters:focus:before { + background-color: #096484; + color: #fff; } + +/* Widgets */ +.widgets-chooser li.widgets-chooser-selected { + background-color: #096484; + color: #fff; } + +.widgets-chooser li.widgets-chooser-selected:before, .widgets-chooser li.widgets-chooser-selected:focus:before { + color: #fff; } + +/* Customize */ +#customize-theme-controls .widget-area-select .selected { + background-color: #096484; + color: #fff; } + +/* jQuery UI Slider */ +.wp-slider .ui-slider-handle, .wp-slider .ui-slider-handle.ui-state-hover, .wp-slider .ui-slider-handle.focus { + background: #e1a948; + border-color: #d39323; + -webkit-box-shadow: inset 0 1px 0 #ecc88a, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #ecc88a, 0 1px 0 rgba(0, 0, 0, 0.15); } + +/* Thickbox: Plugin information */ +#sidemenu a.current { + background: #f1f1f1; + border-bottom-color: #f1f1f1; } + +#plugin-information .action-button { + background: #e1a948; } + +/* Responsive Component */ +div#wp-responsive-toggle a:before { + color: #e5f8ff; } + +.wp-responsive-open div#wp-responsive-toggle a { + border-color: transparent; + background: #096484; } + +.star-rating .star { + color: #096484; } + +.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a { + background: #4796b3; } diff --git a/wp-admin/css/colors/blue/colors-rtl.min.css b/wp-admin/css/colors/blue/colors-rtl.min.css new file mode 100644 index 0000000..ca69e71 --- /dev/null +++ b/wp-admin/css/colors/blue/colors-rtl.min.css @@ -0,0 +1 @@ +html{background:#f1f1f1}a{color:#0074a2}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,a:active,a:focus,a:hover,div.dashboard-widget-submit input:hover{color:#0099d5}input[type=checkbox]:checked:before{color:#096484}input[type=radio]:checked:before{background:#096484}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0099d5}.wp-core-ui .button-primary{background:#e1a948;border-color:#d39323;color:#fff;-webkit-box-shadow:inset 0 1px 0 #ecc88a,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #ecc88a,0 1px 0 rgba(0,0,0,.15)}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#dd9f32;border-color:#bd831f;color:#fff;-webkit-box-shadow:inset 0 1px 0 #e8be74,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #e8be74,0 1px 0 rgba(0,0,0,.15)}.wp-core-ui .button-primary:active{background:#d39323;border-color:#bd831f;color:#fff;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#d1cdc7!important;background:#db9825!important;border-color:#bd831f!important;text-shadow:none!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#52accc}.wp-core-ui .wp-ui-text-primary{color:#52accc}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#096484}.wp-core-ui .wp-ui-text-highlight{color:#096484}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#e1a948}.wp-core-ui .wp-ui-text-notification{color:#e1a948}.wp-core-ui .wp-ui-text-icon{color:#e5f8ff}#add-new-comment a:hover,.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover{color:#fff;background-color:#52accc}.view-switch a.current:before{color:#52accc}.view-switch a:hover:before{color:#e1a948}.post-com-count:hover:after{border-top-color:#52accc}.post-com-count:hover span{color:#fff;background-color:#52accc}strong .post-com-count:after{border-top-color:#e1a948}strong .post-com-count span{background-color:#e1a948}#adminmenu,#adminmenuback,#adminmenuwrap{background:#52accc}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#e5f8ff}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#096484}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#4796b3}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-left-color:#4796b3}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu .wp-submenu-head,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#e2ecf1}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu .wp-submenu li.current a,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#fff}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-left-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#096484}#adminmenu li.wp-has-current-submenu div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#e1a948}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#4796b3}#collapse-menu{color:#e5f8ff}#collapse-menu:hover{color:#fff}#collapse-button div:after{color:#e5f8ff}#collapse-menu:hover #collapse-button div:after{color:#fff}#wpadminbar{color:#fff;background:#52accc}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#e5f8ff}#wpadminbar .ab-top-menu>li.hover>.ab-item,#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar .ab-top-menu>li:hover>.ab-item,#wpadminbar .ab-top-menu>li>.ab-item:focus,#wpadminbar-nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus{color:#fff;background:#4796b3}#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:after,#wpadminbar li:hover .ab-item:before,#wpadminbar>#wp-toolbar a:focus span.ab-label,#wpadminbar>#wp-toolbar li.hover span.ab-label,#wpadminbar>#wp-toolbar li:hover span.ab-label{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#4796b3}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#74b7ce}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar-nojs .quicklinks .menupop:hover ul li a{color:#e2ecf1}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#e5f8ff}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:after,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:after,#wpadminbar li:hover .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover{color:#fff}#wpadminbar #adminbarsearch:before{color:#e5f8ff}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#6ebad4}#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder{color:#fff;opacity:.7}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#6ebad4;background-color:#6ebad4}#wpadminbar #wp-admin-bar-user-info .display-name,#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info .username{color:#e2ecf1}.wp-pointer .wp-pointer-content h3{background-color:#096484;border-color:#07536c}.wp-pointer .wp-pointer-content h3:before{color:#096484}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow{border-bottom-color:#096484}.media-item .bar,.media-progress-bar div{background-color:#096484}.details.attachment{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 5px #096484;box-shadow:0 0 0 1px #fff,0 0 0 5px #096484}.attachment.details .check{background-color:#096484;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #096484;box-shadow:0 0 0 1px #fff,0 0 0 2px #096484}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme:hover:after{background:#096484}.theme-browser .theme.add-new-theme:hover span:after{color:#096484}.theme-overlay .theme-header .close:hover,.theme-overlay .theme-header .left:hover,.theme-overlay .theme-header .right:hover{background:#096484}.theme-filter.current,.theme-section.current{border-bottom-color:#52accc}body.more-filters-opened .more-filters,body.more-filters-opened .more-filters:before{color:#fff;background-color:#52accc}.widgets-chooser li.widgets-chooser-selected,body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover,body.more-filters-opened .more-filters:hover:before{background-color:#096484;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}#customize-theme-controls .widget-area-select .selected{background-color:#096484;color:#fff}.wp-slider .ui-slider-handle,.wp-slider .ui-slider-handle.focus,.wp-slider .ui-slider-handle.ui-state-hover{background:#e1a948;border-color:#d39323;-webkit-box-shadow:inset 0 1px 0 #ecc88a,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #ecc88a,0 1px 0 rgba(0,0,0,.15)}#sidemenu a.current{background:#f1f1f1;border-bottom-color:#f1f1f1}#plugin-information .action-button{background:#e1a948}div#wp-responsive-toggle a:before{color:#e5f8ff}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#096484}.star-rating .star{color:#096484}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#4796b3} \ No newline at end of file diff --git a/wp-admin/css/colors/blue/colors.css b/wp-admin/css/colors/blue/colors.css new file mode 100644 index 0000000..df2877c --- /dev/null +++ b/wp-admin/css/colors/blue/colors.css @@ -0,0 +1,331 @@ +/* + * Button mixin- creates 3d-ish button effect with correct + * highlights/shadows, based on a base color. + */ +html { + background: #f1f1f1; } + +/* Links */ +a { + color: #0074a2; } + a:hover, a:active, a:focus { + color: #0099d5; } + +#media-upload a.del-link:hover, div.dashboard-widget-submit input:hover, .subsubsub a:hover, .subsubsub a.current:hover { + color: #0099d5; } + +/* Forms */ +input[type=checkbox]:checked:before { + color: #096484; } + +input[type=radio]:checked:before { + background: #096484; } + +.wp-core-ui input[type="reset"]:hover, .wp-core-ui input[type="reset"]:active { + color: #0099d5; } + +/* Core UI */ +.wp-core-ui .button-primary { + background: #e1a948; + border-color: #d39323; + color: white; + -webkit-box-shadow: inset 0 1px 0 #ecc88a, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #ecc88a, 0 1px 0 rgba(0, 0, 0, 0.15); } + .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus { + background: #dd9f32; + border-color: #bd831f; + color: white; + -webkit-box-shadow: inset 0 1px 0 #e8be74, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #e8be74, 0 1px 0 rgba(0, 0, 0, 0.15); } + .wp-core-ui .button-primary:active { + background: #d39323; + border-color: #bd831f; + color: white; + -webkit-box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); + box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); } + .wp-core-ui .button-primary[disabled], .wp-core-ui .button-primary:disabled, .wp-core-ui .button-primary.button-primary-disabled, .wp-core-ui .button-primary.disabled { + color: #d1cdc7 !important; + background: #db9825 !important; + border-color: #bd831f !important; + text-shadow: none !important; } +.wp-core-ui .wp-ui-primary { + color: #fff; + background-color: #52accc; } +.wp-core-ui .wp-ui-text-primary { + color: #52accc; } +.wp-core-ui .wp-ui-highlight { + color: #fff; + background-color: #096484; } +.wp-core-ui .wp-ui-text-highlight { + color: #096484; } +.wp-core-ui .wp-ui-notification { + color: #fff; + background-color: #e1a948; } +.wp-core-ui .wp-ui-text-notification { + color: #e1a948; } +.wp-core-ui .wp-ui-text-icon { + color: #e5f8ff; } + +/* List tables */ +.wrap .add-new-h2:hover, #add-new-comment a:hover, .tablenav .tablenav-pages a:hover, .tablenav .tablenav-pages a:focus { + color: #fff; + background-color: #52accc; } + +.view-switch a.current:before { + color: #52accc; } + +.view-switch a:hover:before { + color: #e1a948; } + +.post-com-count:hover:after { + border-top-color: #52accc; } + +.post-com-count:hover span { + color: #fff; + background-color: #52accc; } + +strong .post-com-count:after { + border-top-color: #e1a948; } + +strong .post-com-count span { + background-color: #e1a948; } + +/* Admin Menu */ +#adminmenuback, #adminmenuwrap, #adminmenu { + background: #52accc; } + +#adminmenu a { + color: #fff; } + +#adminmenu div.wp-menu-image:before { + color: #e5f8ff; } + +#adminmenu a:hover, #adminmenu li.menu-top:hover, #adminmenu li.opensub > a.menu-top, #adminmenu li > a.menu-top:focus { + color: #fff; + background-color: #096484; } + +#adminmenu li.menu-top:hover div.wp-menu-image:before, #adminmenu li.opensub > a.menu-top div.wp-menu-image:before { + color: #fff; } + +/* Active tabs use a bottom border color that matches the page background color. */ +.about-wrap h2 .nav-tab-active, .nav-tab-active, .nav-tab-active:hover { + background-color: #f1f1f1; + border-bottom-color: #f1f1f1; } + +/* Admin Menu: submenu */ +#adminmenu .wp-submenu, #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu .wp-has-current-submenu.opensub .wp-submenu, .folded #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu { + background: #4796b3; } + +#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after { + border-right-color: #4796b3; } + +#adminmenu .wp-submenu .wp-submenu-head { + color: #e2ecf1; } + +#adminmenu .wp-submenu a, #adminmenu .wp-has-current-submenu .wp-submenu a, .folded #adminmenu .wp-has-current-submenu .wp-submenu a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a { + color: #e2ecf1; } + #adminmenu .wp-submenu a:focus, #adminmenu .wp-submenu a:hover, #adminmenu .wp-has-current-submenu .wp-submenu a:focus, #adminmenu .wp-has-current-submenu .wp-submenu a:hover, .folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus, .folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a:focus, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a:hover, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover { + color: #fff; } + +/* Admin Menu: current */ +#adminmenu .wp-submenu li.current a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a { + color: #fff; } + #adminmenu .wp-submenu li.current a:hover, #adminmenu .wp-submenu li.current a:focus, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a:hover, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a:focus, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus { + color: #fff; } + +ul#adminmenu a.wp-has-current-submenu:after, ul#adminmenu > li.current > a.current:after { + border-right-color: #f1f1f1; } + +#adminmenu li.current a.menu-top, #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, #adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head, .folded #adminmenu li.current.menu-top { + color: #fff; + background: #096484; } + +#adminmenu li.wp-has-current-submenu div.wp-menu-image:before { + color: #fff; } + +/* Admin Menu: bubble */ +#adminmenu .awaiting-mod, #adminmenu .update-plugins { + color: #fff; + background: #e1a948; } + +#adminmenu li.current a .awaiting-mod, #adminmenu li a.wp-has-current-submenu .update-plugins, #adminmenu li:hover a .awaiting-mod, #adminmenu li.menu-top:hover > a .update-plugins { + color: #fff; + background: #4796b3; } + +/* Admin Menu: collapse button */ +#collapse-menu { + color: #e5f8ff; } + +#collapse-menu:hover { + color: #fff; } + +#collapse-button div:after { + color: #e5f8ff; } + +#collapse-menu:hover #collapse-button div:after { + color: #fff; } + +/* Admin Bar */ +#wpadminbar { + color: #fff; + background: #52accc; } + +#wpadminbar .ab-item, #wpadminbar a.ab-item, #wpadminbar > #wp-toolbar span.ab-label, #wpadminbar > #wp-toolbar span.noticon { + color: #fff; } + +#wpadminbar .ab-icon, #wpadminbar .ab-icon:before, #wpadminbar .ab-item:before, #wpadminbar .ab-item:after { + color: #e5f8ff; } + +#wpadminbar .ab-top-menu > li:hover > .ab-item, #wpadminbar .ab-top-menu > li.hover > .ab-item, #wpadminbar .ab-top-menu > li > .ab-item:focus, #wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus, #wpadminbar-nojs .ab-top-menu > li.menupop:hover > .ab-item, #wpadminbar .ab-top-menu > li.menupop.hover > .ab-item { + color: #fff; + background: #4796b3; } + +#wpadminbar > #wp-toolbar li:hover span.ab-label, #wpadminbar > #wp-toolbar li.hover span.ab-label, #wpadminbar > #wp-toolbar a:focus span.ab-label { + color: #fff; } + +#wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li:hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { + color: #fff; } + +/* Admin Bar: submenu */ +#wpadminbar .menupop .ab-sub-wrapper { + background: #4796b3; } + +#wpadminbar .quicklinks .menupop ul.ab-sub-secondary, #wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu { + background: #74b7ce; } + +#wpadminbar .ab-submenu .ab-item, #wpadminbar .quicklinks .menupop ul li a, #wpadminbar .quicklinks .menupop.hover ul li a, #wpadminbar-nojs .quicklinks .menupop:hover ul li a { + color: #e2ecf1; } + +#wpadminbar .quicklinks li .blavatar, #wpadminbar .menupop .menupop > .ab-item:before { + color: #e5f8ff; } + +#wpadminbar .quicklinks .menupop ul li a:hover, #wpadminbar .quicklinks .menupop ul li a:focus, #wpadminbar .quicklinks .menupop ul li a:hover strong, #wpadminbar .quicklinks .menupop ul li a:focus strong, #wpadminbar .quicklinks .menupop.hover ul li a:hover, #wpadminbar .quicklinks .menupop.hover ul li a:focus, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus, #wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li a:focus .ab-icon:before, #wpadminbar li .ab-item:focus:before, #wpadminbar li.hover .ab-icon:before, #wpadminbar li.hover .ab-item:before, #wpadminbar li:hover .ab-item:after, #wpadminbar li.hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { + color: #fff; } + +#wpadminbar .quicklinks li a:hover .blavatar, #wpadminbar .menupop .menupop > .ab-item:hover:before { + color: #fff; } + +/* Admin Bar: search */ +#wpadminbar #adminbarsearch:before { + color: #e5f8ff; } + +#wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input:focus { + color: #fff; + background: #6ebad4; } + +#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder { + color: #fff; + opacity: 0.7; } + +/* Admin Bar: my account */ +#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img { + border-color: #6ebad4; + background-color: #6ebad4; } + +#wpadminbar #wp-admin-bar-user-info .display-name { + color: #fff; } + +#wpadminbar #wp-admin-bar-user-info a:hover .display-name { + color: #fff; } + +#wpadminbar #wp-admin-bar-user-info .username { + color: #e2ecf1; } + +/* Pointers */ +.wp-pointer .wp-pointer-content h3 { + background-color: #096484; + border-color: #07536c; } + +.wp-pointer .wp-pointer-content h3:before { + color: #096484; } + +.wp-pointer.wp-pointer-top .wp-pointer-arrow, .wp-pointer.wp-pointer-undefined .wp-pointer-arrow { + border-bottom-color: #096484; } + +/* Media Uploader */ +.media-item .bar, .media-progress-bar div { + background-color: #096484; } + +.details.attachment { + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 5px #096484; + box-shadow: 0 0 0 1px #fff, 0 0 0 5px #096484; } + +.attachment.details .check { + background-color: #096484; + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 2px #096484; + box-shadow: 0 0 0 1px #fff, 0 0 0 2px #096484; } + +/* Themes */ +.theme-browser .theme.active .theme-name, .theme-browser .theme.add-new-theme:hover:after { + background: #096484; } + +.theme-browser .theme.add-new-theme:hover span:after { + color: #096484; } + +.theme-overlay .theme-header .close:hover, .theme-overlay .theme-header .right:hover, .theme-overlay .theme-header .left:hover { + background: #096484; } + +.theme-section.current, .theme-filter.current { + border-bottom-color: #52accc; } + +body.more-filters-opened .more-filters, body.more-filters-opened .more-filters:before { + color: #fff; + background-color: #52accc; } + +body.more-filters-opened .more-filters:hover, body.more-filters-opened .more-filters:focus, body.more-filters-opened .more-filters:hover:before, body.more-filters-opened .more-filters:focus:before { + background-color: #096484; + color: #fff; } + +/* Widgets */ +.widgets-chooser li.widgets-chooser-selected { + background-color: #096484; + color: #fff; } + +.widgets-chooser li.widgets-chooser-selected:before, .widgets-chooser li.widgets-chooser-selected:focus:before { + color: #fff; } + +/* Customize */ +#customize-theme-controls .widget-area-select .selected { + background-color: #096484; + color: #fff; } + +/* jQuery UI Slider */ +.wp-slider .ui-slider-handle, .wp-slider .ui-slider-handle.ui-state-hover, .wp-slider .ui-slider-handle.focus { + background: #e1a948; + border-color: #d39323; + -webkit-box-shadow: inset 0 1px 0 #ecc88a, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #ecc88a, 0 1px 0 rgba(0, 0, 0, 0.15); } + +/* Thickbox: Plugin information */ +#sidemenu a.current { + background: #f1f1f1; + border-bottom-color: #f1f1f1; } + +#plugin-information .action-button { + background: #e1a948; } + +/* Responsive Component */ +div#wp-responsive-toggle a:before { + color: #e5f8ff; } + +.wp-responsive-open div#wp-responsive-toggle a { + border-color: transparent; + background: #096484; } + +.star-rating .star { + color: #096484; } + +.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a { + background: #4796b3; } diff --git a/wp-admin/css/colors/blue/colors.min.css b/wp-admin/css/colors/blue/colors.min.css new file mode 100644 index 0000000..6907e37 --- /dev/null +++ b/wp-admin/css/colors/blue/colors.min.css @@ -0,0 +1 @@ +html{background:#f1f1f1}a{color:#0074a2}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,a:active,a:focus,a:hover,div.dashboard-widget-submit input:hover{color:#0099d5}input[type=checkbox]:checked:before{color:#096484}input[type=radio]:checked:before{background:#096484}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0099d5}.wp-core-ui .button-primary{background:#e1a948;border-color:#d39323;color:#fff;-webkit-box-shadow:inset 0 1px 0 #ecc88a,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #ecc88a,0 1px 0 rgba(0,0,0,.15)}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#dd9f32;border-color:#bd831f;color:#fff;-webkit-box-shadow:inset 0 1px 0 #e8be74,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #e8be74,0 1px 0 rgba(0,0,0,.15)}.wp-core-ui .button-primary:active{background:#d39323;border-color:#bd831f;color:#fff;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#d1cdc7!important;background:#db9825!important;border-color:#bd831f!important;text-shadow:none!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#52accc}.wp-core-ui .wp-ui-text-primary{color:#52accc}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#096484}.wp-core-ui .wp-ui-text-highlight{color:#096484}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#e1a948}.wp-core-ui .wp-ui-text-notification{color:#e1a948}.wp-core-ui .wp-ui-text-icon{color:#e5f8ff}#add-new-comment a:hover,.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover{color:#fff;background-color:#52accc}.view-switch a.current:before{color:#52accc}.view-switch a:hover:before{color:#e1a948}.post-com-count:hover:after{border-top-color:#52accc}.post-com-count:hover span{color:#fff;background-color:#52accc}strong .post-com-count:after{border-top-color:#e1a948}strong .post-com-count span{background-color:#e1a948}#adminmenu,#adminmenuback,#adminmenuwrap{background:#52accc}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#e5f8ff}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#096484}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#4796b3}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-right-color:#4796b3}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu .wp-submenu-head,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#e2ecf1}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu .wp-submenu li.current a,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#fff}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-right-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#096484}#adminmenu li.wp-has-current-submenu div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#e1a948}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#4796b3}#collapse-menu{color:#e5f8ff}#collapse-menu:hover{color:#fff}#collapse-button div:after{color:#e5f8ff}#collapse-menu:hover #collapse-button div:after{color:#fff}#wpadminbar{color:#fff;background:#52accc}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#e5f8ff}#wpadminbar .ab-top-menu>li.hover>.ab-item,#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar .ab-top-menu>li:hover>.ab-item,#wpadminbar .ab-top-menu>li>.ab-item:focus,#wpadminbar-nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus{color:#fff;background:#4796b3}#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:after,#wpadminbar li:hover .ab-item:before,#wpadminbar>#wp-toolbar a:focus span.ab-label,#wpadminbar>#wp-toolbar li.hover span.ab-label,#wpadminbar>#wp-toolbar li:hover span.ab-label{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#4796b3}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#74b7ce}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar-nojs .quicklinks .menupop:hover ul li a{color:#e2ecf1}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#e5f8ff}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:after,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:after,#wpadminbar li:hover .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover{color:#fff}#wpadminbar #adminbarsearch:before{color:#e5f8ff}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#6ebad4}#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder{color:#fff;opacity:.7}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#6ebad4;background-color:#6ebad4}#wpadminbar #wp-admin-bar-user-info .display-name,#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info .username{color:#e2ecf1}.wp-pointer .wp-pointer-content h3{background-color:#096484;border-color:#07536c}.wp-pointer .wp-pointer-content h3:before{color:#096484}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow{border-bottom-color:#096484}.media-item .bar,.media-progress-bar div{background-color:#096484}.details.attachment{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 5px #096484;box-shadow:0 0 0 1px #fff,0 0 0 5px #096484}.attachment.details .check{background-color:#096484;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #096484;box-shadow:0 0 0 1px #fff,0 0 0 2px #096484}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme:hover:after{background:#096484}.theme-browser .theme.add-new-theme:hover span:after{color:#096484}.theme-overlay .theme-header .close:hover,.theme-overlay .theme-header .left:hover,.theme-overlay .theme-header .right:hover{background:#096484}.theme-filter.current,.theme-section.current{border-bottom-color:#52accc}body.more-filters-opened .more-filters,body.more-filters-opened .more-filters:before{color:#fff;background-color:#52accc}.widgets-chooser li.widgets-chooser-selected,body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover,body.more-filters-opened .more-filters:hover:before{background-color:#096484;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}#customize-theme-controls .widget-area-select .selected{background-color:#096484;color:#fff}.wp-slider .ui-slider-handle,.wp-slider .ui-slider-handle.focus,.wp-slider .ui-slider-handle.ui-state-hover{background:#e1a948;border-color:#d39323;-webkit-box-shadow:inset 0 1px 0 #ecc88a,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #ecc88a,0 1px 0 rgba(0,0,0,.15)}#sidemenu a.current{background:#f1f1f1;border-bottom-color:#f1f1f1}#plugin-information .action-button{background:#e1a948}div#wp-responsive-toggle a:before{color:#e5f8ff}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#096484}.star-rating .star{color:#096484}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#4796b3} \ No newline at end of file diff --git a/wp-admin/css/colors/blue/colors.scss b/wp-admin/css/colors/blue/colors.scss new file mode 100644 index 0000000..b254d73 --- /dev/null +++ b/wp-admin/css/colors/blue/colors.scss @@ -0,0 +1,11 @@ +$base-color: #52accc; +$icon-color: #e5f8ff; +$highlight-color: #096484; +$notification-color: #e1a948; +$button-color: #e1a948; + +$menu-submenu-text: #e2ecf1; +$menu-submenu-focus-text: #fff; +$menu-submenu-background: #4796b3; + +@import "../_admin.scss"; diff --git a/wp-admin/css/colors/coffee/colors-rtl.css b/wp-admin/css/colors/coffee/colors-rtl.css new file mode 100644 index 0000000..a54579d --- /dev/null +++ b/wp-admin/css/colors/coffee/colors-rtl.css @@ -0,0 +1,331 @@ +/* + * Button mixin- creates 3d-ish button effect with correct + * highlights/shadows, based on a base color. + */ +html { + background: #f1f1f1; } + +/* Links */ +a { + color: #0074a2; } + a:hover, a:active, a:focus { + color: #0099d5; } + +#media-upload a.del-link:hover, div.dashboard-widget-submit input:hover, .subsubsub a:hover, .subsubsub a.current:hover { + color: #0099d5; } + +/* Forms */ +input[type=checkbox]:checked:before { + color: #59524c; } + +input[type=radio]:checked:before { + background: #59524c; } + +.wp-core-ui input[type="reset"]:hover, .wp-core-ui input[type="reset"]:active { + color: #0099d5; } + +/* Core UI */ +.wp-core-ui .button-primary { + background: #c7a589; + border-color: #b78a66; + color: white; + -webkit-box-shadow: inset 0 1px 0 #e0cdbd, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #e0cdbd, 0 1px 0 rgba(0, 0, 0, 0.15); } + .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus { + background: #bf9878; + border-color: #ae7d55; + color: white; + -webkit-box-shadow: inset 0 1px 0 #d7bfac, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #d7bfac, 0 1px 0 rgba(0, 0, 0, 0.15); } + .wp-core-ui .button-primary:active { + background: #b78a66; + border-color: #ae7d55; + color: white; + -webkit-box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); + box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); } + .wp-core-ui .button-primary[disabled], .wp-core-ui .button-primary:disabled, .wp-core-ui .button-primary.button-primary-disabled, .wp-core-ui .button-primary.disabled { + color: #d1cbc7 !important; + background: #ba906d !important; + border-color: #ae7d55 !important; + text-shadow: none !important; } +.wp-core-ui .wp-ui-primary { + color: #fff; + background-color: #59524c; } +.wp-core-ui .wp-ui-text-primary { + color: #59524c; } +.wp-core-ui .wp-ui-highlight { + color: #fff; + background-color: #c7a589; } +.wp-core-ui .wp-ui-text-highlight { + color: #c7a589; } +.wp-core-ui .wp-ui-notification { + color: #fff; + background-color: #9ea476; } +.wp-core-ui .wp-ui-text-notification { + color: #9ea476; } +.wp-core-ui .wp-ui-text-icon { + color: #f3f2f1; } + +/* List tables */ +.wrap .add-new-h2:hover, #add-new-comment a:hover, .tablenav .tablenav-pages a:hover, .tablenav .tablenav-pages a:focus { + color: #fff; + background-color: #59524c; } + +.view-switch a.current:before { + color: #59524c; } + +.view-switch a:hover:before { + color: #9ea476; } + +.post-com-count:hover:after { + border-top-color: #59524c; } + +.post-com-count:hover span { + color: #fff; + background-color: #59524c; } + +strong .post-com-count:after { + border-top-color: #9ea476; } + +strong .post-com-count span { + background-color: #9ea476; } + +/* Admin Menu */ +#adminmenuback, #adminmenuwrap, #adminmenu { + background: #59524c; } + +#adminmenu a { + color: #fff; } + +#adminmenu div.wp-menu-image:before { + color: #f3f2f1; } + +#adminmenu a:hover, #adminmenu li.menu-top:hover, #adminmenu li.opensub > a.menu-top, #adminmenu li > a.menu-top:focus { + color: #fff; + background-color: #c7a589; } + +#adminmenu li.menu-top:hover div.wp-menu-image:before, #adminmenu li.opensub > a.menu-top div.wp-menu-image:before { + color: #fff; } + +/* Active tabs use a bottom border color that matches the page background color. */ +.about-wrap h2 .nav-tab-active, .nav-tab-active, .nav-tab-active:hover { + background-color: #f1f1f1; + border-bottom-color: #f1f1f1; } + +/* Admin Menu: submenu */ +#adminmenu .wp-submenu, #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu .wp-has-current-submenu.opensub .wp-submenu, .folded #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu { + background: #46403c; } + +#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after { + border-left-color: #46403c; } + +#adminmenu .wp-submenu .wp-submenu-head { + color: #cdcbc9; } + +#adminmenu .wp-submenu a, #adminmenu .wp-has-current-submenu .wp-submenu a, .folded #adminmenu .wp-has-current-submenu .wp-submenu a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a { + color: #cdcbc9; } + #adminmenu .wp-submenu a:focus, #adminmenu .wp-submenu a:hover, #adminmenu .wp-has-current-submenu .wp-submenu a:focus, #adminmenu .wp-has-current-submenu .wp-submenu a:hover, .folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus, .folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a:focus, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a:hover, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover { + color: #c7a589; } + +/* Admin Menu: current */ +#adminmenu .wp-submenu li.current a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a { + color: #fff; } + #adminmenu .wp-submenu li.current a:hover, #adminmenu .wp-submenu li.current a:focus, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a:hover, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a:focus, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus { + color: #c7a589; } + +ul#adminmenu a.wp-has-current-submenu:after, ul#adminmenu > li.current > a.current:after { + border-left-color: #f1f1f1; } + +#adminmenu li.current a.menu-top, #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, #adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head, .folded #adminmenu li.current.menu-top { + color: #fff; + background: #c7a589; } + +#adminmenu li.wp-has-current-submenu div.wp-menu-image:before { + color: #fff; } + +/* Admin Menu: bubble */ +#adminmenu .awaiting-mod, #adminmenu .update-plugins { + color: #fff; + background: #9ea476; } + +#adminmenu li.current a .awaiting-mod, #adminmenu li a.wp-has-current-submenu .update-plugins, #adminmenu li:hover a .awaiting-mod, #adminmenu li.menu-top:hover > a .update-plugins { + color: #fff; + background: #46403c; } + +/* Admin Menu: collapse button */ +#collapse-menu { + color: #f3f2f1; } + +#collapse-menu:hover { + color: #fff; } + +#collapse-button div:after { + color: #f3f2f1; } + +#collapse-menu:hover #collapse-button div:after { + color: #fff; } + +/* Admin Bar */ +#wpadminbar { + color: #fff; + background: #59524c; } + +#wpadminbar .ab-item, #wpadminbar a.ab-item, #wpadminbar > #wp-toolbar span.ab-label, #wpadminbar > #wp-toolbar span.noticon { + color: #fff; } + +#wpadminbar .ab-icon, #wpadminbar .ab-icon:before, #wpadminbar .ab-item:before, #wpadminbar .ab-item:after { + color: #f3f2f1; } + +#wpadminbar .ab-top-menu > li:hover > .ab-item, #wpadminbar .ab-top-menu > li.hover > .ab-item, #wpadminbar .ab-top-menu > li > .ab-item:focus, #wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus, #wpadminbar-nojs .ab-top-menu > li.menupop:hover > .ab-item, #wpadminbar .ab-top-menu > li.menupop.hover > .ab-item { + color: #c7a589; + background: #46403c; } + +#wpadminbar > #wp-toolbar li:hover span.ab-label, #wpadminbar > #wp-toolbar li.hover span.ab-label, #wpadminbar > #wp-toolbar a:focus span.ab-label { + color: #c7a589; } + +#wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li:hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { + color: #fff; } + +/* Admin Bar: submenu */ +#wpadminbar .menupop .ab-sub-wrapper { + background: #46403c; } + +#wpadminbar .quicklinks .menupop ul.ab-sub-secondary, #wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu { + background: #656463; } + +#wpadminbar .ab-submenu .ab-item, #wpadminbar .quicklinks .menupop ul li a, #wpadminbar .quicklinks .menupop.hover ul li a, #wpadminbar-nojs .quicklinks .menupop:hover ul li a { + color: #cdcbc9; } + +#wpadminbar .quicklinks li .blavatar, #wpadminbar .menupop .menupop > .ab-item:before { + color: #f3f2f1; } + +#wpadminbar .quicklinks .menupop ul li a:hover, #wpadminbar .quicklinks .menupop ul li a:focus, #wpadminbar .quicklinks .menupop ul li a:hover strong, #wpadminbar .quicklinks .menupop ul li a:focus strong, #wpadminbar .quicklinks .menupop.hover ul li a:hover, #wpadminbar .quicklinks .menupop.hover ul li a:focus, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus, #wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li a:focus .ab-icon:before, #wpadminbar li .ab-item:focus:before, #wpadminbar li.hover .ab-icon:before, #wpadminbar li.hover .ab-item:before, #wpadminbar li:hover .ab-item:after, #wpadminbar li.hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { + color: #c7a589; } + +#wpadminbar .quicklinks li a:hover .blavatar, #wpadminbar .menupop .menupop > .ab-item:hover:before { + color: #c7a589; } + +/* Admin Bar: search */ +#wpadminbar #adminbarsearch:before { + color: #f3f2f1; } + +#wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input:focus { + color: #fff; + background: #6c645c; } + +#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder { + color: #fff; + opacity: 0.7; } + +/* Admin Bar: my account */ +#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img { + border-color: #6c645c; + background-color: #6c645c; } + +#wpadminbar #wp-admin-bar-user-info .display-name { + color: #fff; } + +#wpadminbar #wp-admin-bar-user-info a:hover .display-name { + color: #c7a589; } + +#wpadminbar #wp-admin-bar-user-info .username { + color: #cdcbc9; } + +/* Pointers */ +.wp-pointer .wp-pointer-content h3 { + background-color: #c7a589; + border-color: #bf9878; } + +.wp-pointer .wp-pointer-content h3:before { + color: #c7a589; } + +.wp-pointer.wp-pointer-top .wp-pointer-arrow, .wp-pointer.wp-pointer-undefined .wp-pointer-arrow { + border-bottom-color: #c7a589; } + +/* Media Uploader */ +.media-item .bar, .media-progress-bar div { + background-color: #c7a589; } + +.details.attachment { + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 5px #c7a589; + box-shadow: 0 0 0 1px #fff, 0 0 0 5px #c7a589; } + +.attachment.details .check { + background-color: #c7a589; + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 2px #c7a589; + box-shadow: 0 0 0 1px #fff, 0 0 0 2px #c7a589; } + +/* Themes */ +.theme-browser .theme.active .theme-name, .theme-browser .theme.add-new-theme:hover:after { + background: #c7a589; } + +.theme-browser .theme.add-new-theme:hover span:after { + color: #c7a589; } + +.theme-overlay .theme-header .close:hover, .theme-overlay .theme-header .right:hover, .theme-overlay .theme-header .left:hover { + background: #c7a589; } + +.theme-section.current, .theme-filter.current { + border-bottom-color: #59524c; } + +body.more-filters-opened .more-filters, body.more-filters-opened .more-filters:before { + color: #fff; + background-color: #59524c; } + +body.more-filters-opened .more-filters:hover, body.more-filters-opened .more-filters:focus, body.more-filters-opened .more-filters:hover:before, body.more-filters-opened .more-filters:focus:before { + background-color: #c7a589; + color: #fff; } + +/* Widgets */ +.widgets-chooser li.widgets-chooser-selected { + background-color: #c7a589; + color: #fff; } + +.widgets-chooser li.widgets-chooser-selected:before, .widgets-chooser li.widgets-chooser-selected:focus:before { + color: #fff; } + +/* Customize */ +#customize-theme-controls .widget-area-select .selected { + background-color: #c7a589; + color: #fff; } + +/* jQuery UI Slider */ +.wp-slider .ui-slider-handle, .wp-slider .ui-slider-handle.ui-state-hover, .wp-slider .ui-slider-handle.focus { + background: #c7a589; + border-color: #b78a66; + -webkit-box-shadow: inset 0 1px 0 #e0cdbd, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #e0cdbd, 0 1px 0 rgba(0, 0, 0, 0.15); } + +/* Thickbox: Plugin information */ +#sidemenu a.current { + background: #f1f1f1; + border-bottom-color: #f1f1f1; } + +#plugin-information .action-button { + background: #c7a589; } + +/* Responsive Component */ +div#wp-responsive-toggle a:before { + color: #f3f2f1; } + +.wp-responsive-open div#wp-responsive-toggle a { + border-color: transparent; + background: #c7a589; } + +.star-rating .star { + color: #c7a589; } + +.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a { + background: #46403c; } diff --git a/wp-admin/css/colors/coffee/colors-rtl.min.css b/wp-admin/css/colors/coffee/colors-rtl.min.css new file mode 100644 index 0000000..ed81cb7 --- /dev/null +++ b/wp-admin/css/colors/coffee/colors-rtl.min.css @@ -0,0 +1 @@ +html{background:#f1f1f1}a{color:#0074a2}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,a:active,a:focus,a:hover,div.dashboard-widget-submit input:hover{color:#0099d5}input[type=checkbox]:checked:before{color:#59524c}input[type=radio]:checked:before{background:#59524c}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0099d5}.wp-core-ui .button-primary{background:#c7a589;border-color:#b78a66;color:#fff;-webkit-box-shadow:inset 0 1px 0 #e0cdbd,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #e0cdbd,0 1px 0 rgba(0,0,0,.15)}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#bf9878;border-color:#ae7d55;color:#fff;-webkit-box-shadow:inset 0 1px 0 #d7bfac,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #d7bfac,0 1px 0 rgba(0,0,0,.15)}.wp-core-ui .button-primary:active{background:#b78a66;border-color:#ae7d55;color:#fff;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#d1cbc7!important;background:#ba906d!important;border-color:#ae7d55!important;text-shadow:none!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#59524c}.wp-core-ui .wp-ui-text-primary{color:#59524c}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#c7a589}.wp-core-ui .wp-ui-text-highlight{color:#c7a589}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#9ea476}.wp-core-ui .wp-ui-text-notification{color:#9ea476}.wp-core-ui .wp-ui-text-icon{color:#f3f2f1}#add-new-comment a:hover,.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover{color:#fff;background-color:#59524c}.view-switch a.current:before{color:#59524c}.view-switch a:hover:before{color:#9ea476}.post-com-count:hover:after{border-top-color:#59524c}.post-com-count:hover span{color:#fff;background-color:#59524c}strong .post-com-count:after{border-top-color:#9ea476}strong .post-com-count span{background-color:#9ea476}#adminmenu,#adminmenuback,#adminmenuwrap{background:#59524c}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f3f2f1}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#c7a589}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#46403c}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-left-color:#46403c}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu .wp-submenu-head,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#cdcbc9}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#c7a589}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#c7a589}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-left-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#c7a589}#adminmenu li.wp-has-current-submenu div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#9ea476}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#46403c}#collapse-menu{color:#f3f2f1}#collapse-menu:hover{color:#fff}#collapse-button div:after{color:#f3f2f1}#collapse-menu:hover #collapse-button div:after{color:#fff}#wpadminbar{color:#fff;background:#59524c}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f3f2f1}#wpadminbar .ab-top-menu>li.hover>.ab-item,#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar .ab-top-menu>li:hover>.ab-item,#wpadminbar .ab-top-menu>li>.ab-item:focus,#wpadminbar-nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus{color:#c7a589;background:#46403c}#wpadminbar>#wp-toolbar a:focus span.ab-label,#wpadminbar>#wp-toolbar li.hover span.ab-label,#wpadminbar>#wp-toolbar li:hover span.ab-label{color:#c7a589}#wpadminbar .menupop .ab-sub-wrapper{background:#46403c}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#656463}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar-nojs .quicklinks .menupop:hover ul li a{color:#cdcbc9}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f3f2f1}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:after,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:after,#wpadminbar li:hover .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover{color:#c7a589}#wpadminbar #adminbarsearch:before{color:#f3f2f1}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#6c645c}#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder{color:#fff;opacity:.7}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#6c645c;background-color:#6c645c}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#c7a589}#wpadminbar #wp-admin-bar-user-info .username{color:#cdcbc9}.wp-pointer .wp-pointer-content h3{background-color:#c7a589;border-color:#bf9878}.wp-pointer .wp-pointer-content h3:before{color:#c7a589}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow{border-bottom-color:#c7a589}.media-item .bar,.media-progress-bar div{background-color:#c7a589}.details.attachment{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 5px #c7a589;box-shadow:0 0 0 1px #fff,0 0 0 5px #c7a589}.attachment.details .check{background-color:#c7a589;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #c7a589;box-shadow:0 0 0 1px #fff,0 0 0 2px #c7a589}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme:hover:after{background:#c7a589}.theme-browser .theme.add-new-theme:hover span:after{color:#c7a589}.theme-overlay .theme-header .close:hover,.theme-overlay .theme-header .left:hover,.theme-overlay .theme-header .right:hover{background:#c7a589}.theme-filter.current,.theme-section.current{border-bottom-color:#59524c}body.more-filters-opened .more-filters,body.more-filters-opened .more-filters:before{color:#fff;background-color:#59524c}.widgets-chooser li.widgets-chooser-selected,body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover,body.more-filters-opened .more-filters:hover:before{background-color:#c7a589;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}#customize-theme-controls .widget-area-select .selected{background-color:#c7a589;color:#fff}.wp-slider .ui-slider-handle,.wp-slider .ui-slider-handle.focus,.wp-slider .ui-slider-handle.ui-state-hover{background:#c7a589;border-color:#b78a66;-webkit-box-shadow:inset 0 1px 0 #e0cdbd,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #e0cdbd,0 1px 0 rgba(0,0,0,.15)}#sidemenu a.current{background:#f1f1f1;border-bottom-color:#f1f1f1}#plugin-information .action-button{background:#c7a589}div#wp-responsive-toggle a:before{color:#f3f2f1}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#c7a589}.star-rating .star{color:#c7a589}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#46403c} \ No newline at end of file diff --git a/wp-admin/css/colors/coffee/colors.css b/wp-admin/css/colors/coffee/colors.css new file mode 100644 index 0000000..281a17e --- /dev/null +++ b/wp-admin/css/colors/coffee/colors.css @@ -0,0 +1,331 @@ +/* + * Button mixin- creates 3d-ish button effect with correct + * highlights/shadows, based on a base color. + */ +html { + background: #f1f1f1; } + +/* Links */ +a { + color: #0074a2; } + a:hover, a:active, a:focus { + color: #0099d5; } + +#media-upload a.del-link:hover, div.dashboard-widget-submit input:hover, .subsubsub a:hover, .subsubsub a.current:hover { + color: #0099d5; } + +/* Forms */ +input[type=checkbox]:checked:before { + color: #59524c; } + +input[type=radio]:checked:before { + background: #59524c; } + +.wp-core-ui input[type="reset"]:hover, .wp-core-ui input[type="reset"]:active { + color: #0099d5; } + +/* Core UI */ +.wp-core-ui .button-primary { + background: #c7a589; + border-color: #b78a66; + color: white; + -webkit-box-shadow: inset 0 1px 0 #e0cdbd, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #e0cdbd, 0 1px 0 rgba(0, 0, 0, 0.15); } + .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus { + background: #bf9878; + border-color: #ae7d55; + color: white; + -webkit-box-shadow: inset 0 1px 0 #d7bfac, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #d7bfac, 0 1px 0 rgba(0, 0, 0, 0.15); } + .wp-core-ui .button-primary:active { + background: #b78a66; + border-color: #ae7d55; + color: white; + -webkit-box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); + box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); } + .wp-core-ui .button-primary[disabled], .wp-core-ui .button-primary:disabled, .wp-core-ui .button-primary.button-primary-disabled, .wp-core-ui .button-primary.disabled { + color: #d1cbc7 !important; + background: #ba906d !important; + border-color: #ae7d55 !important; + text-shadow: none !important; } +.wp-core-ui .wp-ui-primary { + color: #fff; + background-color: #59524c; } +.wp-core-ui .wp-ui-text-primary { + color: #59524c; } +.wp-core-ui .wp-ui-highlight { + color: #fff; + background-color: #c7a589; } +.wp-core-ui .wp-ui-text-highlight { + color: #c7a589; } +.wp-core-ui .wp-ui-notification { + color: #fff; + background-color: #9ea476; } +.wp-core-ui .wp-ui-text-notification { + color: #9ea476; } +.wp-core-ui .wp-ui-text-icon { + color: #f3f2f1; } + +/* List tables */ +.wrap .add-new-h2:hover, #add-new-comment a:hover, .tablenav .tablenav-pages a:hover, .tablenav .tablenav-pages a:focus { + color: #fff; + background-color: #59524c; } + +.view-switch a.current:before { + color: #59524c; } + +.view-switch a:hover:before { + color: #9ea476; } + +.post-com-count:hover:after { + border-top-color: #59524c; } + +.post-com-count:hover span { + color: #fff; + background-color: #59524c; } + +strong .post-com-count:after { + border-top-color: #9ea476; } + +strong .post-com-count span { + background-color: #9ea476; } + +/* Admin Menu */ +#adminmenuback, #adminmenuwrap, #adminmenu { + background: #59524c; } + +#adminmenu a { + color: #fff; } + +#adminmenu div.wp-menu-image:before { + color: #f3f2f1; } + +#adminmenu a:hover, #adminmenu li.menu-top:hover, #adminmenu li.opensub > a.menu-top, #adminmenu li > a.menu-top:focus { + color: #fff; + background-color: #c7a589; } + +#adminmenu li.menu-top:hover div.wp-menu-image:before, #adminmenu li.opensub > a.menu-top div.wp-menu-image:before { + color: #fff; } + +/* Active tabs use a bottom border color that matches the page background color. */ +.about-wrap h2 .nav-tab-active, .nav-tab-active, .nav-tab-active:hover { + background-color: #f1f1f1; + border-bottom-color: #f1f1f1; } + +/* Admin Menu: submenu */ +#adminmenu .wp-submenu, #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu .wp-has-current-submenu.opensub .wp-submenu, .folded #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu { + background: #46403c; } + +#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after { + border-right-color: #46403c; } + +#adminmenu .wp-submenu .wp-submenu-head { + color: #cdcbc9; } + +#adminmenu .wp-submenu a, #adminmenu .wp-has-current-submenu .wp-submenu a, .folded #adminmenu .wp-has-current-submenu .wp-submenu a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a { + color: #cdcbc9; } + #adminmenu .wp-submenu a:focus, #adminmenu .wp-submenu a:hover, #adminmenu .wp-has-current-submenu .wp-submenu a:focus, #adminmenu .wp-has-current-submenu .wp-submenu a:hover, .folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus, .folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a:focus, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a:hover, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover { + color: #c7a589; } + +/* Admin Menu: current */ +#adminmenu .wp-submenu li.current a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a { + color: #fff; } + #adminmenu .wp-submenu li.current a:hover, #adminmenu .wp-submenu li.current a:focus, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a:hover, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a:focus, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus { + color: #c7a589; } + +ul#adminmenu a.wp-has-current-submenu:after, ul#adminmenu > li.current > a.current:after { + border-right-color: #f1f1f1; } + +#adminmenu li.current a.menu-top, #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, #adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head, .folded #adminmenu li.current.menu-top { + color: #fff; + background: #c7a589; } + +#adminmenu li.wp-has-current-submenu div.wp-menu-image:before { + color: #fff; } + +/* Admin Menu: bubble */ +#adminmenu .awaiting-mod, #adminmenu .update-plugins { + color: #fff; + background: #9ea476; } + +#adminmenu li.current a .awaiting-mod, #adminmenu li a.wp-has-current-submenu .update-plugins, #adminmenu li:hover a .awaiting-mod, #adminmenu li.menu-top:hover > a .update-plugins { + color: #fff; + background: #46403c; } + +/* Admin Menu: collapse button */ +#collapse-menu { + color: #f3f2f1; } + +#collapse-menu:hover { + color: #fff; } + +#collapse-button div:after { + color: #f3f2f1; } + +#collapse-menu:hover #collapse-button div:after { + color: #fff; } + +/* Admin Bar */ +#wpadminbar { + color: #fff; + background: #59524c; } + +#wpadminbar .ab-item, #wpadminbar a.ab-item, #wpadminbar > #wp-toolbar span.ab-label, #wpadminbar > #wp-toolbar span.noticon { + color: #fff; } + +#wpadminbar .ab-icon, #wpadminbar .ab-icon:before, #wpadminbar .ab-item:before, #wpadminbar .ab-item:after { + color: #f3f2f1; } + +#wpadminbar .ab-top-menu > li:hover > .ab-item, #wpadminbar .ab-top-menu > li.hover > .ab-item, #wpadminbar .ab-top-menu > li > .ab-item:focus, #wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus, #wpadminbar-nojs .ab-top-menu > li.menupop:hover > .ab-item, #wpadminbar .ab-top-menu > li.menupop.hover > .ab-item { + color: #c7a589; + background: #46403c; } + +#wpadminbar > #wp-toolbar li:hover span.ab-label, #wpadminbar > #wp-toolbar li.hover span.ab-label, #wpadminbar > #wp-toolbar a:focus span.ab-label { + color: #c7a589; } + +#wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li:hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { + color: #fff; } + +/* Admin Bar: submenu */ +#wpadminbar .menupop .ab-sub-wrapper { + background: #46403c; } + +#wpadminbar .quicklinks .menupop ul.ab-sub-secondary, #wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu { + background: #656463; } + +#wpadminbar .ab-submenu .ab-item, #wpadminbar .quicklinks .menupop ul li a, #wpadminbar .quicklinks .menupop.hover ul li a, #wpadminbar-nojs .quicklinks .menupop:hover ul li a { + color: #cdcbc9; } + +#wpadminbar .quicklinks li .blavatar, #wpadminbar .menupop .menupop > .ab-item:before { + color: #f3f2f1; } + +#wpadminbar .quicklinks .menupop ul li a:hover, #wpadminbar .quicklinks .menupop ul li a:focus, #wpadminbar .quicklinks .menupop ul li a:hover strong, #wpadminbar .quicklinks .menupop ul li a:focus strong, #wpadminbar .quicklinks .menupop.hover ul li a:hover, #wpadminbar .quicklinks .menupop.hover ul li a:focus, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus, #wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li a:focus .ab-icon:before, #wpadminbar li .ab-item:focus:before, #wpadminbar li.hover .ab-icon:before, #wpadminbar li.hover .ab-item:before, #wpadminbar li:hover .ab-item:after, #wpadminbar li.hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { + color: #c7a589; } + +#wpadminbar .quicklinks li a:hover .blavatar, #wpadminbar .menupop .menupop > .ab-item:hover:before { + color: #c7a589; } + +/* Admin Bar: search */ +#wpadminbar #adminbarsearch:before { + color: #f3f2f1; } + +#wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input:focus { + color: #fff; + background: #6c645c; } + +#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder { + color: #fff; + opacity: 0.7; } + +/* Admin Bar: my account */ +#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img { + border-color: #6c645c; + background-color: #6c645c; } + +#wpadminbar #wp-admin-bar-user-info .display-name { + color: #fff; } + +#wpadminbar #wp-admin-bar-user-info a:hover .display-name { + color: #c7a589; } + +#wpadminbar #wp-admin-bar-user-info .username { + color: #cdcbc9; } + +/* Pointers */ +.wp-pointer .wp-pointer-content h3 { + background-color: #c7a589; + border-color: #bf9878; } + +.wp-pointer .wp-pointer-content h3:before { + color: #c7a589; } + +.wp-pointer.wp-pointer-top .wp-pointer-arrow, .wp-pointer.wp-pointer-undefined .wp-pointer-arrow { + border-bottom-color: #c7a589; } + +/* Media Uploader */ +.media-item .bar, .media-progress-bar div { + background-color: #c7a589; } + +.details.attachment { + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 5px #c7a589; + box-shadow: 0 0 0 1px #fff, 0 0 0 5px #c7a589; } + +.attachment.details .check { + background-color: #c7a589; + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 2px #c7a589; + box-shadow: 0 0 0 1px #fff, 0 0 0 2px #c7a589; } + +/* Themes */ +.theme-browser .theme.active .theme-name, .theme-browser .theme.add-new-theme:hover:after { + background: #c7a589; } + +.theme-browser .theme.add-new-theme:hover span:after { + color: #c7a589; } + +.theme-overlay .theme-header .close:hover, .theme-overlay .theme-header .right:hover, .theme-overlay .theme-header .left:hover { + background: #c7a589; } + +.theme-section.current, .theme-filter.current { + border-bottom-color: #59524c; } + +body.more-filters-opened .more-filters, body.more-filters-opened .more-filters:before { + color: #fff; + background-color: #59524c; } + +body.more-filters-opened .more-filters:hover, body.more-filters-opened .more-filters:focus, body.more-filters-opened .more-filters:hover:before, body.more-filters-opened .more-filters:focus:before { + background-color: #c7a589; + color: #fff; } + +/* Widgets */ +.widgets-chooser li.widgets-chooser-selected { + background-color: #c7a589; + color: #fff; } + +.widgets-chooser li.widgets-chooser-selected:before, .widgets-chooser li.widgets-chooser-selected:focus:before { + color: #fff; } + +/* Customize */ +#customize-theme-controls .widget-area-select .selected { + background-color: #c7a589; + color: #fff; } + +/* jQuery UI Slider */ +.wp-slider .ui-slider-handle, .wp-slider .ui-slider-handle.ui-state-hover, .wp-slider .ui-slider-handle.focus { + background: #c7a589; + border-color: #b78a66; + -webkit-box-shadow: inset 0 1px 0 #e0cdbd, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #e0cdbd, 0 1px 0 rgba(0, 0, 0, 0.15); } + +/* Thickbox: Plugin information */ +#sidemenu a.current { + background: #f1f1f1; + border-bottom-color: #f1f1f1; } + +#plugin-information .action-button { + background: #c7a589; } + +/* Responsive Component */ +div#wp-responsive-toggle a:before { + color: #f3f2f1; } + +.wp-responsive-open div#wp-responsive-toggle a { + border-color: transparent; + background: #c7a589; } + +.star-rating .star { + color: #c7a589; } + +.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a { + background: #46403c; } diff --git a/wp-admin/css/colors/coffee/colors.min.css b/wp-admin/css/colors/coffee/colors.min.css new file mode 100644 index 0000000..bd3ef54 --- /dev/null +++ b/wp-admin/css/colors/coffee/colors.min.css @@ -0,0 +1 @@ +html{background:#f1f1f1}a{color:#0074a2}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,a:active,a:focus,a:hover,div.dashboard-widget-submit input:hover{color:#0099d5}input[type=checkbox]:checked:before{color:#59524c}input[type=radio]:checked:before{background:#59524c}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0099d5}.wp-core-ui .button-primary{background:#c7a589;border-color:#b78a66;color:#fff;-webkit-box-shadow:inset 0 1px 0 #e0cdbd,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #e0cdbd,0 1px 0 rgba(0,0,0,.15)}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#bf9878;border-color:#ae7d55;color:#fff;-webkit-box-shadow:inset 0 1px 0 #d7bfac,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #d7bfac,0 1px 0 rgba(0,0,0,.15)}.wp-core-ui .button-primary:active{background:#b78a66;border-color:#ae7d55;color:#fff;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#d1cbc7!important;background:#ba906d!important;border-color:#ae7d55!important;text-shadow:none!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#59524c}.wp-core-ui .wp-ui-text-primary{color:#59524c}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#c7a589}.wp-core-ui .wp-ui-text-highlight{color:#c7a589}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#9ea476}.wp-core-ui .wp-ui-text-notification{color:#9ea476}.wp-core-ui .wp-ui-text-icon{color:#f3f2f1}#add-new-comment a:hover,.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover{color:#fff;background-color:#59524c}.view-switch a.current:before{color:#59524c}.view-switch a:hover:before{color:#9ea476}.post-com-count:hover:after{border-top-color:#59524c}.post-com-count:hover span{color:#fff;background-color:#59524c}strong .post-com-count:after{border-top-color:#9ea476}strong .post-com-count span{background-color:#9ea476}#adminmenu,#adminmenuback,#adminmenuwrap{background:#59524c}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f3f2f1}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#c7a589}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#46403c}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-right-color:#46403c}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu .wp-submenu-head,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#cdcbc9}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#c7a589}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#c7a589}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-right-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#c7a589}#adminmenu li.wp-has-current-submenu div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#9ea476}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#46403c}#collapse-menu{color:#f3f2f1}#collapse-menu:hover{color:#fff}#collapse-button div:after{color:#f3f2f1}#collapse-menu:hover #collapse-button div:after{color:#fff}#wpadminbar{color:#fff;background:#59524c}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f3f2f1}#wpadminbar .ab-top-menu>li.hover>.ab-item,#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar .ab-top-menu>li:hover>.ab-item,#wpadminbar .ab-top-menu>li>.ab-item:focus,#wpadminbar-nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus{color:#c7a589;background:#46403c}#wpadminbar>#wp-toolbar a:focus span.ab-label,#wpadminbar>#wp-toolbar li.hover span.ab-label,#wpadminbar>#wp-toolbar li:hover span.ab-label{color:#c7a589}#wpadminbar .menupop .ab-sub-wrapper{background:#46403c}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#656463}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar-nojs .quicklinks .menupop:hover ul li a{color:#cdcbc9}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f3f2f1}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:after,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:after,#wpadminbar li:hover .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover{color:#c7a589}#wpadminbar #adminbarsearch:before{color:#f3f2f1}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#6c645c}#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder{color:#fff;opacity:.7}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#6c645c;background-color:#6c645c}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#c7a589}#wpadminbar #wp-admin-bar-user-info .username{color:#cdcbc9}.wp-pointer .wp-pointer-content h3{background-color:#c7a589;border-color:#bf9878}.wp-pointer .wp-pointer-content h3:before{color:#c7a589}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow{border-bottom-color:#c7a589}.media-item .bar,.media-progress-bar div{background-color:#c7a589}.details.attachment{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 5px #c7a589;box-shadow:0 0 0 1px #fff,0 0 0 5px #c7a589}.attachment.details .check{background-color:#c7a589;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #c7a589;box-shadow:0 0 0 1px #fff,0 0 0 2px #c7a589}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme:hover:after{background:#c7a589}.theme-browser .theme.add-new-theme:hover span:after{color:#c7a589}.theme-overlay .theme-header .close:hover,.theme-overlay .theme-header .left:hover,.theme-overlay .theme-header .right:hover{background:#c7a589}.theme-filter.current,.theme-section.current{border-bottom-color:#59524c}body.more-filters-opened .more-filters,body.more-filters-opened .more-filters:before{color:#fff;background-color:#59524c}.widgets-chooser li.widgets-chooser-selected,body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover,body.more-filters-opened .more-filters:hover:before{background-color:#c7a589;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}#customize-theme-controls .widget-area-select .selected{background-color:#c7a589;color:#fff}.wp-slider .ui-slider-handle,.wp-slider .ui-slider-handle.focus,.wp-slider .ui-slider-handle.ui-state-hover{background:#c7a589;border-color:#b78a66;-webkit-box-shadow:inset 0 1px 0 #e0cdbd,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #e0cdbd,0 1px 0 rgba(0,0,0,.15)}#sidemenu a.current{background:#f1f1f1;border-bottom-color:#f1f1f1}#plugin-information .action-button{background:#c7a589}div#wp-responsive-toggle a:before{color:#f3f2f1}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#c7a589}.star-rating .star{color:#c7a589}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#46403c} \ No newline at end of file diff --git a/wp-admin/css/colors/coffee/colors.scss b/wp-admin/css/colors/coffee/colors.scss new file mode 100644 index 0000000..49bee9b --- /dev/null +++ b/wp-admin/css/colors/coffee/colors.scss @@ -0,0 +1,7 @@ +$base-color: #59524c; +$highlight-color: #c7a589; +$notification-color: #9ea476; + +$form-checked: $base-color; + +@import "../_admin.scss"; diff --git a/wp-admin/css/colors/ectoplasm/colors-rtl.css b/wp-admin/css/colors/ectoplasm/colors-rtl.css new file mode 100644 index 0000000..73eb510 --- /dev/null +++ b/wp-admin/css/colors/ectoplasm/colors-rtl.css @@ -0,0 +1,331 @@ +/* + * Button mixin- creates 3d-ish button effect with correct + * highlights/shadows, based on a base color. + */ +html { + background: #f1f1f1; } + +/* Links */ +a { + color: #0074a2; } + a:hover, a:active, a:focus { + color: #0099d5; } + +#media-upload a.del-link:hover, div.dashboard-widget-submit input:hover, .subsubsub a:hover, .subsubsub a.current:hover { + color: #0099d5; } + +/* Forms */ +input[type=checkbox]:checked:before { + color: #523f6d; } + +input[type=radio]:checked:before { + background: #523f6d; } + +.wp-core-ui input[type="reset"]:hover, .wp-core-ui input[type="reset"]:active { + color: #0099d5; } + +/* Core UI */ +.wp-core-ui .button-primary { + background: #a3b745; + border-color: #839237; + color: white; + -webkit-box-shadow: inset 0 1px 0 #c0cd7b, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #c0cd7b, 0 1px 0 rgba(0, 0, 0, 0.15); } + .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus { + background: #93a43e; + border-color: #727f30; + color: white; + -webkit-box-shadow: inset 0 1px 0 #b7c669, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #b7c669, 0 1px 0 rgba(0, 0, 0, 0.15); } + .wp-core-ui .button-primary:active { + background: #839237; + border-color: #727f30; + color: white; + -webkit-box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); + box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); } + .wp-core-ui .button-primary[disabled], .wp-core-ui .button-primary:disabled, .wp-core-ui .button-primary.button-primary-disabled, .wp-core-ui .button-primary.disabled { + color: #cfd1c7 !important; + background: #89993a !important; + border-color: #727f30 !important; + text-shadow: none !important; } +.wp-core-ui .wp-ui-primary { + color: #fff; + background-color: #523f6d; } +.wp-core-ui .wp-ui-text-primary { + color: #523f6d; } +.wp-core-ui .wp-ui-highlight { + color: #fff; + background-color: #a3b745; } +.wp-core-ui .wp-ui-text-highlight { + color: #a3b745; } +.wp-core-ui .wp-ui-notification { + color: #fff; + background-color: #d46f15; } +.wp-core-ui .wp-ui-text-notification { + color: #d46f15; } +.wp-core-ui .wp-ui-text-icon { + color: #ece6f6; } + +/* List tables */ +.wrap .add-new-h2:hover, #add-new-comment a:hover, .tablenav .tablenav-pages a:hover, .tablenav .tablenav-pages a:focus { + color: #fff; + background-color: #523f6d; } + +.view-switch a.current:before { + color: #523f6d; } + +.view-switch a:hover:before { + color: #d46f15; } + +.post-com-count:hover:after { + border-top-color: #523f6d; } + +.post-com-count:hover span { + color: #fff; + background-color: #523f6d; } + +strong .post-com-count:after { + border-top-color: #d46f15; } + +strong .post-com-count span { + background-color: #d46f15; } + +/* Admin Menu */ +#adminmenuback, #adminmenuwrap, #adminmenu { + background: #523f6d; } + +#adminmenu a { + color: #fff; } + +#adminmenu div.wp-menu-image:before { + color: #ece6f6; } + +#adminmenu a:hover, #adminmenu li.menu-top:hover, #adminmenu li.opensub > a.menu-top, #adminmenu li > a.menu-top:focus { + color: #fff; + background-color: #a3b745; } + +#adminmenu li.menu-top:hover div.wp-menu-image:before, #adminmenu li.opensub > a.menu-top div.wp-menu-image:before { + color: #fff; } + +/* Active tabs use a bottom border color that matches the page background color. */ +.about-wrap h2 .nav-tab-active, .nav-tab-active, .nav-tab-active:hover { + background-color: #f1f1f1; + border-bottom-color: #f1f1f1; } + +/* Admin Menu: submenu */ +#adminmenu .wp-submenu, #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu .wp-has-current-submenu.opensub .wp-submenu, .folded #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu { + background: #413256; } + +#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after { + border-left-color: #413256; } + +#adminmenu .wp-submenu .wp-submenu-head { + color: #cbc5d3; } + +#adminmenu .wp-submenu a, #adminmenu .wp-has-current-submenu .wp-submenu a, .folded #adminmenu .wp-has-current-submenu .wp-submenu a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a { + color: #cbc5d3; } + #adminmenu .wp-submenu a:focus, #adminmenu .wp-submenu a:hover, #adminmenu .wp-has-current-submenu .wp-submenu a:focus, #adminmenu .wp-has-current-submenu .wp-submenu a:hover, .folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus, .folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a:focus, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a:hover, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover { + color: #a3b745; } + +/* Admin Menu: current */ +#adminmenu .wp-submenu li.current a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a { + color: #fff; } + #adminmenu .wp-submenu li.current a:hover, #adminmenu .wp-submenu li.current a:focus, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a:hover, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a:focus, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus { + color: #a3b745; } + +ul#adminmenu a.wp-has-current-submenu:after, ul#adminmenu > li.current > a.current:after { + border-left-color: #f1f1f1; } + +#adminmenu li.current a.menu-top, #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, #adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head, .folded #adminmenu li.current.menu-top { + color: #fff; + background: #a3b745; } + +#adminmenu li.wp-has-current-submenu div.wp-menu-image:before { + color: #fff; } + +/* Admin Menu: bubble */ +#adminmenu .awaiting-mod, #adminmenu .update-plugins { + color: #fff; + background: #d46f15; } + +#adminmenu li.current a .awaiting-mod, #adminmenu li a.wp-has-current-submenu .update-plugins, #adminmenu li:hover a .awaiting-mod, #adminmenu li.menu-top:hover > a .update-plugins { + color: #fff; + background: #413256; } + +/* Admin Menu: collapse button */ +#collapse-menu { + color: #ece6f6; } + +#collapse-menu:hover { + color: #fff; } + +#collapse-button div:after { + color: #ece6f6; } + +#collapse-menu:hover #collapse-button div:after { + color: #fff; } + +/* Admin Bar */ +#wpadminbar { + color: #fff; + background: #523f6d; } + +#wpadminbar .ab-item, #wpadminbar a.ab-item, #wpadminbar > #wp-toolbar span.ab-label, #wpadminbar > #wp-toolbar span.noticon { + color: #fff; } + +#wpadminbar .ab-icon, #wpadminbar .ab-icon:before, #wpadminbar .ab-item:before, #wpadminbar .ab-item:after { + color: #ece6f6; } + +#wpadminbar .ab-top-menu > li:hover > .ab-item, #wpadminbar .ab-top-menu > li.hover > .ab-item, #wpadminbar .ab-top-menu > li > .ab-item:focus, #wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus, #wpadminbar-nojs .ab-top-menu > li.menupop:hover > .ab-item, #wpadminbar .ab-top-menu > li.menupop.hover > .ab-item { + color: #a3b745; + background: #413256; } + +#wpadminbar > #wp-toolbar li:hover span.ab-label, #wpadminbar > #wp-toolbar li.hover span.ab-label, #wpadminbar > #wp-toolbar a:focus span.ab-label { + color: #a3b745; } + +#wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li:hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { + color: #fff; } + +/* Admin Bar: submenu */ +#wpadminbar .menupop .ab-sub-wrapper { + background: #413256; } + +#wpadminbar .quicklinks .menupop ul.ab-sub-secondary, #wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu { + background: #64537c; } + +#wpadminbar .ab-submenu .ab-item, #wpadminbar .quicklinks .menupop ul li a, #wpadminbar .quicklinks .menupop.hover ul li a, #wpadminbar-nojs .quicklinks .menupop:hover ul li a { + color: #cbc5d3; } + +#wpadminbar .quicklinks li .blavatar, #wpadminbar .menupop .menupop > .ab-item:before { + color: #ece6f6; } + +#wpadminbar .quicklinks .menupop ul li a:hover, #wpadminbar .quicklinks .menupop ul li a:focus, #wpadminbar .quicklinks .menupop ul li a:hover strong, #wpadminbar .quicklinks .menupop ul li a:focus strong, #wpadminbar .quicklinks .menupop.hover ul li a:hover, #wpadminbar .quicklinks .menupop.hover ul li a:focus, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus, #wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li a:focus .ab-icon:before, #wpadminbar li .ab-item:focus:before, #wpadminbar li.hover .ab-icon:before, #wpadminbar li.hover .ab-item:before, #wpadminbar li:hover .ab-item:after, #wpadminbar li.hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { + color: #a3b745; } + +#wpadminbar .quicklinks li a:hover .blavatar, #wpadminbar .menupop .menupop > .ab-item:hover:before { + color: #a3b745; } + +/* Admin Bar: search */ +#wpadminbar #adminbarsearch:before { + color: #ece6f6; } + +#wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input:focus { + color: #fff; + background: #624c84; } + +#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder { + color: #fff; + opacity: 0.7; } + +/* Admin Bar: my account */ +#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img { + border-color: #624c84; + background-color: #624c84; } + +#wpadminbar #wp-admin-bar-user-info .display-name { + color: #fff; } + +#wpadminbar #wp-admin-bar-user-info a:hover .display-name { + color: #a3b745; } + +#wpadminbar #wp-admin-bar-user-info .username { + color: #cbc5d3; } + +/* Pointers */ +.wp-pointer .wp-pointer-content h3 { + background-color: #a3b745; + border-color: #93a43e; } + +.wp-pointer .wp-pointer-content h3:before { + color: #a3b745; } + +.wp-pointer.wp-pointer-top .wp-pointer-arrow, .wp-pointer.wp-pointer-undefined .wp-pointer-arrow { + border-bottom-color: #a3b745; } + +/* Media Uploader */ +.media-item .bar, .media-progress-bar div { + background-color: #a3b745; } + +.details.attachment { + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 5px #a3b745; + box-shadow: 0 0 0 1px #fff, 0 0 0 5px #a3b745; } + +.attachment.details .check { + background-color: #a3b745; + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 2px #a3b745; + box-shadow: 0 0 0 1px #fff, 0 0 0 2px #a3b745; } + +/* Themes */ +.theme-browser .theme.active .theme-name, .theme-browser .theme.add-new-theme:hover:after { + background: #a3b745; } + +.theme-browser .theme.add-new-theme:hover span:after { + color: #a3b745; } + +.theme-overlay .theme-header .close:hover, .theme-overlay .theme-header .right:hover, .theme-overlay .theme-header .left:hover { + background: #a3b745; } + +.theme-section.current, .theme-filter.current { + border-bottom-color: #523f6d; } + +body.more-filters-opened .more-filters, body.more-filters-opened .more-filters:before { + color: #fff; + background-color: #523f6d; } + +body.more-filters-opened .more-filters:hover, body.more-filters-opened .more-filters:focus, body.more-filters-opened .more-filters:hover:before, body.more-filters-opened .more-filters:focus:before { + background-color: #a3b745; + color: #fff; } + +/* Widgets */ +.widgets-chooser li.widgets-chooser-selected { + background-color: #a3b745; + color: #fff; } + +.widgets-chooser li.widgets-chooser-selected:before, .widgets-chooser li.widgets-chooser-selected:focus:before { + color: #fff; } + +/* Customize */ +#customize-theme-controls .widget-area-select .selected { + background-color: #a3b745; + color: #fff; } + +/* jQuery UI Slider */ +.wp-slider .ui-slider-handle, .wp-slider .ui-slider-handle.ui-state-hover, .wp-slider .ui-slider-handle.focus { + background: #a3b745; + border-color: #839237; + -webkit-box-shadow: inset 0 1px 0 #c0cd7b, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #c0cd7b, 0 1px 0 rgba(0, 0, 0, 0.15); } + +/* Thickbox: Plugin information */ +#sidemenu a.current { + background: #f1f1f1; + border-bottom-color: #f1f1f1; } + +#plugin-information .action-button { + background: #a3b745; } + +/* Responsive Component */ +div#wp-responsive-toggle a:before { + color: #ece6f6; } + +.wp-responsive-open div#wp-responsive-toggle a { + border-color: transparent; + background: #a3b745; } + +.star-rating .star { + color: #a3b745; } + +.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a { + background: #413256; } diff --git a/wp-admin/css/colors/ectoplasm/colors-rtl.min.css b/wp-admin/css/colors/ectoplasm/colors-rtl.min.css new file mode 100644 index 0000000..2f6433e --- /dev/null +++ b/wp-admin/css/colors/ectoplasm/colors-rtl.min.css @@ -0,0 +1 @@ +html{background:#f1f1f1}a{color:#0074a2}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,a:active,a:focus,a:hover,div.dashboard-widget-submit input:hover{color:#0099d5}input[type=checkbox]:checked:before{color:#523f6d}input[type=radio]:checked:before{background:#523f6d}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0099d5}.wp-core-ui .button-primary{background:#a3b745;border-color:#839237;color:#fff;-webkit-box-shadow:inset 0 1px 0 #c0cd7b,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #c0cd7b,0 1px 0 rgba(0,0,0,.15)}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#93a43e;border-color:#727f30;color:#fff;-webkit-box-shadow:inset 0 1px 0 #b7c669,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #b7c669,0 1px 0 rgba(0,0,0,.15)}.wp-core-ui .button-primary:active{background:#839237;border-color:#727f30;color:#fff;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#cfd1c7!important;background:#89993a!important;border-color:#727f30!important;text-shadow:none!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#523f6d}.wp-core-ui .wp-ui-text-primary{color:#523f6d}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#a3b745}.wp-core-ui .wp-ui-text-highlight{color:#a3b745}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#d46f15}.wp-core-ui .wp-ui-text-notification{color:#d46f15}.wp-core-ui .wp-ui-text-icon{color:#ece6f6}#add-new-comment a:hover,.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover{color:#fff;background-color:#523f6d}.view-switch a.current:before{color:#523f6d}.view-switch a:hover:before{color:#d46f15}.post-com-count:hover:after{border-top-color:#523f6d}.post-com-count:hover span{color:#fff;background-color:#523f6d}strong .post-com-count:after{border-top-color:#d46f15}strong .post-com-count span{background-color:#d46f15}#adminmenu,#adminmenuback,#adminmenuwrap{background:#523f6d}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#ece6f6}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#a3b745}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#413256}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-left-color:#413256}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu .wp-submenu-head,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#cbc5d3}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#a3b745}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#a3b745}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-left-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#a3b745}#adminmenu li.wp-has-current-submenu div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#d46f15}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#413256}#collapse-menu{color:#ece6f6}#collapse-menu:hover{color:#fff}#collapse-button div:after{color:#ece6f6}#collapse-menu:hover #collapse-button div:after{color:#fff}#wpadminbar{color:#fff;background:#523f6d}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#ece6f6}#wpadminbar .ab-top-menu>li.hover>.ab-item,#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar .ab-top-menu>li:hover>.ab-item,#wpadminbar .ab-top-menu>li>.ab-item:focus,#wpadminbar-nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus{color:#a3b745;background:#413256}#wpadminbar>#wp-toolbar a:focus span.ab-label,#wpadminbar>#wp-toolbar li.hover span.ab-label,#wpadminbar>#wp-toolbar li:hover span.ab-label{color:#a3b745}#wpadminbar .menupop .ab-sub-wrapper{background:#413256}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#64537c}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar-nojs .quicklinks .menupop:hover ul li a{color:#cbc5d3}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#ece6f6}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:after,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:after,#wpadminbar li:hover .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover{color:#a3b745}#wpadminbar #adminbarsearch:before{color:#ece6f6}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#624c84}#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder{color:#fff;opacity:.7}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#624c84;background-color:#624c84}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#a3b745}#wpadminbar #wp-admin-bar-user-info .username{color:#cbc5d3}.wp-pointer .wp-pointer-content h3{background-color:#a3b745;border-color:#93a43e}.wp-pointer .wp-pointer-content h3:before{color:#a3b745}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow{border-bottom-color:#a3b745}.media-item .bar,.media-progress-bar div{background-color:#a3b745}.details.attachment{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 5px #a3b745;box-shadow:0 0 0 1px #fff,0 0 0 5px #a3b745}.attachment.details .check{background-color:#a3b745;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #a3b745;box-shadow:0 0 0 1px #fff,0 0 0 2px #a3b745}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme:hover:after{background:#a3b745}.theme-browser .theme.add-new-theme:hover span:after{color:#a3b745}.theme-overlay .theme-header .close:hover,.theme-overlay .theme-header .left:hover,.theme-overlay .theme-header .right:hover{background:#a3b745}.theme-filter.current,.theme-section.current{border-bottom-color:#523f6d}body.more-filters-opened .more-filters,body.more-filters-opened .more-filters:before{color:#fff;background-color:#523f6d}.widgets-chooser li.widgets-chooser-selected,body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover,body.more-filters-opened .more-filters:hover:before{background-color:#a3b745;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}#customize-theme-controls .widget-area-select .selected{background-color:#a3b745;color:#fff}.wp-slider .ui-slider-handle,.wp-slider .ui-slider-handle.focus,.wp-slider .ui-slider-handle.ui-state-hover{background:#a3b745;border-color:#839237;-webkit-box-shadow:inset 0 1px 0 #c0cd7b,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #c0cd7b,0 1px 0 rgba(0,0,0,.15)}#sidemenu a.current{background:#f1f1f1;border-bottom-color:#f1f1f1}#plugin-information .action-button{background:#a3b745}div#wp-responsive-toggle a:before{color:#ece6f6}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#a3b745}.star-rating .star{color:#a3b745}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#413256} \ No newline at end of file diff --git a/wp-admin/css/colors/ectoplasm/colors.css b/wp-admin/css/colors/ectoplasm/colors.css new file mode 100644 index 0000000..cc319a8 --- /dev/null +++ b/wp-admin/css/colors/ectoplasm/colors.css @@ -0,0 +1,331 @@ +/* + * Button mixin- creates 3d-ish button effect with correct + * highlights/shadows, based on a base color. + */ +html { + background: #f1f1f1; } + +/* Links */ +a { + color: #0074a2; } + a:hover, a:active, a:focus { + color: #0099d5; } + +#media-upload a.del-link:hover, div.dashboard-widget-submit input:hover, .subsubsub a:hover, .subsubsub a.current:hover { + color: #0099d5; } + +/* Forms */ +input[type=checkbox]:checked:before { + color: #523f6d; } + +input[type=radio]:checked:before { + background: #523f6d; } + +.wp-core-ui input[type="reset"]:hover, .wp-core-ui input[type="reset"]:active { + color: #0099d5; } + +/* Core UI */ +.wp-core-ui .button-primary { + background: #a3b745; + border-color: #839237; + color: white; + -webkit-box-shadow: inset 0 1px 0 #c0cd7b, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #c0cd7b, 0 1px 0 rgba(0, 0, 0, 0.15); } + .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus { + background: #93a43e; + border-color: #727f30; + color: white; + -webkit-box-shadow: inset 0 1px 0 #b7c669, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #b7c669, 0 1px 0 rgba(0, 0, 0, 0.15); } + .wp-core-ui .button-primary:active { + background: #839237; + border-color: #727f30; + color: white; + -webkit-box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); + box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); } + .wp-core-ui .button-primary[disabled], .wp-core-ui .button-primary:disabled, .wp-core-ui .button-primary.button-primary-disabled, .wp-core-ui .button-primary.disabled { + color: #cfd1c7 !important; + background: #89993a !important; + border-color: #727f30 !important; + text-shadow: none !important; } +.wp-core-ui .wp-ui-primary { + color: #fff; + background-color: #523f6d; } +.wp-core-ui .wp-ui-text-primary { + color: #523f6d; } +.wp-core-ui .wp-ui-highlight { + color: #fff; + background-color: #a3b745; } +.wp-core-ui .wp-ui-text-highlight { + color: #a3b745; } +.wp-core-ui .wp-ui-notification { + color: #fff; + background-color: #d46f15; } +.wp-core-ui .wp-ui-text-notification { + color: #d46f15; } +.wp-core-ui .wp-ui-text-icon { + color: #ece6f6; } + +/* List tables */ +.wrap .add-new-h2:hover, #add-new-comment a:hover, .tablenav .tablenav-pages a:hover, .tablenav .tablenav-pages a:focus { + color: #fff; + background-color: #523f6d; } + +.view-switch a.current:before { + color: #523f6d; } + +.view-switch a:hover:before { + color: #d46f15; } + +.post-com-count:hover:after { + border-top-color: #523f6d; } + +.post-com-count:hover span { + color: #fff; + background-color: #523f6d; } + +strong .post-com-count:after { + border-top-color: #d46f15; } + +strong .post-com-count span { + background-color: #d46f15; } + +/* Admin Menu */ +#adminmenuback, #adminmenuwrap, #adminmenu { + background: #523f6d; } + +#adminmenu a { + color: #fff; } + +#adminmenu div.wp-menu-image:before { + color: #ece6f6; } + +#adminmenu a:hover, #adminmenu li.menu-top:hover, #adminmenu li.opensub > a.menu-top, #adminmenu li > a.menu-top:focus { + color: #fff; + background-color: #a3b745; } + +#adminmenu li.menu-top:hover div.wp-menu-image:before, #adminmenu li.opensub > a.menu-top div.wp-menu-image:before { + color: #fff; } + +/* Active tabs use a bottom border color that matches the page background color. */ +.about-wrap h2 .nav-tab-active, .nav-tab-active, .nav-tab-active:hover { + background-color: #f1f1f1; + border-bottom-color: #f1f1f1; } + +/* Admin Menu: submenu */ +#adminmenu .wp-submenu, #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu .wp-has-current-submenu.opensub .wp-submenu, .folded #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu { + background: #413256; } + +#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after { + border-right-color: #413256; } + +#adminmenu .wp-submenu .wp-submenu-head { + color: #cbc5d3; } + +#adminmenu .wp-submenu a, #adminmenu .wp-has-current-submenu .wp-submenu a, .folded #adminmenu .wp-has-current-submenu .wp-submenu a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a { + color: #cbc5d3; } + #adminmenu .wp-submenu a:focus, #adminmenu .wp-submenu a:hover, #adminmenu .wp-has-current-submenu .wp-submenu a:focus, #adminmenu .wp-has-current-submenu .wp-submenu a:hover, .folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus, .folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a:focus, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a:hover, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover { + color: #a3b745; } + +/* Admin Menu: current */ +#adminmenu .wp-submenu li.current a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a { + color: #fff; } + #adminmenu .wp-submenu li.current a:hover, #adminmenu .wp-submenu li.current a:focus, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a:hover, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a:focus, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus { + color: #a3b745; } + +ul#adminmenu a.wp-has-current-submenu:after, ul#adminmenu > li.current > a.current:after { + border-right-color: #f1f1f1; } + +#adminmenu li.current a.menu-top, #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, #adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head, .folded #adminmenu li.current.menu-top { + color: #fff; + background: #a3b745; } + +#adminmenu li.wp-has-current-submenu div.wp-menu-image:before { + color: #fff; } + +/* Admin Menu: bubble */ +#adminmenu .awaiting-mod, #adminmenu .update-plugins { + color: #fff; + background: #d46f15; } + +#adminmenu li.current a .awaiting-mod, #adminmenu li a.wp-has-current-submenu .update-plugins, #adminmenu li:hover a .awaiting-mod, #adminmenu li.menu-top:hover > a .update-plugins { + color: #fff; + background: #413256; } + +/* Admin Menu: collapse button */ +#collapse-menu { + color: #ece6f6; } + +#collapse-menu:hover { + color: #fff; } + +#collapse-button div:after { + color: #ece6f6; } + +#collapse-menu:hover #collapse-button div:after { + color: #fff; } + +/* Admin Bar */ +#wpadminbar { + color: #fff; + background: #523f6d; } + +#wpadminbar .ab-item, #wpadminbar a.ab-item, #wpadminbar > #wp-toolbar span.ab-label, #wpadminbar > #wp-toolbar span.noticon { + color: #fff; } + +#wpadminbar .ab-icon, #wpadminbar .ab-icon:before, #wpadminbar .ab-item:before, #wpadminbar .ab-item:after { + color: #ece6f6; } + +#wpadminbar .ab-top-menu > li:hover > .ab-item, #wpadminbar .ab-top-menu > li.hover > .ab-item, #wpadminbar .ab-top-menu > li > .ab-item:focus, #wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus, #wpadminbar-nojs .ab-top-menu > li.menupop:hover > .ab-item, #wpadminbar .ab-top-menu > li.menupop.hover > .ab-item { + color: #a3b745; + background: #413256; } + +#wpadminbar > #wp-toolbar li:hover span.ab-label, #wpadminbar > #wp-toolbar li.hover span.ab-label, #wpadminbar > #wp-toolbar a:focus span.ab-label { + color: #a3b745; } + +#wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li:hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { + color: #fff; } + +/* Admin Bar: submenu */ +#wpadminbar .menupop .ab-sub-wrapper { + background: #413256; } + +#wpadminbar .quicklinks .menupop ul.ab-sub-secondary, #wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu { + background: #64537c; } + +#wpadminbar .ab-submenu .ab-item, #wpadminbar .quicklinks .menupop ul li a, #wpadminbar .quicklinks .menupop.hover ul li a, #wpadminbar-nojs .quicklinks .menupop:hover ul li a { + color: #cbc5d3; } + +#wpadminbar .quicklinks li .blavatar, #wpadminbar .menupop .menupop > .ab-item:before { + color: #ece6f6; } + +#wpadminbar .quicklinks .menupop ul li a:hover, #wpadminbar .quicklinks .menupop ul li a:focus, #wpadminbar .quicklinks .menupop ul li a:hover strong, #wpadminbar .quicklinks .menupop ul li a:focus strong, #wpadminbar .quicklinks .menupop.hover ul li a:hover, #wpadminbar .quicklinks .menupop.hover ul li a:focus, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus, #wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li a:focus .ab-icon:before, #wpadminbar li .ab-item:focus:before, #wpadminbar li.hover .ab-icon:before, #wpadminbar li.hover .ab-item:before, #wpadminbar li:hover .ab-item:after, #wpadminbar li.hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { + color: #a3b745; } + +#wpadminbar .quicklinks li a:hover .blavatar, #wpadminbar .menupop .menupop > .ab-item:hover:before { + color: #a3b745; } + +/* Admin Bar: search */ +#wpadminbar #adminbarsearch:before { + color: #ece6f6; } + +#wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input:focus { + color: #fff; + background: #624c84; } + +#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder { + color: #fff; + opacity: 0.7; } + +/* Admin Bar: my account */ +#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img { + border-color: #624c84; + background-color: #624c84; } + +#wpadminbar #wp-admin-bar-user-info .display-name { + color: #fff; } + +#wpadminbar #wp-admin-bar-user-info a:hover .display-name { + color: #a3b745; } + +#wpadminbar #wp-admin-bar-user-info .username { + color: #cbc5d3; } + +/* Pointers */ +.wp-pointer .wp-pointer-content h3 { + background-color: #a3b745; + border-color: #93a43e; } + +.wp-pointer .wp-pointer-content h3:before { + color: #a3b745; } + +.wp-pointer.wp-pointer-top .wp-pointer-arrow, .wp-pointer.wp-pointer-undefined .wp-pointer-arrow { + border-bottom-color: #a3b745; } + +/* Media Uploader */ +.media-item .bar, .media-progress-bar div { + background-color: #a3b745; } + +.details.attachment { + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 5px #a3b745; + box-shadow: 0 0 0 1px #fff, 0 0 0 5px #a3b745; } + +.attachment.details .check { + background-color: #a3b745; + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 2px #a3b745; + box-shadow: 0 0 0 1px #fff, 0 0 0 2px #a3b745; } + +/* Themes */ +.theme-browser .theme.active .theme-name, .theme-browser .theme.add-new-theme:hover:after { + background: #a3b745; } + +.theme-browser .theme.add-new-theme:hover span:after { + color: #a3b745; } + +.theme-overlay .theme-header .close:hover, .theme-overlay .theme-header .right:hover, .theme-overlay .theme-header .left:hover { + background: #a3b745; } + +.theme-section.current, .theme-filter.current { + border-bottom-color: #523f6d; } + +body.more-filters-opened .more-filters, body.more-filters-opened .more-filters:before { + color: #fff; + background-color: #523f6d; } + +body.more-filters-opened .more-filters:hover, body.more-filters-opened .more-filters:focus, body.more-filters-opened .more-filters:hover:before, body.more-filters-opened .more-filters:focus:before { + background-color: #a3b745; + color: #fff; } + +/* Widgets */ +.widgets-chooser li.widgets-chooser-selected { + background-color: #a3b745; + color: #fff; } + +.widgets-chooser li.widgets-chooser-selected:before, .widgets-chooser li.widgets-chooser-selected:focus:before { + color: #fff; } + +/* Customize */ +#customize-theme-controls .widget-area-select .selected { + background-color: #a3b745; + color: #fff; } + +/* jQuery UI Slider */ +.wp-slider .ui-slider-handle, .wp-slider .ui-slider-handle.ui-state-hover, .wp-slider .ui-slider-handle.focus { + background: #a3b745; + border-color: #839237; + -webkit-box-shadow: inset 0 1px 0 #c0cd7b, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #c0cd7b, 0 1px 0 rgba(0, 0, 0, 0.15); } + +/* Thickbox: Plugin information */ +#sidemenu a.current { + background: #f1f1f1; + border-bottom-color: #f1f1f1; } + +#plugin-information .action-button { + background: #a3b745; } + +/* Responsive Component */ +div#wp-responsive-toggle a:before { + color: #ece6f6; } + +.wp-responsive-open div#wp-responsive-toggle a { + border-color: transparent; + background: #a3b745; } + +.star-rating .star { + color: #a3b745; } + +.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a { + background: #413256; } diff --git a/wp-admin/css/colors/ectoplasm/colors.min.css b/wp-admin/css/colors/ectoplasm/colors.min.css new file mode 100644 index 0000000..f99f871 --- /dev/null +++ b/wp-admin/css/colors/ectoplasm/colors.min.css @@ -0,0 +1 @@ +html{background:#f1f1f1}a{color:#0074a2}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,a:active,a:focus,a:hover,div.dashboard-widget-submit input:hover{color:#0099d5}input[type=checkbox]:checked:before{color:#523f6d}input[type=radio]:checked:before{background:#523f6d}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0099d5}.wp-core-ui .button-primary{background:#a3b745;border-color:#839237;color:#fff;-webkit-box-shadow:inset 0 1px 0 #c0cd7b,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #c0cd7b,0 1px 0 rgba(0,0,0,.15)}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#93a43e;border-color:#727f30;color:#fff;-webkit-box-shadow:inset 0 1px 0 #b7c669,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #b7c669,0 1px 0 rgba(0,0,0,.15)}.wp-core-ui .button-primary:active{background:#839237;border-color:#727f30;color:#fff;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#cfd1c7!important;background:#89993a!important;border-color:#727f30!important;text-shadow:none!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#523f6d}.wp-core-ui .wp-ui-text-primary{color:#523f6d}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#a3b745}.wp-core-ui .wp-ui-text-highlight{color:#a3b745}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#d46f15}.wp-core-ui .wp-ui-text-notification{color:#d46f15}.wp-core-ui .wp-ui-text-icon{color:#ece6f6}#add-new-comment a:hover,.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover{color:#fff;background-color:#523f6d}.view-switch a.current:before{color:#523f6d}.view-switch a:hover:before{color:#d46f15}.post-com-count:hover:after{border-top-color:#523f6d}.post-com-count:hover span{color:#fff;background-color:#523f6d}strong .post-com-count:after{border-top-color:#d46f15}strong .post-com-count span{background-color:#d46f15}#adminmenu,#adminmenuback,#adminmenuwrap{background:#523f6d}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#ece6f6}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#a3b745}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#413256}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-right-color:#413256}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu .wp-submenu-head,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#cbc5d3}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#a3b745}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#a3b745}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-right-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#a3b745}#adminmenu li.wp-has-current-submenu div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#d46f15}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#413256}#collapse-menu{color:#ece6f6}#collapse-menu:hover{color:#fff}#collapse-button div:after{color:#ece6f6}#collapse-menu:hover #collapse-button div:after{color:#fff}#wpadminbar{color:#fff;background:#523f6d}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#ece6f6}#wpadminbar .ab-top-menu>li.hover>.ab-item,#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar .ab-top-menu>li:hover>.ab-item,#wpadminbar .ab-top-menu>li>.ab-item:focus,#wpadminbar-nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus{color:#a3b745;background:#413256}#wpadminbar>#wp-toolbar a:focus span.ab-label,#wpadminbar>#wp-toolbar li.hover span.ab-label,#wpadminbar>#wp-toolbar li:hover span.ab-label{color:#a3b745}#wpadminbar .menupop .ab-sub-wrapper{background:#413256}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#64537c}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar-nojs .quicklinks .menupop:hover ul li a{color:#cbc5d3}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#ece6f6}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:after,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:after,#wpadminbar li:hover .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover{color:#a3b745}#wpadminbar #adminbarsearch:before{color:#ece6f6}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#624c84}#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder{color:#fff;opacity:.7}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#624c84;background-color:#624c84}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#a3b745}#wpadminbar #wp-admin-bar-user-info .username{color:#cbc5d3}.wp-pointer .wp-pointer-content h3{background-color:#a3b745;border-color:#93a43e}.wp-pointer .wp-pointer-content h3:before{color:#a3b745}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow{border-bottom-color:#a3b745}.media-item .bar,.media-progress-bar div{background-color:#a3b745}.details.attachment{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 5px #a3b745;box-shadow:0 0 0 1px #fff,0 0 0 5px #a3b745}.attachment.details .check{background-color:#a3b745;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #a3b745;box-shadow:0 0 0 1px #fff,0 0 0 2px #a3b745}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme:hover:after{background:#a3b745}.theme-browser .theme.add-new-theme:hover span:after{color:#a3b745}.theme-overlay .theme-header .close:hover,.theme-overlay .theme-header .left:hover,.theme-overlay .theme-header .right:hover{background:#a3b745}.theme-filter.current,.theme-section.current{border-bottom-color:#523f6d}body.more-filters-opened .more-filters,body.more-filters-opened .more-filters:before{color:#fff;background-color:#523f6d}.widgets-chooser li.widgets-chooser-selected,body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover,body.more-filters-opened .more-filters:hover:before{background-color:#a3b745;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}#customize-theme-controls .widget-area-select .selected{background-color:#a3b745;color:#fff}.wp-slider .ui-slider-handle,.wp-slider .ui-slider-handle.focus,.wp-slider .ui-slider-handle.ui-state-hover{background:#a3b745;border-color:#839237;-webkit-box-shadow:inset 0 1px 0 #c0cd7b,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #c0cd7b,0 1px 0 rgba(0,0,0,.15)}#sidemenu a.current{background:#f1f1f1;border-bottom-color:#f1f1f1}#plugin-information .action-button{background:#a3b745}div#wp-responsive-toggle a:before{color:#ece6f6}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#a3b745}.star-rating .star{color:#a3b745}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#413256} \ No newline at end of file diff --git a/wp-admin/css/colors/ectoplasm/colors.scss b/wp-admin/css/colors/ectoplasm/colors.scss new file mode 100644 index 0000000..8d14570 --- /dev/null +++ b/wp-admin/css/colors/ectoplasm/colors.scss @@ -0,0 +1,8 @@ +$base-color: #523f6d; +$icon-color: #ece6f6; +$highlight-color: #a3b745; +$notification-color: #d46f15; + +$form-checked: $base-color; + +@import "../_admin.scss"; diff --git a/wp-admin/css/colors/light/colors-rtl.css b/wp-admin/css/colors/light/colors-rtl.css new file mode 100644 index 0000000..bdb778d --- /dev/null +++ b/wp-admin/css/colors/light/colors-rtl.css @@ -0,0 +1,339 @@ +/* + * Button mixin- creates 3d-ish button effect with correct + * highlights/shadows, based on a base color. + */ +html { + background: #f5f5f5; } + +/* Links */ +a { + color: #0074a2; } + a:hover, a:active, a:focus { + color: #0099d5; } + +#media-upload a.del-link:hover, div.dashboard-widget-submit input:hover, .subsubsub a:hover, .subsubsub a.current:hover { + color: #0099d5; } + +/* Forms */ +input[type=checkbox]:checked:before { + color: #04a4cc; } + +input[type=radio]:checked:before { + background: #04a4cc; } + +.wp-core-ui input[type="reset"]:hover, .wp-core-ui input[type="reset"]:active { + color: #0099d5; } + +/* Core UI */ +.wp-core-ui .button-primary { + background: #04a4cc; + border-color: #037c9a; + color: white; + -webkit-box-shadow: inset 0 1px 0 #22cffb, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #22cffb, 0 1px 0 rgba(0, 0, 0, 0.15); } + .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus { + background: #0490b3; + border-color: #036881; + color: white; + -webkit-box-shadow: inset 0 1px 0 #09cafa, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #09cafa, 0 1px 0 rgba(0, 0, 0, 0.15); } + .wp-core-ui .button-primary:active { + background: #037c9a; + border-color: #036881; + color: white; + -webkit-box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); + box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); } + .wp-core-ui .button-primary[disabled], .wp-core-ui .button-primary:disabled, .wp-core-ui .button-primary.button-primary-disabled, .wp-core-ui .button-primary.disabled { + color: #c7cfd1 !important; + background: #0384a4 !important; + border-color: #036881 !important; + text-shadow: none !important; } +.wp-core-ui .wp-ui-primary { + color: #333; + background-color: #e5e5e5; } +.wp-core-ui .wp-ui-text-primary { + color: #e5e5e5; } +.wp-core-ui .wp-ui-highlight { + color: #fff; + background-color: #888; } +.wp-core-ui .wp-ui-text-highlight { + color: #888; } +.wp-core-ui .wp-ui-notification { + color: #fff; + background-color: #d64e07; } +.wp-core-ui .wp-ui-text-notification { + color: #d64e07; } +.wp-core-ui .wp-ui-text-icon { + color: #999; } + +/* List tables */ +.wrap .add-new-h2:hover, #add-new-comment a:hover, .tablenav .tablenav-pages a:hover, .tablenav .tablenav-pages a:focus { + color: #333; + background-color: #e5e5e5; } + +.view-switch a.current:before { + color: #e5e5e5; } + +.view-switch a:hover:before { + color: #d64e07; } + +.post-com-count:hover:after { + border-top-color: #e5e5e5; } + +.post-com-count:hover span { + color: #333; + background-color: #e5e5e5; } + +strong .post-com-count:after { + border-top-color: #d64e07; } + +strong .post-com-count span { + background-color: #d64e07; } + +/* Admin Menu */ +#adminmenuback, #adminmenuwrap, #adminmenu { + background: #e5e5e5; } + +#adminmenu a { + color: #333; } + +#adminmenu div.wp-menu-image:before { + color: #999; } + +#adminmenu a:hover, #adminmenu li.menu-top:hover, #adminmenu li.opensub > a.menu-top, #adminmenu li > a.menu-top:focus { + color: #fff; + background-color: #888; } + +#adminmenu li.menu-top:hover div.wp-menu-image:before, #adminmenu li.opensub > a.menu-top div.wp-menu-image:before { + color: #ccc; } + +/* Active tabs use a bottom border color that matches the page background color. */ +.about-wrap h2 .nav-tab-active, .nav-tab-active, .nav-tab-active:hover { + background-color: #f5f5f5; + border-bottom-color: #f5f5f5; } + +/* Admin Menu: submenu */ +#adminmenu .wp-submenu, #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu .wp-has-current-submenu.opensub .wp-submenu, .folded #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu { + background: #fff; } + +#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after { + border-left-color: #fff; } + +#adminmenu .wp-submenu .wp-submenu-head { + color: #686868; } + +#adminmenu .wp-submenu a, #adminmenu .wp-has-current-submenu .wp-submenu a, .folded #adminmenu .wp-has-current-submenu .wp-submenu a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a { + color: #686868; } + #adminmenu .wp-submenu a:focus, #adminmenu .wp-submenu a:hover, #adminmenu .wp-has-current-submenu .wp-submenu a:focus, #adminmenu .wp-has-current-submenu .wp-submenu a:hover, .folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus, .folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a:focus, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a:hover, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover { + color: #04a4cc; } + +/* Admin Menu: current */ +#adminmenu .wp-submenu li.current a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a { + color: #333; } + #adminmenu .wp-submenu li.current a:hover, #adminmenu .wp-submenu li.current a:focus, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a:hover, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a:focus, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus { + color: #04a4cc; } + +ul#adminmenu a.wp-has-current-submenu:after, ul#adminmenu > li.current > a.current:after { + border-left-color: #f5f5f5; } + +#adminmenu li.current a.menu-top, #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, #adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head, .folded #adminmenu li.current.menu-top { + color: #fff; + background: #888; } + +#adminmenu li.wp-has-current-submenu div.wp-menu-image:before { + color: #ccc; } + +/* Admin Menu: bubble */ +#adminmenu .awaiting-mod, #adminmenu .update-plugins { + color: #fff; + background: #d64e07; } + +#adminmenu li.current a .awaiting-mod, #adminmenu li a.wp-has-current-submenu .update-plugins, #adminmenu li:hover a .awaiting-mod, #adminmenu li.menu-top:hover > a .update-plugins { + color: #333; + background: #fff; } + +/* Admin Menu: collapse button */ +#collapse-menu { + color: #777; } + +#collapse-menu:hover { + color: #333; } + +#collapse-button div:after { + color: #999; } + +#collapse-menu:hover #collapse-button div:after { + color: #555; } + +/* Admin Bar */ +#wpadminbar { + color: #333; + background: #e5e5e5; } + +#wpadminbar .ab-item, #wpadminbar a.ab-item, #wpadminbar > #wp-toolbar span.ab-label, #wpadminbar > #wp-toolbar span.noticon { + color: #333; } + +#wpadminbar .ab-icon, #wpadminbar .ab-icon:before, #wpadminbar .ab-item:before, #wpadminbar .ab-item:after { + color: #999; } + +#wpadminbar .ab-top-menu > li:hover > .ab-item, #wpadminbar .ab-top-menu > li.hover > .ab-item, #wpadminbar .ab-top-menu > li > .ab-item:focus, #wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus, #wpadminbar-nojs .ab-top-menu > li.menupop:hover > .ab-item, #wpadminbar .ab-top-menu > li.menupop.hover > .ab-item { + color: #04a4cc; + background: #fff; } + +#wpadminbar > #wp-toolbar li:hover span.ab-label, #wpadminbar > #wp-toolbar li.hover span.ab-label, #wpadminbar > #wp-toolbar a:focus span.ab-label { + color: #04a4cc; } + +#wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li:hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { + color: #ccc; } + +/* Admin Bar: submenu */ +#wpadminbar .menupop .ab-sub-wrapper { + background: #fff; } + +#wpadminbar .quicklinks .menupop ul.ab-sub-secondary, #wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu { + background: #f6f7f7; } + +#wpadminbar .ab-submenu .ab-item, #wpadminbar .quicklinks .menupop ul li a, #wpadminbar .quicklinks .menupop.hover ul li a, #wpadminbar-nojs .quicklinks .menupop:hover ul li a { + color: #686868; } + +#wpadminbar .quicklinks li .blavatar, #wpadminbar .menupop .menupop > .ab-item:before { + color: #999; } + +#wpadminbar .quicklinks .menupop ul li a:hover, #wpadminbar .quicklinks .menupop ul li a:focus, #wpadminbar .quicklinks .menupop ul li a:hover strong, #wpadminbar .quicklinks .menupop ul li a:focus strong, #wpadminbar .quicklinks .menupop.hover ul li a:hover, #wpadminbar .quicklinks .menupop.hover ul li a:focus, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus, #wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li a:focus .ab-icon:before, #wpadminbar li .ab-item:focus:before, #wpadminbar li.hover .ab-icon:before, #wpadminbar li.hover .ab-item:before, #wpadminbar li:hover .ab-item:after, #wpadminbar li.hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { + color: #04a4cc; } + +#wpadminbar .quicklinks li a:hover .blavatar, #wpadminbar .menupop .menupop > .ab-item:hover:before { + color: #04a4cc; } + +/* Admin Bar: search */ +#wpadminbar #adminbarsearch:before { + color: #999; } + +#wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input:focus { + color: #333; + background: #f7f7f7; } + +#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder { + color: #333; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder { + color: #333; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder { + color: #333; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder { + color: #333; + opacity: 0.7; } + +/* Admin Bar: my account */ +#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img { + border-color: #f7f7f7; + background-color: #f7f7f7; } + +#wpadminbar #wp-admin-bar-user-info .display-name { + color: #333; } + +#wpadminbar #wp-admin-bar-user-info a:hover .display-name { + color: #04a4cc; } + +#wpadminbar #wp-admin-bar-user-info .username { + color: #686868; } + +/* Pointers */ +.wp-pointer .wp-pointer-content h3 { + background-color: #04a4cc; + border-color: #0490b3; } + +.wp-pointer .wp-pointer-content h3:before { + color: #04a4cc; } + +.wp-pointer.wp-pointer-top .wp-pointer-arrow, .wp-pointer.wp-pointer-undefined .wp-pointer-arrow { + border-bottom-color: #04a4cc; } + +/* Media Uploader */ +.media-item .bar, .media-progress-bar div { + background-color: #04a4cc; } + +.details.attachment { + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 5px #04a4cc; + box-shadow: 0 0 0 1px #fff, 0 0 0 5px #04a4cc; } + +.attachment.details .check { + background-color: #04a4cc; + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 2px #04a4cc; + box-shadow: 0 0 0 1px #fff, 0 0 0 2px #04a4cc; } + +/* Themes */ +.theme-browser .theme.active .theme-name, .theme-browser .theme.add-new-theme:hover:after { + background: #04a4cc; } + +.theme-browser .theme.add-new-theme:hover span:after { + color: #04a4cc; } + +.theme-overlay .theme-header .close:hover, .theme-overlay .theme-header .right:hover, .theme-overlay .theme-header .left:hover { + background: #04a4cc; } + +.theme-section.current, .theme-filter.current { + border-bottom-color: #e5e5e5; } + +body.more-filters-opened .more-filters, body.more-filters-opened .more-filters:before { + color: #333; + background-color: #e5e5e5; } + +body.more-filters-opened .more-filters:hover, body.more-filters-opened .more-filters:focus, body.more-filters-opened .more-filters:hover:before, body.more-filters-opened .more-filters:focus:before { + background-color: #888; + color: #fff; } + +/* Widgets */ +.widgets-chooser li.widgets-chooser-selected { + background-color: #888; + color: #fff; } + +.widgets-chooser li.widgets-chooser-selected:before, .widgets-chooser li.widgets-chooser-selected:focus:before { + color: #fff; } + +/* Customize */ +#customize-theme-controls .widget-area-select .selected { + background-color: #888; + color: #fff; } + +/* jQuery UI Slider */ +.wp-slider .ui-slider-handle, .wp-slider .ui-slider-handle.ui-state-hover, .wp-slider .ui-slider-handle.focus { + background: #04a4cc; + border-color: #037c9a; + -webkit-box-shadow: inset 0 1px 0 #22cffb, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #22cffb, 0 1px 0 rgba(0, 0, 0, 0.15); } + +/* Thickbox: Plugin information */ +#sidemenu a.current { + background: #f5f5f5; + border-bottom-color: #f5f5f5; } + +#plugin-information .action-button { + background: #04a4cc; } + +/* Responsive Component */ +div#wp-responsive-toggle a:before { + color: #999; } + +.wp-responsive-open div#wp-responsive-toggle a { + border-color: transparent; + background: #888; } + +.star-rating .star { + color: #04a4cc; } + +.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a { + background: #fff; } + +/* temporary fix for admin-bar hover color */ +#wpadminbar .ab-top-menu > li:hover > .ab-item, #wpadminbar .ab-top-menu > li.hover > .ab-item, #wpadminbar > #wp-toolbar > #wp-admin-bar-root-default li:hover span.ab-label, #wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary li.hover span.ab-label, #wpadminbar .ab-top-menu > li > .ab-item:focus, #wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus, #wpadminbar-nojs .ab-top-menu > li.menupop:hover > .ab-item, #wpadminbar .ab-top-menu > li.menupop.hover > .ab-item { + color: #333; } + +/* Override the theme filter highlight color for this scheme */ +.theme-section.current, .theme-filter.current { + border-bottom-color: #04a4cc; } diff --git a/wp-admin/css/colors/light/colors-rtl.min.css b/wp-admin/css/colors/light/colors-rtl.min.css new file mode 100644 index 0000000..b0519d1 --- /dev/null +++ b/wp-admin/css/colors/light/colors-rtl.min.css @@ -0,0 +1 @@ +html{background:#f5f5f5}a{color:#0074a2}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,a:active,a:focus,a:hover,div.dashboard-widget-submit input:hover{color:#0099d5}input[type=checkbox]:checked:before{color:#04a4cc}input[type=radio]:checked:before{background:#04a4cc}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0099d5}.wp-core-ui .button-primary{background:#04a4cc;border-color:#037c9a;color:#fff;-webkit-box-shadow:inset 0 1px 0 #22cffb,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #22cffb,0 1px 0 rgba(0,0,0,.15)}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#0490b3;border-color:#036881;color:#fff;-webkit-box-shadow:inset 0 1px 0 #09cafa,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #09cafa,0 1px 0 rgba(0,0,0,.15)}.wp-core-ui .button-primary:active{background:#037c9a;border-color:#036881;color:#fff;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#c7cfd1!important;background:#0384a4!important;border-color:#036881!important;text-shadow:none!important}.wp-core-ui .wp-ui-primary{color:#333;background-color:#e5e5e5}.wp-core-ui .wp-ui-text-primary{color:#e5e5e5}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#888}.wp-core-ui .wp-ui-text-highlight{color:#888}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#d64e07}.wp-core-ui .wp-ui-text-notification{color:#d64e07}.wp-core-ui .wp-ui-text-icon{color:#999}#add-new-comment a:hover,.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover{color:#333;background-color:#e5e5e5}.view-switch a.current:before{color:#e5e5e5}.view-switch a:hover:before{color:#d64e07}.post-com-count:hover:after{border-top-color:#e5e5e5}.post-com-count:hover span{color:#333;background-color:#e5e5e5}strong .post-com-count:after{border-top-color:#d64e07}strong .post-com-count span{background-color:#d64e07}#adminmenu,#adminmenuback,#adminmenuwrap{background:#e5e5e5}#adminmenu a{color:#333}#adminmenu div.wp-menu-image:before{color:#999}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#888}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#ccc}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f5f5f5;border-bottom-color:#f5f5f5}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#fff}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-left-color:#fff}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu .wp-submenu-head,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#686868}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#04a4cc}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#333}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#04a4cc}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-left-color:#f5f5f5}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#888}#adminmenu li.wp-has-current-submenu div.wp-menu-image:before{color:#ccc}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#d64e07}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#333;background:#fff}#collapse-menu{color:#777}#collapse-menu:hover{color:#333}#collapse-button div:after{color:#999}#collapse-menu:hover #collapse-button div:after{color:#555}#wpadminbar{color:#333;background:#e5e5e5}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#333}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#999}#wpadminbar .ab-top-menu>li.hover>.ab-item,#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar .ab-top-menu>li:hover>.ab-item,#wpadminbar .ab-top-menu>li>.ab-item:focus,#wpadminbar-nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus{background:#fff}#wpadminbar>#wp-toolbar a:focus span.ab-label,#wpadminbar>#wp-toolbar li.hover span.ab-label,#wpadminbar>#wp-toolbar li:hover span.ab-label{color:#04a4cc}#wpadminbar .menupop .ab-sub-wrapper{background:#fff}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#f6f7f7}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar-nojs .quicklinks .menupop:hover ul li a{color:#686868}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#999}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:after,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:after,#wpadminbar li:hover .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover{color:#04a4cc}#wpadminbar #adminbarsearch:before{color:#999}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#333;background:#f7f7f7}#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder{color:#333;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder{color:#333;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder{color:#333;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder{color:#333;opacity:.7}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#f7f7f7;background-color:#f7f7f7}#wpadminbar #wp-admin-bar-user-info .display-name{color:#333}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#04a4cc}#wpadminbar #wp-admin-bar-user-info .username{color:#686868}.wp-pointer .wp-pointer-content h3{background-color:#04a4cc;border-color:#0490b3}.wp-pointer .wp-pointer-content h3:before{color:#04a4cc}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow{border-bottom-color:#04a4cc}.media-item .bar,.media-progress-bar div{background-color:#04a4cc}.details.attachment{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 5px #04a4cc;box-shadow:0 0 0 1px #fff,0 0 0 5px #04a4cc}.attachment.details .check{background-color:#04a4cc;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #04a4cc;box-shadow:0 0 0 1px #fff,0 0 0 2px #04a4cc}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme:hover:after{background:#04a4cc}.theme-browser .theme.add-new-theme:hover span:after{color:#04a4cc}.theme-overlay .theme-header .close:hover,.theme-overlay .theme-header .left:hover,.theme-overlay .theme-header .right:hover{background:#04a4cc}body.more-filters-opened .more-filters,body.more-filters-opened .more-filters:before{color:#333;background-color:#e5e5e5}.widgets-chooser li.widgets-chooser-selected,body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover,body.more-filters-opened .more-filters:hover:before{background-color:#888;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}#customize-theme-controls .widget-area-select .selected{background-color:#888;color:#fff}.wp-slider .ui-slider-handle,.wp-slider .ui-slider-handle.focus,.wp-slider .ui-slider-handle.ui-state-hover{background:#04a4cc;border-color:#037c9a;-webkit-box-shadow:inset 0 1px 0 #22cffb,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #22cffb,0 1px 0 rgba(0,0,0,.15)}#sidemenu a.current{background:#f5f5f5;border-bottom-color:#f5f5f5}#plugin-information .action-button{background:#04a4cc}div#wp-responsive-toggle a:before{color:#999}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#888}.star-rating .star{color:#04a4cc}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#fff}#wpadminbar .ab-top-menu>li.hover>.ab-item,#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar .ab-top-menu>li:hover>.ab-item,#wpadminbar .ab-top-menu>li>.ab-item:focus,#wpadminbar-nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar>#wp-toolbar>#wp-admin-bar-root-default li:hover span.ab-label,#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary li.hover span.ab-label{color:#333}.theme-filter.current,.theme-section.current{border-bottom-color:#04a4cc} \ No newline at end of file diff --git a/wp-admin/css/colors/light/colors.css b/wp-admin/css/colors/light/colors.css new file mode 100644 index 0000000..ca83d94 --- /dev/null +++ b/wp-admin/css/colors/light/colors.css @@ -0,0 +1,339 @@ +/* + * Button mixin- creates 3d-ish button effect with correct + * highlights/shadows, based on a base color. + */ +html { + background: #f5f5f5; } + +/* Links */ +a { + color: #0074a2; } + a:hover, a:active, a:focus { + color: #0099d5; } + +#media-upload a.del-link:hover, div.dashboard-widget-submit input:hover, .subsubsub a:hover, .subsubsub a.current:hover { + color: #0099d5; } + +/* Forms */ +input[type=checkbox]:checked:before { + color: #04a4cc; } + +input[type=radio]:checked:before { + background: #04a4cc; } + +.wp-core-ui input[type="reset"]:hover, .wp-core-ui input[type="reset"]:active { + color: #0099d5; } + +/* Core UI */ +.wp-core-ui .button-primary { + background: #04a4cc; + border-color: #037c9a; + color: white; + -webkit-box-shadow: inset 0 1px 0 #22cffb, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #22cffb, 0 1px 0 rgba(0, 0, 0, 0.15); } + .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus { + background: #0490b3; + border-color: #036881; + color: white; + -webkit-box-shadow: inset 0 1px 0 #09cafa, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #09cafa, 0 1px 0 rgba(0, 0, 0, 0.15); } + .wp-core-ui .button-primary:active { + background: #037c9a; + border-color: #036881; + color: white; + -webkit-box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); + box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); } + .wp-core-ui .button-primary[disabled], .wp-core-ui .button-primary:disabled, .wp-core-ui .button-primary.button-primary-disabled, .wp-core-ui .button-primary.disabled { + color: #c7cfd1 !important; + background: #0384a4 !important; + border-color: #036881 !important; + text-shadow: none !important; } +.wp-core-ui .wp-ui-primary { + color: #333; + background-color: #e5e5e5; } +.wp-core-ui .wp-ui-text-primary { + color: #e5e5e5; } +.wp-core-ui .wp-ui-highlight { + color: #fff; + background-color: #888; } +.wp-core-ui .wp-ui-text-highlight { + color: #888; } +.wp-core-ui .wp-ui-notification { + color: #fff; + background-color: #d64e07; } +.wp-core-ui .wp-ui-text-notification { + color: #d64e07; } +.wp-core-ui .wp-ui-text-icon { + color: #999; } + +/* List tables */ +.wrap .add-new-h2:hover, #add-new-comment a:hover, .tablenav .tablenav-pages a:hover, .tablenav .tablenav-pages a:focus { + color: #333; + background-color: #e5e5e5; } + +.view-switch a.current:before { + color: #e5e5e5; } + +.view-switch a:hover:before { + color: #d64e07; } + +.post-com-count:hover:after { + border-top-color: #e5e5e5; } + +.post-com-count:hover span { + color: #333; + background-color: #e5e5e5; } + +strong .post-com-count:after { + border-top-color: #d64e07; } + +strong .post-com-count span { + background-color: #d64e07; } + +/* Admin Menu */ +#adminmenuback, #adminmenuwrap, #adminmenu { + background: #e5e5e5; } + +#adminmenu a { + color: #333; } + +#adminmenu div.wp-menu-image:before { + color: #999; } + +#adminmenu a:hover, #adminmenu li.menu-top:hover, #adminmenu li.opensub > a.menu-top, #adminmenu li > a.menu-top:focus { + color: #fff; + background-color: #888; } + +#adminmenu li.menu-top:hover div.wp-menu-image:before, #adminmenu li.opensub > a.menu-top div.wp-menu-image:before { + color: #ccc; } + +/* Active tabs use a bottom border color that matches the page background color. */ +.about-wrap h2 .nav-tab-active, .nav-tab-active, .nav-tab-active:hover { + background-color: #f5f5f5; + border-bottom-color: #f5f5f5; } + +/* Admin Menu: submenu */ +#adminmenu .wp-submenu, #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu .wp-has-current-submenu.opensub .wp-submenu, .folded #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu { + background: #fff; } + +#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after { + border-right-color: #fff; } + +#adminmenu .wp-submenu .wp-submenu-head { + color: #686868; } + +#adminmenu .wp-submenu a, #adminmenu .wp-has-current-submenu .wp-submenu a, .folded #adminmenu .wp-has-current-submenu .wp-submenu a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a { + color: #686868; } + #adminmenu .wp-submenu a:focus, #adminmenu .wp-submenu a:hover, #adminmenu .wp-has-current-submenu .wp-submenu a:focus, #adminmenu .wp-has-current-submenu .wp-submenu a:hover, .folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus, .folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a:focus, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a:hover, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover { + color: #04a4cc; } + +/* Admin Menu: current */ +#adminmenu .wp-submenu li.current a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a { + color: #333; } + #adminmenu .wp-submenu li.current a:hover, #adminmenu .wp-submenu li.current a:focus, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a:hover, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a:focus, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus { + color: #04a4cc; } + +ul#adminmenu a.wp-has-current-submenu:after, ul#adminmenu > li.current > a.current:after { + border-right-color: #f5f5f5; } + +#adminmenu li.current a.menu-top, #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, #adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head, .folded #adminmenu li.current.menu-top { + color: #fff; + background: #888; } + +#adminmenu li.wp-has-current-submenu div.wp-menu-image:before { + color: #ccc; } + +/* Admin Menu: bubble */ +#adminmenu .awaiting-mod, #adminmenu .update-plugins { + color: #fff; + background: #d64e07; } + +#adminmenu li.current a .awaiting-mod, #adminmenu li a.wp-has-current-submenu .update-plugins, #adminmenu li:hover a .awaiting-mod, #adminmenu li.menu-top:hover > a .update-plugins { + color: #333; + background: #fff; } + +/* Admin Menu: collapse button */ +#collapse-menu { + color: #777; } + +#collapse-menu:hover { + color: #333; } + +#collapse-button div:after { + color: #999; } + +#collapse-menu:hover #collapse-button div:after { + color: #555; } + +/* Admin Bar */ +#wpadminbar { + color: #333; + background: #e5e5e5; } + +#wpadminbar .ab-item, #wpadminbar a.ab-item, #wpadminbar > #wp-toolbar span.ab-label, #wpadminbar > #wp-toolbar span.noticon { + color: #333; } + +#wpadminbar .ab-icon, #wpadminbar .ab-icon:before, #wpadminbar .ab-item:before, #wpadminbar .ab-item:after { + color: #999; } + +#wpadminbar .ab-top-menu > li:hover > .ab-item, #wpadminbar .ab-top-menu > li.hover > .ab-item, #wpadminbar .ab-top-menu > li > .ab-item:focus, #wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus, #wpadminbar-nojs .ab-top-menu > li.menupop:hover > .ab-item, #wpadminbar .ab-top-menu > li.menupop.hover > .ab-item { + color: #04a4cc; + background: #fff; } + +#wpadminbar > #wp-toolbar li:hover span.ab-label, #wpadminbar > #wp-toolbar li.hover span.ab-label, #wpadminbar > #wp-toolbar a:focus span.ab-label { + color: #04a4cc; } + +#wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li:hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { + color: #ccc; } + +/* Admin Bar: submenu */ +#wpadminbar .menupop .ab-sub-wrapper { + background: #fff; } + +#wpadminbar .quicklinks .menupop ul.ab-sub-secondary, #wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu { + background: #f6f7f7; } + +#wpadminbar .ab-submenu .ab-item, #wpadminbar .quicklinks .menupop ul li a, #wpadminbar .quicklinks .menupop.hover ul li a, #wpadminbar-nojs .quicklinks .menupop:hover ul li a { + color: #686868; } + +#wpadminbar .quicklinks li .blavatar, #wpadminbar .menupop .menupop > .ab-item:before { + color: #999; } + +#wpadminbar .quicklinks .menupop ul li a:hover, #wpadminbar .quicklinks .menupop ul li a:focus, #wpadminbar .quicklinks .menupop ul li a:hover strong, #wpadminbar .quicklinks .menupop ul li a:focus strong, #wpadminbar .quicklinks .menupop.hover ul li a:hover, #wpadminbar .quicklinks .menupop.hover ul li a:focus, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus, #wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li a:focus .ab-icon:before, #wpadminbar li .ab-item:focus:before, #wpadminbar li.hover .ab-icon:before, #wpadminbar li.hover .ab-item:before, #wpadminbar li:hover .ab-item:after, #wpadminbar li.hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { + color: #04a4cc; } + +#wpadminbar .quicklinks li a:hover .blavatar, #wpadminbar .menupop .menupop > .ab-item:hover:before { + color: #04a4cc; } + +/* Admin Bar: search */ +#wpadminbar #adminbarsearch:before { + color: #999; } + +#wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input:focus { + color: #333; + background: #f7f7f7; } + +#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder { + color: #333; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder { + color: #333; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder { + color: #333; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder { + color: #333; + opacity: 0.7; } + +/* Admin Bar: my account */ +#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img { + border-color: #f7f7f7; + background-color: #f7f7f7; } + +#wpadminbar #wp-admin-bar-user-info .display-name { + color: #333; } + +#wpadminbar #wp-admin-bar-user-info a:hover .display-name { + color: #04a4cc; } + +#wpadminbar #wp-admin-bar-user-info .username { + color: #686868; } + +/* Pointers */ +.wp-pointer .wp-pointer-content h3 { + background-color: #04a4cc; + border-color: #0490b3; } + +.wp-pointer .wp-pointer-content h3:before { + color: #04a4cc; } + +.wp-pointer.wp-pointer-top .wp-pointer-arrow, .wp-pointer.wp-pointer-undefined .wp-pointer-arrow { + border-bottom-color: #04a4cc; } + +/* Media Uploader */ +.media-item .bar, .media-progress-bar div { + background-color: #04a4cc; } + +.details.attachment { + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 5px #04a4cc; + box-shadow: 0 0 0 1px #fff, 0 0 0 5px #04a4cc; } + +.attachment.details .check { + background-color: #04a4cc; + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 2px #04a4cc; + box-shadow: 0 0 0 1px #fff, 0 0 0 2px #04a4cc; } + +/* Themes */ +.theme-browser .theme.active .theme-name, .theme-browser .theme.add-new-theme:hover:after { + background: #04a4cc; } + +.theme-browser .theme.add-new-theme:hover span:after { + color: #04a4cc; } + +.theme-overlay .theme-header .close:hover, .theme-overlay .theme-header .right:hover, .theme-overlay .theme-header .left:hover { + background: #04a4cc; } + +.theme-section.current, .theme-filter.current { + border-bottom-color: #e5e5e5; } + +body.more-filters-opened .more-filters, body.more-filters-opened .more-filters:before { + color: #333; + background-color: #e5e5e5; } + +body.more-filters-opened .more-filters:hover, body.more-filters-opened .more-filters:focus, body.more-filters-opened .more-filters:hover:before, body.more-filters-opened .more-filters:focus:before { + background-color: #888; + color: #fff; } + +/* Widgets */ +.widgets-chooser li.widgets-chooser-selected { + background-color: #888; + color: #fff; } + +.widgets-chooser li.widgets-chooser-selected:before, .widgets-chooser li.widgets-chooser-selected:focus:before { + color: #fff; } + +/* Customize */ +#customize-theme-controls .widget-area-select .selected { + background-color: #888; + color: #fff; } + +/* jQuery UI Slider */ +.wp-slider .ui-slider-handle, .wp-slider .ui-slider-handle.ui-state-hover, .wp-slider .ui-slider-handle.focus { + background: #04a4cc; + border-color: #037c9a; + -webkit-box-shadow: inset 0 1px 0 #22cffb, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #22cffb, 0 1px 0 rgba(0, 0, 0, 0.15); } + +/* Thickbox: Plugin information */ +#sidemenu a.current { + background: #f5f5f5; + border-bottom-color: #f5f5f5; } + +#plugin-information .action-button { + background: #04a4cc; } + +/* Responsive Component */ +div#wp-responsive-toggle a:before { + color: #999; } + +.wp-responsive-open div#wp-responsive-toggle a { + border-color: transparent; + background: #888; } + +.star-rating .star { + color: #04a4cc; } + +.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a { + background: #fff; } + +/* temporary fix for admin-bar hover color */ +#wpadminbar .ab-top-menu > li:hover > .ab-item, #wpadminbar .ab-top-menu > li.hover > .ab-item, #wpadminbar > #wp-toolbar > #wp-admin-bar-root-default li:hover span.ab-label, #wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary li.hover span.ab-label, #wpadminbar .ab-top-menu > li > .ab-item:focus, #wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus, #wpadminbar-nojs .ab-top-menu > li.menupop:hover > .ab-item, #wpadminbar .ab-top-menu > li.menupop.hover > .ab-item { + color: #333; } + +/* Override the theme filter highlight color for this scheme */ +.theme-section.current, .theme-filter.current { + border-bottom-color: #04a4cc; } diff --git a/wp-admin/css/colors/light/colors.min.css b/wp-admin/css/colors/light/colors.min.css new file mode 100644 index 0000000..daaa6ea --- /dev/null +++ b/wp-admin/css/colors/light/colors.min.css @@ -0,0 +1 @@ +html{background:#f5f5f5}a{color:#0074a2}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,a:active,a:focus,a:hover,div.dashboard-widget-submit input:hover{color:#0099d5}input[type=checkbox]:checked:before{color:#04a4cc}input[type=radio]:checked:before{background:#04a4cc}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0099d5}.wp-core-ui .button-primary{background:#04a4cc;border-color:#037c9a;color:#fff;-webkit-box-shadow:inset 0 1px 0 #22cffb,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #22cffb,0 1px 0 rgba(0,0,0,.15)}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#0490b3;border-color:#036881;color:#fff;-webkit-box-shadow:inset 0 1px 0 #09cafa,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #09cafa,0 1px 0 rgba(0,0,0,.15)}.wp-core-ui .button-primary:active{background:#037c9a;border-color:#036881;color:#fff;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#c7cfd1!important;background:#0384a4!important;border-color:#036881!important;text-shadow:none!important}.wp-core-ui .wp-ui-primary{color:#333;background-color:#e5e5e5}.wp-core-ui .wp-ui-text-primary{color:#e5e5e5}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#888}.wp-core-ui .wp-ui-text-highlight{color:#888}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#d64e07}.wp-core-ui .wp-ui-text-notification{color:#d64e07}.wp-core-ui .wp-ui-text-icon{color:#999}#add-new-comment a:hover,.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover{color:#333;background-color:#e5e5e5}.view-switch a.current:before{color:#e5e5e5}.view-switch a:hover:before{color:#d64e07}.post-com-count:hover:after{border-top-color:#e5e5e5}.post-com-count:hover span{color:#333;background-color:#e5e5e5}strong .post-com-count:after{border-top-color:#d64e07}strong .post-com-count span{background-color:#d64e07}#adminmenu,#adminmenuback,#adminmenuwrap{background:#e5e5e5}#adminmenu a{color:#333}#adminmenu div.wp-menu-image:before{color:#999}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#888}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#ccc}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f5f5f5;border-bottom-color:#f5f5f5}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#fff}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-right-color:#fff}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu .wp-submenu-head,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#686868}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#04a4cc}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#333}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#04a4cc}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-right-color:#f5f5f5}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#888}#adminmenu li.wp-has-current-submenu div.wp-menu-image:before{color:#ccc}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#d64e07}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#333;background:#fff}#collapse-menu{color:#777}#collapse-menu:hover{color:#333}#collapse-button div:after{color:#999}#collapse-menu:hover #collapse-button div:after{color:#555}#wpadminbar{color:#333;background:#e5e5e5}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#333}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#999}#wpadminbar .ab-top-menu>li.hover>.ab-item,#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar .ab-top-menu>li:hover>.ab-item,#wpadminbar .ab-top-menu>li>.ab-item:focus,#wpadminbar-nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus{background:#fff}#wpadminbar>#wp-toolbar a:focus span.ab-label,#wpadminbar>#wp-toolbar li.hover span.ab-label,#wpadminbar>#wp-toolbar li:hover span.ab-label{color:#04a4cc}#wpadminbar .menupop .ab-sub-wrapper{background:#fff}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#f6f7f7}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar-nojs .quicklinks .menupop:hover ul li a{color:#686868}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#999}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:after,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:after,#wpadminbar li:hover .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover{color:#04a4cc}#wpadminbar #adminbarsearch:before{color:#999}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#333;background:#f7f7f7}#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder{color:#333;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder{color:#333;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder{color:#333;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder{color:#333;opacity:.7}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#f7f7f7;background-color:#f7f7f7}#wpadminbar #wp-admin-bar-user-info .display-name{color:#333}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#04a4cc}#wpadminbar #wp-admin-bar-user-info .username{color:#686868}.wp-pointer .wp-pointer-content h3{background-color:#04a4cc;border-color:#0490b3}.wp-pointer .wp-pointer-content h3:before{color:#04a4cc}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow{border-bottom-color:#04a4cc}.media-item .bar,.media-progress-bar div{background-color:#04a4cc}.details.attachment{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 5px #04a4cc;box-shadow:0 0 0 1px #fff,0 0 0 5px #04a4cc}.attachment.details .check{background-color:#04a4cc;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #04a4cc;box-shadow:0 0 0 1px #fff,0 0 0 2px #04a4cc}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme:hover:after{background:#04a4cc}.theme-browser .theme.add-new-theme:hover span:after{color:#04a4cc}.theme-overlay .theme-header .close:hover,.theme-overlay .theme-header .left:hover,.theme-overlay .theme-header .right:hover{background:#04a4cc}body.more-filters-opened .more-filters,body.more-filters-opened .more-filters:before{color:#333;background-color:#e5e5e5}.widgets-chooser li.widgets-chooser-selected,body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover,body.more-filters-opened .more-filters:hover:before{background-color:#888;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}#customize-theme-controls .widget-area-select .selected{background-color:#888;color:#fff}.wp-slider .ui-slider-handle,.wp-slider .ui-slider-handle.focus,.wp-slider .ui-slider-handle.ui-state-hover{background:#04a4cc;border-color:#037c9a;-webkit-box-shadow:inset 0 1px 0 #22cffb,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #22cffb,0 1px 0 rgba(0,0,0,.15)}#sidemenu a.current{background:#f5f5f5;border-bottom-color:#f5f5f5}#plugin-information .action-button{background:#04a4cc}div#wp-responsive-toggle a:before{color:#999}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#888}.star-rating .star{color:#04a4cc}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#fff}#wpadminbar .ab-top-menu>li.hover>.ab-item,#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar .ab-top-menu>li:hover>.ab-item,#wpadminbar .ab-top-menu>li>.ab-item:focus,#wpadminbar-nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar>#wp-toolbar>#wp-admin-bar-root-default li:hover span.ab-label,#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary li.hover span.ab-label{color:#333}.theme-filter.current,.theme-section.current{border-bottom-color:#04a4cc} \ No newline at end of file diff --git a/wp-admin/css/colors/light/colors.scss b/wp-admin/css/colors/light/colors.scss new file mode 100644 index 0000000..b12774c --- /dev/null +++ b/wp-admin/css/colors/light/colors.scss @@ -0,0 +1,38 @@ +$base-color: #e5e5e5; +$icon-color: #999; +$text-color: #333; +$highlight-color: #04a4cc; +$notification-color: #d64e07; + +$body-background: #f5f5f5; + +$menu-highlight-text: #fff; +$menu-highlight-icon: #ccc; +$menu-highlight-background: #888; + +$menu-bubble-text: #fff; +$menu-avatar-frame: #aaa; +$menu-submenu-background: #fff; + +$menu-collapse-text: #777; +$menu-collapse-focus-icon: #555; + +@import "../_admin.scss"; + +/* temporary fix for admin-bar hover color */ +#wpadminbar .ab-top-menu > li:hover > .ab-item, +#wpadminbar .ab-top-menu > li.hover > .ab-item, +#wpadminbar > #wp-toolbar > #wp-admin-bar-root-default li:hover span.ab-label, +#wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary li.hover span.ab-label, +#wpadminbar .ab-top-menu > li > .ab-item:focus, +#wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus, +#wpadminbar-nojs .ab-top-menu > li.menupop:hover > .ab-item, +#wpadminbar .ab-top-menu > li.menupop.hover > .ab-item { + color: $text-color; +} + +/* Override the theme filter highlight color for this scheme */ +.theme-section.current, +.theme-filter.current { + border-bottom-color: $highlight-color; +} diff --git a/wp-admin/css/colors/midnight/colors-rtl.css b/wp-admin/css/colors/midnight/colors-rtl.css new file mode 100644 index 0000000..2dc30e5 --- /dev/null +++ b/wp-admin/css/colors/midnight/colors-rtl.css @@ -0,0 +1,331 @@ +/* + * Button mixin- creates 3d-ish button effect with correct + * highlights/shadows, based on a base color. + */ +html { + background: #f1f1f1; } + +/* Links */ +a { + color: #0074a2; } + a:hover, a:active, a:focus { + color: #0099d5; } + +#media-upload a.del-link:hover, div.dashboard-widget-submit input:hover, .subsubsub a:hover, .subsubsub a.current:hover { + color: #0099d5; } + +/* Forms */ +input[type=checkbox]:checked:before { + color: #e14d43; } + +input[type=radio]:checked:before { + background: #e14d43; } + +.wp-core-ui input[type="reset"]:hover, .wp-core-ui input[type="reset"]:active { + color: #0099d5; } + +/* Core UI */ +.wp-core-ui .button-primary { + background: #e14d43; + border-color: #d02a21; + color: white; + -webkit-box-shadow: inset 0 1px 0 #ec8a85, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #ec8a85, 0 1px 0 rgba(0, 0, 0, 0.15); } + .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus { + background: #dd362d; + border-color: #ba251e; + color: white; + -webkit-box-shadow: inset 0 1px 0 #e8756f, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #e8756f, 0 1px 0 rgba(0, 0, 0, 0.15); } + .wp-core-ui .button-primary:active { + background: #d02a21; + border-color: #ba251e; + color: white; + -webkit-box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); + box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); } + .wp-core-ui .button-primary[disabled], .wp-core-ui .button-primary:disabled, .wp-core-ui .button-primary.button-primary-disabled, .wp-core-ui .button-primary.disabled { + color: #d1c7c7 !important; + background: #d92c23 !important; + border-color: #ba251e !important; + text-shadow: none !important; } +.wp-core-ui .wp-ui-primary { + color: #fff; + background-color: #363b3f; } +.wp-core-ui .wp-ui-text-primary { + color: #363b3f; } +.wp-core-ui .wp-ui-highlight { + color: #fff; + background-color: #e14d43; } +.wp-core-ui .wp-ui-text-highlight { + color: #e14d43; } +.wp-core-ui .wp-ui-notification { + color: #fff; + background-color: #69a8bb; } +.wp-core-ui .wp-ui-text-notification { + color: #69a8bb; } +.wp-core-ui .wp-ui-text-icon { + color: #f1f2f3; } + +/* List tables */ +.wrap .add-new-h2:hover, #add-new-comment a:hover, .tablenav .tablenav-pages a:hover, .tablenav .tablenav-pages a:focus { + color: #fff; + background-color: #363b3f; } + +.view-switch a.current:before { + color: #363b3f; } + +.view-switch a:hover:before { + color: #69a8bb; } + +.post-com-count:hover:after { + border-top-color: #363b3f; } + +.post-com-count:hover span { + color: #fff; + background-color: #363b3f; } + +strong .post-com-count:after { + border-top-color: #69a8bb; } + +strong .post-com-count span { + background-color: #69a8bb; } + +/* Admin Menu */ +#adminmenuback, #adminmenuwrap, #adminmenu { + background: #363b3f; } + +#adminmenu a { + color: #fff; } + +#adminmenu div.wp-menu-image:before { + color: #f1f2f3; } + +#adminmenu a:hover, #adminmenu li.menu-top:hover, #adminmenu li.opensub > a.menu-top, #adminmenu li > a.menu-top:focus { + color: #fff; + background-color: #e14d43; } + +#adminmenu li.menu-top:hover div.wp-menu-image:before, #adminmenu li.opensub > a.menu-top div.wp-menu-image:before { + color: #fff; } + +/* Active tabs use a bottom border color that matches the page background color. */ +.about-wrap h2 .nav-tab-active, .nav-tab-active, .nav-tab-active:hover { + background-color: #f1f1f1; + border-bottom-color: #f1f1f1; } + +/* Admin Menu: submenu */ +#adminmenu .wp-submenu, #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu .wp-has-current-submenu.opensub .wp-submenu, .folded #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu { + background: #26292c; } + +#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after { + border-left-color: #26292c; } + +#adminmenu .wp-submenu .wp-submenu-head { + color: #c2c4c5; } + +#adminmenu .wp-submenu a, #adminmenu .wp-has-current-submenu .wp-submenu a, .folded #adminmenu .wp-has-current-submenu .wp-submenu a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a { + color: #c2c4c5; } + #adminmenu .wp-submenu a:focus, #adminmenu .wp-submenu a:hover, #adminmenu .wp-has-current-submenu .wp-submenu a:focus, #adminmenu .wp-has-current-submenu .wp-submenu a:hover, .folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus, .folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a:focus, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a:hover, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover { + color: #e14d43; } + +/* Admin Menu: current */ +#adminmenu .wp-submenu li.current a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a { + color: #fff; } + #adminmenu .wp-submenu li.current a:hover, #adminmenu .wp-submenu li.current a:focus, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a:hover, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a:focus, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus { + color: #e14d43; } + +ul#adminmenu a.wp-has-current-submenu:after, ul#adminmenu > li.current > a.current:after { + border-left-color: #f1f1f1; } + +#adminmenu li.current a.menu-top, #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, #adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head, .folded #adminmenu li.current.menu-top { + color: #fff; + background: #e14d43; } + +#adminmenu li.wp-has-current-submenu div.wp-menu-image:before { + color: #fff; } + +/* Admin Menu: bubble */ +#adminmenu .awaiting-mod, #adminmenu .update-plugins { + color: #fff; + background: #69a8bb; } + +#adminmenu li.current a .awaiting-mod, #adminmenu li a.wp-has-current-submenu .update-plugins, #adminmenu li:hover a .awaiting-mod, #adminmenu li.menu-top:hover > a .update-plugins { + color: #fff; + background: #26292c; } + +/* Admin Menu: collapse button */ +#collapse-menu { + color: #f1f2f3; } + +#collapse-menu:hover { + color: #fff; } + +#collapse-button div:after { + color: #f1f2f3; } + +#collapse-menu:hover #collapse-button div:after { + color: #fff; } + +/* Admin Bar */ +#wpadminbar { + color: #fff; + background: #363b3f; } + +#wpadminbar .ab-item, #wpadminbar a.ab-item, #wpadminbar > #wp-toolbar span.ab-label, #wpadminbar > #wp-toolbar span.noticon { + color: #fff; } + +#wpadminbar .ab-icon, #wpadminbar .ab-icon:before, #wpadminbar .ab-item:before, #wpadminbar .ab-item:after { + color: #f1f2f3; } + +#wpadminbar .ab-top-menu > li:hover > .ab-item, #wpadminbar .ab-top-menu > li.hover > .ab-item, #wpadminbar .ab-top-menu > li > .ab-item:focus, #wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus, #wpadminbar-nojs .ab-top-menu > li.menupop:hover > .ab-item, #wpadminbar .ab-top-menu > li.menupop.hover > .ab-item { + color: #e14d43; + background: #26292c; } + +#wpadminbar > #wp-toolbar li:hover span.ab-label, #wpadminbar > #wp-toolbar li.hover span.ab-label, #wpadminbar > #wp-toolbar a:focus span.ab-label { + color: #e14d43; } + +#wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li:hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { + color: #fff; } + +/* Admin Bar: submenu */ +#wpadminbar .menupop .ab-sub-wrapper { + background: #26292c; } + +#wpadminbar .quicklinks .menupop ul.ab-sub-secondary, #wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu { + background: #4c4c4d; } + +#wpadminbar .ab-submenu .ab-item, #wpadminbar .quicklinks .menupop ul li a, #wpadminbar .quicklinks .menupop.hover ul li a, #wpadminbar-nojs .quicklinks .menupop:hover ul li a { + color: #c2c4c5; } + +#wpadminbar .quicklinks li .blavatar, #wpadminbar .menupop .menupop > .ab-item:before { + color: #f1f2f3; } + +#wpadminbar .quicklinks .menupop ul li a:hover, #wpadminbar .quicklinks .menupop ul li a:focus, #wpadminbar .quicklinks .menupop ul li a:hover strong, #wpadminbar .quicklinks .menupop ul li a:focus strong, #wpadminbar .quicklinks .menupop.hover ul li a:hover, #wpadminbar .quicklinks .menupop.hover ul li a:focus, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus, #wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li a:focus .ab-icon:before, #wpadminbar li .ab-item:focus:before, #wpadminbar li.hover .ab-icon:before, #wpadminbar li.hover .ab-item:before, #wpadminbar li:hover .ab-item:after, #wpadminbar li.hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { + color: #e14d43; } + +#wpadminbar .quicklinks li a:hover .blavatar, #wpadminbar .menupop .menupop > .ab-item:hover:before { + color: #e14d43; } + +/* Admin Bar: search */ +#wpadminbar #adminbarsearch:before { + color: #f1f2f3; } + +#wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input:focus { + color: #fff; + background: #464d52; } + +#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder { + color: #fff; + opacity: 0.7; } + +/* Admin Bar: my account */ +#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img { + border-color: #464d52; + background-color: #464d52; } + +#wpadminbar #wp-admin-bar-user-info .display-name { + color: #fff; } + +#wpadminbar #wp-admin-bar-user-info a:hover .display-name { + color: #e14d43; } + +#wpadminbar #wp-admin-bar-user-info .username { + color: #c2c4c5; } + +/* Pointers */ +.wp-pointer .wp-pointer-content h3 { + background-color: #e14d43; + border-color: #dd362d; } + +.wp-pointer .wp-pointer-content h3:before { + color: #e14d43; } + +.wp-pointer.wp-pointer-top .wp-pointer-arrow, .wp-pointer.wp-pointer-undefined .wp-pointer-arrow { + border-bottom-color: #e14d43; } + +/* Media Uploader */ +.media-item .bar, .media-progress-bar div { + background-color: #e14d43; } + +.details.attachment { + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 5px #e14d43; + box-shadow: 0 0 0 1px #fff, 0 0 0 5px #e14d43; } + +.attachment.details .check { + background-color: #e14d43; + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 2px #e14d43; + box-shadow: 0 0 0 1px #fff, 0 0 0 2px #e14d43; } + +/* Themes */ +.theme-browser .theme.active .theme-name, .theme-browser .theme.add-new-theme:hover:after { + background: #e14d43; } + +.theme-browser .theme.add-new-theme:hover span:after { + color: #e14d43; } + +.theme-overlay .theme-header .close:hover, .theme-overlay .theme-header .right:hover, .theme-overlay .theme-header .left:hover { + background: #e14d43; } + +.theme-section.current, .theme-filter.current { + border-bottom-color: #363b3f; } + +body.more-filters-opened .more-filters, body.more-filters-opened .more-filters:before { + color: #fff; + background-color: #363b3f; } + +body.more-filters-opened .more-filters:hover, body.more-filters-opened .more-filters:focus, body.more-filters-opened .more-filters:hover:before, body.more-filters-opened .more-filters:focus:before { + background-color: #e14d43; + color: #fff; } + +/* Widgets */ +.widgets-chooser li.widgets-chooser-selected { + background-color: #e14d43; + color: #fff; } + +.widgets-chooser li.widgets-chooser-selected:before, .widgets-chooser li.widgets-chooser-selected:focus:before { + color: #fff; } + +/* Customize */ +#customize-theme-controls .widget-area-select .selected { + background-color: #e14d43; + color: #fff; } + +/* jQuery UI Slider */ +.wp-slider .ui-slider-handle, .wp-slider .ui-slider-handle.ui-state-hover, .wp-slider .ui-slider-handle.focus { + background: #e14d43; + border-color: #d02a21; + -webkit-box-shadow: inset 0 1px 0 #ec8a85, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #ec8a85, 0 1px 0 rgba(0, 0, 0, 0.15); } + +/* Thickbox: Plugin information */ +#sidemenu a.current { + background: #f1f1f1; + border-bottom-color: #f1f1f1; } + +#plugin-information .action-button { + background: #e14d43; } + +/* Responsive Component */ +div#wp-responsive-toggle a:before { + color: #f1f2f3; } + +.wp-responsive-open div#wp-responsive-toggle a { + border-color: transparent; + background: #e14d43; } + +.star-rating .star { + color: #e14d43; } + +.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a { + background: #26292c; } diff --git a/wp-admin/css/colors/midnight/colors-rtl.min.css b/wp-admin/css/colors/midnight/colors-rtl.min.css new file mode 100644 index 0000000..930461b --- /dev/null +++ b/wp-admin/css/colors/midnight/colors-rtl.min.css @@ -0,0 +1 @@ +html{background:#f1f1f1}a{color:#0074a2}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,a:active,a:focus,a:hover,div.dashboard-widget-submit input:hover{color:#0099d5}input[type=checkbox]:checked:before{color:#e14d43}input[type=radio]:checked:before{background:#e14d43}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0099d5}.wp-core-ui .button-primary{background:#e14d43;border-color:#d02a21;color:#fff;-webkit-box-shadow:inset 0 1px 0 #ec8a85,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #ec8a85,0 1px 0 rgba(0,0,0,.15)}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#dd362d;border-color:#ba251e;color:#fff;-webkit-box-shadow:inset 0 1px 0 #e8756f,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #e8756f,0 1px 0 rgba(0,0,0,.15)}.wp-core-ui .button-primary:active{background:#d02a21;border-color:#ba251e;color:#fff;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#d1c7c7!important;background:#d92c23!important;border-color:#ba251e!important;text-shadow:none!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#363b3f}.wp-core-ui .wp-ui-text-primary{color:#363b3f}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#e14d43}.wp-core-ui .wp-ui-text-highlight{color:#e14d43}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#69a8bb}.wp-core-ui .wp-ui-text-notification{color:#69a8bb}.wp-core-ui .wp-ui-text-icon{color:#f1f2f3}#add-new-comment a:hover,.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover{color:#fff;background-color:#363b3f}.view-switch a.current:before{color:#363b3f}.view-switch a:hover:before{color:#69a8bb}.post-com-count:hover:after{border-top-color:#363b3f}.post-com-count:hover span{color:#fff;background-color:#363b3f}strong .post-com-count:after{border-top-color:#69a8bb}strong .post-com-count span{background-color:#69a8bb}#adminmenu,#adminmenuback,#adminmenuwrap{background:#363b3f}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f1f2f3}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#e14d43}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#26292c}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-left-color:#26292c}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu .wp-submenu-head,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#c2c4c5}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#e14d43}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#e14d43}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-left-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#e14d43}#adminmenu li.wp-has-current-submenu div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#69a8bb}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#26292c}#collapse-menu{color:#f1f2f3}#collapse-menu:hover{color:#fff}#collapse-button div:after{color:#f1f2f3}#collapse-menu:hover #collapse-button div:after{color:#fff}#wpadminbar{color:#fff;background:#363b3f}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f1f2f3}#wpadminbar .ab-top-menu>li.hover>.ab-item,#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar .ab-top-menu>li:hover>.ab-item,#wpadminbar .ab-top-menu>li>.ab-item:focus,#wpadminbar-nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus{color:#e14d43;background:#26292c}#wpadminbar>#wp-toolbar a:focus span.ab-label,#wpadminbar>#wp-toolbar li.hover span.ab-label,#wpadminbar>#wp-toolbar li:hover span.ab-label{color:#e14d43}#wpadminbar .menupop .ab-sub-wrapper{background:#26292c}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#4c4c4d}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar-nojs .quicklinks .menupop:hover ul li a{color:#c2c4c5}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f1f2f3}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:after,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:after,#wpadminbar li:hover .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover{color:#e14d43}#wpadminbar #adminbarsearch:before{color:#f1f2f3}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#464d52}#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder{color:#fff;opacity:.7}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#464d52;background-color:#464d52}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#e14d43}#wpadminbar #wp-admin-bar-user-info .username{color:#c2c4c5}.wp-pointer .wp-pointer-content h3{background-color:#e14d43;border-color:#dd362d}.wp-pointer .wp-pointer-content h3:before{color:#e14d43}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow{border-bottom-color:#e14d43}.media-item .bar,.media-progress-bar div{background-color:#e14d43}.details.attachment{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 5px #e14d43;box-shadow:0 0 0 1px #fff,0 0 0 5px #e14d43}.attachment.details .check{background-color:#e14d43;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #e14d43;box-shadow:0 0 0 1px #fff,0 0 0 2px #e14d43}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme:hover:after{background:#e14d43}.theme-browser .theme.add-new-theme:hover span:after{color:#e14d43}.theme-overlay .theme-header .close:hover,.theme-overlay .theme-header .left:hover,.theme-overlay .theme-header .right:hover{background:#e14d43}.theme-filter.current,.theme-section.current{border-bottom-color:#363b3f}body.more-filters-opened .more-filters,body.more-filters-opened .more-filters:before{color:#fff;background-color:#363b3f}.widgets-chooser li.widgets-chooser-selected,body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover,body.more-filters-opened .more-filters:hover:before{background-color:#e14d43;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}#customize-theme-controls .widget-area-select .selected{background-color:#e14d43;color:#fff}.wp-slider .ui-slider-handle,.wp-slider .ui-slider-handle.focus,.wp-slider .ui-slider-handle.ui-state-hover{background:#e14d43;border-color:#d02a21;-webkit-box-shadow:inset 0 1px 0 #ec8a85,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #ec8a85,0 1px 0 rgba(0,0,0,.15)}#sidemenu a.current{background:#f1f1f1;border-bottom-color:#f1f1f1}#plugin-information .action-button{background:#e14d43}div#wp-responsive-toggle a:before{color:#f1f2f3}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#e14d43}.star-rating .star{color:#e14d43}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#26292c} \ No newline at end of file diff --git a/wp-admin/css/colors/midnight/colors.css b/wp-admin/css/colors/midnight/colors.css new file mode 100644 index 0000000..b1a11fe --- /dev/null +++ b/wp-admin/css/colors/midnight/colors.css @@ -0,0 +1,331 @@ +/* + * Button mixin- creates 3d-ish button effect with correct + * highlights/shadows, based on a base color. + */ +html { + background: #f1f1f1; } + +/* Links */ +a { + color: #0074a2; } + a:hover, a:active, a:focus { + color: #0099d5; } + +#media-upload a.del-link:hover, div.dashboard-widget-submit input:hover, .subsubsub a:hover, .subsubsub a.current:hover { + color: #0099d5; } + +/* Forms */ +input[type=checkbox]:checked:before { + color: #e14d43; } + +input[type=radio]:checked:before { + background: #e14d43; } + +.wp-core-ui input[type="reset"]:hover, .wp-core-ui input[type="reset"]:active { + color: #0099d5; } + +/* Core UI */ +.wp-core-ui .button-primary { + background: #e14d43; + border-color: #d02a21; + color: white; + -webkit-box-shadow: inset 0 1px 0 #ec8a85, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #ec8a85, 0 1px 0 rgba(0, 0, 0, 0.15); } + .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus { + background: #dd362d; + border-color: #ba251e; + color: white; + -webkit-box-shadow: inset 0 1px 0 #e8756f, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #e8756f, 0 1px 0 rgba(0, 0, 0, 0.15); } + .wp-core-ui .button-primary:active { + background: #d02a21; + border-color: #ba251e; + color: white; + -webkit-box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); + box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); } + .wp-core-ui .button-primary[disabled], .wp-core-ui .button-primary:disabled, .wp-core-ui .button-primary.button-primary-disabled, .wp-core-ui .button-primary.disabled { + color: #d1c7c7 !important; + background: #d92c23 !important; + border-color: #ba251e !important; + text-shadow: none !important; } +.wp-core-ui .wp-ui-primary { + color: #fff; + background-color: #363b3f; } +.wp-core-ui .wp-ui-text-primary { + color: #363b3f; } +.wp-core-ui .wp-ui-highlight { + color: #fff; + background-color: #e14d43; } +.wp-core-ui .wp-ui-text-highlight { + color: #e14d43; } +.wp-core-ui .wp-ui-notification { + color: #fff; + background-color: #69a8bb; } +.wp-core-ui .wp-ui-text-notification { + color: #69a8bb; } +.wp-core-ui .wp-ui-text-icon { + color: #f1f2f3; } + +/* List tables */ +.wrap .add-new-h2:hover, #add-new-comment a:hover, .tablenav .tablenav-pages a:hover, .tablenav .tablenav-pages a:focus { + color: #fff; + background-color: #363b3f; } + +.view-switch a.current:before { + color: #363b3f; } + +.view-switch a:hover:before { + color: #69a8bb; } + +.post-com-count:hover:after { + border-top-color: #363b3f; } + +.post-com-count:hover span { + color: #fff; + background-color: #363b3f; } + +strong .post-com-count:after { + border-top-color: #69a8bb; } + +strong .post-com-count span { + background-color: #69a8bb; } + +/* Admin Menu */ +#adminmenuback, #adminmenuwrap, #adminmenu { + background: #363b3f; } + +#adminmenu a { + color: #fff; } + +#adminmenu div.wp-menu-image:before { + color: #f1f2f3; } + +#adminmenu a:hover, #adminmenu li.menu-top:hover, #adminmenu li.opensub > a.menu-top, #adminmenu li > a.menu-top:focus { + color: #fff; + background-color: #e14d43; } + +#adminmenu li.menu-top:hover div.wp-menu-image:before, #adminmenu li.opensub > a.menu-top div.wp-menu-image:before { + color: #fff; } + +/* Active tabs use a bottom border color that matches the page background color. */ +.about-wrap h2 .nav-tab-active, .nav-tab-active, .nav-tab-active:hover { + background-color: #f1f1f1; + border-bottom-color: #f1f1f1; } + +/* Admin Menu: submenu */ +#adminmenu .wp-submenu, #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu .wp-has-current-submenu.opensub .wp-submenu, .folded #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu { + background: #26292c; } + +#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after { + border-right-color: #26292c; } + +#adminmenu .wp-submenu .wp-submenu-head { + color: #c2c4c5; } + +#adminmenu .wp-submenu a, #adminmenu .wp-has-current-submenu .wp-submenu a, .folded #adminmenu .wp-has-current-submenu .wp-submenu a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a { + color: #c2c4c5; } + #adminmenu .wp-submenu a:focus, #adminmenu .wp-submenu a:hover, #adminmenu .wp-has-current-submenu .wp-submenu a:focus, #adminmenu .wp-has-current-submenu .wp-submenu a:hover, .folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus, .folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a:focus, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a:hover, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover { + color: #e14d43; } + +/* Admin Menu: current */ +#adminmenu .wp-submenu li.current a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a { + color: #fff; } + #adminmenu .wp-submenu li.current a:hover, #adminmenu .wp-submenu li.current a:focus, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a:hover, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a:focus, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus { + color: #e14d43; } + +ul#adminmenu a.wp-has-current-submenu:after, ul#adminmenu > li.current > a.current:after { + border-right-color: #f1f1f1; } + +#adminmenu li.current a.menu-top, #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, #adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head, .folded #adminmenu li.current.menu-top { + color: #fff; + background: #e14d43; } + +#adminmenu li.wp-has-current-submenu div.wp-menu-image:before { + color: #fff; } + +/* Admin Menu: bubble */ +#adminmenu .awaiting-mod, #adminmenu .update-plugins { + color: #fff; + background: #69a8bb; } + +#adminmenu li.current a .awaiting-mod, #adminmenu li a.wp-has-current-submenu .update-plugins, #adminmenu li:hover a .awaiting-mod, #adminmenu li.menu-top:hover > a .update-plugins { + color: #fff; + background: #26292c; } + +/* Admin Menu: collapse button */ +#collapse-menu { + color: #f1f2f3; } + +#collapse-menu:hover { + color: #fff; } + +#collapse-button div:after { + color: #f1f2f3; } + +#collapse-menu:hover #collapse-button div:after { + color: #fff; } + +/* Admin Bar */ +#wpadminbar { + color: #fff; + background: #363b3f; } + +#wpadminbar .ab-item, #wpadminbar a.ab-item, #wpadminbar > #wp-toolbar span.ab-label, #wpadminbar > #wp-toolbar span.noticon { + color: #fff; } + +#wpadminbar .ab-icon, #wpadminbar .ab-icon:before, #wpadminbar .ab-item:before, #wpadminbar .ab-item:after { + color: #f1f2f3; } + +#wpadminbar .ab-top-menu > li:hover > .ab-item, #wpadminbar .ab-top-menu > li.hover > .ab-item, #wpadminbar .ab-top-menu > li > .ab-item:focus, #wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus, #wpadminbar-nojs .ab-top-menu > li.menupop:hover > .ab-item, #wpadminbar .ab-top-menu > li.menupop.hover > .ab-item { + color: #e14d43; + background: #26292c; } + +#wpadminbar > #wp-toolbar li:hover span.ab-label, #wpadminbar > #wp-toolbar li.hover span.ab-label, #wpadminbar > #wp-toolbar a:focus span.ab-label { + color: #e14d43; } + +#wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li:hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { + color: #fff; } + +/* Admin Bar: submenu */ +#wpadminbar .menupop .ab-sub-wrapper { + background: #26292c; } + +#wpadminbar .quicklinks .menupop ul.ab-sub-secondary, #wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu { + background: #4c4c4d; } + +#wpadminbar .ab-submenu .ab-item, #wpadminbar .quicklinks .menupop ul li a, #wpadminbar .quicklinks .menupop.hover ul li a, #wpadminbar-nojs .quicklinks .menupop:hover ul li a { + color: #c2c4c5; } + +#wpadminbar .quicklinks li .blavatar, #wpadminbar .menupop .menupop > .ab-item:before { + color: #f1f2f3; } + +#wpadminbar .quicklinks .menupop ul li a:hover, #wpadminbar .quicklinks .menupop ul li a:focus, #wpadminbar .quicklinks .menupop ul li a:hover strong, #wpadminbar .quicklinks .menupop ul li a:focus strong, #wpadminbar .quicklinks .menupop.hover ul li a:hover, #wpadminbar .quicklinks .menupop.hover ul li a:focus, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus, #wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li a:focus .ab-icon:before, #wpadminbar li .ab-item:focus:before, #wpadminbar li.hover .ab-icon:before, #wpadminbar li.hover .ab-item:before, #wpadminbar li:hover .ab-item:after, #wpadminbar li.hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { + color: #e14d43; } + +#wpadminbar .quicklinks li a:hover .blavatar, #wpadminbar .menupop .menupop > .ab-item:hover:before { + color: #e14d43; } + +/* Admin Bar: search */ +#wpadminbar #adminbarsearch:before { + color: #f1f2f3; } + +#wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input:focus { + color: #fff; + background: #464d52; } + +#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder { + color: #fff; + opacity: 0.7; } + +/* Admin Bar: my account */ +#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img { + border-color: #464d52; + background-color: #464d52; } + +#wpadminbar #wp-admin-bar-user-info .display-name { + color: #fff; } + +#wpadminbar #wp-admin-bar-user-info a:hover .display-name { + color: #e14d43; } + +#wpadminbar #wp-admin-bar-user-info .username { + color: #c2c4c5; } + +/* Pointers */ +.wp-pointer .wp-pointer-content h3 { + background-color: #e14d43; + border-color: #dd362d; } + +.wp-pointer .wp-pointer-content h3:before { + color: #e14d43; } + +.wp-pointer.wp-pointer-top .wp-pointer-arrow, .wp-pointer.wp-pointer-undefined .wp-pointer-arrow { + border-bottom-color: #e14d43; } + +/* Media Uploader */ +.media-item .bar, .media-progress-bar div { + background-color: #e14d43; } + +.details.attachment { + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 5px #e14d43; + box-shadow: 0 0 0 1px #fff, 0 0 0 5px #e14d43; } + +.attachment.details .check { + background-color: #e14d43; + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 2px #e14d43; + box-shadow: 0 0 0 1px #fff, 0 0 0 2px #e14d43; } + +/* Themes */ +.theme-browser .theme.active .theme-name, .theme-browser .theme.add-new-theme:hover:after { + background: #e14d43; } + +.theme-browser .theme.add-new-theme:hover span:after { + color: #e14d43; } + +.theme-overlay .theme-header .close:hover, .theme-overlay .theme-header .right:hover, .theme-overlay .theme-header .left:hover { + background: #e14d43; } + +.theme-section.current, .theme-filter.current { + border-bottom-color: #363b3f; } + +body.more-filters-opened .more-filters, body.more-filters-opened .more-filters:before { + color: #fff; + background-color: #363b3f; } + +body.more-filters-opened .more-filters:hover, body.more-filters-opened .more-filters:focus, body.more-filters-opened .more-filters:hover:before, body.more-filters-opened .more-filters:focus:before { + background-color: #e14d43; + color: #fff; } + +/* Widgets */ +.widgets-chooser li.widgets-chooser-selected { + background-color: #e14d43; + color: #fff; } + +.widgets-chooser li.widgets-chooser-selected:before, .widgets-chooser li.widgets-chooser-selected:focus:before { + color: #fff; } + +/* Customize */ +#customize-theme-controls .widget-area-select .selected { + background-color: #e14d43; + color: #fff; } + +/* jQuery UI Slider */ +.wp-slider .ui-slider-handle, .wp-slider .ui-slider-handle.ui-state-hover, .wp-slider .ui-slider-handle.focus { + background: #e14d43; + border-color: #d02a21; + -webkit-box-shadow: inset 0 1px 0 #ec8a85, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #ec8a85, 0 1px 0 rgba(0, 0, 0, 0.15); } + +/* Thickbox: Plugin information */ +#sidemenu a.current { + background: #f1f1f1; + border-bottom-color: #f1f1f1; } + +#plugin-information .action-button { + background: #e14d43; } + +/* Responsive Component */ +div#wp-responsive-toggle a:before { + color: #f1f2f3; } + +.wp-responsive-open div#wp-responsive-toggle a { + border-color: transparent; + background: #e14d43; } + +.star-rating .star { + color: #e14d43; } + +.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a { + background: #26292c; } diff --git a/wp-admin/css/colors/midnight/colors.min.css b/wp-admin/css/colors/midnight/colors.min.css new file mode 100644 index 0000000..e4f464f --- /dev/null +++ b/wp-admin/css/colors/midnight/colors.min.css @@ -0,0 +1 @@ +html{background:#f1f1f1}a{color:#0074a2}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,a:active,a:focus,a:hover,div.dashboard-widget-submit input:hover{color:#0099d5}input[type=checkbox]:checked:before{color:#e14d43}input[type=radio]:checked:before{background:#e14d43}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0099d5}.wp-core-ui .button-primary{background:#e14d43;border-color:#d02a21;color:#fff;-webkit-box-shadow:inset 0 1px 0 #ec8a85,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #ec8a85,0 1px 0 rgba(0,0,0,.15)}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#dd362d;border-color:#ba251e;color:#fff;-webkit-box-shadow:inset 0 1px 0 #e8756f,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #e8756f,0 1px 0 rgba(0,0,0,.15)}.wp-core-ui .button-primary:active{background:#d02a21;border-color:#ba251e;color:#fff;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#d1c7c7!important;background:#d92c23!important;border-color:#ba251e!important;text-shadow:none!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#363b3f}.wp-core-ui .wp-ui-text-primary{color:#363b3f}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#e14d43}.wp-core-ui .wp-ui-text-highlight{color:#e14d43}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#69a8bb}.wp-core-ui .wp-ui-text-notification{color:#69a8bb}.wp-core-ui .wp-ui-text-icon{color:#f1f2f3}#add-new-comment a:hover,.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover{color:#fff;background-color:#363b3f}.view-switch a.current:before{color:#363b3f}.view-switch a:hover:before{color:#69a8bb}.post-com-count:hover:after{border-top-color:#363b3f}.post-com-count:hover span{color:#fff;background-color:#363b3f}strong .post-com-count:after{border-top-color:#69a8bb}strong .post-com-count span{background-color:#69a8bb}#adminmenu,#adminmenuback,#adminmenuwrap{background:#363b3f}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f1f2f3}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#e14d43}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#26292c}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-right-color:#26292c}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu .wp-submenu-head,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#c2c4c5}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#e14d43}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#e14d43}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-right-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#e14d43}#adminmenu li.wp-has-current-submenu div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#69a8bb}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#26292c}#collapse-menu{color:#f1f2f3}#collapse-menu:hover{color:#fff}#collapse-button div:after{color:#f1f2f3}#collapse-menu:hover #collapse-button div:after{color:#fff}#wpadminbar{color:#fff;background:#363b3f}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f1f2f3}#wpadminbar .ab-top-menu>li.hover>.ab-item,#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar .ab-top-menu>li:hover>.ab-item,#wpadminbar .ab-top-menu>li>.ab-item:focus,#wpadminbar-nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus{color:#e14d43;background:#26292c}#wpadminbar>#wp-toolbar a:focus span.ab-label,#wpadminbar>#wp-toolbar li.hover span.ab-label,#wpadminbar>#wp-toolbar li:hover span.ab-label{color:#e14d43}#wpadminbar .menupop .ab-sub-wrapper{background:#26292c}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#4c4c4d}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar-nojs .quicklinks .menupop:hover ul li a{color:#c2c4c5}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f1f2f3}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:after,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:after,#wpadminbar li:hover .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover{color:#e14d43}#wpadminbar #adminbarsearch:before{color:#f1f2f3}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#464d52}#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder{color:#fff;opacity:.7}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#464d52;background-color:#464d52}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#e14d43}#wpadminbar #wp-admin-bar-user-info .username{color:#c2c4c5}.wp-pointer .wp-pointer-content h3{background-color:#e14d43;border-color:#dd362d}.wp-pointer .wp-pointer-content h3:before{color:#e14d43}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow{border-bottom-color:#e14d43}.media-item .bar,.media-progress-bar div{background-color:#e14d43}.details.attachment{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 5px #e14d43;box-shadow:0 0 0 1px #fff,0 0 0 5px #e14d43}.attachment.details .check{background-color:#e14d43;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #e14d43;box-shadow:0 0 0 1px #fff,0 0 0 2px #e14d43}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme:hover:after{background:#e14d43}.theme-browser .theme.add-new-theme:hover span:after{color:#e14d43}.theme-overlay .theme-header .close:hover,.theme-overlay .theme-header .left:hover,.theme-overlay .theme-header .right:hover{background:#e14d43}.theme-filter.current,.theme-section.current{border-bottom-color:#363b3f}body.more-filters-opened .more-filters,body.more-filters-opened .more-filters:before{color:#fff;background-color:#363b3f}.widgets-chooser li.widgets-chooser-selected,body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover,body.more-filters-opened .more-filters:hover:before{background-color:#e14d43;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}#customize-theme-controls .widget-area-select .selected{background-color:#e14d43;color:#fff}.wp-slider .ui-slider-handle,.wp-slider .ui-slider-handle.focus,.wp-slider .ui-slider-handle.ui-state-hover{background:#e14d43;border-color:#d02a21;-webkit-box-shadow:inset 0 1px 0 #ec8a85,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #ec8a85,0 1px 0 rgba(0,0,0,.15)}#sidemenu a.current{background:#f1f1f1;border-bottom-color:#f1f1f1}#plugin-information .action-button{background:#e14d43}div#wp-responsive-toggle a:before{color:#f1f2f3}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#e14d43}.star-rating .star{color:#e14d43}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#26292c} \ No newline at end of file diff --git a/wp-admin/css/colors/midnight/colors.scss b/wp-admin/css/colors/midnight/colors.scss new file mode 100644 index 0000000..591232b --- /dev/null +++ b/wp-admin/css/colors/midnight/colors.scss @@ -0,0 +1,5 @@ +$base-color: #363b3f; +$highlight-color: #e14d43; +$notification-color: #69a8bb; + +@import "../_admin.scss"; diff --git a/wp-admin/css/colors/ocean/colors-rtl.css b/wp-admin/css/colors/ocean/colors-rtl.css new file mode 100644 index 0000000..665efad --- /dev/null +++ b/wp-admin/css/colors/ocean/colors-rtl.css @@ -0,0 +1,331 @@ +/* + * Button mixin- creates 3d-ish button effect with correct + * highlights/shadows, based on a base color. + */ +html { + background: #f1f1f1; } + +/* Links */ +a { + color: #0074a2; } + a:hover, a:active, a:focus { + color: #0099d5; } + +#media-upload a.del-link:hover, div.dashboard-widget-submit input:hover, .subsubsub a:hover, .subsubsub a.current:hover { + color: #0099d5; } + +/* Forms */ +input[type=checkbox]:checked:before { + color: #738e96; } + +input[type=radio]:checked:before { + background: #738e96; } + +.wp-core-ui input[type="reset"]:hover, .wp-core-ui input[type="reset"]:active { + color: #0099d5; } + +/* Core UI */ +.wp-core-ui .button-primary { + background: #9ebaa0; + border-color: #80a583; + color: white; + -webkit-box-shadow: inset 0 1px 0 #cbdacc, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #cbdacc, 0 1px 0 rgba(0, 0, 0, 0.15); } + .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus { + background: #8faf91; + border-color: #719a74; + color: white; + -webkit-box-shadow: inset 0 1px 0 #bccfbd, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #bccfbd, 0 1px 0 rgba(0, 0, 0, 0.15); } + .wp-core-ui .button-primary:active { + background: #80a583; + border-color: #719a74; + color: white; + -webkit-box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); + box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); } + .wp-core-ui .button-primary[disabled], .wp-core-ui .button-primary:disabled, .wp-core-ui .button-primary.button-primary-disabled, .wp-core-ui .button-primary.disabled { + color: #c7d1c8 !important; + background: #86a988 !important; + border-color: #719a74 !important; + text-shadow: none !important; } +.wp-core-ui .wp-ui-primary { + color: #fff; + background-color: #738e96; } +.wp-core-ui .wp-ui-text-primary { + color: #738e96; } +.wp-core-ui .wp-ui-highlight { + color: #fff; + background-color: #9ebaa0; } +.wp-core-ui .wp-ui-text-highlight { + color: #9ebaa0; } +.wp-core-ui .wp-ui-notification { + color: #fff; + background-color: #aa9d88; } +.wp-core-ui .wp-ui-text-notification { + color: #aa9d88; } +.wp-core-ui .wp-ui-text-icon { + color: #f2fcff; } + +/* List tables */ +.wrap .add-new-h2:hover, #add-new-comment a:hover, .tablenav .tablenav-pages a:hover, .tablenav .tablenav-pages a:focus { + color: #fff; + background-color: #738e96; } + +.view-switch a.current:before { + color: #738e96; } + +.view-switch a:hover:before { + color: #aa9d88; } + +.post-com-count:hover:after { + border-top-color: #738e96; } + +.post-com-count:hover span { + color: #fff; + background-color: #738e96; } + +strong .post-com-count:after { + border-top-color: #aa9d88; } + +strong .post-com-count span { + background-color: #aa9d88; } + +/* Admin Menu */ +#adminmenuback, #adminmenuwrap, #adminmenu { + background: #738e96; } + +#adminmenu a { + color: #fff; } + +#adminmenu div.wp-menu-image:before { + color: #f2fcff; } + +#adminmenu a:hover, #adminmenu li.menu-top:hover, #adminmenu li.opensub > a.menu-top, #adminmenu li > a.menu-top:focus { + color: #fff; + background-color: #9ebaa0; } + +#adminmenu li.menu-top:hover div.wp-menu-image:before, #adminmenu li.opensub > a.menu-top div.wp-menu-image:before { + color: #fff; } + +/* Active tabs use a bottom border color that matches the page background color. */ +.about-wrap h2 .nav-tab-active, .nav-tab-active, .nav-tab-active:hover { + background-color: #f1f1f1; + border-bottom-color: #f1f1f1; } + +/* Admin Menu: submenu */ +#adminmenu .wp-submenu, #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu .wp-has-current-submenu.opensub .wp-submenu, .folded #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu { + background: #627c83; } + +#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after { + border-left-color: #627c83; } + +#adminmenu .wp-submenu .wp-submenu-head { + color: #d5dddf; } + +#adminmenu .wp-submenu a, #adminmenu .wp-has-current-submenu .wp-submenu a, .folded #adminmenu .wp-has-current-submenu .wp-submenu a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a { + color: #d5dddf; } + #adminmenu .wp-submenu a:focus, #adminmenu .wp-submenu a:hover, #adminmenu .wp-has-current-submenu .wp-submenu a:focus, #adminmenu .wp-has-current-submenu .wp-submenu a:hover, .folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus, .folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a:focus, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a:hover, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover { + color: #9ebaa0; } + +/* Admin Menu: current */ +#adminmenu .wp-submenu li.current a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a { + color: #fff; } + #adminmenu .wp-submenu li.current a:hover, #adminmenu .wp-submenu li.current a:focus, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a:hover, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a:focus, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus { + color: #9ebaa0; } + +ul#adminmenu a.wp-has-current-submenu:after, ul#adminmenu > li.current > a.current:after { + border-left-color: #f1f1f1; } + +#adminmenu li.current a.menu-top, #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, #adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head, .folded #adminmenu li.current.menu-top { + color: #fff; + background: #9ebaa0; } + +#adminmenu li.wp-has-current-submenu div.wp-menu-image:before { + color: #fff; } + +/* Admin Menu: bubble */ +#adminmenu .awaiting-mod, #adminmenu .update-plugins { + color: #fff; + background: #aa9d88; } + +#adminmenu li.current a .awaiting-mod, #adminmenu li a.wp-has-current-submenu .update-plugins, #adminmenu li:hover a .awaiting-mod, #adminmenu li.menu-top:hover > a .update-plugins { + color: #fff; + background: #627c83; } + +/* Admin Menu: collapse button */ +#collapse-menu { + color: #f2fcff; } + +#collapse-menu:hover { + color: #fff; } + +#collapse-button div:after { + color: #f2fcff; } + +#collapse-menu:hover #collapse-button div:after { + color: #fff; } + +/* Admin Bar */ +#wpadminbar { + color: #fff; + background: #738e96; } + +#wpadminbar .ab-item, #wpadminbar a.ab-item, #wpadminbar > #wp-toolbar span.ab-label, #wpadminbar > #wp-toolbar span.noticon { + color: #fff; } + +#wpadminbar .ab-icon, #wpadminbar .ab-icon:before, #wpadminbar .ab-item:before, #wpadminbar .ab-item:after { + color: #f2fcff; } + +#wpadminbar .ab-top-menu > li:hover > .ab-item, #wpadminbar .ab-top-menu > li.hover > .ab-item, #wpadminbar .ab-top-menu > li > .ab-item:focus, #wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus, #wpadminbar-nojs .ab-top-menu > li.menupop:hover > .ab-item, #wpadminbar .ab-top-menu > li.menupop.hover > .ab-item { + color: #9ebaa0; + background: #627c83; } + +#wpadminbar > #wp-toolbar li:hover span.ab-label, #wpadminbar > #wp-toolbar li.hover span.ab-label, #wpadminbar > #wp-toolbar a:focus span.ab-label { + color: #9ebaa0; } + +#wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li:hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { + color: #fff; } + +/* Admin Bar: submenu */ +#wpadminbar .menupop .ab-sub-wrapper { + background: #627c83; } + +#wpadminbar .quicklinks .menupop ul.ab-sub-secondary, #wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu { + background: #8f9b9e; } + +#wpadminbar .ab-submenu .ab-item, #wpadminbar .quicklinks .menupop ul li a, #wpadminbar .quicklinks .menupop.hover ul li a, #wpadminbar-nojs .quicklinks .menupop:hover ul li a { + color: #d5dddf; } + +#wpadminbar .quicklinks li .blavatar, #wpadminbar .menupop .menupop > .ab-item:before { + color: #f2fcff; } + +#wpadminbar .quicklinks .menupop ul li a:hover, #wpadminbar .quicklinks .menupop ul li a:focus, #wpadminbar .quicklinks .menupop ul li a:hover strong, #wpadminbar .quicklinks .menupop ul li a:focus strong, #wpadminbar .quicklinks .menupop.hover ul li a:hover, #wpadminbar .quicklinks .menupop.hover ul li a:focus, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus, #wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li a:focus .ab-icon:before, #wpadminbar li .ab-item:focus:before, #wpadminbar li.hover .ab-icon:before, #wpadminbar li.hover .ab-item:before, #wpadminbar li:hover .ab-item:after, #wpadminbar li.hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { + color: #9ebaa0; } + +#wpadminbar .quicklinks li a:hover .blavatar, #wpadminbar .menupop .menupop > .ab-item:hover:before { + color: #9ebaa0; } + +/* Admin Bar: search */ +#wpadminbar #adminbarsearch:before { + color: #f2fcff; } + +#wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input:focus { + color: #fff; + background: #879fa5; } + +#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder { + color: #fff; + opacity: 0.7; } + +/* Admin Bar: my account */ +#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img { + border-color: #879fa5; + background-color: #879fa5; } + +#wpadminbar #wp-admin-bar-user-info .display-name { + color: #fff; } + +#wpadminbar #wp-admin-bar-user-info a:hover .display-name { + color: #9ebaa0; } + +#wpadminbar #wp-admin-bar-user-info .username { + color: #d5dddf; } + +/* Pointers */ +.wp-pointer .wp-pointer-content h3 { + background-color: #9ebaa0; + border-color: #8faf91; } + +.wp-pointer .wp-pointer-content h3:before { + color: #9ebaa0; } + +.wp-pointer.wp-pointer-top .wp-pointer-arrow, .wp-pointer.wp-pointer-undefined .wp-pointer-arrow { + border-bottom-color: #9ebaa0; } + +/* Media Uploader */ +.media-item .bar, .media-progress-bar div { + background-color: #9ebaa0; } + +.details.attachment { + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 5px #9ebaa0; + box-shadow: 0 0 0 1px #fff, 0 0 0 5px #9ebaa0; } + +.attachment.details .check { + background-color: #9ebaa0; + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 2px #9ebaa0; + box-shadow: 0 0 0 1px #fff, 0 0 0 2px #9ebaa0; } + +/* Themes */ +.theme-browser .theme.active .theme-name, .theme-browser .theme.add-new-theme:hover:after { + background: #9ebaa0; } + +.theme-browser .theme.add-new-theme:hover span:after { + color: #9ebaa0; } + +.theme-overlay .theme-header .close:hover, .theme-overlay .theme-header .right:hover, .theme-overlay .theme-header .left:hover { + background: #9ebaa0; } + +.theme-section.current, .theme-filter.current { + border-bottom-color: #738e96; } + +body.more-filters-opened .more-filters, body.more-filters-opened .more-filters:before { + color: #fff; + background-color: #738e96; } + +body.more-filters-opened .more-filters:hover, body.more-filters-opened .more-filters:focus, body.more-filters-opened .more-filters:hover:before, body.more-filters-opened .more-filters:focus:before { + background-color: #9ebaa0; + color: #fff; } + +/* Widgets */ +.widgets-chooser li.widgets-chooser-selected { + background-color: #9ebaa0; + color: #fff; } + +.widgets-chooser li.widgets-chooser-selected:before, .widgets-chooser li.widgets-chooser-selected:focus:before { + color: #fff; } + +/* Customize */ +#customize-theme-controls .widget-area-select .selected { + background-color: #9ebaa0; + color: #fff; } + +/* jQuery UI Slider */ +.wp-slider .ui-slider-handle, .wp-slider .ui-slider-handle.ui-state-hover, .wp-slider .ui-slider-handle.focus { + background: #9ebaa0; + border-color: #80a583; + -webkit-box-shadow: inset 0 1px 0 #cbdacc, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #cbdacc, 0 1px 0 rgba(0, 0, 0, 0.15); } + +/* Thickbox: Plugin information */ +#sidemenu a.current { + background: #f1f1f1; + border-bottom-color: #f1f1f1; } + +#plugin-information .action-button { + background: #9ebaa0; } + +/* Responsive Component */ +div#wp-responsive-toggle a:before { + color: #f2fcff; } + +.wp-responsive-open div#wp-responsive-toggle a { + border-color: transparent; + background: #9ebaa0; } + +.star-rating .star { + color: #9ebaa0; } + +.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a { + background: #627c83; } diff --git a/wp-admin/css/colors/ocean/colors-rtl.min.css b/wp-admin/css/colors/ocean/colors-rtl.min.css new file mode 100644 index 0000000..45143c6 --- /dev/null +++ b/wp-admin/css/colors/ocean/colors-rtl.min.css @@ -0,0 +1 @@ +html{background:#f1f1f1}a{color:#0074a2}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,a:active,a:focus,a:hover,div.dashboard-widget-submit input:hover{color:#0099d5}input[type=checkbox]:checked:before{color:#738e96}input[type=radio]:checked:before{background:#738e96}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0099d5}.wp-core-ui .button-primary{background:#9ebaa0;border-color:#80a583;color:#fff;-webkit-box-shadow:inset 0 1px 0 #cbdacc,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #cbdacc,0 1px 0 rgba(0,0,0,.15)}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#8faf91;border-color:#719a74;color:#fff;-webkit-box-shadow:inset 0 1px 0 #bccfbd,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #bccfbd,0 1px 0 rgba(0,0,0,.15)}.wp-core-ui .button-primary:active{background:#80a583;border-color:#719a74;color:#fff;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#c7d1c8!important;background:#86a988!important;border-color:#719a74!important;text-shadow:none!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#738e96}.wp-core-ui .wp-ui-text-primary{color:#738e96}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#9ebaa0}.wp-core-ui .wp-ui-text-highlight{color:#9ebaa0}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#aa9d88}.wp-core-ui .wp-ui-text-notification{color:#aa9d88}.wp-core-ui .wp-ui-text-icon{color:#f2fcff}#add-new-comment a:hover,.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover{color:#fff;background-color:#738e96}.view-switch a.current:before{color:#738e96}.view-switch a:hover:before{color:#aa9d88}.post-com-count:hover:after{border-top-color:#738e96}.post-com-count:hover span{color:#fff;background-color:#738e96}strong .post-com-count:after{border-top-color:#aa9d88}strong .post-com-count span{background-color:#aa9d88}#adminmenu,#adminmenuback,#adminmenuwrap{background:#738e96}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f2fcff}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#9ebaa0}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#627c83}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-left-color:#627c83}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu .wp-submenu-head,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#d5dddf}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#9ebaa0}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#9ebaa0}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-left-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#9ebaa0}#adminmenu li.wp-has-current-submenu div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#aa9d88}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#627c83}#collapse-menu{color:#f2fcff}#collapse-menu:hover{color:#fff}#collapse-button div:after{color:#f2fcff}#collapse-menu:hover #collapse-button div:after{color:#fff}#wpadminbar{color:#fff;background:#738e96}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f2fcff}#wpadminbar .ab-top-menu>li.hover>.ab-item,#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar .ab-top-menu>li:hover>.ab-item,#wpadminbar .ab-top-menu>li>.ab-item:focus,#wpadminbar-nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus{color:#9ebaa0;background:#627c83}#wpadminbar>#wp-toolbar a:focus span.ab-label,#wpadminbar>#wp-toolbar li.hover span.ab-label,#wpadminbar>#wp-toolbar li:hover span.ab-label{color:#9ebaa0}#wpadminbar .menupop .ab-sub-wrapper{background:#627c83}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#8f9b9e}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar-nojs .quicklinks .menupop:hover ul li a{color:#d5dddf}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f2fcff}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:after,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:after,#wpadminbar li:hover .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover{color:#9ebaa0}#wpadminbar #adminbarsearch:before{color:#f2fcff}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#879fa5}#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder{color:#fff;opacity:.7}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#879fa5;background-color:#879fa5}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#9ebaa0}#wpadminbar #wp-admin-bar-user-info .username{color:#d5dddf}.wp-pointer .wp-pointer-content h3{background-color:#9ebaa0;border-color:#8faf91}.wp-pointer .wp-pointer-content h3:before{color:#9ebaa0}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow{border-bottom-color:#9ebaa0}.media-item .bar,.media-progress-bar div{background-color:#9ebaa0}.details.attachment{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 5px #9ebaa0;box-shadow:0 0 0 1px #fff,0 0 0 5px #9ebaa0}.attachment.details .check{background-color:#9ebaa0;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #9ebaa0;box-shadow:0 0 0 1px #fff,0 0 0 2px #9ebaa0}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme:hover:after{background:#9ebaa0}.theme-browser .theme.add-new-theme:hover span:after{color:#9ebaa0}.theme-overlay .theme-header .close:hover,.theme-overlay .theme-header .left:hover,.theme-overlay .theme-header .right:hover{background:#9ebaa0}.theme-filter.current,.theme-section.current{border-bottom-color:#738e96}body.more-filters-opened .more-filters,body.more-filters-opened .more-filters:before{color:#fff;background-color:#738e96}.widgets-chooser li.widgets-chooser-selected,body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover,body.more-filters-opened .more-filters:hover:before{background-color:#9ebaa0;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}#customize-theme-controls .widget-area-select .selected{background-color:#9ebaa0;color:#fff}.wp-slider .ui-slider-handle,.wp-slider .ui-slider-handle.focus,.wp-slider .ui-slider-handle.ui-state-hover{background:#9ebaa0;border-color:#80a583;-webkit-box-shadow:inset 0 1px 0 #cbdacc,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #cbdacc,0 1px 0 rgba(0,0,0,.15)}#sidemenu a.current{background:#f1f1f1;border-bottom-color:#f1f1f1}#plugin-information .action-button{background:#9ebaa0}div#wp-responsive-toggle a:before{color:#f2fcff}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#9ebaa0}.star-rating .star{color:#9ebaa0}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#627c83} \ No newline at end of file diff --git a/wp-admin/css/colors/ocean/colors.css b/wp-admin/css/colors/ocean/colors.css new file mode 100644 index 0000000..0ee3295 --- /dev/null +++ b/wp-admin/css/colors/ocean/colors.css @@ -0,0 +1,331 @@ +/* + * Button mixin- creates 3d-ish button effect with correct + * highlights/shadows, based on a base color. + */ +html { + background: #f1f1f1; } + +/* Links */ +a { + color: #0074a2; } + a:hover, a:active, a:focus { + color: #0099d5; } + +#media-upload a.del-link:hover, div.dashboard-widget-submit input:hover, .subsubsub a:hover, .subsubsub a.current:hover { + color: #0099d5; } + +/* Forms */ +input[type=checkbox]:checked:before { + color: #738e96; } + +input[type=radio]:checked:before { + background: #738e96; } + +.wp-core-ui input[type="reset"]:hover, .wp-core-ui input[type="reset"]:active { + color: #0099d5; } + +/* Core UI */ +.wp-core-ui .button-primary { + background: #9ebaa0; + border-color: #80a583; + color: white; + -webkit-box-shadow: inset 0 1px 0 #cbdacc, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #cbdacc, 0 1px 0 rgba(0, 0, 0, 0.15); } + .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus { + background: #8faf91; + border-color: #719a74; + color: white; + -webkit-box-shadow: inset 0 1px 0 #bccfbd, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #bccfbd, 0 1px 0 rgba(0, 0, 0, 0.15); } + .wp-core-ui .button-primary:active { + background: #80a583; + border-color: #719a74; + color: white; + -webkit-box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); + box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); } + .wp-core-ui .button-primary[disabled], .wp-core-ui .button-primary:disabled, .wp-core-ui .button-primary.button-primary-disabled, .wp-core-ui .button-primary.disabled { + color: #c7d1c8 !important; + background: #86a988 !important; + border-color: #719a74 !important; + text-shadow: none !important; } +.wp-core-ui .wp-ui-primary { + color: #fff; + background-color: #738e96; } +.wp-core-ui .wp-ui-text-primary { + color: #738e96; } +.wp-core-ui .wp-ui-highlight { + color: #fff; + background-color: #9ebaa0; } +.wp-core-ui .wp-ui-text-highlight { + color: #9ebaa0; } +.wp-core-ui .wp-ui-notification { + color: #fff; + background-color: #aa9d88; } +.wp-core-ui .wp-ui-text-notification { + color: #aa9d88; } +.wp-core-ui .wp-ui-text-icon { + color: #f2fcff; } + +/* List tables */ +.wrap .add-new-h2:hover, #add-new-comment a:hover, .tablenav .tablenav-pages a:hover, .tablenav .tablenav-pages a:focus { + color: #fff; + background-color: #738e96; } + +.view-switch a.current:before { + color: #738e96; } + +.view-switch a:hover:before { + color: #aa9d88; } + +.post-com-count:hover:after { + border-top-color: #738e96; } + +.post-com-count:hover span { + color: #fff; + background-color: #738e96; } + +strong .post-com-count:after { + border-top-color: #aa9d88; } + +strong .post-com-count span { + background-color: #aa9d88; } + +/* Admin Menu */ +#adminmenuback, #adminmenuwrap, #adminmenu { + background: #738e96; } + +#adminmenu a { + color: #fff; } + +#adminmenu div.wp-menu-image:before { + color: #f2fcff; } + +#adminmenu a:hover, #adminmenu li.menu-top:hover, #adminmenu li.opensub > a.menu-top, #adminmenu li > a.menu-top:focus { + color: #fff; + background-color: #9ebaa0; } + +#adminmenu li.menu-top:hover div.wp-menu-image:before, #adminmenu li.opensub > a.menu-top div.wp-menu-image:before { + color: #fff; } + +/* Active tabs use a bottom border color that matches the page background color. */ +.about-wrap h2 .nav-tab-active, .nav-tab-active, .nav-tab-active:hover { + background-color: #f1f1f1; + border-bottom-color: #f1f1f1; } + +/* Admin Menu: submenu */ +#adminmenu .wp-submenu, #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu .wp-has-current-submenu.opensub .wp-submenu, .folded #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu { + background: #627c83; } + +#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after { + border-right-color: #627c83; } + +#adminmenu .wp-submenu .wp-submenu-head { + color: #d5dddf; } + +#adminmenu .wp-submenu a, #adminmenu .wp-has-current-submenu .wp-submenu a, .folded #adminmenu .wp-has-current-submenu .wp-submenu a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a { + color: #d5dddf; } + #adminmenu .wp-submenu a:focus, #adminmenu .wp-submenu a:hover, #adminmenu .wp-has-current-submenu .wp-submenu a:focus, #adminmenu .wp-has-current-submenu .wp-submenu a:hover, .folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus, .folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a:focus, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a:hover, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover { + color: #9ebaa0; } + +/* Admin Menu: current */ +#adminmenu .wp-submenu li.current a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a { + color: #fff; } + #adminmenu .wp-submenu li.current a:hover, #adminmenu .wp-submenu li.current a:focus, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a:hover, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a:focus, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus { + color: #9ebaa0; } + +ul#adminmenu a.wp-has-current-submenu:after, ul#adminmenu > li.current > a.current:after { + border-right-color: #f1f1f1; } + +#adminmenu li.current a.menu-top, #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, #adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head, .folded #adminmenu li.current.menu-top { + color: #fff; + background: #9ebaa0; } + +#adminmenu li.wp-has-current-submenu div.wp-menu-image:before { + color: #fff; } + +/* Admin Menu: bubble */ +#adminmenu .awaiting-mod, #adminmenu .update-plugins { + color: #fff; + background: #aa9d88; } + +#adminmenu li.current a .awaiting-mod, #adminmenu li a.wp-has-current-submenu .update-plugins, #adminmenu li:hover a .awaiting-mod, #adminmenu li.menu-top:hover > a .update-plugins { + color: #fff; + background: #627c83; } + +/* Admin Menu: collapse button */ +#collapse-menu { + color: #f2fcff; } + +#collapse-menu:hover { + color: #fff; } + +#collapse-button div:after { + color: #f2fcff; } + +#collapse-menu:hover #collapse-button div:after { + color: #fff; } + +/* Admin Bar */ +#wpadminbar { + color: #fff; + background: #738e96; } + +#wpadminbar .ab-item, #wpadminbar a.ab-item, #wpadminbar > #wp-toolbar span.ab-label, #wpadminbar > #wp-toolbar span.noticon { + color: #fff; } + +#wpadminbar .ab-icon, #wpadminbar .ab-icon:before, #wpadminbar .ab-item:before, #wpadminbar .ab-item:after { + color: #f2fcff; } + +#wpadminbar .ab-top-menu > li:hover > .ab-item, #wpadminbar .ab-top-menu > li.hover > .ab-item, #wpadminbar .ab-top-menu > li > .ab-item:focus, #wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus, #wpadminbar-nojs .ab-top-menu > li.menupop:hover > .ab-item, #wpadminbar .ab-top-menu > li.menupop.hover > .ab-item { + color: #9ebaa0; + background: #627c83; } + +#wpadminbar > #wp-toolbar li:hover span.ab-label, #wpadminbar > #wp-toolbar li.hover span.ab-label, #wpadminbar > #wp-toolbar a:focus span.ab-label { + color: #9ebaa0; } + +#wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li:hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { + color: #fff; } + +/* Admin Bar: submenu */ +#wpadminbar .menupop .ab-sub-wrapper { + background: #627c83; } + +#wpadminbar .quicklinks .menupop ul.ab-sub-secondary, #wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu { + background: #8f9b9e; } + +#wpadminbar .ab-submenu .ab-item, #wpadminbar .quicklinks .menupop ul li a, #wpadminbar .quicklinks .menupop.hover ul li a, #wpadminbar-nojs .quicklinks .menupop:hover ul li a { + color: #d5dddf; } + +#wpadminbar .quicklinks li .blavatar, #wpadminbar .menupop .menupop > .ab-item:before { + color: #f2fcff; } + +#wpadminbar .quicklinks .menupop ul li a:hover, #wpadminbar .quicklinks .menupop ul li a:focus, #wpadminbar .quicklinks .menupop ul li a:hover strong, #wpadminbar .quicklinks .menupop ul li a:focus strong, #wpadminbar .quicklinks .menupop.hover ul li a:hover, #wpadminbar .quicklinks .menupop.hover ul li a:focus, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus, #wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li a:focus .ab-icon:before, #wpadminbar li .ab-item:focus:before, #wpadminbar li.hover .ab-icon:before, #wpadminbar li.hover .ab-item:before, #wpadminbar li:hover .ab-item:after, #wpadminbar li.hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { + color: #9ebaa0; } + +#wpadminbar .quicklinks li a:hover .blavatar, #wpadminbar .menupop .menupop > .ab-item:hover:before { + color: #9ebaa0; } + +/* Admin Bar: search */ +#wpadminbar #adminbarsearch:before { + color: #f2fcff; } + +#wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input:focus { + color: #fff; + background: #879fa5; } + +#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder { + color: #fff; + opacity: 0.7; } + +/* Admin Bar: my account */ +#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img { + border-color: #879fa5; + background-color: #879fa5; } + +#wpadminbar #wp-admin-bar-user-info .display-name { + color: #fff; } + +#wpadminbar #wp-admin-bar-user-info a:hover .display-name { + color: #9ebaa0; } + +#wpadminbar #wp-admin-bar-user-info .username { + color: #d5dddf; } + +/* Pointers */ +.wp-pointer .wp-pointer-content h3 { + background-color: #9ebaa0; + border-color: #8faf91; } + +.wp-pointer .wp-pointer-content h3:before { + color: #9ebaa0; } + +.wp-pointer.wp-pointer-top .wp-pointer-arrow, .wp-pointer.wp-pointer-undefined .wp-pointer-arrow { + border-bottom-color: #9ebaa0; } + +/* Media Uploader */ +.media-item .bar, .media-progress-bar div { + background-color: #9ebaa0; } + +.details.attachment { + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 5px #9ebaa0; + box-shadow: 0 0 0 1px #fff, 0 0 0 5px #9ebaa0; } + +.attachment.details .check { + background-color: #9ebaa0; + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 2px #9ebaa0; + box-shadow: 0 0 0 1px #fff, 0 0 0 2px #9ebaa0; } + +/* Themes */ +.theme-browser .theme.active .theme-name, .theme-browser .theme.add-new-theme:hover:after { + background: #9ebaa0; } + +.theme-browser .theme.add-new-theme:hover span:after { + color: #9ebaa0; } + +.theme-overlay .theme-header .close:hover, .theme-overlay .theme-header .right:hover, .theme-overlay .theme-header .left:hover { + background: #9ebaa0; } + +.theme-section.current, .theme-filter.current { + border-bottom-color: #738e96; } + +body.more-filters-opened .more-filters, body.more-filters-opened .more-filters:before { + color: #fff; + background-color: #738e96; } + +body.more-filters-opened .more-filters:hover, body.more-filters-opened .more-filters:focus, body.more-filters-opened .more-filters:hover:before, body.more-filters-opened .more-filters:focus:before { + background-color: #9ebaa0; + color: #fff; } + +/* Widgets */ +.widgets-chooser li.widgets-chooser-selected { + background-color: #9ebaa0; + color: #fff; } + +.widgets-chooser li.widgets-chooser-selected:before, .widgets-chooser li.widgets-chooser-selected:focus:before { + color: #fff; } + +/* Customize */ +#customize-theme-controls .widget-area-select .selected { + background-color: #9ebaa0; + color: #fff; } + +/* jQuery UI Slider */ +.wp-slider .ui-slider-handle, .wp-slider .ui-slider-handle.ui-state-hover, .wp-slider .ui-slider-handle.focus { + background: #9ebaa0; + border-color: #80a583; + -webkit-box-shadow: inset 0 1px 0 #cbdacc, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #cbdacc, 0 1px 0 rgba(0, 0, 0, 0.15); } + +/* Thickbox: Plugin information */ +#sidemenu a.current { + background: #f1f1f1; + border-bottom-color: #f1f1f1; } + +#plugin-information .action-button { + background: #9ebaa0; } + +/* Responsive Component */ +div#wp-responsive-toggle a:before { + color: #f2fcff; } + +.wp-responsive-open div#wp-responsive-toggle a { + border-color: transparent; + background: #9ebaa0; } + +.star-rating .star { + color: #9ebaa0; } + +.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a { + background: #627c83; } diff --git a/wp-admin/css/colors/ocean/colors.min.css b/wp-admin/css/colors/ocean/colors.min.css new file mode 100644 index 0000000..e10635d --- /dev/null +++ b/wp-admin/css/colors/ocean/colors.min.css @@ -0,0 +1 @@ +html{background:#f1f1f1}a{color:#0074a2}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,a:active,a:focus,a:hover,div.dashboard-widget-submit input:hover{color:#0099d5}input[type=checkbox]:checked:before{color:#738e96}input[type=radio]:checked:before{background:#738e96}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0099d5}.wp-core-ui .button-primary{background:#9ebaa0;border-color:#80a583;color:#fff;-webkit-box-shadow:inset 0 1px 0 #cbdacc,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #cbdacc,0 1px 0 rgba(0,0,0,.15)}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#8faf91;border-color:#719a74;color:#fff;-webkit-box-shadow:inset 0 1px 0 #bccfbd,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #bccfbd,0 1px 0 rgba(0,0,0,.15)}.wp-core-ui .button-primary:active{background:#80a583;border-color:#719a74;color:#fff;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#c7d1c8!important;background:#86a988!important;border-color:#719a74!important;text-shadow:none!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#738e96}.wp-core-ui .wp-ui-text-primary{color:#738e96}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#9ebaa0}.wp-core-ui .wp-ui-text-highlight{color:#9ebaa0}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#aa9d88}.wp-core-ui .wp-ui-text-notification{color:#aa9d88}.wp-core-ui .wp-ui-text-icon{color:#f2fcff}#add-new-comment a:hover,.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover{color:#fff;background-color:#738e96}.view-switch a.current:before{color:#738e96}.view-switch a:hover:before{color:#aa9d88}.post-com-count:hover:after{border-top-color:#738e96}.post-com-count:hover span{color:#fff;background-color:#738e96}strong .post-com-count:after{border-top-color:#aa9d88}strong .post-com-count span{background-color:#aa9d88}#adminmenu,#adminmenuback,#adminmenuwrap{background:#738e96}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f2fcff}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#9ebaa0}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#627c83}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-right-color:#627c83}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu .wp-submenu-head,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#d5dddf}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#9ebaa0}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#9ebaa0}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-right-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#9ebaa0}#adminmenu li.wp-has-current-submenu div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#aa9d88}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#627c83}#collapse-menu{color:#f2fcff}#collapse-menu:hover{color:#fff}#collapse-button div:after{color:#f2fcff}#collapse-menu:hover #collapse-button div:after{color:#fff}#wpadminbar{color:#fff;background:#738e96}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f2fcff}#wpadminbar .ab-top-menu>li.hover>.ab-item,#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar .ab-top-menu>li:hover>.ab-item,#wpadminbar .ab-top-menu>li>.ab-item:focus,#wpadminbar-nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus{color:#9ebaa0;background:#627c83}#wpadminbar>#wp-toolbar a:focus span.ab-label,#wpadminbar>#wp-toolbar li.hover span.ab-label,#wpadminbar>#wp-toolbar li:hover span.ab-label{color:#9ebaa0}#wpadminbar .menupop .ab-sub-wrapper{background:#627c83}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#8f9b9e}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar-nojs .quicklinks .menupop:hover ul li a{color:#d5dddf}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f2fcff}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:after,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:after,#wpadminbar li:hover .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover{color:#9ebaa0}#wpadminbar #adminbarsearch:before{color:#f2fcff}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#879fa5}#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder{color:#fff;opacity:.7}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#879fa5;background-color:#879fa5}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#9ebaa0}#wpadminbar #wp-admin-bar-user-info .username{color:#d5dddf}.wp-pointer .wp-pointer-content h3{background-color:#9ebaa0;border-color:#8faf91}.wp-pointer .wp-pointer-content h3:before{color:#9ebaa0}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow{border-bottom-color:#9ebaa0}.media-item .bar,.media-progress-bar div{background-color:#9ebaa0}.details.attachment{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 5px #9ebaa0;box-shadow:0 0 0 1px #fff,0 0 0 5px #9ebaa0}.attachment.details .check{background-color:#9ebaa0;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #9ebaa0;box-shadow:0 0 0 1px #fff,0 0 0 2px #9ebaa0}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme:hover:after{background:#9ebaa0}.theme-browser .theme.add-new-theme:hover span:after{color:#9ebaa0}.theme-overlay .theme-header .close:hover,.theme-overlay .theme-header .left:hover,.theme-overlay .theme-header .right:hover{background:#9ebaa0}.theme-filter.current,.theme-section.current{border-bottom-color:#738e96}body.more-filters-opened .more-filters,body.more-filters-opened .more-filters:before{color:#fff;background-color:#738e96}.widgets-chooser li.widgets-chooser-selected,body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover,body.more-filters-opened .more-filters:hover:before{background-color:#9ebaa0;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}#customize-theme-controls .widget-area-select .selected{background-color:#9ebaa0;color:#fff}.wp-slider .ui-slider-handle,.wp-slider .ui-slider-handle.focus,.wp-slider .ui-slider-handle.ui-state-hover{background:#9ebaa0;border-color:#80a583;-webkit-box-shadow:inset 0 1px 0 #cbdacc,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #cbdacc,0 1px 0 rgba(0,0,0,.15)}#sidemenu a.current{background:#f1f1f1;border-bottom-color:#f1f1f1}#plugin-information .action-button{background:#9ebaa0}div#wp-responsive-toggle a:before{color:#f2fcff}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#9ebaa0}.star-rating .star{color:#9ebaa0}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#627c83} \ No newline at end of file diff --git a/wp-admin/css/colors/ocean/colors.scss b/wp-admin/css/colors/ocean/colors.scss new file mode 100644 index 0000000..d52339c --- /dev/null +++ b/wp-admin/css/colors/ocean/colors.scss @@ -0,0 +1,8 @@ +$base-color: #738e96; +$icon-color: #f2fcff; +$highlight-color: #9ebaa0; +$notification-color: #aa9d88; + +$form-checked: $base-color; + +@import "../_admin.scss"; diff --git a/wp-admin/css/colors/sunrise/colors-rtl.css b/wp-admin/css/colors/sunrise/colors-rtl.css new file mode 100644 index 0000000..e80f79a --- /dev/null +++ b/wp-admin/css/colors/sunrise/colors-rtl.css @@ -0,0 +1,331 @@ +/* + * Button mixin- creates 3d-ish button effect with correct + * highlights/shadows, based on a base color. + */ +html { + background: #f1f1f1; } + +/* Links */ +a { + color: #0074a2; } + a:hover, a:active, a:focus { + color: #0099d5; } + +#media-upload a.del-link:hover, div.dashboard-widget-submit input:hover, .subsubsub a:hover, .subsubsub a.current:hover { + color: #0099d5; } + +/* Forms */ +input[type=checkbox]:checked:before { + color: #dd823b; } + +input[type=radio]:checked:before { + background: #dd823b; } + +.wp-core-ui input[type="reset"]:hover, .wp-core-ui input[type="reset"]:active { + color: #0099d5; } + +/* Core UI */ +.wp-core-ui .button-primary { + background: #dd823b; + border-color: #c36822; + color: white; + -webkit-box-shadow: inset 0 1px 0 #e8ab7c, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #e8ab7c, 0 1px 0 rgba(0, 0, 0, 0.15); } + .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus { + background: #d97326; + border-color: #ad5c1e; + color: white; + -webkit-box-shadow: inset 0 1px 0 #e59d66, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #e59d66, 0 1px 0 rgba(0, 0, 0, 0.15); } + .wp-core-ui .button-primary:active { + background: #c36822; + border-color: #ad5c1e; + color: white; + -webkit-box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); + box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); } + .wp-core-ui .button-primary[disabled], .wp-core-ui .button-primary:disabled, .wp-core-ui .button-primary.button-primary-disabled, .wp-core-ui .button-primary.disabled { + color: #d1cbc7 !important; + background: #cc6c23 !important; + border-color: #ad5c1e !important; + text-shadow: none !important; } +.wp-core-ui .wp-ui-primary { + color: #fff; + background-color: #cf4944; } +.wp-core-ui .wp-ui-text-primary { + color: #cf4944; } +.wp-core-ui .wp-ui-highlight { + color: #fff; + background-color: #dd823b; } +.wp-core-ui .wp-ui-text-highlight { + color: #dd823b; } +.wp-core-ui .wp-ui-notification { + color: #fff; + background-color: #ccaf0b; } +.wp-core-ui .wp-ui-text-notification { + color: #ccaf0b; } +.wp-core-ui .wp-ui-text-icon { + color: #f3f1f1; } + +/* List tables */ +.wrap .add-new-h2:hover, #add-new-comment a:hover, .tablenav .tablenav-pages a:hover, .tablenav .tablenav-pages a:focus { + color: #fff; + background-color: #cf4944; } + +.view-switch a.current:before { + color: #cf4944; } + +.view-switch a:hover:before { + color: #ccaf0b; } + +.post-com-count:hover:after { + border-top-color: #cf4944; } + +.post-com-count:hover span { + color: #fff; + background-color: #cf4944; } + +strong .post-com-count:after { + border-top-color: #ccaf0b; } + +strong .post-com-count span { + background-color: #ccaf0b; } + +/* Admin Menu */ +#adminmenuback, #adminmenuwrap, #adminmenu { + background: #cf4944; } + +#adminmenu a { + color: #fff; } + +#adminmenu div.wp-menu-image:before { + color: #f3f1f1; } + +#adminmenu a:hover, #adminmenu li.menu-top:hover, #adminmenu li.opensub > a.menu-top, #adminmenu li > a.menu-top:focus { + color: #fff; + background-color: #dd823b; } + +#adminmenu li.menu-top:hover div.wp-menu-image:before, #adminmenu li.opensub > a.menu-top div.wp-menu-image:before { + color: #fff; } + +/* Active tabs use a bottom border color that matches the page background color. */ +.about-wrap h2 .nav-tab-active, .nav-tab-active, .nav-tab-active:hover { + background-color: #f1f1f1; + border-bottom-color: #f1f1f1; } + +/* Admin Menu: submenu */ +#adminmenu .wp-submenu, #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu .wp-has-current-submenu.opensub .wp-submenu, .folded #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu { + background: #be3631; } + +#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after { + border-left-color: #be3631; } + +#adminmenu .wp-submenu .wp-submenu-head { + color: #f0c8c6; } + +#adminmenu .wp-submenu a, #adminmenu .wp-has-current-submenu .wp-submenu a, .folded #adminmenu .wp-has-current-submenu .wp-submenu a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a { + color: #f0c8c6; } + #adminmenu .wp-submenu a:focus, #adminmenu .wp-submenu a:hover, #adminmenu .wp-has-current-submenu .wp-submenu a:focus, #adminmenu .wp-has-current-submenu .wp-submenu a:hover, .folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus, .folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a:focus, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a:hover, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover { + color: #f7e3d3; } + +/* Admin Menu: current */ +#adminmenu .wp-submenu li.current a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a { + color: #fff; } + #adminmenu .wp-submenu li.current a:hover, #adminmenu .wp-submenu li.current a:focus, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a:hover, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a:focus, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus { + color: #f7e3d3; } + +ul#adminmenu a.wp-has-current-submenu:after, ul#adminmenu > li.current > a.current:after { + border-left-color: #f1f1f1; } + +#adminmenu li.current a.menu-top, #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, #adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head, .folded #adminmenu li.current.menu-top { + color: #fff; + background: #dd823b; } + +#adminmenu li.wp-has-current-submenu div.wp-menu-image:before { + color: #fff; } + +/* Admin Menu: bubble */ +#adminmenu .awaiting-mod, #adminmenu .update-plugins { + color: #fff; + background: #ccaf0b; } + +#adminmenu li.current a .awaiting-mod, #adminmenu li a.wp-has-current-submenu .update-plugins, #adminmenu li:hover a .awaiting-mod, #adminmenu li.menu-top:hover > a .update-plugins { + color: #fff; + background: #be3631; } + +/* Admin Menu: collapse button */ +#collapse-menu { + color: #f3f1f1; } + +#collapse-menu:hover { + color: #fff; } + +#collapse-button div:after { + color: #f3f1f1; } + +#collapse-menu:hover #collapse-button div:after { + color: #fff; } + +/* Admin Bar */ +#wpadminbar { + color: #fff; + background: #cf4944; } + +#wpadminbar .ab-item, #wpadminbar a.ab-item, #wpadminbar > #wp-toolbar span.ab-label, #wpadminbar > #wp-toolbar span.noticon { + color: #fff; } + +#wpadminbar .ab-icon, #wpadminbar .ab-icon:before, #wpadminbar .ab-item:before, #wpadminbar .ab-item:after { + color: #f3f1f1; } + +#wpadminbar .ab-top-menu > li:hover > .ab-item, #wpadminbar .ab-top-menu > li.hover > .ab-item, #wpadminbar .ab-top-menu > li > .ab-item:focus, #wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus, #wpadminbar-nojs .ab-top-menu > li.menupop:hover > .ab-item, #wpadminbar .ab-top-menu > li.menupop.hover > .ab-item { + color: #f7e3d3; + background: #be3631; } + +#wpadminbar > #wp-toolbar li:hover span.ab-label, #wpadminbar > #wp-toolbar li.hover span.ab-label, #wpadminbar > #wp-toolbar a:focus span.ab-label { + color: #f7e3d3; } + +#wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li:hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { + color: #fff; } + +/* Admin Bar: submenu */ +#wpadminbar .menupop .ab-sub-wrapper { + background: #be3631; } + +#wpadminbar .quicklinks .menupop ul.ab-sub-secondary, #wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu { + background: #cf6b67; } + +#wpadminbar .ab-submenu .ab-item, #wpadminbar .quicklinks .menupop ul li a, #wpadminbar .quicklinks .menupop.hover ul li a, #wpadminbar-nojs .quicklinks .menupop:hover ul li a { + color: #f0c8c6; } + +#wpadminbar .quicklinks li .blavatar, #wpadminbar .menupop .menupop > .ab-item:before { + color: #f3f1f1; } + +#wpadminbar .quicklinks .menupop ul li a:hover, #wpadminbar .quicklinks .menupop ul li a:focus, #wpadminbar .quicklinks .menupop ul li a:hover strong, #wpadminbar .quicklinks .menupop ul li a:focus strong, #wpadminbar .quicklinks .menupop.hover ul li a:hover, #wpadminbar .quicklinks .menupop.hover ul li a:focus, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus, #wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li a:focus .ab-icon:before, #wpadminbar li .ab-item:focus:before, #wpadminbar li.hover .ab-icon:before, #wpadminbar li.hover .ab-item:before, #wpadminbar li:hover .ab-item:after, #wpadminbar li.hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { + color: #f7e3d3; } + +#wpadminbar .quicklinks li a:hover .blavatar, #wpadminbar .menupop .menupop > .ab-item:hover:before { + color: #f7e3d3; } + +/* Admin Bar: search */ +#wpadminbar #adminbarsearch:before { + color: #f3f1f1; } + +#wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input:focus { + color: #fff; + background: #d66460; } + +#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder { + color: #fff; + opacity: 0.7; } + +/* Admin Bar: my account */ +#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img { + border-color: #d66460; + background-color: #d66460; } + +#wpadminbar #wp-admin-bar-user-info .display-name { + color: #fff; } + +#wpadminbar #wp-admin-bar-user-info a:hover .display-name { + color: #f7e3d3; } + +#wpadminbar #wp-admin-bar-user-info .username { + color: #f0c8c6; } + +/* Pointers */ +.wp-pointer .wp-pointer-content h3 { + background-color: #dd823b; + border-color: #d97326; } + +.wp-pointer .wp-pointer-content h3:before { + color: #dd823b; } + +.wp-pointer.wp-pointer-top .wp-pointer-arrow, .wp-pointer.wp-pointer-undefined .wp-pointer-arrow { + border-bottom-color: #dd823b; } + +/* Media Uploader */ +.media-item .bar, .media-progress-bar div { + background-color: #dd823b; } + +.details.attachment { + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 5px #dd823b; + box-shadow: 0 0 0 1px #fff, 0 0 0 5px #dd823b; } + +.attachment.details .check { + background-color: #dd823b; + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 2px #dd823b; + box-shadow: 0 0 0 1px #fff, 0 0 0 2px #dd823b; } + +/* Themes */ +.theme-browser .theme.active .theme-name, .theme-browser .theme.add-new-theme:hover:after { + background: #dd823b; } + +.theme-browser .theme.add-new-theme:hover span:after { + color: #dd823b; } + +.theme-overlay .theme-header .close:hover, .theme-overlay .theme-header .right:hover, .theme-overlay .theme-header .left:hover { + background: #dd823b; } + +.theme-section.current, .theme-filter.current { + border-bottom-color: #cf4944; } + +body.more-filters-opened .more-filters, body.more-filters-opened .more-filters:before { + color: #fff; + background-color: #cf4944; } + +body.more-filters-opened .more-filters:hover, body.more-filters-opened .more-filters:focus, body.more-filters-opened .more-filters:hover:before, body.more-filters-opened .more-filters:focus:before { + background-color: #dd823b; + color: #fff; } + +/* Widgets */ +.widgets-chooser li.widgets-chooser-selected { + background-color: #dd823b; + color: #fff; } + +.widgets-chooser li.widgets-chooser-selected:before, .widgets-chooser li.widgets-chooser-selected:focus:before { + color: #fff; } + +/* Customize */ +#customize-theme-controls .widget-area-select .selected { + background-color: #dd823b; + color: #fff; } + +/* jQuery UI Slider */ +.wp-slider .ui-slider-handle, .wp-slider .ui-slider-handle.ui-state-hover, .wp-slider .ui-slider-handle.focus { + background: #dd823b; + border-color: #c36822; + -webkit-box-shadow: inset 0 1px 0 #e8ab7c, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #e8ab7c, 0 1px 0 rgba(0, 0, 0, 0.15); } + +/* Thickbox: Plugin information */ +#sidemenu a.current { + background: #f1f1f1; + border-bottom-color: #f1f1f1; } + +#plugin-information .action-button { + background: #dd823b; } + +/* Responsive Component */ +div#wp-responsive-toggle a:before { + color: #f3f1f1; } + +.wp-responsive-open div#wp-responsive-toggle a { + border-color: transparent; + background: #dd823b; } + +.star-rating .star { + color: #dd823b; } + +.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a { + background: #be3631; } diff --git a/wp-admin/css/colors/sunrise/colors-rtl.min.css b/wp-admin/css/colors/sunrise/colors-rtl.min.css new file mode 100644 index 0000000..2fbbff8 --- /dev/null +++ b/wp-admin/css/colors/sunrise/colors-rtl.min.css @@ -0,0 +1 @@ +html{background:#f1f1f1}a{color:#0074a2}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,a:active,a:focus,a:hover,div.dashboard-widget-submit input:hover{color:#0099d5}input[type=checkbox]:checked:before{color:#dd823b}input[type=radio]:checked:before{background:#dd823b}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0099d5}.wp-core-ui .button-primary{background:#dd823b;border-color:#c36822;color:#fff;-webkit-box-shadow:inset 0 1px 0 #e8ab7c,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #e8ab7c,0 1px 0 rgba(0,0,0,.15)}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#d97326;border-color:#ad5c1e;color:#fff;-webkit-box-shadow:inset 0 1px 0 #e59d66,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #e59d66,0 1px 0 rgba(0,0,0,.15)}.wp-core-ui .button-primary:active{background:#c36822;border-color:#ad5c1e;color:#fff;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#d1cbc7!important;background:#cc6c23!important;border-color:#ad5c1e!important;text-shadow:none!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#cf4944}.wp-core-ui .wp-ui-text-primary{color:#cf4944}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#dd823b}.wp-core-ui .wp-ui-text-highlight{color:#dd823b}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#ccaf0b}.wp-core-ui .wp-ui-text-notification{color:#ccaf0b}.wp-core-ui .wp-ui-text-icon{color:#f3f1f1}#add-new-comment a:hover,.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover{color:#fff;background-color:#cf4944}.view-switch a.current:before{color:#cf4944}.view-switch a:hover:before{color:#ccaf0b}.post-com-count:hover:after{border-top-color:#cf4944}.post-com-count:hover span{color:#fff;background-color:#cf4944}strong .post-com-count:after{border-top-color:#ccaf0b}strong .post-com-count span{background-color:#ccaf0b}#adminmenu,#adminmenuback,#adminmenuwrap{background:#cf4944}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f3f1f1}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#dd823b}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#be3631}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-left-color:#be3631}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu .wp-submenu-head,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#f0c8c6}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#f7e3d3}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#f7e3d3}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-left-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#dd823b}#adminmenu li.wp-has-current-submenu div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#ccaf0b}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#be3631}#collapse-menu{color:#f3f1f1}#collapse-menu:hover{color:#fff}#collapse-button div:after{color:#f3f1f1}#collapse-menu:hover #collapse-button div:after{color:#fff}#wpadminbar{color:#fff;background:#cf4944}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f3f1f1}#wpadminbar .ab-top-menu>li.hover>.ab-item,#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar .ab-top-menu>li:hover>.ab-item,#wpadminbar .ab-top-menu>li>.ab-item:focus,#wpadminbar-nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus{color:#f7e3d3;background:#be3631}#wpadminbar>#wp-toolbar a:focus span.ab-label,#wpadminbar>#wp-toolbar li.hover span.ab-label,#wpadminbar>#wp-toolbar li:hover span.ab-label{color:#f7e3d3}#wpadminbar .menupop .ab-sub-wrapper{background:#be3631}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#cf6b67}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar-nojs .quicklinks .menupop:hover ul li a{color:#f0c8c6}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f3f1f1}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:after,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:after,#wpadminbar li:hover .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover{color:#f7e3d3}#wpadminbar #adminbarsearch:before{color:#f3f1f1}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#d66460}#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder{color:#fff;opacity:.7}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#d66460;background-color:#d66460}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#f7e3d3}#wpadminbar #wp-admin-bar-user-info .username{color:#f0c8c6}.wp-pointer .wp-pointer-content h3{background-color:#dd823b;border-color:#d97326}.wp-pointer .wp-pointer-content h3:before{color:#dd823b}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow{border-bottom-color:#dd823b}.media-item .bar,.media-progress-bar div{background-color:#dd823b}.details.attachment{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 5px #dd823b;box-shadow:0 0 0 1px #fff,0 0 0 5px #dd823b}.attachment.details .check{background-color:#dd823b;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #dd823b;box-shadow:0 0 0 1px #fff,0 0 0 2px #dd823b}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme:hover:after{background:#dd823b}.theme-browser .theme.add-new-theme:hover span:after{color:#dd823b}.theme-overlay .theme-header .close:hover,.theme-overlay .theme-header .left:hover,.theme-overlay .theme-header .right:hover{background:#dd823b}.theme-filter.current,.theme-section.current{border-bottom-color:#cf4944}body.more-filters-opened .more-filters,body.more-filters-opened .more-filters:before{color:#fff;background-color:#cf4944}.widgets-chooser li.widgets-chooser-selected,body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover,body.more-filters-opened .more-filters:hover:before{background-color:#dd823b;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}#customize-theme-controls .widget-area-select .selected{background-color:#dd823b;color:#fff}.wp-slider .ui-slider-handle,.wp-slider .ui-slider-handle.focus,.wp-slider .ui-slider-handle.ui-state-hover{background:#dd823b;border-color:#c36822;-webkit-box-shadow:inset 0 1px 0 #e8ab7c,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #e8ab7c,0 1px 0 rgba(0,0,0,.15)}#sidemenu a.current{background:#f1f1f1;border-bottom-color:#f1f1f1}#plugin-information .action-button{background:#dd823b}div#wp-responsive-toggle a:before{color:#f3f1f1}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#dd823b}.star-rating .star{color:#dd823b}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#be3631} \ No newline at end of file diff --git a/wp-admin/css/colors/sunrise/colors.css b/wp-admin/css/colors/sunrise/colors.css new file mode 100644 index 0000000..2a872ed --- /dev/null +++ b/wp-admin/css/colors/sunrise/colors.css @@ -0,0 +1,331 @@ +/* + * Button mixin- creates 3d-ish button effect with correct + * highlights/shadows, based on a base color. + */ +html { + background: #f1f1f1; } + +/* Links */ +a { + color: #0074a2; } + a:hover, a:active, a:focus { + color: #0099d5; } + +#media-upload a.del-link:hover, div.dashboard-widget-submit input:hover, .subsubsub a:hover, .subsubsub a.current:hover { + color: #0099d5; } + +/* Forms */ +input[type=checkbox]:checked:before { + color: #dd823b; } + +input[type=radio]:checked:before { + background: #dd823b; } + +.wp-core-ui input[type="reset"]:hover, .wp-core-ui input[type="reset"]:active { + color: #0099d5; } + +/* Core UI */ +.wp-core-ui .button-primary { + background: #dd823b; + border-color: #c36822; + color: white; + -webkit-box-shadow: inset 0 1px 0 #e8ab7c, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #e8ab7c, 0 1px 0 rgba(0, 0, 0, 0.15); } + .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus { + background: #d97326; + border-color: #ad5c1e; + color: white; + -webkit-box-shadow: inset 0 1px 0 #e59d66, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #e59d66, 0 1px 0 rgba(0, 0, 0, 0.15); } + .wp-core-ui .button-primary:active { + background: #c36822; + border-color: #ad5c1e; + color: white; + -webkit-box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); + box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); } + .wp-core-ui .button-primary[disabled], .wp-core-ui .button-primary:disabled, .wp-core-ui .button-primary.button-primary-disabled, .wp-core-ui .button-primary.disabled { + color: #d1cbc7 !important; + background: #cc6c23 !important; + border-color: #ad5c1e !important; + text-shadow: none !important; } +.wp-core-ui .wp-ui-primary { + color: #fff; + background-color: #cf4944; } +.wp-core-ui .wp-ui-text-primary { + color: #cf4944; } +.wp-core-ui .wp-ui-highlight { + color: #fff; + background-color: #dd823b; } +.wp-core-ui .wp-ui-text-highlight { + color: #dd823b; } +.wp-core-ui .wp-ui-notification { + color: #fff; + background-color: #ccaf0b; } +.wp-core-ui .wp-ui-text-notification { + color: #ccaf0b; } +.wp-core-ui .wp-ui-text-icon { + color: #f3f1f1; } + +/* List tables */ +.wrap .add-new-h2:hover, #add-new-comment a:hover, .tablenav .tablenav-pages a:hover, .tablenav .tablenav-pages a:focus { + color: #fff; + background-color: #cf4944; } + +.view-switch a.current:before { + color: #cf4944; } + +.view-switch a:hover:before { + color: #ccaf0b; } + +.post-com-count:hover:after { + border-top-color: #cf4944; } + +.post-com-count:hover span { + color: #fff; + background-color: #cf4944; } + +strong .post-com-count:after { + border-top-color: #ccaf0b; } + +strong .post-com-count span { + background-color: #ccaf0b; } + +/* Admin Menu */ +#adminmenuback, #adminmenuwrap, #adminmenu { + background: #cf4944; } + +#adminmenu a { + color: #fff; } + +#adminmenu div.wp-menu-image:before { + color: #f3f1f1; } + +#adminmenu a:hover, #adminmenu li.menu-top:hover, #adminmenu li.opensub > a.menu-top, #adminmenu li > a.menu-top:focus { + color: #fff; + background-color: #dd823b; } + +#adminmenu li.menu-top:hover div.wp-menu-image:before, #adminmenu li.opensub > a.menu-top div.wp-menu-image:before { + color: #fff; } + +/* Active tabs use a bottom border color that matches the page background color. */ +.about-wrap h2 .nav-tab-active, .nav-tab-active, .nav-tab-active:hover { + background-color: #f1f1f1; + border-bottom-color: #f1f1f1; } + +/* Admin Menu: submenu */ +#adminmenu .wp-submenu, #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu .wp-has-current-submenu.opensub .wp-submenu, .folded #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu { + background: #be3631; } + +#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after { + border-right-color: #be3631; } + +#adminmenu .wp-submenu .wp-submenu-head { + color: #f0c8c6; } + +#adminmenu .wp-submenu a, #adminmenu .wp-has-current-submenu .wp-submenu a, .folded #adminmenu .wp-has-current-submenu .wp-submenu a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a { + color: #f0c8c6; } + #adminmenu .wp-submenu a:focus, #adminmenu .wp-submenu a:hover, #adminmenu .wp-has-current-submenu .wp-submenu a:focus, #adminmenu .wp-has-current-submenu .wp-submenu a:hover, .folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus, .folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a:focus, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a:hover, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover { + color: #f7e3d3; } + +/* Admin Menu: current */ +#adminmenu .wp-submenu li.current a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a { + color: #fff; } + #adminmenu .wp-submenu li.current a:hover, #adminmenu .wp-submenu li.current a:focus, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a:hover, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a:focus, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover, #adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus { + color: #f7e3d3; } + +ul#adminmenu a.wp-has-current-submenu:after, ul#adminmenu > li.current > a.current:after { + border-right-color: #f1f1f1; } + +#adminmenu li.current a.menu-top, #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, #adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head, .folded #adminmenu li.current.menu-top { + color: #fff; + background: #dd823b; } + +#adminmenu li.wp-has-current-submenu div.wp-menu-image:before { + color: #fff; } + +/* Admin Menu: bubble */ +#adminmenu .awaiting-mod, #adminmenu .update-plugins { + color: #fff; + background: #ccaf0b; } + +#adminmenu li.current a .awaiting-mod, #adminmenu li a.wp-has-current-submenu .update-plugins, #adminmenu li:hover a .awaiting-mod, #adminmenu li.menu-top:hover > a .update-plugins { + color: #fff; + background: #be3631; } + +/* Admin Menu: collapse button */ +#collapse-menu { + color: #f3f1f1; } + +#collapse-menu:hover { + color: #fff; } + +#collapse-button div:after { + color: #f3f1f1; } + +#collapse-menu:hover #collapse-button div:after { + color: #fff; } + +/* Admin Bar */ +#wpadminbar { + color: #fff; + background: #cf4944; } + +#wpadminbar .ab-item, #wpadminbar a.ab-item, #wpadminbar > #wp-toolbar span.ab-label, #wpadminbar > #wp-toolbar span.noticon { + color: #fff; } + +#wpadminbar .ab-icon, #wpadminbar .ab-icon:before, #wpadminbar .ab-item:before, #wpadminbar .ab-item:after { + color: #f3f1f1; } + +#wpadminbar .ab-top-menu > li:hover > .ab-item, #wpadminbar .ab-top-menu > li.hover > .ab-item, #wpadminbar .ab-top-menu > li > .ab-item:focus, #wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus, #wpadminbar-nojs .ab-top-menu > li.menupop:hover > .ab-item, #wpadminbar .ab-top-menu > li.menupop.hover > .ab-item { + color: #f7e3d3; + background: #be3631; } + +#wpadminbar > #wp-toolbar li:hover span.ab-label, #wpadminbar > #wp-toolbar li.hover span.ab-label, #wpadminbar > #wp-toolbar a:focus span.ab-label { + color: #f7e3d3; } + +#wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li:hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { + color: #fff; } + +/* Admin Bar: submenu */ +#wpadminbar .menupop .ab-sub-wrapper { + background: #be3631; } + +#wpadminbar .quicklinks .menupop ul.ab-sub-secondary, #wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu { + background: #cf6b67; } + +#wpadminbar .ab-submenu .ab-item, #wpadminbar .quicklinks .menupop ul li a, #wpadminbar .quicklinks .menupop.hover ul li a, #wpadminbar-nojs .quicklinks .menupop:hover ul li a { + color: #f0c8c6; } + +#wpadminbar .quicklinks li .blavatar, #wpadminbar .menupop .menupop > .ab-item:before { + color: #f3f1f1; } + +#wpadminbar .quicklinks .menupop ul li a:hover, #wpadminbar .quicklinks .menupop ul li a:focus, #wpadminbar .quicklinks .menupop ul li a:hover strong, #wpadminbar .quicklinks .menupop ul li a:focus strong, #wpadminbar .quicklinks .menupop.hover ul li a:hover, #wpadminbar .quicklinks .menupop.hover ul li a:focus, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus, #wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li a:focus .ab-icon:before, #wpadminbar li .ab-item:focus:before, #wpadminbar li.hover .ab-icon:before, #wpadminbar li.hover .ab-item:before, #wpadminbar li:hover .ab-item:after, #wpadminbar li.hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { + color: #f7e3d3; } + +#wpadminbar .quicklinks li a:hover .blavatar, #wpadminbar .menupop .menupop > .ab-item:hover:before { + color: #f7e3d3; } + +/* Admin Bar: search */ +#wpadminbar #adminbarsearch:before { + color: #f3f1f1; } + +#wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input:focus { + color: #fff; + background: #d66460; } + +#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder { + color: #fff; + opacity: 0.7; } + +#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder { + color: #fff; + opacity: 0.7; } + +/* Admin Bar: my account */ +#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img { + border-color: #d66460; + background-color: #d66460; } + +#wpadminbar #wp-admin-bar-user-info .display-name { + color: #fff; } + +#wpadminbar #wp-admin-bar-user-info a:hover .display-name { + color: #f7e3d3; } + +#wpadminbar #wp-admin-bar-user-info .username { + color: #f0c8c6; } + +/* Pointers */ +.wp-pointer .wp-pointer-content h3 { + background-color: #dd823b; + border-color: #d97326; } + +.wp-pointer .wp-pointer-content h3:before { + color: #dd823b; } + +.wp-pointer.wp-pointer-top .wp-pointer-arrow, .wp-pointer.wp-pointer-undefined .wp-pointer-arrow { + border-bottom-color: #dd823b; } + +/* Media Uploader */ +.media-item .bar, .media-progress-bar div { + background-color: #dd823b; } + +.details.attachment { + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 5px #dd823b; + box-shadow: 0 0 0 1px #fff, 0 0 0 5px #dd823b; } + +.attachment.details .check { + background-color: #dd823b; + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 2px #dd823b; + box-shadow: 0 0 0 1px #fff, 0 0 0 2px #dd823b; } + +/* Themes */ +.theme-browser .theme.active .theme-name, .theme-browser .theme.add-new-theme:hover:after { + background: #dd823b; } + +.theme-browser .theme.add-new-theme:hover span:after { + color: #dd823b; } + +.theme-overlay .theme-header .close:hover, .theme-overlay .theme-header .right:hover, .theme-overlay .theme-header .left:hover { + background: #dd823b; } + +.theme-section.current, .theme-filter.current { + border-bottom-color: #cf4944; } + +body.more-filters-opened .more-filters, body.more-filters-opened .more-filters:before { + color: #fff; + background-color: #cf4944; } + +body.more-filters-opened .more-filters:hover, body.more-filters-opened .more-filters:focus, body.more-filters-opened .more-filters:hover:before, body.more-filters-opened .more-filters:focus:before { + background-color: #dd823b; + color: #fff; } + +/* Widgets */ +.widgets-chooser li.widgets-chooser-selected { + background-color: #dd823b; + color: #fff; } + +.widgets-chooser li.widgets-chooser-selected:before, .widgets-chooser li.widgets-chooser-selected:focus:before { + color: #fff; } + +/* Customize */ +#customize-theme-controls .widget-area-select .selected { + background-color: #dd823b; + color: #fff; } + +/* jQuery UI Slider */ +.wp-slider .ui-slider-handle, .wp-slider .ui-slider-handle.ui-state-hover, .wp-slider .ui-slider-handle.focus { + background: #dd823b; + border-color: #c36822; + -webkit-box-shadow: inset 0 1px 0 #e8ab7c, 0 1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 0 #e8ab7c, 0 1px 0 rgba(0, 0, 0, 0.15); } + +/* Thickbox: Plugin information */ +#sidemenu a.current { + background: #f1f1f1; + border-bottom-color: #f1f1f1; } + +#plugin-information .action-button { + background: #dd823b; } + +/* Responsive Component */ +div#wp-responsive-toggle a:before { + color: #f3f1f1; } + +.wp-responsive-open div#wp-responsive-toggle a { + border-color: transparent; + background: #dd823b; } + +.star-rating .star { + color: #dd823b; } + +.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a { + background: #be3631; } diff --git a/wp-admin/css/colors/sunrise/colors.min.css b/wp-admin/css/colors/sunrise/colors.min.css new file mode 100644 index 0000000..39dd213 --- /dev/null +++ b/wp-admin/css/colors/sunrise/colors.min.css @@ -0,0 +1 @@ +html{background:#f1f1f1}a{color:#0074a2}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,a:active,a:focus,a:hover,div.dashboard-widget-submit input:hover{color:#0099d5}input[type=checkbox]:checked:before{color:#dd823b}input[type=radio]:checked:before{background:#dd823b}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0099d5}.wp-core-ui .button-primary{background:#dd823b;border-color:#c36822;color:#fff;-webkit-box-shadow:inset 0 1px 0 #e8ab7c,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #e8ab7c,0 1px 0 rgba(0,0,0,.15)}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#d97326;border-color:#ad5c1e;color:#fff;-webkit-box-shadow:inset 0 1px 0 #e59d66,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #e59d66,0 1px 0 rgba(0,0,0,.15)}.wp-core-ui .button-primary:active{background:#c36822;border-color:#ad5c1e;color:#fff;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#d1cbc7!important;background:#cc6c23!important;border-color:#ad5c1e!important;text-shadow:none!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#cf4944}.wp-core-ui .wp-ui-text-primary{color:#cf4944}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#dd823b}.wp-core-ui .wp-ui-text-highlight{color:#dd823b}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#ccaf0b}.wp-core-ui .wp-ui-text-notification{color:#ccaf0b}.wp-core-ui .wp-ui-text-icon{color:#f3f1f1}#add-new-comment a:hover,.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover{color:#fff;background-color:#cf4944}.view-switch a.current:before{color:#cf4944}.view-switch a:hover:before{color:#ccaf0b}.post-com-count:hover:after{border-top-color:#cf4944}.post-com-count:hover span{color:#fff;background-color:#cf4944}strong .post-com-count:after{border-top-color:#ccaf0b}strong .post-com-count span{background-color:#ccaf0b}#adminmenu,#adminmenuback,#adminmenuwrap{background:#cf4944}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f3f1f1}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#dd823b}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#be3631}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-right-color:#be3631}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu .wp-submenu-head,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#f0c8c6}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#f7e3d3}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#f7e3d3}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-right-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#dd823b}#adminmenu li.wp-has-current-submenu div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#ccaf0b}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#be3631}#collapse-menu{color:#f3f1f1}#collapse-menu:hover{color:#fff}#collapse-button div:after{color:#f3f1f1}#collapse-menu:hover #collapse-button div:after{color:#fff}#wpadminbar{color:#fff;background:#cf4944}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f3f1f1}#wpadminbar .ab-top-menu>li.hover>.ab-item,#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar .ab-top-menu>li:hover>.ab-item,#wpadminbar .ab-top-menu>li>.ab-item:focus,#wpadminbar-nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus{color:#f7e3d3;background:#be3631}#wpadminbar>#wp-toolbar a:focus span.ab-label,#wpadminbar>#wp-toolbar li.hover span.ab-label,#wpadminbar>#wp-toolbar li:hover span.ab-label{color:#f7e3d3}#wpadminbar .menupop .ab-sub-wrapper{background:#be3631}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#cf6b67}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar-nojs .quicklinks .menupop:hover ul li a{color:#f0c8c6}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f3f1f1}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:after,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:after,#wpadminbar li:hover .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover{color:#f7e3d3}#wpadminbar #adminbarsearch:before{color:#f3f1f1}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#d66460}#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder{color:#fff;opacity:.7}#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder{color:#fff;opacity:.7}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#d66460;background-color:#d66460}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#f7e3d3}#wpadminbar #wp-admin-bar-user-info .username{color:#f0c8c6}.wp-pointer .wp-pointer-content h3{background-color:#dd823b;border-color:#d97326}.wp-pointer .wp-pointer-content h3:before{color:#dd823b}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow{border-bottom-color:#dd823b}.media-item .bar,.media-progress-bar div{background-color:#dd823b}.details.attachment{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 5px #dd823b;box-shadow:0 0 0 1px #fff,0 0 0 5px #dd823b}.attachment.details .check{background-color:#dd823b;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #dd823b;box-shadow:0 0 0 1px #fff,0 0 0 2px #dd823b}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme:hover:after{background:#dd823b}.theme-browser .theme.add-new-theme:hover span:after{color:#dd823b}.theme-overlay .theme-header .close:hover,.theme-overlay .theme-header .left:hover,.theme-overlay .theme-header .right:hover{background:#dd823b}.theme-filter.current,.theme-section.current{border-bottom-color:#cf4944}body.more-filters-opened .more-filters,body.more-filters-opened .more-filters:before{color:#fff;background-color:#cf4944}.widgets-chooser li.widgets-chooser-selected,body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover,body.more-filters-opened .more-filters:hover:before{background-color:#dd823b;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}#customize-theme-controls .widget-area-select .selected{background-color:#dd823b;color:#fff}.wp-slider .ui-slider-handle,.wp-slider .ui-slider-handle.focus,.wp-slider .ui-slider-handle.ui-state-hover{background:#dd823b;border-color:#c36822;-webkit-box-shadow:inset 0 1px 0 #e8ab7c,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #e8ab7c,0 1px 0 rgba(0,0,0,.15)}#sidemenu a.current{background:#f1f1f1;border-bottom-color:#f1f1f1}#plugin-information .action-button{background:#dd823b}div#wp-responsive-toggle a:before{color:#f3f1f1}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#dd823b}.star-rating .star{color:#dd823b}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#be3631} \ No newline at end of file diff --git a/wp-admin/css/colors/sunrise/colors.scss b/wp-admin/css/colors/sunrise/colors.scss new file mode 100644 index 0000000..5dd8d82 --- /dev/null +++ b/wp-admin/css/colors/sunrise/colors.scss @@ -0,0 +1,6 @@ +$base-color: #cf4944; +$highlight-color: #dd823b; +$notification-color: #ccaf0b; +$menu-submenu-focus-text: lighten( $highlight-color, 35% ); + +@import "../_admin.scss"; diff --git a/wp-admin/css/common-rtl.css b/wp-admin/css/common-rtl.css new file mode 100644 index 0000000..72c6776 --- /dev/null +++ b/wp-admin/css/common-rtl.css @@ -0,0 +1,2637 @@ +/* 2 column liquid layout */ +#wpwrap { + height: auto; + min-height: 100%; + width: 100%; + position: relative; + -webkit-font-smoothing: subpixel-antialiased; +} + +#wpcontent { + height: 100%; +} + +#wpcontent, +#wpfooter { + margin-right: 180px; +} + +.folded #wpcontent, +.folded #wpfooter { + margin-right: 56px; +} + +#wpbody-content { + padding-bottom: 65px; + float: right; + width: 100%; + overflow: visible !important; +} + +/* inner 2 column liquid layout */ + +.inner-sidebar { + float: left; + clear: left; + display: none; + width: 281px; + position: relative; +} + +.columns-2 .inner-sidebar { + margin-left: 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: right; + clear: right; + width: 100%; + margin-left: -2000px; +} + +.has-right-sidebar #post-body-content { + margin-left: 300px; + float: none; + width: auto; +} + +/* 2 columns main area */ + +#col-container, +#col-left, +#col-right { + overflow: hidden; + padding: 0; + margin: 0; +} + +#col-left { + width: 35%; +} + +#col-right { + float: left; + clear: left; + width: 65%; +} + +.col-wrap { + padding: 0 7px; +} + +/* utility classes */ +.alignleft { + float: right; +} + +.alignright { + float: left; +} + +.textleft { + text-align: right; +} + +.textright { + text-align: left; +} + +.clear { + clear: both; +} + +/* Hide visually but not from screen readers */ +.screen-reader-text, +.screen-reader-text span, +.ui-helper-hidden-accessible { + position: absolute; + margin: -1px; + padding: 0; + height: 1px; + width: 1px; + overflow: hidden; + clip: rect(0 0 0 0); + border: 0; +} + +.screen-reader-shortcut { + position: absolute; + top: -1000em; +} + +.screen-reader-shortcut:focus { + right: 6px; + top: -25px; + height: auto; + width: auto; + display: block; + font-size: 14px; + font-weight: 600; + padding: 15px 23px 14px; + background: #f1f1f1; + color: #21759b; + z-index: 100000; + line-height: normal; + -webkit-box-shadow: 0 0 2px 2px rgba(0,0,0,.6); + box-shadow: 0 0 2px 2px rgba(0,0,0,.6); + text-decoration: none; + outline: none; +} + +.hidden, +.js .closed .inside, +.js .hide-if-js, +.no-js .hide-if-no-js, +.js.wp-core-ui .hide-if-js, +.js .wp-core-ui .hide-if-js, +.no-js.wp-core-ui .hide-if-no-js, +.no-js .wp-core-ui .hide-if-no-js { + display: none; +} + +/* @todo: Take a second look. Large chunks of shared color, from the colors.css merge */ +.widget-top, +.menu-item-handle, +.widget-inside, +#menu-settings-column .accordion-container, +#menu-management .menu-edit, +.manage-menus, +table.widefat, +.stuffbox, +p.popular-tags, +.widgets-holder-wrap, +.wp-editor-container, +.popular-tags, +.feature-filter, +.imgedit-group { + border: 1px solid #e5e5e5; + -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.04); + box-shadow: 0 1px 1px rgba(0,0,0,0.04); +} + +table.widefat, +.wp-editor-container, +.stuffbox, +p.popular-tags, +.widgets-holder-wrap, +.popular-tags, +.feature-filter, +.imgedit-group { + background: #fff; +} + +/* general */ +html, +body { + height: 100%; + margin: 0; + padding: 0; +} + +html { + background: #f1f1f1; +} + +body { + color: #444; + font-family: "Open Sans", sans-serif; + font-size: 13px; + line-height: 1.4em; + min-width: 600px; +} + +body.iframe { + min-width: 0; + padding-top: 1px; +} + +iframe, +img { + border: 0; +} + +td { + font-family: inherit; + font-size: inherit; + font-weight: inherit; + line-height: inherit; +} + +a { + color: #0074a2; + -webkit-transition-property: border, background, color; + transition-property: border, background, color; + -webkit-transition-duration: .05s; + transition-duration: .05s; + -webkit-transition-timing-function: ease-in-out; + transition-timing-function: ease-in-out; +} + +a, +div { + outline: 0; +} + +a:hover, +a:active { + color: #2ea2cc; +} + +a:focus { + color: #124964; +} + +a:focus, +a:active { + outline: thin dotted; +} + +#adminmenu a:focus, +#adminmenu a:active, +.screen-reader-text:focus { + outline: none; +} + +blockquote, +q { + quotes: none; +} + +blockquote:before, +blockquote:after, +q:before, +q:after { + content: ''; + content: none; +} + +p { + font-size: 13px; + line-height: 1.5; + margin: 1em 0; +} + +blockquote { + margin: 1em; +} + +li, +dd { + margin-bottom: 6px; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + display: block; + font-weight: 600; +} + +h1 { + font-size: 2em; + margin: .67em 0; +} + +h2 { + color: #222; + font-size: 1.5em; + margin: .83em 0; + font-weight: 400; +} + +h3 { + color: #222; + font-size: 1.3em; + margin: 1em 0; +} + +h4 { + font-size: 1em; + margin: 1.33em 0; +} + +h5 { + font-size: 0.83em; + margin: 1.67em 0; +} + +h6 { + font-size: 0.67em; + margin: 2.33em 0; +} + +ul, +ol { + padding: 0; +} + +ul { + list-style: none; +} + +ol { + list-style-type: decimal; + margin-right: 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-right: 1.8em; +} + +ul.ul-disc > li, +ul.ul-square > li, +ol.ol-decimal > li { + margin: 0 0 0.5em; +} + +/* @noflip */ +.ltr { + direction: ltr; +} + +/* @noflip */ +.code, +code { + font-family: Consolas, Monaco, monospace; + direction: ltr; +} + +kbd, +code { + padding: 3px 5px 2px 5px; + margin: 0 1px; + background: #eaeaea; + background: rgba(0,0,0,0.07); + font-size: 13px; +} + +.subsubsub { + list-style: none; + margin: 8px 0 0; + padding: 0; + font-size: 13px; + float: right; + color: #666; +} + +.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: 600; + border: none; +} + +.subsubsub li { + display: inline-block; + margin: 0; + padding: 0; + white-space: nowrap; +} + +/* .widefat - main style for tables */ +.widefat { + border-spacing: 0; + width: 100%; + clear: both; + margin: 0; +} + +.widefat * { + word-wrap: break-word; +} + +.widefat a { + text-decoration: none; +} + +.widefat td, +.widefat th { + padding: 8px 10px; +} + +.widefat thead th { + border-bottom: 1px solid #e1e1e1; +} + +.widefat tfoot th { + border-top: 1px solid #e1e1e1; + border-bottom: none; +} + +.widefat .no-items td { + border-bottom-width: 0; +} + +.widefat td { + vertical-align: top; +} + +.widefat td, +.widefat td p, +.widefat td ol, +.widefat td ul { + font-size: 13px; + line-height: 1.5em; +} + +.widefat th { + text-align: right; + line-height: 1.3em; + font-size: 14px; +} + +.widefat th input { + margin: 0 8px 0 0; + padding: 0; + vertical-align: text-top; +} + +.widefat .check-column { + width: 2.2em; + padding: 6px 0 25px; + vertical-align: top; +} + +.widefat th input[type=checkbox] { + margin-top: -1px; +} + +.widefat tbody th.check-column { + padding: 9px 0 22px; +} + +.widefat.media .check-column { + padding-top: 8px; +} + +.widefat thead th.check-column, +.widefat tbody th.check-column, +.widefat tfoot th.check-column { + padding: 11px 3px 0 0; +} + +.widefat thead th.check-column { + padding-top: 10px; +} + +.update-php div.updated, +.update-php div.error { + margin-right: 0; +} + +.no-js .widefat thead .check-column input, +.no-js .widefat tfoot .check-column input { + display: none; +} + +.widefat .num, +.column-comments, +.column-links, +.column-posts { + text-align: center; +} + +.widefat th#comments { + vertical-align: middle; +} + +.wrap { + margin: 10px 2px 0 20px; +} + +div.updated, +div.error { + padding: 0 0.6em; + margin: 5px 15px 2px; +} + +div.updated p, +div.error p { + margin: 0.5em 0; + padding: 2px; +} + +.wrap div.updated, +.wrap div.error, +.media-upload-form div.error { + margin: 5px 0 15px; +} + +div.updated { + border-right: 4px solid #7ad03a; + padding: 1px 12px; + background-color: #fff; + -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1); + box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1); +} + +div.error { + border-right: 4px solid #dd3d36; + background: #fff; + -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1); + box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1); + padding: 1px 12px; +} + +.attention { + color: #2ea2cc; +} + +.wrap h2, +.subtitle { + font-weight: normal; + margin: 0; +} + +.wrap h2 { + font-size: 23px; + font-weight: 400; + padding: 9px 0 4px 15px; + line-height: 29px; +} + +.subtitle { + color: #777; + font-size: 14px; + padding-right: 25px; +} + +.wrap .add-new-h2, +.wrap .add-new-h2:active { + margin-right: 4px; + padding: 4px 8px; + position: relative; + top: -3px; + text-decoration: none; + border: none; + -webkit-border-radius: 2px; + border-radius: 2px; + background: #e0e0e0; + text-shadow: none; + font-weight: 600; + font-size: 13px; +} + +.wrap .add-new-h2:hover { + background: #2ea2cc; + color: #fff; +} + +.wrap h2.long-header { + padding-left: 0; +} + +.wp-dialog { + background-color: #fff; +} + +.widgets-chooser ul, +#widgets-left .widget-in-question .widget-top, +#available-widgets .widget-top:hover, +div#widgets-right .widget-top:hover, +#widgets-left .widget-top:hover { + border-color: #999; + -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.1); + box-shadow: 0 1px 2px rgba(0,0,0,0.1); +} + +.sorthelper { + background-color: #ccf3fa; +} + +.ac_match, +.subsubsub a.current { + color: #000; +} + +.alternate, +.alt { + background-color: #f9f9f9; +} + +.bar { + background-color: #e8e8e8; + border-left-color: #99d; +} + +.media-upload-form label.form-help, +td.help { + color: #9a9a9a; +} + +/* Helper classes for plugins to leverage the active WordPress color scheme */ + +.highlight { + background-color: #e4f2fd; + color: #000; +} + +.wp-ui-primary { + color: #fff; + background-color: #333; +} +.wp-ui-text-primary { + color: #333; +} + +.wp-ui-highlight { + color: white; + background-color: #1e8cbe; +} +.wp-ui-text-highlight { + color: #1e8cbe; +} + +.wp-ui-notification { + color: #fff; + background-color: #d54e21; +} +.wp-ui-text-notification { + color: #d54e21; +} + +.wp-ui-text-icon { + color: #999; +} + +/*------------------------------------------------------------------------------ + 1.0 - Text Styles +------------------------------------------------------------------------------*/ + +.widget .widget-top, +.postbox h3, +.stuffbox h3, +.control-section .accordion-section-title, +h3.dashboard-widget-title, +h3.dashboard-widget-title span, +h3.dashboard-widget-title small, +.sidebar-name, +#nav-menu-header, +#nav-menu-footer, +.menu-item-handle, +.checkbox, +.side-info, +#your-profile #rich_editing, +.widefat thead th, +.widefat tfoot th { + line-height: 1.4em; +} + +.widget .widget-top, +.menu-item-handle { + background: #fafafa; + color: #222; +} + +.postbox h3, +#namediv h3, +#submitdiv h3 { + border-bottom: 1px solid #eee; +} + +.quicktags, +.search { + background-color: #ccc; + color: #000; + font-size: 12px; +} + +.icon32 { + display: none; +} + +/* @todo can we combine these into a class or use an existing dashicon one? */ +#welcome-panel.welcome-panel .welcome-panel-close::before, +.tagchecklist span a:before, +#bulk-titles div a:before { + background: none; + color: #bbb; + content: '\f153'; + display: block !important; + font: normal 16px/1 'dashicons'; + speak: none; + height: 20px; + margin: 2px 0; + text-align: center; + width: 20px; + -webkit-font-smoothing: antialiased !important; +} + +#welcome-panel.welcome-panel .welcome-panel-close:hover:before, +.tagchecklist span a:hover:before, +#bulk-titles div a:hover:before { + color: #c00; +} + +.key-labels label { + line-height: 24px; +} + +strong, b { + font-weight: 600; +} + +.pre { + /* https://developer.mozilla.org/en-US/docs/CSS/white-space */ + white-space: pre-wrap; /* css-3 */ + word-wrap: break-word; /* IE 5.5 - 7 */ +} + +.howto { + color: #666; + font-style: italic; + display: block; +} + +p.install-help { + margin: 8px 0; + font-style: italic; +} + +.no-break { + white-space: nowrap; +} + +hr { + border: 0; + border-top: 1px solid #ddd; + border-bottom: 1px solid #fafafa; +} + +.row-actions span.delete a, +.row-actions span.trash a, +.row-actions span.spam a, +.plugins a.delete, +#all-plugins-table .plugins a.delete, +#search-plugins-table .plugins a.delete, +.submitbox .submitdelete, +#media-items a.delete, +#media-items a.delete-permanently, +#nav-menu-footer .menu-delete { + color: #a00; +} + +abbr.required, +.file-error, +.widget-control-remove:hover, +.row-actions .delete a:hover, +.row-actions .trash a:hover, +.row-actions .spam a:hover, +.plugins a.delete:hover, +#all-plugins-table .plugins a.delete:hover, +#search-plugins-table .plugins a.delete:hover, +.submitbox .submitdelete:hover, +#media-items a.delete:hover, +#media-items a.delete-permanently:hover, +#nav-menu-footer .menu-delete:hover { + color: #f00; + text-decoration: none; + border: none; +} + +/*------------------------------------------------------------------------------ + 3.0 - Actions +------------------------------------------------------------------------------*/ + +#major-publishing-actions { + padding: 10px; + clear: both; + border-top: 1px solid #ddd; + background: #f5f5f5; +} + +#delete-action { + line-height: 28px; + vertical-align: middle; + text-align: right; + float: right; +} + +#publishing-action { + text-align: left; + float: left; + line-height: 23px; +} + +#publishing-action .spinner { + float: right; +} + +#misc-publishing-actions { + padding: 6px 0 0; +} + +.misc-pub-section { + padding: 6px 10px 8px; +} + +#minor-publishing-actions { + padding: 10px 10px 0 10px; + text-align: left; +} + +#save-post { + float: right; +} + +.preview { + float: left; +} + +#sticky-span { + margin-right: 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: 1px solid #dadada; +} + +.side-info ul { + margin: 0; + padding-right: 18px; + list-style: square; + color: #666; +} + +.approve, +.unapproved .unapprove { + display: none; +} + +.unapproved .approve, +.spam .approve, +.trash .approve { + display: inline; +} + +td.action-links, +th.action-links { + text-align: left; +} + + +/*------------------------------------------------------------------------------ + 4.0 - Notifications +------------------------------------------------------------------------------*/ + +#update-nag, +.update-nag { + display: inline-block; + line-height: 19px; + padding: 11px 15px; + font-size: 14px; + text-align: right; + margin: 25px 2px 0 20px; + background-color: #fff; + border-right: 4px solid #ffba00; + -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1); + box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1); +} + +.update-message { + color: #000; +} + +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; +} + +.update-php .spinner { + float: none; + margin: -4px 0; +} + +#ajax-loading, +.ajax-loading, +.ajax-feedback, +.imgedit-wait-spin, +.list-ajax-loading { /* deprecated */ + visibility: hidden; +} + +#ajax-response.alignleft { + margin-right: 2em; +} + +/* @todo: this does not need its own section anymore */ +/*------------------------------------------------------------------------------ + 6.0 - Admin Header +------------------------------------------------------------------------------*/ +#adminmenu a, +#sidemenu a, +#taglist a, +#catlist a { + text-decoration: none; +} + +/*------------------------------------------------------------------------------ + 6.1 - Screen Options Tabs +------------------------------------------------------------------------------*/ + +#screen-options-wrap, +#contextual-help-wrap { + margin: 0; + padding: 8px 20px 12px; + position: relative; +} + +#contextual-help-wrap { + overflow: auto; + margin-right: 0 !important; +} + +#screen-meta .screen-reader-text { + visibility: hidden; +} + +#screen-meta-links { + margin: 0 0 0 20px; +} + +#screen-meta-links a { + padding: 3px 16px 3px 6px; +} + +#screen-meta-links a:focus { + outline: none; +} + +/* screen options and help tabs revert */ +#screen-meta { + display: none; + margin: 0 0px -1px 20px; + position: relative; + background-color: #fff; + border: 1px solid #ddd; + border-top: none; + -webkit-box-shadow: 0 1px 0 rgba(0,0,0,.025); + box-shadow: 0 1px 0 rgba(0,0,0,.025); +} + +#screen-options-link-wrap, +#contextual-help-link-wrap { + float: left; + height: 28px; + margin: 0 6px 0 0; + border: 1px solid #ddd; + border-top: none; + background: #fff; + -webkit-box-shadow: 0 1px 1px -1px rgba(0,0,0,0.1); + box-shadow: 0 1px 1px -1px rgba(0,0,0,0.1); +} + +#screen-meta-links .screen-meta-toggle { + position: relative; + top: 0; +} + +#screen-meta-links a { + color: #777; +} + +#screen-meta-links a:hover, +#screen-meta-links a:active, +#screen-meta-links a:focus { + color: #333; +} + +#screen-meta-links a:focus { + border-color: #aaa; + -webkit-box-shadow: 0 2px 3px rgba(0,0,0,0.15); + box-shadow: 0 2px 3px rgba(0,0,0,0.15); +} + +#screen-meta-links a.show-settings { + display: block; + font-size: 13px; + height: 22px; + line-height: 22px; + text-decoration: none; + z-index: 1; +} + +#screen-meta-links a:after { + left: 0; + content: '\f140'; + font: normal 20px/1 'dashicons'; + speak: none; + display: inline-block; + padding: 0 0 0 5px; + bottom: 2px; + position: relative; + vertical-align: bottom; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-decoration: none !important; + color: #bbb; +} + +#screen-meta-links a.screen-meta-active:after { + content: '\f142'; +} + +#screen-meta-links a.show-settings:hover { + text-decoration: none; +} +/* end screen options and help tabs */ + +.toggle-arrow { + background-repeat: no-repeat; + background-position: top right; + background-color: transparent; + height: 22px; + line-height: 22px; + display: block; +} + +.toggle-arrow-active { + background-position: bottom right; +} + +#screen-options-wrap h5, +#contextual-help-wrap h5 { + margin: 8px 0; + font-size: 13px; +} + +.metabox-prefs label { + display: inline-block; + padding-left: 15px; + line-height: 30px; +} + +.metabox-prefs label input[type=checkbox] { + margin-top: -4px; + margin-left: 6px; +} + +.metabox-prefs label input { + margin: 0 2px 0 5px; +} + +.metabox-prefs .columns-prefs label input { + margin: 0 2px; +} + +.metabox-prefs label a { + display: none; +} + +/*------------------------------------------------------------------------------ + 6.2 - Help Menu +------------------------------------------------------------------------------*/ + +#contextual-help-wrap { + padding: 0; +} + +#contextual-help-columns { + position: relative; +} + +#contextual-help-back { + position: absolute; + top: 0; + bottom: 0; + right: 150px; + left: 170px; + border: 1px solid #e1e1e1; + border-top: none; + border-bottom: none; + background: #f6fbfd; +} + +#contextual-help-wrap.no-sidebar #contextual-help-back { + left: 0; + border-left-width: 0; + -webkit-border-bottom-left-radius: 2px; + border-bottom-left-radius: 2px; +} + +.contextual-help-tabs { + float: right; + 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: 0 2px 0 0; + border-color: transparent; +} + +.contextual-help-tabs a { + display: block; + padding: 5px 12px 5px 5px; + line-height: 18px; + text-decoration: none; + border: 1px solid transparent; + border-left: none; + border-right: none; +} + +.contextual-help-tabs a:hover { + color: #333; +} + +.contextual-help-tabs .active { + padding: 0; + margin: 0 0 0 -1px; + border-right: 2px solid #2ea2cc; + background: #f6fbfd; + -webkit-box-shadow: 0 2px 0 rgba(0,0,0,0.02), 0 1px 0 rgba(0,0,0,0.02); + box-shadow: 0 2px 0 rgba(0,0,0,0.02), 0 1px 0 rgba(0,0,0,0.02); +} + +.contextual-help-tabs .active a { + border-color: #e1e1e1; + color: #333; +} + +.contextual-help-tabs-wrap { + padding: 0 20px; + overflow: auto; +} + +.help-tab-content { + display: none; + margin: 0 0 12px 22px; + line-height: 1.6em; +} + +.help-tab-content.active { + display: block; +} + +.help-tab-content ul li { + list-style-type: disc; + margin-right: 18px; +} + +.contextual-help-sidebar { + width: 150px; + float: left; + padding: 0 12px 0 8px; + overflow: auto; +} + +/*------------------------------------------------------------------------------ + 8.0 - Layout Blocks +------------------------------------------------------------------------------*/ + +html.wp-toolbar { + padding-top: 32px; + -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; + color: #555; +} + +.widefat th { + font-weight: normal; +} + +.widefat thead tr th, +.widefat tfoot tr th { + color: #333; +} + +.widefat td p { + margin: 2px 0 0.8em; +} + +.widefat p, +.widefat ol, +.widefat ul { + color: #333; +} + +.widefat .column-comment p { + margin: 0.6em 0; +} + +/* Screens with postboxes */ +.postbox-container { + float: right; +} + +.postbox-container .meta-box-sortables { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +#wpbody-content .metabox-holder { + padding-top: 10px; +} + +.metabox-holder .postbox-container .empty-container { + border: 3px dashed #bbb; + 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; +} + +#post-body-content { + width: 100%; + min-width: 463px; + float: right; +} + +#post-body.columns-2 #postbox-container-1 { + float: left; + margin-left: -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 .metabox-holder .postbox-container .empty-container { + border: 0 none; + height: 0; + min-height: 0; + } +} + +.js .postbox .hndle { + cursor: move; +} + +.hndle a { + font-size: 11px; + font-weight: normal; +} + +.postbox .handlediv { + float: left; + width: 27px; + height: 30px; +} + +.js .postbox .handlediv { + cursor: pointer; +} + +.sortable-placeholder { + border: 1px dashed #bbb; + margin-bottom: 20px; +} + +.postbox, +.stuffbox { + margin-bottom: 20px; + padding: 0; + line-height: 1; +} + +.postbox h3, +.stuffbox h3 { + margin-top: 1px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.js .widget .widget-top, +.js .postbox h3 { + cursor: move; +} + +.postbox .inside, +.stuffbox .inside { + padding: 0 12px 12px; + line-height: 1.4em; + font-size: 13px; +} + +.postbox .inside { + margin: 11px 0; + position: relative; +} + +.postbox .inside > p:last-child, +.rss-widget ul li:last-child { + margin-bottom: 1px !important; +} + +.postbox.closed h3 { + border: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +.postbox table.form-table { + margin-bottom: 0; +} + +.postbox table.widefat { + -webkit-box-shadow: none; + box-shadow: none; +} + +.temp-border { + border: 1px dotted #ccc; +} + +.columns-prefs label { + padding: 0 5px; +} + +/* @todo: what is this doing here */ +#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, +#ed_reply_toolbar #ed_reply_strong, +.item-controls .item-order a, +.feature-filter .feature-name { + font-weight: 600; +} + +/*------------------------------------------------------------------------------ + 21.0 - Admin Footer +------------------------------------------------------------------------------*/ + +#wpfooter { + position: absolute; + bottom: 0; + right: 0; + left: 0; + padding: 10px 0; + margin-left: 20px; + color: #777; +} + +#wpfooter p { + font-size: 13px; + margin: 0; + line-height: 20px; +} + +#footer-thankyou { + font-style: italic; +} + +#wpfooter a { + text-decoration: none; +} + +#wpfooter a:hover { + text-decoration: underline; +} + +/*------------------------------------------------------------------------------ + 25.0 - Tabbed Admin Screen Interface (Experimental) +------------------------------------------------------------------------------*/ + +.nav-tab { + border: 1px solid #ccc; + border-bottom: none; + background: #e4e4e4; + color: #555; + font-size: 12px; + line-height: 16px; + display: inline-block; + padding: 4px 14px 6px; + text-decoration: none; + margin: -4px 0 -1px 4px; +} + +.nav-tab:hover { + background-color: #fff; + color: #464646; +} + +.nav-tab-active { + color: #464646; +} + +.nav-tab-active, +.nav-tab-active:hover { + border-bottom: 1px solid #f1f1f1; + background: #f1f1f1; + color: #000; +} + +h2.nav-tab-wrapper, +h3.nav-tab-wrapper { + border-bottom: 1px solid #ccc; + padding-bottom: 0; + padding-right: 10px; +} + +h2 .nav-tab { + padding: 6px 10px; + font-weight: bold; + font-size: 15px; + line-height: 24px; +} + + +/*------------------------------------------------------------------------------ + 26.0 - Misc +------------------------------------------------------------------------------*/ + +.spinner { + background: url(../images/spinner.gif) no-repeat; + -webkit-background-size: 20px 20px; + background-size: 20px 20px; + display: none; + float: left; + opacity: 0.7; + filter: alpha(opacity=70); + width: 20px; + height: 20px; + margin: 2px 5px 0; +} + +#template div { + margin-left: 190px; +} + +.metabox-holder h3 { + font-size: 14px; + padding: 8px 12px; + margin: 0; + line-height: 1.4; +} + +#templateside ul li a { + text-decoration: none; +} + +#sidemenu { + margin: -30px 315px 0 15px; + list-style: none; + position: relative; + float: left; + padding-right: 10px; + font-size: 12px; +} + +#sidemenu a { + padding: 0 7px; + display: block; + float: right; + line-height: 28px; + border-top: 1px solid #f9f9f9; + border-bottom: 1px solid #dfdfdf; + background-color: #f9f9f9; + -webkit-transition: none; + transition: none; +} + +#sidemenu li { + display: inline; + line-height: 200%; + list-style: none; + text-align: center; + white-space: nowrap; + margin: 0; + padding: 0; +} + +/* @todo: remove border radius */ +#sidemenu a.current { + font-weight: normal; + padding-right: 6px; + padding-left: 6px; + -webkit-border-top-right-radius: 3px; + border-top-right-radius: 3px; + -webkit-border-top-left-radius: 3px; + border-top-left-radius: 3px; + border: 1px solid #dfdfdf; + border-bottom-color: #f1f1f1; + background-color: #f1f1f1; + color: #000; +} + +#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: right; +} + +.error-message { + color: red; + font-weight: 600; +} + +/* Scrollbar fix for bulk upgrade iframe */ +body.iframe { + height: 98%; +} + +/* Upgrader styles, Specific to Language Packs */ +.lp-show-latest p { + display: none; +} +.lp-show-latest p:last-child, +.lp-show-latest .lp-error p { + display: block; +} + +/* - Only used once or twice in all of WP - deprecate for global style +------------------------------------------------------------------------------*/ +td.media-icon { + text-align: center; + width: 80px; + padding-top: 8px; + padding-bottom: 8px; +} + +td.media-icon img { + max-width: 80px; + max-height: 60px; +} + +#howto { + font-size: 11px; + margin: 0 5px; + display: block; +} + +.importers td { + padding-left: 14px; +} + +.importers { + font-size: 16px; + width: auto; +} + +#post-body #post-body-content #namediv h3 { + margin-top: 0; +} + +#namediv h3 label { + vertical-align: baseline; +} + +#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; +} + +/* - Used - but could/should be deprecated with a CSS reset +------------------------------------------------------------------------------*/ +.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; +} + +/* Star Ratings - Back-compat for pre-3.8 */ +div.star-holder { + position: relative; + height: 17px; + width: 100px; + background: url(../images/stars.png?ver=20121108) repeat-x bottom right; +} + +div.star-holder .star-rating { + background: url(../images/stars.png?ver=20121108) repeat-x top right; + height: 17px; + float: right; +} + +/* Star Ratings */ +.star-rating { + white-space: nowrap; +} +.star-rating .star { + display: inline-block; + width: 20px; + height: 20px; + -webkit-font-smoothing: antialiased; + font-size: 20px; + line-height: 1; + font-family: 'dashicons'; + text-decoration: inherit; + font-weight: normal; + font-style: normal; + vertical-align: top; + -webkit-transition: color .1s ease-in 0; + transition: color .1s ease-in 0; + text-align: center; + color: #0074a2; +} + +.star-rating .star-full:before { + content:'\f155'; +} + +.star-rating .star-half:before { + content:'\f459'; +} + +.rtl .star-rating .star-half { + -webkit-transform: rotateY(180deg); + -ms-transform: rotateY(180deg); + transform: rotateY(180deg); +} + +.star-rating .star-empty:before { + content:'\f154'; +} + +div.action-links { + font-weight: normal; + margin: 6px 0 0; +} + +/* Plugin install thickbox */ +#plugin-information { + background: #fcfcfc; + position: fixed; + top: 0; + left: 0; + bottom: 0; + right: 0; + height: auto; + padding: 0; +} + +#plugin-information-title { + padding: 0 20px 0 76px; + font-size: 22px; + font-weight: 600; + line-height: 56px; + top: 0; + left: 0; + right: 0; + height: 56px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +#plugin-information-tabs { + padding: 0 16px; + position: absolute; + top: 56px; + left: 0; + right: 0; + height: 36px; + z-index: 1; +} + +#plugin-information-tabs a { + position: relative; + float: right; + padding: 8px 10px 9px; + margin: 0; + height: 18px; + line-height: 18px; + font-size: 14px; + text-decoration: none; + -webkit-transition: none; + transition: none; +} + +#plugin-information-tabs a.current { + margin: -1px -1px 0; + background: #fff; + border: 1px solid #ddd; + border-bottom: none; + color: #333; +} + +#plugin-information-tabs a:active, +#plugin-information-tabs a:focus { + outline: none; +} + +#plugin-information-content { + background: #fff; + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + position: absolute; + top: 90px; + left: 0; + bottom: 58px; + right: 0; +} + +#section-holder { + margin: 0; + padding: 10px 26px; + position: absolute; + top: 0; + left: 250px; + bottom: 0; + right: 0; + overflow: auto; +} + +#section-holder .updated { + margin: 16px 0; +} + +#plugin-information .fyi { + background: #f3f3f3; + border-right: 1px solid #ddd; + color: #666; + padding: 16px; + position: absolute; + top: 0; + left: 0; + bottom: 0; + width: 217px; + overflow: auto; +} + +#plugin-information .fyi strong { + color: #464646; +} + +#plugin-information .fyi h3 { + font-weight: bold; + text-transform: uppercase; + font-size: 12px; + color: #666; + margin: 24px 0 8px; +} + +#plugin-information .fyi h2 { + font-size: 0.9em; + margin-bottom: 0; + margin-left: 0; +} + +#plugin-information .fyi ul { + padding: 0; + margin: 0; + list-style: none; +} + +#plugin-information .fyi li { + margin: 0 0 10px; +} + +#plugin-information-footer { + padding: 15px 16px; + position: absolute; + left: 0; + bottom: 0; + right: 0; + height: 28px; +} + +#plugin-information .section ul, +#plugin-information .section ol { + list-style-type: disc; + margin-right: 24px; +} + +#plugin-information .section, +#plugin-information .section p { + font-size: 14px; + line-height: 1.7; +} + +#plugin-information #section-screenshots ol { + list-style: none; + margin: 0; +} + +#plugin-information #section-screenshots li img { + vertical-align: text-top; + margin-top: 16px; + max-width: 100%; + width: auto; + height: auto; + -webkit-box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.3 ); + box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.3 ); +} + +#plugin-information #section-screenshots li p { + font-style: italic; + padding-right: 20px; +} + +#plugin-information pre { + padding: 7px; + overflow: auto; + border: 1px solid #ccc; +} + +.plugin-version-author-uri { + font-size: 13px; +} + +@media screen and ( max-width: 782px ) { + #plugin-information-content { + overflow: auto; + bottom: 58px; + } + + #plugin-information .fyi { + border: 1px solid #ddd; + position: static; + width: auto; + margin: 26px 26px 16px; + } + + #section-holder { + position: static; + } + + #plugin-information .fyi h3, + #plugin-information .fyi small { + display: none; + } + + #plugin-information-footer { + padding: 12px 16px 0; + height: 46px; + } +} + +/* Thickbox for Plugin Install screen */ +body.plugin-install-php #TB_window, +body.import-php #TB_window, +body.plugins-php #TB_window, +body.update-core-php #TB_window, +body.index-php #TB_window { + background: #fcfcfc url( ../images/spinner.gif ) no-repeat center; +} + +@media print, + (-o-min-device-pixel-ratio: 5/4), + (-webkit-min-device-pixel-ratio: 1.25), + (min-resolution: 120dpi) { + + body.plugin-install-php #TB_window, + body.import-php #TB_window, + body.plugins-php #TB_window, + body.update-core-php #TB_window, + body.index-php #TB_window { + background: #fcfcfc url( ../images/spinner-2x.gif ) no-repeat center; + -webkit-background-size: 20px 20px; + background-size: 20px 20px; + } +} + +body.plugin-install-php #TB_title, +body.import-php #TB_title, +body.plugins-php #TB_title, +body.update-core-php #TB_title, +body.index-php #TB_title { + float: right; + height: 1px; +} + +body.plugin-install-php #TB_ajaxWindowTitle, +body.import-php #TB_ajaxWindowTitle, +body.plugins-php #TB_ajaxWindowTitle, +body.update-core-php #TB_ajaxWindowTitle, +body.index-php #TB_ajaxWindowTitle { + display: none; +} + +body.plugin-install-php .tb-close-icon, +body.import-php .tb-close-icon, +body.plugins-php .tb-close-icon, +body.update-core-php .tb-close-icon, +body.index-php .tb-close-icon { + line-height: 48px; + width: 48px; + height: 48px; +} + +body.plugin-install-php .tb-close-icon:before, +body.import-php .tb-close-icon:before, +body.plugins-php .tb-close-icon:before, +body.update-core-php .tb-close-icon:before, +body.index-php .tb-close-icon:before { + line-height: 48px; +} + +/* @todo: move this. */ +img { + border: none; +} + +/* Header */ +/* @todo: are these also specific to Press This? */ +#wphead { + border-bottom: 1px solid #dfdfdf; +} + +#wphead h1 a { + color: #464646; +} + +/* @todo: these seem misplaced */ +.js .meta-box-sortables .postbox:hover .handlediv { + margin-left: 0 !important; +} + +/* Metabox collapse arrow indicators */ +.js .sidebar-name .sidebar-name-arrow:before, +.js .meta-box-sortables .postbox .handlediv:before { + left: 12px; + font: normal 20px/1 'dashicons'; + speak: none; + display: inline-block; + padding: 8px 10px; + top: 0; + position: relative; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-decoration: none !important; +} + +.js #widgets-left .sidebar-name .sidebar-name-arrow { + display: none; +} + +.js #widgets-left .widgets-holder-wrap.closed .sidebar-name .sidebar-name-arrow, +.js #widgets-left .sidebar-name:hover .sidebar-name-arrow { + display: block; +} + +/* Show the arrow only on hover */ +.js .sidebar-name .sidebar-name-arrow:before, +.js .meta-box-sortables .postbox .handlediv:before { + content: '\f142'; +} + +.js .widgets-holder-wrap.closed .sidebar-name-arrow:before, +.js .meta-box-sortables .postbox.closed .handlediv:before { + content: '\f140'; +} + +.error a { + text-decoration: underline; +} + +.updated a { + text-decoration: none; + padding-bottom: 2px; +} + +/* @todo: appears to be Press This only and overridden */ +#photo-add-url-div input[type="text"] { + width: 300px; +} + +/* Theme/Plugin Editor */ +.alignleft h3 { + margin: 0; +} + +#template textarea { + font-family: Consolas, Monaco, monospace; + font-size: 13px; + width: 97%; + background: #f9f9f9; + outline: none; +} + +/* @noflip */ +#template textarea, +#docs-list { + direction: ltr; +} + +#template p { + width: 97%; +} + +#templateside { + float: left; + 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 0; + padding: 0; +} + +#templateside li { + margin: 4px 0; +} + +#templateside a, +.theme-editor-php .highlight { + display: block; + padding: 3px 12px 3px 3px; + text-decoration: none; +} + +.theme-editor-php .highlight { + margin: -3px -12px -3px 3px; +} + +#templateside .highlight { + border: none; + font-weight: bold; +} + +.nonessential { + color: #666; + font-size: 11px; + font-style: italic; + padding-right: 12px; +} + +#documentation { + margin-top: 10px; +} + +#documentation label { + line-height: 22px; + vertical-align: baseline; + font-weight: 600; +} + +.fileedit-sub { + padding: 10px 0 8px; + line-height: 180%; +} + +/* @todo: can we use a common class for these? */ +.nav-menus-php .item-edit:before, +.widget-top a.widget-action:after, +.control-section .accordion-section-title:after, +.accordion-section-title:after { + left: 0; + content: '\f140'; + border: none; + background: none; + font: normal 20px/1 'dashicons'; + speak: none; + display: block; + padding: 0; + text-indent: 0; + text-align: center; + position: relative; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-decoration: none !important; +} + +.widget-action, +.handlediv, +.item-edit, +.sidebar-name-arrow, +.accordion-section-title:after { + color: #aaa; +} + +.widget-action:hover, +.handlediv:hover, +.item-edit:hover, +.sidebar-name:hover .sidebar-name-arrow, +.accordion-section-title:hover:after { + color: #777; +} + +.widget-top a.widget-action:after { + padding: 12px 12px 0; +} + +.nav-menus-php .item-edit:before { + line-height: 2.1; +} + +.control-section .accordion-section-title:after, +.accordion-section-title:after { + float: left; + left: 20px; + top: -2px; +} + +.control-section.open .accordion-section-title:after, +#customize-info.open .accordion-section-title:after, +.nav-menus-php .menu-item-edit-active .item-edit:before { + content: '\f142'; +} + +/* Enable draggable on IE10 touch events until it's rolled into jQuery UI core */ +.ui-sortable, +.ui-draggable { + -ms-touch-action: none; + touch-action: none; +} + +.meta-box-sortables.ui-sortable, +.widgets-holder-wrap .ui-draggable, +.widgets-holder-wrap .ui-sortable, +.menu.ui-sortable { + -ms-touch-action: auto; + touch-action: auto; +} + +.meta-box-sortables.ui-sortable .hndle, +.menu.ui-sortable .menu-item-handle { + -ms-touch-action: none; + touch-action: none; +} + +/* Accordion */ + +.accordion-section { + border-bottom: 1px solid #dfdfdf; + margin: 0; +} + +.accordion-section.open .accordion-section-content, +.no-js .accordion-section .accordion-section-content { + display: block; +} + +.accordion-section.open:hover { + border-bottom-color: #dfdfdf; +} + +.accordion-section-content { + display: none; + padding: 10px 20px 15px; + overflow: hidden; + background: #fff; +} + +.accordion-section-title { + margin: 0; + padding: 12px 15px 15px; + position: relative; + border-right: 1px solid #dfdfdf; + border-left: 1px solid #dfdfdf; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.js .accordion-section-title { + cursor: pointer; +} + +.js .accordion-section-title:after { + position: absolute; + top: 12px; + left: 10px; + z-index: 1; +} + +.accordion-section-title:focus { + outline: none; +} + +.accordion-section-title:hover:after, +.accordion-section-title:focus:after { + border-color: #aaa transparent; +} + +.cannot-expand .accordion-section-title { + cursor: auto; +} + +.cannot-expand .accordion-section-title:after { + display: none; +} + +.control-section .accordion-section-title { + border-right: none; + border-left: none; + padding: 10px 14px 11px 10px; + line-height: 21px; + background: #fff; +} + +.control-section .accordion-section-title:after { + top: 11px; +} + +.js .control-section:hover .accordion-section-title, +.js .control-section .accordion-section-title:hover, +.js .control-section.open .accordion-section-title, +.js .control-section .accordion-section-title:focus { + color: #222; + background: #f5f5f5; +} + +.control-section.open .accordion-section-title { + /* When expanded */ + border-bottom: 1px solid #dfdfdf; +} + +/* =Media Queries +-------------------------------------------------------------- */ + +/* @todo: de-duplication */ +@media only screen and (min-width: 769px) { + /* categories */ + #col-left { + width: 35%; + } + + #col-right { + width: 65%; + } +} + +@media only screen and (max-width: 860px) { + + /* categories */ + #col-left { + width: 35%; + } + + #col-right { + width: 65%; + } +} + +@media only screen and (min-width: 980px) { + + /* categories */ + #col-left { + width: 35%; + } + + #col-right { + width: 65%; + } +} + +@media only screen and (max-width: 768px) { + /* categories */ + #col-left { + width: 100%; + } + + #col-right { + width: 100%; + } +} + +/** + * HiDPI Displays + */ +@media print, + (-o-min-device-pixel-ratio: 5/4), + (-webkit-min-device-pixel-ratio: 1.25), + (min-resolution: 120dpi) { + /* Back-compat for pre-3.8 */ + div.star-holder, + div.star-holder .star-rating { + background: url(../images/stars-2x.png?ver=20121108) repeat-x bottom right; + -webkit-background-size: 21px 37px; + background-size: 21px 37px; + } + + .spinner { + background-image: url(../images/spinner-2x.gif); + } + + /* @todo: evaluate - most of these were likely replaced by dashicons */ + .curtime #timestamp, + #screen-meta-links a.show-settings, + .widget-top a.widget-action, + .widget-top a.widget-action:hover, + .sidebar-name-arrow, + .sidebar-name:hover .sidebar-name-arrow, + .meta-box-sortables .postbox:hover .handlediv, + .tagchecklist span a, + #bulk-titles div a, + .tagchecklist span a:hover, + #bulk-titles div a:hover { + background: none !important; + } + +} + +@-ms-viewport { + width: device-width; +} + +@media screen and ( max-width: 782px ) { + html.wp-toolbar { + padding-top: 46px; + } + + body { + min-width: 240px; + overflow-x: hidden; + } + + body * { + -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important; + } + + #wpwrap { + background: #f0f0f0; + } + + #wpcontent { + position: relative; + margin-right: 0; + padding-right: 10px; + } + + #wpbody-content { + padding-bottom: 100px; + } + + .wrap { + margin-left: 12px; + margin-right: 0; + } + + .col-wrap { + padding: 0; + } + + /* Hidden Elements */ + #screen-meta, + #screen-meta-links, + #collapse-menu, + .post-format-select { + display: none !important; + } + + .wrap .add-new-h2, .wrap .add-new-h2:active { + padding: 10px 15px; + font-size: 14px; + } + + .wp-color-result { + height: auto; + padding-right: 45px; + } + + .wp-color-result:after { + font-size: 14px; + height: auto; + padding: 6px 14px; + } + + /* Feedback Messages */ + .wrap div.updated, .wrap div.error, .media-upload-form div.error { + margin: 20px 0 10px 0; + padding: 5px 10px; + font-size: 14px; + line-height: 175%; + } + + .wrap .icon32 + h2 { + margin-top: -2px; + } + + .wp-responsive-open #wpbody { + left: -190px; + } + + /* General Metabox */ + .postbox { + font-size: 14px; + } + + .metabox-holder h3 { + padding: 12px; + } + + .postbox .handlediv { + margin-top: 3px; + } + + /* Subsubsub Nav */ + .subsubsub { + font-size: 16px; + text-align: center; + margin-bottom: 15px; + } + + /* Theme/Plugin File Editor */ + #templateside { + float: none; + width: auto; + } + + #templateside li { + margin: 0; + } + + #templateside li a { + display: block; + padding: 5px; + } + + #templateside .highlight { + padding: 5px; + margin-right: -5px; + margin-top: -5px; + } + + #template div { + float: none; + margin: 0; + width: auto; + } + + #template textarea { + width: 100%; + } + + .fileedit-sub .alignright { + margin-top: 15px; + } + + #wpfooter { + display: none; + } + + #comments-form .checkforspam { + display: none; + } +} + +/* Smartphone */ +@media screen and (max-width: 600px) { + /* Disable horizontal scroll when responsive menu is open + since we push the main content off to the right. */ + #wpwrap.wp-responsive-open { + overflow-x: hidden; + } + + html.wp-toolbar { + padding-top: 0; + } + + #wpbody { + padding-top: 46px; + } + + /* Keep full-width boxes on Edit Post page from causing horizontal scroll */ + div#post-body.metabox-holder.columns-1 { + overflow-x: hidden; + } +} diff --git a/wp-admin/css/common.css b/wp-admin/css/common.css new file mode 100644 index 0000000..fbd77c2 --- /dev/null +++ b/wp-admin/css/common.css @@ -0,0 +1,2637 @@ +/* 2 column liquid layout */ +#wpwrap { + height: auto; + min-height: 100%; + width: 100%; + position: relative; + -webkit-font-smoothing: subpixel-antialiased; +} + +#wpcontent { + height: 100%; +} + +#wpcontent, +#wpfooter { + margin-left: 180px; +} + +.folded #wpcontent, +.folded #wpfooter { + margin-left: 56px; +} + +#wpbody-content { + padding-bottom: 65px; + float: left; + width: 100%; + overflow: visible !important; +} + +/* inner 2 column liquid layout */ + +.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; +} + +/* 2 columns main area */ + +#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; +} + +/* utility classes */ +.alignleft { + float: left; +} + +.alignright { + float: right; +} + +.textleft { + text-align: left; +} + +.textright { + text-align: right; +} + +.clear { + clear: both; +} + +/* Hide visually but not from screen readers */ +.screen-reader-text, +.screen-reader-text span, +.ui-helper-hidden-accessible { + position: absolute; + margin: -1px; + padding: 0; + height: 1px; + width: 1px; + overflow: hidden; + clip: rect(0 0 0 0); + border: 0; +} + +.screen-reader-shortcut { + position: absolute; + top: -1000em; +} + +.screen-reader-shortcut:focus { + left: 6px; + top: -25px; + height: auto; + width: auto; + display: block; + font-size: 14px; + font-weight: 600; + padding: 15px 23px 14px; + background: #f1f1f1; + color: #21759b; + z-index: 100000; + line-height: normal; + -webkit-box-shadow: 0 0 2px 2px rgba(0,0,0,.6); + box-shadow: 0 0 2px 2px rgba(0,0,0,.6); + text-decoration: none; + outline: none; +} + +.hidden, +.js .closed .inside, +.js .hide-if-js, +.no-js .hide-if-no-js, +.js.wp-core-ui .hide-if-js, +.js .wp-core-ui .hide-if-js, +.no-js.wp-core-ui .hide-if-no-js, +.no-js .wp-core-ui .hide-if-no-js { + display: none; +} + +/* @todo: Take a second look. Large chunks of shared color, from the colors.css merge */ +.widget-top, +.menu-item-handle, +.widget-inside, +#menu-settings-column .accordion-container, +#menu-management .menu-edit, +.manage-menus, +table.widefat, +.stuffbox, +p.popular-tags, +.widgets-holder-wrap, +.wp-editor-container, +.popular-tags, +.feature-filter, +.imgedit-group { + border: 1px solid #e5e5e5; + -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.04); + box-shadow: 0 1px 1px rgba(0,0,0,0.04); +} + +table.widefat, +.wp-editor-container, +.stuffbox, +p.popular-tags, +.widgets-holder-wrap, +.popular-tags, +.feature-filter, +.imgedit-group { + background: #fff; +} + +/* general */ +html, +body { + height: 100%; + margin: 0; + padding: 0; +} + +html { + background: #f1f1f1; +} + +body { + color: #444; + font-family: "Open Sans", sans-serif; + font-size: 13px; + line-height: 1.4em; + min-width: 600px; +} + +body.iframe { + min-width: 0; + padding-top: 1px; +} + +iframe, +img { + border: 0; +} + +td { + font-family: inherit; + font-size: inherit; + font-weight: inherit; + line-height: inherit; +} + +a { + color: #0074a2; + -webkit-transition-property: border, background, color; + transition-property: border, background, color; + -webkit-transition-duration: .05s; + transition-duration: .05s; + -webkit-transition-timing-function: ease-in-out; + transition-timing-function: ease-in-out; +} + +a, +div { + outline: 0; +} + +a:hover, +a:active { + color: #2ea2cc; +} + +a:focus { + color: #124964; +} + +a:focus, +a:active { + outline: thin dotted; +} + +#adminmenu a:focus, +#adminmenu a:active, +.screen-reader-text:focus { + outline: none; +} + +blockquote, +q { + quotes: none; +} + +blockquote:before, +blockquote:after, +q:before, +q:after { + content: ''; + content: none; +} + +p { + font-size: 13px; + line-height: 1.5; + margin: 1em 0; +} + +blockquote { + margin: 1em; +} + +li, +dd { + margin-bottom: 6px; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + display: block; + font-weight: 600; +} + +h1 { + font-size: 2em; + margin: .67em 0; +} + +h2 { + color: #222; + font-size: 1.5em; + margin: .83em 0; + font-weight: 400; +} + +h3 { + color: #222; + font-size: 1.3em; + margin: 1em 0; +} + +h4 { + font-size: 1em; + margin: 1.33em 0; +} + +h5 { + font-size: 0.83em; + margin: 1.67em 0; +} + +h6 { + font-size: 0.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 0.5em; +} + +/* @noflip */ +.ltr { + direction: ltr; +} + +/* @noflip */ +.code, +code { + font-family: Consolas, Monaco, monospace; + direction: ltr; +} + +kbd, +code { + padding: 3px 5px 2px 5px; + margin: 0 1px; + background: #eaeaea; + background: rgba(0,0,0,0.07); + font-size: 13px; +} + +.subsubsub { + list-style: none; + margin: 8px 0 0; + padding: 0; + font-size: 13px; + float: left; + color: #666; +} + +.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: 600; + border: none; +} + +.subsubsub li { + display: inline-block; + margin: 0; + padding: 0; + white-space: nowrap; +} + +/* .widefat - main style for tables */ +.widefat { + border-spacing: 0; + width: 100%; + clear: both; + margin: 0; +} + +.widefat * { + word-wrap: break-word; +} + +.widefat a { + text-decoration: none; +} + +.widefat td, +.widefat th { + padding: 8px 10px; +} + +.widefat thead th { + border-bottom: 1px solid #e1e1e1; +} + +.widefat tfoot th { + border-top: 1px solid #e1e1e1; + border-bottom: none; +} + +.widefat .no-items td { + border-bottom-width: 0; +} + +.widefat td { + vertical-align: top; +} + +.widefat td, +.widefat td p, +.widefat td ol, +.widefat td ul { + font-size: 13px; + line-height: 1.5em; +} + +.widefat th { + 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: 6px 0 25px; + vertical-align: top; +} + +.widefat th input[type=checkbox] { + margin-top: -1px; +} + +.widefat tbody th.check-column { + padding: 9px 0 22px; +} + +.widefat.media .check-column { + padding-top: 8px; +} + +.widefat thead th.check-column, +.widefat tbody th.check-column, +.widefat tfoot th.check-column { + padding: 11px 0 0 3px; +} + +.widefat thead th.check-column { + padding-top: 10px; +} + +.update-php div.updated, +.update-php div.error { + margin-left: 0; +} + +.no-js .widefat thead .check-column input, +.no-js .widefat tfoot .check-column input { + display: none; +} + +.widefat .num, +.column-comments, +.column-links, +.column-posts { + text-align: center; +} + +.widefat th#comments { + vertical-align: middle; +} + +.wrap { + margin: 10px 20px 0 2px; +} + +div.updated, +div.error { + padding: 0 0.6em; + margin: 5px 15px 2px; +} + +div.updated p, +div.error p { + margin: 0.5em 0; + padding: 2px; +} + +.wrap div.updated, +.wrap div.error, +.media-upload-form div.error { + margin: 5px 0 15px; +} + +div.updated { + border-left: 4px solid #7ad03a; + padding: 1px 12px; + background-color: #fff; + -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1); + box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1); +} + +div.error { + border-left: 4px solid #dd3d36; + background: #fff; + -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1); + box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1); + padding: 1px 12px; +} + +.attention { + color: #2ea2cc; +} + +.wrap h2, +.subtitle { + font-weight: normal; + margin: 0; +} + +.wrap h2 { + font-size: 23px; + font-weight: 400; + padding: 9px 15px 4px 0; + line-height: 29px; +} + +.subtitle { + color: #777; + font-size: 14px; + padding-left: 25px; +} + +.wrap .add-new-h2, +.wrap .add-new-h2:active { + margin-left: 4px; + padding: 4px 8px; + position: relative; + top: -3px; + text-decoration: none; + border: none; + -webkit-border-radius: 2px; + border-radius: 2px; + background: #e0e0e0; + text-shadow: none; + font-weight: 600; + font-size: 13px; +} + +.wrap .add-new-h2:hover { + background: #2ea2cc; + color: #fff; +} + +.wrap h2.long-header { + padding-right: 0; +} + +.wp-dialog { + background-color: #fff; +} + +.widgets-chooser ul, +#widgets-left .widget-in-question .widget-top, +#available-widgets .widget-top:hover, +div#widgets-right .widget-top:hover, +#widgets-left .widget-top:hover { + border-color: #999; + -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.1); + box-shadow: 0 1px 2px rgba(0,0,0,0.1); +} + +.sorthelper { + background-color: #ccf3fa; +} + +.ac_match, +.subsubsub a.current { + color: #000; +} + +.alternate, +.alt { + background-color: #f9f9f9; +} + +.bar { + background-color: #e8e8e8; + border-right-color: #99d; +} + +.media-upload-form label.form-help, +td.help { + color: #9a9a9a; +} + +/* Helper classes for plugins to leverage the active WordPress color scheme */ + +.highlight { + background-color: #e4f2fd; + color: #000; +} + +.wp-ui-primary { + color: #fff; + background-color: #333; +} +.wp-ui-text-primary { + color: #333; +} + +.wp-ui-highlight { + color: white; + background-color: #1e8cbe; +} +.wp-ui-text-highlight { + color: #1e8cbe; +} + +.wp-ui-notification { + color: #fff; + background-color: #d54e21; +} +.wp-ui-text-notification { + color: #d54e21; +} + +.wp-ui-text-icon { + color: #999; +} + +/*------------------------------------------------------------------------------ + 1.0 - Text Styles +------------------------------------------------------------------------------*/ + +.widget .widget-top, +.postbox h3, +.stuffbox h3, +.control-section .accordion-section-title, +h3.dashboard-widget-title, +h3.dashboard-widget-title span, +h3.dashboard-widget-title small, +.sidebar-name, +#nav-menu-header, +#nav-menu-footer, +.menu-item-handle, +.checkbox, +.side-info, +#your-profile #rich_editing, +.widefat thead th, +.widefat tfoot th { + line-height: 1.4em; +} + +.widget .widget-top, +.menu-item-handle { + background: #fafafa; + color: #222; +} + +.postbox h3, +#namediv h3, +#submitdiv h3 { + border-bottom: 1px solid #eee; +} + +.quicktags, +.search { + background-color: #ccc; + color: #000; + font-size: 12px; +} + +.icon32 { + display: none; +} + +/* @todo can we combine these into a class or use an existing dashicon one? */ +#welcome-panel.welcome-panel .welcome-panel-close::before, +.tagchecklist span a:before, +#bulk-titles div a:before { + background: none; + color: #bbb; + content: '\f153'; + display: block !important; + font: normal 16px/1 'dashicons'; + speak: none; + height: 20px; + margin: 2px 0; + text-align: center; + width: 20px; + -webkit-font-smoothing: antialiased !important; +} + +#welcome-panel.welcome-panel .welcome-panel-close:hover:before, +.tagchecklist span a:hover:before, +#bulk-titles div a:hover:before { + color: #c00; +} + +.key-labels label { + line-height: 24px; +} + +strong, b { + font-weight: 600; +} + +.pre { + /* https://developer.mozilla.org/en-US/docs/CSS/white-space */ + white-space: pre-wrap; /* css-3 */ + word-wrap: break-word; /* IE 5.5 - 7 */ +} + +.howto { + color: #666; + font-style: italic; + display: block; +} + +p.install-help { + margin: 8px 0; + font-style: italic; +} + +.no-break { + white-space: nowrap; +} + +hr { + border: 0; + border-top: 1px solid #ddd; + border-bottom: 1px solid #fafafa; +} + +.row-actions span.delete a, +.row-actions span.trash a, +.row-actions span.spam a, +.plugins a.delete, +#all-plugins-table .plugins a.delete, +#search-plugins-table .plugins a.delete, +.submitbox .submitdelete, +#media-items a.delete, +#media-items a.delete-permanently, +#nav-menu-footer .menu-delete { + color: #a00; +} + +abbr.required, +.file-error, +.widget-control-remove:hover, +.row-actions .delete a:hover, +.row-actions .trash a:hover, +.row-actions .spam a:hover, +.plugins a.delete:hover, +#all-plugins-table .plugins a.delete:hover, +#search-plugins-table .plugins a.delete:hover, +.submitbox .submitdelete:hover, +#media-items a.delete:hover, +#media-items a.delete-permanently:hover, +#nav-menu-footer .menu-delete:hover { + color: #f00; + text-decoration: none; + border: none; +} + +/*------------------------------------------------------------------------------ + 3.0 - Actions +------------------------------------------------------------------------------*/ + +#major-publishing-actions { + padding: 10px; + clear: both; + border-top: 1px solid #ddd; + background: #f5f5f5; +} + +#delete-action { + line-height: 28px; + vertical-align: middle; + text-align: left; + float: left; +} + +#publishing-action { + text-align: right; + float: right; + line-height: 23px; +} + +#publishing-action .spinner { + float: left; +} + +#misc-publishing-actions { + padding: 6px 0 0; +} + +.misc-pub-section { + padding: 6px 10px 8px; +} + +#minor-publishing-actions { + padding: 10px 10px 0 10px; + text-align: right; +} + +#save-post { + 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: 1px solid #dadada; +} + +.side-info ul { + margin: 0; + padding-left: 18px; + list-style: square; + color: #666; +} + +.approve, +.unapproved .unapprove { + display: none; +} + +.unapproved .approve, +.spam .approve, +.trash .approve { + display: inline; +} + +td.action-links, +th.action-links { + text-align: right; +} + + +/*------------------------------------------------------------------------------ + 4.0 - Notifications +------------------------------------------------------------------------------*/ + +#update-nag, +.update-nag { + display: inline-block; + line-height: 19px; + padding: 11px 15px; + font-size: 14px; + text-align: left; + margin: 25px 20px 0 2px; + background-color: #fff; + border-left: 4px solid #ffba00; + -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1); + box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1); +} + +.update-message { + color: #000; +} + +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; +} + +.update-php .spinner { + float: none; + margin: -4px 0; +} + +#ajax-loading, +.ajax-loading, +.ajax-feedback, +.imgedit-wait-spin, +.list-ajax-loading { /* deprecated */ + visibility: hidden; +} + +#ajax-response.alignleft { + margin-left: 2em; +} + +/* @todo: this does not need its own section anymore */ +/*------------------------------------------------------------------------------ + 6.0 - Admin Header +------------------------------------------------------------------------------*/ +#adminmenu a, +#sidemenu a, +#taglist a, +#catlist a { + text-decoration: none; +} + +/*------------------------------------------------------------------------------ + 6.1 - Screen Options Tabs +------------------------------------------------------------------------------*/ + +#screen-options-wrap, +#contextual-help-wrap { + margin: 0; + padding: 8px 20px 12px; + position: relative; +} + +#contextual-help-wrap { + overflow: auto; + margin-left: 0 !important; +} + +#screen-meta .screen-reader-text { + visibility: hidden; +} + +#screen-meta-links { + margin: 0 20px 0 0; +} + +#screen-meta-links a { + padding: 3px 6px 3px 16px; +} + +#screen-meta-links a:focus { + outline: none; +} + +/* screen options and help tabs revert */ +#screen-meta { + display: none; + margin: 0 20px -1px 0px; + position: relative; + background-color: #fff; + border: 1px solid #ddd; + border-top: none; + -webkit-box-shadow: 0 1px 0 rgba(0,0,0,.025); + box-shadow: 0 1px 0 rgba(0,0,0,.025); +} + +#screen-options-link-wrap, +#contextual-help-link-wrap { + float: right; + height: 28px; + margin: 0 0 0 6px; + border: 1px solid #ddd; + border-top: none; + background: #fff; + -webkit-box-shadow: 0 1px 1px -1px rgba(0,0,0,0.1); + box-shadow: 0 1px 1px -1px rgba(0,0,0,0.1); +} + +#screen-meta-links .screen-meta-toggle { + position: relative; + top: 0; +} + +#screen-meta-links a { + color: #777; +} + +#screen-meta-links a:hover, +#screen-meta-links a:active, +#screen-meta-links a:focus { + color: #333; +} + +#screen-meta-links a:focus { + border-color: #aaa; + -webkit-box-shadow: 0 2px 3px rgba(0,0,0,0.15); + box-shadow: 0 2px 3px rgba(0,0,0,0.15); +} + +#screen-meta-links a.show-settings { + display: block; + font-size: 13px; + height: 22px; + line-height: 22px; + text-decoration: none; + z-index: 1; +} + +#screen-meta-links a:after { + right: 0; + content: '\f140'; + font: normal 20px/1 'dashicons'; + speak: none; + display: inline-block; + padding: 0 5px 0 0; + bottom: 2px; + position: relative; + vertical-align: bottom; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-decoration: none !important; + color: #bbb; +} + +#screen-meta-links a.screen-meta-active:after { + content: '\f142'; +} + +#screen-meta-links a.show-settings:hover { + text-decoration: none; +} +/* end screen options and help tabs */ + +.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; + line-height: 30px; +} + +.metabox-prefs label input[type=checkbox] { + margin-top: -4px; + margin-right: 6px; +} + +.metabox-prefs label input { + margin: 0 5px 0 2px; +} + +.metabox-prefs .columns-prefs label input { + margin: 0 2px; +} + +.metabox-prefs label a { + display: none; +} + +/*------------------------------------------------------------------------------ + 6.2 - Help Menu +------------------------------------------------------------------------------*/ + +#contextual-help-wrap { + padding: 0; +} + +#contextual-help-columns { + position: relative; +} + +#contextual-help-back { + position: absolute; + top: 0; + bottom: 0; + left: 150px; + right: 170px; + border: 1px solid #e1e1e1; + border-top: none; + border-bottom: none; + background: #f6fbfd; +} + +#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: 0 0 0 2px; + border-color: transparent; +} + +.contextual-help-tabs a { + display: block; + padding: 5px 5px 5px 12px; + line-height: 18px; + text-decoration: none; + border: 1px solid transparent; + border-right: none; + border-left: none; +} + +.contextual-help-tabs a:hover { + color: #333; +} + +.contextual-help-tabs .active { + padding: 0; + margin: 0 -1px 0 0; + border-left: 2px solid #2ea2cc; + background: #f6fbfd; + -webkit-box-shadow: 0 2px 0 rgba(0,0,0,0.02), 0 1px 0 rgba(0,0,0,0.02); + box-shadow: 0 2px 0 rgba(0,0,0,0.02), 0 1px 0 rgba(0,0,0,0.02); +} + +.contextual-help-tabs .active a { + border-color: #e1e1e1; + color: #333; +} + +.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 ul li { + list-style-type: disc; + margin-left: 18px; +} + +.contextual-help-sidebar { + width: 150px; + float: right; + padding: 0 8px 0 12px; + overflow: auto; +} + +/*------------------------------------------------------------------------------ + 8.0 - Layout Blocks +------------------------------------------------------------------------------*/ + +html.wp-toolbar { + padding-top: 32px; + -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; + color: #555; +} + +.widefat th { + font-weight: normal; +} + +.widefat thead tr th, +.widefat tfoot tr th { + color: #333; +} + +.widefat td p { + margin: 2px 0 0.8em; +} + +.widefat p, +.widefat ol, +.widefat ul { + color: #333; +} + +.widefat .column-comment p { + margin: 0.6em 0; +} + +/* Screens with postboxes */ +.postbox-container { + float: left; +} + +.postbox-container .meta-box-sortables { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +#wpbody-content .metabox-holder { + padding-top: 10px; +} + +.metabox-holder .postbox-container .empty-container { + border: 3px dashed #bbb; + 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; +} + +#post-body-content { + width: 100%; + min-width: 463px; + float: left; +} + +#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 .metabox-holder .postbox-container .empty-container { + border: 0 none; + height: 0; + min-height: 0; + } +} + +.js .postbox .hndle { + cursor: move; +} + +.hndle a { + font-size: 11px; + font-weight: normal; +} + +.postbox .handlediv { + float: right; + width: 27px; + height: 30px; +} + +.js .postbox .handlediv { + cursor: pointer; +} + +.sortable-placeholder { + border: 1px dashed #bbb; + margin-bottom: 20px; +} + +.postbox, +.stuffbox { + margin-bottom: 20px; + padding: 0; + line-height: 1; +} + +.postbox h3, +.stuffbox h3 { + margin-top: 1px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.js .widget .widget-top, +.js .postbox h3 { + cursor: move; +} + +.postbox .inside, +.stuffbox .inside { + padding: 0 12px 12px; + line-height: 1.4em; + font-size: 13px; +} + +.postbox .inside { + margin: 11px 0; + position: relative; +} + +.postbox .inside > p:last-child, +.rss-widget ul li:last-child { + margin-bottom: 1px !important; +} + +.postbox.closed h3 { + border: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +.postbox table.form-table { + margin-bottom: 0; +} + +.postbox table.widefat { + -webkit-box-shadow: none; + box-shadow: none; +} + +.temp-border { + border: 1px dotted #ccc; +} + +.columns-prefs label { + padding: 0 5px; +} + +/* @todo: what is this doing here */ +#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, +#ed_reply_toolbar #ed_reply_strong, +.item-controls .item-order a, +.feature-filter .feature-name { + font-weight: 600; +} + +/*------------------------------------------------------------------------------ + 21.0 - Admin Footer +------------------------------------------------------------------------------*/ + +#wpfooter { + position: absolute; + bottom: 0; + left: 0; + right: 0; + padding: 10px 0; + margin-right: 20px; + color: #777; +} + +#wpfooter p { + font-size: 13px; + margin: 0; + line-height: 20px; +} + +#footer-thankyou { + font-style: italic; +} + +#wpfooter a { + text-decoration: none; +} + +#wpfooter a:hover { + text-decoration: underline; +} + +/*------------------------------------------------------------------------------ + 25.0 - Tabbed Admin Screen Interface (Experimental) +------------------------------------------------------------------------------*/ + +.nav-tab { + border: 1px solid #ccc; + border-bottom: none; + background: #e4e4e4; + color: #555; + font-size: 12px; + line-height: 16px; + display: inline-block; + padding: 4px 14px 6px; + text-decoration: none; + margin: -4px 4px -1px 0; +} + +.nav-tab:hover { + background-color: #fff; + color: #464646; +} + +.nav-tab-active { + color: #464646; +} + +.nav-tab-active, +.nav-tab-active:hover { + border-bottom: 1px solid #f1f1f1; + background: #f1f1f1; + color: #000; +} + +h2.nav-tab-wrapper, +h3.nav-tab-wrapper { + border-bottom: 1px solid #ccc; + padding-bottom: 0; + padding-left: 10px; +} + +h2 .nav-tab { + padding: 6px 10px; + font-weight: bold; + font-size: 15px; + line-height: 24px; +} + + +/*------------------------------------------------------------------------------ + 26.0 - Misc +------------------------------------------------------------------------------*/ + +.spinner { + background: url(../images/spinner.gif) no-repeat; + -webkit-background-size: 20px 20px; + background-size: 20px 20px; + display: none; + float: right; + opacity: 0.7; + filter: alpha(opacity=70); + width: 20px; + height: 20px; + margin: 2px 5px 0; +} + +#template div { + margin-right: 190px; +} + +.metabox-holder h3 { + font-size: 14px; + padding: 8px 12px; + margin: 0; + line-height: 1.4; +} + +#templateside ul li a { + text-decoration: none; +} + +#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: 1px solid #f9f9f9; + border-bottom: 1px solid #dfdfdf; + background-color: #f9f9f9; + -webkit-transition: none; + transition: none; +} + +#sidemenu li { + display: inline; + line-height: 200%; + list-style: none; + text-align: center; + white-space: nowrap; + margin: 0; + padding: 0; +} + +/* @todo: remove border radius */ +#sidemenu a.current { + font-weight: normal; + padding-left: 6px; + padding-right: 6px; + -webkit-border-top-left-radius: 3px; + border-top-left-radius: 3px; + -webkit-border-top-right-radius: 3px; + border-top-right-radius: 3px; + border: 1px solid #dfdfdf; + border-bottom-color: #f1f1f1; + background-color: #f1f1f1; + color: #000; +} + +#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: 600; +} + +/* Scrollbar fix for bulk upgrade iframe */ +body.iframe { + height: 98%; +} + +/* Upgrader styles, Specific to Language Packs */ +.lp-show-latest p { + display: none; +} +.lp-show-latest p:last-child, +.lp-show-latest .lp-error p { + display: block; +} + +/* - Only used once or twice in all of WP - deprecate for global style +------------------------------------------------------------------------------*/ +td.media-icon { + text-align: center; + width: 80px; + padding-top: 8px; + padding-bottom: 8px; +} + +td.media-icon img { + max-width: 80px; + max-height: 60px; +} + +#howto { + font-size: 11px; + margin: 0 5px; + display: block; +} + +.importers td { + padding-right: 14px; +} + +.importers { + font-size: 16px; + width: auto; +} + +#post-body #post-body-content #namediv h3 { + margin-top: 0; +} + +#namediv h3 label { + vertical-align: baseline; +} + +#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; +} + +/* - Used - but could/should be deprecated with a CSS reset +------------------------------------------------------------------------------*/ +.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; +} + +/* Star Ratings - Back-compat for pre-3.8 */ +div.star-holder { + position: relative; + height: 17px; + width: 100px; + background: url(../images/stars.png?ver=20121108) repeat-x bottom left; +} + +div.star-holder .star-rating { + background: url(../images/stars.png?ver=20121108) repeat-x top left; + height: 17px; + float: left; +} + +/* Star Ratings */ +.star-rating { + white-space: nowrap; +} +.star-rating .star { + display: inline-block; + width: 20px; + height: 20px; + -webkit-font-smoothing: antialiased; + font-size: 20px; + line-height: 1; + font-family: 'dashicons'; + text-decoration: inherit; + font-weight: normal; + font-style: normal; + vertical-align: top; + -webkit-transition: color .1s ease-in 0; + transition: color .1s ease-in 0; + text-align: center; + color: #0074a2; +} + +.star-rating .star-full:before { + content:'\f155'; +} + +.star-rating .star-half:before { + content:'\f459'; +} + +.rtl .star-rating .star-half { + -webkit-transform: rotateY(180deg); + -ms-transform: rotateY(180deg); + transform: rotateY(180deg); +} + +.star-rating .star-empty:before { + content:'\f154'; +} + +div.action-links { + font-weight: normal; + margin: 6px 0 0; +} + +/* Plugin install thickbox */ +#plugin-information { + background: #fcfcfc; + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + height: auto; + padding: 0; +} + +#plugin-information-title { + padding: 0 76px 0 20px; + font-size: 22px; + font-weight: 600; + line-height: 56px; + top: 0; + right: 0; + left: 0; + height: 56px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +#plugin-information-tabs { + padding: 0 16px; + position: absolute; + top: 56px; + right: 0; + left: 0; + height: 36px; + z-index: 1; +} + +#plugin-information-tabs a { + position: relative; + float: left; + padding: 8px 10px 9px; + margin: 0; + height: 18px; + line-height: 18px; + font-size: 14px; + text-decoration: none; + -webkit-transition: none; + transition: none; +} + +#plugin-information-tabs a.current { + margin: -1px -1px 0; + background: #fff; + border: 1px solid #ddd; + border-bottom: none; + color: #333; +} + +#plugin-information-tabs a:active, +#plugin-information-tabs a:focus { + outline: none; +} + +#plugin-information-content { + background: #fff; + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + position: absolute; + top: 90px; + right: 0; + bottom: 58px; + left: 0; +} + +#section-holder { + margin: 0; + padding: 10px 26px; + position: absolute; + top: 0; + right: 250px; + bottom: 0; + left: 0; + overflow: auto; +} + +#section-holder .updated { + margin: 16px 0; +} + +#plugin-information .fyi { + background: #f3f3f3; + border-left: 1px solid #ddd; + color: #666; + padding: 16px; + position: absolute; + top: 0; + right: 0; + bottom: 0; + width: 217px; + overflow: auto; +} + +#plugin-information .fyi strong { + color: #464646; +} + +#plugin-information .fyi h3 { + font-weight: bold; + text-transform: uppercase; + font-size: 12px; + color: #666; + margin: 24px 0 8px; +} + +#plugin-information .fyi h2 { + font-size: 0.9em; + margin-bottom: 0; + margin-right: 0; +} + +#plugin-information .fyi ul { + padding: 0; + margin: 0; + list-style: none; +} + +#plugin-information .fyi li { + margin: 0 0 10px; +} + +#plugin-information-footer { + padding: 15px 16px; + position: absolute; + right: 0; + bottom: 0; + left: 0; + height: 28px; +} + +#plugin-information .section ul, +#plugin-information .section ol { + list-style-type: disc; + margin-left: 24px; +} + +#plugin-information .section, +#plugin-information .section p { + font-size: 14px; + line-height: 1.7; +} + +#plugin-information #section-screenshots ol { + list-style: none; + margin: 0; +} + +#plugin-information #section-screenshots li img { + vertical-align: text-top; + margin-top: 16px; + max-width: 100%; + width: auto; + height: auto; + -webkit-box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.3 ); + box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.3 ); +} + +#plugin-information #section-screenshots li p { + font-style: italic; + padding-left: 20px; +} + +#plugin-information pre { + padding: 7px; + overflow: auto; + border: 1px solid #ccc; +} + +.plugin-version-author-uri { + font-size: 13px; +} + +@media screen and ( max-width: 782px ) { + #plugin-information-content { + overflow: auto; + bottom: 58px; + } + + #plugin-information .fyi { + border: 1px solid #ddd; + position: static; + width: auto; + margin: 26px 26px 16px; + } + + #section-holder { + position: static; + } + + #plugin-information .fyi h3, + #plugin-information .fyi small { + display: none; + } + + #plugin-information-footer { + padding: 12px 16px 0; + height: 46px; + } +} + +/* Thickbox for Plugin Install screen */ +body.plugin-install-php #TB_window, +body.import-php #TB_window, +body.plugins-php #TB_window, +body.update-core-php #TB_window, +body.index-php #TB_window { + background: #fcfcfc url( ../images/spinner.gif ) no-repeat center; +} + +@media print, + (-o-min-device-pixel-ratio: 5/4), + (-webkit-min-device-pixel-ratio: 1.25), + (min-resolution: 120dpi) { + + body.plugin-install-php #TB_window, + body.import-php #TB_window, + body.plugins-php #TB_window, + body.update-core-php #TB_window, + body.index-php #TB_window { + background: #fcfcfc url( ../images/spinner-2x.gif ) no-repeat center; + -webkit-background-size: 20px 20px; + background-size: 20px 20px; + } +} + +body.plugin-install-php #TB_title, +body.import-php #TB_title, +body.plugins-php #TB_title, +body.update-core-php #TB_title, +body.index-php #TB_title { + float: left; + height: 1px; +} + +body.plugin-install-php #TB_ajaxWindowTitle, +body.import-php #TB_ajaxWindowTitle, +body.plugins-php #TB_ajaxWindowTitle, +body.update-core-php #TB_ajaxWindowTitle, +body.index-php #TB_ajaxWindowTitle { + display: none; +} + +body.plugin-install-php .tb-close-icon, +body.import-php .tb-close-icon, +body.plugins-php .tb-close-icon, +body.update-core-php .tb-close-icon, +body.index-php .tb-close-icon { + line-height: 48px; + width: 48px; + height: 48px; +} + +body.plugin-install-php .tb-close-icon:before, +body.import-php .tb-close-icon:before, +body.plugins-php .tb-close-icon:before, +body.update-core-php .tb-close-icon:before, +body.index-php .tb-close-icon:before { + line-height: 48px; +} + +/* @todo: move this. */ +img { + border: none; +} + +/* Header */ +/* @todo: are these also specific to Press This? */ +#wphead { + border-bottom: 1px solid #dfdfdf; +} + +#wphead h1 a { + color: #464646; +} + +/* @todo: these seem misplaced */ +.js .meta-box-sortables .postbox:hover .handlediv { + margin-right: 0 !important; +} + +/* Metabox collapse arrow indicators */ +.js .sidebar-name .sidebar-name-arrow:before, +.js .meta-box-sortables .postbox .handlediv:before { + right: 12px; + font: normal 20px/1 'dashicons'; + speak: none; + display: inline-block; + padding: 8px 10px; + top: 0; + position: relative; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-decoration: none !important; +} + +.js #widgets-left .sidebar-name .sidebar-name-arrow { + display: none; +} + +.js #widgets-left .widgets-holder-wrap.closed .sidebar-name .sidebar-name-arrow, +.js #widgets-left .sidebar-name:hover .sidebar-name-arrow { + display: block; +} + +/* Show the arrow only on hover */ +.js .sidebar-name .sidebar-name-arrow:before, +.js .meta-box-sortables .postbox .handlediv:before { + content: '\f142'; +} + +.js .widgets-holder-wrap.closed .sidebar-name-arrow:before, +.js .meta-box-sortables .postbox.closed .handlediv:before { + content: '\f140'; +} + +.error a { + text-decoration: underline; +} + +.updated a { + text-decoration: none; + padding-bottom: 2px; +} + +/* @todo: appears to be Press This only and overridden */ +#photo-add-url-div input[type="text"] { + width: 300px; +} + +/* Theme/Plugin Editor */ +.alignleft h3 { + margin: 0; +} + +#template textarea { + font-family: Consolas, Monaco, monospace; + font-size: 13px; + width: 97%; + background: #f9f9f9; + outline: none; +} + +/* @noflip */ +#template textarea, +#docs-list { + direction: ltr; +} + +#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 0; + padding: 0; +} + +#templateside li { + margin: 4px 0; +} + +#templateside a, +.theme-editor-php .highlight { + display: block; + padding: 3px 3px 3px 12px; + text-decoration: none; +} + +.theme-editor-php .highlight { + margin: -3px 3px -3px -12px; +} + +#templateside .highlight { + border: none; + font-weight: bold; +} + +.nonessential { + color: #666; + font-size: 11px; + font-style: italic; + padding-left: 12px; +} + +#documentation { + margin-top: 10px; +} + +#documentation label { + line-height: 22px; + vertical-align: baseline; + font-weight: 600; +} + +.fileedit-sub { + padding: 10px 0 8px; + line-height: 180%; +} + +/* @todo: can we use a common class for these? */ +.nav-menus-php .item-edit:before, +.widget-top a.widget-action:after, +.control-section .accordion-section-title:after, +.accordion-section-title:after { + right: 0; + content: '\f140'; + border: none; + background: none; + font: normal 20px/1 'dashicons'; + speak: none; + display: block; + padding: 0; + text-indent: 0; + text-align: center; + position: relative; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-decoration: none !important; +} + +.widget-action, +.handlediv, +.item-edit, +.sidebar-name-arrow, +.accordion-section-title:after { + color: #aaa; +} + +.widget-action:hover, +.handlediv:hover, +.item-edit:hover, +.sidebar-name:hover .sidebar-name-arrow, +.accordion-section-title:hover:after { + color: #777; +} + +.widget-top a.widget-action:after { + padding: 12px 12px 0; +} + +.nav-menus-php .item-edit:before { + line-height: 2.1; +} + +.control-section .accordion-section-title:after, +.accordion-section-title:after { + float: right; + right: 20px; + top: -2px; +} + +.control-section.open .accordion-section-title:after, +#customize-info.open .accordion-section-title:after, +.nav-menus-php .menu-item-edit-active .item-edit:before { + content: '\f142'; +} + +/* Enable draggable on IE10 touch events until it's rolled into jQuery UI core */ +.ui-sortable, +.ui-draggable { + -ms-touch-action: none; + touch-action: none; +} + +.meta-box-sortables.ui-sortable, +.widgets-holder-wrap .ui-draggable, +.widgets-holder-wrap .ui-sortable, +.menu.ui-sortable { + -ms-touch-action: auto; + touch-action: auto; +} + +.meta-box-sortables.ui-sortable .hndle, +.menu.ui-sortable .menu-item-handle { + -ms-touch-action: none; + touch-action: none; +} + +/* Accordion */ + +.accordion-section { + border-bottom: 1px solid #dfdfdf; + margin: 0; +} + +.accordion-section.open .accordion-section-content, +.no-js .accordion-section .accordion-section-content { + display: block; +} + +.accordion-section.open:hover { + border-bottom-color: #dfdfdf; +} + +.accordion-section-content { + display: none; + padding: 10px 20px 15px; + overflow: hidden; + background: #fff; +} + +.accordion-section-title { + margin: 0; + padding: 12px 15px 15px; + position: relative; + border-left: 1px solid #dfdfdf; + border-right: 1px solid #dfdfdf; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.js .accordion-section-title { + cursor: pointer; +} + +.js .accordion-section-title:after { + position: absolute; + top: 12px; + right: 10px; + z-index: 1; +} + +.accordion-section-title:focus { + outline: none; +} + +.accordion-section-title:hover:after, +.accordion-section-title:focus:after { + border-color: #aaa transparent; +} + +.cannot-expand .accordion-section-title { + cursor: auto; +} + +.cannot-expand .accordion-section-title:after { + display: none; +} + +.control-section .accordion-section-title { + border-left: none; + border-right: none; + padding: 10px 10px 11px 14px; + line-height: 21px; + background: #fff; +} + +.control-section .accordion-section-title:after { + top: 11px; +} + +.js .control-section:hover .accordion-section-title, +.js .control-section .accordion-section-title:hover, +.js .control-section.open .accordion-section-title, +.js .control-section .accordion-section-title:focus { + color: #222; + background: #f5f5f5; +} + +.control-section.open .accordion-section-title { + /* When expanded */ + border-bottom: 1px solid #dfdfdf; +} + +/* =Media Queries +-------------------------------------------------------------- */ + +/* @todo: de-duplication */ +@media only screen and (min-width: 769px) { + /* categories */ + #col-left { + width: 35%; + } + + #col-right { + width: 65%; + } +} + +@media only screen and (max-width: 860px) { + + /* categories */ + #col-left { + width: 35%; + } + + #col-right { + width: 65%; + } +} + +@media only screen and (min-width: 980px) { + + /* categories */ + #col-left { + width: 35%; + } + + #col-right { + width: 65%; + } +} + +@media only screen and (max-width: 768px) { + /* categories */ + #col-left { + width: 100%; + } + + #col-right { + width: 100%; + } +} + +/** + * HiDPI Displays + */ +@media print, + (-o-min-device-pixel-ratio: 5/4), + (-webkit-min-device-pixel-ratio: 1.25), + (min-resolution: 120dpi) { + /* Back-compat for pre-3.8 */ + div.star-holder, + div.star-holder .star-rating { + background: url(../images/stars-2x.png?ver=20121108) repeat-x bottom left; + -webkit-background-size: 21px 37px; + background-size: 21px 37px; + } + + .spinner { + background-image: url(../images/spinner-2x.gif); + } + + /* @todo: evaluate - most of these were likely replaced by dashicons */ + .curtime #timestamp, + #screen-meta-links a.show-settings, + .widget-top a.widget-action, + .widget-top a.widget-action:hover, + .sidebar-name-arrow, + .sidebar-name:hover .sidebar-name-arrow, + .meta-box-sortables .postbox:hover .handlediv, + .tagchecklist span a, + #bulk-titles div a, + .tagchecklist span a:hover, + #bulk-titles div a:hover { + background: none !important; + } + +} + +@-ms-viewport { + width: device-width; +} + +@media screen and ( max-width: 782px ) { + html.wp-toolbar { + padding-top: 46px; + } + + body { + min-width: 240px; + overflow-x: hidden; + } + + body * { + -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important; + } + + #wpwrap { + background: #f0f0f0; + } + + #wpcontent { + position: relative; + margin-left: 0; + padding-left: 10px; + } + + #wpbody-content { + padding-bottom: 100px; + } + + .wrap { + margin-right: 12px; + margin-left: 0; + } + + .col-wrap { + padding: 0; + } + + /* Hidden Elements */ + #screen-meta, + #screen-meta-links, + #collapse-menu, + .post-format-select { + display: none !important; + } + + .wrap .add-new-h2, .wrap .add-new-h2:active { + padding: 10px 15px; + font-size: 14px; + } + + .wp-color-result { + height: auto; + padding-left: 45px; + } + + .wp-color-result:after { + font-size: 14px; + height: auto; + padding: 6px 14px; + } + + /* Feedback Messages */ + .wrap div.updated, .wrap div.error, .media-upload-form div.error { + margin: 20px 0 10px 0; + padding: 5px 10px; + font-size: 14px; + line-height: 175%; + } + + .wrap .icon32 + h2 { + margin-top: -2px; + } + + .wp-responsive-open #wpbody { + right: -190px; + } + + /* General Metabox */ + .postbox { + font-size: 14px; + } + + .metabox-holder h3 { + padding: 12px; + } + + .postbox .handlediv { + margin-top: 3px; + } + + /* Subsubsub Nav */ + .subsubsub { + font-size: 16px; + text-align: center; + margin-bottom: 15px; + } + + /* Theme/Plugin File Editor */ + #templateside { + float: none; + width: auto; + } + + #templateside li { + margin: 0; + } + + #templateside li a { + display: block; + padding: 5px; + } + + #templateside .highlight { + padding: 5px; + margin-left: -5px; + margin-top: -5px; + } + + #template div { + float: none; + margin: 0; + width: auto; + } + + #template textarea { + width: 100%; + } + + .fileedit-sub .alignright { + margin-top: 15px; + } + + #wpfooter { + display: none; + } + + #comments-form .checkforspam { + display: none; + } +} + +/* Smartphone */ +@media screen and (max-width: 600px) { + /* Disable horizontal scroll when responsive menu is open + since we push the main content off to the right. */ + #wpwrap.wp-responsive-open { + overflow-x: hidden; + } + + html.wp-toolbar { + padding-top: 0; + } + + #wpbody { + padding-top: 46px; + } + + /* Keep full-width boxes on Edit Post page from causing horizontal scroll */ + div#post-body.metabox-holder.columns-1 { + overflow-x: hidden; + } +} diff --git a/wp-admin/css/customize-controls-rtl.css b/wp-admin/css/customize-controls-rtl.css new file mode 100644 index 0000000..f3108a3 --- /dev/null +++ b/wp-admin/css/customize-controls-rtl.css @@ -0,0 +1,684 @@ +body { + overflow: hidden; +} + +#customize-controls a { + text-decoration: none; +} + +#customize-controls h3 { + font-size: 14px; +} + +#customize-controls .submit { + text-align: center; +} + +#customize-controls .description { + color: #666666; +} + +#customize-header-actions .button-primary { + float: left; + margin-top: 9px; +} + +#customize-header-actions .spinner { + margin-top: 16px; + margin-left: 4px; +} + +.saving #customize-header-actions .spinner { + display: block; +} + +#customize-info { + border: none; + border-top: 1px solid #ddd; +} + +#customize-info .accordion-section-title { + background-color: #fff; + color: #666666; + border-right: none; + border-left: none; + border-bottom: 1px solid #eeeeee; +} + +#customize-info.open .accordion-section-title, +#customize-info .accordion-section-title:hover, +#customize-info .accordion-section-title:focus { + color: #555555; +} + +#customize-info.open .accordion-section-title:after, +#customize-info .accordion-section-title:hover:after, +#customize-info .accordion-section-title:focus:after { + color: #555555; +} + +#customize-info.open .accordion-section-title { + border-color: transparent; +} + +#customize-info .preview-notice { + font-size: 13px; + line-height: 24px; +} + +#customize-info .theme-name { + font-size: 20px; + font-weight: 200; + line-height: 24px; + display: block; +} + +#customize-info .theme-screenshot { + width: 258px; +} + +#customize-info .theme-description { + margin-top: 1em; + color: #666666; + line-height: 20px; +} + +#customize-theme-controls { + -webkit-box-shadow: 0 1px 1px -1px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 1px -1px rgba(0, 0, 0, 0.1); +} + +#customize-theme-controls .control-section { + border: none; +} + +#customize-theme-controls .accordion-section-title { + color: #555555; + background-color: #fff; + border-bottom: 1px solid #eeeeee; +} + +#customize-theme-controls .accordion-section-content { + color: #555555; + background: white; +} + +#customize-theme-controls .control-section:hover .accordion-section-title, +#customize-theme-controls .control-section .accordion-section-title:hover, +#customize-theme-controls .control-section.open .accordion-section-title, +#customize-theme-controls .control-section .accordion-section-title:focus { + color: #555555; + background: #f5f5f5; +} + +.js .control-section:hover .accordion-section-title, +.js .control-section .accordion-section-title:hover, +.js .control-section.open .accordion-section-title, +.js .control-section .accordion-section-title:focus { + background: #f5f5f5; +} + +#customize-theme-controls .control-section:hover .accordion-section-title::after, +#customize-theme-controls .control-section .accordion-section-title:hover::after, +#customize-theme-controls .control-section.open .accordion-section-title::after, +#customize-theme-controls .control-section .accordion-section-title:focus::after { + color: #555555; +} + +#customize-theme-controls .control-section.open { + border-bottom: 1px solid #eeeeee; +} + +#customize-theme-controls .control-section.open .accordion-section-title { + border-bottom-color: #eeeeee !important; +} + +#customize-theme-controls .control-section:last-of-type.open, +#customize-theme-controls .control-section:last-of-type .accordion-section-title { + border-bottom-color: #ddd; +} + +#customize-theme-controls > ul, +#customize-theme-controls .accordion-section-content { + margin: 0; +} + +.customize-control { + width: 100%; + float: right; + clear: both; + margin-bottom: 8px; +} + +.customize-control select, +.customize-control input[type="text"], +.customize-control input[type="radio"], +.customize-control input[type="checkbox"] { + 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 select[multiple] { + height: auto; +} + +.customize-control-title { + display: block; + font-size: 14px; + line-height: 24px; + font-weight: 600; + margin-bottom: 5px; +} + +.customize-control-color .color-picker, +.customize-control-checkbox label, +.customize-control-upload div { + line-height: 28px; +} + +.customize-control-checkbox input { + margin-left: 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: 32px; +} + +.customize-control-radio input { + margin-left: 5px; +} + +#customize-preview iframe { + width: 100%; + height: 100%; +} + +.wp-full-overlay-sidebar { + background: #eeeeee; + border-left: 1px solid #ddd; +} + +.collapse-sidebar { + background-color: transparent !important; + border: none !important; + -webkit-box-shadow: none !important; + box-shadow: none !important; + -webkit-border-radius: !important 0; + border-radius: !important 0; +} + + +.collapse-sidebar:active, +.collapse-sidebar:active .collapse-sidebar-label, +.collapse-sidebar:active .collapse-sidebar-arrow:before { + text-shadow: none; +} + +.collapsed .collapse-sidebar-arrow:before { + color: #888; +} + +/* Style for custom settings */ + +/* + * Dropdowns + */ +.accordion-section .dropdown { + float: right; + display: block; + position: relative; + cursor: pointer; +} + +.accordion-section .dropdown-content { + overflow: hidden; + float: right; + min-width: 30px; + height: 16px; + line-height: 16px; + margin-left: 16px; + padding: 4px 5px; + border: 2px solid #eeeeee; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.customize-control .dropdown-arrow { + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 20px; + background: #eeeeee; +} + +.customize-control .dropdown-arrow:after { + content: "\f140"; + font: normal 20px/1 'dashicons'; + speak: none; + display: block; + padding: 0; + text-indent: 0; + text-align: center; + position: relative; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-decoration: none !important; + color: #333; +} + +.customize-control .dropdown-status { + color: #333; + background: #eeeeee; + display: none; + max-width: 112px; +} + +/* Color Picker */ +.customize-control-color .color-picker-hex { + display: none; +} + +.customize-control-color.open .color-picker-hex { + display: block; +} + +.customize-control-color .dropdown { + margin-left: 5px; + margin-bottom: 5px; +} + +.customize-control-color .dropdown .dropdown-content { + background-color: #555555; + border: 1px solid rgba(0, 0, 0, 0.15); +} + +.customize-control-color .dropdown:hover .dropdown-content { + border-color: rgba(0, 0, 0, 0.25); +} + +/* + * Image Picker + */ +.customize-control-image .library, +.customize-control-image .actions { + display: none; + float: right; + width: 100%; +} + +.customize-control-image.open .library, +.customize-control-image.open .actions { + display: block; +} + +.accordion-section .customize-control-image .dropdown-content { + height: auto; + min-height: 24px; + min-width: 40px; + padding: 0; +} + +.accordion-section .customize-control-image .dropdown-status { + padding: 4px 5px; +} + +.accordion-section .customize-control-image .preview-thumbnail img { + display: block; + width: 100%; + max-width: 122px; + max-height: 98px; + margin: 0 auto; +} + +.accordion-section .customize-control-image .actions { + text-align: left; +} + +.accordion-section .customize-control-image .library ul { + border-bottom: 1px solid #ddd; + float: right; + width: 100%; + margin: 10px 0 0; +} + +.accordion-section .customize-control-image .library li { + color: #ccc; + float: right; + padding: 3px 15px; + margin: 0; + border: 1px solid transparent; +} + +.accordion-section .customize-control-image .library li.library-selected { + margin-bottom: -1px; + padding-bottom: 4px; + color: #666666; + border-color: #ddd; + border-bottom-color: #fff; +} + +.accordion-section .customize-control-image .library .thumbnail { + display: block; + width: 100%; +} + +.accordion-section .customize-control-image .library .thumbnail img { + display: block; + max-width: 90%; + max-height: 80px; + margin: 5px auto; + padding: 2px; + background: #666666; +} + +.accordion-section .customize-control-image .library .thumbnail:hover img { + background-color: #2ea2cc; +} + +.accordion-section .customize-control-image .library-content { + display: none; + width: 100%; + float: right; + padding: 10px 0; +} + +.accordion-section .customize-control-image .library-content.library-selected { + display: block; +} + +.accordion-section .customize-control-upload .upload-fallback, +.accordion-section .customize-control-image .upload-fallback { + display: none; +} + +.accordion-section .customize-control-upload .upload-dropzone, +.accordion-section .customize-control-image .upload-dropzone { + display: none; + padding: 15px 10px; + border: 3px dashed #dfdfdf; + margin: 5px auto; + text-align: center; + position: relative; + cursor: default; +} + +.accordion-section .customize-control-upload .upload-dropzone.supports-drag-drop, +.accordion-section .customize-control-image .upload-dropzone.supports-drag-drop { + display: block; + -webkit-transition: border-color 0.1s; + transition: border-color 0.1s; +} + +.accordion-section .customize-control-upload .library ul li, +.accordion-section .customize-control-image .library ul li { + cursor: pointer; +} + +.accordion-section .customize-control-upload .upload-dropzone.supports-drag-drop.drag-over, +.accordion-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; +} + +/** Header control **/ + +#customize-control-header_image .current { + margin-bottom: 8px; +} + +#customize-control-header_image .uploaded { + margin-bottom: 18px; +} + +#customize-control-header_image .uploaded button:not(.random), +#customize-control-header_image .default button:not(.random) { + width: 100%; + padding: 0; + margin: 0; + background: none; + border: none; + color: inherit; + cursor: pointer; +} + +#customize-control-header_image button img { + display: block; +} + +#customize-control-header_image button.new, +#customize-control-header_image button.remove { + white-space: normal; + width: 48%; + height: auto; +} + + +/* Header control: current image container */ + +#customize-control-header_image .current .container { + overflow: hidden; + -webkit-border-radius: 2px; + border: 1px solid #eee; + -webkit-border-radius: 2px; + border-radius: 2px; +} + +#customize-control-header_image .placeholder { + width: 100%; + position: relative; + text-align: center; + cursor: default; +} + +#customize-control-header_image .inner { + display: none; + position: absolute; + width: 100%; + color: #555; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} + +#customize-control-header_image .inner, +#customize-control-header_image .inner .dashicons { + line-height: 20px; + top: 10px; +} +#customize-control-header_image .list .inner, +#customize-control-header_image .list .inner .dashicons { + top: 9px; +} + +#customize-control-header_image .header-view { + position: relative; + width: 100%; + margin-bottom: 5px; +} + +#customize-control-header_image .header-view:last-child { + margin-bottom: 0px; +} + +/* Convoluted, but 'outline' support isn't good enough yet */ +#customize-control-header_image .header-view:after { + border: 0; +} +#customize-control-header_image .header-view.selected:after { + content: ''; + position: absolute; + height: auto; + top: 0; right: 0; bottom: 0; left: 0; + border: 4px solid #2ea2cc; + -webkit-border-radius: 2px; + border-radius: 2px; +} +#customize-control-header_image .header-view.button.selected { + border: 0; +} + +/* Header control: overlay "close" button */ + +#customize-control-header_image .uploaded .header-view .close { + font-size: 2em; + color: grey; + position: absolute; + visibility: hidden; + top: 10px; + left: 10px; + z-index: 1; + width: 20px; + height: 20px; + cursor: pointer; +} + +#customize-control-header_image .uploaded .header-view .close:hover { + color: black; + text-shadow: + -1px -1px 0 #fff, + 1px -1px 0 #fff, + -1px 1px 0 #fff, + 1px 1px 0 #fff; +} + +#customize-control-header_image .header-view:hover .close { + visibility: visible; +} + +/* Header control: randomiz(s)er */ + +#customize-control-header_image .random.placeholder { + cursor: pointer; + -webkit-border-radius: 2px; + border-radius: 2px; + height: 40px; +} + +#customize-control-header_image button.random { + width: 100%; + height: auto; + min-height: 40px; + white-space: normal; +} + +#customize-control-header_image button.random .dice { + margin-top: 4px; +} + +#customize-control-header_image .placeholder:hover .dice, +#customize-control-header_image .header-view:hover > button.random .dice { + -webkit-animation: dice-color-change 3s infinite; + -ms-animation: dice-color-change 3s infinite; + animation: dice-color-change 3s infinite; +} + +@-webkit-keyframes dice-color-change { + 0% { color: #d4b146; } + 50% { color: #ef54b0; } + 75% { color: #7190d3; } + 100% { color: #d4b146; } +} + +@-ms-keyframes dice-color-change { + 0% { color: #d4b146; } + 50% { color: #ef54b0; } + 75% { color: #7190d3; } + 100% { color: #d4b146; } +} + +@keyframes dice-color-change { + 0% { color: #d4b146; } + 50% { color: #ef54b0; } + 75% { color: #7190d3; } + 100% { color: #d4b146; } +} + +/* Header control: actions and choices */ + +#customize-control-header_image .actions { + margin-bottom: 32px; +} + +#customize-control-header_image .choice { + position: relative; + display: block; + margin-bottom: 9px; +} + +#customize-control-header_image .uploaded div:last-child > .choice { + margin-bottom: 0; +} + +#customize-control-header_image img { + width: 100%; + -webkit-border-radius: 2px; + border-radius: 2px; +} + +#customize-control-header_image .remove { + float: right; + margin-left: 3px; +} + +#customize-control-header_image .new { + float: left; +} + + +/** Handle cheaters. */ +body.cheatin { + font-size: medium; + height: auto; + background: #fff; + margin: 50px auto 2em; + padding: 1em 2em; + max-width: 700px; + min-width: 0; + -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.13); + box-shadow: 0 1px 3px rgba(0,0,0,0.13); +} + +body.cheatin p { + font-size: 14px; + line-height: 1.5; + margin: 25px 0 20px; +} diff --git a/wp-admin/css/customize-controls-rtl.min.css b/wp-admin/css/customize-controls-rtl.min.css new file mode 100644 index 0000000..9f672b9 --- /dev/null +++ b/wp-admin/css/customize-controls-rtl.min.css @@ -0,0 +1 @@ +body{overflow:hidden}#customize-controls a{text-decoration:none}#customize-controls h3{font-size:14px}#customize-controls .submit{text-align:center}#customize-controls .description{color:#666}#customize-header-actions .button-primary{float:left;margin-top:9px}#customize-header-actions .spinner{margin-top:16px;margin-left:4px}.saving #customize-header-actions .spinner{display:block}#customize-info{border:0;border-top:1px solid #ddd}#customize-info .accordion-section-title{background-color:#fff;color:#666;border-right:0;border-left:0;border-bottom:1px solid #eee}#customize-info .accordion-section-title:focus,#customize-info .accordion-section-title:focus:after,#customize-info .accordion-section-title:hover,#customize-info .accordion-section-title:hover:after,#customize-info.open .accordion-section-title,#customize-info.open .accordion-section-title:after{color:#555}#customize-info.open .accordion-section-title{border-color:transparent}#customize-info .preview-notice{font-size:13px;line-height:24px}#customize-info .theme-name{font-size:20px;font-weight:200;line-height:24px;display:block}#customize-info .theme-screenshot{width:258px}#customize-info .theme-description{margin-top:1em;color:#666;line-height:20px}#customize-theme-controls{-webkit-box-shadow:0 1px 1px -1px rgba(0,0,0,.1);box-shadow:0 1px 1px -1px rgba(0,0,0,.1)}#customize-theme-controls .control-section{border:0}#customize-theme-controls .accordion-section-title{color:#555;background-color:#fff;border-bottom:1px solid #eee}#customize-theme-controls .accordion-section-content{color:#555;background:#fff}#customize-theme-controls .control-section .accordion-section-title:focus,#customize-theme-controls .control-section .accordion-section-title:hover,#customize-theme-controls .control-section.open .accordion-section-title,#customize-theme-controls .control-section:hover .accordion-section-title{color:#555;background:#f5f5f5}.js .control-section .accordion-section-title:focus,.js .control-section .accordion-section-title:hover,.js .control-section.open .accordion-section-title,.js .control-section:hover .accordion-section-title{background:#f5f5f5}#customize-theme-controls .control-section .accordion-section-title:focus::after,#customize-theme-controls .control-section .accordion-section-title:hover::after,#customize-theme-controls .control-section.open .accordion-section-title::after,#customize-theme-controls .control-section:hover .accordion-section-title::after{color:#555}#customize-theme-controls .control-section.open{border-bottom:1px solid #eee}#customize-theme-controls .control-section.open .accordion-section-title{border-bottom-color:#eee!important}#customize-theme-controls .control-section:last-of-type .accordion-section-title,#customize-theme-controls .control-section:last-of-type.open{border-bottom-color:#ddd}#customize-theme-controls .accordion-section-content,#customize-theme-controls>ul{margin:0}.customize-control{width:100%;float:right;clear:both;margin-bottom:8px}.customize-control input[type=checkbox],.customize-control input[type=radio],.customize-control input[type=text],.customize-control select{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 select[multiple]{height:auto}.customize-control-title{display:block;font-size:14px;line-height:24px;font-weight:600;margin-bottom:5px}.customize-control-checkbox label,.customize-control-color .color-picker,.customize-control-upload div{line-height:28px}.customize-control-checkbox input{margin-left: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:32px}.customize-control-radio input{margin-left:5px}#customize-preview iframe{width:100%;height:100%}.wp-full-overlay-sidebar{background:#eee;border-left:1px solid #ddd}.collapse-sidebar{background-color:transparent!important;border:0!important;-webkit-box-shadow:none!important;box-shadow:none!important;-webkit-border-radius:!important 0;border-radius:!important 0}.collapse-sidebar:active,.collapse-sidebar:active .collapse-sidebar-arrow:before,.collapse-sidebar:active .collapse-sidebar-label{text-shadow:none}.collapsed .collapse-sidebar-arrow:before{color:#888}.accordion-section .dropdown{float:right;display:block;position:relative;cursor:pointer}.accordion-section .dropdown-content{overflow:hidden;float:right;min-width:30px;height:16px;line-height:16px;margin-left:16px;padding:4px 5px;border:2px solid #eee;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.customize-control .dropdown-arrow{position:absolute;top:0;bottom:0;left:0;width:20px;background:#eee}.customize-control .dropdown-arrow:after{content:"\f140";font:400 20px/1 dashicons;speak:none;display:block;padding:0;text-indent:0;text-align:center;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#333}.customize-control .dropdown-status{color:#333;background:#eee;display:none;max-width:112px}.customize-control-color .color-picker-hex{display:none}.customize-control-color.open .color-picker-hex{display:block}.customize-control-color .dropdown{margin-left:5px;margin-bottom:5px}.customize-control-color .dropdown .dropdown-content{background-color:#555;border:1px solid rgba(0,0,0,.15)}.customize-control-color .dropdown:hover .dropdown-content{border-color:rgba(0,0,0,.25)}.customize-control-image .actions,.customize-control-image .library{display:none;float:right;width:100%}.customize-control-image.open .actions,.customize-control-image.open .library{display:block}.accordion-section .customize-control-image .dropdown-content{height:auto;min-height:24px;min-width:40px;padding:0}.accordion-section .customize-control-image .dropdown-status{padding:4px 5px}.accordion-section .customize-control-image .preview-thumbnail img{display:block;width:100%;max-width:122px;max-height:98px;margin:0 auto}.accordion-section .customize-control-image .actions{text-align:left}.accordion-section .customize-control-image .library ul{border-bottom:1px solid #ddd;float:right;width:100%;margin:10px 0 0}.accordion-section .customize-control-image .library li{color:#ccc;float:right;padding:3px 15px;margin:0;border:1px solid transparent}.accordion-section .customize-control-image .library li.library-selected{margin-bottom:-1px;padding-bottom:4px;color:#666;border-color:#ddd;border-bottom-color:#fff}.accordion-section .customize-control-image .library .thumbnail{display:block;width:100%}.accordion-section .customize-control-image .library .thumbnail img{display:block;max-width:90%;max-height:80px;margin:5px auto;padding:2px;background:#666}.accordion-section .customize-control-image .library .thumbnail:hover img{background-color:#2ea2cc}.accordion-section .customize-control-image .library-content{display:none;width:100%;float:right;padding:10px 0}.accordion-section .customize-control-image .library-content.library-selected{display:block}.accordion-section .customize-control-image .upload-fallback,.accordion-section .customize-control-upload .upload-fallback{display:none}.accordion-section .customize-control-image .upload-dropzone,.accordion-section .customize-control-upload .upload-dropzone{display:none;padding:15px 10px;border:3px dashed #dfdfdf;margin:5px auto;text-align:center;position:relative;cursor:default}.accordion-section .customize-control-image .upload-dropzone.supports-drag-drop,.accordion-section .customize-control-upload .upload-dropzone.supports-drag-drop{display:block;-webkit-transition:border-color .1s;transition:border-color .1s}.accordion-section .customize-control-image .library ul li,.accordion-section .customize-control-upload .library ul li{cursor:pointer}.accordion-section .customize-control-image .upload-dropzone.supports-drag-drop.drag-over,.accordion-section .customize-control-upload .upload-dropzone.supports-drag-drop.drag-over{border-color:#83b4d8}.ios #customize-preview,.ios .wp-full-overlay{position:relative}.ios #customize-controls .wp-full-overlay-sidebar-content{-webkit-overflow-scrolling:touch}#customize-control-header_image .current{margin-bottom:8px}#customize-control-header_image .uploaded{margin-bottom:18px}#customize-control-header_image .default button:not(.random),#customize-control-header_image .uploaded button:not(.random){width:100%;padding:0;margin:0;background:0 0;border:0;color:inherit;cursor:pointer}#customize-control-header_image button img{display:block}#customize-control-header_image button.new,#customize-control-header_image button.remove{white-space:normal;width:48%;height:auto}#customize-control-header_image .current .container{overflow:hidden;border:1px solid #eee;-webkit-border-radius:2px;border-radius:2px}#customize-control-header_image .placeholder{width:100%;position:relative;text-align:center;cursor:default}#customize-control-header_image .inner{display:none;position:absolute;width:100%;color:#555;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}#customize-control-header_image .inner,#customize-control-header_image .inner .dashicons{line-height:20px;top:10px}#customize-control-header_image .list .inner,#customize-control-header_image .list .inner .dashicons{top:9px}#customize-control-header_image .header-view{position:relative;width:100%;margin-bottom:5px}#customize-control-header_image .header-view:last-child{margin-bottom:0}#customize-control-header_image .header-view:after{border:0}#customize-control-header_image .header-view.selected:after{content:'';position:absolute;height:auto;top:0;right:0;bottom:0;left:0;border:4px solid #2ea2cc;-webkit-border-radius:2px;border-radius:2px}#customize-control-header_image .header-view.button.selected{border:0}#customize-control-header_image .uploaded .header-view .close{font-size:2em;color:grey;position:absolute;visibility:hidden;top:10px;left:10px;z-index:1;width:20px;height:20px;cursor:pointer}#customize-control-header_image .uploaded .header-view .close:hover{color:#000;text-shadow:-1px -1px 0 #fff,1px -1px 0 #fff,-1px 1px 0 #fff,1px 1px 0 #fff}#customize-control-header_image .header-view:hover .close{visibility:visible}#customize-control-header_image .random.placeholder{cursor:pointer;-webkit-border-radius:2px;border-radius:2px;height:40px}#customize-control-header_image button.random{width:100%;height:auto;min-height:40px;white-space:normal}#customize-control-header_image button.random .dice{margin-top:4px}#customize-control-header_image .header-view:hover>button.random .dice,#customize-control-header_image .placeholder:hover .dice{-webkit-animation:dice-color-change 3s infinite;-ms-animation:dice-color-change 3s infinite;animation:dice-color-change 3s infinite}@-webkit-keyframes dice-color-change{0%{color:#d4b146}50%{color:#ef54b0}75%{color:#7190d3}100%{color:#d4b146}}@-ms-keyframes dice-color-change{0%{color:#d4b146}50%{color:#ef54b0}75%{color:#7190d3}100%{color:#d4b146}}@keyframes dice-color-change{0%{color:#d4b146}50%{color:#ef54b0}75%{color:#7190d3}100%{color:#d4b146}}#customize-control-header_image .actions{margin-bottom:32px}#customize-control-header_image .choice{position:relative;display:block;margin-bottom:9px}#customize-control-header_image .uploaded div:last-child>.choice{margin-bottom:0}#customize-control-header_image img{width:100%;-webkit-border-radius:2px;border-radius:2px}#customize-control-header_image .remove{float:right;margin-left:3px}#customize-control-header_image .new{float:left}body.cheatin{font-size:medium;height:auto;background:#fff;margin:50px auto 2em;padding:1em 2em;max-width:700px;min-width:0;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.13);box-shadow:0 1px 3px rgba(0,0,0,.13)}body.cheatin p{font-size:14px;line-height:1.5;margin:25px 0 20px} \ No newline at end of file diff --git a/wp-admin/css/customize-controls.css b/wp-admin/css/customize-controls.css new file mode 100644 index 0000000..f966114 --- /dev/null +++ b/wp-admin/css/customize-controls.css @@ -0,0 +1,684 @@ +body { + overflow: hidden; +} + +#customize-controls a { + text-decoration: none; +} + +#customize-controls h3 { + font-size: 14px; +} + +#customize-controls .submit { + text-align: center; +} + +#customize-controls .description { + color: #666666; +} + +#customize-header-actions .button-primary { + float: right; + margin-top: 9px; +} + +#customize-header-actions .spinner { + margin-top: 16px; + margin-right: 4px; +} + +.saving #customize-header-actions .spinner { + display: block; +} + +#customize-info { + border: none; + border-top: 1px solid #ddd; +} + +#customize-info .accordion-section-title { + background-color: #fff; + color: #666666; + border-left: none; + border-right: none; + border-bottom: 1px solid #eeeeee; +} + +#customize-info.open .accordion-section-title, +#customize-info .accordion-section-title:hover, +#customize-info .accordion-section-title:focus { + color: #555555; +} + +#customize-info.open .accordion-section-title:after, +#customize-info .accordion-section-title:hover:after, +#customize-info .accordion-section-title:focus:after { + color: #555555; +} + +#customize-info.open .accordion-section-title { + border-color: transparent; +} + +#customize-info .preview-notice { + font-size: 13px; + line-height: 24px; +} + +#customize-info .theme-name { + font-size: 20px; + font-weight: 200; + line-height: 24px; + display: block; +} + +#customize-info .theme-screenshot { + width: 258px; +} + +#customize-info .theme-description { + margin-top: 1em; + color: #666666; + line-height: 20px; +} + +#customize-theme-controls { + -webkit-box-shadow: 0 1px 1px -1px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 1px -1px rgba(0, 0, 0, 0.1); +} + +#customize-theme-controls .control-section { + border: none; +} + +#customize-theme-controls .accordion-section-title { + color: #555555; + background-color: #fff; + border-bottom: 1px solid #eeeeee; +} + +#customize-theme-controls .accordion-section-content { + color: #555555; + background: white; +} + +#customize-theme-controls .control-section:hover .accordion-section-title, +#customize-theme-controls .control-section .accordion-section-title:hover, +#customize-theme-controls .control-section.open .accordion-section-title, +#customize-theme-controls .control-section .accordion-section-title:focus { + color: #555555; + background: #f5f5f5; +} + +.js .control-section:hover .accordion-section-title, +.js .control-section .accordion-section-title:hover, +.js .control-section.open .accordion-section-title, +.js .control-section .accordion-section-title:focus { + background: #f5f5f5; +} + +#customize-theme-controls .control-section:hover .accordion-section-title::after, +#customize-theme-controls .control-section .accordion-section-title:hover::after, +#customize-theme-controls .control-section.open .accordion-section-title::after, +#customize-theme-controls .control-section .accordion-section-title:focus::after { + color: #555555; +} + +#customize-theme-controls .control-section.open { + border-bottom: 1px solid #eeeeee; +} + +#customize-theme-controls .control-section.open .accordion-section-title { + border-bottom-color: #eeeeee !important; +} + +#customize-theme-controls .control-section:last-of-type.open, +#customize-theme-controls .control-section:last-of-type .accordion-section-title { + border-bottom-color: #ddd; +} + +#customize-theme-controls > ul, +#customize-theme-controls .accordion-section-content { + margin: 0; +} + +.customize-control { + width: 100%; + float: left; + clear: both; + margin-bottom: 8px; +} + +.customize-control select, +.customize-control input[type="text"], +.customize-control input[type="radio"], +.customize-control input[type="checkbox"] { + 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 select[multiple] { + height: auto; +} + +.customize-control-title { + display: block; + font-size: 14px; + line-height: 24px; + font-weight: 600; + margin-bottom: 5px; +} + +.customize-control-color .color-picker, +.customize-control-checkbox label, +.customize-control-upload div { + 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: 32px; +} + +.customize-control-radio input { + margin-right: 5px; +} + +#customize-preview iframe { + width: 100%; + height: 100%; +} + +.wp-full-overlay-sidebar { + background: #eeeeee; + border-right: 1px solid #ddd; +} + +.collapse-sidebar { + background-color: transparent !important; + border: none !important; + -webkit-box-shadow: none !important; + box-shadow: none !important; + -webkit-border-radius: 0 !important; + border-radius: 0 !important; +} + + +.collapse-sidebar:active, +.collapse-sidebar:active .collapse-sidebar-label, +.collapse-sidebar:active .collapse-sidebar-arrow:before { + text-shadow: none; +} + +.collapsed .collapse-sidebar-arrow:before { + color: #888; +} + +/* Style for custom settings */ + +/* + * Dropdowns + */ +.accordion-section .dropdown { + float: left; + display: block; + position: relative; + cursor: pointer; +} + +.accordion-section .dropdown-content { + overflow: hidden; + float: left; + min-width: 30px; + height: 16px; + line-height: 16px; + margin-right: 16px; + padding: 4px 5px; + border: 2px solid #eeeeee; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.customize-control .dropdown-arrow { + position: absolute; + top: 0; + bottom: 0; + right: 0; + width: 20px; + background: #eeeeee; +} + +.customize-control .dropdown-arrow:after { + content: "\f140"; + font: normal 20px/1 'dashicons'; + speak: none; + display: block; + padding: 0; + text-indent: 0; + text-align: center; + position: relative; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-decoration: none !important; + color: #333; +} + +.customize-control .dropdown-status { + color: #333; + background: #eeeeee; + display: none; + max-width: 112px; +} + +/* Color Picker */ +.customize-control-color .color-picker-hex { + display: none; +} + +.customize-control-color.open .color-picker-hex { + display: block; +} + +.customize-control-color .dropdown { + margin-right: 5px; + margin-bottom: 5px; +} + +.customize-control-color .dropdown .dropdown-content { + background-color: #555555; + border: 1px solid rgba(0, 0, 0, 0.15); +} + +.customize-control-color .dropdown:hover .dropdown-content { + border-color: rgba(0, 0, 0, 0.25); +} + +/* + * 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; +} + +.accordion-section .customize-control-image .dropdown-content { + height: auto; + min-height: 24px; + min-width: 40px; + padding: 0; +} + +.accordion-section .customize-control-image .dropdown-status { + padding: 4px 5px; +} + +.accordion-section .customize-control-image .preview-thumbnail img { + display: block; + width: 100%; + max-width: 122px; + max-height: 98px; + margin: 0 auto; +} + +.accordion-section .customize-control-image .actions { + text-align: right; +} + +.accordion-section .customize-control-image .library ul { + border-bottom: 1px solid #ddd; + float: left; + width: 100%; + margin: 10px 0 0; +} + +.accordion-section .customize-control-image .library li { + color: #ccc; + float: left; + padding: 3px 15px; + margin: 0; + border: 1px solid transparent; +} + +.accordion-section .customize-control-image .library li.library-selected { + margin-bottom: -1px; + padding-bottom: 4px; + color: #666666; + border-color: #ddd; + border-bottom-color: #fff; +} + +.accordion-section .customize-control-image .library .thumbnail { + display: block; + width: 100%; +} + +.accordion-section .customize-control-image .library .thumbnail img { + display: block; + max-width: 90%; + max-height: 80px; + margin: 5px auto; + padding: 2px; + background: #666666; +} + +.accordion-section .customize-control-image .library .thumbnail:hover img { + background-color: #2ea2cc; +} + +.accordion-section .customize-control-image .library-content { + display: none; + width: 100%; + float: left; + padding: 10px 0; +} + +.accordion-section .customize-control-image .library-content.library-selected { + display: block; +} + +.accordion-section .customize-control-upload .upload-fallback, +.accordion-section .customize-control-image .upload-fallback { + display: none; +} + +.accordion-section .customize-control-upload .upload-dropzone, +.accordion-section .customize-control-image .upload-dropzone { + display: none; + padding: 15px 10px; + border: 3px dashed #dfdfdf; + margin: 5px auto; + text-align: center; + position: relative; + cursor: default; +} + +.accordion-section .customize-control-upload .upload-dropzone.supports-drag-drop, +.accordion-section .customize-control-image .upload-dropzone.supports-drag-drop { + display: block; + -webkit-transition: border-color 0.1s; + transition: border-color 0.1s; +} + +.accordion-section .customize-control-upload .library ul li, +.accordion-section .customize-control-image .library ul li { + cursor: pointer; +} + +.accordion-section .customize-control-upload .upload-dropzone.supports-drag-drop.drag-over, +.accordion-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; +} + +/** Header control **/ + +#customize-control-header_image .current { + margin-bottom: 8px; +} + +#customize-control-header_image .uploaded { + margin-bottom: 18px; +} + +#customize-control-header_image .uploaded button:not(.random), +#customize-control-header_image .default button:not(.random) { + width: 100%; + padding: 0; + margin: 0; + background: none; + border: none; + color: inherit; + cursor: pointer; +} + +#customize-control-header_image button img { + display: block; +} + +#customize-control-header_image button.new, +#customize-control-header_image button.remove { + white-space: normal; + width: 48%; + height: auto; +} + + +/* Header control: current image container */ + +#customize-control-header_image .current .container { + overflow: hidden; + -webkit-border-radius: 2px; + border: 1px solid #eee; + -webkit-border-radius: 2px; + border-radius: 2px; +} + +#customize-control-header_image .placeholder { + width: 100%; + position: relative; + text-align: center; + cursor: default; +} + +#customize-control-header_image .inner { + display: none; + position: absolute; + width: 100%; + color: #555; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} + +#customize-control-header_image .inner, +#customize-control-header_image .inner .dashicons { + line-height: 20px; + top: 10px; +} +#customize-control-header_image .list .inner, +#customize-control-header_image .list .inner .dashicons { + top: 9px; +} + +#customize-control-header_image .header-view { + position: relative; + width: 100%; + margin-bottom: 5px; +} + +#customize-control-header_image .header-view:last-child { + margin-bottom: 0px; +} + +/* Convoluted, but 'outline' support isn't good enough yet */ +#customize-control-header_image .header-view:after { + border: 0; +} +#customize-control-header_image .header-view.selected:after { + content: ''; + position: absolute; + height: auto; + top: 0; left: 0; bottom: 0; right: 0; + border: 4px solid #2ea2cc; + -webkit-border-radius: 2px; + border-radius: 2px; +} +#customize-control-header_image .header-view.button.selected { + border: 0; +} + +/* Header control: overlay "close" button */ + +#customize-control-header_image .uploaded .header-view .close { + font-size: 2em; + color: grey; + position: absolute; + visibility: hidden; + top: 10px; + right: 10px; + z-index: 1; + width: 20px; + height: 20px; + cursor: pointer; +} + +#customize-control-header_image .uploaded .header-view .close:hover { + color: black; + text-shadow: + -1px -1px 0 #fff, + 1px -1px 0 #fff, + -1px 1px 0 #fff, + 1px 1px 0 #fff; +} + +#customize-control-header_image .header-view:hover .close { + visibility: visible; +} + +/* Header control: randomiz(s)er */ + +#customize-control-header_image .random.placeholder { + cursor: pointer; + -webkit-border-radius: 2px; + border-radius: 2px; + height: 40px; +} + +#customize-control-header_image button.random { + width: 100%; + height: auto; + min-height: 40px; + white-space: normal; +} + +#customize-control-header_image button.random .dice { + margin-top: 4px; +} + +#customize-control-header_image .placeholder:hover .dice, +#customize-control-header_image .header-view:hover > button.random .dice { + -webkit-animation: dice-color-change 3s infinite; + -ms-animation: dice-color-change 3s infinite; + animation: dice-color-change 3s infinite; +} + +@-webkit-keyframes dice-color-change { + 0% { color: #d4b146; } + 50% { color: #ef54b0; } + 75% { color: #7190d3; } + 100% { color: #d4b146; } +} + +@-ms-keyframes dice-color-change { + 0% { color: #d4b146; } + 50% { color: #ef54b0; } + 75% { color: #7190d3; } + 100% { color: #d4b146; } +} + +@keyframes dice-color-change { + 0% { color: #d4b146; } + 50% { color: #ef54b0; } + 75% { color: #7190d3; } + 100% { color: #d4b146; } +} + +/* Header control: actions and choices */ + +#customize-control-header_image .actions { + margin-bottom: 32px; +} + +#customize-control-header_image .choice { + position: relative; + display: block; + margin-bottom: 9px; +} + +#customize-control-header_image .uploaded div:last-child > .choice { + margin-bottom: 0; +} + +#customize-control-header_image img { + width: 100%; + -webkit-border-radius: 2px; + border-radius: 2px; +} + +#customize-control-header_image .remove { + float: left; + margin-right: 3px; +} + +#customize-control-header_image .new { + float: right; +} + + +/** Handle cheaters. */ +body.cheatin { + font-size: medium; + height: auto; + background: #fff; + margin: 50px auto 2em; + padding: 1em 2em; + max-width: 700px; + min-width: 0; + -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.13); + box-shadow: 0 1px 3px rgba(0,0,0,0.13); +} + +body.cheatin p { + font-size: 14px; + line-height: 1.5; + margin: 25px 0 20px; +} diff --git a/wp-admin/css/customize-controls.min.css b/wp-admin/css/customize-controls.min.css new file mode 100644 index 0000000..99b3ab5 --- /dev/null +++ b/wp-admin/css/customize-controls.min.css @@ -0,0 +1 @@ +body{overflow:hidden}#customize-controls a{text-decoration:none}#customize-controls h3{font-size:14px}#customize-controls .submit{text-align:center}#customize-controls .description{color:#666}#customize-header-actions .button-primary{float:right;margin-top:9px}#customize-header-actions .spinner{margin-top:16px;margin-right:4px}.saving #customize-header-actions .spinner{display:block}#customize-info{border:0;border-top:1px solid #ddd}#customize-info .accordion-section-title{background-color:#fff;color:#666;border-left:0;border-right:0;border-bottom:1px solid #eee}#customize-info .accordion-section-title:focus,#customize-info .accordion-section-title:focus:after,#customize-info .accordion-section-title:hover,#customize-info .accordion-section-title:hover:after,#customize-info.open .accordion-section-title,#customize-info.open .accordion-section-title:after{color:#555}#customize-info.open .accordion-section-title{border-color:transparent}#customize-info .preview-notice{font-size:13px;line-height:24px}#customize-info .theme-name{font-size:20px;font-weight:200;line-height:24px;display:block}#customize-info .theme-screenshot{width:258px}#customize-info .theme-description{margin-top:1em;color:#666;line-height:20px}#customize-theme-controls{-webkit-box-shadow:0 1px 1px -1px rgba(0,0,0,.1);box-shadow:0 1px 1px -1px rgba(0,0,0,.1)}#customize-theme-controls .control-section{border:0}#customize-theme-controls .accordion-section-title{color:#555;background-color:#fff;border-bottom:1px solid #eee}#customize-theme-controls .accordion-section-content{color:#555;background:#fff}#customize-theme-controls .control-section .accordion-section-title:focus,#customize-theme-controls .control-section .accordion-section-title:hover,#customize-theme-controls .control-section.open .accordion-section-title,#customize-theme-controls .control-section:hover .accordion-section-title{color:#555;background:#f5f5f5}.js .control-section .accordion-section-title:focus,.js .control-section .accordion-section-title:hover,.js .control-section.open .accordion-section-title,.js .control-section:hover .accordion-section-title{background:#f5f5f5}#customize-theme-controls .control-section .accordion-section-title:focus::after,#customize-theme-controls .control-section .accordion-section-title:hover::after,#customize-theme-controls .control-section.open .accordion-section-title::after,#customize-theme-controls .control-section:hover .accordion-section-title::after{color:#555}#customize-theme-controls .control-section.open{border-bottom:1px solid #eee}#customize-theme-controls .control-section.open .accordion-section-title{border-bottom-color:#eee!important}#customize-theme-controls .control-section:last-of-type .accordion-section-title,#customize-theme-controls .control-section:last-of-type.open{border-bottom-color:#ddd}#customize-theme-controls .accordion-section-content,#customize-theme-controls>ul{margin:0}.customize-control{width:100%;float:left;clear:both;margin-bottom:8px}.customize-control input[type=checkbox],.customize-control input[type=radio],.customize-control input[type=text],.customize-control select{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 select[multiple]{height:auto}.customize-control-title{display:block;font-size:14px;line-height:24px;font-weight:600;margin-bottom:5px}.customize-control-checkbox label,.customize-control-color .color-picker,.customize-control-upload div{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:32px}.customize-control-radio input{margin-right:5px}#customize-preview iframe{width:100%;height:100%}.wp-full-overlay-sidebar{background:#eee;border-right:1px solid #ddd}.collapse-sidebar{background-color:transparent!important;border:0!important;-webkit-box-shadow:none!important;box-shadow:none!important;-webkit-border-radius:0!important;border-radius:0!important}.collapse-sidebar:active,.collapse-sidebar:active .collapse-sidebar-arrow:before,.collapse-sidebar:active .collapse-sidebar-label{text-shadow:none}.collapsed .collapse-sidebar-arrow:before{color:#888}.accordion-section .dropdown{float:left;display:block;position:relative;cursor:pointer}.accordion-section .dropdown-content{overflow:hidden;float:left;min-width:30px;height:16px;line-height:16px;margin-right:16px;padding:4px 5px;border:2px solid #eee;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.customize-control .dropdown-arrow{position:absolute;top:0;bottom:0;right:0;width:20px;background:#eee}.customize-control .dropdown-arrow:after{content:"\f140";font:400 20px/1 dashicons;speak:none;display:block;padding:0;text-indent:0;text-align:center;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#333}.customize-control .dropdown-status{color:#333;background:#eee;display:none;max-width:112px}.customize-control-color .color-picker-hex{display:none}.customize-control-color.open .color-picker-hex{display:block}.customize-control-color .dropdown{margin-right:5px;margin-bottom:5px}.customize-control-color .dropdown .dropdown-content{background-color:#555;border:1px solid rgba(0,0,0,.15)}.customize-control-color .dropdown:hover .dropdown-content{border-color:rgba(0,0,0,.25)}.customize-control-image .actions,.customize-control-image .library{display:none;float:left;width:100%}.customize-control-image.open .actions,.customize-control-image.open .library{display:block}.accordion-section .customize-control-image .dropdown-content{height:auto;min-height:24px;min-width:40px;padding:0}.accordion-section .customize-control-image .dropdown-status{padding:4px 5px}.accordion-section .customize-control-image .preview-thumbnail img{display:block;width:100%;max-width:122px;max-height:98px;margin:0 auto}.accordion-section .customize-control-image .actions{text-align:right}.accordion-section .customize-control-image .library ul{border-bottom:1px solid #ddd;float:left;width:100%;margin:10px 0 0}.accordion-section .customize-control-image .library li{color:#ccc;float:left;padding:3px 15px;margin:0;border:1px solid transparent}.accordion-section .customize-control-image .library li.library-selected{margin-bottom:-1px;padding-bottom:4px;color:#666;border-color:#ddd;border-bottom-color:#fff}.accordion-section .customize-control-image .library .thumbnail{display:block;width:100%}.accordion-section .customize-control-image .library .thumbnail img{display:block;max-width:90%;max-height:80px;margin:5px auto;padding:2px;background:#666}.accordion-section .customize-control-image .library .thumbnail:hover img{background-color:#2ea2cc}.accordion-section .customize-control-image .library-content{display:none;width:100%;float:left;padding:10px 0}.accordion-section .customize-control-image .library-content.library-selected{display:block}.accordion-section .customize-control-image .upload-fallback,.accordion-section .customize-control-upload .upload-fallback{display:none}.accordion-section .customize-control-image .upload-dropzone,.accordion-section .customize-control-upload .upload-dropzone{display:none;padding:15px 10px;border:3px dashed #dfdfdf;margin:5px auto;text-align:center;position:relative;cursor:default}.accordion-section .customize-control-image .upload-dropzone.supports-drag-drop,.accordion-section .customize-control-upload .upload-dropzone.supports-drag-drop{display:block;-webkit-transition:border-color .1s;transition:border-color .1s}.accordion-section .customize-control-image .library ul li,.accordion-section .customize-control-upload .library ul li{cursor:pointer}.accordion-section .customize-control-image .upload-dropzone.supports-drag-drop.drag-over,.accordion-section .customize-control-upload .upload-dropzone.supports-drag-drop.drag-over{border-color:#83b4d8}.ios #customize-preview,.ios .wp-full-overlay{position:relative}.ios #customize-controls .wp-full-overlay-sidebar-content{-webkit-overflow-scrolling:touch}#customize-control-header_image .current{margin-bottom:8px}#customize-control-header_image .uploaded{margin-bottom:18px}#customize-control-header_image .default button:not(.random),#customize-control-header_image .uploaded button:not(.random){width:100%;padding:0;margin:0;background:0 0;border:0;color:inherit;cursor:pointer}#customize-control-header_image button img{display:block}#customize-control-header_image button.new,#customize-control-header_image button.remove{white-space:normal;width:48%;height:auto}#customize-control-header_image .current .container{overflow:hidden;border:1px solid #eee;-webkit-border-radius:2px;border-radius:2px}#customize-control-header_image .placeholder{width:100%;position:relative;text-align:center;cursor:default}#customize-control-header_image .inner{display:none;position:absolute;width:100%;color:#555;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}#customize-control-header_image .inner,#customize-control-header_image .inner .dashicons{line-height:20px;top:10px}#customize-control-header_image .list .inner,#customize-control-header_image .list .inner .dashicons{top:9px}#customize-control-header_image .header-view{position:relative;width:100%;margin-bottom:5px}#customize-control-header_image .header-view:last-child{margin-bottom:0}#customize-control-header_image .header-view:after{border:0}#customize-control-header_image .header-view.selected:after{content:'';position:absolute;height:auto;top:0;left:0;bottom:0;right:0;border:4px solid #2ea2cc;-webkit-border-radius:2px;border-radius:2px}#customize-control-header_image .header-view.button.selected{border:0}#customize-control-header_image .uploaded .header-view .close{font-size:2em;color:grey;position:absolute;visibility:hidden;top:10px;right:10px;z-index:1;width:20px;height:20px;cursor:pointer}#customize-control-header_image .uploaded .header-view .close:hover{color:#000;text-shadow:-1px -1px 0 #fff,1px -1px 0 #fff,-1px 1px 0 #fff,1px 1px 0 #fff}#customize-control-header_image .header-view:hover .close{visibility:visible}#customize-control-header_image .random.placeholder{cursor:pointer;-webkit-border-radius:2px;border-radius:2px;height:40px}#customize-control-header_image button.random{width:100%;height:auto;min-height:40px;white-space:normal}#customize-control-header_image button.random .dice{margin-top:4px}#customize-control-header_image .header-view:hover>button.random .dice,#customize-control-header_image .placeholder:hover .dice{-webkit-animation:dice-color-change 3s infinite;-ms-animation:dice-color-change 3s infinite;animation:dice-color-change 3s infinite}@-webkit-keyframes dice-color-change{0%{color:#d4b146}50%{color:#ef54b0}75%{color:#7190d3}100%{color:#d4b146}}@-ms-keyframes dice-color-change{0%{color:#d4b146}50%{color:#ef54b0}75%{color:#7190d3}100%{color:#d4b146}}@keyframes dice-color-change{0%{color:#d4b146}50%{color:#ef54b0}75%{color:#7190d3}100%{color:#d4b146}}#customize-control-header_image .actions{margin-bottom:32px}#customize-control-header_image .choice{position:relative;display:block;margin-bottom:9px}#customize-control-header_image .uploaded div:last-child>.choice{margin-bottom:0}#customize-control-header_image img{width:100%;-webkit-border-radius:2px;border-radius:2px}#customize-control-header_image .remove{float:left;margin-right:3px}#customize-control-header_image .new{float:right}body.cheatin{font-size:medium;height:auto;background:#fff;margin:50px auto 2em;padding:1em 2em;max-width:700px;min-width:0;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.13);box-shadow:0 1px 3px rgba(0,0,0,.13)}body.cheatin p{font-size:14px;line-height:1.5;margin:25px 0 20px} \ No newline at end of file diff --git a/wp-admin/css/customize-widgets-rtl.css b/wp-admin/css/customize-widgets-rtl.css new file mode 100644 index 0000000..a26638e --- /dev/null +++ b/wp-admin/css/customize-widgets-rtl.css @@ -0,0 +1,603 @@ +.wp-full-overlay-sidebar { + overflow: visible; +} + +/** + * Hide all sidebar sections by default, only show them (via JS) once the + * preview loads and we know whether the sidebars are used in the template. + */ + +.control-section[id^="accordion-section-sidebar-widgets-"], +.customize-control-sidebar_widgets label, +.customize-control-sidebar_widgets .hide-if-js { + /* The link in .customize-control-sidebar_widgets .hide-if-js will fail if it ever gets used. */ + display:none; +} + +.customize-control-widget_form .widget-top { + -webkit-transition: opacity 0.5s; + transition: opacity 0.5s; +} + +.customize-control-widget_form:not(.widget-rendered) .widget-top { + opacity: 0.5; +} + +.customize-control-widget_form .widget-control-save, +.customize-control-widget_form .spinner { + display: none; +} + +.customize-control-widget_form.previewer-loading .spinner { + display: inline; +} + +.customize-control-widget_form.widget-form-disabled .widget-content { + opacity: 0.7; + pointer-events: none; + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.customize-control-widget_form .widget { + margin-bottom: 0; +} + +.customize-control-widget_form.wide-widget-control .widget-inside { + position: fixed; + right: 299px; + top: 25%; + border: 1px solid rgb(229, 229, 229); + overflow: auto; +} +.customize-control-widget_form.wide-widget-control .widget-inside > .form { + padding: 20px; +} + +.customize-control-widget_form.wide-widget-control .widget-top { + -webkit-transition: background-color 0.4s; + transition: background-color 0.4s; +} +.customize-control-widget_form.wide-widget-control.expanding .widget-top, +.customize-control-widget_form.wide-widget-control.expanded:not(.collapsing) .widget-top { + background-color: rgb(227, 227, 227); +} + +.widget-inside { + padding: 1px 10px 10px 10px; + border-top: none; + line-height: 16px; +} + +.widget-top { + cursor: move; +} + +.customize-control-widget_form.expanded a.widget-action:after { + content: "\f142"; +} + +.customize-control-widget_form.wide-widget-control a.widget-action:after { + content: "\f139"; +} + +.customize-control-widget_form.wide-widget-control.expanded a.widget-action:after { + content: "\f141"; +} + +.widget-title-action { + cursor: pointer; +} + +.customize-control-widget_form .widget .customize-control-title { + cursor: move; +} + +.control-section.accordion-section.highlighted > .accordion-section-title, +.customize-control-widget_form.highlighted { + outline: none; + -webkit-box-shadow: 0 0 2px rgba(30,140,190,0.8); + box-shadow: 0 0 2px rgba(30,140,190,0.8); + position: relative; + z-index: 1; +} + +#widget-customizer-control-templates { + display: none; +} + +/** +* Widget reordering styles +**/ + +.reorder-toggle { + float: left; + padding: 5px 8px; + text-decoration: none; + cursor: pointer; + outline: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.reorder-toggle:focus { + outline: 1px dotted; +} + +.reorder-done, +.reordering .reorder { + display: none; +} + +.reordering .reorder-done { + display: block; + color: #aa0000; +} + +#customize-theme-controls .reordering .add-new-widget { + opacity: 0.2; + pointer-events: none; + cursor: not-allowed; +} + +#customize-theme-controls .widget-reorder-nav { + display: none; + float: left; + background-color: #fafafa; +} + +.widget-reorder-nav span { + position: relative; + overflow: hidden; + float: right; + display: block; + width: 33px; /* was 42px for mobile */ + height: 43px; + color: #888; + text-indent: -9999px; + cursor: pointer; + outline: none; +} + +.widget-reorder-nav span:before { + display: inline-block; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + font: normal 20px/43px 'dashicons'; + text-align: center; + text-indent: 0; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.widget-reorder-nav span:hover, +.widget-reorder-nav span:focus { + color: #444; + background: #eee; +} + +.move-widget:before { + content: '\f504'; +} + +.move-widget-down:before { + content: '\f347'; +} + +.move-widget-up:before { + content: '\f343'; +} + +#customize-theme-controls .first-widget .move-widget-up, +#customize-theme-controls .last-widget .move-widget-down { + color: #d5d5d5; + cursor: default; +} + +#customize-theme-controls .move-widget-area { + display: none; + background: #fff; + border: 1px solid #dedede; + border-top: none; + cursor: auto; +} + +#customize-theme-controls .reordering .move-widget-area.active { + display: block; +} + +#customize-theme-controls .move-widget-area .description { + margin: 0; + padding: 15px 20px; + font-weight: 400; +} + +#customize-theme-controls .widget-area-select { + margin: 0; + padding: 0; + list-style: none; +} + +#customize-theme-controls .widget-area-select li { + position: relative; + margin: 0; + padding: 13px 42px 15px 15px; + color: #555; + border-top: 1px solid #eee; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +#customize-theme-controls .widget-area-select li:before { + display: none; + content: '\f147'; + position: absolute; + top: 12px; + right: 10px; + font: normal 20px/1 'dashicons'; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +#customize-theme-controls .widget-area-select li:last-child { + border-bottom: 1px solid #eee; +} + +#customize-theme-controls .widget-area-select .selected { + color: #fff; + text-shadow: 0 -1px 0 rgba(0,0,0,.4); + background: #2ea2cc; +} + +#customize-theme-controls .widget-area-select .selected:before { + display: block; +} + +#customize-theme-controls .move-widget-actions { + text-align: left; + padding: 12px; +} + +#customize-theme-controls .reordering .widget-title-action { + display: none; +} + +#customize-theme-controls .reordering .widget-reorder-nav { + display: block; +} + + +/** + * Styles for new widget addition panel + */ +.wp-full-overlay-main { + left: auto; /* this overrides a right: 0; which causes the preview to resize, I'd rather have it go off screen at the normal size. */ + width: 100%; +} + +#customize-theme-controls .add-new-widget { + cursor: pointer; + float: left; + margin-right: 10px; + -webkit-transition: all 0.2s; + transition: all 0.2s; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + outline: none; +} + +.add-new-widget:before { + content: "\f132"; + display: inline-block; + position: relative; + right: -2px; + top: -1px; + font: normal 20px/1 'dashicons'; + vertical-align: middle; + -webkit-transition: all 0.2s; + transition: all 0.2s; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +body.adding-widget .add-new-widget, +body.adding-widget .add-new-widget:hover { + background: #eee; + border-color: #999; + color: #333; + -webkit-box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); + box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); +} +body.adding-widget .add-new-widget:before { + -webkit-transform: rotate(45deg); + -ms-transform: rotate(45deg); + transform: rotate(45deg); +} + +#available-widgets .widget { + position: static; +} + +/* override widgets admin page rules in wp-admin/css/wp-admin.css */ +#widgets-left #available-widgets .widget { + float: none !important; + width: auto !important; +} + +#available-widgets { + position: absolute; + overflow: auto; + top: 0; + bottom: 0; + right: -301px; + width: 300px; + margin: 0; + z-index: 1; + background: #fff; + -webkit-transition: all 0.2s; + transition: all 0.2s; + border-left: 1px solid #dddddd; +} + +#available-widgets-filter { + padding: 8px 13px 7px 17px; + border-bottom: 1px solid #e4e4e4; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +#available-widgets-filter input { + padding: 5px 10px 2px 10px; + width: 100%; +} + +#available-widgets .widget-tpl { + position: relative; + padding: 20px 60px 20px 15px; + border-bottom: 1px solid #e4e4e4; + cursor: pointer; + display: none; +} + +#available-widgets .widget-tpl:hover, +#available-widgets .widget-tpl.selected { + background: #fafafa; +} + +#available-widgets .widget-top, +#available-widgets .widget-top:hover { + border: none; + background: transparent; + -webkit-box-shadow: none; + box-shadow: none; +} + +#available-widgets .widget-title h4 { + padding: 0 0 5px; + font-size: 14px; +} + +#available-widgets .widget .widget-description { + padding: 0; + color: #777; +} + +#customize-preview { + -webkit-transition: all 0.2s; + transition: all 0.2s; +} + +body.adding-widget #available-widgets { + right: 0; +} + +body.adding-widget .wp-full-overlay-main { + right: 300px; +} + +body.adding-widget #customize-preview { + opacity: 0.4; +} + + +/** + * Widget Icon styling + * No plurals in naming. + * Ordered from lowest to highest specificity. + **/ +#available-widgets .widget-title { + position: relative; +} + +#available-widgets .widget-title:before { + content: "\f132"; + position: absolute; + top: -3px; + left: 100%; + margin-left: 20px; + width: 20px; + height: 20px; + color: #333; + font: normal 20px/1 'dashicons'; + text-align: center; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +/* smiley */ +#available-widgets [class*="easy"] .widget-title:before { content: "\f328"; top: -4px; } + +/* star-filled */ +#available-widgets [class*="super"] .widget-title:before, +#available-widgets [class*="like"] .widget-title:before { content: "\f155"; top: -4px; } + +/* wordpress */ +#available-widgets [class*="meta"] .widget-title:before { content: "\f120"; } + +/* archive-box */ +#available-widgets [class*="archives"] .widget-title:before { content: "\f480"; top: -4px; } + +/* category */ +#available-widgets [class*="categor"] .widget-title:before { content: "\f318"; top: -4px; } + +/* comments */ +#available-widgets [class*="comment"] .widget-title:before, +#available-widgets [class*="testimonial"] .widget-title:before, +#available-widgets [class*="chat"] .widget-title:before { content: "\f101"; } + +/* post */ +#available-widgets [class*="post"] .widget-title:before { content: "\f109"; } + +/* admin-page */ +#available-widgets [class*="page"] .widget-title:before { content: "\f105"; } + +/* text */ +#available-widgets [class*="text"] .widget-title:before { content: "\f478"; } + +/* links */ +#available-widgets [class*="link"] .widget-title:before { content: "\f103"; } + +/* search */ +#available-widgets [class*="search"] .widget-title:before { content: "\f179"; } + +/* menu */ +#available-widgets [class*="menu"] .widget-title:before, +#available-widgets [class*="nav"] .widget-title:before { content: "\f333"; } + +/* tag-cloud */ +#available-widgets [class*="tag"] .widget-title:before { content: "\f479"; } + +/* rss */ +#available-widgets [class*="rss"] .widget-title:before { content: "\f303"; top: -6px; } + +/* calendar */ +#available-widgets [class*="event"] .widget-title:before, +#available-widgets [class*="calendar"] .widget-title:before { content: "\f145"; top: -4px;} + +/* format-image */ +#available-widgets [class*="image"] .widget-title:before, +#available-widgets [class*="photo"] .widget-title:before, +#available-widgets [class*="slide"] .widget-title:before, +#available-widgets [class*="instagram"] .widget-title:before { content: "\f128"; } + +/* format-gallery */ +#available-widgets [class*="album"] .widget-title:before, +#available-widgets [class*="galler"] .widget-title:before { content: "\f161"; } + +/* format-video */ +#available-widgets [class*="video"] .widget-title:before, +#available-widgets [class*="tube"] .widget-title:before { content: "\f126"; } + +/* format-audio */ +#available-widgets [class*="music"] .widget-title:before, +#available-widgets [class*="radio"] .widget-title:before, +#available-widgets [class*="audio"] .widget-title:before { content: "\f127"; } + +/* admin-users */ +#available-widgets [class*="login"] .widget-title:before, +#available-widgets [class*="user"] .widget-title:before, +#available-widgets [class*="member"] .widget-title:before, +#available-widgets [class*="avatar"] .widget-title:before, +#available-widgets [class*="subscriber"] .widget-title:before, +#available-widgets [class*="profile"] .widget-title:before, +#available-widgets [class*="grofile"] .widget-title:before { content: "\f110"; } + +/* cart */ +#available-widgets [class*="commerce"] .widget-title:before, +#available-widgets [class*="shop"] .widget-title:before, +#available-widgets [class*="cart"] .widget-title:before { content: "\f174"; top: -4px; } + +/* shield */ +#available-widgets [class*="secur"] .widget-title:before, +#available-widgets [class*="firewall"] .widget-title:before { content: "\f332"; } + +/* chart-bar */ +#available-widgets [class*="analytic"] .widget-title:before, +#available-widgets [class*="stat"] .widget-title:before, +#available-widgets [class*="poll"] .widget-title:before { content: "\f185"; } + +/* feedback */ +#available-widgets [class*="form"] .widget-title:before { content: "\f175"; } + +/* email-alt */ +#available-widgets [class*="subscribe"] .widget-title:before, +#available-widgets [class*="news"] .widget-title:before, +#available-widgets [class*="contact"] .widget-title:before, +#available-widgets [class*="mail"] .widget-title:before { content: "\f466"; } + +/* share */ +#available-widgets [class*="share"] .widget-title:before, +#available-widgets [class*="socia"] .widget-title:before { content: "\f237"; } + +/* translation */ +#available-widgets [class*="lang"] .widget-title:before, +#available-widgets [class*="translat"] .widget-title:before { content: "\f326"; } + +/* location-alt */ +#available-widgets [class*="locat"] .widget-title:before, +#available-widgets [class*="map"] .widget-title:before { content: "\f231"; } + +/* download */ +#available-widgets [class*="download"] .widget-title:before { content: "\f316"; } + +/* cloud */ +#available-widgets [class*="weather"] .widget-title:before { content: "\f176"; top: -4px;} + +/* facebook */ +#available-widgets [class*="facebook"] .widget-title:before { content: "\f304"; } + +/* twitter */ +#available-widgets [class*="tweet"] .widget-title:before, +#available-widgets [class*="twitter"] .widget-title:before { content: "\f301"; } + + +@media screen and (max-height: 700px) and (min-width: 981px) { + .customize-control { + margin-bottom: 0; + } + .widget-top { + -webkit-box-shadow: none; + box-shadow: none; + margin-top: -1px; + } + .widget-top:hover { + position: relative; + z-index: 1; + } + .last-widget { + margin-bottom: 15px; + } + .widget-title h4 { + padding: 13px 15px; + } + .widget-top a.widget-action:after { + padding-top: 9px; + } + .widget-reorder-nav span { + height: 39px; + } + .widget-reorder-nav span:before { + line-height: 39px; + } + #customize-theme-controls .widget-area-select li { + padding: 9px 42px 11px 15px; + } + #customize-theme-controls .widget-area-select li:before { + top: 8px; + } +} diff --git a/wp-admin/css/customize-widgets-rtl.min.css b/wp-admin/css/customize-widgets-rtl.min.css new file mode 100644 index 0000000..f8bd054 --- /dev/null +++ b/wp-admin/css/customize-widgets-rtl.min.css @@ -0,0 +1 @@ +.wp-full-overlay-sidebar{overflow:visible}.control-section[id^=accordion-section-sidebar-widgets-],.customize-control-sidebar_widgets .hide-if-js,.customize-control-sidebar_widgets label{display:none}.customize-control-widget_form .widget-top{-webkit-transition:opacity .5s;transition:opacity .5s}.customize-control-widget_form:not(.widget-rendered) .widget-top{opacity:.5}.customize-control-widget_form .spinner,.customize-control-widget_form .widget-control-save{display:none}.customize-control-widget_form.previewer-loading .spinner{display:inline}.customize-control-widget_form.widget-form-disabled .widget-content{opacity:.7;pointer-events:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.customize-control-widget_form .widget{margin-bottom:0}.customize-control-widget_form.wide-widget-control .widget-inside{position:fixed;right:299px;top:25%;border:1px solid #e5e5e5;overflow:auto}.customize-control-widget_form.wide-widget-control .widget-inside>.form{padding:20px}.customize-control-widget_form.wide-widget-control .widget-top{-webkit-transition:background-color .4s;transition:background-color .4s}.customize-control-widget_form.wide-widget-control.expanded:not(.collapsing) .widget-top,.customize-control-widget_form.wide-widget-control.expanding .widget-top{background-color:#e3e3e3}.widget-inside{padding:1px 10px 10px;border-top:0;line-height:16px}.widget-top{cursor:move}.customize-control-widget_form.expanded a.widget-action:after{content:"\f142"}.customize-control-widget_form.wide-widget-control a.widget-action:after{content:"\f139"}.customize-control-widget_form.wide-widget-control.expanded a.widget-action:after{content:"\f141"}.widget-title-action{cursor:pointer}.customize-control-widget_form .widget .customize-control-title{cursor:move}.control-section.accordion-section.highlighted>.accordion-section-title,.customize-control-widget_form.highlighted{outline:0;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8);position:relative;z-index:1}#widget-customizer-control-templates{display:none}.reorder-toggle{float:left;padding:5px 8px;text-decoration:none;cursor:pointer;outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.reorder-toggle:focus{outline:1px dotted}.reorder-done,.reordering .reorder{display:none}.reordering .reorder-done{display:block;color:#a00}#customize-theme-controls .reordering .add-new-widget{opacity:.2;pointer-events:none;cursor:not-allowed}#customize-theme-controls .widget-reorder-nav{display:none;float:left;background-color:#fafafa}.widget-reorder-nav span{position:relative;overflow:hidden;float:right;display:block;width:33px;height:43px;color:#888;text-indent:-9999px;cursor:pointer;outline:0}.widget-reorder-nav span:before{display:inline-block;position:absolute;top:0;left:0;width:100%;height:100%;font:400 20px/43px dashicons;text-align:center;text-indent:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.widget-reorder-nav span:focus,.widget-reorder-nav span:hover{color:#444;background:#eee}.move-widget:before{content:'\f504'}.move-widget-down:before{content:'\f347'}.move-widget-up:before{content:'\f343'}#customize-theme-controls .first-widget .move-widget-up,#customize-theme-controls .last-widget .move-widget-down{color:#d5d5d5;cursor:default}#customize-theme-controls .move-widget-area{display:none;background:#fff;border:1px solid #dedede;border-top:0;cursor:auto}#customize-theme-controls .reordering .move-widget-area.active{display:block}#customize-theme-controls .move-widget-area .description{margin:0;padding:15px 20px;font-weight:400}#customize-theme-controls .widget-area-select{margin:0;padding:0;list-style:none}#customize-theme-controls .widget-area-select li{position:relative;margin:0;padding:13px 42px 15px 15px;color:#555;border-top:1px solid #eee;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#customize-theme-controls .widget-area-select li:before{display:none;content:'\f147';position:absolute;top:12px;right:10px;font:400 20px/1 dashicons;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#customize-theme-controls .widget-area-select li:last-child{border-bottom:1px solid #eee}#customize-theme-controls .widget-area-select .selected{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.4);background:#2ea2cc}#customize-theme-controls .widget-area-select .selected:before{display:block}#customize-theme-controls .move-widget-actions{text-align:left;padding:12px}#customize-theme-controls .reordering .widget-title-action{display:none}#customize-theme-controls .reordering .widget-reorder-nav{display:block}.wp-full-overlay-main{left:auto;width:100%}#customize-theme-controls .add-new-widget{cursor:pointer;float:left;margin-right:10px;-webkit-transition:all .2s;transition:all .2s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:0}.add-new-widget:before{content:"\f132";display:inline-block;position:relative;right:-2px;top:-1px;font:400 20px/1 dashicons;vertical-align:middle;-webkit-transition:all .2s;transition:all .2s;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body.adding-widget .add-new-widget,body.adding-widget .add-new-widget:hover{background:#eee;border-color:#999;color:#333;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}body.adding-widget .add-new-widget:before{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}#available-widgets .widget{position:static}#widgets-left #available-widgets .widget{float:none!important;width:auto!important}#available-widgets{position:absolute;overflow:auto;top:0;bottom:0;right:-301px;width:300px;margin:0;z-index:1;background:#fff;-webkit-transition:all .2s;transition:all .2s;border-left:1px solid #ddd}#available-widgets-filter{padding:8px 13px 7px 17px;border-bottom:1px solid #e4e4e4;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#available-widgets-filter input{padding:5px 10px 2px;width:100%}#available-widgets .widget-tpl{position:relative;padding:20px 60px 20px 15px;border-bottom:1px solid #e4e4e4;cursor:pointer;display:none}#available-widgets .widget-tpl.selected,#available-widgets .widget-tpl:hover{background:#fafafa}#available-widgets .widget-top,#available-widgets .widget-top:hover{border:0;background:0 0;-webkit-box-shadow:none;box-shadow:none}#available-widgets .widget-title h4{padding:0 0 5px;font-size:14px}#available-widgets .widget .widget-description{padding:0;color:#777}#customize-preview{-webkit-transition:all .2s;transition:all .2s}body.adding-widget #available-widgets{right:0}body.adding-widget .wp-full-overlay-main{right:300px}body.adding-widget #customize-preview{opacity:.4}#available-widgets .widget-title{position:relative}#available-widgets .widget-title:before{content:"\f132";position:absolute;top:-3px;left:100%;margin-left:20px;width:20px;height:20px;color:#333;font:400 20px/1 dashicons;text-align:center;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#available-widgets [class*=easy] .widget-title:before{content:"\f328";top:-4px}#available-widgets [class*=like] .widget-title:before,#available-widgets [class*=super] .widget-title:before{content:"\f155";top:-4px}#available-widgets [class*=meta] .widget-title:before{content:"\f120"}#available-widgets [class*=archives] .widget-title:before{content:"\f480";top:-4px}#available-widgets [class*=categor] .widget-title:before{content:"\f318";top:-4px}#available-widgets [class*=chat] .widget-title:before,#available-widgets [class*=comment] .widget-title:before,#available-widgets [class*=testimonial] .widget-title:before{content:"\f101"}#available-widgets [class*=post] .widget-title:before{content:"\f109"}#available-widgets [class*=page] .widget-title:before{content:"\f105"}#available-widgets [class*=text] .widget-title:before{content:"\f478"}#available-widgets [class*=link] .widget-title:before{content:"\f103"}#available-widgets [class*=search] .widget-title:before{content:"\f179"}#available-widgets [class*=menu] .widget-title:before,#available-widgets [class*=nav] .widget-title:before{content:"\f333"}#available-widgets [class*=tag] .widget-title:before{content:"\f479"}#available-widgets [class*=rss] .widget-title:before{content:"\f303";top:-6px}#available-widgets [class*=calendar] .widget-title:before,#available-widgets [class*=event] .widget-title:before{content:"\f145";top:-4px}#available-widgets [class*=image] .widget-title:before,#available-widgets [class*=instagram] .widget-title:before,#available-widgets [class*=photo] .widget-title:before,#available-widgets [class*=slide] .widget-title:before{content:"\f128"}#available-widgets [class*=album] .widget-title:before,#available-widgets [class*=galler] .widget-title:before{content:"\f161"}#available-widgets [class*=tube] .widget-title:before,#available-widgets [class*=video] .widget-title:before{content:"\f126"}#available-widgets [class*=audio] .widget-title:before,#available-widgets [class*=music] .widget-title:before,#available-widgets [class*=radio] .widget-title:before{content:"\f127"}#available-widgets [class*=avatar] .widget-title:before,#available-widgets [class*=grofile] .widget-title:before,#available-widgets [class*=login] .widget-title:before,#available-widgets [class*=member] .widget-title:before,#available-widgets [class*=profile] .widget-title:before,#available-widgets [class*=subscriber] .widget-title:before,#available-widgets [class*=user] .widget-title:before{content:"\f110"}#available-widgets [class*=cart] .widget-title:before,#available-widgets [class*=commerce] .widget-title:before,#available-widgets [class*=shop] .widget-title:before{content:"\f174";top:-4px}#available-widgets [class*=firewall] .widget-title:before,#available-widgets [class*=secur] .widget-title:before{content:"\f332"}#available-widgets [class*=analytic] .widget-title:before,#available-widgets [class*=poll] .widget-title:before,#available-widgets [class*=stat] .widget-title:before{content:"\f185"}#available-widgets [class*=form] .widget-title:before{content:"\f175"}#available-widgets [class*=contact] .widget-title:before,#available-widgets [class*=mail] .widget-title:before,#available-widgets [class*=news] .widget-title:before,#available-widgets [class*=subscribe] .widget-title:before{content:"\f466"}#available-widgets [class*=share] .widget-title:before,#available-widgets [class*=socia] .widget-title:before{content:"\f237"}#available-widgets [class*=lang] .widget-title:before,#available-widgets [class*=translat] .widget-title:before{content:"\f326"}#available-widgets [class*=locat] .widget-title:before,#available-widgets [class*=map] .widget-title:before{content:"\f231"}#available-widgets [class*=download] .widget-title:before{content:"\f316"}#available-widgets [class*=weather] .widget-title:before{content:"\f176";top:-4px}#available-widgets [class*=facebook] .widget-title:before{content:"\f304"}#available-widgets [class*=tweet] .widget-title:before,#available-widgets [class*=twitter] .widget-title:before{content:"\f301"}@media screen and (max-height:700px) and (min-width:981px){.customize-control{margin-bottom:0}.widget-top{-webkit-box-shadow:none;box-shadow:none;margin-top:-1px}.widget-top:hover{position:relative;z-index:1}.last-widget{margin-bottom:15px}.widget-title h4{padding:13px 15px}.widget-top a.widget-action:after{padding-top:9px}.widget-reorder-nav span{height:39px}.widget-reorder-nav span:before{line-height:39px}#customize-theme-controls .widget-area-select li{padding:9px 42px 11px 15px}#customize-theme-controls .widget-area-select li:before{top:8px}} \ No newline at end of file diff --git a/wp-admin/css/customize-widgets.css b/wp-admin/css/customize-widgets.css new file mode 100644 index 0000000..f025f79 --- /dev/null +++ b/wp-admin/css/customize-widgets.css @@ -0,0 +1,603 @@ +.wp-full-overlay-sidebar { + overflow: visible; +} + +/** + * Hide all sidebar sections by default, only show them (via JS) once the + * preview loads and we know whether the sidebars are used in the template. + */ + +.control-section[id^="accordion-section-sidebar-widgets-"], +.customize-control-sidebar_widgets label, +.customize-control-sidebar_widgets .hide-if-js { + /* The link in .customize-control-sidebar_widgets .hide-if-js will fail if it ever gets used. */ + display:none; +} + +.customize-control-widget_form .widget-top { + -webkit-transition: opacity 0.5s; + transition: opacity 0.5s; +} + +.customize-control-widget_form:not(.widget-rendered) .widget-top { + opacity: 0.5; +} + +.customize-control-widget_form .widget-control-save, +.customize-control-widget_form .spinner { + display: none; +} + +.customize-control-widget_form.previewer-loading .spinner { + display: inline; +} + +.customize-control-widget_form.widget-form-disabled .widget-content { + opacity: 0.7; + pointer-events: none; + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.customize-control-widget_form .widget { + margin-bottom: 0; +} + +.customize-control-widget_form.wide-widget-control .widget-inside { + position: fixed; + left: 299px; + top: 25%; + border: 1px solid rgb(229, 229, 229); + overflow: auto; +} +.customize-control-widget_form.wide-widget-control .widget-inside > .form { + padding: 20px; +} + +.customize-control-widget_form.wide-widget-control .widget-top { + -webkit-transition: background-color 0.4s; + transition: background-color 0.4s; +} +.customize-control-widget_form.wide-widget-control.expanding .widget-top, +.customize-control-widget_form.wide-widget-control.expanded:not(.collapsing) .widget-top { + background-color: rgb(227, 227, 227); +} + +.widget-inside { + padding: 1px 10px 10px 10px; + border-top: none; + line-height: 16px; +} + +.widget-top { + cursor: move; +} + +.customize-control-widget_form.expanded a.widget-action:after { + content: "\f142"; +} + +.customize-control-widget_form.wide-widget-control a.widget-action:after { + content: "\f139"; +} + +.customize-control-widget_form.wide-widget-control.expanded a.widget-action:after { + content: "\f141"; +} + +.widget-title-action { + cursor: pointer; +} + +.customize-control-widget_form .widget .customize-control-title { + cursor: move; +} + +.control-section.accordion-section.highlighted > .accordion-section-title, +.customize-control-widget_form.highlighted { + outline: none; + -webkit-box-shadow: 0 0 2px rgba(30,140,190,0.8); + box-shadow: 0 0 2px rgba(30,140,190,0.8); + position: relative; + z-index: 1; +} + +#widget-customizer-control-templates { + display: none; +} + +/** +* Widget reordering styles +**/ + +.reorder-toggle { + float: right; + padding: 5px 8px; + text-decoration: none; + cursor: pointer; + outline: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.reorder-toggle:focus { + outline: 1px dotted; +} + +.reorder-done, +.reordering .reorder { + display: none; +} + +.reordering .reorder-done { + display: block; + color: #aa0000; +} + +#customize-theme-controls .reordering .add-new-widget { + opacity: 0.2; + pointer-events: none; + cursor: not-allowed; +} + +#customize-theme-controls .widget-reorder-nav { + display: none; + float: right; + background-color: #fafafa; +} + +.widget-reorder-nav span { + position: relative; + overflow: hidden; + float: left; + display: block; + width: 33px; /* was 42px for mobile */ + height: 43px; + color: #888; + text-indent: -9999px; + cursor: pointer; + outline: none; +} + +.widget-reorder-nav span:before { + display: inline-block; + position: absolute; + top: 0; + right: 0; + width: 100%; + height: 100%; + font: normal 20px/43px 'dashicons'; + text-align: center; + text-indent: 0; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.widget-reorder-nav span:hover, +.widget-reorder-nav span:focus { + color: #444; + background: #eee; +} + +.move-widget:before { + content: '\f504'; +} + +.move-widget-down:before { + content: '\f347'; +} + +.move-widget-up:before { + content: '\f343'; +} + +#customize-theme-controls .first-widget .move-widget-up, +#customize-theme-controls .last-widget .move-widget-down { + color: #d5d5d5; + cursor: default; +} + +#customize-theme-controls .move-widget-area { + display: none; + background: #fff; + border: 1px solid #dedede; + border-top: none; + cursor: auto; +} + +#customize-theme-controls .reordering .move-widget-area.active { + display: block; +} + +#customize-theme-controls .move-widget-area .description { + margin: 0; + padding: 15px 20px; + font-weight: 400; +} + +#customize-theme-controls .widget-area-select { + margin: 0; + padding: 0; + list-style: none; +} + +#customize-theme-controls .widget-area-select li { + position: relative; + margin: 0; + padding: 13px 15px 15px 42px; + color: #555; + border-top: 1px solid #eee; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +#customize-theme-controls .widget-area-select li:before { + display: none; + content: '\f147'; + position: absolute; + top: 12px; + left: 10px; + font: normal 20px/1 'dashicons'; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +#customize-theme-controls .widget-area-select li:last-child { + border-bottom: 1px solid #eee; +} + +#customize-theme-controls .widget-area-select .selected { + color: #fff; + text-shadow: 0 -1px 0 rgba(0,0,0,.4); + background: #2ea2cc; +} + +#customize-theme-controls .widget-area-select .selected:before { + display: block; +} + +#customize-theme-controls .move-widget-actions { + text-align: right; + padding: 12px; +} + +#customize-theme-controls .reordering .widget-title-action { + display: none; +} + +#customize-theme-controls .reordering .widget-reorder-nav { + display: block; +} + + +/** + * Styles for new widget addition panel + */ +.wp-full-overlay-main { + right: auto; /* this overrides a right: 0; which causes the preview to resize, I'd rather have it go off screen at the normal size. */ + width: 100%; +} + +#customize-theme-controls .add-new-widget { + cursor: pointer; + float: right; + margin-left: 10px; + -webkit-transition: all 0.2s; + transition: all 0.2s; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + outline: none; +} + +.add-new-widget:before { + content: "\f132"; + display: inline-block; + position: relative; + left: -2px; + top: -1px; + font: normal 20px/1 'dashicons'; + vertical-align: middle; + -webkit-transition: all 0.2s; + transition: all 0.2s; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +body.adding-widget .add-new-widget, +body.adding-widget .add-new-widget:hover { + background: #eee; + border-color: #999; + color: #333; + -webkit-box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); + box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); +} +body.adding-widget .add-new-widget:before { + -webkit-transform: rotate(45deg); + -ms-transform: rotate(45deg); + transform: rotate(45deg); +} + +#available-widgets .widget { + position: static; +} + +/* override widgets admin page rules in wp-admin/css/wp-admin.css */ +#widgets-left #available-widgets .widget { + float: none !important; + width: auto !important; +} + +#available-widgets { + position: absolute; + overflow: auto; + top: 0; + bottom: 0; + left: -301px; + width: 300px; + margin: 0; + z-index: 1; + background: #fff; + -webkit-transition: all 0.2s; + transition: all 0.2s; + border-right: 1px solid #dddddd; +} + +#available-widgets-filter { + padding: 8px 17px 7px 13px; + border-bottom: 1px solid #e4e4e4; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +#available-widgets-filter input { + padding: 5px 10px 2px 10px; + width: 100%; +} + +#available-widgets .widget-tpl { + position: relative; + padding: 20px 15px 20px 60px; + border-bottom: 1px solid #e4e4e4; + cursor: pointer; + display: none; +} + +#available-widgets .widget-tpl:hover, +#available-widgets .widget-tpl.selected { + background: #fafafa; +} + +#available-widgets .widget-top, +#available-widgets .widget-top:hover { + border: none; + background: transparent; + -webkit-box-shadow: none; + box-shadow: none; +} + +#available-widgets .widget-title h4 { + padding: 0 0 5px; + font-size: 14px; +} + +#available-widgets .widget .widget-description { + padding: 0; + color: #777; +} + +#customize-preview { + -webkit-transition: all 0.2s; + transition: all 0.2s; +} + +body.adding-widget #available-widgets { + left: 0; +} + +body.adding-widget .wp-full-overlay-main { + left: 300px; +} + +body.adding-widget #customize-preview { + opacity: 0.4; +} + + +/** + * Widget Icon styling + * No plurals in naming. + * Ordered from lowest to highest specificity. + **/ +#available-widgets .widget-title { + position: relative; +} + +#available-widgets .widget-title:before { + content: "\f132"; + position: absolute; + top: -3px; + right: 100%; + margin-right: 20px; + width: 20px; + height: 20px; + color: #333; + font: normal 20px/1 'dashicons'; + text-align: center; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +/* smiley */ +#available-widgets [class*="easy"] .widget-title:before { content: "\f328"; top: -4px; } + +/* star-filled */ +#available-widgets [class*="super"] .widget-title:before, +#available-widgets [class*="like"] .widget-title:before { content: "\f155"; top: -4px; } + +/* wordpress */ +#available-widgets [class*="meta"] .widget-title:before { content: "\f120"; } + +/* archive-box */ +#available-widgets [class*="archives"] .widget-title:before { content: "\f480"; top: -4px; } + +/* category */ +#available-widgets [class*="categor"] .widget-title:before { content: "\f318"; top: -4px; } + +/* comments */ +#available-widgets [class*="comment"] .widget-title:before, +#available-widgets [class*="testimonial"] .widget-title:before, +#available-widgets [class*="chat"] .widget-title:before { content: "\f101"; } + +/* post */ +#available-widgets [class*="post"] .widget-title:before { content: "\f109"; } + +/* admin-page */ +#available-widgets [class*="page"] .widget-title:before { content: "\f105"; } + +/* text */ +#available-widgets [class*="text"] .widget-title:before { content: "\f478"; } + +/* links */ +#available-widgets [class*="link"] .widget-title:before { content: "\f103"; } + +/* search */ +#available-widgets [class*="search"] .widget-title:before { content: "\f179"; } + +/* menu */ +#available-widgets [class*="menu"] .widget-title:before, +#available-widgets [class*="nav"] .widget-title:before { content: "\f333"; } + +/* tag-cloud */ +#available-widgets [class*="tag"] .widget-title:before { content: "\f479"; } + +/* rss */ +#available-widgets [class*="rss"] .widget-title:before { content: "\f303"; top: -6px; } + +/* calendar */ +#available-widgets [class*="event"] .widget-title:before, +#available-widgets [class*="calendar"] .widget-title:before { content: "\f145"; top: -4px;} + +/* format-image */ +#available-widgets [class*="image"] .widget-title:before, +#available-widgets [class*="photo"] .widget-title:before, +#available-widgets [class*="slide"] .widget-title:before, +#available-widgets [class*="instagram"] .widget-title:before { content: "\f128"; } + +/* format-gallery */ +#available-widgets [class*="album"] .widget-title:before, +#available-widgets [class*="galler"] .widget-title:before { content: "\f161"; } + +/* format-video */ +#available-widgets [class*="video"] .widget-title:before, +#available-widgets [class*="tube"] .widget-title:before { content: "\f126"; } + +/* format-audio */ +#available-widgets [class*="music"] .widget-title:before, +#available-widgets [class*="radio"] .widget-title:before, +#available-widgets [class*="audio"] .widget-title:before { content: "\f127"; } + +/* admin-users */ +#available-widgets [class*="login"] .widget-title:before, +#available-widgets [class*="user"] .widget-title:before, +#available-widgets [class*="member"] .widget-title:before, +#available-widgets [class*="avatar"] .widget-title:before, +#available-widgets [class*="subscriber"] .widget-title:before, +#available-widgets [class*="profile"] .widget-title:before, +#available-widgets [class*="grofile"] .widget-title:before { content: "\f110"; } + +/* cart */ +#available-widgets [class*="commerce"] .widget-title:before, +#available-widgets [class*="shop"] .widget-title:before, +#available-widgets [class*="cart"] .widget-title:before { content: "\f174"; top: -4px; } + +/* shield */ +#available-widgets [class*="secur"] .widget-title:before, +#available-widgets [class*="firewall"] .widget-title:before { content: "\f332"; } + +/* chart-bar */ +#available-widgets [class*="analytic"] .widget-title:before, +#available-widgets [class*="stat"] .widget-title:before, +#available-widgets [class*="poll"] .widget-title:before { content: "\f185"; } + +/* feedback */ +#available-widgets [class*="form"] .widget-title:before { content: "\f175"; } + +/* email-alt */ +#available-widgets [class*="subscribe"] .widget-title:before, +#available-widgets [class*="news"] .widget-title:before, +#available-widgets [class*="contact"] .widget-title:before, +#available-widgets [class*="mail"] .widget-title:before { content: "\f466"; } + +/* share */ +#available-widgets [class*="share"] .widget-title:before, +#available-widgets [class*="socia"] .widget-title:before { content: "\f237"; } + +/* translation */ +#available-widgets [class*="lang"] .widget-title:before, +#available-widgets [class*="translat"] .widget-title:before { content: "\f326"; } + +/* location-alt */ +#available-widgets [class*="locat"] .widget-title:before, +#available-widgets [class*="map"] .widget-title:before { content: "\f231"; } + +/* download */ +#available-widgets [class*="download"] .widget-title:before { content: "\f316"; } + +/* cloud */ +#available-widgets [class*="weather"] .widget-title:before { content: "\f176"; top: -4px;} + +/* facebook */ +#available-widgets [class*="facebook"] .widget-title:before { content: "\f304"; } + +/* twitter */ +#available-widgets [class*="tweet"] .widget-title:before, +#available-widgets [class*="twitter"] .widget-title:before { content: "\f301"; } + + +@media screen and (max-height: 700px) and (min-width: 981px) { + .customize-control { + margin-bottom: 0; + } + .widget-top { + -webkit-box-shadow: none; + box-shadow: none; + margin-top: -1px; + } + .widget-top:hover { + position: relative; + z-index: 1; + } + .last-widget { + margin-bottom: 15px; + } + .widget-title h4 { + padding: 13px 15px; + } + .widget-top a.widget-action:after { + padding-top: 9px; + } + .widget-reorder-nav span { + height: 39px; + } + .widget-reorder-nav span:before { + line-height: 39px; + } + #customize-theme-controls .widget-area-select li { + padding: 9px 15px 11px 42px; + } + #customize-theme-controls .widget-area-select li:before { + top: 8px; + } +} diff --git a/wp-admin/css/customize-widgets.min.css b/wp-admin/css/customize-widgets.min.css new file mode 100644 index 0000000..cac07db --- /dev/null +++ b/wp-admin/css/customize-widgets.min.css @@ -0,0 +1 @@ +.wp-full-overlay-sidebar{overflow:visible}.control-section[id^=accordion-section-sidebar-widgets-],.customize-control-sidebar_widgets .hide-if-js,.customize-control-sidebar_widgets label{display:none}.customize-control-widget_form .widget-top{-webkit-transition:opacity .5s;transition:opacity .5s}.customize-control-widget_form:not(.widget-rendered) .widget-top{opacity:.5}.customize-control-widget_form .spinner,.customize-control-widget_form .widget-control-save{display:none}.customize-control-widget_form.previewer-loading .spinner{display:inline}.customize-control-widget_form.widget-form-disabled .widget-content{opacity:.7;pointer-events:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.customize-control-widget_form .widget{margin-bottom:0}.customize-control-widget_form.wide-widget-control .widget-inside{position:fixed;left:299px;top:25%;border:1px solid #e5e5e5;overflow:auto}.customize-control-widget_form.wide-widget-control .widget-inside>.form{padding:20px}.customize-control-widget_form.wide-widget-control .widget-top{-webkit-transition:background-color .4s;transition:background-color .4s}.customize-control-widget_form.wide-widget-control.expanded:not(.collapsing) .widget-top,.customize-control-widget_form.wide-widget-control.expanding .widget-top{background-color:#e3e3e3}.widget-inside{padding:1px 10px 10px;border-top:0;line-height:16px}.widget-top{cursor:move}.customize-control-widget_form.expanded a.widget-action:after{content:"\f142"}.customize-control-widget_form.wide-widget-control a.widget-action:after{content:"\f139"}.customize-control-widget_form.wide-widget-control.expanded a.widget-action:after{content:"\f141"}.widget-title-action{cursor:pointer}.customize-control-widget_form .widget .customize-control-title{cursor:move}.control-section.accordion-section.highlighted>.accordion-section-title,.customize-control-widget_form.highlighted{outline:0;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8);position:relative;z-index:1}#widget-customizer-control-templates{display:none}.reorder-toggle{float:right;padding:5px 8px;text-decoration:none;cursor:pointer;outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.reorder-toggle:focus{outline:1px dotted}.reorder-done,.reordering .reorder{display:none}.reordering .reorder-done{display:block;color:#a00}#customize-theme-controls .reordering .add-new-widget{opacity:.2;pointer-events:none;cursor:not-allowed}#customize-theme-controls .widget-reorder-nav{display:none;float:right;background-color:#fafafa}.widget-reorder-nav span{position:relative;overflow:hidden;float:left;display:block;width:33px;height:43px;color:#888;text-indent:-9999px;cursor:pointer;outline:0}.widget-reorder-nav span:before{display:inline-block;position:absolute;top:0;right:0;width:100%;height:100%;font:400 20px/43px dashicons;text-align:center;text-indent:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.widget-reorder-nav span:focus,.widget-reorder-nav span:hover{color:#444;background:#eee}.move-widget:before{content:'\f504'}.move-widget-down:before{content:'\f347'}.move-widget-up:before{content:'\f343'}#customize-theme-controls .first-widget .move-widget-up,#customize-theme-controls .last-widget .move-widget-down{color:#d5d5d5;cursor:default}#customize-theme-controls .move-widget-area{display:none;background:#fff;border:1px solid #dedede;border-top:0;cursor:auto}#customize-theme-controls .reordering .move-widget-area.active{display:block}#customize-theme-controls .move-widget-area .description{margin:0;padding:15px 20px;font-weight:400}#customize-theme-controls .widget-area-select{margin:0;padding:0;list-style:none}#customize-theme-controls .widget-area-select li{position:relative;margin:0;padding:13px 15px 15px 42px;color:#555;border-top:1px solid #eee;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#customize-theme-controls .widget-area-select li:before{display:none;content:'\f147';position:absolute;top:12px;left:10px;font:400 20px/1 dashicons;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#customize-theme-controls .widget-area-select li:last-child{border-bottom:1px solid #eee}#customize-theme-controls .widget-area-select .selected{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.4);background:#2ea2cc}#customize-theme-controls .widget-area-select .selected:before{display:block}#customize-theme-controls .move-widget-actions{text-align:right;padding:12px}#customize-theme-controls .reordering .widget-title-action{display:none}#customize-theme-controls .reordering .widget-reorder-nav{display:block}.wp-full-overlay-main{right:auto;width:100%}#customize-theme-controls .add-new-widget{cursor:pointer;float:right;margin-left:10px;-webkit-transition:all .2s;transition:all .2s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:0}.add-new-widget:before{content:"\f132";display:inline-block;position:relative;left:-2px;top:-1px;font:400 20px/1 dashicons;vertical-align:middle;-webkit-transition:all .2s;transition:all .2s;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body.adding-widget .add-new-widget,body.adding-widget .add-new-widget:hover{background:#eee;border-color:#999;color:#333;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}body.adding-widget .add-new-widget:before{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}#available-widgets .widget{position:static}#widgets-left #available-widgets .widget{float:none!important;width:auto!important}#available-widgets{position:absolute;overflow:auto;top:0;bottom:0;left:-301px;width:300px;margin:0;z-index:1;background:#fff;-webkit-transition:all .2s;transition:all .2s;border-right:1px solid #ddd}#available-widgets-filter{padding:8px 17px 7px 13px;border-bottom:1px solid #e4e4e4;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#available-widgets-filter input{padding:5px 10px 2px;width:100%}#available-widgets .widget-tpl{position:relative;padding:20px 15px 20px 60px;border-bottom:1px solid #e4e4e4;cursor:pointer;display:none}#available-widgets .widget-tpl.selected,#available-widgets .widget-tpl:hover{background:#fafafa}#available-widgets .widget-top,#available-widgets .widget-top:hover{border:0;background:0 0;-webkit-box-shadow:none;box-shadow:none}#available-widgets .widget-title h4{padding:0 0 5px;font-size:14px}#available-widgets .widget .widget-description{padding:0;color:#777}#customize-preview{-webkit-transition:all .2s;transition:all .2s}body.adding-widget #available-widgets{left:0}body.adding-widget .wp-full-overlay-main{left:300px}body.adding-widget #customize-preview{opacity:.4}#available-widgets .widget-title{position:relative}#available-widgets .widget-title:before{content:"\f132";position:absolute;top:-3px;right:100%;margin-right:20px;width:20px;height:20px;color:#333;font:400 20px/1 dashicons;text-align:center;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#available-widgets [class*=easy] .widget-title:before{content:"\f328";top:-4px}#available-widgets [class*=like] .widget-title:before,#available-widgets [class*=super] .widget-title:before{content:"\f155";top:-4px}#available-widgets [class*=meta] .widget-title:before{content:"\f120"}#available-widgets [class*=archives] .widget-title:before{content:"\f480";top:-4px}#available-widgets [class*=categor] .widget-title:before{content:"\f318";top:-4px}#available-widgets [class*=chat] .widget-title:before,#available-widgets [class*=comment] .widget-title:before,#available-widgets [class*=testimonial] .widget-title:before{content:"\f101"}#available-widgets [class*=post] .widget-title:before{content:"\f109"}#available-widgets [class*=page] .widget-title:before{content:"\f105"}#available-widgets [class*=text] .widget-title:before{content:"\f478"}#available-widgets [class*=link] .widget-title:before{content:"\f103"}#available-widgets [class*=search] .widget-title:before{content:"\f179"}#available-widgets [class*=menu] .widget-title:before,#available-widgets [class*=nav] .widget-title:before{content:"\f333"}#available-widgets [class*=tag] .widget-title:before{content:"\f479"}#available-widgets [class*=rss] .widget-title:before{content:"\f303";top:-6px}#available-widgets [class*=calendar] .widget-title:before,#available-widgets [class*=event] .widget-title:before{content:"\f145";top:-4px}#available-widgets [class*=image] .widget-title:before,#available-widgets [class*=instagram] .widget-title:before,#available-widgets [class*=photo] .widget-title:before,#available-widgets [class*=slide] .widget-title:before{content:"\f128"}#available-widgets [class*=album] .widget-title:before,#available-widgets [class*=galler] .widget-title:before{content:"\f161"}#available-widgets [class*=tube] .widget-title:before,#available-widgets [class*=video] .widget-title:before{content:"\f126"}#available-widgets [class*=audio] .widget-title:before,#available-widgets [class*=music] .widget-title:before,#available-widgets [class*=radio] .widget-title:before{content:"\f127"}#available-widgets [class*=avatar] .widget-title:before,#available-widgets [class*=grofile] .widget-title:before,#available-widgets [class*=login] .widget-title:before,#available-widgets [class*=member] .widget-title:before,#available-widgets [class*=profile] .widget-title:before,#available-widgets [class*=subscriber] .widget-title:before,#available-widgets [class*=user] .widget-title:before{content:"\f110"}#available-widgets [class*=cart] .widget-title:before,#available-widgets [class*=commerce] .widget-title:before,#available-widgets [class*=shop] .widget-title:before{content:"\f174";top:-4px}#available-widgets [class*=firewall] .widget-title:before,#available-widgets [class*=secur] .widget-title:before{content:"\f332"}#available-widgets [class*=analytic] .widget-title:before,#available-widgets [class*=poll] .widget-title:before,#available-widgets [class*=stat] .widget-title:before{content:"\f185"}#available-widgets [class*=form] .widget-title:before{content:"\f175"}#available-widgets [class*=contact] .widget-title:before,#available-widgets [class*=mail] .widget-title:before,#available-widgets [class*=news] .widget-title:before,#available-widgets [class*=subscribe] .widget-title:before{content:"\f466"}#available-widgets [class*=share] .widget-title:before,#available-widgets [class*=socia] .widget-title:before{content:"\f237"}#available-widgets [class*=lang] .widget-title:before,#available-widgets [class*=translat] .widget-title:before{content:"\f326"}#available-widgets [class*=locat] .widget-title:before,#available-widgets [class*=map] .widget-title:before{content:"\f231"}#available-widgets [class*=download] .widget-title:before{content:"\f316"}#available-widgets [class*=weather] .widget-title:before{content:"\f176";top:-4px}#available-widgets [class*=facebook] .widget-title:before{content:"\f304"}#available-widgets [class*=tweet] .widget-title:before,#available-widgets [class*=twitter] .widget-title:before{content:"\f301"}@media screen and (max-height:700px) and (min-width:981px){.customize-control{margin-bottom:0}.widget-top{-webkit-box-shadow:none;box-shadow:none;margin-top:-1px}.widget-top:hover{position:relative;z-index:1}.last-widget{margin-bottom:15px}.widget-title h4{padding:13px 15px}.widget-top a.widget-action:after{padding-top:9px}.widget-reorder-nav span{height:39px}.widget-reorder-nav span:before{line-height:39px}#customize-theme-controls .widget-area-select li{padding:9px 15px 11px 42px}#customize-theme-controls .widget-area-select li:before{top:8px}} \ No newline at end of file diff --git a/wp-admin/css/dashboard-rtl.css b/wp-admin/css/dashboard-rtl.css new file mode 100644 index 0000000..f608d45 --- /dev/null +++ b/wp-admin/css/dashboard-rtl.css @@ -0,0 +1,1135 @@ +#wpbody-content #dashboard-widgets.columns-1 .postbox-container { + width: 100%; +} + +#wpbody-content #dashboard-widgets.columns-2 .postbox-container { + width: 49.5%; +} + +#wpbody-content #dashboard-widgets.columns-2 #postbox-container-2, +#wpbody-content #dashboard-widgets.columns-2 #postbox-container-3, +#wpbody-content #dashboard-widgets.columns-2 #postbox-container-4 { + float: left; + width: 50.5%; +} + +#wpbody-content #dashboard-widgets.columns-3 .postbox-container { + width: 33.5%; +} + +#wpbody-content #dashboard-widgets.columns-3 #postbox-container-1 { + width: 33%; +} + +#wpbody-content #dashboard-widgets.columns-3 #postbox-container-3, +#wpbody-content #dashboard-widgets.columns-3 #postbox-container-4 { + float: left; +} + +#wpbody-content #dashboard-widgets.columns-4 .postbox-container { + width: 25%; +} + +#dashboard-widgets .postbox-container { + width: 25%; +} + +#dashboard-widgets-wrap .columns-3 #postbox-container-4 .empty-container { + border: none !important; +} + +.ie8 #wpbody-content #dashboard-widgets .postbox-container { + width: 49.5%; +} + +.ie8 #wpbody-content #dashboard-widgets #postbox-container-2, +.ie8 #wpbody-content #dashboard-widgets #postbox-container-3, +.ie8 #wpbody-content #dashboard-widgets #postbox-container-4 { + float: left; + width: 50.5%; +} + +.ie8 #dashboard-widgets #postbox-container-3 .empty-container, +.ie8 #dashboard-widgets #postbox-container-4 .empty-container { + border: 0 none; + height: 0; + min-height: 0; +} + +/*------------------------------------------------------------------------------ + 9.0 - Dashboard +------------------------------------------------------------------------------*/ + +#dashboard-widgets-wrap { + overflow: hidden; + margin: 0 -8px; +} + +#dashboard-widgets .postbox .inside { + margin-bottom: 0; +} + +#dashboard-widgets .meta-box-sortables { + margin: 0 8px; + min-height: 100px; +} + +h3.dashboard-widget-title, +h3.dashboard-widget-title span, +h3.dashboard-widget-title small { + color: #333; +} + +h3.dashboard-widget-title small a { + color: #d7d7d7; +} + +h3.dashboard-widget-title small a:hover { + color: #fff; +} + +/* @todo: this was originally in this section, but likely belongs elsewhere */ +#the-comment-list td.comment p.comment-author { + margin-top: 0; + margin-right: 0; +} + +#the-comment-list p.comment-author img { + float: right; + margin-left: 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; +} + +#the-comment-list td.comment img { + max-width: 100%; +} + +/* Welcome Panel */ +.welcome-panel { + position: relative; + overflow: auto; + margin: 16px 0; + padding: 23px 10px 0; + border: 1px solid #e5e5e5; + -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.04); + box-shadow: 0 1px 1px rgba(0,0,0,0.04); + background: #fff; + font-size: 13px; + line-height: 2.1em; +} + +.welcome-panel h3 { + margin: 0; + font-size: 21px; + font-weight: normal; + line-height: 1.2; +} + +.welcome-panel h4 { + margin: 1.33em 0 0; + font-size: 16px; +} + +.welcome-panel li { + font-size: 14px; +} + +.welcome-panel p { + color: #777; +} + +.welcome-panel a { + text-decoration: none; +} + +.welcome-panel .about-description { + font-size: 16px; + margin: 0; +} + +.welcome-panel .welcome-panel-close { + position: absolute; + top: 5px; + left: 10px; + padding: 20px 3px 0 15px; + font-size: 13px; + text-decoration: none; + line-height: 1; +} + +#welcome-panel.welcome-panel .welcome-panel-close::before { + position: absolute; + right: -18px; + margin-top: -2px; + -webkit-transition: all .1s ease-in-out; + transition: all .1s ease-in-out; +} + +.wp-core-ui .welcome-panel .button.button-hero { + margin: 15px 0 3px; +} + +.welcome-panel-content { + margin-right: 13px; + max-width: 1500px; +} + +.welcome-panel .welcome-panel-column-container { + clear: both; + overflow: hidden; + position: relative; +} + +.welcome-panel .welcome-panel-column { + width: 32%; + min-width: 200px; + float: right; +} + +.ie8 .welcome-panel .welcome-panel-column { + min-width: 230px; +} + +.welcome-panel .welcome-panel-column:first-child { + width: 36%; +} + +.welcome-panel-column p.hide-if-no-customize { + margin-top: 10px; +} + +.welcome-panel-column p { + margin-top: 7px; + color: #464646; +} + +.welcome-panel .welcome-icon { + display: block; + padding: 0 0 8px; + background: transparent !important; +} + +.welcome-panel .welcome-icon:before { + color: #888; + font: normal 20px/1 'dashicons'; + speak: none; + display: inline-block; + padding: 0 0 0 10px; + top: -1px; + position: relative; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-decoration: none !important; + vertical-align: top; +} + +.welcome-panel .welcome-write-blog:before, +.welcome-panel .welcome-edit-page:before { + content:'\f119'; + top: -3px; +} + +.welcome-panel .welcome-add-page:before { + content:'\f132'; +} + +.welcome-panel .welcome-view-site:before { + content:'\f115'; + top: -2px; +} + +.welcome-panel .welcome-widgets-menus:before { + content:'\f116'; + top: -2px; +} + +.welcome-panel .welcome-comments:before { + content:'\f117'; + top: -1px; +} + +.welcome-panel .welcome-learn-more:before { + content:'\f118'; + top: -1px; +} + +.welcome-panel .welcome-widgets-menus { + line-height: 16px; +} + +.welcome-panel .welcome-panel-column ul { + margin: 0.8em 0 1em 1em; +} + +.welcome-panel .welcome-panel-column li { + line-height: 16px; + list-style-type: none; +} + +/* Dashboard WordPress news */ + +#dashboard_primary .inside { + margin: 0; + padding: 0; +} + +#dashboard_primary .widget-loading, +#dashboard_primary .dashboard-widget-control-form { + padding: 12px 12px 0; +} + +body #dashboard-widgets .postbox form .submit { + margin: 0; +} + +.dashboard-widget-control-form { + overflow: hidden; +} + +.dashboard-widget-control-form p { + margin-top: 0; +} + +/* @todo: are these actually used anywhere? no non-CSS results in plugin search */ +div.dashboard-widget-error { + background-color: #c43; +} + +div.dashboard-widget-notice { + background-color: #cfe1ef; +} + +.rssSummary { + color: #777; + margin-top: 4px; +} + +#dashboard_primary .rss-widget { + border-bottom: 1px solid #eee; + font-size: 13px; + padding: 8px 12px 10px; +} + +#dashboard_primary .rss-widget:last-child { + border-bottom: none; + padding-bottom: 8px; +} + +#dashboard_primary .rss-widget a { + font-weight: normal; +} + +#dashboard_primary .rss-widget span, +#dashboard_primary .rss-widget span.rss-date { + color: #777; +} + +#dashboard_primary .rss-widget span.rss-date { + margin-right: 12px; +} + +#dashboard_primary .rss-widget ul li { + margin-bottom: 8px; +} + +/* Dashboard right now */ + +#dashboard_right_now ul { + margin: 0; + overflow: hidden; +} + +#dashboard_right_now li { + width: 50%; + float: right; + margin-bottom: 10px; +} + +#dashboard_right_now .inside { + overflow: hidden; + padding: 0; +} + +#dashboard_right_now .main { + overflow: hidden; + padding: 0 12px 11px; +} + +#dashboard_right_now .main p { + margin: 0; +} + +#dashboard_right_now #wp-version-message .button { + clear: left; + float: left; + position: relative; + top: -5px; +} + +.mu-storage { + overflow: hidden; +} + +#dashboard-widgets h4.mu-storage { + margin-bottom: 10px; +} + +/* Dashboard right now - Colors */ + +#dashboard_right_now li a:before, +#dashboard_right_now li span:before { + color: #888; +} + +#dashboard_right_now .sub { + color: #777; + background: #f5f5f5; + border-top: 1px solid #eee; + padding: 10px 12px 6px 12px; +} + +#dashboard_right_now .sub h4 { + color: #555; +} + +#dashboard_right_now .sub p { + margin: 0 0 1em; +} + +#dashboard_right_now .warning a:before, +#dashboard_right_now .warning span:before { + color: #d54e21; +} + +/* Dashboard right now - Icons */ +#dashboard_right_now li a:before, +#dashboard_right_now li span:before { + content: '\f159'; + font: normal 20px/1 'dashicons'; + speak: none; + display: block; + float: right; + margin: 0 0 0 5px; + padding: 0; + text-indent: 0; + text-align: center; + position: relative; + -webkit-font-smoothing: antialiased; + text-decoration: none !important; +} + +#dashboard_right_now .page-count a:before, +#dashboard_right_now .page-count span:before { + content: '\f105'; +} + +#dashboard_right_now .post-count a:before, +#dashboard_right_now .post-count span:before { + content: '\f109'; +} + +#dashboard_right_now .comment-count a:before { + content: '\f101'; +} + +#dashboard_right_now .comment-mod-count a:before { + content: '\f125'; +} + +#dashboard_right_now .storage-count a:before { + content: '\f104'; +} + +#dashboard_right_now .storage-count.warning a:before { + content: '\f153'; +} + +/* Dashboard Quick Draft */ + +#dashboard_quick_press .inside { + margin: 0; + padding: 0; +} + +#dashboard_quick_press div.updated { + margin-bottom: 10px; + border: 1px solid #eee; + border-width: 1px 0 1px 1px; +} + +#dashboard_quick_press form { + overflow: hidden; + margin: 12px; +} + +#dashboard_quick_press .drafts, +#dashboard_quick_press .easy-blogging { + padding: 10px 0 0; +} + +/* Dashboard Quick Draft - Form styling */ + +input#save-post { + float: right; +} + +form.initial-form.quickpress-open label.prompt { + font-style: normal; +} + +form.initial-form.quickpress-open input#title { + height: auto; +} + +#dashboard_quick_press input, +#dashboard_quick_press textarea { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + margin: 0; +} + +#dashboard_quick_press textarea { + resize: vertical; +} + +#dashboard-widgets .postbox form .submit { + margin: -39px 0; + float: left; +} + +#description-wrap { + margin-top: 12px; +} + +#title-wrap #title-prompt-text, +.textarea-wrap #content-prompt-text { + color: #777; +} + +#title-wrap #title-prompt-text { + font-size: 1.1em; + padding: 7px 8px; +} + +.input-text-wrap, +.textarea-wrap { + position: relative; +} + +.input-text-wrap .prompt, +.textarea-wrap .prompt { + position: absolute; +} + +.textarea-wrap #content-prompt-text { + font-size: 1.1em; + padding: 7px 8px; +} + +.textarea-wrap textarea#content { + margin: 0 0 8px; + padding: 6px 7px; +} + +#quick-press textarea#content { + min-height: 90px; + max-height: 1300px; + resize: none; +} + +/* Dashboard Quick Draft - Drafts list */ + +.js #dashboard_quick_press .drafts { + border-top: 1px solid #eee; +} + +#dashboard_quick_press .drafts abbr { + border: none; +} + +#dashboard_quick_press .drafts h4 { + margin: 0 12px 8px; + font-weight: normal; +} + +#dashboard_quick_press .drafts .view-all { + float: left; + margin: 0 0 0 12px; +} + +#dashboard_primary a.rsswidget { + font-weight: normal; +} + +#dashboard_quick_press .drafts ul { + margin: 0 12px; +} + +#dashboard_quick_press .drafts li { + margin-bottom: 1em; +} +#dashboard_quick_press .drafts li time { + color: #777; +} + +#dashboard_quick_press .drafts p { + margin: 0; + word-wrap: break-word; +} + +#dashboard_quick_press .draft-title { + overflow: hidden; +} + +#dashboard_quick_press .draft-title a, +#dashboard_quick_press .draft-title time { + float: right; + margin: 0 0 0 5px; +} + +/* Dashboard activity widget */ + +#dashboard-widgets #dashboard_activity h4 { + margin: 0 12px 8px 0; + font-weight: normal; +} + +#dashboard-widgets #dashboard_activity h4.comment-meta { + margin: 0; +} + +#dashboard_activity h4.comment-meta { + margin-bottom: 4px; +} + +#dashboard_activity ul { + padding: 0 12px; +} + +#dashboard_activity .comment-meta span.approve:before { + content: '\f227'; + font: 20px/.5 "dashicons"; + margin-right: 12px; + vertical-align: middle; + position: relative; + top: -1px; + margin-left: 2px; +} + +#dashboard_activity .inside { + padding: 0; + margin: 0; +} + +#dashboard_activity .no-activity { + overflow: hidden; + padding: 0 12px 12px; + text-align: center; +} + +#dashboard_activity .no-activity p { + color: #999; + font-size: 16px; +} + +#dashboard_activity .no-activity .smiley { + margin-top: 0; +} + +#dashboard_activity .no-activity .smiley:before { + content: '\f328'; + font: normal 120px/1 'dashicons'; + speak: none; + display: block; + margin: 0 0 0 5px; + padding: 0; + text-indent: 0; + text-align: center; + position: relative; + -webkit-font-smoothing: antialiased; + text-decoration: none !important; +} + +#dashboard_activity .subsubsub { + float: none; + border-top: 1px solid #eeeeee; + margin-top: 0; + padding: 8px 12px 4px; +} + +#future-posts ul, +#published-posts ul { + clear: both; + margin-bottom: 0; +} + +#future-posts li, +#published-posts li { + overflow: hidden; + margin-bottom: 8px; +} + +#future-posts ul span, +#published-posts ul span { + color: #777; + float: right; + margin-left: 8px; + min-width: 150px; +} + +.activity-block { + border-bottom: 1px solid #eee; + overflow: hidden; + padding: 8px 0 4px; +} + +.activity-block:last-child { + border-bottom: none; +} + +.activity-block .subsubsub li { + color: #ddd; +} + +/* Dashboard activity widget - Comments */ +/* @todo: needs serious de-duplication */ + +#activity-widget #the-comment-list tr.undo, +#activity-widget #the-comment-list div.undo { + background: none; + padding: 6px 0; +} + +#activity-widget #the-comment-list .alternate, +#activity-widget #the-comment-list .alt { + background: none; +} + +#activity-widget #the-comment-list .comment-item { + background: #fafafa; + padding: 12px; + position: relative; +} + +#activity-widget #the-comment-list img { + position: absolute; + right: 13px; + top: 13px; +} + +#activity-widget #the-comment-list .dashboard-comment-wrap { + padding-right: 63px; +} + +#activity-widget #the-comment-list .dashboard-comment-wrap blockquote { + margin: 1em 0; +} + +#activity-widget #the-comment-list .comment-item h4 { + font-size: 13px; + color: #999; +} + +#activity-widget #the-comment-list .comment-item p.row-actions { + margin: 4px 0 0 0; +} + +#activity-widget #the-comment-list .comment-item:first-child { + border-top: 1px solid #eeeeee; +} + +#activity-widget #the-comment-list .unapproved { + background-color: #fef7f1; +} + +#activity-widget #the-comment-list .unapproved:before { + content: ""; + display: block; + position: absolute; + right: 0; + top: 0; + bottom: 0; + background: #d54e21; + width: 4px; +} + +#activity-widget #the-comment-list .spam-undo-inside .avatar, +#activity-widget #the-comment-list .trash-undo-inside .avatar { + margin-left: 20px; + position: relative; + top: 0; +} + +/* Browse happy box */ + +#dashboard-widgets #dashboard_browser_nag.postbox .inside { + margin: 10px; +} + +.edit-box { + display: none; +} + +h3:hover .edit-box { + display: inline; +} + +#dashboard-widgets form .input-text-wrap input { + width: 100%; +} + +#dashboard-widgets form .textarea-wrap textarea { + width: 100%; +} + +#dashboard-widgets .postbox form .submit { + float: none; + margin: .5em 0 0; + padding: 0; + border: none; +} + +#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; + left: 10px; + padding: 0; + top: 5px; +} + +.js #dashboard-widgets h3 .postbox-title-action { + left: 33px; +} + +#dashboard-widgets h4 { + color: #222; + font-weight: normal; + font-size: 14px; + margin: 0 0 .2em; + padding: 0; +} + +#dashboard_plugins h5 { + font-size: 14px; +} + +/* Recent Comments */ + +#latest-comments #the-comment-list { + position: relative; +} + +#activity-widget #the-comment-list .comment { + -webkit-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.06); + box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.06); +} + +#activity-widget .comments #the-comment-list .alt { + background-color: transparent; +} + +#activity-widget #latest-comments #the-comment-list .comment-item { + padding: 1em 12px; +} + +#latest-comments #the-comment-list .pingback { + padding-right: 12px !important; +} + +#latest-comments #the-comment-list .comment-item:first-child { + border-top: none; +} + +#latest-comments #the-comment-list .comment-item h4 { + line-height: 1.5em; + margin-top: 0; + color: #666; +} + +#latest-comments #the-comment-list .comment-item h4 cite { + font-style: normal; + font-weight: normal; +} + +#latest-comments #the-comment-list .comment-item blockquote, +#latest-comments #the-comment-list .comment-item blockquote p { + margin: 0; + padding: 0; + display: inline; +} + +#latest-comments #the-comment-list .comment-item p.row-actions { + margin: 3px 0 0; + padding: 0; + font-size: 13px; +} + +/* QuickDraft */ + +#title-wrap label { + cursor: text; +} + +#title-wrap #title { + padding: 2px 6px; + font-size: 1.3em; + line-height: 100%; + outline: none; +} + +#title-wrap #title-prompt-text { + font-size: 1.1em; + padding: 5px 8px; +} + +/* Feeds */ +.rss-widget ul { + margin: 0; + padding: 0; + list-style: none; +} + +a.rsswidget { + font-size: 14px; + font-weight: 600; + line-height: 1.7em; +} + +.rss-widget ul li { + line-height: 1.5em; + margin-bottom: 12px; +} + +.rss-widget span.rss-date { + color: #999; + font-size: 13px; + margin-right: 3px; +} + +.rss-widget cite { + display: block; + text-align: left; + margin: 0 0 1em; + padding: 0; +} + +.rss-widget cite:before { + content: '\2014'; +} + +.dashboard-comment-wrap { + overflow: hidden; + word-wrap: break-word; +} + +/* Browser Nag */ +#dashboard_browser_nag a.update-browser-link { + font-size: 1.2em; + font-weight: 600; +} + +#dashboard_browser_nag a { + text-decoration: underline; +} + +#dashboard_browser_nag p.browser-update-nag.has-browser-icon { + padding-left: 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; + color: #fff; + -webkit-box-shadow: none; + box-shadow: none; +} + +#dashboard_browser_nag.postbox.browser-insecure h3 { + border-bottom-color: #cd5a5a; + color: #fff; +} + +#dashboard_browser_nag.postbox h3 { + border-bottom-color: #f6e2ac; + background: transparent none; + color: #fff; + -webkit-box-shadow: none; + box-shadow: none; +} + +#dashboard_browser_nag a { + color: #fff; +} + +/* Make the browser nags easier to read with Open Sans */ + +#dashboard_browser_nag h3.hndle { + border: none; + font-weight: 600; + font-size: 20px; + padding-top: 10px; +} + +.postbox#dashboard_browser_nag p a.dismiss { + font-size: 14px; +} + +.postbox#dashboard_browser_nag p, +.postbox#dashboard_browser_nag a, +.postbox#dashboard_browser_nag p.browser-update-nag { + font-size: 16px; +} + +/* =Media Queries +-------------------------------------------------------------- */ + +/* one column on the dash */ +@media only screen and (max-width: 799px) { + #wpbody-content #dashboard-widgets .postbox-container { + width: 100%; + } +} + +/* two columns on the dash, but keep the setting if one is selected */ +@media only screen and (min-width: 800px) and (max-width: 1499px) { + #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: left; + width: 50.5%; + } + + #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; + } +} + +/* three columns on the dash */ +@media only screen and (min-width: 1500px) and (max-width: 1800px) { + #wpbody-content #dashboard-widgets .postbox-container { + width: 33.5%; + } + + #wpbody-content #dashboard-widgets #postbox-container-1 { + width: 33%; + } + + #wpbody-content #dashboard-widgets #postbox-container-3, + #wpbody-content #dashboard-widgets #postbox-container-4 { + float: left; + } + + #dashboard-widgets #postbox-container-4 .empty-container { + border: 0 none; + height: 0; + min-height: 0; + } +} + +@media screen and (max-width: 870px) { + .welcome-panel .welcome-panel-column, + .welcome-panel .welcome-panel-column:first-child { + display: block; + float: none; + width: 100%; + } + + .welcome-panel .welcome-panel-column li { + display: inline-block; + margin-left: 13px; + } + + .welcome-panel .welcome-panel-column ul { + margin: 0.4em 0 0; + } + +} + +@media screen and ( max-width: 782px ) { + #dashboard_recent_comments #the-comment-list .comment-item .avatar { + height: 30px; + width: 30px; + margin: 4px 0 5px 10px; + } +} + +/* Smartphone */ +@media screen and (max-width: 600px) { + /* Keep the close icon from overlapping the Welcome text. */ + .welcome-panel .welcome-panel-close { + overflow: hidden; + text-indent: 100%; + white-space: nowrap; + width: 20px; + height: 20px; + left: 0; + padding: 5px; + } + + /* Make the close icon larger for tappability. */ + #welcome-panel.welcome-panel .welcome-panel-close::before { + font-size: 20px; + margin: 0; + } +} diff --git a/wp-admin/css/dashboard.css b/wp-admin/css/dashboard.css new file mode 100644 index 0000000..bd94d96 --- /dev/null +++ b/wp-admin/css/dashboard.css @@ -0,0 +1,1135 @@ +#wpbody-content #dashboard-widgets.columns-1 .postbox-container { + width: 100%; +} + +#wpbody-content #dashboard-widgets.columns-2 .postbox-container { + width: 49.5%; +} + +#wpbody-content #dashboard-widgets.columns-2 #postbox-container-2, +#wpbody-content #dashboard-widgets.columns-2 #postbox-container-3, +#wpbody-content #dashboard-widgets.columns-2 #postbox-container-4 { + float: right; + width: 50.5%; +} + +#wpbody-content #dashboard-widgets.columns-3 .postbox-container { + width: 33.5%; +} + +#wpbody-content #dashboard-widgets.columns-3 #postbox-container-1 { + width: 33%; +} + +#wpbody-content #dashboard-widgets.columns-3 #postbox-container-3, +#wpbody-content #dashboard-widgets.columns-3 #postbox-container-4 { + float: right; +} + +#wpbody-content #dashboard-widgets.columns-4 .postbox-container { + width: 25%; +} + +#dashboard-widgets .postbox-container { + width: 25%; +} + +#dashboard-widgets-wrap .columns-3 #postbox-container-4 .empty-container { + border: none !important; +} + +.ie8 #wpbody-content #dashboard-widgets .postbox-container { + width: 49.5%; +} + +.ie8 #wpbody-content #dashboard-widgets #postbox-container-2, +.ie8 #wpbody-content #dashboard-widgets #postbox-container-3, +.ie8 #wpbody-content #dashboard-widgets #postbox-container-4 { + float: right; + width: 50.5%; +} + +.ie8 #dashboard-widgets #postbox-container-3 .empty-container, +.ie8 #dashboard-widgets #postbox-container-4 .empty-container { + border: 0 none; + height: 0; + min-height: 0; +} + +/*------------------------------------------------------------------------------ + 9.0 - Dashboard +------------------------------------------------------------------------------*/ + +#dashboard-widgets-wrap { + overflow: hidden; + margin: 0 -8px; +} + +#dashboard-widgets .postbox .inside { + margin-bottom: 0; +} + +#dashboard-widgets .meta-box-sortables { + margin: 0 8px; + min-height: 100px; +} + +h3.dashboard-widget-title, +h3.dashboard-widget-title span, +h3.dashboard-widget-title small { + color: #333; +} + +h3.dashboard-widget-title small a { + color: #d7d7d7; +} + +h3.dashboard-widget-title small a:hover { + color: #fff; +} + +/* @todo: this was originally in this section, but likely belongs elsewhere */ +#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; +} + +#the-comment-list td.comment img { + max-width: 100%; +} + +/* Welcome Panel */ +.welcome-panel { + position: relative; + overflow: auto; + margin: 16px 0; + padding: 23px 10px 0; + border: 1px solid #e5e5e5; + -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.04); + box-shadow: 0 1px 1px rgba(0,0,0,0.04); + background: #fff; + font-size: 13px; + line-height: 2.1em; +} + +.welcome-panel h3 { + margin: 0; + font-size: 21px; + font-weight: normal; + line-height: 1.2; +} + +.welcome-panel h4 { + margin: 1.33em 0 0; + font-size: 16px; +} + +.welcome-panel li { + font-size: 14px; +} + +.welcome-panel p { + color: #777; +} + +.welcome-panel a { + text-decoration: none; +} + +.welcome-panel .about-description { + font-size: 16px; + margin: 0; +} + +.welcome-panel .welcome-panel-close { + position: absolute; + top: 5px; + right: 10px; + padding: 20px 15px 0 3px; + font-size: 13px; + text-decoration: none; + line-height: 1; +} + +#welcome-panel.welcome-panel .welcome-panel-close::before { + position: absolute; + left: -18px; + margin-top: -2px; + -webkit-transition: all .1s ease-in-out; + transition: all .1s ease-in-out; +} + +.wp-core-ui .welcome-panel .button.button-hero { + margin: 15px 0 3px; +} + +.welcome-panel-content { + margin-left: 13px; + max-width: 1500px; +} + +.welcome-panel .welcome-panel-column-container { + clear: both; + overflow: hidden; + position: relative; +} + +.welcome-panel .welcome-panel-column { + width: 32%; + min-width: 200px; + float: left; +} + +.ie8 .welcome-panel .welcome-panel-column { + min-width: 230px; +} + +.welcome-panel .welcome-panel-column:first-child { + width: 36%; +} + +.welcome-panel-column p.hide-if-no-customize { + margin-top: 10px; +} + +.welcome-panel-column p { + margin-top: 7px; + color: #464646; +} + +.welcome-panel .welcome-icon { + display: block; + padding: 0 0 8px; + background: transparent !important; +} + +.welcome-panel .welcome-icon:before { + color: #888; + font: normal 20px/1 'dashicons'; + speak: none; + display: inline-block; + padding: 0 10px 0 0; + top: -1px; + position: relative; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-decoration: none !important; + vertical-align: top; +} + +.welcome-panel .welcome-write-blog:before, +.welcome-panel .welcome-edit-page:before { + content:'\f119'; + top: -3px; +} + +.welcome-panel .welcome-add-page:before { + content:'\f132'; +} + +.welcome-panel .welcome-view-site:before { + content:'\f115'; + top: -2px; +} + +.welcome-panel .welcome-widgets-menus:before { + content:'\f116'; + top: -2px; +} + +.welcome-panel .welcome-comments:before { + content:'\f117'; + top: -1px; +} + +.welcome-panel .welcome-learn-more:before { + content:'\f118'; + top: -1px; +} + +.welcome-panel .welcome-widgets-menus { + line-height: 16px; +} + +.welcome-panel .welcome-panel-column ul { + margin: 0.8em 1em 1em 0; +} + +.welcome-panel .welcome-panel-column li { + line-height: 16px; + list-style-type: none; +} + +/* Dashboard WordPress news */ + +#dashboard_primary .inside { + margin: 0; + padding: 0; +} + +#dashboard_primary .widget-loading, +#dashboard_primary .dashboard-widget-control-form { + padding: 12px 12px 0; +} + +body #dashboard-widgets .postbox form .submit { + margin: 0; +} + +.dashboard-widget-control-form { + overflow: hidden; +} + +.dashboard-widget-control-form p { + margin-top: 0; +} + +/* @todo: are these actually used anywhere? no non-CSS results in plugin search */ +div.dashboard-widget-error { + background-color: #c43; +} + +div.dashboard-widget-notice { + background-color: #cfe1ef; +} + +.rssSummary { + color: #777; + margin-top: 4px; +} + +#dashboard_primary .rss-widget { + border-bottom: 1px solid #eee; + font-size: 13px; + padding: 8px 12px 10px; +} + +#dashboard_primary .rss-widget:last-child { + border-bottom: none; + padding-bottom: 8px; +} + +#dashboard_primary .rss-widget a { + font-weight: normal; +} + +#dashboard_primary .rss-widget span, +#dashboard_primary .rss-widget span.rss-date { + color: #777; +} + +#dashboard_primary .rss-widget span.rss-date { + margin-left: 12px; +} + +#dashboard_primary .rss-widget ul li { + margin-bottom: 8px; +} + +/* Dashboard right now */ + +#dashboard_right_now ul { + margin: 0; + overflow: hidden; +} + +#dashboard_right_now li { + width: 50%; + float: left; + margin-bottom: 10px; +} + +#dashboard_right_now .inside { + overflow: hidden; + padding: 0; +} + +#dashboard_right_now .main { + overflow: hidden; + padding: 0 12px 11px; +} + +#dashboard_right_now .main p { + margin: 0; +} + +#dashboard_right_now #wp-version-message .button { + clear: right; + float: right; + position: relative; + top: -5px; +} + +.mu-storage { + overflow: hidden; +} + +#dashboard-widgets h4.mu-storage { + margin-bottom: 10px; +} + +/* Dashboard right now - Colors */ + +#dashboard_right_now li a:before, +#dashboard_right_now li span:before { + color: #888; +} + +#dashboard_right_now .sub { + color: #777; + background: #f5f5f5; + border-top: 1px solid #eee; + padding: 10px 12px 6px 12px; +} + +#dashboard_right_now .sub h4 { + color: #555; +} + +#dashboard_right_now .sub p { + margin: 0 0 1em; +} + +#dashboard_right_now .warning a:before, +#dashboard_right_now .warning span:before { + color: #d54e21; +} + +/* Dashboard right now - Icons */ +#dashboard_right_now li a:before, +#dashboard_right_now li span:before { + content: '\f159'; + font: normal 20px/1 'dashicons'; + speak: none; + display: block; + float: left; + margin: 0 5px 0 0; + padding: 0; + text-indent: 0; + text-align: center; + position: relative; + -webkit-font-smoothing: antialiased; + text-decoration: none !important; +} + +#dashboard_right_now .page-count a:before, +#dashboard_right_now .page-count span:before { + content: '\f105'; +} + +#dashboard_right_now .post-count a:before, +#dashboard_right_now .post-count span:before { + content: '\f109'; +} + +#dashboard_right_now .comment-count a:before { + content: '\f101'; +} + +#dashboard_right_now .comment-mod-count a:before { + content: '\f125'; +} + +#dashboard_right_now .storage-count a:before { + content: '\f104'; +} + +#dashboard_right_now .storage-count.warning a:before { + content: '\f153'; +} + +/* Dashboard Quick Draft */ + +#dashboard_quick_press .inside { + margin: 0; + padding: 0; +} + +#dashboard_quick_press div.updated { + margin-bottom: 10px; + border: 1px solid #eee; + border-width: 1px 1px 1px 0; +} + +#dashboard_quick_press form { + overflow: hidden; + margin: 12px; +} + +#dashboard_quick_press .drafts, +#dashboard_quick_press .easy-blogging { + padding: 10px 0 0; +} + +/* Dashboard Quick Draft - Form styling */ + +input#save-post { + float: left; +} + +form.initial-form.quickpress-open label.prompt { + font-style: normal; +} + +form.initial-form.quickpress-open input#title { + height: auto; +} + +#dashboard_quick_press input, +#dashboard_quick_press textarea { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + margin: 0; +} + +#dashboard_quick_press textarea { + resize: vertical; +} + +#dashboard-widgets .postbox form .submit { + margin: -39px 0; + float: right; +} + +#description-wrap { + margin-top: 12px; +} + +#title-wrap #title-prompt-text, +.textarea-wrap #content-prompt-text { + color: #777; +} + +#title-wrap #title-prompt-text { + font-size: 1.1em; + padding: 7px 8px; +} + +.input-text-wrap, +.textarea-wrap { + position: relative; +} + +.input-text-wrap .prompt, +.textarea-wrap .prompt { + position: absolute; +} + +.textarea-wrap #content-prompt-text { + font-size: 1.1em; + padding: 7px 8px; +} + +.textarea-wrap textarea#content { + margin: 0 0 8px; + padding: 6px 7px; +} + +#quick-press textarea#content { + min-height: 90px; + max-height: 1300px; + resize: none; +} + +/* Dashboard Quick Draft - Drafts list */ + +.js #dashboard_quick_press .drafts { + border-top: 1px solid #eee; +} + +#dashboard_quick_press .drafts abbr { + border: none; +} + +#dashboard_quick_press .drafts h4 { + margin: 0 12px 8px; + font-weight: normal; +} + +#dashboard_quick_press .drafts .view-all { + float: right; + margin: 0 12px 0 0; +} + +#dashboard_primary a.rsswidget { + font-weight: normal; +} + +#dashboard_quick_press .drafts ul { + margin: 0 12px; +} + +#dashboard_quick_press .drafts li { + margin-bottom: 1em; +} +#dashboard_quick_press .drafts li time { + color: #777; +} + +#dashboard_quick_press .drafts p { + margin: 0; + word-wrap: break-word; +} + +#dashboard_quick_press .draft-title { + overflow: hidden; +} + +#dashboard_quick_press .draft-title a, +#dashboard_quick_press .draft-title time { + float: left; + margin: 0 5px 0 0; +} + +/* Dashboard activity widget */ + +#dashboard-widgets #dashboard_activity h4 { + margin: 0 0 8px 12px; + font-weight: normal; +} + +#dashboard-widgets #dashboard_activity h4.comment-meta { + margin: 0; +} + +#dashboard_activity h4.comment-meta { + margin-bottom: 4px; +} + +#dashboard_activity ul { + padding: 0 12px; +} + +#dashboard_activity .comment-meta span.approve:before { + content: '\f227'; + font: 20px/.5 "dashicons"; + margin-left: 12px; + vertical-align: middle; + position: relative; + top: -1px; + margin-right: 2px; +} + +#dashboard_activity .inside { + padding: 0; + margin: 0; +} + +#dashboard_activity .no-activity { + overflow: hidden; + padding: 0 12px 12px; + text-align: center; +} + +#dashboard_activity .no-activity p { + color: #999; + font-size: 16px; +} + +#dashboard_activity .no-activity .smiley { + margin-top: 0; +} + +#dashboard_activity .no-activity .smiley:before { + content: '\f328'; + font: normal 120px/1 'dashicons'; + speak: none; + display: block; + margin: 0 5px 0 0; + padding: 0; + text-indent: 0; + text-align: center; + position: relative; + -webkit-font-smoothing: antialiased; + text-decoration: none !important; +} + +#dashboard_activity .subsubsub { + float: none; + border-top: 1px solid #eeeeee; + margin-top: 0; + padding: 8px 12px 4px; +} + +#future-posts ul, +#published-posts ul { + clear: both; + margin-bottom: 0; +} + +#future-posts li, +#published-posts li { + overflow: hidden; + margin-bottom: 8px; +} + +#future-posts ul span, +#published-posts ul span { + color: #777; + float: left; + margin-right: 8px; + min-width: 150px; +} + +.activity-block { + border-bottom: 1px solid #eee; + overflow: hidden; + padding: 8px 0 4px; +} + +.activity-block:last-child { + border-bottom: none; +} + +.activity-block .subsubsub li { + color: #ddd; +} + +/* Dashboard activity widget - Comments */ +/* @todo: needs serious de-duplication */ + +#activity-widget #the-comment-list tr.undo, +#activity-widget #the-comment-list div.undo { + background: none; + padding: 6px 0; +} + +#activity-widget #the-comment-list .alternate, +#activity-widget #the-comment-list .alt { + background: none; +} + +#activity-widget #the-comment-list .comment-item { + background: #fafafa; + padding: 12px; + position: relative; +} + +#activity-widget #the-comment-list img { + position: absolute; + left: 13px; + top: 13px; +} + +#activity-widget #the-comment-list .dashboard-comment-wrap { + padding-left: 63px; +} + +#activity-widget #the-comment-list .dashboard-comment-wrap blockquote { + margin: 1em 0; +} + +#activity-widget #the-comment-list .comment-item h4 { + font-size: 13px; + color: #999; +} + +#activity-widget #the-comment-list .comment-item p.row-actions { + margin: 4px 0 0 0; +} + +#activity-widget #the-comment-list .comment-item:first-child { + border-top: 1px solid #eeeeee; +} + +#activity-widget #the-comment-list .unapproved { + background-color: #fef7f1; +} + +#activity-widget #the-comment-list .unapproved:before { + content: ""; + display: block; + position: absolute; + left: 0; + top: 0; + bottom: 0; + background: #d54e21; + width: 4px; +} + +#activity-widget #the-comment-list .spam-undo-inside .avatar, +#activity-widget #the-comment-list .trash-undo-inside .avatar { + margin-right: 20px; + position: relative; + top: 0; +} + +/* Browse happy box */ + +#dashboard-widgets #dashboard_browser_nag.postbox .inside { + margin: 10px; +} + +.edit-box { + display: none; +} + +h3:hover .edit-box { + display: inline; +} + +#dashboard-widgets form .input-text-wrap input { + width: 100%; +} + +#dashboard-widgets form .textarea-wrap textarea { + width: 100%; +} + +#dashboard-widgets .postbox form .submit { + float: none; + margin: .5em 0 0; + padding: 0; + border: none; +} + +#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: 10px; + padding: 0; + top: 5px; +} + +.js #dashboard-widgets h3 .postbox-title-action { + right: 33px; +} + +#dashboard-widgets h4 { + color: #222; + font-weight: normal; + font-size: 14px; + margin: 0 0 .2em; + padding: 0; +} + +#dashboard_plugins h5 { + font-size: 14px; +} + +/* Recent Comments */ + +#latest-comments #the-comment-list { + position: relative; +} + +#activity-widget #the-comment-list .comment { + -webkit-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.06); + box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.06); +} + +#activity-widget .comments #the-comment-list .alt { + background-color: transparent; +} + +#activity-widget #latest-comments #the-comment-list .comment-item { + padding: 1em 12px; +} + +#latest-comments #the-comment-list .pingback { + padding-left: 12px !important; +} + +#latest-comments #the-comment-list .comment-item:first-child { + border-top: none; +} + +#latest-comments #the-comment-list .comment-item h4 { + line-height: 1.5em; + margin-top: 0; + color: #666; +} + +#latest-comments #the-comment-list .comment-item h4 cite { + font-style: normal; + font-weight: normal; +} + +#latest-comments #the-comment-list .comment-item blockquote, +#latest-comments #the-comment-list .comment-item blockquote p { + margin: 0; + padding: 0; + display: inline; +} + +#latest-comments #the-comment-list .comment-item p.row-actions { + margin: 3px 0 0; + padding: 0; + font-size: 13px; +} + +/* QuickDraft */ + +#title-wrap label { + cursor: text; +} + +#title-wrap #title { + padding: 2px 6px; + font-size: 1.3em; + line-height: 100%; + outline: none; +} + +#title-wrap #title-prompt-text { + font-size: 1.1em; + padding: 5px 8px; +} + +/* Feeds */ +.rss-widget ul { + margin: 0; + padding: 0; + list-style: none; +} + +a.rsswidget { + font-size: 14px; + font-weight: 600; + line-height: 1.7em; +} + +.rss-widget ul li { + line-height: 1.5em; + margin-bottom: 12px; +} + +.rss-widget span.rss-date { + color: #999; + font-size: 13px; + margin-left: 3px; +} + +.rss-widget cite { + display: block; + text-align: right; + margin: 0 0 1em; + padding: 0; +} + +.rss-widget cite:before { + content: '\2014'; +} + +.dashboard-comment-wrap { + overflow: hidden; + word-wrap: break-word; +} + +/* Browser Nag */ +#dashboard_browser_nag a.update-browser-link { + font-size: 1.2em; + font-weight: 600; +} + +#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; + color: #fff; + -webkit-box-shadow: none; + box-shadow: none; +} + +#dashboard_browser_nag.postbox.browser-insecure h3 { + border-bottom-color: #cd5a5a; + color: #fff; +} + +#dashboard_browser_nag.postbox h3 { + border-bottom-color: #f6e2ac; + background: transparent none; + color: #fff; + -webkit-box-shadow: none; + box-shadow: none; +} + +#dashboard_browser_nag a { + color: #fff; +} + +/* Make the browser nags easier to read with Open Sans */ + +#dashboard_browser_nag h3.hndle { + border: none; + font-weight: 600; + font-size: 20px; + padding-top: 10px; +} + +.postbox#dashboard_browser_nag p a.dismiss { + font-size: 14px; +} + +.postbox#dashboard_browser_nag p, +.postbox#dashboard_browser_nag a, +.postbox#dashboard_browser_nag p.browser-update-nag { + font-size: 16px; +} + +/* =Media Queries +-------------------------------------------------------------- */ + +/* one column on the dash */ +@media only screen and (max-width: 799px) { + #wpbody-content #dashboard-widgets .postbox-container { + width: 100%; + } +} + +/* two columns on the dash, but keep the setting if one is selected */ +@media only screen and (min-width: 800px) and (max-width: 1499px) { + #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 #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; + } +} + +/* three columns on the dash */ +@media only screen and (min-width: 1500px) and (max-width: 1800px) { + #wpbody-content #dashboard-widgets .postbox-container { + width: 33.5%; + } + + #wpbody-content #dashboard-widgets #postbox-container-1 { + width: 33%; + } + + #wpbody-content #dashboard-widgets #postbox-container-3, + #wpbody-content #dashboard-widgets #postbox-container-4 { + float: right; + } + + #dashboard-widgets #postbox-container-4 .empty-container { + border: 0 none; + height: 0; + min-height: 0; + } +} + +@media screen and (max-width: 870px) { + .welcome-panel .welcome-panel-column, + .welcome-panel .welcome-panel-column:first-child { + display: block; + float: none; + width: 100%; + } + + .welcome-panel .welcome-panel-column li { + display: inline-block; + margin-right: 13px; + } + + .welcome-panel .welcome-panel-column ul { + margin: 0.4em 0 0; + } + +} + +@media screen and ( max-width: 782px ) { + #dashboard_recent_comments #the-comment-list .comment-item .avatar { + height: 30px; + width: 30px; + margin: 4px 10px 5px 0; + } +} + +/* Smartphone */ +@media screen and (max-width: 600px) { + /* Keep the close icon from overlapping the Welcome text. */ + .welcome-panel .welcome-panel-close { + overflow: hidden; + text-indent: 100%; + white-space: nowrap; + width: 20px; + height: 20px; + right: 0; + padding: 5px; + } + + /* Make the close icon larger for tappability. */ + #welcome-panel.welcome-panel .welcome-panel-close::before { + font-size: 20px; + margin: 0; + } +} diff --git a/wp-admin/css/deprecated-media-rtl.css b/wp-admin/css/deprecated-media-rtl.css new file mode 100644 index 0000000..7b69804 --- /dev/null +++ b/wp-admin/css/deprecated-media-rtl.css @@ -0,0 +1,376 @@ +/* Styles for the media library iframe (not used on the Library screen) */ + +div#media-upload-header { + margin: 0; + padding: 5px 5px 0; + font-weight: bold; + position: relative; + border-bottom: 1px solid #dfdfdf; + background: #f9f9f9; +} + +body#media-upload ul#sidemenu { + font-weight: normal; + margin: 0 5px; + right: 0; + bottom: -1px; + float: none; + overflow: hidden; +} + +#media-upload:after { /* clearfix */ + content: ""; + display: table; + clear: both; +} + +#media-upload, +#media-upload .media-item .slidetoggle { + background: #fff; +} + +#media-upload .slidetoggle { + border-top-color: #dfdfdf; +} + +#media-upload input[type="radio"] { + padding: 0; +} + +form { + margin: 1em; +} + +#search-filter { + text-align: left; +} + +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; +} + +/* specific to the image upload form */ + +.image-align-none-label { + background: url(../images/align-none.png) no-repeat center right; +} + +.image-align-left-label { + background: url(../images/align-left.png) no-repeat center right; +} + +.image-align-center-label { + background: url(../images/align-center.png) no-repeat center right; +} + +.image-align-right-label { + background: url(../images/align-right.png) no-repeat center right; +} + +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; +} + +/* Specific to Uploader */ + +#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: left; + font-size: 11px; + margin: 10px 10px 0; +} + +.menu_order_input { + border: 1px solid #ddd; + font-size: 10px; + padding: 1px; + width: 23px; +} + +.ui-sortable-helper { + background-color: #fff; + border: 1px solid #aaa; + opacity: 0.6; + filter: alpha(opacity=60); +} + +#media-upload th.order-head { + width: 20%; + text-align: center; +} + +#media-upload th.actions-head { + width: 25%; + text-align: center; +} + +#media-upload a.wp-post-thumbnail { + margin: 0 20px; +} + +#media-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 0 5px 5px; +} + +#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: right; +} + +#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-left: 15px; +} + +#gallery-settings .align .field label { + margin: 0 3px 0 1em; +} + +#gallery-settings p.ml-submit { + border-top: 1px solid #dfdfdf; +} + +#gallery-settings select#columns { + width: 6em; +} + +#sort-buttons { + font-size: 0.8em; + margin: 3px 0 -8px 25px; + text-align: left; + max-width: 625px; +} + +#sort-buttons a { + text-decoration: none; +} + +#sort-buttons #asc, +#sort-buttons #showall { + padding-right: 5px; +} + +#sort-buttons span { + margin-left: 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; +} + +/** + * HiDPI Displays + */ +@media print, + (-o-min-device-pixel-ratio: 5/4), + (-webkit-min-device-pixel-ratio: 1.25), + (min-resolution: 120dpi) { + + .image-align-none-label { + background-image: url(../images/align-none-2x.png?ver=20120916); + -webkit-background-size: 21px 15px; + background-size: 21px 15px; + } + + .image-align-left-label { + background-image: url(../images/align-left-2x.png?ver=20120916); + -webkit-background-size: 22px 15px; + background-size: 22px 15px; + } + + .image-align-center-label { + background-image: url(../images/align-center-2x.png?ver=20120916); + -webkit-background-size: 21px 15px; + background-size: 21px 15px; + } + + .image-align-right-label { + background-image: url(../images/align-right-2x.png?ver=20120916); + -webkit-background-size: 22px 15px; + background-size: 22px 15px; + } +} diff --git a/wp-admin/css/deprecated-media-rtl.min.css b/wp-admin/css/deprecated-media-rtl.min.css new file mode 100644 index 0000000..a16b012 --- /dev/null +++ b/wp-admin/css/deprecated-media-rtl.min.css @@ -0,0 +1 @@ +div#media-upload-header{margin:0;padding:5px 5px 0;font-weight:700;position:relative;border-bottom:1px solid #dfdfdf;background:#f9f9f9}body#media-upload ul#sidemenu{font-weight:400;margin:0 5px;right:0;bottom:-1px;float:none;overflow:hidden}#media-upload:after{content:"";display:table;clear:both}#media-upload,#media-upload .media-item .slidetoggle{background:#fff}#media-upload .slidetoggle{border-top-color:#dfdfdf}#media-upload input[type=radio]{padding:0}form{margin:1em}#search-filter{text-align:left}th{position:relative}.media-upload-form label.form-help,td.help{font-family:sans-serif;font-style:italic;font-weight:400}.media-upload-form p.help{margin:0;padding:0}.media-upload-form fieldset{width:100%;border:0;text-align:justify;margin:0 0 1em;padding:0}.image-align-none-label{background:url(../images/align-none.png) no-repeat center right}.image-align-left-label{background:url(../images/align-left.png) no-repeat center right}.image-align-center-label{background:url(../images/align-center.png) no-repeat center right}.image-align-right-label{background:url(../images/align-right.png) no-repeat center right}tr.image-size td{width:460px}tr.image-size div.image-size-item{margin:0 0 5px}#gallery-form .progress,#library-form .progress,.describe.startclosed,.describe.startopen,.insert-gallery{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 label.help,#media-upload p.help{font-family:sans-serif;font-style:italic;font-weight:400}#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:left;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-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 0 5px 5px}#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:400;color:#5A5A5A}#gallery-settings .describe td{vertical-align:middle;height:3em}#gallery-settings .describe th.label{padding-top:.5em;text-align:right}#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-left:15px}#gallery-settings .align .field label{margin:0 3px 0 1em}#gallery-settings p.ml-submit{border-top:1px solid #dfdfdf}#gallery-settings select#columns{width:6em}#sort-buttons{font-size:.8em;margin:3px 0 -8px 25px;text-align:left;max-width:625px}#sort-buttons a{text-decoration:none}#sort-buttons #asc,#sort-buttons #showall{padding-right:5px}#sort-buttons span{margin-left: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}@media print,(-o-min-device-pixel-ratio:5/4),(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.image-align-none-label{background-image:url(../images/align-none-2x.png?ver=20120916);-webkit-background-size:21px 15px;background-size:21px 15px}.image-align-left-label{background-image:url(../images/align-left-2x.png?ver=20120916);-webkit-background-size:22px 15px;background-size:22px 15px}.image-align-center-label{background-image:url(../images/align-center-2x.png?ver=20120916);-webkit-background-size:21px 15px;background-size:21px 15px}.image-align-right-label{background-image:url(../images/align-right-2x.png?ver=20120916);-webkit-background-size:22px 15px;background-size:22px 15px}} \ No newline at end of file diff --git a/wp-admin/css/deprecated-media.css b/wp-admin/css/deprecated-media.css new file mode 100644 index 0000000..edd4c0b --- /dev/null +++ b/wp-admin/css/deprecated-media.css @@ -0,0 +1,376 @@ +/* Styles for the media library iframe (not used on the Library screen) */ + +div#media-upload-header { + margin: 0; + padding: 5px 5px 0; + font-weight: bold; + position: relative; + border-bottom: 1px solid #dfdfdf; + background: #f9f9f9; +} + +body#media-upload ul#sidemenu { + font-weight: normal; + margin: 0 5px; + left: 0; + bottom: -1px; + float: none; + overflow: hidden; +} + +#media-upload:after { /* clearfix */ + content: ""; + display: table; + clear: both; +} + +#media-upload, +#media-upload .media-item .slidetoggle { + background: #fff; +} + +#media-upload .slidetoggle { + border-top-color: #dfdfdf; +} + +#media-upload input[type="radio"] { + padding: 0; +} + +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; +} + +/* specific to the image upload form */ + +.image-align-none-label { + background: url(../images/align-none.png) no-repeat center left; +} + +.image-align-left-label { + background: url(../images/align-left.png) no-repeat center left; +} + +.image-align-center-label { + background: url(../images/align-center.png) no-repeat center left; +} + +.image-align-right-label { + background: url(../images/align-right.png) no-repeat center left; +} + +tr.image-size td { + width: 460px; +} + +tr.image-size div.image-size-item { + 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; +} + +/* Specific to Uploader */ + +#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: 0.6; + filter: alpha(opacity=60); +} + +#media-upload th.order-head { + width: 20%; + text-align: center; +} + +#media-upload th.actions-head { + width: 25%; + text-align: center; +} + +#media-upload a.wp-post-thumbnail { + margin: 0 20px; +} + +#media-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: 0.8em; + margin: 3px 25px -8px 0; + text-align: right; + max-width: 625px; +} + +#sort-buttons a { + text-decoration: none; +} + +#sort-buttons #asc, +#sort-buttons #showall { + padding-left: 5px; +} + +#sort-buttons span { + margin-right: 25px; +} + +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; +} + +/** + * HiDPI Displays + */ +@media print, + (-o-min-device-pixel-ratio: 5/4), + (-webkit-min-device-pixel-ratio: 1.25), + (min-resolution: 120dpi) { + + .image-align-none-label { + background-image: url(../images/align-none-2x.png?ver=20120916); + -webkit-background-size: 21px 15px; + background-size: 21px 15px; + } + + .image-align-left-label { + background-image: url(../images/align-left-2x.png?ver=20120916); + -webkit-background-size: 22px 15px; + background-size: 22px 15px; + } + + .image-align-center-label { + background-image: url(../images/align-center-2x.png?ver=20120916); + -webkit-background-size: 21px 15px; + background-size: 21px 15px; + } + + .image-align-right-label { + background-image: url(../images/align-right-2x.png?ver=20120916); + -webkit-background-size: 22px 15px; + background-size: 22px 15px; + } +} diff --git a/wp-admin/css/deprecated-media.min.css b/wp-admin/css/deprecated-media.min.css new file mode 100644 index 0000000..a6aca1d --- /dev/null +++ b/wp-admin/css/deprecated-media.min.css @@ -0,0 +1 @@ +div#media-upload-header{margin:0;padding:5px 5px 0;font-weight:700;position:relative;border-bottom:1px solid #dfdfdf;background:#f9f9f9}body#media-upload ul#sidemenu{font-weight:400;margin:0 5px;left:0;bottom:-1px;float:none;overflow:hidden}#media-upload:after{content:"";display:table;clear:both}#media-upload,#media-upload .media-item .slidetoggle{background:#fff}#media-upload .slidetoggle{border-top-color:#dfdfdf}#media-upload input[type=radio]{padding:0}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:400}.media-upload-form p.help{margin:0;padding:0}.media-upload-form fieldset{width:100%;border:0;text-align:justify;margin:0 0 1em;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}#gallery-form .progress,#library-form .progress,.describe.startclosed,.describe.startopen,.insert-gallery{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 label.help,#media-upload p.help{font-family:sans-serif;font-style:italic;font-weight:400}#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-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:400;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}@media print,(-o-min-device-pixel-ratio:5/4),(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.image-align-none-label{background-image:url(../images/align-none-2x.png?ver=20120916);-webkit-background-size:21px 15px;background-size:21px 15px}.image-align-left-label{background-image:url(../images/align-left-2x.png?ver=20120916);-webkit-background-size:22px 15px;background-size:22px 15px}.image-align-center-label{background-image:url(../images/align-center-2x.png?ver=20120916);-webkit-background-size:21px 15px;background-size:21px 15px}.image-align-right-label{background-image:url(../images/align-right-2x.png?ver=20120916);-webkit-background-size:22px 15px;background-size:22px 15px}} \ No newline at end of file diff --git a/wp-admin/css/edit-rtl.css b/wp-admin/css/edit-rtl.css new file mode 100644 index 0000000..2bb6650 --- /dev/null +++ b/wp-admin/css/edit-rtl.css @@ -0,0 +1,1423 @@ +#poststuff { + padding-top: 10px; + min-width: 763px; +} + +#poststuff #post-body { + padding: 0; +} + +#poststuff .postbox-container { + width: 100%; +} + +#poststuff #post-body.columns-2 { + margin-left: 300px; +} + +/*------------------------------------------------------------------------------ + 11.0 - Write/Edit Post Screen +------------------------------------------------------------------------------*/ + +#show-comments { + overflow: hidden; +} + +#save-action .spinner, +#show-comments a, +#show-comments .spinner { + float: right; +} + +#lost-connection-notice .spinner { + display: block; + float: right; + margin: 0 0 0 5px; +} + +#titlediv { + position: relative; + margin-bottom: 10px; +} + +#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%; + height: 1.7em; + width: 100%; + outline: none; + margin: 0; + background-color: #fff; +} + +#titlediv #title-prompt-text { + color: #777; + position: absolute; + font-size: 1.7em; + padding: 11px 10px; +} + +#wp-fullscreen-save .fs-saved { + color: #999; + float: left; + margin-top: 4px; +} + +#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 { + line-height: 24px; + min-height: 25px; /* Yes, line-height + 1 */ + margin-top: 5px; + padding: 0 10px; + color: #666; +} + +#edit-slug-box .cancel { + margin-left: 10px; + font-size: 11px; +} + +#editable-post-name-full { + display: none; +} + +#editable-post-name { + background-color: #fffbcc; +} + +#editable-post-name input { + font-size: 13px; + height: 22px; + margin: 0; + width: 16em; +} + +.postarea h3 label { + float: right; +} + +.submitbox .submit { + text-align: right; + padding: 12px 10px 10px; + font-size: 11px; + background-color: #464646; + color: #ccc; +} + +.submitbox .submitdelete { + text-decoration: none; + padding: 1px 2px; +} + +/* @todo: do we really need this? word on the street is we don't and this +stray rule may actually be compensated for elsewhere. */ +#normal-sortables .submitbox .submitdelete:hover { + color: #000; + background-color: #f00; + border-bottom-color: #f00; +} + +.submitbox .submit a:hover { + text-decoration: underline; +} + +.submitbox .submit input { + margin-bottom: 8px; + margin-left: 4px; + padding: 6px; +} + +.inside-submitbox #post_status { + margin: 2px -2px 2px 0; +} + +#post-status-select { + margin-top: 3px; +} + +/* Post Screen */ +#post-body #normal-sortables { + min-height: 50px; +} + +.postbox { + position: relative; + min-width: 255px; + border: 1px solid #e5e5e5; + -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.04); + box-shadow: 0 1px 1px rgba(0,0,0,0.04); + background: #fff; +} + +#trackback_url { + width: 99%; +} + +#normal-sortables .postbox .submit { + background: transparent none; + border: 0 none; + float: left; + padding: 0 12px; + margin:0; +} + +.category-add input[type="text"], +.category-add select { + width: 100%; + max-width: 260px; + vertical-align: baseline; +} + +#side-sortables .category-add input[type="text"], +#side-sortables .category-add select { + margin: 0 0 1em; +} + +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; +} + +/* @todo: do these really need to be so specific? */ +#side-sortables .category-tabs .tabs a, +#side-sortables .add-menu-item-tabs .tabs a, +.wp-tab-bar .wp-tab-active a, +#post-body ul.category-tabs li.tabs a, +#post-body ul.add-menu-item-tabs li.tabs a { + color: #333; +} + +.category-tabs { + margin: 8px 0 5px; +} + +#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; +} + +/* @todo: make this a more generic class */ +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 { + border: solid 1px transparent; + position: relative; +} + +ul.category-tabs li.tabs, +ul.add-menu-item-tabs li.tabs, +.wp-tab-active { + border: 1px solid #dfdfdf; + border-bottom-color: #fdfdfd; + background-color: #fdfdfd; +} + +ul.category-tabs li, +ul.add-menu-item-tabs li, +ul.wp-tab-bar li { + padding: 3px 5px 5px; +} + +#postimagediv .inside img { + max-width: 100%; + height: auto; +} + +form#tags-filter { + position: relative; +} + +/* Edit posts */ +td.post-title strong, +td.plugin-title strong { + display: block; + margin-bottom: .2em; + font-size: 14px; +} + +td.post-title p, +td.plugin-title p { + margin: 6px 0; +} + +/* Global classes */ +.wp-hidden-children .wp-hidden-child, +.ui-tabs-hide { + display: none; +} + +#post-body .tagsdiv #newtag { + margin-left: 5px; + width: 16em; +} + +#side-sortables input#post_password { + width: 94% +} + +#side-sortables .tagsdiv #newtag { + width: 68%; +} + +#post-status-info { + width: 100%; + border-spacing: 0; + border: 1px solid #e5e5e5; + border-top: none; + background-color: #f7f7f7; + -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.04); + box-shadow: 0 1px 1px rgba(0,0,0,0.04); +} + +#post-status-info td { + font-size: 12px; +} + +.autosave-info { + padding: 2px; + text-align: left; +} + +#editorcontent #post-status-info { + border: none; +} + +#content-resize-handle { + background: transparent url(../images/resize.gif) no-repeat scroll left bottom; + width: 12px; + cursor: row-resize; +} + +.rtl #content-resize-handle { + background: transparent url(../images/resize-rtl.gif) no-repeat scroll right bottom; +} + +#wp-word-count { + display: block; + padding: 2px 10px; +} + +#timestampdiv select { + height: 21px; + line-height: 14px; + padding: 0; + vertical-align: top; + font-size: 12px; +} + +#aa, #jj, #hh, #mn { + padding: 1px; + font-size: 12px; +} + +#jj, #hh, #mn { + width: 2em; +} + +#aa { + width: 3.4em; +} + +.curtime #timestamp { + padding: 2px 0 1px 0; + display: inline !important; + height: auto !important; +} + +#misc-publishing-actions label[for="post_status"]:before, +#post-body #visibility:before, +.curtime #timestamp:before, +#post-body .misc-pub-revisions:before, +span.wp-media-buttons-icon:before { + color: #888; +} + +#post-body #visibility:before, +.curtime #timestamp:before, +#post-body .misc-pub-revisions:before { + font: normal 20px/1 'dashicons'; + speak: none; + display: inline-block; + padding: 0 0 0 2px; + top: 0; + right: -1px; + position: relative; + vertical-align: top; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-decoration: none !important; +} + +#post-body #visibility:before { + content: '\f177'; +} + +.curtime #timestamp:before { + content: '\f145'; + top: -1px; +} + +#post-body .misc-pub-revisions:before { + content: '\f321'; +} + +#timestampdiv { + padding-top: 5px; + line-height: 23px; +} + +#timestampdiv p { + margin: 8px 0 6px; +} + +#timestampdiv input { + border-width: 1px; + border-style: solid; +} + +.notification-dialog { + position: fixed; + top: 30%; + right: 50%; + width: 450px; + margin-right: -225px; + background: #fff; + -webkit-box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); + box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); + line-height: 1.5; + z-index: 1000005; +} + +.notification-dialog-background { + position: fixed; + top: 0; + right: 0; + left: 0; + bottom: 0; + background: #000; + opacity: 0.7; + filter: alpha(opacity=70); + z-index: 1000000; +} + +#post-lock-dialog .post-locked-message, +#post-lock-dialog .post-taken-over { + margin: 25px; +} + +#post-lock-dialog .post-locked-message a.button { + margin-left: 10px; +} + +#post-lock-dialog .post-locked-avatar { + float: right; + margin: 0 0 20px 20px; +} + +#post-lock-dialog .wp-tab-first { + outline: 0; +} + +#post-lock-dialog .locked-saving img { + float: right; + margin-left: 3px; +} + +#post-lock-dialog.saving .locked-saving, +#post-lock-dialog.saved .locked-saved { + display: inline; +} + +#excerpt, +.attachmentlinks { + margin: 0; + height: 4em; + width: 98%; +} + +.tagchecklist { + margin-right: 14px; + font-size: 12px; + overflow: auto; +} + +.tagchecklist br { + display: none; +} + +.tagchecklist strong { + margin-right: -8px; + position: absolute; +} + +.tagchecklist span { + margin-left: 25px; + display: block; + float: right; + font-size: 13px; + line-height: 1.8em; + white-space: nowrap; + cursor: default; +} + +.tagchecklist span a { + margin: 1px -17px 0 0; + cursor: pointer; + width: 20px; + height: 20px; + display: block; + float: right; + text-indent: 0; + overflow: hidden; + position: absolute; +} + +#poststuff h2 { + margin-top: 20px; + font-size: 1.5em; + margin-bottom: 15px; + padding: 0 0 3px; + clear: right; +} + +#poststuff h3 { + font-size: 14px; + padding: 8px 12px; + margin: 0; + line-height: 1.4; +} + +#poststuff .inside { + margin: 6px 0 0 0; +} + +#poststuff .inside #parent_id, +#poststuff .inside #page_template { + max-width: 100%; +} + +#poststuff .inside label.spam, +#poststuff .inside label.deleted { + color: red; +} + +#poststuff .inside label.waiting { + color: orange; +} + +#poststuff .inside label.approved { + color: green; +} + +.ie8 #poststuff .inside #parent_id, +.ie8 #poststuff .inside #page_template { + width: 250px; +} + +#post-visibility-select { + line-height: 1.5em; + margin-top: 3px; +} + +#poststuff #submitdiv .inside { + margin: 0; + padding: 0; +} + +.edit-form-section { + margin-bottom: 20px; +} + +/*------------------------------------------------------------------------------ + 11.1 - Custom Fields +------------------------------------------------------------------------------*/ + +#postcustomstuff thead th { + padding: 5px 8px 8px; + background-color: #f1f1f1; +} + +#postcustom #postcustomstuff .submit { + border: 0 none; + float: none; + padding: 0 8px 8px; +} + +#side-sortables #postcustom #postcustomstuff .submit { + margin: 0; + padding: 0; +} + +#side-sortables #postcustom #postcustomstuff #the-list textarea { + height: 85px; +} + +#side-sortables #postcustom #postcustomstuff td.left input, +#side-sortables #postcustom #postcustomstuff td.left select, +#side-sortables #postcustomstuff #newmetaleft a { + margin: 3px 3px 0; +} + +#postcustomstuff table { + margin: 0; + width: 100%; + border: 1px solid #dfdfdf; + border-spacing: 0; + background-color: #f9f9f9; +} + +#postcustomstuff tr { + vertical-align: top; +} + +#postcustomstuff table input, +#postcustomstuff table select, +#postcustomstuff table textarea { + width: 96%; + margin: 8px; +} + +#side-sortables #postcustomstuff table input, +#side-sortables #postcustomstuff table select, +#side-sortables #postcustomstuff table textarea { + margin: 3px; +} + +#postcustomstuff th.left, +#postcustomstuff td.left { + width: 38%; +} + +#postcustomstuff .submit input { + margin: 0; + width: auto; +} + +#postcustomstuff #newmetaleft a { + display: inline-block; + margin: 0 8px 8px; + text-decoration: none; +} + +.no-js #postcustomstuff #enternew { + display: none; +} + +#post-body-content .compat-attachment-fields { + margin-bottom: 20px; +} + +.compat-attachment-fields th { + padding-top: 5px; + padding-left: 10px; +} + +/*------------------------------------------------------------------------------ + 11.3 - Featured Images +------------------------------------------------------------------------------*/ + +#select-featured-image { + padding: 4px 0; + overflow: hidden; +} + +#select-featured-image img { + max-width: 100%; + height: auto; + margin-bottom: 10px; +} + +#select-featured-image a { + float: right; + clear: both; +} + +#select-featured-image .remove { + display: none; + margin-top: 10px; +} + +.js #select-featured-image.has-featured-image .remove { + display: inline-block; +} + +.no-js #select-featured-image .choose { + display: none; +} + +/*------------------------------------------------------------------------------ + 11.4 - Post formats +------------------------------------------------------------------------------*/ + +.post-state-format { + overflow: hidden; + display: inline-block; + vertical-align: middle; + height: 20px; + width: 20px; + margin-left: 5px; + margin-top: -4px; +} + +.post-state-format:before { + display: block; + height: 20px; + width: 20px; + font: normal 20px/1 'dashicons' !important; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.post-state-format:before, +.post-format-icon:before { + color: #ddd; + -webkit-transition: all .1s ease-in-out; + transition: all .1s ease-in-out; +} + +a.post-state-format:hover:before, +a.post-format-icon:hover:before { + color: #2ea2cc; +} + +#post-formats-select { + line-height: 2em; +} + +#post-formats-select .post-format-icon:before { + top: 5px; +} + +input.post-format { + margin-top: 1px; +} + +label.post-format-icon { + margin-right: 0px; + padding: 2px 0px 2px 0; +} + +.post-format-icon:before { + position: relative; + display: inline-block; + margin-left: 7px; + font: normal 20px/1 'dashicons'; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.post-state-format.post-format-standard:before, +.post-format-icon.post-format-standard:before, +a.post-state-format.format-standard:before { + content: '\f109'; +} + +.post-state-format.post-format-image:before, +.post-format-icon.post-format-image:before, +a.post-state-format.format-image:before { + content: '\f128'; +} + +.post-state-format.post-format-gallery:before, +.post-format-icon.post-format-gallery:before, +a.post-state-format.format-gallery:before { + content: '\f161'; +} + +.post-state-format.post-format-audio:before, +.post-format-icon.post-format-audio:before, +a.post-state-format.format-audio:before { + content: '\f127'; +} + +.post-state-format.post-format-video:before, +.post-format-icon.post-format-video:before, +a.post-state-format.format-video:before { + content: '\f126'; +} + +.post-state-format.post-format-chat:before, +.post-format-icon.post-format-chat:before, +a.post-state-format.format-chat:before { + content: '\f125'; +} + +.post-state-format.post-format-status:before, +.post-format-icon.post-format-status:before, +a.post-state-format.format-status:before { + content: '\f130'; +} + +.post-state-format.post-format-aside:before, +.post-format-icon.post-format-aside:before, +a.post-state-format.format-aside:before { + content: '\f123'; +} + +.post-state-format.post-format-quote:before, +.post-format-icon.post-format-quote:before, +a.post-state-format.format-quote:before { + content: '\f122'; +} + +.post-state-format.post-format-link:before, +.post-format-icon.post-format-link:before, +a.post-state-format.format-link:before { + content: '\f103'; +} + +/*------------------------------------------------------------------------------ + 12.0 - Categories +------------------------------------------------------------------------------*/ + +.category-adder { + margin-right: 120px; + padding: 4px 0; +} + +.category-adder h4 { + margin: 0 0 8px; +} + +#side-sortables .category-adder { + margin: 0; +} + +.wp-tab-panel, +.categorydiv div.tabs-panel, +.customlinkdiv div.tabs-panel, +.posttypediv div.tabs-panel, +.taxonomydiv div.tabs-panel { + min-height: 42px; + max-height: 200px; + overflow: auto; + padding: 0 0.9em; + border: solid 1px #dfdfdf; + background-color: #fdfdfd; +} + +div.tabs-panel-active { + display:block; +} + +div.tabs-panel-inactive { + display:none; +} + +#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-right: 18px; +} + +ul.categorychecklist li { + margin: 0; + padding: 0; + line-height: 22px; + 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; + color: #666; +} + +p.help, +p.description, +span.description, +.form-wrap p { + font-size: 13px; + font-style: italic; +} + +.form-wrap .form-field { + margin: 0 0 10px; + padding: 8px 0; +} + +.form-wrap .form-field #parent { + max-width: 100%; +} + +.col-wrap h3 { + margin: 12px 0; + font-size: 1.1em; +} + +.col-wrap p.submit { + margin-top: -10px; +} + + +/*------------------------------------------------------------------------------ + 13.0 - Tags +------------------------------------------------------------------------------*/ + +.tagsdiv { + margin-top: -8px; +} + +#poststuff .taghint { + color: #aaa; + margin: 15px 12px -24px 0; +} + +#poststuff .tagsdiv .howto { + margin: 0 0 6px 0; +} + +.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; +} + +/* tag hints */ +.taghint { + color: #aaa; + margin: -17px 7px 0 0; + visibility: hidden; +} + +input.newtag ~ div.taghint { + visibility: visible; +} + +input.newtag:focus ~ div.taghint { + visibility: hidden; +} + +p.popular-tags { + border: none; + 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: 1px solid #808080; + background-color: #fff; +} + +.wp-customizer .ac_results { + z-index: 500000; +} + +.ac_results li { + padding: 2px 5px; + white-space: nowrap; + color: #101010; + text-align: right; +} + +.ac_over { + background-color: #f0f0b8; + cursor: pointer; +} + +.ac_match { + text-decoration: underline; +} + +/* Comments */ + +.comment-php .wp-editor-area { + height: 200px; +} + +.comment-ays { + margin-bottom: 0; + border-bottom-style: solid; + border-bottom-width: 1px; +} + +.comment-ays .alt { + background-color: transparent; +} + +.trash-undo-inside, +.spam-undo-inside { + margin: 1px 0 1px 8px; + line-height: 16px; +} + +.spam-undo-inside .avatar, +.trash-undo-inside .avatar { + height: 20px; + width: 20px; + margin-left: 8px; + vertical-align: middle; +} + +.stuffbox .editcomment { + clear: none; +} + +#comment-status-radio p { + margin: 3px 0 5px; +} + +#comment-status-radio input { + margin: 2px 0 5px 3px; + vertical-align: middle; +} + +#comment-status-radio label { + padding: 5px 0; +} + +/* links tables */ +table.links-table { + width: 100%; + border-spacing: 0; +} + +.links-table th { + font-weight: normal; + text-align: right; + 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-left: 8px; +} + +.links-table td input[type="text"], +.links-table td textarea { + width: 100%; +} + +.links-table #link_rel { + max-width: 280px; +} + +/* =Media Queries +-------------------------------------------------------------- */ + +/** + * HiDPI Displays + */ +@media print, + (-o-min-device-pixel-ratio: 5/4), + (-webkit-min-device-pixel-ratio: 1.25), + (min-resolution: 120dpi) { + #content-resize-handle, + #post-body .wp_themeSkin .mceStatusbar a.mceResize { + background: transparent url(../images/resize-2x.gif) no-repeat scroll left bottom; + -webkit-background-size: 11px 11px; + background-size: 11px 11px; + } + + .rtl #content-resize-handle, + .rtl #post-body .wp_themeSkin .mceStatusbar a.mceResize { + background: transparent url(../images/resize-rtl-2x.gif) no-repeat scroll left bottom; + } +} + +/* one column on the post write/edit screen */ +@media only screen and (max-width: 850px) { + #poststuff { + min-width: 0; + } + + #wpbody-content #poststuff #post-body { + margin: 0; + } + + #wpbody-content #post-body.columns-2 #postbox-container-1 { + margin-left: 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; + } +} + +@media screen and ( max-width: 782px ) { + #post-body-content { + min-width: 0; + } + + #titlediv #title-prompt-text { + padding: 10px 10px; + } + + #poststuff h3 { + padding: 12px; + } + + .post-format-options { + padding-left: 0; + } + + .post-format-options a { + margin-left: 5px; + margin-bottom: 5px; + min-width: 52px; + } + + .post-format-options .post-format-title { + font-size: 11px; + } + + .post-format-options a div { + height: 28px; + width: 28px; + } + + .post-format-options a div:before { + font-size: 26px !important; + } + + /* Publish Metabox Options */ + #post-visibility-select { + line-height: 280%; + } + + .wp-core-ui .save-post-visibility, + .wp-core-ui .save-timestamp { + vertical-align: middle; + margin-left: 15px; + } + + .timestamp-wrap select#mm { + display: block; + width: 100%; + margin-bottom: 10px; + } + + .timestamp-wrap #jj, + .timestamp-wrap #aa, + .timestamp-wrap #hh, + .timestamp-wrap #mn { + padding: 12px 3px; + font-size: 14px; + margin-bottom: 5px; + width: auto; + text-align: center; + } + + /* Categories Metabox */ + ul.category-tabs { + margin: 30px 0 15px; + } + + ul.category-tabs li.tabs { + padding: 15px; + } + + ul.categorychecklist li { + margin-bottom: 15px; + } + + ul.categorychecklist ul { + margin-top: 15px; + } + + .category-add input[type=text], + .category-add select { + max-width: none; + margin-bottom: 15px; + } + + /* Tags Metabox */ + .tagsdiv .newtag { + width: 100%; + height: auto; + margin-bottom: 15px; + } + + .tagchecklist { + margin: 25px 10px; + } + + .tagchecklist span { + font-size: 16px; + line-height: 120%; + } + + /* Discussion */ + #commentstatusdiv p { + line-height: 2.8; + } + + /* TinyMCE Adjustments */ + .mceToolbar * { + white-space: normal !important; + } + + .mceToolbar tr, + .mceToolbar td { + float: right !important; + } + + .wp_themeSkin a.mceButton { + width: 30px; + height: 30px; + } + + .wp_themeSkin .mceButton .mceIcon { + margin-top: 5px; + margin-right: 5px; + } + + .wp_themeSkin .mceSplitButton { + margin-top: 1px; + } + + .wp_themeSkin .mceSplitButton td a.mceAction { + padding-top: 6px; + padding-bottom: 6px; + padding-right: 6px; + padding-left: 3px; + } + + .wp_themeSkin .mceSplitButton td a.mceOpen, + .wp_themeSkin .mceSplitButtonEnabled:hover td a.mceOpen { + padding-top: 6px; + padding-bottom: 6px; + background-position: 1px 6px; + } + + .wp_themeSkin table.mceListBox { + margin: 5px; + } + + div.quicktags-toolbar input { + padding: 10px 20px; + } + + #wp-content-editor-tools { + overflow: hidden; + padding: 20px 0 1px 15px; + top: 1px; + } + + a.wp-switch-editor { + font-size: 16px; + line-height: 1em; + margin: 3px 7px 0 0; + padding: 12px 15px; + } + + #wp-content-media-buttons a { + font-size: 16px; + line-height: 37px; + height: 39px; + padding: 0 15px 0 20px; + } + + .wp-media-buttons span.wp-media-buttons-icon, + .wp-media-buttons span.jetpack-contact-form-icon { + width: 22px !important; + margin-top: -3px !important; + margin-right: -5px !important; + } + + .wp-media-buttons .add_media span.wp-media-buttons-icon:before, + .wp-media-buttons #insert-jetpack-contact-form span.jetpack-contact-form-icon:before { + font-size: 20px !important; + } + + #content_wp_fullscreen { + display: none; + } + + .misc-pub-section { + padding: 20px 10px 20px; + } + + .misc-pub-section > a { + float: left; + font-size: 16px; + } + + #delete-action, + #publishing-action { + line-height: 47px; + } + + /* Moderate Comment */ + .comment-ays { + border-bottom: none; + } + + /* Links */ + .links-table #link_rel { + max-width: none; + } + + .links-table th, + .links-table td { + padding: 10px 0; + } +} + +@media only screen and (max-width: 500px) { + /* Align Add Media + Visual + Text tabs */ + #wp-content-media-buttons a { + font-size: 14px; + padding: 0 10px 0 10px; + } +} diff --git a/wp-admin/css/edit.css b/wp-admin/css/edit.css new file mode 100644 index 0000000..646384e --- /dev/null +++ b/wp-admin/css/edit.css @@ -0,0 +1,1423 @@ +#poststuff { + padding-top: 10px; + min-width: 763px; +} + +#poststuff #post-body { + padding: 0; +} + +#poststuff .postbox-container { + width: 100%; +} + +#poststuff #post-body.columns-2 { + margin-right: 300px; +} + +/*------------------------------------------------------------------------------ + 11.0 - Write/Edit Post Screen +------------------------------------------------------------------------------*/ + +#show-comments { + overflow: hidden; +} + +#save-action .spinner, +#show-comments a, +#show-comments .spinner { + float: left; +} + +#lost-connection-notice .spinner { + display: block; + float: left; + margin: 0 5px 0 0; +} + +#titlediv { + position: relative; + margin-bottom: 10px; +} + +#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%; + height: 1.7em; + width: 100%; + outline: none; + margin: 0; + background-color: #fff; +} + +#titlediv #title-prompt-text { + color: #777; + position: absolute; + font-size: 1.7em; + padding: 11px 10px; +} + +#wp-fullscreen-save .fs-saved { + color: #999; + float: right; + margin-top: 4px; +} + +#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 { + line-height: 24px; + min-height: 25px; /* Yes, line-height + 1 */ + margin-top: 5px; + padding: 0 10px; + color: #666; +} + +#edit-slug-box .cancel { + margin-right: 10px; + font-size: 11px; +} + +#editable-post-name-full { + display: none; +} + +#editable-post-name { + background-color: #fffbcc; +} + +#editable-post-name input { + font-size: 13px; + height: 22px; + margin: 0; + width: 16em; +} + +.postarea h3 label { + float: left; +} + +.submitbox .submit { + text-align: left; + padding: 12px 10px 10px; + font-size: 11px; + background-color: #464646; + color: #ccc; +} + +.submitbox .submitdelete { + text-decoration: none; + padding: 1px 2px; +} + +/* @todo: do we really need this? word on the street is we don't and this +stray rule may actually be compensated for elsewhere. */ +#normal-sortables .submitbox .submitdelete:hover { + color: #000; + background-color: #f00; + border-bottom-color: #f00; +} + +.submitbox .submit a:hover { + text-decoration: underline; +} + +.submitbox .submit input { + margin-bottom: 8px; + margin-right: 4px; + padding: 6px; +} + +.inside-submitbox #post_status { + margin: 2px 0 2px -2px; +} + +#post-status-select { + margin-top: 3px; +} + +/* Post Screen */ +#post-body #normal-sortables { + min-height: 50px; +} + +.postbox { + position: relative; + min-width: 255px; + border: 1px solid #e5e5e5; + -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.04); + box-shadow: 0 1px 1px rgba(0,0,0,0.04); + background: #fff; +} + +#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; + vertical-align: baseline; +} + +#side-sortables .category-add input[type="text"], +#side-sortables .category-add select { + margin: 0 0 1em; +} + +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; +} + +/* @todo: do these really need to be so specific? */ +#side-sortables .category-tabs .tabs a, +#side-sortables .add-menu-item-tabs .tabs a, +.wp-tab-bar .wp-tab-active a, +#post-body ul.category-tabs li.tabs a, +#post-body ul.add-menu-item-tabs li.tabs a { + color: #333; +} + +.category-tabs { + margin: 8px 0 5px; +} + +#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; +} + +/* @todo: make this a more generic class */ +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 { + border: solid 1px transparent; + position: relative; +} + +ul.category-tabs li.tabs, +ul.add-menu-item-tabs li.tabs, +.wp-tab-active { + border: 1px solid #dfdfdf; + border-bottom-color: #fdfdfd; + background-color: #fdfdfd; +} + +ul.category-tabs li, +ul.add-menu-item-tabs li, +ul.wp-tab-bar li { + padding: 3px 5px 5px; +} + +#postimagediv .inside img { + max-width: 100%; + height: auto; +} + +form#tags-filter { + position: relative; +} + +/* Edit posts */ +td.post-title strong, +td.plugin-title strong { + display: block; + margin-bottom: .2em; + font-size: 14px; +} + +td.post-title p, +td.plugin-title p { + margin: 6px 0; +} + +/* Global classes */ +.wp-hidden-children .wp-hidden-child, +.ui-tabs-hide { + display: none; +} + +#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 { + width: 100%; + border-spacing: 0; + border: 1px solid #e5e5e5; + border-top: none; + background-color: #f7f7f7; + -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.04); + box-shadow: 0 1px 1px rgba(0,0,0,0.04); +} + +#post-status-info td { + font-size: 12px; +} + +.autosave-info { + padding: 2px; + text-align: right; +} + +#editorcontent #post-status-info { + border: none; +} + +#content-resize-handle { + background: transparent url(../images/resize.gif) no-repeat scroll right bottom; + width: 12px; + cursor: row-resize; +} + +.rtl #content-resize-handle { + background: transparent url(../images/resize-rtl.gif) no-repeat scroll left bottom; +} + +#wp-word-count { + display: block; + padding: 2px 10px; +} + +#timestampdiv select { + height: 21px; + line-height: 14px; + padding: 0; + vertical-align: top; + font-size: 12px; +} + +#aa, #jj, #hh, #mn { + padding: 1px; + font-size: 12px; +} + +#jj, #hh, #mn { + width: 2em; +} + +#aa { + width: 3.4em; +} + +.curtime #timestamp { + padding: 2px 0 1px 0; + display: inline !important; + height: auto !important; +} + +#misc-publishing-actions label[for="post_status"]:before, +#post-body #visibility:before, +.curtime #timestamp:before, +#post-body .misc-pub-revisions:before, +span.wp-media-buttons-icon:before { + color: #888; +} + +#post-body #visibility:before, +.curtime #timestamp:before, +#post-body .misc-pub-revisions:before { + font: normal 20px/1 'dashicons'; + speak: none; + display: inline-block; + padding: 0 2px 0 0; + top: 0; + left: -1px; + position: relative; + vertical-align: top; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-decoration: none !important; +} + +#post-body #visibility:before { + content: '\f177'; +} + +.curtime #timestamp:before { + content: '\f145'; + top: -1px; +} + +#post-body .misc-pub-revisions:before { + content: '\f321'; +} + +#timestampdiv { + padding-top: 5px; + line-height: 23px; +} + +#timestampdiv p { + margin: 8px 0 6px; +} + +#timestampdiv input { + border-width: 1px; + border-style: solid; +} + +.notification-dialog { + position: fixed; + top: 30%; + left: 50%; + width: 450px; + margin-left: -225px; + background: #fff; + -webkit-box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); + box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); + line-height: 1.5; + z-index: 1000005; +} + +.notification-dialog-background { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: #000; + opacity: 0.7; + filter: alpha(opacity=70); + z-index: 1000000; +} + +#post-lock-dialog .post-locked-message, +#post-lock-dialog .post-taken-over { + margin: 25px; +} + +#post-lock-dialog .post-locked-message a.button { + margin-right: 10px; +} + +#post-lock-dialog .post-locked-avatar { + float: left; + margin: 0 20px 20px 0; +} + +#post-lock-dialog .wp-tab-first { + outline: 0; +} + +#post-lock-dialog .locked-saving img { + float: left; + margin-right: 3px; +} + +#post-lock-dialog.saving .locked-saving, +#post-lock-dialog.saved .locked-saved { + display: inline; +} + +#excerpt, +.attachmentlinks { + margin: 0; + height: 4em; + width: 98%; +} + +.tagchecklist { + margin-left: 14px; + font-size: 12px; + overflow: auto; +} + +.tagchecklist br { + display: none; +} + +.tagchecklist strong { + margin-left: -8px; + position: absolute; +} + +.tagchecklist span { + margin-right: 25px; + display: block; + float: left; + font-size: 13px; + line-height: 1.8em; + white-space: nowrap; + cursor: default; +} + +.tagchecklist span a { + margin: 1px 0 0 -17px; + cursor: pointer; + width: 20px; + height: 20px; + display: block; + float: left; + text-indent: 0; + overflow: hidden; + position: absolute; +} + +#poststuff h2 { + margin-top: 20px; + font-size: 1.5em; + margin-bottom: 15px; + padding: 0 0 3px; + clear: left; +} + +#poststuff h3 { + font-size: 14px; + padding: 8px 12px; + margin: 0; + line-height: 1.4; +} + +#poststuff .inside { + margin: 6px 0 0 0; +} + +#poststuff .inside #parent_id, +#poststuff .inside #page_template { + max-width: 100%; +} + +#poststuff .inside label.spam, +#poststuff .inside label.deleted { + color: red; +} + +#poststuff .inside label.waiting { + color: orange; +} + +#poststuff .inside label.approved { + color: green; +} + +.ie8 #poststuff .inside #parent_id, +.ie8 #poststuff .inside #page_template { + width: 250px; +} + +#post-visibility-select { + line-height: 1.5em; + margin-top: 3px; +} + +#poststuff #submitdiv .inside { + margin: 0; + padding: 0; +} + +.edit-form-section { + margin-bottom: 20px; +} + +/*------------------------------------------------------------------------------ + 11.1 - Custom Fields +------------------------------------------------------------------------------*/ + +#postcustomstuff thead th { + padding: 5px 8px 8px; + background-color: #f1f1f1; +} + +#postcustom #postcustomstuff .submit { + border: 0 none; + float: none; + padding: 0 8px 8px; +} + +#side-sortables #postcustom #postcustomstuff .submit { + margin: 0; + padding: 0; +} + +#side-sortables #postcustom #postcustomstuff #the-list textarea { + height: 85px; +} + +#side-sortables #postcustom #postcustomstuff td.left input, +#side-sortables #postcustom #postcustomstuff td.left select, +#side-sortables #postcustomstuff #newmetaleft a { + margin: 3px 3px 0; +} + +#postcustomstuff table { + margin: 0; + width: 100%; + border: 1px solid #dfdfdf; + border-spacing: 0; + background-color: #f9f9f9; +} + +#postcustomstuff tr { + vertical-align: top; +} + +#postcustomstuff table input, +#postcustomstuff table select, +#postcustomstuff table textarea { + width: 96%; + margin: 8px; +} + +#side-sortables #postcustomstuff table input, +#side-sortables #postcustomstuff table select, +#side-sortables #postcustomstuff table textarea { + margin: 3px; +} + +#postcustomstuff th.left, +#postcustomstuff td.left { + width: 38%; +} + +#postcustomstuff .submit input { + margin: 0; + width: auto; +} + +#postcustomstuff #newmetaleft a { + display: inline-block; + margin: 0 8px 8px; + text-decoration: none; +} + +.no-js #postcustomstuff #enternew { + display: none; +} + +#post-body-content .compat-attachment-fields { + margin-bottom: 20px; +} + +.compat-attachment-fields th { + padding-top: 5px; + padding-right: 10px; +} + +/*------------------------------------------------------------------------------ + 11.3 - Featured Images +------------------------------------------------------------------------------*/ + +#select-featured-image { + padding: 4px 0; + overflow: hidden; +} + +#select-featured-image img { + max-width: 100%; + height: auto; + margin-bottom: 10px; +} + +#select-featured-image a { + float: left; + clear: both; +} + +#select-featured-image .remove { + display: none; + margin-top: 10px; +} + +.js #select-featured-image.has-featured-image .remove { + display: inline-block; +} + +.no-js #select-featured-image .choose { + display: none; +} + +/*------------------------------------------------------------------------------ + 11.4 - Post formats +------------------------------------------------------------------------------*/ + +.post-state-format { + overflow: hidden; + display: inline-block; + vertical-align: middle; + height: 20px; + width: 20px; + margin-right: 5px; + margin-top: -4px; +} + +.post-state-format:before { + display: block; + height: 20px; + width: 20px; + font: normal 20px/1 'dashicons' !important; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.post-state-format:before, +.post-format-icon:before { + color: #ddd; + -webkit-transition: all .1s ease-in-out; + transition: all .1s ease-in-out; +} + +a.post-state-format:hover:before, +a.post-format-icon:hover:before { + color: #2ea2cc; +} + +#post-formats-select { + line-height: 2em; +} + +#post-formats-select .post-format-icon:before { + top: 5px; +} + +input.post-format { + margin-top: 1px; +} + +label.post-format-icon { + margin-left: 0px; + padding: 2px 0 2px 0px; +} + +.post-format-icon:before { + position: relative; + display: inline-block; + margin-right: 7px; + font: normal 20px/1 'dashicons'; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.post-state-format.post-format-standard:before, +.post-format-icon.post-format-standard:before, +a.post-state-format.format-standard:before { + content: '\f109'; +} + +.post-state-format.post-format-image:before, +.post-format-icon.post-format-image:before, +a.post-state-format.format-image:before { + content: '\f128'; +} + +.post-state-format.post-format-gallery:before, +.post-format-icon.post-format-gallery:before, +a.post-state-format.format-gallery:before { + content: '\f161'; +} + +.post-state-format.post-format-audio:before, +.post-format-icon.post-format-audio:before, +a.post-state-format.format-audio:before { + content: '\f127'; +} + +.post-state-format.post-format-video:before, +.post-format-icon.post-format-video:before, +a.post-state-format.format-video:before { + content: '\f126'; +} + +.post-state-format.post-format-chat:before, +.post-format-icon.post-format-chat:before, +a.post-state-format.format-chat:before { + content: '\f125'; +} + +.post-state-format.post-format-status:before, +.post-format-icon.post-format-status:before, +a.post-state-format.format-status:before { + content: '\f130'; +} + +.post-state-format.post-format-aside:before, +.post-format-icon.post-format-aside:before, +a.post-state-format.format-aside:before { + content: '\f123'; +} + +.post-state-format.post-format-quote:before, +.post-format-icon.post-format-quote:before, +a.post-state-format.format-quote:before { + content: '\f122'; +} + +.post-state-format.post-format-link:before, +.post-format-icon.post-format-link:before, +a.post-state-format.format-link:before { + content: '\f103'; +} + +/*------------------------------------------------------------------------------ + 12.0 - Categories +------------------------------------------------------------------------------*/ + +.category-adder { + margin-left: 120px; + padding: 4px 0; +} + +.category-adder h4 { + margin: 0 0 8px; +} + +#side-sortables .category-adder { + margin: 0; +} + +.wp-tab-panel, +.categorydiv div.tabs-panel, +.customlinkdiv div.tabs-panel, +.posttypediv div.tabs-panel, +.taxonomydiv div.tabs-panel { + min-height: 42px; + max-height: 200px; + overflow: auto; + padding: 0 0.9em; + border: solid 1px #dfdfdf; + background-color: #fdfdfd; +} + +div.tabs-panel-active { + display:block; +} + +div.tabs-panel-inactive { + display:none; +} + +#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: 22px; + 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; + color: #666; +} + +p.help, +p.description, +span.description, +.form-wrap p { + font-size: 13px; + font-style: italic; +} + +.form-wrap .form-field { + margin: 0 0 10px; + padding: 8px 0; +} + +.form-wrap .form-field #parent { + max-width: 100%; +} + +.col-wrap h3 { + margin: 12px 0; + font-size: 1.1em; +} + +.col-wrap p.submit { + margin-top: -10px; +} + + +/*------------------------------------------------------------------------------ + 13.0 - Tags +------------------------------------------------------------------------------*/ + +.tagsdiv { + margin-top: -8px; +} + +#poststuff .taghint { + color: #aaa; + margin: 15px 0 -24px 12px; +} + +#poststuff .tagsdiv .howto { + margin: 0 0 6px 0; +} + +.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; +} + +/* tag hints */ +.taghint { + color: #aaa; + margin: -17px 0 0 7px; + visibility: hidden; +} + +input.newtag ~ div.taghint { + visibility: visible; +} + +input.newtag:focus ~ div.taghint { + visibility: hidden; +} + +p.popular-tags { + border: none; + 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: 1px solid #808080; + background-color: #fff; +} + +.wp-customizer .ac_results { + z-index: 500000; +} + +.ac_results li { + padding: 2px 5px; + white-space: nowrap; + color: #101010; + text-align: left; +} + +.ac_over { + background-color: #f0f0b8; + cursor: pointer; +} + +.ac_match { + text-decoration: underline; +} + +/* Comments */ + +.comment-php .wp-editor-area { + height: 200px; +} + +.comment-ays { + margin-bottom: 0; + border-bottom-style: solid; + border-bottom-width: 1px; +} + +.comment-ays .alt { + background-color: transparent; +} + +.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; +} + +/* links tables */ +table.links-table { + width: 100%; + border-spacing: 0; +} + +.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 Queries +-------------------------------------------------------------- */ + +/** + * HiDPI Displays + */ +@media print, + (-o-min-device-pixel-ratio: 5/4), + (-webkit-min-device-pixel-ratio: 1.25), + (min-resolution: 120dpi) { + #content-resize-handle, + #post-body .wp_themeSkin .mceStatusbar a.mceResize { + background: transparent url(../images/resize-2x.gif) no-repeat scroll right bottom; + -webkit-background-size: 11px 11px; + background-size: 11px 11px; + } + + .rtl #content-resize-handle, + .rtl #post-body .wp_themeSkin .mceStatusbar a.mceResize { + background: transparent url(../images/resize-rtl-2x.gif) no-repeat scroll right bottom; + } +} + +/* one column on the post write/edit screen */ +@media only screen and (max-width: 850px) { + #poststuff { + min-width: 0; + } + + #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; + } +} + +@media screen and ( max-width: 782px ) { + #post-body-content { + min-width: 0; + } + + #titlediv #title-prompt-text { + padding: 10px 10px; + } + + #poststuff h3 { + padding: 12px; + } + + .post-format-options { + padding-right: 0; + } + + .post-format-options a { + margin-right: 5px; + margin-bottom: 5px; + min-width: 52px; + } + + .post-format-options .post-format-title { + font-size: 11px; + } + + .post-format-options a div { + height: 28px; + width: 28px; + } + + .post-format-options a div:before { + font-size: 26px !important; + } + + /* Publish Metabox Options */ + #post-visibility-select { + line-height: 280%; + } + + .wp-core-ui .save-post-visibility, + .wp-core-ui .save-timestamp { + vertical-align: middle; + margin-right: 15px; + } + + .timestamp-wrap select#mm { + display: block; + width: 100%; + margin-bottom: 10px; + } + + .timestamp-wrap #jj, + .timestamp-wrap #aa, + .timestamp-wrap #hh, + .timestamp-wrap #mn { + padding: 12px 3px; + font-size: 14px; + margin-bottom: 5px; + width: auto; + text-align: center; + } + + /* Categories Metabox */ + ul.category-tabs { + margin: 30px 0 15px; + } + + ul.category-tabs li.tabs { + padding: 15px; + } + + ul.categorychecklist li { + margin-bottom: 15px; + } + + ul.categorychecklist ul { + margin-top: 15px; + } + + .category-add input[type=text], + .category-add select { + max-width: none; + margin-bottom: 15px; + } + + /* Tags Metabox */ + .tagsdiv .newtag { + width: 100%; + height: auto; + margin-bottom: 15px; + } + + .tagchecklist { + margin: 25px 10px; + } + + .tagchecklist span { + font-size: 16px; + line-height: 120%; + } + + /* Discussion */ + #commentstatusdiv p { + line-height: 2.8; + } + + /* TinyMCE Adjustments */ + .mceToolbar * { + white-space: normal !important; + } + + .mceToolbar tr, + .mceToolbar td { + float: left !important; + } + + .wp_themeSkin a.mceButton { + width: 30px; + height: 30px; + } + + .wp_themeSkin .mceButton .mceIcon { + margin-top: 5px; + margin-left: 5px; + } + + .wp_themeSkin .mceSplitButton { + margin-top: 1px; + } + + .wp_themeSkin .mceSplitButton td a.mceAction { + padding-top: 6px; + padding-bottom: 6px; + padding-left: 6px; + padding-right: 3px; + } + + .wp_themeSkin .mceSplitButton td a.mceOpen, + .wp_themeSkin .mceSplitButtonEnabled:hover td a.mceOpen { + padding-top: 6px; + padding-bottom: 6px; + background-position: 1px 6px; + } + + .wp_themeSkin table.mceListBox { + margin: 5px; + } + + div.quicktags-toolbar input { + padding: 10px 20px; + } + + #wp-content-editor-tools { + overflow: hidden; + padding: 20px 15px 1px 0; + top: 1px; + } + + a.wp-switch-editor { + font-size: 16px; + line-height: 1em; + margin: 3px 0 0 7px; + padding: 12px 15px; + } + + #wp-content-media-buttons a { + font-size: 16px; + line-height: 37px; + height: 39px; + padding: 0 20px 0 15px; + } + + .wp-media-buttons span.wp-media-buttons-icon, + .wp-media-buttons span.jetpack-contact-form-icon { + width: 22px !important; + margin-top: -3px !important; + margin-left: -5px !important; + } + + .wp-media-buttons .add_media span.wp-media-buttons-icon:before, + .wp-media-buttons #insert-jetpack-contact-form span.jetpack-contact-form-icon:before { + font-size: 20px !important; + } + + #content_wp_fullscreen { + display: none; + } + + .misc-pub-section { + padding: 20px 10px 20px; + } + + .misc-pub-section > a { + float: right; + font-size: 16px; + } + + #delete-action, + #publishing-action { + line-height: 47px; + } + + /* Moderate Comment */ + .comment-ays { + border-bottom: none; + } + + /* Links */ + .links-table #link_rel { + max-width: none; + } + + .links-table th, + .links-table td { + padding: 10px 0; + } +} + +@media only screen and (max-width: 500px) { + /* Align Add Media + Visual + Text tabs */ + #wp-content-media-buttons a { + font-size: 14px; + padding: 0 10px 0 10px; + } +} diff --git a/wp-admin/css/farbtastic-rtl.css b/wp-admin/css/farbtastic-rtl.css new file mode 100644 index 0000000..b7aebad --- /dev/null +++ b/wp-admin/css/farbtastic-rtl.css @@ -0,0 +1,41 @@ + +.farbtastic { + position: relative; +} + +.farbtastic * { + position: absolute; + cursor: crosshair; +} + +.farbtastic, +.farbtastic .wheel { + width: 195px; + height: 195px; +} + +.farbtastic .color, +.farbtastic .overlay { + top: 47px; + right: 47px; + width: 101px; + height: 101px; +} + +.farbtastic .wheel { + background: url(../images/wheel.png) no-repeat; + width: 195px; + height: 195px; +} + +.farbtastic .overlay { + background: url(../images/mask.png) no-repeat; +} + +.farbtastic .marker { + width: 17px; + height: 17px; + margin: -8px -8px 0 0; + overflow: hidden; + background: url(../images/marker.png) no-repeat; +} diff --git a/wp-admin/css/farbtastic.css b/wp-admin/css/farbtastic.css new file mode 100644 index 0000000..2bb73bf --- /dev/null +++ b/wp-admin/css/farbtastic.css @@ -0,0 +1,41 @@ + +.farbtastic { + position: relative; +} + +.farbtastic * { + position: absolute; + cursor: crosshair; +} + +.farbtastic, +.farbtastic .wheel { + width: 195px; + height: 195px; +} + +.farbtastic .color, +.farbtastic .overlay { + top: 47px; + left: 47px; + width: 101px; + height: 101px; +} + +.farbtastic .wheel { + background: url(../images/wheel.png) no-repeat; + width: 195px; + height: 195px; +} + +.farbtastic .overlay { + background: url(../images/mask.png) no-repeat; +} + +.farbtastic .marker { + width: 17px; + height: 17px; + margin: -8px 0 0 -8px; + overflow: hidden; + background: url(../images/marker.png) no-repeat; +} diff --git a/wp-admin/css/forms-rtl.css b/wp-admin/css/forms-rtl.css new file mode 100644 index 0000000..9014537 --- /dev/null +++ b/wp-admin/css/forms-rtl.css @@ -0,0 +1,977 @@ +/* include margin and padding in the width calculation of input and textarea */ +input, +input[type="text"], +input[type="password"], +input[type="number"], +input[type="search"], +input[type="email"], +input[type="url"], +textarea { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +/* @noflip */ +input[type="email"], +input[type="url"] { + direction: ltr; +} + +input[type="checkbox"], +input[type="radio"] { + border: 1px solid #bbb; + background: #fff; + color: #555; + clear: none; + cursor: pointer; + display: inline-block; + line-height: 0; + height: 16px; + margin: -4px 0 0 4px; + outline: 0; + padding: 0 !important; + text-align: center; + vertical-align: middle; + width: 16px; + min-width: 16px; + -webkit-appearance: none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); + box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); + -webkit-transition: .05s border-color ease-in-out; + transition: .05s border-color ease-in-out; +} + +input[type="radio"]:checked + label:before { + color: #888; +} + +.wp-core-ui input[type="reset"]:hover, +.wp-core-ui input[type="reset"]:active { + color: #2ea2cc; +} + +td > input[type="checkbox"], +.wp-admin p input[type=checkbox], +.wp-admin p input[type=radio] { + margin-top: 0; +} + +.wp-admin p label input[type=checkbox] { + margin-top: -4px; +} + +.wp-admin p label input[type=radio] { + margin-top: -2px; +} + +input[type=radio] { + -webkit-border-radius: 50%; + border-radius: 50%; + margin-left: 4px; + line-height: 10px; +} + +input[type=checkbox]:checked:before, +input[type=radio]:checked:before { + float: right; + display: inline-block; + vertical-align: middle; + width: 16px; + font: normal 21px/1 'dashicons'; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +input[type=checkbox]:checked:before { + content: '\f147'; + margin: -3px -4px 0 0; + color: #1e8cbe; +} + +input[type=radio]:checked:before { + content: '\2022'; + text-indent: -9999px; + -webkit-border-radius: 50px; + border-radius: 50px; + font-size: 24px; + width: 6px; + height: 6px; + margin: 4px; + line-height: 16px; + background-color: #1e8cbe; +} + +input.readonly, textarea.readonly { + background-color: #ddd; +} + +@-moz-document url-prefix() { + input[type=checkbox], + input[type=radio], + .form-table input.tog { + margin-bottom: -1px; + } +} + +/* Search */ +input[type="search"] { + -webkit-appearance: textfield; +} + +input[type="search"]::-webkit-search-decoration { + display: none; +} + +.ie8 input[type="password"] { + font-family: sans-serif; +} + +textarea, +input, +select, +button { + font-family: inherit; + font-size: inherit; + font-weight: inherit; +} + +textarea, +input, +select { + font-size: 14px; + padding: 3px 5px; + line-height: 15px; + -webkit-border-radius: 0; + border-radius: 0; /* Reset mobile webkit's default element styling */ +} + +textarea { + overflow: auto; + padding: 2px 6px; + line-height: 1.4; +} + +input[type="text"], +input[type="password"], +input[type="number"], +input[type="search"], +input[type="email"], +input[type="url"], +textarea, +select { + outline: 0; +} + +.wp-admin input[type="file"] { + padding: 3px 0; +} + +label { + cursor: pointer; +} + +input, +select { + margin: 1px; + padding: 3px 5px; +} + +input.code { + padding-top: 6px; +} + +textarea.code { + line-height: 1.4; + padding: 4px 6px 1px 6px; +} + +textarea, +input[type="text"], +input[type="password"], +input[type="email"], +input[type="number"], +input[type="search"], +input[type="tel"], +input[type="url"], +select { + border: 1px solid #ddd; + -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.07); + box-shadow: inset 0 1px 2px rgba(0,0,0,0.07); + background-color: #fff; + color: #333; + -webkit-transition: .05s border-color ease-in-out; + transition: .05s border-color ease-in-out; +} + +select[disabled] { + color: #7f7f7f; +} + +textarea:focus, +input[type="text"]:focus, +input[type="password"]:focus, +input[type="email"]:focus, +input[type="number"]:focus, +input[type="search"]:focus, +input[type="tel"]:focus, +input[type="url"]:focus, +input[type="checkbox"]:focus, +input[type="radio"]:focus, +select:focus { + border-color: #5b9dd9; + -webkit-box-shadow: 0 0 2px rgba(30,140,190,0.8); + box-shadow: 0 0 2px rgba(30,140,190,0.8); +} + +input[readonly] { + background-color: #eee; +} + +:-moz-placeholder, +.wp-core-ui :-moz-placeholder { + color: #a9a9a9; +} + +.form-invalid { + background-color: #ffebe8 !important; +} + +.form-invalid input, +.form-invalid select { + border-color: #c00 !important; +} + +.form-input-tip { + color: #666; +} + +input:disabled, +input.disabled, +textarea:disabled, +textarea.disabled { + -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.04); + box-shadow: inset 0 1px 2px rgba(0,0,0,0.04); + border-color: rgba(222, 222, 222, .75); + background: rgba(255, 255, 255, .5); + color: rgba(51, 51, 51, .5); +} + +input[type=checkbox]:disabled, +input[type=radio]:disabled, +input[type=checkbox]:disabled:checked:before, +input[type=radio]:disabled:checked:before { + opacity: 0.7; +} + +/*------------------------------------------------------------------------------ + 2.0 - Forms +------------------------------------------------------------------------------*/ + + +.wp-admin select { + padding: 2px; + line-height: 28px; + height: 28px; + vertical-align: middle; +} + +.wp-admin .button-cancel { + padding: 0 5px; + line-height: 2; +} + +.meta-box-sortables select { + max-width: 100%; +} + +.wp-admin select[multiple] { + height: auto; +} + +.submit { + padding: 1.5em 0; + margin: 5px 0; + -webkit-border-bottom-right-radius: 3px; + border-bottom-right-radius: 3px; + -webkit-border-bottom-left-radius: 3px; + border-bottom-left-radius: 3px; + border: none; +} + +form p.submit a.cancel:hover { + text-decoration: none; +} + +p.submit { + text-align: right; + max-width: 100%; + margin-top: 20px; + padding-top: 10px; +} + +.textright p.submit { + border: none; + text-align: left; +} + +table.form-table + p.submit, +table.form-table + input + p.submit, +table.form-table + input + input + p.submit { + border-top: none; + padding-top: 0; +} + +#minor-publishing-actions input, +#major-publishing-actions input, +#minor-publishing-actions .preview { + 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; + padding: 1px 6px; +} + +input[type="number"].small-text { + width: 65px; +} + +#doaction, +#doaction2, +#post-query-submit { + margin: 1px 0 0 8px; +} + +.tablenav #changeit, +.tablenav #delete_all, +.tablenav #clear-recent-list { + margin-top: 1px; +} + +.tablenav .actions select { + float: right; + margin-left: 6px; + max-width: 200px; +} + +.ie8 .tablenav .actions select { + width: 155px; +} + +.ie8 .tablenav .actions select#cat { + width: 200px; +} + +#timezone_string option { + margin-right: 1em; +} + +#upload-form label { + color: #777; +} + +label, +#your-profile label + a { + vertical-align: middle; +} + +fieldset label, +#your-profile label + a { + vertical-align: middle; +} + +.options-media-php label[for*="_size_"], +#misc-publishing-actions label { + vertical-align: baseline; +} + +#misc-publishing-actions label[for="post_status"]:before { + content: '\f173'; + display: inline-block; + font: normal 20px/1 'dashicons'; + speak: none; + right: -1px; + padding: 0 0 0 5px; + position: relative; + top: 0; + text-decoration: none !important; + vertical-align: top; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +#pass-strength-result { + background-color: #eee; + border: 1px solid #ddd; + float: right; + margin: 13px 1px 5px 5px; + padding: 3px 5px; + text-align: center; + width: 200px; + display: none; +} + +#pass-strength-result.short { + background-color: #ffa0a0; + border-color: #f04040; +} + +#pass-strength-result.bad { + background-color: #ffb78c; + border-color: #ff853c; +} + +#pass-strength-result.good { + background-color: #ffec8b; + border-color: #fc0; +} + +#pass-strength-result.strong { + background-color: #c3ff88; + border-color: #8dff1c; +} + +.indicator-hint { + padding-top: 8px; +} + +p.search-box { + float: left; + margin: 0; +} + +.network-admin.themes-php p.search-box { + clear: right; +} + +.search-box input[name="s"], +#search-plugins input[name="s"], +.tagsdiv .newtag { + float: right; + height: 28px; + margin: 0 0 0 4px; +} + +input[type="text"].ui-autocomplete-loading { + background: transparent url(../images/loading.gif) no-repeat left center; + visibility: visible; +} + +ul#add-to-blog-users { + margin: 0 14px 0 0; +} + +.ui-autocomplete-input.open { + -webkit-border-bottom-left-radius: 0; + border-bottom-left-radius: 0; + -webkit-border-bottom-right-radius: 0; + border-bottom-right-radius: 0; +} + +.ui-autocomplete { + padding: 0; + margin: 0; + list-style: none; + position: absolute; + z-index: 10000; + -webkit-border-bottom-left-radius: 3px; + border-bottom-left-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + border-bottom-right-radius: 3px; + border: 1px solid #aaa; + background-color: #efefef; +} + +.ui-autocomplete li { + margin-bottom: 0; + white-space: nowrap; + text-align: right; +} + +.ui-autocomplete li a { + display: block; + height: 100%; + padding: 4px 10px; + color: #444; +} + +.ui-autocomplete li a.ui-state-focus { + background-color: #ddd; + cursor: pointer; +} + +/*------------------------------------------------------------------------------ + 15.0 - Comments Screen +------------------------------------------------------------------------------*/ + +.form-table { + border-collapse: collapse; + margin-top: 0.5em; + width: 100%; + clear: both; +} + +.form-table, +.form-table td, +.form-table th, +.form-table td p, +.form-wrap label { + font-size: 14px; +} + +.form-table td { + margin-bottom: 9px; + padding: 15px 10px; + line-height: 1.3; + vertical-align: middle; +} + +.form-table th, +.form-wrap label { + color: #222; + font-weight: normal; + text-shadow: none; + vertical-align: baseline; +} + +.form-table th { + vertical-align: top; + text-align: right; + padding: 20px 0 20px 10px; + width: 200px; + line-height: 1.3; + font-weight: 600; +} + +.form-table th.th-full { + width: auto; + font-weight: 400; +} + +.form-table td p { + margin-top: 4px; + margin-bottom: 0; +} + +.form-table td fieldset label { + margin: 0.25em 0 0.5em !important; + display: inline-block; +} + +.form-table td fieldset label, +.form-table td fieldset p, +.form-table td fieldset li { + line-height: 1.4em; +} + +.form-table input.tog, +.form-table input[type=radio] { + margin-top: -4px; + margin-left: 4px; + float: none; +} + +.form-table .pre { + padding: 8px; + margin: 0; +} + +table.form-table td .updated { + font-size: 13px; +} + +/*------------------------------------------------------------------------------ + 18.0 - Users +------------------------------------------------------------------------------*/ + +#profile-page .form-table textarea { + width: 500px; + margin-bottom: 6px; +} + +#profile-page .form-table #rich_editing { + margin-left: 5px +} + +#your-profile legend { + font-size: 22px; +} + +#display_name { + width: 15em; +} + +#createuser .form-field input { + width: 25em; +} + +.color-option { + display: inline-block; + width: 24%; + padding: 5px 15px 15px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + margin-bottom: 3px; +} + +.color-option:hover, +.color-option.selected { + background: #ddd; +} + +.color-palette { + width: 100%; + border-spacing: 0; + border-collapse: collapse; +} +.color-palette td { + height: 20px; + padding: 0; + border: none; +} + +.color-option { + cursor: pointer; +} + +/*------------------------------------------------------------------------------ + 19.0 - Tools +------------------------------------------------------------------------------*/ + +.tool-box .title { + margin: 8px 0; + font-size: 18px; + font-weight: normal; + line-height: 24px; +} + +.pressthis { + margin: 20px 0; +} + +.pressthis a, +.pressthis a:hover, +.pressthis a:focus, +.pressthis a:active { + display: inline-block; + position: relative; + cursor: move; + color: #333; + background: #e6e6e6; + -webkit-border-radius: 5px; + border-radius: 5px; + border: 1px solid #b4b4b4; + font-style: normal; + line-height: 16px; + font-size: 14px; + text-decoration: none; +} + +.pressthis a:active { + outline: none; +} + +.pressthis a:hover:after { + -webkit-transform: skew(20deg) rotate(9deg); + -ms-transform: skew(20deg) rotate(9deg); + transform: skew(20deg) rotate(9deg); + -webkit-box-shadow: 0 10px 8px rgba(0, 0, 0, 0.7); + box-shadow: 0 10px 8px rgba(0, 0, 0, 0.7); +} + +.pressthis a span { + display: inline-block; + margin: 0px 0 0; + padding: 0px 9px 8px 12px; +} + +.pressthis a span:before { + color: #777; + font: normal 20px/1 'dashicons'; + content:'\f157'; + position: relative; + display: inline-block; + top: 4px; + margin-left: 4px; +} + +.pressthis a:after { + content: ''; + width: 70%; + height: 55%; + z-index: -1; + position: absolute; + left: 10px; + bottom: 9px; + background: transparent; + -webkit-transform: skew(20deg) rotate(6deg); + -ms-transform: skew(20deg) rotate(6deg); + transform: skew(20deg) rotate(6deg); + -webkit-box-shadow: 0 10px 8px rgba(0, 0, 0, 0.6); + box-shadow: 0 10px 8px rgba(0, 0, 0, 0.6); +} + +/*------------------------------------------------------------------------------ + 20.0 - Settings +------------------------------------------------------------------------------*/ + +#utc-time, #local-time { + padding-right: 25px; + font-style: italic; +} + +.defaultavatarpicker .avatar { + margin: 2px 0; + vertical-align: middle; +} + +.options-general-php .spinner { + float: none; + margin: -3px 3px; +} + +/* =Media Queries +-------------------------------------------------------------- */ + +@media screen and ( max-width: 782px ) { + /* Input Elements */ + textarea { + -webkit-appearance: none; + } + + input[type=text], input[type=search], + input[type=password], input[type=number] { + -webkit-appearance: none; + padding: 6px 10px; + } + + input.code { + padding-bottom: 5px; + padding-top: 10px; + } + + input[type=checkbox], .widefat th input[type=checkbox] { + -webkit-appearance: none; + padding: 10px; + } + + .widefat th input[type=checkbox] { + margin-bottom: 8px; + } + + input[type=checkbox]:checked:before, .widefat th input[type=checkbox]:before { + font: normal 30px/1 'Dashicons'; + margin: -3px -5px; + } + + input[type=radio], + input[type=checkbox] { + height: 25px; + width: 25px; + } + + .wp-admin p input[type=checkbox], + .wp-admin p input[type=radio] { + margin-top: -3px; + } + + input[type=radio]:checked:before { + vertical-align: middle; + width: 9px; + height: 9px; + margin: 7px; + line-height: 16px; + } + + .wp-upload-form input[type=submit] { + margin-top: 10px; + } + + #wpbody select { + height: 36px; + font-size: 16px; + } + + .wp-admin .button-cancel { + padding: 0; + font-size: 14px; + } + + #createuser .form-field input { + width: 100%; + } + + .form-table { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + + .form-table th, + .form-table td { + display: block; + width: auto; + vertical-align: middle; + } + + .form-table .color-palette td { + display: table-cell; + width: 15px; + } + + .form-table table.color-palette { + margin-left: 10px; + } + + textarea, + input { + font-size: 16px; + } + + .form-table td input[type="text"], + .form-table td input[type="password"], + .form-table td select, + .form-table td textarea, + .form-table span.description, + #profile-page .form-table textarea { + width: 100%; + font-size: 16px; + line-height: 1.5; + padding: 7px 10px; + display: block; + max-width: none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + + input[type=text].small-text, + input[type=search].small-text, + input[type=password].small-text, + input[type=number].small-text, + input[type="number"].small-text, + .form-table input[type=text].small-text { + width: auto; + max-width: 55px; + display: inline; + padding: 3px 6px; + margin: 0 3px; + } + + #pass-strength-result { + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + padding: 8px; + } + + p.search-box { + float: none; + position: absolute; + bottom: 0; + width: 98%; + height: 90px; + margin-bottom: 20px; + } + + p.search-box input[name="s"] { + height: auto; + float: none; + width: 100%; + margin-bottom: 10px; + vertical-align: middle; + -webkit-appearance: none; + } + + p.search-box input[type="submit"] { + margin-bottom: 10px; + } + + .form-table span.description { + padding: 4px 0 0; + line-height: 1.4em; + } + + .form-table th { + padding-top: 10px; + padding-bottom: 0; + border-bottom: 0; + } + + .form-table td { + padding-top: 8px; + padding-right: 0; + } + + .form-table input.regular-text { + width: 100%; + } + + .form-table label { + font-size: 14px; + } + + .form-table fieldset label { + display: block; + } + + #utc-time { + margin-top: 10px; + } + + #utc-time, + #local-time { + display: block; + float: none; + padding: 0; + line-height: 2; + } +} + +@media only screen and (max-width: 768px) { + .form-field input, + .form-field textarea { + width: 99%; + } + + .form-wrap .form-field { + padding:0; + } + + /* users */ + #profile-page .form-table textarea { + max-width: 400px; + width: auto; + } +} + +/* Smartphone */ +@media screen and (max-width: 600px) { + /* Color Picker Options */ + .color-option { + width: 49%; + } +} + diff --git a/wp-admin/css/forms.css b/wp-admin/css/forms.css new file mode 100644 index 0000000..14cfe85 --- /dev/null +++ b/wp-admin/css/forms.css @@ -0,0 +1,977 @@ +/* include margin and padding in the width calculation of input and textarea */ +input, +input[type="text"], +input[type="password"], +input[type="number"], +input[type="search"], +input[type="email"], +input[type="url"], +textarea { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +/* @noflip */ +input[type="email"], +input[type="url"] { + direction: ltr; +} + +input[type="checkbox"], +input[type="radio"] { + border: 1px solid #bbb; + background: #fff; + color: #555; + clear: none; + cursor: pointer; + display: inline-block; + line-height: 0; + height: 16px; + margin: -4px 4px 0 0; + outline: 0; + padding: 0 !important; + text-align: center; + vertical-align: middle; + width: 16px; + min-width: 16px; + -webkit-appearance: none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); + box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); + -webkit-transition: .05s border-color ease-in-out; + transition: .05s border-color ease-in-out; +} + +input[type="radio"]:checked + label:before { + color: #888; +} + +.wp-core-ui input[type="reset"]:hover, +.wp-core-ui input[type="reset"]:active { + color: #2ea2cc; +} + +td > input[type="checkbox"], +.wp-admin p input[type=checkbox], +.wp-admin p input[type=radio] { + margin-top: 0; +} + +.wp-admin p label input[type=checkbox] { + margin-top: -4px; +} + +.wp-admin p label input[type=radio] { + margin-top: -2px; +} + +input[type=radio] { + -webkit-border-radius: 50%; + border-radius: 50%; + margin-right: 4px; + line-height: 10px; +} + +input[type=checkbox]:checked:before, +input[type=radio]:checked:before { + float: left; + display: inline-block; + vertical-align: middle; + width: 16px; + font: normal 21px/1 'dashicons'; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +input[type=checkbox]:checked:before { + content: '\f147'; + margin: -3px 0 0 -4px; + color: #1e8cbe; +} + +input[type=radio]:checked:before { + content: '\2022'; + text-indent: -9999px; + -webkit-border-radius: 50px; + border-radius: 50px; + font-size: 24px; + width: 6px; + height: 6px; + margin: 4px; + line-height: 16px; + background-color: #1e8cbe; +} + +input.readonly, textarea.readonly { + background-color: #ddd; +} + +@-moz-document url-prefix() { + input[type=checkbox], + input[type=radio], + .form-table input.tog { + margin-bottom: -1px; + } +} + +/* Search */ +input[type="search"] { + -webkit-appearance: textfield; +} + +input[type="search"]::-webkit-search-decoration { + display: none; +} + +.ie8 input[type="password"] { + font-family: sans-serif; +} + +textarea, +input, +select, +button { + font-family: inherit; + font-size: inherit; + font-weight: inherit; +} + +textarea, +input, +select { + font-size: 14px; + padding: 3px 5px; + line-height: 15px; + -webkit-border-radius: 0; + border-radius: 0; /* Reset mobile webkit's default element styling */ +} + +textarea { + overflow: auto; + padding: 2px 6px; + line-height: 1.4; +} + +input[type="text"], +input[type="password"], +input[type="number"], +input[type="search"], +input[type="email"], +input[type="url"], +textarea, +select { + outline: 0; +} + +.wp-admin input[type="file"] { + padding: 3px 0; +} + +label { + cursor: pointer; +} + +input, +select { + margin: 1px; + padding: 3px 5px; +} + +input.code { + padding-top: 6px; +} + +textarea.code { + line-height: 1.4; + padding: 4px 6px 1px 6px; +} + +textarea, +input[type="text"], +input[type="password"], +input[type="email"], +input[type="number"], +input[type="search"], +input[type="tel"], +input[type="url"], +select { + border: 1px solid #ddd; + -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.07); + box-shadow: inset 0 1px 2px rgba(0,0,0,0.07); + background-color: #fff; + color: #333; + -webkit-transition: .05s border-color ease-in-out; + transition: .05s border-color ease-in-out; +} + +select[disabled] { + color: #7f7f7f; +} + +textarea:focus, +input[type="text"]:focus, +input[type="password"]:focus, +input[type="email"]:focus, +input[type="number"]:focus, +input[type="search"]:focus, +input[type="tel"]:focus, +input[type="url"]:focus, +input[type="checkbox"]:focus, +input[type="radio"]:focus, +select:focus { + border-color: #5b9dd9; + -webkit-box-shadow: 0 0 2px rgba(30,140,190,0.8); + box-shadow: 0 0 2px rgba(30,140,190,0.8); +} + +input[readonly] { + background-color: #eee; +} + +:-moz-placeholder, +.wp-core-ui :-moz-placeholder { + color: #a9a9a9; +} + +.form-invalid { + background-color: #ffebe8 !important; +} + +.form-invalid input, +.form-invalid select { + border-color: #c00 !important; +} + +.form-input-tip { + color: #666; +} + +input:disabled, +input.disabled, +textarea:disabled, +textarea.disabled { + -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.04); + box-shadow: inset 0 1px 2px rgba(0,0,0,0.04); + border-color: rgba(222, 222, 222, .75); + background: rgba(255, 255, 255, .5); + color: rgba(51, 51, 51, .5); +} + +input[type=checkbox]:disabled, +input[type=radio]:disabled, +input[type=checkbox]:disabled:checked:before, +input[type=radio]:disabled:checked:before { + opacity: 0.7; +} + +/*------------------------------------------------------------------------------ + 2.0 - Forms +------------------------------------------------------------------------------*/ + + +.wp-admin select { + padding: 2px; + line-height: 28px; + height: 28px; + vertical-align: middle; +} + +.wp-admin .button-cancel { + padding: 0 5px; + line-height: 2; +} + +.meta-box-sortables select { + max-width: 100%; +} + +.wp-admin select[multiple] { + height: auto; +} + +.submit { + padding: 1.5em 0; + margin: 5px 0; + -webkit-border-bottom-left-radius: 3px; + border-bottom-left-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + border-bottom-right-radius: 3px; + border: none; +} + +form p.submit a.cancel:hover { + text-decoration: none; +} + +p.submit { + text-align: left; + max-width: 100%; + margin-top: 20px; + padding-top: 10px; +} + +.textright p.submit { + border: none; + text-align: right; +} + +table.form-table + p.submit, +table.form-table + input + p.submit, +table.form-table + input + input + p.submit { + border-top: none; + padding-top: 0; +} + +#minor-publishing-actions input, +#major-publishing-actions input, +#minor-publishing-actions .preview { + 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; + padding: 1px 6px; +} + +input[type="number"].small-text { + width: 65px; +} + +#doaction, +#doaction2, +#post-query-submit { + margin: 1px 8px 0 0; +} + +.tablenav #changeit, +.tablenav #delete_all, +.tablenav #clear-recent-list { + margin-top: 1px; +} + +.tablenav .actions select { + float: left; + margin-right: 6px; + max-width: 200px; +} + +.ie8 .tablenav .actions select { + width: 155px; +} + +.ie8 .tablenav .actions select#cat { + width: 200px; +} + +#timezone_string option { + margin-left: 1em; +} + +#upload-form label { + color: #777; +} + +label, +#your-profile label + a { + vertical-align: middle; +} + +fieldset label, +#your-profile label + a { + vertical-align: middle; +} + +.options-media-php label[for*="_size_"], +#misc-publishing-actions label { + vertical-align: baseline; +} + +#misc-publishing-actions label[for="post_status"]:before { + content: '\f173'; + display: inline-block; + font: normal 20px/1 'dashicons'; + speak: none; + left: -1px; + padding: 0 5px 0 0; + position: relative; + top: 0; + text-decoration: none !important; + vertical-align: top; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +#pass-strength-result { + background-color: #eee; + border: 1px solid #ddd; + float: left; + margin: 13px 5px 5px 1px; + padding: 3px 5px; + text-align: center; + width: 200px; + display: none; +} + +#pass-strength-result.short { + background-color: #ffa0a0; + border-color: #f04040; +} + +#pass-strength-result.bad { + background-color: #ffb78c; + border-color: #ff853c; +} + +#pass-strength-result.good { + background-color: #ffec8b; + border-color: #fc0; +} + +#pass-strength-result.strong { + background-color: #c3ff88; + border-color: #8dff1c; +} + +.indicator-hint { + padding-top: 8px; +} + +p.search-box { + float: right; + margin: 0; +} + +.network-admin.themes-php p.search-box { + clear: left; +} + +.search-box input[name="s"], +#search-plugins input[name="s"], +.tagsdiv .newtag { + float: left; + height: 28px; + margin: 0 4px 0 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 { + -webkit-border-bottom-right-radius: 0; + border-bottom-right-radius: 0; + -webkit-border-bottom-left-radius: 0; + border-bottom-left-radius: 0; +} + +.ui-autocomplete { + padding: 0; + margin: 0; + list-style: none; + position: absolute; + z-index: 10000; + -webkit-border-bottom-right-radius: 3px; + border-bottom-right-radius: 3px; + -webkit-border-bottom-left-radius: 3px; + border-bottom-left-radius: 3px; + border: 1px solid #aaa; + background-color: #efefef; +} + +.ui-autocomplete li { + margin-bottom: 0; + white-space: nowrap; + text-align: left; +} + +.ui-autocomplete li a { + display: block; + height: 100%; + padding: 4px 10px; + color: #444; +} + +.ui-autocomplete li a.ui-state-focus { + background-color: #ddd; + cursor: pointer; +} + +/*------------------------------------------------------------------------------ + 15.0 - Comments Screen +------------------------------------------------------------------------------*/ + +.form-table { + border-collapse: collapse; + margin-top: 0.5em; + width: 100%; + clear: both; +} + +.form-table, +.form-table td, +.form-table th, +.form-table td p, +.form-wrap label { + font-size: 14px; +} + +.form-table td { + margin-bottom: 9px; + padding: 15px 10px; + line-height: 1.3; + vertical-align: middle; +} + +.form-table th, +.form-wrap label { + color: #222; + font-weight: normal; + text-shadow: none; + vertical-align: baseline; +} + +.form-table th { + vertical-align: top; + text-align: left; + padding: 20px 10px 20px 0; + width: 200px; + line-height: 1.3; + font-weight: 600; +} + +.form-table th.th-full { + width: auto; + font-weight: 400; +} + +.form-table td p { + margin-top: 4px; + margin-bottom: 0; +} + +.form-table td fieldset label { + margin: 0.25em 0 0.5em !important; + display: inline-block; +} + +.form-table td fieldset label, +.form-table td fieldset p, +.form-table td fieldset li { + line-height: 1.4em; +} + +.form-table input.tog, +.form-table input[type=radio] { + margin-top: -4px; + margin-right: 4px; + float: none; +} + +.form-table .pre { + padding: 8px; + margin: 0; +} + +table.form-table td .updated { + font-size: 13px; +} + +/*------------------------------------------------------------------------------ + 18.0 - Users +------------------------------------------------------------------------------*/ + +#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; +} + +#display_name { + width: 15em; +} + +#createuser .form-field input { + width: 25em; +} + +.color-option { + display: inline-block; + width: 24%; + padding: 5px 15px 15px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + margin-bottom: 3px; +} + +.color-option:hover, +.color-option.selected { + background: #ddd; +} + +.color-palette { + width: 100%; + border-spacing: 0; + border-collapse: collapse; +} +.color-palette td { + height: 20px; + padding: 0; + border: none; +} + +.color-option { + cursor: pointer; +} + +/*------------------------------------------------------------------------------ + 19.0 - Tools +------------------------------------------------------------------------------*/ + +.tool-box .title { + margin: 8px 0; + font-size: 18px; + font-weight: normal; + line-height: 24px; +} + +.pressthis { + margin: 20px 0; +} + +.pressthis a, +.pressthis a:hover, +.pressthis a:focus, +.pressthis a:active { + display: inline-block; + position: relative; + cursor: move; + color: #333; + background: #e6e6e6; + -webkit-border-radius: 5px; + border-radius: 5px; + border: 1px solid #b4b4b4; + font-style: normal; + line-height: 16px; + font-size: 14px; + text-decoration: none; +} + +.pressthis a:active { + outline: none; +} + +.pressthis a:hover:after { + -webkit-transform: skew(20deg) rotate(9deg); + -ms-transform: skew(20deg) rotate(9deg); + transform: skew(20deg) rotate(9deg); + -webkit-box-shadow: 0 10px 8px rgba(0, 0, 0, 0.7); + box-shadow: 0 10px 8px rgba(0, 0, 0, 0.7); +} + +.pressthis a span { + display: inline-block; + margin: 0px 0 0; + padding: 0px 12px 8px 9px; +} + +.pressthis a span:before { + color: #777; + font: normal 20px/1 'dashicons'; + content:'\f157'; + position: relative; + display: inline-block; + top: 4px; + margin-right: 4px; +} + +.pressthis a:after { + content: ''; + width: 70%; + height: 55%; + z-index: -1; + position: absolute; + right: 10px; + bottom: 9px; + background: transparent; + -webkit-transform: skew(20deg) rotate(6deg); + -ms-transform: skew(20deg) rotate(6deg); + transform: skew(20deg) rotate(6deg); + -webkit-box-shadow: 0 10px 8px rgba(0, 0, 0, 0.6); + box-shadow: 0 10px 8px rgba(0, 0, 0, 0.6); +} + +/*------------------------------------------------------------------------------ + 20.0 - Settings +------------------------------------------------------------------------------*/ + +#utc-time, #local-time { + padding-left: 25px; + font-style: italic; +} + +.defaultavatarpicker .avatar { + margin: 2px 0; + vertical-align: middle; +} + +.options-general-php .spinner { + float: none; + margin: -3px 3px; +} + +/* =Media Queries +-------------------------------------------------------------- */ + +@media screen and ( max-width: 782px ) { + /* Input Elements */ + textarea { + -webkit-appearance: none; + } + + input[type=text], input[type=search], + input[type=password], input[type=number] { + -webkit-appearance: none; + padding: 6px 10px; + } + + input.code { + padding-bottom: 5px; + padding-top: 10px; + } + + input[type=checkbox], .widefat th input[type=checkbox] { + -webkit-appearance: none; + padding: 10px; + } + + .widefat th input[type=checkbox] { + margin-bottom: 8px; + } + + input[type=checkbox]:checked:before, .widefat th input[type=checkbox]:before { + font: normal 30px/1 'Dashicons'; + margin: -3px -5px; + } + + input[type=radio], + input[type=checkbox] { + height: 25px; + width: 25px; + } + + .wp-admin p input[type=checkbox], + .wp-admin p input[type=radio] { + margin-top: -3px; + } + + input[type=radio]:checked:before { + vertical-align: middle; + width: 9px; + height: 9px; + margin: 7px; + line-height: 16px; + } + + .wp-upload-form input[type=submit] { + margin-top: 10px; + } + + #wpbody select { + height: 36px; + font-size: 16px; + } + + .wp-admin .button-cancel { + padding: 0; + font-size: 14px; + } + + #createuser .form-field input { + width: 100%; + } + + .form-table { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + + .form-table th, + .form-table td { + display: block; + width: auto; + vertical-align: middle; + } + + .form-table .color-palette td { + display: table-cell; + width: 15px; + } + + .form-table table.color-palette { + margin-right: 10px; + } + + textarea, + input { + font-size: 16px; + } + + .form-table td input[type="text"], + .form-table td input[type="password"], + .form-table td select, + .form-table td textarea, + .form-table span.description, + #profile-page .form-table textarea { + width: 100%; + font-size: 16px; + line-height: 1.5; + padding: 7px 10px; + display: block; + max-width: none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + + input[type=text].small-text, + input[type=search].small-text, + input[type=password].small-text, + input[type=number].small-text, + input[type="number"].small-text, + .form-table input[type=text].small-text { + width: auto; + max-width: 55px; + display: inline; + padding: 3px 6px; + margin: 0 3px; + } + + #pass-strength-result { + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + padding: 8px; + } + + p.search-box { + float: none; + position: absolute; + bottom: 0; + width: 98%; + height: 90px; + margin-bottom: 20px; + } + + p.search-box input[name="s"] { + height: auto; + float: none; + width: 100%; + margin-bottom: 10px; + vertical-align: middle; + -webkit-appearance: none; + } + + p.search-box input[type="submit"] { + margin-bottom: 10px; + } + + .form-table span.description { + padding: 4px 0 0; + line-height: 1.4em; + } + + .form-table th { + padding-top: 10px; + padding-bottom: 0; + border-bottom: 0; + } + + .form-table td { + padding-top: 8px; + padding-left: 0; + } + + .form-table input.regular-text { + width: 100%; + } + + .form-table label { + font-size: 14px; + } + + .form-table fieldset label { + display: block; + } + + #utc-time { + margin-top: 10px; + } + + #utc-time, + #local-time { + display: block; + float: none; + padding: 0; + line-height: 2; + } +} + +@media only screen and (max-width: 768px) { + .form-field input, + .form-field textarea { + width: 99%; + } + + .form-wrap .form-field { + padding:0; + } + + /* users */ + #profile-page .form-table textarea { + max-width: 400px; + width: auto; + } +} + +/* Smartphone */ +@media screen and (max-width: 600px) { + /* Color Picker Options */ + .color-option { + width: 49%; + } +} + diff --git a/wp-admin/css/ie-rtl.css b/wp-admin/css/ie-rtl.css new file mode 100644 index 0000000..4783f2f --- /dev/null +++ b/wp-admin/css/ie-rtl.css @@ -0,0 +1,785 @@ +/* Fixes for IE 7 bugs */ + +#dashboard-widgets form .input-text-wrap input, +#dashboard-widgets form .textarea-wrap textarea { + width: 99%; +} + +#dashboard-widgets form #title { + width: 98%; +} + +#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: left; + width: 50.5%; +} + +#dashboard-widgets #postbox-container-3 .empty-container, +#dashboard-widgets #postbox-container-4 .empty-container { + border: 0 none; + height: 0; + min-height: 0; +} + +.wp-editor-wrap .wp-editor-tools, +.wp-editor-wrap .wp-switch-editor, +.wp-editor-wrap .wp-editor-tabs, +.wp-editor-wrap .wp-editor-container { + zoom: 100%; +} + +.wp-editor-wrap .wp-editor-container textarea.wp-editor-area { + width: 97%; +} + +#post-body.columns-2 #postbox-container-1 { + padding-right: 19px; +} + +.welcome-panel .wp-badge { + position: absolute; +} + +.welcome-panel .welcome-panel-column:first-child { + width: 35%; +} + +.wp-fullscreen-title { + width: 97%; +} + +#wp_mce_fullscreen_ifr { + background-color: #f9f9f9; +} + +#wp-fullscreen-tagline { + color: #888; + font-size: 14px; +} + +#adminmenuback { + right: 0; + background-image: none; +} + +#adminmenuwrap { + position: static; +} + +#adminmenu { + position: relative; +} + +#adminmenu, +#adminmenu a { + cursor: pointer; +} + +#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 { + right: 110px; +} + +#adminmenu .wp-submenu ul { + margin: 0; +} + +.folded #wpcontent, +.folded #wpfooter { + margin-right: 170px; +} + +.folded #adminmenuback, +.folded #adminmenuwrap, +.folded #adminmenu, +.folded #adminmenu li.menu-top { + width: 150px; +} + +.folded #adminmenu .wp-submenu { + border-top-color: transparent; +} + +.folded #adminmenu .wp-menu-name { + display: block; +} + +.folded #adminmenu .wp-submenu.sub-open, +.folded #adminmenu .opensub .wp-submenu { + right: 110px; +} + +.folded #adminmenu a.wp-has-current-submenu:focus + .wp-submenu, +.folded #adminmenu .wp-has-current-submenu .wp-submenu { + top: -1px; + position: relative; +} + +.folded #adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head { + background-color: transparent; +} + +#adminmenu .wp-submenu .wp-submenu-head { + border-top-color: #ddd; +} + +.folded #adminmenu .wp-submenu ul { + margin-right: 5px; +} + +#adminmenu li.menu-top { + margin-bottom: -2px; +} + +#adminmenu .wp-menu-arrow { + display: none !important; +} + +.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; +} + +#adminmenu li.wp-has-current-submenu .wp-submenu { + right: -40px; +} + +#adminmenu .wp-menu-image { + display: none !important; +} + +#adminmenu a.menu-top .wp-menu-name { + padding-right: 8px; +} + +#collapse-menu { + line-height: 23px; +} + +#wpadminbar .ab-comments-icon { + padding-top: 7px; +} + + +.theme-browser .theme { + width: 30%; + margin: 0 0 4% 3%; + cursor: auto; +} + +.theme-browser .theme:hover, +.theme-browser .theme:focus { + cursor: auto; +} + +.theme-browser .theme .theme-screenshot { + height: 180px; +} + +.theme-browser .theme .theme-actions { + position: static; + background-color: #e8e8e8; +} + +.theme-browser .theme .more-details { + display: none; +} + +.plugins td, +.plugins th { + border-top: 1px solid #ddd; +} + +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 { + overflow: visible; +} + +#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, +#template, +#template div, +#editcat, +#addcat { + zoom: 100%; +} + +.wp-menu-arrow { + height: 28px; +} + +.submitbox { + margin-top: 10px; +} + +/* Inline Editor */ +#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: right; + width: 5em; +} + +.inline-edit-row fieldset label span.input-text-wrap { + margin-right: 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; +} +/* end Inline Editor */ + +#titlediv #title { + width: 98%; +} + +.button, +input[type="reset"], +input[type="button"], +input[type="submit"] { + padding: 0 8px; + line-height: 20px; + height: auto; +} + +.button.button-large, +input[type="reset"].button-large, +input[type="button"].button-large, +input[type="submit"].button-large { + padding: 0 10px; + line-height: 24px; + height: auto; +} + +.button.button-small, +input[type="reset"].button-small, +input[type="button"].button-small, +input[type="submit"].button-small { + padding: 0 6px; + line-height: 16px; + height: auto; +} + +a.button { + margin: 1px; + padding: 1px 9px 2px; +} + +a.button.button-large { + padding: 1px 11px 2px; +} + +a.button.button-small { + padding: 1px 7px 2px; +} + +#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-control-actions, +.tagchecklist, +#col-container, +#col-left, +#col-right, +.fileedit-sub { + display: block; + zoom: 100%; +} + +p.search-box { + position: static; + float: left; + margin: -3px 0 4px; +} + +#widget-list .widget, +.feature-filter .feature-group li { + display: inline; +} + +.feature-filter .feature-group li input { + vertical-align: middle; +} + +#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; +} + +#poststuff .inside #parent_id, +#poststuff .inside #page_template, +.inline-edit-row #post_parent, +.inline-edit-row select[name="page_template"] { + width: 250px; +} + +#submitdiv input, +#submitdiv select, +#submitdiv a.button { + position: relative; +} + +#bh { + margin: 7px 0 0 10px; + float: left; +} + +/* without this dashboard widgets appear in one column for some screen widths */ +div#dashboard-widgets { + padding-left: 1px; +} + +.tagchecklist span, .tagchecklist span a { + display: inline-block; + display: block; +} + +.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; +} + +.subsubsub li { + display: inline; +} + +a.post-state-format { + text-indent: 0; + line-height: 0; + font-size: 0; +} + +table.ie-fixed { + table-layout: fixed; +} + +.widefat tr, +.widefat th { + margin-bottom: 0; + border-spacing: 0; +} + +.widefat th input { + margin: 0 5px 0 0; +} + +.widefat thead .check-column, +.widefat tfoot .check-column { + padding-top: 6px; +} + +.widefat tbody th.check-column, +.media.widefat tbody th.check-column { + padding: 4px 0 0; +} + +.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; +} + +.inactive-sidebar .widget { + display: block; + float: right; +} + +#wpcontent .button-primary-disabled { + color: #9FD0D5; + background: #298CBA; +} + +#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; +} + +.available-theme { + display: inline; +} + +.available-theme ul { + margin: 0; +} + +.available-theme .action-links li { + padding-left: 7px; + margin-left: 7px; +} + +.about-wrap .three-col.about-updates .col-2 { + width: 15%; +} + +.about-wrap .about-password-meter input { + width: 98%; +} + +.revisions-tickmarks, +.revisions-tooltip { + display: none !important; +} + +.revisions.pinned .revisions-controls { + position: relative; +} + +input[type="password"], +.login form .input { + font-family: sans-serif; +} + +/* TinyMCE icons */ +.mce-btn i.mce-i-bold, +.mce-btn i.mce-i-italic, +.mce-btn i.mce-i-bullist, +.mce-btn i.mce-i-numlist, +.mce-btn i.mce-i-blockquote, +.mce-btn i.mce-i-alignleft, +.mce-btn i.mce-i-aligncenter, +.mce-btn i.mce-i-alignright, +.mce-btn i.mce-i-link, +.mce-btn i.mce-i-unlink, +.mce-btn i.mce-i-wp_more, +.mce-btn i.mce-i-strikethrough, +.mce-btn i.mce-i-spellchecker, +.mce-btn i.mce-i-fullscreen, +.mce-btn i.mce-i-wp_fullscreen, +.mce-btn i.mce-i-wp_adv, +.mce-btn i.mce-i-underline, +.mce-btn i.mce-i-alignjustify, +.mce-btn i.mce-i-forecolor, +.mce-btn i.mce-i-pastetext, +.mce-btn i.mce-i-pasteword, +.mce-btn i.mce-i-removeformat, +.mce-btn i.mce-i-charmap, +.mce-btn i.mce-i-outdent, +.mce-btn i.mce-i-indent, +.mce-btn i.mce-i-undo, +.mce-btn i.mce-i-redo, +.mce-btn i.mce-i-help, +.mce-btn i.mce-i-wp_help, +.mce-btn i.mce-i-wp-media-library, +.mce-btn i.mce-i-ltr, +.mce-btn i.mce-i-wp_page, +.mce-btn i.mce-i-hr, +.mce-close { + font-family: 'tinymce', Arial; + font-style: normal; + font-weight: normal; + font-variant: normal; + font-size: 16px; + margin-right: 0; + padding-left: 0; +} + +.mce-btn i.mce-i-wp_fullscreen, +.qt-fullscreen { + -ie7-icon: '\e023'; +} + +.mce-btn i.mce-i-wp_more, +.mce-btn i.mce-i-wp_page { + -ie7-icon: '\e027'; +} + +.mce-btn i.mce-i-wp_adv { + background-color: #aaa; +} + +.mce-btn i.mce-i-help, +.mce-btn i.mce-i-wp_help { + -ie7-icon: '\e016'; +} + + +/* IE6 leftovers */ +* html .row-actions { + visibility: visible; +} + +* html div.widget-liquid-right, +* html div.widget-liquid-right { + display: block; + position: relative; +} + +* html #editorcontainer { + padding: 0; +} + +* html #poststuff h2 { + margin-right: 0; +} + +* html .stuffbox, +* html .stuffbox input, +* html .stuffbox textarea { + border: 1px solid #DFDFDF; +} + +* html .feature-filter .feature-group li { + width: 145px; +} + +* html div.widget-liquid-left { + width: 99%; +} + +* html .widgets-sortables { + height: 50px; +} + +* html a#content_resize { + left: -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 .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-right: -80px; +} + +* html .folded #adminmenu { + margin-right: -22px; +} + +* html #wpcontent #adminmenu li.menu-top { + display: inline; + padding: 0; + margin: 0; +} + +* html #wpfooter { + margin: 0; +} + +* html #adminmenu div.wp-menu-image { + height: 29px; +} diff --git a/wp-admin/css/ie-rtl.min.css b/wp-admin/css/ie-rtl.min.css new file mode 100644 index 0000000..f8c6f3b --- /dev/null +++ b/wp-admin/css/ie-rtl.min.css @@ -0,0 +1 @@ +#dashboard-widgets form .input-text-wrap input,#dashboard-widgets form .textarea-wrap textarea{width:99%}#dashboard-widgets form #title{width:98%}#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:left;width:50.5%}#dashboard-widgets #postbox-container-3 .empty-container,#dashboard-widgets #postbox-container-4 .empty-container{border:0 none;height:0;min-height:0}.wp-editor-wrap .wp-editor-container,.wp-editor-wrap .wp-editor-tabs,.wp-editor-wrap .wp-editor-tools,.wp-editor-wrap .wp-switch-editor{zoom:100%}.wp-editor-wrap .wp-editor-container textarea.wp-editor-area{width:97%}#post-body.columns-2 #postbox-container-1{padding-right:19px}.welcome-panel .wp-badge{position:absolute}.welcome-panel .welcome-panel-column:first-child{width:35%}.wp-fullscreen-title{width:97%}#wp_mce_fullscreen_ifr{background-color:#f9f9f9}#wp-fullscreen-tagline{color:#888;font-size:14px}#adminmenuback{right:0;background-image:none}#adminmenuwrap{position:static}#adminmenu{position:relative}#adminmenu,#adminmenu a{cursor:pointer}#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{right:110px}#adminmenu .wp-submenu ul{margin:0}.folded #wpcontent,.folded #wpfooter{margin-right:170px}.folded #adminmenu,.folded #adminmenu li.menu-top,.folded #adminmenuback,.folded #adminmenuwrap{width:150px}.folded #adminmenu .wp-submenu{border-top-color:transparent}.folded #adminmenu .wp-menu-name{display:block}.folded #adminmenu .opensub .wp-submenu,.folded #adminmenu .wp-submenu.sub-open{right:110px}.folded #adminmenu .wp-has-current-submenu .wp-submenu,.folded #adminmenu a.wp-has-current-submenu:focus+.wp-submenu{top:-1px;position:relative}.folded #adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head{background-color:transparent}#adminmenu .wp-submenu .wp-submenu-head{border-top-color:#ddd}.folded #adminmenu .wp-submenu ul{margin-right:5px}#adminmenu li.menu-top{margin-bottom:-2px}#adminmenu .wp-menu-arrow{display:none!important}.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}#adminmenu li.wp-has-current-submenu .wp-submenu{right:-40px}#adminmenu .wp-menu-image{display:none!important}#adminmenu a.menu-top .wp-menu-name{padding-right:8px}#collapse-menu{line-height:23px}#wpadminbar .ab-comments-icon{padding-top:7px}.theme-browser .theme{width:30%;margin:0 0 4% 3%;cursor:auto}.theme-browser .theme:focus,.theme-browser .theme:hover{cursor:auto}.theme-browser .theme .theme-screenshot{height:180px}.theme-browser .theme .theme-actions{position:static;background-color:#e8e8e8}.theme-browser .theme .more-details{display:none}.plugins td,.plugins th,table.fixed td,table.fixed th{border-top:1px solid #ddd}#wpbody-content input.button,#wpbody-content input.button-primary,#wpbody-content input.button-secondary{overflow:visible}#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}#addcat,#editcat,#template,#template div,.major-publishing-actions,.wp-submenu,.wp-submenu li{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:right;width:5em}.inline-edit-row fieldset label span.input-text-wrap{margin-right: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%}.button,input[type=button],input[type=reset],input[type=submit]{padding:0 8px;line-height:20px;height:auto}.button.button-large,input[type=button].button-large,input[type=reset].button-large,input[type=submit].button-large{padding:0 10px;line-height:24px;height:auto}.button.button-small,input[type=button].button-small,input[type=reset].button-small,input[type=submit].button-small{padding:0 6px;line-height:16px;height:auto}a.button{margin:1px;padding:1px 9px 2px}a.button.button-large{padding:1px 11px 2px}a.button.button-small{padding:1px 7px 2px}#screen-options-wrap{overflow:hidden}#col-container,#col-left,#col-right,#dragHelper,#editorcontainer,#post-body,#post-status-info,#postdiv,#postdivrich,#poststuff,#the-comment-list .comment-item,#titlediv,#widgets-left,#wpwrap,#wrap,.fileedit-sub,.metabox-holder,.tablenav,.tagchecklist,.widget .widget-top,.widget-control-actions,.widget-liquid-left,.widget-liquid-right,.widgets-sortables{display:block;zoom:100%}p.search-box{position:static;float:left;margin:-3px 0 4px}#widget-list .widget,.feature-filter .feature-group li{display:inline}.feature-filter .feature-group li input{vertical-align:middle}#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}#poststuff .inside #page_template,#poststuff .inside #parent_id,.inline-edit-row #post_parent,.inline-edit-row select[name=page_template]{width:250px}#submitdiv a.button,#submitdiv input,#submitdiv select{position:relative}#bh{margin:7px 0 0 10px;float:left}div#dashboard-widgets{padding-left:1px}.tagchecklist span,.tagchecklist span a{display:inline-block;display:block}.nav .button-secondary,.tablenav .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}.subsubsub li{display:inline}a.post-state-format{text-indent:0;line-height:0;font-size:0}table.ie-fixed{table-layout:fixed}.widefat th,.widefat tr{margin-bottom:0;border-spacing:0}.widefat th input{margin:0 5px 0 0}.widefat tfoot .check-column,.widefat thead .check-column{padding-top:6px}.media.widefat tbody th.check-column,.widefat tbody th.check-column{padding:4px 0 0}.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}.inactive-sidebar .widget,.widget-liquid-right .widget{position:relative}.inactive-sidebar .widget{display:block;float:right}#wpcontent .button-primary-disabled{color:#9FD0D5;background:#298CBA}#the-comment-list .unapproved td,#the-comment-list .unapproved tr{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}.available-theme{display:inline}.available-theme ul{margin:0}.available-theme .action-links li{padding-left:7px;margin-left:7px}.about-wrap .three-col.about-updates .col-2{width:15%}.about-wrap .about-password-meter input{width:98%}.revisions-tickmarks,.revisions-tooltip{display:none!important}.revisions.pinned .revisions-controls{position:relative}.login form .input,input[type=password]{font-family:sans-serif}.mce-btn i.mce-i-aligncenter,.mce-btn i.mce-i-alignjustify,.mce-btn i.mce-i-alignleft,.mce-btn i.mce-i-alignright,.mce-btn i.mce-i-blockquote,.mce-btn i.mce-i-bold,.mce-btn i.mce-i-bullist,.mce-btn i.mce-i-charmap,.mce-btn i.mce-i-forecolor,.mce-btn i.mce-i-fullscreen,.mce-btn i.mce-i-help,.mce-btn i.mce-i-hr,.mce-btn i.mce-i-indent,.mce-btn i.mce-i-italic,.mce-btn i.mce-i-link,.mce-btn i.mce-i-ltr,.mce-btn i.mce-i-numlist,.mce-btn i.mce-i-outdent,.mce-btn i.mce-i-pastetext,.mce-btn i.mce-i-pasteword,.mce-btn i.mce-i-redo,.mce-btn i.mce-i-removeformat,.mce-btn i.mce-i-spellchecker,.mce-btn i.mce-i-strikethrough,.mce-btn i.mce-i-underline,.mce-btn i.mce-i-undo,.mce-btn i.mce-i-unlink,.mce-btn i.mce-i-wp-media-library,.mce-btn i.mce-i-wp_adv,.mce-btn i.mce-i-wp_fullscreen,.mce-btn i.mce-i-wp_help,.mce-btn i.mce-i-wp_more,.mce-btn i.mce-i-wp_page,.mce-close{font-family:tinymce,Arial;font-style:normal;font-weight:400;font-variant:normal;font-size:16px;margin-right:0;padding-left:0}.mce-btn i.mce-i-wp_fullscreen,.qt-fullscreen{-ie7-icon:'\e023'}.mce-btn i.mce-i-wp_more,.mce-btn i.mce-i-wp_page{-ie7-icon:'\e027'}.mce-btn i.mce-i-wp_adv{background-color:#aaa}.mce-btn i.mce-i-help,.mce-btn i.mce-i-wp_help{-ie7-icon:'\e016'}* html .row-actions{visibility:visible}* html div.widget-liquid-right{display:block;position:relative}* html #editorcontainer{padding:0}* html #poststuff h2{margin-right:0}* html .stuffbox,* html .stuffbox input,* html .stuffbox textarea{border:1px solid #DFDFDF}* html .feature-filter .feature-group li{width:145px}* html div.widget-liquid-left{width:99%}* html .widgets-sortables{height:50px}* html a#content_resize{left:-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 .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-right:-80px}* html .folded #adminmenu{margin-right:-22px}* html #wpcontent #adminmenu li.menu-top{display:inline;padding:0;margin:0}* html #wpfooter{margin:0}* html #adminmenu div.wp-menu-image{height:29px} \ No newline at end of file diff --git a/wp-admin/css/ie.css b/wp-admin/css/ie.css new file mode 100644 index 0000000..967fae2 --- /dev/null +++ b/wp-admin/css/ie.css @@ -0,0 +1,785 @@ +/* Fixes for IE 7 bugs */ + +#dashboard-widgets form .input-text-wrap input, +#dashboard-widgets form .textarea-wrap textarea { + width: 99%; +} + +#dashboard-widgets form #title { + width: 98%; +} + +#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 #postbox-container-3 .empty-container, +#dashboard-widgets #postbox-container-4 .empty-container { + border: 0 none; + height: 0; + min-height: 0; +} + +.wp-editor-wrap .wp-editor-tools, +.wp-editor-wrap .wp-switch-editor, +.wp-editor-wrap .wp-editor-tabs, +.wp-editor-wrap .wp-editor-container { + zoom: 100%; +} + +.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:first-child { + width: 35%; +} + +.wp-fullscreen-title { + width: 97%; +} + +#wp_mce_fullscreen_ifr { + background-color: #f9f9f9; +} + +#wp-fullscreen-tagline { + color: #888; + font-size: 14px; +} + +#adminmenuback { + left: 0; + background-image: none; +} + +#adminmenuwrap { + position: static; +} + +#adminmenu { + position: relative; +} + +#adminmenu, +#adminmenu a { + cursor: pointer; +} + +#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 { + left: 110px; +} + +#adminmenu .wp-submenu ul { + margin: 0; +} + +.folded #wpcontent, +.folded #wpfooter { + margin-left: 170px; +} + +.folded #adminmenuback, +.folded #adminmenuwrap, +.folded #adminmenu, +.folded #adminmenu li.menu-top { + width: 150px; +} + +.folded #adminmenu .wp-submenu { + border-top-color: transparent; +} + +.folded #adminmenu .wp-menu-name { + display: block; +} + +.folded #adminmenu .wp-submenu.sub-open, +.folded #adminmenu .opensub .wp-submenu { + left: 110px; +} + +.folded #adminmenu a.wp-has-current-submenu:focus + .wp-submenu, +.folded #adminmenu .wp-has-current-submenu .wp-submenu { + top: -1px; + position: relative; +} + +.folded #adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head { + background-color: transparent; +} + +#adminmenu .wp-submenu .wp-submenu-head { + border-top-color: #ddd; +} + +.folded #adminmenu .wp-submenu ul { + margin-left: 5px; +} + +#adminmenu li.menu-top { + margin-bottom: -2px; +} + +#adminmenu .wp-menu-arrow { + display: none !important; +} + +.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; +} + +#adminmenu li.wp-has-current-submenu .wp-submenu { + left: -40px; +} + +#adminmenu .wp-menu-image { + display: none !important; +} + +#adminmenu a.menu-top .wp-menu-name { + padding-left: 8px; +} + +#collapse-menu { + line-height: 23px; +} + +#wpadminbar .ab-comments-icon { + padding-top: 7px; +} + + +.theme-browser .theme { + width: 30%; + margin: 0 3% 4% 0; + cursor: auto; +} + +.theme-browser .theme:hover, +.theme-browser .theme:focus { + cursor: auto; +} + +.theme-browser .theme .theme-screenshot { + height: 180px; +} + +.theme-browser .theme .theme-actions { + position: static; + background-color: #e8e8e8; +} + +.theme-browser .theme .more-details { + display: none; +} + +.plugins td, +.plugins th { + border-top: 1px solid #ddd; +} + +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 { + overflow: visible; +} + +#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, +#template, +#template div, +#editcat, +#addcat { + zoom: 100%; +} + +.wp-menu-arrow { + height: 28px; +} + +.submitbox { + margin-top: 10px; +} + +/* Inline Editor */ +#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; +} +/* end Inline Editor */ + +#titlediv #title { + width: 98%; +} + +.button, +input[type="reset"], +input[type="button"], +input[type="submit"] { + padding: 0 8px; + line-height: 20px; + height: auto; +} + +.button.button-large, +input[type="reset"].button-large, +input[type="button"].button-large, +input[type="submit"].button-large { + padding: 0 10px; + line-height: 24px; + height: auto; +} + +.button.button-small, +input[type="reset"].button-small, +input[type="button"].button-small, +input[type="submit"].button-small { + padding: 0 6px; + line-height: 16px; + height: auto; +} + +a.button { + margin: 1px; + padding: 1px 9px 2px; +} + +a.button.button-large { + padding: 1px 11px 2px; +} + +a.button.button-small { + padding: 1px 7px 2px; +} + +#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-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; +} + +#widget-list .widget, +.feature-filter .feature-group li { + display: inline; +} + +.feature-filter .feature-group li input { + vertical-align: middle; +} + +#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; +} + +#poststuff .inside #parent_id, +#poststuff .inside #page_template, +.inline-edit-row #post_parent, +.inline-edit-row select[name="page_template"] { + width: 250px; +} + +#submitdiv input, +#submitdiv select, +#submitdiv a.button { + position: relative; +} + +#bh { + margin: 7px 10px 0 0; + float: right; +} + +/* without this dashboard widgets appear in one column for some screen widths */ +div#dashboard-widgets { + padding-right: 1px; +} + +.tagchecklist span, .tagchecklist span a { + display: inline-block; + display: block; +} + +.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; +} + +.subsubsub li { + display: inline; +} + +a.post-state-format { + text-indent: 0; + line-height: 0; + font-size: 0; +} + +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 thead .check-column, +.widefat tfoot .check-column { + padding-top: 6px; +} + +.widefat tbody th.check-column, +.media.widefat tbody th.check-column { + padding: 4px 0 0; +} + +.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; +} + +.inactive-sidebar .widget { + display: block; + float: left; +} + +#wpcontent .button-primary-disabled { + color: #9FD0D5; + background: #298CBA; +} + +#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; +} + +.available-theme { + display: inline; +} + +.available-theme ul { + margin: 0; +} + +.available-theme .action-links li { + padding-right: 7px; + margin-right: 7px; +} + +.about-wrap .three-col.about-updates .col-2 { + width: 15%; +} + +.about-wrap .about-password-meter input { + width: 98%; +} + +.revisions-tickmarks, +.revisions-tooltip { + display: none !important; +} + +.revisions.pinned .revisions-controls { + position: relative; +} + +input[type="password"], +.login form .input { + font-family: sans-serif; +} + +/* TinyMCE icons */ +.mce-btn i.mce-i-bold, +.mce-btn i.mce-i-italic, +.mce-btn i.mce-i-bullist, +.mce-btn i.mce-i-numlist, +.mce-btn i.mce-i-blockquote, +.mce-btn i.mce-i-alignleft, +.mce-btn i.mce-i-aligncenter, +.mce-btn i.mce-i-alignright, +.mce-btn i.mce-i-link, +.mce-btn i.mce-i-unlink, +.mce-btn i.mce-i-wp_more, +.mce-btn i.mce-i-strikethrough, +.mce-btn i.mce-i-spellchecker, +.mce-btn i.mce-i-fullscreen, +.mce-btn i.mce-i-wp_fullscreen, +.mce-btn i.mce-i-wp_adv, +.mce-btn i.mce-i-underline, +.mce-btn i.mce-i-alignjustify, +.mce-btn i.mce-i-forecolor, +.mce-btn i.mce-i-pastetext, +.mce-btn i.mce-i-pasteword, +.mce-btn i.mce-i-removeformat, +.mce-btn i.mce-i-charmap, +.mce-btn i.mce-i-outdent, +.mce-btn i.mce-i-indent, +.mce-btn i.mce-i-undo, +.mce-btn i.mce-i-redo, +.mce-btn i.mce-i-help, +.mce-btn i.mce-i-wp_help, +.mce-btn i.mce-i-wp-media-library, +.mce-btn i.mce-i-ltr, +.mce-btn i.mce-i-wp_page, +.mce-btn i.mce-i-hr, +.mce-close { + font-family: 'tinymce', Arial; + font-style: normal; + font-weight: normal; + font-variant: normal; + font-size: 16px; + margin-left: 0; + padding-right: 0; +} + +.mce-btn i.mce-i-wp_fullscreen, +.qt-fullscreen { + -ie7-icon: '\e023'; +} + +.mce-btn i.mce-i-wp_more, +.mce-btn i.mce-i-wp_page { + -ie7-icon: '\e027'; +} + +.mce-btn i.mce-i-wp_adv { + background-color: #aaa; +} + +.mce-btn i.mce-i-help, +.mce-btn i.mce-i-wp_help { + -ie7-icon: '\e016'; +} + + +/* IE6 leftovers */ +* 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 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 .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 #wpfooter { + margin: 0; +} + +* html #adminmenu div.wp-menu-image { + height: 29px; +} diff --git a/wp-admin/css/ie.min.css b/wp-admin/css/ie.min.css new file mode 100644 index 0000000..849f4d1 --- /dev/null +++ b/wp-admin/css/ie.min.css @@ -0,0 +1 @@ +#dashboard-widgets form .input-text-wrap input,#dashboard-widgets form .textarea-wrap textarea{width:99%}#dashboard-widgets form #title{width:98%}#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 #postbox-container-3 .empty-container,#dashboard-widgets #postbox-container-4 .empty-container{border:0 none;height:0;min-height:0}.wp-editor-wrap .wp-editor-container,.wp-editor-wrap .wp-editor-tabs,.wp-editor-wrap .wp-editor-tools,.wp-editor-wrap .wp-switch-editor{zoom:100%}.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:first-child{width:35%}.wp-fullscreen-title{width:97%}#wp_mce_fullscreen_ifr{background-color:#f9f9f9}#wp-fullscreen-tagline{color:#888;font-size:14px}#adminmenuback{left:0;background-image:none}#adminmenuwrap{position:static}#adminmenu{position:relative}#adminmenu,#adminmenu a{cursor:pointer}#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{left:110px}#adminmenu .wp-submenu ul{margin:0}.folded #wpcontent,.folded #wpfooter{margin-left:170px}.folded #adminmenu,.folded #adminmenu li.menu-top,.folded #adminmenuback,.folded #adminmenuwrap{width:150px}.folded #adminmenu .wp-submenu{border-top-color:transparent}.folded #adminmenu .wp-menu-name{display:block}.folded #adminmenu .opensub .wp-submenu,.folded #adminmenu .wp-submenu.sub-open{left:110px}.folded #adminmenu .wp-has-current-submenu .wp-submenu,.folded #adminmenu a.wp-has-current-submenu:focus+.wp-submenu{top:-1px;position:relative}.folded #adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head{background-color:transparent}#adminmenu .wp-submenu .wp-submenu-head{border-top-color:#ddd}.folded #adminmenu .wp-submenu ul{margin-left:5px}#adminmenu li.menu-top{margin-bottom:-2px}#adminmenu .wp-menu-arrow{display:none!important}.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}#adminmenu li.wp-has-current-submenu .wp-submenu{left:-40px}#adminmenu .wp-menu-image{display:none!important}#adminmenu a.menu-top .wp-menu-name{padding-left:8px}#collapse-menu{line-height:23px}#wpadminbar .ab-comments-icon{padding-top:7px}.theme-browser .theme{width:30%;margin:0 3% 4% 0;cursor:auto}.theme-browser .theme:focus,.theme-browser .theme:hover{cursor:auto}.theme-browser .theme .theme-screenshot{height:180px}.theme-browser .theme .theme-actions{position:static;background-color:#e8e8e8}.theme-browser .theme .more-details{display:none}.plugins td,.plugins th,table.fixed td,table.fixed th{border-top:1px solid #ddd}#wpbody-content input.button,#wpbody-content input.button-primary,#wpbody-content input.button-secondary{overflow:visible}#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}#addcat,#editcat,#template,#template div,.major-publishing-actions,.wp-submenu,.wp-submenu li{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%}.button,input[type=button],input[type=reset],input[type=submit]{padding:0 8px;line-height:20px;height:auto}.button.button-large,input[type=button].button-large,input[type=reset].button-large,input[type=submit].button-large{padding:0 10px;line-height:24px;height:auto}.button.button-small,input[type=button].button-small,input[type=reset].button-small,input[type=submit].button-small{padding:0 6px;line-height:16px;height:auto}a.button{margin:1px;padding:1px 9px 2px}a.button.button-large{padding:1px 11px 2px}a.button.button-small{padding:1px 7px 2px}#screen-options-wrap{overflow:hidden}#col-container,#col-left,#col-right,#dragHelper,#editorcontainer,#post-body,#post-status-info,#postdiv,#postdivrich,#poststuff,#the-comment-list .comment-item,#titlediv,#widgets-left,#wpwrap,#wrap,.fileedit-sub,.metabox-holder,.tablenav,.tagchecklist,.widget .widget-top,.widget-control-actions,.widget-liquid-left,.widget-liquid-right,.widgets-sortables{display:block;zoom:100%}p.search-box{position:static;float:right;margin:-3px 0 4px}#widget-list .widget,.feature-filter .feature-group li{display:inline}.feature-filter .feature-group li input{vertical-align:middle}#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}#poststuff .inside #page_template,#poststuff .inside #parent_id,.inline-edit-row #post_parent,.inline-edit-row select[name=page_template]{width:250px}#submitdiv a.button,#submitdiv input,#submitdiv select{position:relative}#bh{margin:7px 10px 0 0;float:right}div#dashboard-widgets{padding-right:1px}.tagchecklist span,.tagchecklist span a{display:inline-block;display:block}.nav .button-secondary,.tablenav .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}.subsubsub li{display:inline}a.post-state-format{text-indent:0;line-height:0;font-size:0}table.ie-fixed{table-layout:fixed}.widefat th,.widefat tr{margin-bottom:0;border-spacing:0}.widefat th input{margin:0 0 0 5px}.widefat tfoot .check-column,.widefat thead .check-column{padding-top:6px}.media.widefat tbody th.check-column,.widefat tbody th.check-column{padding:4px 0 0}.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}.inactive-sidebar .widget,.widget-liquid-right .widget{position:relative}.inactive-sidebar .widget{display:block;float:left}#wpcontent .button-primary-disabled{color:#9FD0D5;background:#298CBA}#the-comment-list .unapproved td,#the-comment-list .unapproved tr{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}.available-theme{display:inline}.available-theme ul{margin:0}.available-theme .action-links li{padding-right:7px;margin-right:7px}.about-wrap .three-col.about-updates .col-2{width:15%}.about-wrap .about-password-meter input{width:98%}.revisions-tickmarks,.revisions-tooltip{display:none!important}.revisions.pinned .revisions-controls{position:relative}.login form .input,input[type=password]{font-family:sans-serif}.mce-btn i.mce-i-aligncenter,.mce-btn i.mce-i-alignjustify,.mce-btn i.mce-i-alignleft,.mce-btn i.mce-i-alignright,.mce-btn i.mce-i-blockquote,.mce-btn i.mce-i-bold,.mce-btn i.mce-i-bullist,.mce-btn i.mce-i-charmap,.mce-btn i.mce-i-forecolor,.mce-btn i.mce-i-fullscreen,.mce-btn i.mce-i-help,.mce-btn i.mce-i-hr,.mce-btn i.mce-i-indent,.mce-btn i.mce-i-italic,.mce-btn i.mce-i-link,.mce-btn i.mce-i-ltr,.mce-btn i.mce-i-numlist,.mce-btn i.mce-i-outdent,.mce-btn i.mce-i-pastetext,.mce-btn i.mce-i-pasteword,.mce-btn i.mce-i-redo,.mce-btn i.mce-i-removeformat,.mce-btn i.mce-i-spellchecker,.mce-btn i.mce-i-strikethrough,.mce-btn i.mce-i-underline,.mce-btn i.mce-i-undo,.mce-btn i.mce-i-unlink,.mce-btn i.mce-i-wp-media-library,.mce-btn i.mce-i-wp_adv,.mce-btn i.mce-i-wp_fullscreen,.mce-btn i.mce-i-wp_help,.mce-btn i.mce-i-wp_more,.mce-btn i.mce-i-wp_page,.mce-close{font-family:tinymce,Arial;font-style:normal;font-weight:400;font-variant:normal;font-size:16px;margin-left:0;padding-right:0}.mce-btn i.mce-i-wp_fullscreen,.qt-fullscreen{-ie7-icon:'\e023'}.mce-btn i.mce-i-wp_more,.mce-btn i.mce-i-wp_page{-ie7-icon:'\e027'}.mce-btn i.mce-i-wp_adv{background-color:#aaa}.mce-btn i.mce-i-help,.mce-btn i.mce-i-wp_help{-ie7-icon:'\e016'}* 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 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 .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 #wpfooter{margin:0}* html #adminmenu div.wp-menu-image{height:29px} \ No newline at end of file diff --git a/wp-admin/css/install-rtl.css b/wp-admin/css/install-rtl.css new file mode 100644 index 0000000..b73329e --- /dev/null +++ b/wp-admin/css/install-rtl.css @@ -0,0 +1,313 @@ +html { + background: #f1f1f1; + margin: 0 20px; +} + +body { + background: #fff; + color: #444; + font-family: "Open Sans", sans-serif; + margin: 140px auto 25px; + padding: 20px 20px 10px 20px; + max-width: 700px; + -webkit-font-smoothing: subpixel-antialiased; + -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.13); + box-shadow: 0 1px 3px rgba(0,0,0,0.13); +} + +a { + color: #0074a2; + text-decoration: none; +} + +a:hover { + color: #2ea2cc; +} + +h1 { + border-bottom: 1px solid #dedede; + clear: both; + color: #666; + font-size: 24px; + margin: 30px 0; + padding: 0; + padding-bottom: 7px; + font-weight: normal; +} + +h2 { + font-size: 16px; +} + +p, li, dd, dt { + padding-bottom: 2px; + font-size: 14px; + line-height: 1.5; +} + +code, .code { + font-family: Consolas, Monaco, monospace; +} + +ul, ol, dl { + padding: 5px 22px 5px 5px; +} + +a img { + border:0 +} +abbr { + border: 0; + font-variant: normal; +} +#logo { + margin: 6px 0 14px 0; + border-bottom: none; + text-align:center +} +#logo a { + background-image: url(../images/w-logo-blue.png?ver=20131202); + background-image: none, url(../images/wordpress-logo.svg?ver=20131107); + -webkit-background-size: 80px 80px; + background-size: 80px 80px; + background-position: center top; + background-repeat: no-repeat; + color: #999; + height: 80px; + font-size: 20px; + font-weight: normal; + line-height: 1.3em; + margin: -130px auto 25px; + padding: 0; + text-decoration: none; + width: 80px; + text-indent: -9999px; + outline: none; + overflow: hidden; + display: block; +} +.step { + margin: 20px 0 15px; +} +.step, th { + text-align: right; + padding: 0; +} +.step .button-large { + font-size: 14px; +} +textarea { + border: 1px solid #dfdfdf; + font-family: "Open Sans", sans-serif; + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.form-table { + border-collapse: collapse; + margin-top: 1em; + width: 100%; +} + +.form-table td { + margin-bottom: 9px; + padding: 10px 0 10px 20px; + border-bottom: 8px solid #fff; + font-size: 14px; + vertical-align: top +} + +.form-table th { + font-size: 14px; + text-align: right; + padding: 16px 0 10px 20px; + 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: 3px 5px; + border: 1px solid #ddd; + -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.07); + box-shadow: inset 0 1px 2px rgba(0,0,0,0.07); +} + +input, +submit { + font-family: "Open Sans", 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 0 10px 20px; +} + +.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 0 5px 5px; + 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: #ffcc00 !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 #c00; + padding: 0.5em 0.7em; + margin: 5px 0 15px; + background-color: #ffebe8; +} + +/* @noflip */ +#dbname, +#uname, +#pwd, +#dbhost, +#prefix, +#user_login, +#admin_email, +#pass1, +#pass2 { + direction: ltr; +} + + +/* localization */ +body.rtl, +.rtl textarea, +.rtl input, +.rtl submit { + font-family: Tahoma, sans-serif; +} + +:lang(he-il) body.rtl, +:lang(he-il) .rtl textarea, +:lang(he-il) .rtl input, +:lang(he-il) .rtl submit { + font-family: Arial, sans-serif; +} + +@media only screen and (max-width: 799px) { + body { + margin-top: 115px; + } + #logo a { + margin: -125px auto 30px; + } +} + +@media screen and ( max-width: 782px ) { + + .form-table { + margin-top: 0; + } + + .form-table th, + .form-table td { + display: block; + width: auto; + vertical-align: middle; + } + + .form-table th { + padding: 20px 0 0; + } + + .form-table td { + padding: 5px 0; + border: 0; + margin: 0; + } + + textarea, + input { + font-size: 16px; + } + + .form-table td input[type="text"], + .form-table td input[type="password"], + .form-table td select, + .form-table td textarea, + .form-table span.description { + width: 100%; + font-size: 16px; + line-height: 1.5; + padding: 7px 10px; + display: block; + max-width: none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + +} diff --git a/wp-admin/css/install-rtl.min.css b/wp-admin/css/install-rtl.min.css new file mode 100644 index 0000000..6b112f7 --- /dev/null +++ b/wp-admin/css/install-rtl.min.css @@ -0,0 +1 @@ +html{background:#f1f1f1;margin:0 20px}body{background:#fff;color:#444;font-family:"Open Sans",sans-serif;margin:140px auto 25px;padding:20px 20px 10px;max-width:700px;-webkit-font-smoothing:subpixel-antialiased;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.13);box-shadow:0 1px 3px rgba(0,0,0,.13)}a{color:#0074a2;text-decoration:none}a:hover{color:#2ea2cc}h1{border-bottom:1px solid #dedede;clear:both;color:#666;font-size:24px;margin:30px 0;padding:0;padding-bottom:7px;font-weight:400}h2{font-size:16px}dd,dt,li,p{padding-bottom:2px;font-size:14px;line-height:1.5}.code,code{font-family:Consolas,Monaco,monospace}dl,ol,ul{padding:5px 22px 5px 5px}a img{border:0}abbr{border:0;font-variant:normal}#logo{margin:6px 0 14px;border-bottom:0;text-align:center}#logo a{background-image:url(../images/w-logo-blue.png?ver=20131202);background-image:none,url(../images/wordpress-logo.svg?ver=20131107);-webkit-background-size:80px 80px;background-size:80px 80px;background-position:center top;background-repeat:no-repeat;color:#999;height:80px;font-size:20px;font-weight:400;line-height:1.3em;margin:-130px auto 25px;padding:0;text-decoration:none;width:80px;text-indent:-9999px;outline:0;overflow:hidden;display:block}.step{margin:20px 0 15px}.step,th{text-align:right;padding:0}.step .button-large{font-size:14px}textarea{border:1px solid #dfdfdf;font-family:"Open Sans",sans-serif;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table{border-collapse:collapse;margin-top:1em;width:100%}.form-table td{margin-bottom:9px;padding:10px 0 10px 20px;border-bottom:8px solid #fff;font-size:14px;vertical-align:top}.form-table th{font-size:14px;text-align:right;padding:16px 0 10px 20px;width:140px;vertical-align:top}.form-table code{line-height:18px;font-size:14px}.form-table p{margin:4px 0 0;font-size:11px}.form-table input{line-height:20px;font-size:15px;padding:3px 5px;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}input,submit{font-family:"Open Sans",sans-serif}.form-table input[type=password],.form-table input[type=text]{width:206px}.form-table th p{font-weight:400}.form-table.install-success td{vertical-align:middle;padding:16px 0 10px 20px}.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 0 5px 5px;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 #c00;padding:.5em .7em;margin:5px 0 15px;background-color:#ffebe8}#admin_email,#dbhost,#dbname,#pass1,#pass2,#prefix,#pwd,#uname,#user_login{direction:ltr}.rtl input,.rtl submit,.rtl textarea,body.rtl{font-family:Tahoma,sans-serif}:lang(he-il) .rtl input,:lang(he-il) .rtl submit,:lang(he-il) .rtl textarea,:lang(he-il) body.rtl{font-family:Arial,sans-serif}@media only screen and (max-width:799px){body{margin-top:115px}#logo a{margin:-125px auto 30px}}@media screen and (max-width:782px){.form-table{margin-top:0}.form-table td,.form-table th{display:block;width:auto;vertical-align:middle}.form-table th{padding:20px 0 0}.form-table td{padding:5px 0;border:0;margin:0}input,textarea{font-size:16px}.form-table span.description,.form-table td input[type=password],.form-table td input[type=text],.form-table td select,.form-table td textarea{width:100%;font-size:16px;line-height:1.5;padding:7px 10px;display:block;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}} \ No newline at end of file diff --git a/wp-admin/css/install.css b/wp-admin/css/install.css new file mode 100644 index 0000000..a2e19a1 --- /dev/null +++ b/wp-admin/css/install.css @@ -0,0 +1,313 @@ +html { + background: #f1f1f1; + margin: 0 20px; +} + +body { + background: #fff; + color: #444; + font-family: "Open Sans", sans-serif; + margin: 140px auto 25px; + padding: 20px 20px 10px 20px; + max-width: 700px; + -webkit-font-smoothing: subpixel-antialiased; + -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.13); + box-shadow: 0 1px 3px rgba(0,0,0,0.13); +} + +a { + color: #0074a2; + text-decoration: none; +} + +a:hover { + color: #2ea2cc; +} + +h1 { + border-bottom: 1px solid #dedede; + clear: both; + color: #666; + font-size: 24px; + margin: 30px 0; + padding: 0; + padding-bottom: 7px; + font-weight: normal; +} + +h2 { + font-size: 16px; +} + +p, li, dd, dt { + padding-bottom: 2px; + font-size: 14px; + line-height: 1.5; +} + +code, .code { + font-family: Consolas, Monaco, monospace; +} + +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 +} +#logo a { + background-image: url(../images/w-logo-blue.png?ver=20131202); + background-image: none, url(../images/wordpress-logo.svg?ver=20131107); + -webkit-background-size: 80px 80px; + background-size: 80px 80px; + background-position: center top; + background-repeat: no-repeat; + color: #999; + height: 80px; + font-size: 20px; + font-weight: normal; + line-height: 1.3em; + margin: -130px auto 25px; + padding: 0; + text-decoration: none; + width: 80px; + text-indent: -9999px; + outline: none; + overflow: hidden; + display: block; +} +.step { + margin: 20px 0 15px; +} +.step, th { + text-align: left; + padding: 0; +} +.step .button-large { + font-size: 14px; +} +textarea { + border: 1px solid #dfdfdf; + font-family: "Open Sans", sans-serif; + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.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; + 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: 3px 5px; + border: 1px solid #ddd; + -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.07); + box-shadow: inset 0 1px 2px rgba(0,0,0,0.07); +} + +input, +submit { + font-family: "Open Sans", 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: #ffcc00 !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 #c00; + padding: 0.5em 0.7em; + margin: 5px 0 15px; + background-color: #ffebe8; +} + +/* @noflip */ +#dbname, +#uname, +#pwd, +#dbhost, +#prefix, +#user_login, +#admin_email, +#pass1, +#pass2 { + direction: ltr; +} + + +/* localization */ +body.rtl, +.rtl textarea, +.rtl input, +.rtl submit { + font-family: Tahoma, sans-serif; +} + +:lang(he-il) body.rtl, +:lang(he-il) .rtl textarea, +:lang(he-il) .rtl input, +:lang(he-il) .rtl submit { + font-family: Arial, sans-serif; +} + +@media only screen and (max-width: 799px) { + body { + margin-top: 115px; + } + #logo a { + margin: -125px auto 30px; + } +} + +@media screen and ( max-width: 782px ) { + + .form-table { + margin-top: 0; + } + + .form-table th, + .form-table td { + display: block; + width: auto; + vertical-align: middle; + } + + .form-table th { + padding: 20px 0 0; + } + + .form-table td { + padding: 5px 0; + border: 0; + margin: 0; + } + + textarea, + input { + font-size: 16px; + } + + .form-table td input[type="text"], + .form-table td input[type="password"], + .form-table td select, + .form-table td textarea, + .form-table span.description { + width: 100%; + font-size: 16px; + line-height: 1.5; + padding: 7px 10px; + display: block; + max-width: none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + +} diff --git a/wp-admin/css/install.min.css b/wp-admin/css/install.min.css new file mode 100644 index 0000000..1a712e8 --- /dev/null +++ b/wp-admin/css/install.min.css @@ -0,0 +1 @@ +html{background:#f1f1f1;margin:0 20px}body{background:#fff;color:#444;font-family:"Open Sans",sans-serif;margin:140px auto 25px;padding:20px 20px 10px;max-width:700px;-webkit-font-smoothing:subpixel-antialiased;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.13);box-shadow:0 1px 3px rgba(0,0,0,.13)}a{color:#0074a2;text-decoration:none}a:hover{color:#2ea2cc}h1{border-bottom:1px solid #dedede;clear:both;color:#666;font-size:24px;margin:30px 0;padding:0;padding-bottom:7px;font-weight:400}h2{font-size:16px}dd,dt,li,p{padding-bottom:2px;font-size:14px;line-height:1.5}.code,code{font-family:Consolas,Monaco,monospace}dl,ol,ul{padding:5px 5px 5px 22px}a img{border:0}abbr{border:0;font-variant:normal}#logo{margin:6px 0 14px;border-bottom:0;text-align:center}#logo a{background-image:url(../images/w-logo-blue.png?ver=20131202);background-image:none,url(../images/wordpress-logo.svg?ver=20131107);-webkit-background-size:80px 80px;background-size:80px 80px;background-position:center top;background-repeat:no-repeat;color:#999;height:80px;font-size:20px;font-weight:400;line-height:1.3em;margin:-130px auto 25px;padding:0;text-decoration:none;width:80px;text-indent:-9999px;outline:0;overflow:hidden;display:block}.step{margin:20px 0 15px}.step,th{text-align:left;padding:0}.step .button-large{font-size:14px}textarea{border:1px solid #dfdfdf;font-family:"Open Sans",sans-serif;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.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;width:140px;vertical-align:top}.form-table code{line-height:18px;font-size:14px}.form-table p{margin:4px 0 0;font-size:11px}.form-table input{line-height:20px;font-size:15px;padding:3px 5px;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}input,submit{font-family:"Open Sans",sans-serif}.form-table input[type=password],.form-table input[type=text]{width:206px}.form-table th p{font-weight:400}.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 #c00;padding:.5em .7em;margin:5px 0 15px;background-color:#ffebe8}#admin_email,#dbhost,#dbname,#pass1,#pass2,#prefix,#pwd,#uname,#user_login{direction:ltr}.rtl input,.rtl submit,.rtl textarea,body.rtl{font-family:Tahoma,sans-serif}:lang(he-il) .rtl input,:lang(he-il) .rtl submit,:lang(he-il) .rtl textarea,:lang(he-il) body.rtl{font-family:Arial,sans-serif}@media only screen and (max-width:799px){body{margin-top:115px}#logo a{margin:-125px auto 30px}}@media screen and (max-width:782px){.form-table{margin-top:0}.form-table td,.form-table th{display:block;width:auto;vertical-align:middle}.form-table th{padding:20px 0 0}.form-table td{padding:5px 0;border:0;margin:0}input,textarea{font-size:16px}.form-table span.description,.form-table td input[type=password],.form-table td input[type=text],.form-table td select,.form-table td textarea{width:100%;font-size:16px;line-height:1.5;padding:7px 10px;display:block;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}} \ No newline at end of file diff --git a/wp-admin/css/l10n-rtl.css b/wp-admin/css/l10n-rtl.css new file mode 100644 index 0000000..5590f1d --- /dev/null +++ b/wp-admin/css/l10n-rtl.css @@ -0,0 +1,100 @@ +/*------------------------------------------------------------------------------ + 27.0 - Localization +------------------------------------------------------------------------------*/ + +/* RTL except Hebrew (see below): Tahoma as the first font; */ +body.rtl, +body.rtl .press-this a.wp-switch-editor { + font-family: Tahoma, Arial, sans-serif; +} + + +/* he_IL: Remove Tahoma from the font stack. Arial is best for Hebrew. */ +body.locale-he-il, +body.locale-he-il .press-this a.wp-switch-editor { + font-family: Arial, sans-serif; +} + +/* he_IL: Have be bold rather than italic. */ +.locale-he-il em { + font-style: normal; + font-weight: bold; +} + +/* 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; } + +/* de_DE: Text needs more space for translation */ +.locale-de-de .inline-edit-row fieldset label span.title { + width: 7em; /* default 5em */ +} +.locale-de-de .inline-edit-row fieldset label span.input-text-wrap { + margin-right: 7em; /* default 5em */ +} +.locale-de-de #customize-header-actions .button { + padding: 0 5px 1px; /* default 0 10px 1px */ +} +.locale-de-de #customize-header-actions .spinner { + margin: 16px 3px 0; /* default 16px 4px 0 5px */ +} + +/* ru_RU: Text needs more room to breathe. */ +.locale-ru-ru .inline-edit-row fieldset label span.title { + width: 8em; /* default 5em */ +} +.locale-ru-ru .inline-edit-row fieldset label span.input-text-wrap { + margin-right: 8em; /* default 5em */ +} +.locale-ru-ru.post-php .tagsdiv .newtag { + width: 165px; /* default 180px - 15px */ +} +.locale-ru-ru.press-this .posting { + margin-left: 277px; /* default 252px + 25px */ +} +.locale-ru-ru .press-this-sidebar { + width: 265px; /* default 240px + 25px */ +} +.locale-ru-ru #customize-header-actions .button { + padding: 0 5px 1px; /* default 0 10px 1px */ +} +.locale-ru-ru #customize-header-actions .spinner { + margin: 16px 3px 0; /* default 16px 4px 0 5px */ +} + +/* lt_LT: QuickEdit */ +.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-right: 8em; +} diff --git a/wp-admin/css/l10n.css b/wp-admin/css/l10n.css new file mode 100644 index 0000000..3b056d6 --- /dev/null +++ b/wp-admin/css/l10n.css @@ -0,0 +1,100 @@ +/*------------------------------------------------------------------------------ + 27.0 - Localization +------------------------------------------------------------------------------*/ + +/* RTL except Hebrew (see below): Tahoma as the first font; */ +body.rtl, +body.rtl .press-this a.wp-switch-editor { + font-family: Tahoma, Arial, sans-serif; +} + + +/* he_IL: Remove Tahoma from the font stack. Arial is best for Hebrew. */ +body.locale-he-il, +body.locale-he-il .press-this a.wp-switch-editor { + font-family: Arial, sans-serif; +} + +/* he_IL: Have be bold rather than italic. */ +.locale-he-il em { + font-style: normal; + font-weight: bold; +} + +/* 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; } + +/* de_DE: Text needs more space for translation */ +.locale-de-de .inline-edit-row fieldset label span.title { + width: 7em; /* default 5em */ +} +.locale-de-de .inline-edit-row fieldset label span.input-text-wrap { + margin-left: 7em; /* default 5em */ +} +.locale-de-de #customize-header-actions .button { + padding: 0 5px 1px; /* default 0 10px 1px */ +} +.locale-de-de #customize-header-actions .spinner { + margin: 16px 3px 0; /* default 16px 4px 0 5px */ +} + +/* ru_RU: Text needs more room to breathe. */ +.locale-ru-ru .inline-edit-row fieldset label span.title { + width: 8em; /* default 5em */ +} +.locale-ru-ru .inline-edit-row fieldset label span.input-text-wrap { + margin-left: 8em; /* default 5em */ +} +.locale-ru-ru.post-php .tagsdiv .newtag { + width: 165px; /* default 180px - 15px */ +} +.locale-ru-ru.press-this .posting { + margin-right: 277px; /* default 252px + 25px */ +} +.locale-ru-ru .press-this-sidebar { + width: 265px; /* default 240px + 25px */ +} +.locale-ru-ru #customize-header-actions .button { + padding: 0 5px 1px; /* default 0 10px 1px */ +} +.locale-ru-ru #customize-header-actions .spinner { + margin: 16px 3px 0; /* default 16px 4px 0 5px */ +} + +/* lt_LT: QuickEdit */ +.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/css/list-tables-rtl.css b/wp-admin/css/list-tables-rtl.css new file mode 100644 index 0000000..6f36c9e --- /dev/null +++ b/wp-admin/css/list-tables-rtl.css @@ -0,0 +1,1619 @@ +/* List table styles */ +.post-com-count-wrapper { + min-width: 22px; +} + +.post-com-count { + background: none; + 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; + color: #fff; +} + +.post-com-count:after { /* draw bubble connector using CSS! */ + content: ""; + display: block; + width: 0; + height: 0; + margin-right: 8px; + border-top: 5px solid #bbb; + border-left: 5px solid transparent; +} + +.post-com-count span { + font-size: 11px; + font-weight: 600; + height: 1.4em; + line-height: 1.4em; + min-width: 0.7em; + padding: 0 6px; + display: inline-block; + -webkit-border-radius: 5px; + border-radius: 5px; + background-color: #bbb; + color: #fff; +} + +.post-com-count:hover { + background-position: center -3px; +} + +.post-com-count:hover span { + background-color: #2ea2cc; +} + +.post-com-count:hover:after { + border-top: 5px solid #2ea2cc; +} + +strong .post-com-count { + background-position: center -55px; +} + +strong .post-com-count span { + background-color: #0074a2; +} + +strong .post-com-count:after { + border-top: 5px solid #0074a2; +} + +.column-response .post-com-count { + float: right; + margin-left: 5px; + text-align: center; +} + +.response-links { + float: right; +} + +/* comments */ + +.commentlist li { + padding: 1em 1em .2em; + margin: 0; + border-bottom: 1px solid #ccc; +} + +.commentlist li li { + border-bottom: 0; + padding: 0; +} + +.commentlist p { + padding: 0; + margin: 0 0 .8em; +} + +#submitted-on, +.submitted-on { + color: #777; +} + +/* reply to comments */ +#replyrow td { + padding: 2px; +} + +#replysubmit { + margin: 0; + padding: 0 5px 3px; + text-align: center; +} + +#replysubmit .spinner { + padding: 2px 0 0; + vertical-align: top; + float: left; +} + +#replysubmit .button { + margin-left: 5px; +} + +#replysubmit .error { + color: red; + line-height: 21px; + text-align: center; +} + +#replyrow h5 { + margin: .2em 0 0; + padding: 0 5px; + line-height: 1.4em; + font-size: 1em; +} + +#edithead .inside { + float: right; + padding: 3px 5px 2px 0; + margin: 0; + text-align: center; +} + +#edithead .inside input { + width: 180px; +} + +#edithead label { + padding: 2px 0; +} + +#replycontainer { + padding: 5px; +} + +#replycontent { + height: 120px; + -webkit-box-shadow: none; + box-shadow: none; +} + +#replyerror { + border-color: #ddd; + background-color: #f9f9f9; +} + +/* @todo: is this used? */ +.commentlist .avatar { + vertical-align: text-top; +} + +#the-comment-list .attachment-80x60 { + padding: 4px 8px; +} + +#the-comment-list tr.undo, +#the-comment-list div.undo { + background-color: #f4f4f4; +} + +#the-comment-list .unapproved th, +#the-comment-list .unapproved td { + background-color: #fef7f1; +} + +#the-comment-list .unapproved th.check-column { + border-right: 4px solid #d54e21; +} + +#the-comment-list .unapproved th.check-column input { + margin-right: 4px; +} + +#the-comment-list .approve a { + color: #006505; +} + +#the-comment-list .unapprove a { + color: #d98500; +} + +#the-comment-list th, +#the-comment-list td { + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1); +} + +#the-comment-list tr:last-child th, +#the-comment-list tr:last-child td { + -webkit-box-shadow: none; + box-shadow: none; +} + +#the-comment-list tr.unapproved + tr.approved th, +#the-comment-list tr.unapproved + tr.approved td { + border-top: 1px solid rgba(0, 0, 0, 0.03); +} + +/* table vim shortcuts */ +.vim-current, +.vim-current th, +.vim-current td { + background-color: #e4f2fd !important; +} + +th .comment-grey-bubble { + height: 16px; + width: 16px; +} + +th .comment-grey-bubble:before { + content: '\f101'; + font: normal 20px/.5 'dashicons'; + speak: none; + display: inline-block; + padding: 0; + top: 4px; + right: -4px; + position: relative; + vertical-align: top; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-decoration: none !important; + color: #444; +} + +/*------------------------------------------------------------------------------ + 10.0 - List Posts (/Pages/etc) +------------------------------------------------------------------------------*/ + +table.fixed { + table-layout: fixed; +} + +.fixed .column-rating, +.fixed .column-visible { + width: 8%; +} + +.fixed .column-posts, +.fixed .column-date, +.fixed .column-parent, +.fixed .column-links, +.fixed .column-author, +.fixed .column-format { + width: 10%; +} + +.fixed .column-comment .comment-author { + display: none; +} + +.fixed .column-response, +.fixed .column-categories, +.fixed .column-tags, +.fixed .column-rel, +.fixed .column-role { + width: 15%; +} + +.fixed .column-slug { + width: 25%; +} + +.fixed .column-locations { + width: 35%; +} + +.fixed .column-comments { + width: 4em; + padding: 8px 0; + text-align: right; +} + +.fixed .column-comments .vers { + padding-right: 3px; +} + +.fixed .column-comments a { + float: right; +} + +.fixed .column-icon { + width: 80px; +} + +/* @todo: pick a consistent list table selector */ +.wp-list-table a { + -webkit-transition: none; + transition: none; +} + +#the-list tr:last-child td, +#the-list tr:last-child th { + border-bottom: none !important; + -webkit-box-shadow: none; + box-shadow: none; +} + +#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: 0.6em 0; + padding: 0; +} + +#commentsdiv #replyrow td { + padding: 0; +} + +#commentsdiv p { + padding: 8px 10px; + margin: 0; +} + +#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 .spinner { + padding-right: 5px; +} + +.sorting-indicator { + display: none; + width: 10px; + height: 4px; + margin-top: 8px; + margin-right: 7px; +} + +.sorting-indicator:before { + background: none; + content: '\f142'; + font: normal 20px/1 'dashicons'; + speak: none; + display: inline-block; + padding: 0; + top: -4px; + right: -8px; + color: #444; + line-height: 10px; + position: relative; + vertical-align: top; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-decoration: none !important; + color: #444; +} + +.column-comments .sorting-indicator:before { + top: 0; + right: -10px; +} + +th.sorted.asc .sorting-indicator:before, +th.desc:hover span.sorting-indicator:before { + content: '\f142'; +} + +th.sorted.desc .sorting-indicator:before, +th.asc:hover span.sorting-indicator:before { + content: '\f140'; +} + +tr.wp-locked .locked-indicator { + margin-right: 6px; + height: 20px; + width: 16px; +} + +tr.wp-locked .locked-indicator:before { + color: #888; + content: '\f160'; + display: inline-block; + float: right; + font: normal 20px/1 'dashicons'; + speak: none; + vertical-align: middle; + margin-right: 0; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +tr.wp-locked .check-column label, +tr.wp-locked .check-column input[type="checkbox"], +tr.wp-locked .row-actions .inline, +tr.wp-locked .row-actions .trash { + display: none; +} + +tr .locked-info { + height: 0; + opacity: 0; +} + +tr.wp-locked .locked-info { + margin-top: 8px; + height: auto; + opacity: 1; +} + +.locked-text { + vertical-align: top; +} + +tr.locked-info, tr.wp-locked .locked-info { + -webkit-transition: height 1s, opacity 0.5s; + transition: height 1s, opacity 0.5s; +} + +.fixed .column-comments .sorting-indicator { + margin-top: 3px; +} + +#menu-locations-wrap .widefat { + width: 60%; +} + +.widefat th.sortable, +.widefat th.sorted { + padding: 0; +} + +th.sortable a, +th.sorted a { + display: block; + overflow: hidden; + padding: 7px 10px 8px 7px; +} + +th.manage-column a, +th.sortable a:hover, +th.sortable a:active, +th.sortable a:focus { + color: #333; +} + +th.sortable a:focus { + background: #e1e1e1; +} + +.fixed .column-comments.sortable a, +.fixed .column-comments.sorted a { + padding: 8px 0; +} + +th.sortable a span, +th.sorted a span { + float: right; + 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; +} + +/* Bulk Actions */ +.tablenav-pages a { + font-weight: 600; + margin-left: 1px; + padding: 0 2px; +} +.tablenav-pages .current-page { + padding-top: 0; + text-align: center; +} +.tablenav-pages .next-page { + margin-right: 2px; +} + +.tablenav a.button-secondary { + display: block; + margin: 3px 0 0 8px; +} + +.tablenav { + clear: both; + height: 30px; + margin: 6px 0 4px; + vertical-align: middle; +} + +.tablenav.themes { + max-width: 98%; +} + +.tablenav .tablenav-pages { + float: left; + display: block; + cursor: default; + height: 30px; + color: #555; + 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 { + padding: 0 10px 3px; + background: #eee; + background: rgba( 0, 0, 0, 0.05 ); + font-size: 16px; + font-weight: normal; +} + +.tablenav .tablenav-pages a:hover, +.tablenav .tablenav-pages a:focus { + color: #fff; + background: #2ea2cc; +} + +.tablenav .tablenav-pages a.disabled, +.tablenav .tablenav-pages a.disabled:hover, +.tablenav .tablenav-pages a.disabled:focus, +.tablenav .tablenav-pages a.disabled:active { + color: #aaa; + background: #eee; + background: rgba( 0, 0, 0, 0.05 ); +} + +.tablenav .displaying-num { + margin-left: 2px; + color: #777; + font-size: 12px; + font-style: italic; +} + +.tablenav .actions { + overflow: hidden; + padding: 2px 0 0 8px; +} + +.tablenav .delete { + margin-left: 20px; +} + +/* @todo: unclear if the following tablenav rules are actually used. +classes exist in paginate_links() but not seen in list table output. */ +.tablenav .dots { + border-color: transparent; +} + +.tablenav .next, +.tablenav .prev { + border-color: transparent; + color: #0074a2; +} + +.tablenav .next:hover, +.tablenav .prev:hover { + border-color: transparent; + color: #2ea2cc; +} + +.view-switch { + float: left; + margin: 5px 8px 0 16px; +} + +.view-switch img { + display: none; +} + +.view-switch a { + text-decoration: none; +} + +.view-switch > a { + display: inline-block; + width: 18px; + height: 18px; +} + +.view-switch > a:before { + color: #bbb; + content: '\f163'; + display: inline-block; + float: right; + font: normal 20px/1 'dashicons'; + speak: none; + vertical-align: middle; + margin-right: 0; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.view-switch a:hover:before { + color: #727272; +} + +.view-switch a.current:before { + color: #0074a2; +} + +.view-switch > a + a:before { + margin-right: 5px; + content: '\f164'; +} + +.filter { + float: right; + margin: -5px 10px 0 0; +} + +.filter .subsubsub { + margin-right: -10px; + margin-top: 13px; +} +.screen-per-page { + width: 4em; +} + +#posts-filter fieldset { + float: right; + margin: 0 0 1em 1.5ex; + padding: 0; +} + +#posts-filter fieldset legend { + padding: 0 1px .2em 0; +} + +p.pagenav { + margin: 0; + display: inline; +} + +.pagenav span { + font-weight: 600; + margin: 0 6px; +} + +.row-title { + font-size: 14px !important; + font-weight: 600; +} + +.column-comment .comment-author { + margin-bottom: 0.6em; +} + +.column-author img, +.column-username img, +.column-comment .comment-author img { + float: right; + margin-left: 10px; + margin-top: 1px; +} + +.row-actions { + color: #ddd; + font-size: 13px; + visibility: hidden; + padding: 2px 0 0; +} + +tr:hover .row-actions, +.mobile .row-actions, +.row-actions.visible, +div.comment-item:hover .row-actions { + visibility: visible; +} + +/* deprecated */ +.row-actions-visible { + padding: 2px 0 0; +} + + +/*------------------------------------------------------------------------------ + 10.1 - Inline Editing +------------------------------------------------------------------------------*/ + +/* +.quick-edit* is for Quick Edit +.bulk-edit* is for Bulk Edit +.inline-edit* is for everything +*/ + +/* Layout */ + +#wpbody-content .inline-edit-row fieldset { + font-size: 12px; + float: right; + margin: 0; + padding: 0; + width: 100%; +} + +tr.inline-edit-row td, +#wpbody-content .inline-edit-row fieldset .inline-edit-col { + padding: 0 0.5em; +} + +#wpbody-content .quick-edit-row-page fieldset.inline-edit-col-right .inline-edit-col { + border-width: 0 1px 0 0; + 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: left; + 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: 0.5em; + margin: 0.5em 0 0; +} + +.inline-edit-row span.error { + line-height: 22px; + margin: 0 15px; + padding: 3px 5px; +} + +/* Positioning */ +.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; + width: auto; +} + +.inline-edit-row fieldset label span.title { + display: block; + float: right; + width: 5em; +} + +.inline-edit-row fieldset label span.input-text-wrap { + display: block; + margin-right: 5em; +} + +.quick-edit-row-post fieldset.inline-edit-col-right label span.title { + width: auto; + padding-left: 0.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-left: 0.5em +} + +.inline-edit-col-right .input-text-wrap input.inline-edit-menu-order-input { + width: 6em; +} + +.inline-edit-save .spinner { + padding: 4px 10px 0; + vertical-align: top; + float: left; +} + +/* Styling */ +.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; +} + +/* Specific Elements */ +.inline-edit-row fieldset .inline-edit-date { + float: right; +} + +.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; +} + +ul.cat-checklist { + height: 12em; + border: solid 1px #ddd; + overflow-y: scroll; + padding: 0 5px; + margin: 0; + background-color: #fff; +} + +#bulk-titles { + display: block; + height: 12em; + border: 1px solid #ddd; + 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; + position: relative; /* RTL fix, #WP27629 */ +} + +.inline-edit-row fieldset ul.cat-checklist label, +.inline-edit-row #bulk-titles div { + font-style: normal; + font-size: 11px; +} + +.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%; +} + +.inline-edit-row #post_parent, +.inline-edit-row select[name="page_template"] { + max-width: 80%; +} + +.ie8 .inline-edit-row #post_parent, +.ie8 .inline-edit-row select[name="page_template"] { + width: 250px; +} + +.quick-edit-row-post fieldset label.inline-edit-status { + float: right; +} + +#bulk-titles { + line-height: 140%; +} +#bulk-titles div { + margin: 0.2em 0.3em; +} + +#bulk-titles div a { + cursor: pointer; + display: block; + float: right; + height: 18px; + margin: 0 -2px 0 3px; + overflow: hidden; + position: relative; + width: 20px; +} + +#bulk-titles div a:before { + position: relative; + top: -3px; +} + +/*------------------------------------------------------------------------------ + 17.0 - Plugins +------------------------------------------------------------------------------*/ + +.plugins tbody th.check-column, +.plugins tbody { + padding: 8px 2px 0 0; +} + +.plugins tbody th.check-column input[type=checkbox] { + margin-top: 4px; +} + +#update-plugins-table tbody td p { + margin-top: 0; +} + +#update-plugins-table tbody td p strong { + font-size: 14px; +} + +.plugins thead th.check-column, +.plugins tfoot th.check-column, +.plugins .inactive th.check-column { + padding-right: 6px; +} + +#update-plugins-table thead th.check-column, +#update-plugins-table tfoot th.check-column { + padding-top: 11px; +} + +.plugins, +.plugins th, +.plugins td { + color: #000; +} + +.plugins tr { + background: #fff; +} + +.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 2em 0 0; +} + +.plugins .desc ul { + list-style-type: disc; +} + +.plugins .row-actions { + font-size: 13px; + padding: 0; +} + +.plugins .inactive td, +.plugins .inactive th, +.plugins .active td, +.plugins .active th { + padding: 10px 9px; +} + +.plugins .active td, +.plugins .active th { + background-color: #f7fcfe; +} + +.plugins .update th, +.plugins .update td { + border-bottom: 0; +} + +.plugin-update-tr td { + border-top: 0; +} + +.plugins .inactive td, +.plugins .inactive th, +.plugins .active td, +.plugins .active th, +.plugin-install #the-list td, +.upgrade .plugins td, +.upgrade .plugins th { + -webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1); + box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1); +} + +.plugins tr.active.plugin-update-tr + tr.inactive th, +.plugins tr.active.plugin-update-tr + tr.inactive td, +.plugins tr.active + tr.inactive th, +.plugins tr.active + tr.inactive td { + border-top: 1px solid rgba(0,0,0,0.03); + -webkit-box-shadow: inset 0 1px 0 rgba(0,0,0,0.02), inset 0 -1px 0 #e1e1e1; + box-shadow: inset 0 1px 0 rgba(0,0,0,0.02), inset 0 -1px 0 #e1e1e1; +} + +.plugins .update td, +.plugins .update th, +.upgrade .plugins tr:last-of-type td, +.upgrade .plugins tr:last-of-type th, +.plugins tr.active + tr.inactive.update th, +.plugins tr.active + tr.inactive.update td { + -webkit-box-shadow: none; + box-shadow: none; +} + +.plugins .active.update td, +.plugins .active.update th, +tr.active.update + tr.plugin-update-tr .plugin-update { + background-color: #fef7f1; +} + +.plugins .active th.check-column { + border-right: 4px solid #2ea2cc; +} + +.plugins .active.update th.check-column, +.plugins .active.update + .plugin-update-tr .plugin-update { + border-right: 4px solid #d54e21; +} + +#wpbody-content .plugins .plugin-title, +#wpbody-content .plugins .theme-title { + padding-left: 12px; + white-space:nowrap; +} + +.plugins .inactive .plugin-title strong { + font-weight: 400; +} + +.plugins .second, +.plugins .row-actions { + padding: 0 0 5px; +} + +.plugins .update .second, +.plugins .update .row-actions { + 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 { + font-size: 13px; + font-weight: normal; + margin: 6px 12px 12px; + padding: 6px 12px; + margin: 0 31px 8px 10px; + background-color: #f7f7f7; + background-color: rgba(0,0,0,0.03); +} + +.plugin-update-tr .update-message:before { + color: #d54e21; + content: '\f463'; + display: inline-block; + font: normal 20px/1 'dashicons'; + speak: none; + margin: 0 -2px 0 8px; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + vertical-align: top; +} + +.plugins .plugin-update { + padding: 0; + border: none; + -webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1); + box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1); +} + +/* update notices for active plugins */ +tr.active + tr.plugin-update-tr .plugin-update { + background-color: #f7fcfe; +} + +tr.active + tr.plugin-update-tr .plugin-update .update-message { + background-color: #fcf3ef; +} + +.plugin-install-php h4 { + margin: 2.5em 0 8px; +} + +/* ms */ +/* Background Color for Site Status */ +.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; +} + +/* =Media Queries +-------------------------------------------------------------- */ + +/** + * HiDPI Displays + */ +@media screen and ( max-width: 782px ) { + /* WP List Table Options & Filters */ + .tablenav { + height: auto; + } + + .tablenav.top { + margin: 0; + } + + .tablenav.bottom { + position: relative; + margin-top: 15px; + } + + .tablenav br { + display: none; + } + + .tablenav br.clear { + display: block; + } + + .tablenav.top .actions, .view-switch { + display: none; + } + + /* Pagination */ + .tablenav.top .displaying-num { + display: none; + } + + .tablenav.bottom .displaying-num { + position: absolute; + left: 0; + top: 10px; + font-size: 14px; + } + + .tablenav-pages { + width: 100%; + text-align: center; + margin: 0 0 25px; + } + + .tablenav.bottom .tablenav-pages { + margin-top: 25px; + } + + .tablenav.top .tablenav-pages.one-page { + display: none; + } + + .tablenav.bottom .tablenav-pages.one-page { + margin: 15px 0 0 0; + height: 0; + } + + .tablenav-pages .pagination-links .paging-input { + font-size: 18px; + } + + .tablenav-pages .pagination-links a { + padding: 8px 20px 11px; + font-size: 18px; + background: rgba(0, 0, 0, 0.05); + } + + .tablenav-pages .pagination-links .current-page { + padding: 10px; + font-size: 14px; + } + + /* WP List Table Adjustments: General */ + .form-wrap > p { + display: none; + } + + .comment-count { + font-size: 14px; + } + + /* Columns to hide */ + .fixed .column-date, + .fixed .column-author, + .column-categories, + .column-tags, + .tags .column-description, + .media .column-parent, + .users .column-email, + .users .column-name, + .sites .column-registered, + .sites .column-users { + display: none; + } + + .fixed .column-comment .comment-author { + display: block; + } + + /* Posts */ + .column-title { + width: 85%; + } + + .fixed .column-comments, .widefat .check-column { + width: 35px + } + + .widefat thead .check-column, .widefat tfoot .check-column { + padding: 10px 0 10px; + } + + .widefat * { + word-wrap: normal; + } + + /* Quick Edit and Bulk Edit */ + #wpbody-content .quick-edit-row-post .inline-edit-col-left, + #wpbody-content .quick-edit-row-post .inline-edit-col-right, + #wpbody-content .inline-edit-row-post .inline-edit-col-center, + #wpbody-content .quick-edit-row-page .inline-edit-col-left, + #wpbody-content .quick-edit-row-page .inline-edit-col-right, + #wpbody-content .bulk-edit-row-post .inline-edit-col-right, + #wpbody-content .bulk-edit-row .inline-edit-col-left, + #wpbody-content .bulk-edit-row-page .inline-edit-col-right, + #wpbody-content .bulk-edit-row .inline-edit-col-bottom { + float: none; + width: 100%; + } + + #wpbody-content .quick-edit-row fieldset .inline-edit-col label, + #wpbody-content .quick-edit-row fieldset .inline-edit-group label, + #wpbody-content .bulk-edit-row fieldset .inline-edit-col label, + #wpbody-content .bulk-edit-row fieldset .inline-edit-group label { + max-width: none; + float: none; + margin-bottom: 5px; + } + + #wpbody .bulk-edit-row fieldset select { + display: block; + width: 100%; + max-width: none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + + .inline-edit-row fieldset ul.cat-checklist label, + .inline-edit-row #bulk-titles div { + font-size: 16px; + } + + .inline-edit-row fieldset label span.title { + float: none; + } + + .inline-edit-row fieldset label.inline-edit-tags { + padding: 0 0.5em; + } + + .inline-edit-row fieldset .inline-edit-col label.inline-edit-tags { + padding: 0; + } + + .inline-edit-row fieldset label span.input-text-wrap { + margin-right: 0; + } + + .inline-edit-row fieldset input[name=jj], + .inline-edit-row fieldset input[name=hh], + .inline-edit-row fieldset input[name=mn] { + width: 3em; + } + + .inline-edit-row fieldset input[name=aa] { + width: 4.5em; + } + + #bulk-titles div { + margin: 0.8em 0.3em; + } + + #bulk-titles div a { + height: 22px; + } + + /* Taxonomies */ + .tags .column-posts { + width: 50px; + } + + .tags .column-slug { + width: 30%; + } + + /* Comments */ + .comments .column-response { + width: 35%; + } + + /* Users */ + .users .column-role { + width: 35%; + } + + /* Network admin sites */ + .sites .column-blogname { + width: 55%; + } + + /* Updates */ + #wpbody-content #update-themes-table .plugin-title { + width: auto; + } + + /* Links */ + .link-manager-php #posts-filter { + margin-top: 25px; + } + + .link-manager-php .tablenav.bottom { + overflow: hidden; + } + + /* Plugin/Theme Management Page */ + .wp-list-table.plugins { + position: relative; + margin-top: 35px; + margin-bottom: 50px; + } + + .wp-list-table.plugins thead .column-description, + #wpbody-content .wp-list-table.plugins tfoot .column-description, + .wp-list-table.plugins th#description { + display: none; + } + + #wpbody-content .wp-list-table.plugins, + #wpbody-content .wp-list-table.plugins thead, + #wpbody-content .wp-list-table.plugins tbody, + #wpbody-content .wp-list-table.plugins tr, + #wpbody-content .wp-list-table.plugins .column-description, + #wpbody-content .wp-list-table.plugins .plugin-title, + #wpbody-content .wp-list-table.plugins .theme-title, + #wpbody-content .wp-list-table.plugins .plugin-update, + #wpbody-content .wp-list-table.plugins .manage-column.column-name { + display: block; + width: auto; + } + + .wp-list-table.plugins thead, + .wp-list-table.plugins tfoot { + position: absolute; + top: -35px; + right: 0; + left: 0; + width: auto; + height: 35px; + } + + .wp-list-table.plugins tfoot { + bottom: -35px; + top: auto; + } + + .active, .inactive { + padding-top: 0; + } + + .wp-list-table.plugins .plugin-title, + .wp-list-table.plugins .theme-title { + padding-top: 13px; + padding-bottom: 4px; + } + + .plugins tr.active + tr.inactive th.check-column, + .plugins tr.active + tr.inactive td, + .wp-list-table.plugins .plugin-title, + .wp-list-table.plugins .theme-title, + .wp-list-table.plugins tbody th { + -webkit-box-shadow: none; + box-shadow: none; + } + + .plugins tbody { + padding: 1px 0 0; + } + + .plugins tr.active + tr.inactive td.column-description { + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1); + } + + .plugins tr.active + tr.inactive th.check-column, + .plugins tr.active + tr.inactive td { + border-top: none; + } + + .wp-list-table.plugins .column-description { + padding-top: 0; + } + + .wp-list-table.plugins .manage-column.column-name, + .wp-list-table.plugins .column-description, + .wp-list-table.plugins .plugin-title, + .wp-list-table.plugins .theme-title { + padding-left: 12px; + padding-right: 46px; + } + + .wp-list-table.plugins tr { + position: relative; + } + + .wp-list-table.plugins th.check-column, + .wp-list-table.plugins tr.update th.check-column { + position: absolute; + height: auto; + top: 0; + bottom: 0; + right: 0; + padding-right: 2px; + padding-top: 18px; + } + + .wp-list-table.plugins thead th.check-column, + .wp-list-table.plugins tfoot th.check-column { + padding-right: 3px; + padding-top: 11px; + background: none; + } + + .widefat tbody th.check-column input[type="checkbox"] { + margin-top: -3px; + margin-right: 8px; + } + + .wp-list-table.plugins .active .check-column input, + .wp-list-table.plugins .update .check-column input { + margin-right: 5px; + } + + .wp-list-table.plugins thead .check-column input, + .wp-list-table.plugins tfoot .check-column input { + margin-top: -6px; + } + + .wp-list-table.plugins .active th.check-column { + background: none; + } + + .wp-list-table.plugins .plugin-title strong, + .wp-list-table.plugins .theme-title strong { + font-size: 1.4em; + line-height: 1.6em; + } + + /* Add New plugins page */ + table.plugin-install .column-name, + table.plugin-install .column-version, + table.plugin-install .column-rating, + table.plugin-install .column-description { + display: block; + width: auto; + } + + table.plugin-install th.column-name, + table.plugin-install th.column-version, + table.plugin-install th.column-rating, + table.plugin-install th.column-description { + display: none; + } + + table.plugin-install td.column-name strong { + font-size: 1.4em; + line-height: 1.6em; + } + + table.plugin-install #the-list td { + -webkit-box-shadow: none; + box-shadow: none; + } + + table.plugin-install #the-list tr { + display: block; + -webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1); + box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1); + } +} diff --git a/wp-admin/css/list-tables.css b/wp-admin/css/list-tables.css new file mode 100644 index 0000000..0b4115d --- /dev/null +++ b/wp-admin/css/list-tables.css @@ -0,0 +1,1619 @@ +/* List table styles */ +.post-com-count-wrapper { + min-width: 22px; +} + +.post-com-count { + background: none; + 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; + color: #fff; +} + +.post-com-count:after { /* draw bubble connector using CSS! */ + content: ""; + display: block; + width: 0; + height: 0; + margin-left: 8px; + border-top: 5px solid #bbb; + border-right: 5px solid transparent; +} + +.post-com-count span { + font-size: 11px; + font-weight: 600; + height: 1.4em; + line-height: 1.4em; + min-width: 0.7em; + padding: 0 6px; + display: inline-block; + -webkit-border-radius: 5px; + border-radius: 5px; + background-color: #bbb; + color: #fff; +} + +.post-com-count:hover { + background-position: center -3px; +} + +.post-com-count:hover span { + background-color: #2ea2cc; +} + +.post-com-count:hover:after { + border-top: 5px solid #2ea2cc; +} + +strong .post-com-count { + background-position: center -55px; +} + +strong .post-com-count span { + background-color: #0074a2; +} + +strong .post-com-count:after { + border-top: 5px solid #0074a2; +} + +.column-response .post-com-count { + float: left; + margin-right: 5px; + text-align: center; +} + +.response-links { + float: left; +} + +/* comments */ + +.commentlist li { + padding: 1em 1em .2em; + margin: 0; + border-bottom: 1px solid #ccc; +} + +.commentlist li li { + border-bottom: 0; + padding: 0; +} + +.commentlist p { + padding: 0; + margin: 0 0 .8em; +} + +#submitted-on, +.submitted-on { + color: #777; +} + +/* reply to comments */ +#replyrow td { + padding: 2px; +} + +#replysubmit { + margin: 0; + padding: 0 5px 3px; + text-align: center; +} + +#replysubmit .spinner { + padding: 2px 0 0; + vertical-align: top; + float: right; +} + +#replysubmit .button { + margin-right: 5px; +} + +#replysubmit .error { + color: red; + line-height: 21px; + text-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; + -webkit-box-shadow: none; + box-shadow: none; +} + +#replyerror { + border-color: #ddd; + background-color: #f9f9f9; +} + +/* @todo: is this used? */ +.commentlist .avatar { + vertical-align: text-top; +} + +#the-comment-list .attachment-80x60 { + padding: 4px 8px; +} + +#the-comment-list tr.undo, +#the-comment-list div.undo { + background-color: #f4f4f4; +} + +#the-comment-list .unapproved th, +#the-comment-list .unapproved td { + background-color: #fef7f1; +} + +#the-comment-list .unapproved th.check-column { + border-left: 4px solid #d54e21; +} + +#the-comment-list .unapproved th.check-column input { + margin-left: 4px; +} + +#the-comment-list .approve a { + color: #006505; +} + +#the-comment-list .unapprove a { + color: #d98500; +} + +#the-comment-list th, +#the-comment-list td { + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1); +} + +#the-comment-list tr:last-child th, +#the-comment-list tr:last-child td { + -webkit-box-shadow: none; + box-shadow: none; +} + +#the-comment-list tr.unapproved + tr.approved th, +#the-comment-list tr.unapproved + tr.approved td { + border-top: 1px solid rgba(0, 0, 0, 0.03); +} + +/* table vim shortcuts */ +.vim-current, +.vim-current th, +.vim-current td { + background-color: #e4f2fd !important; +} + +th .comment-grey-bubble { + height: 16px; + width: 16px; +} + +th .comment-grey-bubble:before { + content: '\f101'; + font: normal 20px/.5 'dashicons'; + speak: none; + display: inline-block; + padding: 0; + top: 4px; + left: -4px; + position: relative; + vertical-align: top; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-decoration: none !important; + color: #444; +} + +/*------------------------------------------------------------------------------ + 10.0 - List Posts (/Pages/etc) +------------------------------------------------------------------------------*/ + +table.fixed { + table-layout: fixed; +} + +.fixed .column-rating, +.fixed .column-visible { + width: 8%; +} + +.fixed .column-posts, +.fixed .column-date, +.fixed .column-parent, +.fixed .column-links, +.fixed .column-author, +.fixed .column-format { + width: 10%; +} + +.fixed .column-comment .comment-author { + display: none; +} + +.fixed .column-response, +.fixed .column-categories, +.fixed .column-tags, +.fixed .column-rel, +.fixed .column-role { + width: 15%; +} + +.fixed .column-slug { + width: 25%; +} + +.fixed .column-locations { + width: 35%; +} + +.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-icon { + width: 80px; +} + +/* @todo: pick a consistent list table selector */ +.wp-list-table a { + -webkit-transition: none; + transition: none; +} + +#the-list tr:last-child td, +#the-list tr:last-child th { + border-bottom: none !important; + -webkit-box-shadow: none; + box-shadow: none; +} + +#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: 0.6em 0; + padding: 0; +} + +#commentsdiv #replyrow td { + padding: 0; +} + +#commentsdiv p { + padding: 8px 10px; + margin: 0; +} + +#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 .spinner { + padding-left: 5px; +} + +.sorting-indicator { + display: none; + width: 10px; + height: 4px; + margin-top: 8px; + margin-left: 7px; +} + +.sorting-indicator:before { + background: none; + content: '\f142'; + font: normal 20px/1 'dashicons'; + speak: none; + display: inline-block; + padding: 0; + top: -4px; + left: -8px; + color: #444; + line-height: 10px; + position: relative; + vertical-align: top; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-decoration: none !important; + color: #444; +} + +.column-comments .sorting-indicator:before { + top: 0; + left: -10px; +} + +th.sorted.asc .sorting-indicator:before, +th.desc:hover span.sorting-indicator:before { + content: '\f142'; +} + +th.sorted.desc .sorting-indicator:before, +th.asc:hover span.sorting-indicator:before { + content: '\f140'; +} + +tr.wp-locked .locked-indicator { + margin-left: 6px; + height: 20px; + width: 16px; +} + +tr.wp-locked .locked-indicator:before { + color: #888; + content: '\f160'; + display: inline-block; + float: left; + font: normal 20px/1 'dashicons'; + speak: none; + vertical-align: middle; + margin-left: 0; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +tr.wp-locked .check-column label, +tr.wp-locked .check-column input[type="checkbox"], +tr.wp-locked .row-actions .inline, +tr.wp-locked .row-actions .trash { + display: none; +} + +tr .locked-info { + height: 0; + opacity: 0; +} + +tr.wp-locked .locked-info { + margin-top: 8px; + height: auto; + opacity: 1; +} + +.locked-text { + vertical-align: top; +} + +tr.locked-info, tr.wp-locked .locked-info { + -webkit-transition: height 1s, opacity 0.5s; + transition: height 1s, opacity 0.5s; +} + +.fixed .column-comments .sorting-indicator { + margin-top: 3px; +} + +#menu-locations-wrap .widefat { + width: 60%; +} + +.widefat th.sortable, +.widefat th.sorted { + padding: 0; +} + +th.sortable a, +th.sorted a { + display: block; + overflow: hidden; + padding: 7px 7px 8px 10px; +} + +th.manage-column a, +th.sortable a:hover, +th.sortable a:active, +th.sortable a:focus { + color: #333; +} + +th.sortable a:focus { + background: #e1e1e1; +} + +.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; +} + +/* Bulk Actions */ +.tablenav-pages a { + font-weight: 600; + margin-right: 1px; + padding: 0 2px; +} +.tablenav-pages .current-page { + padding-top: 0; + 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; + color: #555; + 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 { + padding: 0 10px 3px; + background: #eee; + background: rgba( 0, 0, 0, 0.05 ); + font-size: 16px; + font-weight: normal; +} + +.tablenav .tablenav-pages a:hover, +.tablenav .tablenav-pages a:focus { + color: #fff; + background: #2ea2cc; +} + +.tablenav .tablenav-pages a.disabled, +.tablenav .tablenav-pages a.disabled:hover, +.tablenav .tablenav-pages a.disabled:focus, +.tablenav .tablenav-pages a.disabled:active { + color: #aaa; + background: #eee; + background: rgba( 0, 0, 0, 0.05 ); +} + +.tablenav .displaying-num { + margin-right: 2px; + color: #777; + font-size: 12px; + font-style: italic; +} + +.tablenav .actions { + overflow: hidden; + padding: 2px 8px 0 0; +} + +.tablenav .delete { + margin-right: 20px; +} + +/* @todo: unclear if the following tablenav rules are actually used. +classes exist in paginate_links() but not seen in list table output. */ +.tablenav .dots { + border-color: transparent; +} + +.tablenav .next, +.tablenav .prev { + border-color: transparent; + color: #0074a2; +} + +.tablenav .next:hover, +.tablenav .prev:hover { + border-color: transparent; + color: #2ea2cc; +} + +.view-switch { + float: right; + margin: 5px 16px 0 8px; +} + +.view-switch img { + display: none; +} + +.view-switch a { + text-decoration: none; +} + +.view-switch > a { + display: inline-block; + width: 18px; + height: 18px; +} + +.view-switch > a:before { + color: #bbb; + content: '\f163'; + display: inline-block; + float: left; + font: normal 20px/1 'dashicons'; + speak: none; + vertical-align: middle; + margin-left: 0; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.view-switch a:hover:before { + color: #727272; +} + +.view-switch a.current:before { + color: #0074a2; +} + +.view-switch > a + a:before { + margin-left: 5px; + content: '\f164'; +} + +.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; +} + +p.pagenav { + margin: 0; + display: inline; +} + +.pagenav span { + font-weight: 600; + margin: 0 6px; +} + +.row-title { + font-size: 14px !important; + font-weight: 600; +} + +.column-comment .comment-author { + margin-bottom: 0.6em; +} + +.column-author img, +.column-username img, +.column-comment .comment-author img { + float: left; + margin-right: 10px; + margin-top: 1px; +} + +.row-actions { + color: #ddd; + font-size: 13px; + visibility: hidden; + padding: 2px 0 0; +} + +tr:hover .row-actions, +.mobile .row-actions, +.row-actions.visible, +div.comment-item:hover .row-actions { + visibility: visible; +} + +/* deprecated */ +.row-actions-visible { + padding: 2px 0 0; +} + + +/*------------------------------------------------------------------------------ + 10.1 - Inline Editing +------------------------------------------------------------------------------*/ + +/* +.quick-edit* is for Quick Edit +.bulk-edit* is for Bulk Edit +.inline-edit* is for everything +*/ + +/* Layout */ + +#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 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: 0.5em; + margin: 0.5em 0 0; +} + +.inline-edit-row span.error { + line-height: 22px; + margin: 0 15px; + padding: 3px 5px; +} + +/* Positioning */ +.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; + width: auto; +} + +.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: 0.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: 0.5em +} + +.inline-edit-col-right .input-text-wrap input.inline-edit-menu-order-input { + width: 6em; +} + +.inline-edit-save .spinner { + padding: 4px 10px 0; + vertical-align: top; + float: right; +} + +/* Styling */ +.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; +} + +/* Specific Elements */ +.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; +} + +ul.cat-checklist { + height: 12em; + border: solid 1px #ddd; + overflow-y: scroll; + padding: 0 5px; + margin: 0; + background-color: #fff; +} + +#bulk-titles { + display: block; + height: 12em; + border: 1px solid #ddd; + 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; + position: relative; /* RTL fix, #WP27629 */ +} + +.inline-edit-row fieldset ul.cat-checklist label, +.inline-edit-row #bulk-titles div { + font-style: normal; + font-size: 11px; +} + +.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%; +} + +.inline-edit-row #post_parent, +.inline-edit-row select[name="page_template"] { + max-width: 80%; +} + +.ie8 .inline-edit-row #post_parent, +.ie8 .inline-edit-row select[name="page_template"] { + width: 250px; +} + +.quick-edit-row-post fieldset label.inline-edit-status { + float: left; +} + +#bulk-titles { + line-height: 140%; +} +#bulk-titles div { + margin: 0.2em 0.3em; +} + +#bulk-titles div a { + cursor: pointer; + display: block; + float: left; + height: 18px; + margin: 0 3px 0 -2px; + overflow: hidden; + position: relative; + width: 20px; +} + +#bulk-titles div a:before { + position: relative; + top: -3px; +} + +/*------------------------------------------------------------------------------ + 17.0 - Plugins +------------------------------------------------------------------------------*/ + +.plugins tbody th.check-column, +.plugins tbody { + padding: 8px 0 0 2px; +} + +.plugins tbody th.check-column input[type=checkbox] { + margin-top: 4px; +} + +#update-plugins-table tbody td p { + margin-top: 0; +} + +#update-plugins-table tbody td p strong { + font-size: 14px; +} + +.plugins thead th.check-column, +.plugins tfoot th.check-column, +.plugins .inactive th.check-column { + padding-left: 6px; +} + +#update-plugins-table thead th.check-column, +#update-plugins-table tfoot th.check-column { + padding-top: 11px; +} + +.plugins, +.plugins th, +.plugins td { + color: #000; +} + +.plugins tr { + background: #fff; +} + +.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 { + font-size: 13px; + padding: 0; +} + +.plugins .inactive td, +.plugins .inactive th, +.plugins .active td, +.plugins .active th { + padding: 10px 9px; +} + +.plugins .active td, +.plugins .active th { + background-color: #f7fcfe; +} + +.plugins .update th, +.plugins .update td { + border-bottom: 0; +} + +.plugin-update-tr td { + border-top: 0; +} + +.plugins .inactive td, +.plugins .inactive th, +.plugins .active td, +.plugins .active th, +.plugin-install #the-list td, +.upgrade .plugins td, +.upgrade .plugins th { + -webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1); + box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1); +} + +.plugins tr.active.plugin-update-tr + tr.inactive th, +.plugins tr.active.plugin-update-tr + tr.inactive td, +.plugins tr.active + tr.inactive th, +.plugins tr.active + tr.inactive td { + border-top: 1px solid rgba(0,0,0,0.03); + -webkit-box-shadow: inset 0 1px 0 rgba(0,0,0,0.02), inset 0 -1px 0 #e1e1e1; + box-shadow: inset 0 1px 0 rgba(0,0,0,0.02), inset 0 -1px 0 #e1e1e1; +} + +.plugins .update td, +.plugins .update th, +.upgrade .plugins tr:last-of-type td, +.upgrade .plugins tr:last-of-type th, +.plugins tr.active + tr.inactive.update th, +.plugins tr.active + tr.inactive.update td { + -webkit-box-shadow: none; + box-shadow: none; +} + +.plugins .active.update td, +.plugins .active.update th, +tr.active.update + tr.plugin-update-tr .plugin-update { + background-color: #fef7f1; +} + +.plugins .active th.check-column { + border-left: 4px solid #2ea2cc; +} + +.plugins .active.update th.check-column, +.plugins .active.update + .plugin-update-tr .plugin-update { + border-left: 4px solid #d54e21; +} + +#wpbody-content .plugins .plugin-title, +#wpbody-content .plugins .theme-title { + padding-right: 12px; + white-space:nowrap; +} + +.plugins .inactive .plugin-title strong { + font-weight: 400; +} + +.plugins .second, +.plugins .row-actions { + padding: 0 0 5px; +} + +.plugins .update .second, +.plugins .update .row-actions { + 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 { + font-size: 13px; + font-weight: normal; + margin: 6px 12px 12px; + padding: 6px 12px; + margin: 0 10px 8px 31px; + background-color: #f7f7f7; + background-color: rgba(0,0,0,0.03); +} + +.plugin-update-tr .update-message:before { + color: #d54e21; + content: '\f463'; + display: inline-block; + font: normal 20px/1 'dashicons'; + speak: none; + margin: 0 8px 0 -2px; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + vertical-align: top; +} + +.plugins .plugin-update { + padding: 0; + border: none; + -webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1); + box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1); +} + +/* update notices for active plugins */ +tr.active + tr.plugin-update-tr .plugin-update { + background-color: #f7fcfe; +} + +tr.active + tr.plugin-update-tr .plugin-update .update-message { + background-color: #fcf3ef; +} + +.plugin-install-php h4 { + margin: 2.5em 0 8px; +} + +/* ms */ +/* Background Color for Site Status */ +.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; +} + +/* =Media Queries +-------------------------------------------------------------- */ + +/** + * HiDPI Displays + */ +@media screen and ( max-width: 782px ) { + /* WP List Table Options & Filters */ + .tablenav { + height: auto; + } + + .tablenav.top { + margin: 0; + } + + .tablenav.bottom { + position: relative; + margin-top: 15px; + } + + .tablenav br { + display: none; + } + + .tablenav br.clear { + display: block; + } + + .tablenav.top .actions, .view-switch { + display: none; + } + + /* Pagination */ + .tablenav.top .displaying-num { + display: none; + } + + .tablenav.bottom .displaying-num { + position: absolute; + right: 0; + top: 10px; + font-size: 14px; + } + + .tablenav-pages { + width: 100%; + text-align: center; + margin: 0 0 25px; + } + + .tablenav.bottom .tablenav-pages { + margin-top: 25px; + } + + .tablenav.top .tablenav-pages.one-page { + display: none; + } + + .tablenav.bottom .tablenav-pages.one-page { + margin: 15px 0 0 0; + height: 0; + } + + .tablenav-pages .pagination-links .paging-input { + font-size: 18px; + } + + .tablenav-pages .pagination-links a { + padding: 8px 20px 11px; + font-size: 18px; + background: rgba(0, 0, 0, 0.05); + } + + .tablenav-pages .pagination-links .current-page { + padding: 10px; + font-size: 14px; + } + + /* WP List Table Adjustments: General */ + .form-wrap > p { + display: none; + } + + .comment-count { + font-size: 14px; + } + + /* Columns to hide */ + .fixed .column-date, + .fixed .column-author, + .column-categories, + .column-tags, + .tags .column-description, + .media .column-parent, + .users .column-email, + .users .column-name, + .sites .column-registered, + .sites .column-users { + display: none; + } + + .fixed .column-comment .comment-author { + display: block; + } + + /* Posts */ + .column-title { + width: 85%; + } + + .fixed .column-comments, .widefat .check-column { + width: 35px + } + + .widefat thead .check-column, .widefat tfoot .check-column { + padding: 10px 0 10px; + } + + .widefat * { + word-wrap: normal; + } + + /* Quick Edit and Bulk Edit */ + #wpbody-content .quick-edit-row-post .inline-edit-col-left, + #wpbody-content .quick-edit-row-post .inline-edit-col-right, + #wpbody-content .inline-edit-row-post .inline-edit-col-center, + #wpbody-content .quick-edit-row-page .inline-edit-col-left, + #wpbody-content .quick-edit-row-page .inline-edit-col-right, + #wpbody-content .bulk-edit-row-post .inline-edit-col-right, + #wpbody-content .bulk-edit-row .inline-edit-col-left, + #wpbody-content .bulk-edit-row-page .inline-edit-col-right, + #wpbody-content .bulk-edit-row .inline-edit-col-bottom { + float: none; + width: 100%; + } + + #wpbody-content .quick-edit-row fieldset .inline-edit-col label, + #wpbody-content .quick-edit-row fieldset .inline-edit-group label, + #wpbody-content .bulk-edit-row fieldset .inline-edit-col label, + #wpbody-content .bulk-edit-row fieldset .inline-edit-group label { + max-width: none; + float: none; + margin-bottom: 5px; + } + + #wpbody .bulk-edit-row fieldset select { + display: block; + width: 100%; + max-width: none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + + .inline-edit-row fieldset ul.cat-checklist label, + .inline-edit-row #bulk-titles div { + font-size: 16px; + } + + .inline-edit-row fieldset label span.title { + float: none; + } + + .inline-edit-row fieldset label.inline-edit-tags { + padding: 0 0.5em; + } + + .inline-edit-row fieldset .inline-edit-col label.inline-edit-tags { + padding: 0; + } + + .inline-edit-row fieldset label span.input-text-wrap { + margin-left: 0; + } + + .inline-edit-row fieldset input[name=jj], + .inline-edit-row fieldset input[name=hh], + .inline-edit-row fieldset input[name=mn] { + width: 3em; + } + + .inline-edit-row fieldset input[name=aa] { + width: 4.5em; + } + + #bulk-titles div { + margin: 0.8em 0.3em; + } + + #bulk-titles div a { + height: 22px; + } + + /* Taxonomies */ + .tags .column-posts { + width: 50px; + } + + .tags .column-slug { + width: 30%; + } + + /* Comments */ + .comments .column-response { + width: 35%; + } + + /* Users */ + .users .column-role { + width: 35%; + } + + /* Network admin sites */ + .sites .column-blogname { + width: 55%; + } + + /* Updates */ + #wpbody-content #update-themes-table .plugin-title { + width: auto; + } + + /* Links */ + .link-manager-php #posts-filter { + margin-top: 25px; + } + + .link-manager-php .tablenav.bottom { + overflow: hidden; + } + + /* Plugin/Theme Management Page */ + .wp-list-table.plugins { + position: relative; + margin-top: 35px; + margin-bottom: 50px; + } + + .wp-list-table.plugins thead .column-description, + #wpbody-content .wp-list-table.plugins tfoot .column-description, + .wp-list-table.plugins th#description { + display: none; + } + + #wpbody-content .wp-list-table.plugins, + #wpbody-content .wp-list-table.plugins thead, + #wpbody-content .wp-list-table.plugins tbody, + #wpbody-content .wp-list-table.plugins tr, + #wpbody-content .wp-list-table.plugins .column-description, + #wpbody-content .wp-list-table.plugins .plugin-title, + #wpbody-content .wp-list-table.plugins .theme-title, + #wpbody-content .wp-list-table.plugins .plugin-update, + #wpbody-content .wp-list-table.plugins .manage-column.column-name { + display: block; + width: auto; + } + + .wp-list-table.plugins thead, + .wp-list-table.plugins tfoot { + position: absolute; + top: -35px; + left: 0; + right: 0; + width: auto; + height: 35px; + } + + .wp-list-table.plugins tfoot { + bottom: -35px; + top: auto; + } + + .active, .inactive { + padding-top: 0; + } + + .wp-list-table.plugins .plugin-title, + .wp-list-table.plugins .theme-title { + padding-top: 13px; + padding-bottom: 4px; + } + + .plugins tr.active + tr.inactive th.check-column, + .plugins tr.active + tr.inactive td, + .wp-list-table.plugins .plugin-title, + .wp-list-table.plugins .theme-title, + .wp-list-table.plugins tbody th { + -webkit-box-shadow: none; + box-shadow: none; + } + + .plugins tbody { + padding: 1px 0 0; + } + + .plugins tr.active + tr.inactive td.column-description { + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1); + } + + .plugins tr.active + tr.inactive th.check-column, + .plugins tr.active + tr.inactive td { + border-top: none; + } + + .wp-list-table.plugins .column-description { + padding-top: 0; + } + + .wp-list-table.plugins .manage-column.column-name, + .wp-list-table.plugins .column-description, + .wp-list-table.plugins .plugin-title, + .wp-list-table.plugins .theme-title { + padding-right: 12px; + padding-left: 46px; + } + + .wp-list-table.plugins tr { + position: relative; + } + + .wp-list-table.plugins th.check-column, + .wp-list-table.plugins tr.update th.check-column { + position: absolute; + height: auto; + top: 0; + bottom: 0; + left: 0; + padding-left: 2px; + padding-top: 18px; + } + + .wp-list-table.plugins thead th.check-column, + .wp-list-table.plugins tfoot th.check-column { + padding-left: 3px; + padding-top: 11px; + background: none; + } + + .widefat tbody th.check-column input[type="checkbox"] { + margin-top: -3px; + margin-left: 8px; + } + + .wp-list-table.plugins .active .check-column input, + .wp-list-table.plugins .update .check-column input { + margin-left: 5px; + } + + .wp-list-table.plugins thead .check-column input, + .wp-list-table.plugins tfoot .check-column input { + margin-top: -6px; + } + + .wp-list-table.plugins .active th.check-column { + background: none; + } + + .wp-list-table.plugins .plugin-title strong, + .wp-list-table.plugins .theme-title strong { + font-size: 1.4em; + line-height: 1.6em; + } + + /* Add New plugins page */ + table.plugin-install .column-name, + table.plugin-install .column-version, + table.plugin-install .column-rating, + table.plugin-install .column-description { + display: block; + width: auto; + } + + table.plugin-install th.column-name, + table.plugin-install th.column-version, + table.plugin-install th.column-rating, + table.plugin-install th.column-description { + display: none; + } + + table.plugin-install td.column-name strong { + font-size: 1.4em; + line-height: 1.6em; + } + + table.plugin-install #the-list td { + -webkit-box-shadow: none; + box-shadow: none; + } + + table.plugin-install #the-list tr { + display: block; + -webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1); + box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1); + } +} diff --git a/wp-admin/css/login-rtl.css b/wp-admin/css/login-rtl.css new file mode 100644 index 0000000..a3c7bed --- /dev/null +++ b/wp-admin/css/login-rtl.css @@ -0,0 +1,270 @@ +@import url(forms.css); +@import url(l10n.css); + +html, +body { + height: 100%; + margin: 0; + padding: 0; +} + +html { + background: #f1f1f1; +} + +body { + background: #f1f1f1; + min-width: 0; + color: #444; + font-family: "Open Sans", sans-serif; + font-size: 13px; + line-height: 1.4em; +} + +a { + color: #0074a2; + -webkit-transition-property: border, background, color; + transition-property: border, background, color; + -webkit-transition-duration: .05s; + transition-duration: .05s; + -webkit-transition-timing-function: ease-in-out; + transition-timing-function: ease-in-out; +} + +a { + outline: 0; +} + +a:hover, +a:active { + color: #2ea2cc; +} + +a:focus { + color: #124964; +} + +a:focus, +a:active { + outline: thin dotted; +} + +p { + line-height: 1.5; +} + +.login .message { + border-right: 4px solid #7ad03a; + padding: 1px 12px; + background-color: #fff; + -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1); + box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1); +} + +.login #login_error { + border-right: 4px solid #dd3d36; + background: #fff; + -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1); + box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1); +} + +#loginform p.submit, +.login-action-lostpassword p.submit { + border: none; + margin: -10px 0 20px; /* May want to revisit this */ +} + +.login * { + margin: 0; + padding: 0; +} + +.login form { + margin-top: 20px; + margin-right: 0; + padding: 26px 24px 46px; + font-weight: normal; + overflow: hidden; + background: #fff; + -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.13); + box-shadow: 0 1px 3px rgba(0,0,0,0.13); +} + +.login form .forgetmenot { + font-weight: normal; + float: right; + margin-bottom: 0; +} + +.login .button-primary { + float: left; +} + +#login form p { + margin-bottom: 0; +} + +#login form p.submit { + margin: 0; + padding: 0; +} + +.login label { + color: #777; + font-size: 14px; +} + +.login form .forgetmenot label { + font-size: 12px; + line-height: 19px; +} + +.login h1 { + text-align: center; +} + +.login h1 a { + background-image: url(../images/w-logo-blue.png?ver=20131202); + background-image: none, url(../images/wordpress-logo.svg?ver=20131107); + -webkit-background-size: 80px 80px; + background-size: 80px 80px; + background-position: center top; + background-repeat: no-repeat; + color: #999; + height: 80px; + font-size: 20px; + font-weight: normal; + line-height: 1.3em; + margin: 0 auto 25px; + padding: 0; + text-decoration: none; + width: 80px; + text-indent: -9999px; + outline: none; + overflow: hidden; + display: block; +} + +#login { + width: 320px; + padding: 8% 0 0; + margin: auto; +} + +#login_error, +.login .message { + margin-right: 0; + padding: 12px; +} + +.login #nav, +.login #backtoblog { + font-size: 13px; + padding: 0 24px 0; +} + +.login #nav { + margin: 24px 0 0 0; +} + +#backtoblog { + margin: 16px 0 0 0; +} + +.login #nav a, +.login #backtoblog a { + text-decoration: none; + color: #999; +} + +.login #nav a:hover, +.login #backtoblog a:hover, +.login h1 a:hover { + color: #2ea2cc; +} + +.login form .input, +.login input[type="text"] { + font-size: 24px; + line-height: 1; + width: 100%; + padding: 3px; + margin: 2px 0 16px 6px; +} + +.login form .input, +.login input[type="text"], +.login form input[type="checkbox"] { + background: #fbfbfb; +} + +.ie7 .login form .input, +.ie8 .login form .input { + font-family: sans-serif; +} + +.login #pass-strength-result { + width: 250px; + font-weight: 600; + 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-right: 0; +} + +.mobile #login #nav, +.mobile #login #backtoblog { + margin-right: 8px; +} + +.mobile #login h1 a { + width: auto; +} + +body.interim-login { + height: auto; +} + +.interim-login #login { + padding: 0; + margin: 5px auto 20px; +} + +.interim-login.login h1 a { + width: auto; +} + +.interim-login #login_error, +.interim-login.login .message { + margin: 0 0 16px; +} + +.interim-login.login form { + margin: 0; +} + +@-ms-viewport { + width: device-width; +} + +@media screen and ( max-width: 782px ) { + .interim-login input[type=checkbox] { + height: 16px; + width: 16px; + } + + .interim-login input[type=checkbox]:checked:before { + width: 16px; + font: normal 21px/1 'dashicons'; + margin: -3px -4px 0 0; + } +} \ No newline at end of file diff --git a/wp-admin/css/login-rtl.min.css b/wp-admin/css/login-rtl.min.css new file mode 100644 index 0000000..52197f3 --- /dev/null +++ b/wp-admin/css/login-rtl.min.css @@ -0,0 +1 @@ +input,input[type=email],input[type=number],input[type=password],input[type=search],input[type=text],input[type=url],textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=email],input[type=url]{direction:ltr}input[type=checkbox],input[type=radio]{border:1px solid #bbb;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 4px 0 0;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}input[type=radio]:checked+label:before{color:#888}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#2ea2cc}.wp-admin p input[type=checkbox],.wp-admin p input[type=radio],td>input[type=checkbox]{margin-top:0}.wp-admin p label input[type=checkbox]{margin-top:-4px}.wp-admin p label input[type=radio]{margin-top:-2px}input[type=radio]{-webkit-border-radius:50%;border-radius:50%;margin-right:4px;line-height:10px}input[type=checkbox]:checked:before,input[type=radio]:checked:before{float:left;display:inline-block;vertical-align:middle;width:16px;font:400 21px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}input[type=checkbox]:checked:before{content:'\f147';margin:-3px 0 0 -4px;color:#1e8cbe}input[type=radio]:checked:before{content:'\2022';text-indent:-9999px;-webkit-border-radius:50px;border-radius:50px;font-size:24px;width:6px;height:6px;margin:4px;line-height:16px;background-color:#1e8cbe}input.readonly,textarea.readonly{background-color:#ddd}@-moz-document url-prefix(){.form-table input.tog,input[type=checkbox],input[type=radio]{margin-bottom:-1px}}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-decoration{display:none}.ie8 input[type=password]{font-family:sans-serif}button,input,select,textarea{font-family:inherit;font-size:inherit;font-weight:inherit}input,select,textarea{font-size:14px;padding:3px 5px;line-height:15px;-webkit-border-radius:0;border-radius:0}textarea{overflow:auto;padding:2px 6px;line-height:1.4}input[type=email],input[type=number],input[type=password],input[type=search],input[type=text],input[type=url],select,textarea{outline:0}.wp-admin input[type=file]{padding:3px 0}label{cursor:pointer}input,select{margin:1px;padding:3px 5px}input.code{padding-top:6px}textarea.code{line-height:1.4;padding:4px 6px 1px}input[type=email],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=url],select,textarea{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#333;-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}select[disabled]{color:#7f7f7f}input[type=checkbox]:focus,input[type=email]:focus,input[type=number]:focus,input[type=password]:focus,input[type=radio]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=url]:focus,select:focus,textarea:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}input[readonly]{background-color:#eee}.wp-core-ui :-moz-placeholder,:-moz-placeholder{color:#a9a9a9}.form-invalid{background-color:#ffebe8!important}.form-invalid input,.form-invalid select{border-color:#c00!important}.form-input-tip{color:#666}input.disabled,input:disabled,textarea.disabled,textarea:disabled{-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.04);box-shadow:inset 0 1px 2px rgba(0,0,0,.04);border-color:rgba(222,222,222,.75);background:rgba(255,255,255,.5);color:rgba(51,51,51,.5)}input[type=checkbox]:disabled,input[type=checkbox]:disabled:checked:before,input[type=radio]:disabled,input[type=radio]:disabled:checked:before{opacity:.7}.wp-admin select{padding:2px;line-height:28px;height:28px;vertical-align:middle}.wp-admin .button-cancel{padding:0 5px;line-height:2}.meta-box-sortables select{max-width:100%}.wp-admin select[multiple]{height:auto}.submit{padding:1.5em 0;margin:5px 0;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;border:0}form p.submit a.cancel:hover{text-decoration:none}p.submit{text-align:left;max-width:100%;margin-top:20px;padding-top:10px}.textright p.submit{border:0;text-align:right}table.form-table+input+input+p.submit,table.form-table+input+p.submit,table.form-table+p.submit{border-top:0;padding-top:0}#major-publishing-actions input,#minor-publishing-actions .preview,#minor-publishing-actions input{text-align:center}input.all-options,textarea.all-options{width:250px}input.large-text,textarea.large-text{width:99%}#adduser .form-field input,input.regular-text{width:25em}input.small-text{width:50px;padding:1px 6px}input[type=number].small-text{width:65px}#doaction,#doaction2,#post-query-submit{margin:1px 8px 0 0}.tablenav #changeit,.tablenav #clear-recent-list,.tablenav #delete_all{margin-top:1px}.tablenav .actions select{float:left;margin-right:6px;max-width:200px}.ie8 .tablenav .actions select{width:155px}.ie8 .tablenav .actions select#cat{width:200px}#timezone_string option{margin-left:1em}#upload-form label{color:#777}#your-profile label+a,fieldset label,label{vertical-align:middle}#misc-publishing-actions label,.options-media-php label[for*="_size_"]{vertical-align:baseline}#misc-publishing-actions label[for=post_status]:before{content:'\f173';display:inline-block;font:400 20px/1 dashicons;speak:none;left:-1px;padding:0 5px 0 0;position:relative;top:0;text-decoration:none!important;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#pass-strength-result{background-color:#eee;border:1px solid #ddd;float:left;margin:13px 5px 5px 1px;padding:3px 5px;text-align:center;width:200px;display:none}#pass-strength-result.short{background-color:#ffa0a0;border-color:#f04040}#pass-strength-result.bad{background-color:#ffb78c;border-color:#ff853c}#pass-strength-result.good{background-color:#ffec8b;border-color:#fc0}#pass-strength-result.strong{background-color:#c3ff88;border-color:#8dff1c}.indicator-hint{padding-top:8px}p.search-box{float:right;margin:0}.network-admin.themes-php p.search-box{clear:left}#search-plugins input[name="s"],.search-box input[name="s"],.tagsdiv .newtag{float:left;height:28px;margin:0 4px 0 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{-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}.ui-autocomplete{padding:0;margin:0;list-style:none;position:absolute;z-index:10000;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;border:1px solid #aaa;background-color:#efefef}.ui-autocomplete li{margin-bottom:0;white-space:nowrap;text-align:left}.ui-autocomplete li a{display:block;height:100%;padding:4px 10px;color:#444}.ui-autocomplete li a.ui-state-focus{background-color:#ddd;cursor:pointer}.form-table{border-collapse:collapse;margin-top:.5em;width:100%;clear:both}.form-table,.form-table td,.form-table td p,.form-table th,.form-wrap label{font-size:14px}.form-table td{margin-bottom:9px;padding:15px 10px;line-height:1.3;vertical-align:middle}.form-table th,.form-wrap label{color:#222;font-weight:400;text-shadow:none;vertical-align:baseline}.form-table th{vertical-align:top;text-align:left;padding:20px 10px 20px 0;width:200px;line-height:1.3;font-weight:600}.form-table th.th-full{width:auto;font-weight:400}.form-table td p{margin-top:4px;margin-bottom:0}.form-table td fieldset label{margin:.25em 0 .5em!important;display:inline-block}.form-table td fieldset label,.form-table td fieldset li,.form-table td fieldset p{line-height:1.4em}.form-table input.tog,.form-table input[type=radio]{margin-top:-4px;margin-right:4px;float:none}.form-table .pre{padding:8px;margin:0}table.form-table td .updated{font-size:13px}#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}#display_name{width:15em}#createuser .form-field input{width:25em}.color-option{display:inline-block;width:24%;padding:5px 15px 15px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:3px}.color-option.selected,.color-option:hover{background:#ddd}.color-palette{width:100%;border-spacing:0;border-collapse:collapse}.color-palette td{height:20px;padding:0;border:0}.color-option{cursor:pointer}.tool-box .title{margin:8px 0;font-size:18px;font-weight:400;line-height:24px}.pressthis{margin:20px 0}.pressthis a,.pressthis a:active,.pressthis a:focus,.pressthis a:hover{display:inline-block;position:relative;cursor:move;color:#333;background:#e6e6e6;-webkit-border-radius:5px;border-radius:5px;border:1px solid #b4b4b4;font-style:normal;line-height:16px;font-size:14px;text-decoration:none}.pressthis a:active{outline:0}.pressthis a:hover:after{-webkit-transform:skew(20deg) rotate(9deg);-ms-transform:skew(20deg) rotate(9deg);transform:skew(20deg) rotate(9deg);-webkit-box-shadow:0 10px 8px rgba(0,0,0,.7);box-shadow:0 10px 8px rgba(0,0,0,.7)}.pressthis a span{display:inline-block;margin:0;padding:0 12px 8px 9px}.pressthis a span:before{color:#777;font:400 20px/1 dashicons;content:'\f157';position:relative;display:inline-block;top:4px;margin-right:4px}.pressthis a:after{content:'';width:70%;height:55%;z-index:-1;position:absolute;right:10px;bottom:9px;background:0 0;-webkit-transform:skew(20deg) rotate(6deg);-ms-transform:skew(20deg) rotate(6deg);transform:skew(20deg) rotate(6deg);-webkit-box-shadow:0 10px 8px rgba(0,0,0,.6);box-shadow:0 10px 8px rgba(0,0,0,.6)}#local-time,#utc-time{padding-left:25px;font-style:italic}.defaultavatarpicker .avatar{margin:2px 0;vertical-align:middle}.options-general-php .spinner{float:none;margin:-3px 3px}@media screen and (max-width:782px){textarea{-webkit-appearance:none}input[type=number],input[type=password],input[type=search],input[type=text]{-webkit-appearance:none;padding:6px 10px}input.code{padding-bottom:5px;padding-top:10px}.widefat th input[type=checkbox],input[type=checkbox]{-webkit-appearance:none;padding:10px}.widefat th input[type=checkbox]{margin-bottom:8px}.widefat th input[type=checkbox]:before,input[type=checkbox]:checked:before{font:400 30px/1 Dashicons;margin:-3px -5px}input[type=checkbox],input[type=radio]{height:25px;width:25px}.wp-admin p input[type=checkbox],.wp-admin p input[type=radio]{margin-top:-3px}input[type=radio]:checked:before{vertical-align:middle;width:9px;height:9px;margin:7px;line-height:16px}.wp-upload-form input[type=submit]{margin-top:10px}#wpbody select{height:36px;font-size:16px}.wp-admin .button-cancel{padding:0;font-size:14px}#createuser .form-field input{width:100%}.form-table{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table td,.form-table th{display:block;width:auto;vertical-align:middle}.form-table .color-palette td{display:table-cell;width:15px}.form-table table.color-palette{margin-right:10px}input,textarea{font-size:16px}#profile-page .form-table textarea,.form-table span.description,.form-table td input[type=password],.form-table td input[type=text],.form-table td select,.form-table td textarea{width:100%;font-size:16px;line-height:1.5;padding:7px 10px;display:block;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table input[type=text].small-text,input[type=number].small-text,input[type=password].small-text,input[type=search].small-text,input[type=text].small-text{width:auto;max-width:55px;display:inline;padding:3px 6px;margin:0 3px}#pass-strength-result{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:8px}p.search-box{float:none;position:absolute;bottom:0;width:98%;height:90px;margin-bottom:20px}p.search-box input[name="s"]{height:auto;float:none;width:100%;margin-bottom:10px;vertical-align:middle;-webkit-appearance:none}p.search-box input[type=submit]{margin-bottom:10px}.form-table span.description{padding:4px 0 0;line-height:1.4em}.form-table th{padding-top:10px;padding-bottom:0;border-bottom:0}.form-table td{padding-top:8px;padding-left:0}.form-table input.regular-text{width:100%}.form-table label{font-size:14px}.form-table fieldset label{display:block}#utc-time{margin-top:10px}#local-time,#utc-time{display:block;float:none;padding:0;line-height:2}}@media only screen and (max-width:768px){.form-field input,.form-field textarea{width:99%}.form-wrap .form-field{padding:0}#profile-page .form-table textarea{max-width:400px;width:auto}}@media screen and (max-width:600px){.color-option{width:49%}}body.rtl,body.rtl .press-this a.wp-switch-editor{font-family:Tahoma,Arial,sans-serif}body.locale-he-il,body.locale-he-il .press-this a.wp-switch-editor{font-family:Arial,sans-serif}.locale-he-il em{font-style:normal;font-weight:700}.locale-zh-cn #local-time,.locale-zh-cn #utc-time,.locale-zh-cn .form-wrap p,.locale-zh-cn .howto,.locale-zh-cn .inline-edit-row fieldset span.checkbox-title,.locale-zh-cn .inline-edit-row fieldset span.title,.locale-zh-cn .js .input-with-default-title,.locale-zh-cn .link-to-original,.locale-zh-cn .tablenav .displaying-num,.locale-zh-cn p.description,.locale-zh-cn p.help,.locale-zh-cn p.install-help,.locale-zh-cn span.description{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-de-de .inline-edit-row fieldset label span.title{width:7em}.locale-de-de .inline-edit-row fieldset label span.input-text-wrap{margin-left:7em}.locale-de-de #customize-header-actions .button{padding:0 5px 1px}.locale-de-de #customize-header-actions .spinner{margin:16px 3px 0}.locale-ru-ru .inline-edit-row fieldset label span.title{width:8em}.locale-ru-ru .inline-edit-row fieldset label span.input-text-wrap{margin-left:8em}.locale-ru-ru.post-php .tagsdiv .newtag{width:165px}.locale-ru-ru.press-this .posting{margin-right:277px}.locale-ru-ru .press-this-sidebar{width:265px}.locale-ru-ru #customize-header-actions .button{padding:0 5px 1px}.locale-ru-ru #customize-header-actions .spinner{margin:16px 3px 0}.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}body,html{height:100%;margin:0;padding:0}html{background:#f1f1f1}body{background:#f1f1f1;min-width:0;color:#444;font-family:"Open Sans",sans-serif;font-size:13px;line-height:1.4em}a{color:#0074a2;-webkit-transition-property:border,background,color;transition-property:border,background,color;-webkit-transition-duration:.05s;transition-duration:.05s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;outline:0}a:active,a:hover{color:#2ea2cc}a:focus{color:#124964}a:active,a:focus{outline:thin dotted}p{line-height:1.5}.login .message{border-right:4px solid #7ad03a;background-color:#fff;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}.login #login_error{border-right:4px solid #dd3d36;background:#fff;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}#loginform p.submit,.login-action-lostpassword p.submit{border:0;margin:-10px 0 20px}.login *{margin:0;padding:0}.login form{margin-top:20px;margin-right:0;padding:26px 24px 46px;font-weight:400;overflow:hidden;background:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.13);box-shadow:0 1px 3px rgba(0,0,0,.13)}.login form .forgetmenot{font-weight:400;float:right;margin-bottom:0}.login .button-primary{float:left}#login form p{margin-bottom:0}#login form p.submit{margin:0;padding:0}.login label{color:#777;font-size:14px}.login form .forgetmenot label{font-size:12px;line-height:19px}.login h1{text-align:center}.login h1 a{background-image:url(../images/w-logo-blue.png?ver=20131202);background-image:none,url(../images/wordpress-logo.svg?ver=20131107);-webkit-background-size:80px 80px;background-size:80px 80px;background-position:center top;background-repeat:no-repeat;color:#999;height:80px;font-size:20px;font-weight:400;line-height:1.3em;margin:0 auto 25px;padding:0;text-decoration:none;width:80px;text-indent:-9999px;outline:0;overflow:hidden;display:block}#login{width:320px;padding:8% 0 0;margin:auto}#login_error,.login .message{margin-right:0;padding:12px}.login #backtoblog,.login #nav{font-size:13px;padding:0 24px}.login #nav{margin:24px 0 0}#backtoblog{margin:16px 0 0}.login #backtoblog a,.login #nav a{text-decoration:none;color:#999}.login #backtoblog a:hover,.login #nav a:hover,.login h1 a:hover{color:#2ea2cc}.login form .input,.login input[type=text]{font-size:24px;line-height:1;width:100%;padding:3px;margin:2px 0 16px 6px}.login form .input,.login form input[type=checkbox],.login input[type=text]{background:#fbfbfb}.ie7 .login form .input,.ie8 .login form .input{font-family:sans-serif}.login #pass-strength-result{width:250px;font-weight:600;margin:12px 0 6px;padding:6px 5px;text-align:center}.mobile #login{padding:20px 0}.mobile #login .message,.mobile #login form,.mobile #login_error{margin-right:0}.mobile #login #backtoblog,.mobile #login #nav{margin-right:8px}.mobile #login h1 a{width:auto}body.interim-login{height:auto}.interim-login #login{padding:0;margin:5px auto 20px}.interim-login.login h1 a{width:auto}.interim-login #login_error,.interim-login.login .message{margin:0 0 16px}.interim-login.login form{margin:0}@-ms-viewport{width:device-width}@media screen and (max-width:782px){.interim-login input[type=checkbox]{height:16px;width:16px}.interim-login input[type=checkbox]:checked:before{width:16px;font:400 21px/1 dashicons;margin:-3px -4px 0 0}} \ No newline at end of file diff --git a/wp-admin/css/login.css b/wp-admin/css/login.css new file mode 100644 index 0000000..679e4e7 --- /dev/null +++ b/wp-admin/css/login.css @@ -0,0 +1,270 @@ +@import url(forms.css); +@import url(l10n.css); + +html, +body { + height: 100%; + margin: 0; + padding: 0; +} + +html { + background: #f1f1f1; +} + +body { + background: #f1f1f1; + min-width: 0; + color: #444; + font-family: "Open Sans", sans-serif; + font-size: 13px; + line-height: 1.4em; +} + +a { + color: #0074a2; + -webkit-transition-property: border, background, color; + transition-property: border, background, color; + -webkit-transition-duration: .05s; + transition-duration: .05s; + -webkit-transition-timing-function: ease-in-out; + transition-timing-function: ease-in-out; +} + +a { + outline: 0; +} + +a:hover, +a:active { + color: #2ea2cc; +} + +a:focus { + color: #124964; +} + +a:focus, +a:active { + outline: thin dotted; +} + +p { + line-height: 1.5; +} + +.login .message { + border-left: 4px solid #7ad03a; + padding: 1px 12px; + background-color: #fff; + -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1); + box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1); +} + +.login #login_error { + border-left: 4px solid #dd3d36; + background: #fff; + -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1); + box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1); +} + +#loginform p.submit, +.login-action-lostpassword p.submit { + border: none; + margin: -10px 0 20px; /* May want to revisit this */ +} + +.login * { + margin: 0; + padding: 0; +} + +.login form { + margin-top: 20px; + margin-left: 0; + padding: 26px 24px 46px; + font-weight: normal; + overflow: hidden; + background: #fff; + -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.13); + box-shadow: 0 1px 3px rgba(0,0,0,0.13); +} + +.login form .forgetmenot { + font-weight: normal; + float: left; + margin-bottom: 0; +} + +.login .button-primary { + float: right; +} + +#login form p { + margin-bottom: 0; +} + +#login form p.submit { + margin: 0; + padding: 0; +} + +.login label { + color: #777; + font-size: 14px; +} + +.login form .forgetmenot label { + font-size: 12px; + line-height: 19px; +} + +.login h1 { + text-align: center; +} + +.login h1 a { + background-image: url(../images/w-logo-blue.png?ver=20131202); + background-image: none, url(../images/wordpress-logo.svg?ver=20131107); + -webkit-background-size: 80px 80px; + background-size: 80px 80px; + background-position: center top; + background-repeat: no-repeat; + color: #999; + height: 80px; + font-size: 20px; + font-weight: normal; + line-height: 1.3em; + margin: 0 auto 25px; + padding: 0; + text-decoration: none; + width: 80px; + text-indent: -9999px; + outline: none; + overflow: hidden; + display: block; +} + +#login { + width: 320px; + padding: 8% 0 0; + margin: auto; +} + +#login_error, +.login .message { + margin-left: 0; + padding: 12px; +} + +.login #nav, +.login #backtoblog { + font-size: 13px; + padding: 0 24px 0; +} + +.login #nav { + margin: 24px 0 0 0; +} + +#backtoblog { + margin: 16px 0 0 0; +} + +.login #nav a, +.login #backtoblog a { + text-decoration: none; + color: #999; +} + +.login #nav a:hover, +.login #backtoblog a:hover, +.login h1 a:hover { + color: #2ea2cc; +} + +.login form .input, +.login input[type="text"] { + font-size: 24px; + line-height: 1; + width: 100%; + padding: 3px; + margin: 2px 6px 16px 0; +} + +.login form .input, +.login input[type="text"], +.login form input[type="checkbox"] { + background: #fbfbfb; +} + +.ie7 .login form .input, +.ie8 .login form .input { + font-family: sans-serif; +} + +.login #pass-strength-result { + width: 250px; + font-weight: 600; + 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; +} + +body.interim-login { + height: auto; +} + +.interim-login #login { + padding: 0; + margin: 5px auto 20px; +} + +.interim-login.login h1 a { + width: auto; +} + +.interim-login #login_error, +.interim-login.login .message { + margin: 0 0 16px; +} + +.interim-login.login form { + margin: 0; +} + +@-ms-viewport { + width: device-width; +} + +@media screen and ( max-width: 782px ) { + .interim-login input[type=checkbox] { + height: 16px; + width: 16px; + } + + .interim-login input[type=checkbox]:checked:before { + width: 16px; + font: normal 21px/1 'dashicons'; + margin: -3px 0 0 -4px; + } +} \ No newline at end of file diff --git a/wp-admin/css/login.min.css b/wp-admin/css/login.min.css new file mode 100644 index 0000000..86722df --- /dev/null +++ b/wp-admin/css/login.min.css @@ -0,0 +1 @@ +input,input[type=email],input[type=number],input[type=password],input[type=search],input[type=text],input[type=url],textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=email],input[type=url]{direction:ltr}input[type=checkbox],input[type=radio]{border:1px solid #bbb;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 4px 0 0;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}input[type=radio]:checked+label:before{color:#888}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#2ea2cc}.wp-admin p input[type=checkbox],.wp-admin p input[type=radio],td>input[type=checkbox]{margin-top:0}.wp-admin p label input[type=checkbox]{margin-top:-4px}.wp-admin p label input[type=radio]{margin-top:-2px}input[type=radio]{-webkit-border-radius:50%;border-radius:50%;margin-right:4px;line-height:10px}input[type=checkbox]:checked:before,input[type=radio]:checked:before{float:left;display:inline-block;vertical-align:middle;width:16px;font:400 21px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}input[type=checkbox]:checked:before{content:'\f147';margin:-3px 0 0 -4px;color:#1e8cbe}input[type=radio]:checked:before{content:'\2022';text-indent:-9999px;-webkit-border-radius:50px;border-radius:50px;font-size:24px;width:6px;height:6px;margin:4px;line-height:16px;background-color:#1e8cbe}input.readonly,textarea.readonly{background-color:#ddd}@-moz-document url-prefix(){.form-table input.tog,input[type=checkbox],input[type=radio]{margin-bottom:-1px}}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-decoration{display:none}.ie8 input[type=password]{font-family:sans-serif}button,input,select,textarea{font-family:inherit;font-size:inherit;font-weight:inherit}input,select,textarea{font-size:14px;padding:3px 5px;line-height:15px;-webkit-border-radius:0;border-radius:0}textarea{overflow:auto;padding:2px 6px;line-height:1.4}input[type=email],input[type=number],input[type=password],input[type=search],input[type=text],input[type=url],select,textarea{outline:0}.wp-admin input[type=file]{padding:3px 0}label{cursor:pointer}input,select{margin:1px;padding:3px 5px}input.code{padding-top:6px}textarea.code{line-height:1.4;padding:4px 6px 1px}input[type=email],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=url],select,textarea{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#333;-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}select[disabled]{color:#7f7f7f}input[type=checkbox]:focus,input[type=email]:focus,input[type=number]:focus,input[type=password]:focus,input[type=radio]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=url]:focus,select:focus,textarea:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}input[readonly]{background-color:#eee}.wp-core-ui :-moz-placeholder,:-moz-placeholder{color:#a9a9a9}.form-invalid{background-color:#ffebe8!important}.form-invalid input,.form-invalid select{border-color:#c00!important}.form-input-tip{color:#666}input.disabled,input:disabled,textarea.disabled,textarea:disabled{-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.04);box-shadow:inset 0 1px 2px rgba(0,0,0,.04);border-color:rgba(222,222,222,.75);background:rgba(255,255,255,.5);color:rgba(51,51,51,.5)}input[type=checkbox]:disabled,input[type=checkbox]:disabled:checked:before,input[type=radio]:disabled,input[type=radio]:disabled:checked:before{opacity:.7}.wp-admin select{padding:2px;line-height:28px;height:28px;vertical-align:middle}.wp-admin .button-cancel{padding:0 5px;line-height:2}.meta-box-sortables select{max-width:100%}.wp-admin select[multiple]{height:auto}.submit{padding:1.5em 0;margin:5px 0;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;border:0}form p.submit a.cancel:hover{text-decoration:none}p.submit{text-align:left;max-width:100%;margin-top:20px;padding-top:10px}.textright p.submit{border:0;text-align:right}table.form-table+input+input+p.submit,table.form-table+input+p.submit,table.form-table+p.submit{border-top:0;padding-top:0}#major-publishing-actions input,#minor-publishing-actions .preview,#minor-publishing-actions input{text-align:center}input.all-options,textarea.all-options{width:250px}input.large-text,textarea.large-text{width:99%}#adduser .form-field input,input.regular-text{width:25em}input.small-text{width:50px;padding:1px 6px}input[type=number].small-text{width:65px}#doaction,#doaction2,#post-query-submit{margin:1px 8px 0 0}.tablenav #changeit,.tablenav #clear-recent-list,.tablenav #delete_all{margin-top:1px}.tablenav .actions select{float:left;margin-right:6px;max-width:200px}.ie8 .tablenav .actions select{width:155px}.ie8 .tablenav .actions select#cat{width:200px}#timezone_string option{margin-left:1em}#upload-form label{color:#777}#your-profile label+a,fieldset label,label{vertical-align:middle}#misc-publishing-actions label,.options-media-php label[for*="_size_"]{vertical-align:baseline}#misc-publishing-actions label[for=post_status]:before{content:'\f173';display:inline-block;font:400 20px/1 dashicons;speak:none;left:-1px;padding:0 5px 0 0;position:relative;top:0;text-decoration:none!important;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#pass-strength-result{background-color:#eee;border:1px solid #ddd;float:left;margin:13px 5px 5px 1px;padding:3px 5px;text-align:center;width:200px;display:none}#pass-strength-result.short{background-color:#ffa0a0;border-color:#f04040}#pass-strength-result.bad{background-color:#ffb78c;border-color:#ff853c}#pass-strength-result.good{background-color:#ffec8b;border-color:#fc0}#pass-strength-result.strong{background-color:#c3ff88;border-color:#8dff1c}.indicator-hint{padding-top:8px}p.search-box{float:right;margin:0}.network-admin.themes-php p.search-box{clear:left}#search-plugins input[name="s"],.search-box input[name="s"],.tagsdiv .newtag{float:left;height:28px;margin:0 4px 0 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{-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}.ui-autocomplete{padding:0;margin:0;list-style:none;position:absolute;z-index:10000;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;border:1px solid #aaa;background-color:#efefef}.ui-autocomplete li{margin-bottom:0;white-space:nowrap;text-align:left}.ui-autocomplete li a{display:block;height:100%;padding:4px 10px;color:#444}.ui-autocomplete li a.ui-state-focus{background-color:#ddd;cursor:pointer}.form-table{border-collapse:collapse;margin-top:.5em;width:100%;clear:both}.form-table,.form-table td,.form-table td p,.form-table th,.form-wrap label{font-size:14px}.form-table td{margin-bottom:9px;padding:15px 10px;line-height:1.3;vertical-align:middle}.form-table th,.form-wrap label{color:#222;font-weight:400;text-shadow:none;vertical-align:baseline}.form-table th{vertical-align:top;text-align:left;padding:20px 10px 20px 0;width:200px;line-height:1.3;font-weight:600}.form-table th.th-full{width:auto;font-weight:400}.form-table td p{margin-top:4px;margin-bottom:0}.form-table td fieldset label{margin:.25em 0 .5em!important;display:inline-block}.form-table td fieldset label,.form-table td fieldset li,.form-table td fieldset p{line-height:1.4em}.form-table input.tog,.form-table input[type=radio]{margin-top:-4px;margin-right:4px;float:none}.form-table .pre{padding:8px;margin:0}table.form-table td .updated{font-size:13px}#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}#display_name{width:15em}#createuser .form-field input{width:25em}.color-option{display:inline-block;width:24%;padding:5px 15px 15px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:3px}.color-option.selected,.color-option:hover{background:#ddd}.color-palette{width:100%;border-spacing:0;border-collapse:collapse}.color-palette td{height:20px;padding:0;border:0}.color-option{cursor:pointer}.tool-box .title{margin:8px 0;font-size:18px;font-weight:400;line-height:24px}.pressthis{margin:20px 0}.pressthis a,.pressthis a:active,.pressthis a:focus,.pressthis a:hover{display:inline-block;position:relative;cursor:move;color:#333;background:#e6e6e6;-webkit-border-radius:5px;border-radius:5px;border:1px solid #b4b4b4;font-style:normal;line-height:16px;font-size:14px;text-decoration:none}.pressthis a:active{outline:0}.pressthis a:hover:after{-webkit-transform:skew(20deg) rotate(9deg);-ms-transform:skew(20deg) rotate(9deg);transform:skew(20deg) rotate(9deg);-webkit-box-shadow:0 10px 8px rgba(0,0,0,.7);box-shadow:0 10px 8px rgba(0,0,0,.7)}.pressthis a span{display:inline-block;margin:0;padding:0 12px 8px 9px}.pressthis a span:before{color:#777;font:400 20px/1 dashicons;content:'\f157';position:relative;display:inline-block;top:4px;margin-right:4px}.pressthis a:after{content:'';width:70%;height:55%;z-index:-1;position:absolute;right:10px;bottom:9px;background:0 0;-webkit-transform:skew(20deg) rotate(6deg);-ms-transform:skew(20deg) rotate(6deg);transform:skew(20deg) rotate(6deg);-webkit-box-shadow:0 10px 8px rgba(0,0,0,.6);box-shadow:0 10px 8px rgba(0,0,0,.6)}#local-time,#utc-time{padding-left:25px;font-style:italic}.defaultavatarpicker .avatar{margin:2px 0;vertical-align:middle}.options-general-php .spinner{float:none;margin:-3px 3px}@media screen and (max-width:782px){textarea{-webkit-appearance:none}input[type=number],input[type=password],input[type=search],input[type=text]{-webkit-appearance:none;padding:6px 10px}input.code{padding-bottom:5px;padding-top:10px}.widefat th input[type=checkbox],input[type=checkbox]{-webkit-appearance:none;padding:10px}.widefat th input[type=checkbox]{margin-bottom:8px}.widefat th input[type=checkbox]:before,input[type=checkbox]:checked:before{font:400 30px/1 Dashicons;margin:-3px -5px}input[type=checkbox],input[type=radio]{height:25px;width:25px}.wp-admin p input[type=checkbox],.wp-admin p input[type=radio]{margin-top:-3px}input[type=radio]:checked:before{vertical-align:middle;width:9px;height:9px;margin:7px;line-height:16px}.wp-upload-form input[type=submit]{margin-top:10px}#wpbody select{height:36px;font-size:16px}.wp-admin .button-cancel{padding:0;font-size:14px}#createuser .form-field input{width:100%}.form-table{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table td,.form-table th{display:block;width:auto;vertical-align:middle}.form-table .color-palette td{display:table-cell;width:15px}.form-table table.color-palette{margin-right:10px}input,textarea{font-size:16px}#profile-page .form-table textarea,.form-table span.description,.form-table td input[type=password],.form-table td input[type=text],.form-table td select,.form-table td textarea{width:100%;font-size:16px;line-height:1.5;padding:7px 10px;display:block;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table input[type=text].small-text,input[type=number].small-text,input[type=password].small-text,input[type=search].small-text,input[type=text].small-text{width:auto;max-width:55px;display:inline;padding:3px 6px;margin:0 3px}#pass-strength-result{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:8px}p.search-box{float:none;position:absolute;bottom:0;width:98%;height:90px;margin-bottom:20px}p.search-box input[name="s"]{height:auto;float:none;width:100%;margin-bottom:10px;vertical-align:middle;-webkit-appearance:none}p.search-box input[type=submit]{margin-bottom:10px}.form-table span.description{padding:4px 0 0;line-height:1.4em}.form-table th{padding-top:10px;padding-bottom:0;border-bottom:0}.form-table td{padding-top:8px;padding-left:0}.form-table input.regular-text{width:100%}.form-table label{font-size:14px}.form-table fieldset label{display:block}#utc-time{margin-top:10px}#local-time,#utc-time{display:block;float:none;padding:0;line-height:2}}@media only screen and (max-width:768px){.form-field input,.form-field textarea{width:99%}.form-wrap .form-field{padding:0}#profile-page .form-table textarea{max-width:400px;width:auto}}@media screen and (max-width:600px){.color-option{width:49%}}body.rtl,body.rtl .press-this a.wp-switch-editor{font-family:Tahoma,Arial,sans-serif}body.locale-he-il,body.locale-he-il .press-this a.wp-switch-editor{font-family:Arial,sans-serif}.locale-he-il em{font-style:normal;font-weight:700}.locale-zh-cn #local-time,.locale-zh-cn #utc-time,.locale-zh-cn .form-wrap p,.locale-zh-cn .howto,.locale-zh-cn .inline-edit-row fieldset span.checkbox-title,.locale-zh-cn .inline-edit-row fieldset span.title,.locale-zh-cn .js .input-with-default-title,.locale-zh-cn .link-to-original,.locale-zh-cn .tablenav .displaying-num,.locale-zh-cn p.description,.locale-zh-cn p.help,.locale-zh-cn p.install-help,.locale-zh-cn span.description{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-de-de .inline-edit-row fieldset label span.title{width:7em}.locale-de-de .inline-edit-row fieldset label span.input-text-wrap{margin-left:7em}.locale-de-de #customize-header-actions .button{padding:0 5px 1px}.locale-de-de #customize-header-actions .spinner{margin:16px 3px 0}.locale-ru-ru .inline-edit-row fieldset label span.title{width:8em}.locale-ru-ru .inline-edit-row fieldset label span.input-text-wrap{margin-left:8em}.locale-ru-ru.post-php .tagsdiv .newtag{width:165px}.locale-ru-ru.press-this .posting{margin-right:277px}.locale-ru-ru .press-this-sidebar{width:265px}.locale-ru-ru #customize-header-actions .button{padding:0 5px 1px}.locale-ru-ru #customize-header-actions .spinner{margin:16px 3px 0}.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}body,html{height:100%;margin:0;padding:0}html{background:#f1f1f1}body{background:#f1f1f1;min-width:0;color:#444;font-family:"Open Sans",sans-serif;font-size:13px;line-height:1.4em}a{color:#0074a2;-webkit-transition-property:border,background,color;transition-property:border,background,color;-webkit-transition-duration:.05s;transition-duration:.05s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;outline:0}a:active,a:hover{color:#2ea2cc}a:focus{color:#124964}a:active,a:focus{outline:thin dotted}p{line-height:1.5}.login .message{border-left:4px solid #7ad03a;background-color:#fff;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}.login #login_error{border-left:4px solid #dd3d36;background:#fff;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}#loginform p.submit,.login-action-lostpassword p.submit{border:0;margin:-10px 0 20px}.login *{margin:0;padding:0}.login form{margin-top:20px;margin-left:0;padding:26px 24px 46px;font-weight:400;overflow:hidden;background:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.13);box-shadow:0 1px 3px rgba(0,0,0,.13)}.login form .forgetmenot{font-weight:400;float:left;margin-bottom:0}.login .button-primary{float:right}#login form p{margin-bottom:0}#login form p.submit{margin:0;padding:0}.login label{color:#777;font-size:14px}.login form .forgetmenot label{font-size:12px;line-height:19px}.login h1{text-align:center}.login h1 a{background-image:url(../images/w-logo-blue.png?ver=20131202);background-image:none,url(../images/wordpress-logo.svg?ver=20131107);-webkit-background-size:80px 80px;background-size:80px 80px;background-position:center top;background-repeat:no-repeat;color:#999;height:80px;font-size:20px;font-weight:400;line-height:1.3em;margin:0 auto 25px;padding:0;text-decoration:none;width:80px;text-indent:-9999px;outline:0;overflow:hidden;display:block}#login{width:320px;padding:8% 0 0;margin:auto}#login_error,.login .message{margin-left:0;padding:12px}.login #backtoblog,.login #nav{font-size:13px;padding:0 24px}.login #nav{margin:24px 0 0}#backtoblog{margin:16px 0 0}.login #backtoblog a,.login #nav a{text-decoration:none;color:#999}.login #backtoblog a:hover,.login #nav a:hover,.login h1 a:hover{color:#2ea2cc}.login form .input,.login input[type=text]{font-size:24px;line-height:1;width:100%;padding:3px;margin:2px 6px 16px 0}.login form .input,.login form input[type=checkbox],.login input[type=text]{background:#fbfbfb}.ie7 .login form .input,.ie8 .login form .input{font-family:sans-serif}.login #pass-strength-result{width:250px;font-weight:600;margin:12px 0 6px;padding:6px 5px;text-align:center}.mobile #login{padding:20px 0}.mobile #login .message,.mobile #login form,.mobile #login_error{margin-left:0}.mobile #login #backtoblog,.mobile #login #nav{margin-left:8px}.mobile #login h1 a{width:auto}body.interim-login{height:auto}.interim-login #login{padding:0;margin:5px auto 20px}.interim-login.login h1 a{width:auto}.interim-login #login_error,.interim-login.login .message{margin:0 0 16px}.interim-login.login form{margin:0}@-ms-viewport{width:device-width}@media screen and (max-width:782px){.interim-login input[type=checkbox]{height:16px;width:16px}.interim-login input[type=checkbox]:checked:before{width:16px;font:400 21px/1 dashicons;margin:-3px 0 0 -4px}} \ No newline at end of file diff --git a/wp-admin/css/media-rtl.css b/wp-admin/css/media-rtl.css new file mode 100644 index 0000000..2ad6280 --- /dev/null +++ b/wp-admin/css/media-rtl.css @@ -0,0 +1,724 @@ +/*------------------------------------------------------------------------------ + 14.0 - Media Screen +------------------------------------------------------------------------------*/ + +.media-item .describe { + border-collapse: collapse; + width: 100%; + border-top: 1px solid #dfdfdf; + clear: both; + cursor: default; +} + +.media-item.media-blank .describe { + border: 0; +} + +.media-item .describe th { + vertical-align: top; + text-align: right; + 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 0 8px 8px; + vertical-align: top; +} + +.media-item thead.media-item-info td { + padding: 4px 10px 0; +} + +.media-item .media-item-info .A1B1 { + padding: 0 10px 0 0; +} + +.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-left: 6px; + margin-right: 2px; +} + +.media-upload-form .align .field label { + display: inline; + padding: 0 23px 0 0; + margin: 0 3px 0 1em; + font-weight: 600; +} + +.media-upload-form tr.image-size label { + margin: 0 5px 0 0; + font-weight: 600; +} + +.media-upload-form th.label label { + font-weight: 600; + margin: 0.5em; + font-size: 13px; +} + +.media-upload-form th.label label span { + padding: 0 5px; +} + +.media-item .describe input[type="text"], +.media-item .describe textarea { + width: 460px; +} + +.media-item .describe p.help { + margin: 0; + padding: 0 5px 0 0; +} + +.media-item .edit-attachment, +.describe-toggle-on, +.describe-toggle-off { + display: block; + line-height: 36px; + float: left; +} + +.media-item .describe-toggle-off, +.media-item.open .describe-toggle-on { + display: none; +} + +.media-item.open .describe-toggle-off { + display: block; +} + +#media-items .media-item { + border-bottom: 1px solid #dfdfdf; + min-height: 36px; + position: relative; + width: 100%; +} + +#media-items { + width: 623px; +} + +.media-new-php #media-items { + margin: 1em 0; +} + +#media-items:empty { + border: 0 none; +} + +.media-item .filename { + line-height: 36px; + overflow: hidden; +} + +.media-item .error-div { + padding-right: 10px; +} + +.media-item .pinkynail { + float: right; + margin: 2px 0 0 10px; + 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: left; + height: 22px; + margin: 7px 0 0; + width: 200px; + line-height: 2em; + padding: 0; + overflow: hidden; + margin-bottom: 2px; + -webkit-border-radius: 22px; + border-radius: 22px; + background: #ddd; + -webkit-box-shadow: inset 0px 1px 2px rgba(0,0,0,0.1); + box-shadow: inset 0px 1px 2px rgba(0,0,0,0.1); +} + +.media-item .bar { + z-index: 9; + width: 0; + height: 100%; + margin-top: -22px; + -webkit-border-radius: 22px; + border-radius: 22px; + background-color: #0074a2; + -webkit-box-shadow: inset 0 0 2px rgba(0,0,0,0.3); + box-shadow: inset 0 0 2px rgba(0,0,0,0.3); +} + +.media-item .progress .percent { + z-index: 10; + position: relative; + width: 200px; + padding: 0; + color: #fff; + text-align: center; + line-height: 22px; + font-weight: 400; + text-shadow: 0px 1px 2px rgba(0,0,0,0.2); +} + +.upload-php .fixed .column-parent { + width: 15%; +} + +.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: left; + margin: 5px 15px 0 4px; +} + +/*------------------------------------------------------------------------------ + 14.1 - Media Library +------------------------------------------------------------------------------*/ + +.find-box { + background-color: #fff; + -webkit-box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); + box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); + width: 600px; + overflow: hidden; + margin-right: -300px; + position: fixed; + top: 30px; + bottom: 30px; + right: 50%; + z-index: 100105; +} + +.find-box-head { + background: #fcfcfc; + border-bottom: 1px solid #dfdfdf; + height: 36px; + font-size: 18px; + font-weight: 600; + line-height: 36px; + padding: 0 16px 0 36px; + position: absolute; + top: 0; + right: 0; + left: 0; +} + +.find-box-inside { + overflow: auto; + padding: 16px; + background-color: #fff; + position: absolute; + top: 37px; + bottom: 45px; + overflow-y: scroll; + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.find-box-search { + padding-bottom: 16px; +} + +.find-box-search .spinner { + float: none; + right: 125px; + position: absolute; + top: 18px; +} + +#find-posts-input, +#find-posts-search { + float: right; +} + +#find-posts-input { + width: 140px; + height: 28px; + margin: 0 0 0 4px; +} + +.widefat .found-radio { + padding-left: 0; + width: 16px; +} + +#find-posts-close { + width: 36px; + height: 36px; + position: absolute; + top: 0; + left: 0; + cursor: pointer; + text-align: center; + color: #666; +} + +#find-posts-close:hover { + color: #2ea2cc; +} + +#find-posts-close:before { + font: normal 20px/36px 'dashicons'; + vertical-align: top; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + content: '\f158'; +} + +.find-box-buttons { + padding: 8px 16px; + background: #fcfcfc; + border-top: 1px solid #dfdfdf; + position: absolute; + bottom: 0; + right: 0; + left: 0; +} + +@media screen and ( max-width: 782px ) { + .find-box-inside { + bottom: 57px; + } +} + +@media screen and ( max-width: 660px ) { + + .find-box { + top: 0; + bottom: 0; + right: 0; + left: 0; + margin: 0; + width: 100%; + } + +} + +.ui-find-overlay { + position: fixed; + top: 0; + right: 0; + left: 0; + bottom: 0; + background: #000; + opacity: 0.7; + filter: alpha(opacity=70); + z-index: 100100; +} + +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: 1px solid #ddd; + line-height: 1.8em; + word-spacing: 3px; + -webkit-border-radius: 6px; + border-radius: 6px; +} + +.drag-drop #drag-drop-area { + border: 4px dashed #bbb; + 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-area:-moz-drag-over { + border-color: #83b4d8; +} +border color while dragging a file over the uploader drop area */ +.drag-drop.drag-over #drag-drop-area { + border-color: #83b4d8; +} + +#plupload-upload-ui { + position: relative; +} + + +/*------------------------------------------------------------------------------ + 14.2 - Image Editor +------------------------------------------------------------------------------*/ + +.wp_attachment_details label[for="content"] { + font-size: 13px; + line-height: 1.5; + margin: 1em 0; +} + +.wp_attachment_details #attachment_caption { + height: 4em; +} + +.describe .image-editor { + vertical-align: top; +} + +.imgedit-wrap { + position: relative; +} + +.imgedit-settings p { + margin: 8px 0 0; +} + +.describe .imgedit-wrap .imgedit-settings { + padding: 0 5px; +} + +.wp_attachment_holder div.updated { + margin-top: 0; +} + +.wp_attachment_holder .imgedit-wrap > div { + height: auto; + overflow: hidden; +} + +.wp_attachment_holder .imgedit-wrap .imgedit-panel-content { + padding-left: 16px; + width: auto; + overflow: hidden; +} + +.wp_attachment_holder .imgedit-wrap .imgedit-settings { + float: left; + width: 250px; +} + +.imgedit-settings input { + margin-top: 0; + vertical-align: middle; +} + +.imgedit-wait { + position: absolute; + top: 0; + background: #fff url(../images/spinner.gif) no-repeat center; + -webkit-background-size: 20px 20px; + background-size: 20px 20px; + opacity: 0.7; + filter: alpha(opacity=70); + width: 100%; + height: 500px; + display: none; +} + +.no-float { + float: none; +} + +.media-disabled, +.imgedit-settings .disabled { + color: grey; +} + +.wp_attachment_image, +.A1B1 { + overflow: hidden; +} + +.wp_attachment_image .button, +.A1B1 .button { + float: right; +} + +.no-js .wp_attachment_image .button { + display: none; +} + +.wp_attachment_image .spinner, +.A1B1 .spinner { + float: right; + padding: 0 0 4px 0; + vertical-align: bottom; +} + +.imgedit-menu { + margin: 0 0 12px; + min-width: 300px; +} + +.imgedit-menu div { + float: right; + width: 32px; + border: 1px solid #d5d5d5; + background: #f1f1f1; + margin: 0 0 0 8px; + height: 32px; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-align: center; + line-height: 28px; + color: #777; + cursor: pointer; +} + +.imgedit-menu div:before { + font: normal 20px/1 'dashicons'; + speak: none; + vertical-align: middle; +} + +.imgedit-menu div:hover { + border-color: #c1c1c1; + background-color: #eaeaea; + color: #333; +} + +.imgedit-menu div.disabled { + border-color: #ccc; + background-color: #ddd; + color: #777; + filter: alpha(opacity=50); + opacity: 0.5; + cursor: default; +} + +.imgedit-crop:before { + content:'\f165'; +} + +.imgedit-rleft:before { + content:'\f166'; +} + +.imgedit-rright:before { + content:'\f167'; +} + +.imgedit-flipv:before { + content:'\f168'; +} + +.imgedit-fliph:before { + content:'\f169'; +} + +.imgedit-undo:before { + content:'\f171'; +} + +.imgedit-redo:before { + content:'\f172'; +} + +.imgedit-crop-wrap { + position: relative; +} + +.imgedit-crop { + margin: 0 0 0 8px; +} + +.imgedit-rleft { + margin: 0 3px; +} + +.imgedit-rright { + margin: 0 3px 0 8px; +} + +.imgedit-flipv { + margin: 0 3px; +} + +.imgedit-fliph { + margin: 0 3px 0 8px; +} + +.imgedit-undo { + margin: 0 3px; +} + +.imgedit-redo { + margin: 0 3px 0 8px; +} + +.imgedit-applyto img { + margin: 0 0 0 8px; +} + +.imgedit-group-top { + margin: 5px 0; +} + +#poststuff .imgedit-group-top h3 { + padding: 0; +} + +.imgedit-group-top h3 a { + text-decoration: none; +} + +.imgedit-applyto .imgedit-label { + padding: 2px 0 0; + display: block; +} + +.imgedit-help { + display: none; + font-style: italic; +} + +a.imgedit-help-toggle { + text-decoration: none; +} + +.form-table td.imgedit-response { + padding: 0; +} + +.imgedit-submit { + margin: 8px 0; +} + +.imgedit-submit-btn { + margin-right: 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 { + margin-bottom: 8px; + padding: 2px 10px; +} + +audio, video { + display: inline-block; + max-width: 100%; +} + +.mejs-container { + width: 100%; +} + +/* =Media Queries +-------------------------------------------------------------- */ + +/** + * HiDPI Displays + */ +@media print, + (-o-min-device-pixel-ratio: 5/4), + (-webkit-min-device-pixel-ratio: 1.25), + (min-resolution: 120dpi) { + .imgedit-wait { + background-image: url(../images/spinner-2x.gif); + } +} + +@media screen and ( max-width: 782px ) { + .wp_attachment_details label[for="content"] { + font-size: 14px; + line-height: 1.5em; + } +} diff --git a/wp-admin/css/media.css b/wp-admin/css/media.css new file mode 100644 index 0000000..e6bbdcb --- /dev/null +++ b/wp-admin/css/media.css @@ -0,0 +1,724 @@ +/*------------------------------------------------------------------------------ + 14.0 - Media Screen +------------------------------------------------------------------------------*/ + +.media-item .describe { + border-collapse: collapse; + width: 100%; + border-top: 1px solid #dfdfdf; + 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: 600; +} + +.media-upload-form tr.image-size label { + margin: 0 0 0 5px; + font-weight: 600; +} + +.media-upload-form th.label label { + font-weight: 600; + margin: 0.5em; + font-size: 13px; +} + +.media-upload-form th.label label span { + padding: 0 5px; +} + +.media-item .describe input[type="text"], +.media-item .describe textarea { + width: 460px; +} + +.media-item .describe p.help { + margin: 0; + padding: 0 0 0 5px; +} + +.media-item .edit-attachment, +.describe-toggle-on, +.describe-toggle-off { + display: block; + line-height: 36px; + float: right; +} + +.media-item .describe-toggle-off, +.media-item.open .describe-toggle-on { + display: none; +} + +.media-item.open .describe-toggle-off { + display: block; +} + +#media-items .media-item { + border-bottom: 1px solid #dfdfdf; + min-height: 36px; + position: relative; + width: 100%; +} + +#media-items { + width: 623px; +} + +.media-new-php #media-items { + margin: 1em 0; +} + +#media-items:empty { + border: 0 none; +} + +.media-item .filename { + line-height: 36px; + overflow: hidden; +} + +.media-item .error-div { + padding-left: 10px; +} + +.media-item .pinkynail { + float: left; + margin: 2px 10px 0 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: 7px 0 0; + width: 200px; + line-height: 2em; + padding: 0; + overflow: hidden; + margin-bottom: 2px; + -webkit-border-radius: 22px; + border-radius: 22px; + background: #ddd; + -webkit-box-shadow: inset 0px 1px 2px rgba(0,0,0,0.1); + box-shadow: inset 0px 1px 2px rgba(0,0,0,0.1); +} + +.media-item .bar { + z-index: 9; + width: 0; + height: 100%; + margin-top: -22px; + -webkit-border-radius: 22px; + border-radius: 22px; + background-color: #0074a2; + -webkit-box-shadow: inset 0 0 2px rgba(0,0,0,0.3); + box-shadow: inset 0 0 2px rgba(0,0,0,0.3); +} + +.media-item .progress .percent { + z-index: 10; + position: relative; + width: 200px; + padding: 0; + color: #fff; + text-align: center; + line-height: 22px; + font-weight: 400; + text-shadow: 0px 1px 2px rgba(0,0,0,0.2); +} + +.upload-php .fixed .column-parent { + width: 15%; +} + +.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; +} + +/*------------------------------------------------------------------------------ + 14.1 - Media Library +------------------------------------------------------------------------------*/ + +.find-box { + background-color: #fff; + -webkit-box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); + box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); + width: 600px; + overflow: hidden; + margin-left: -300px; + position: fixed; + top: 30px; + bottom: 30px; + left: 50%; + z-index: 100105; +} + +.find-box-head { + background: #fcfcfc; + border-bottom: 1px solid #dfdfdf; + height: 36px; + font-size: 18px; + font-weight: 600; + line-height: 36px; + padding: 0 36px 0 16px; + position: absolute; + top: 0; + left: 0; + right: 0; +} + +.find-box-inside { + overflow: auto; + padding: 16px; + background-color: #fff; + position: absolute; + top: 37px; + bottom: 45px; + overflow-y: scroll; + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.find-box-search { + padding-bottom: 16px; +} + +.find-box-search .spinner { + float: none; + left: 125px; + position: absolute; + top: 18px; +} + +#find-posts-input, +#find-posts-search { + float: left; +} + +#find-posts-input { + width: 140px; + height: 28px; + margin: 0 4px 0 0; +} + +.widefat .found-radio { + padding-right: 0; + width: 16px; +} + +#find-posts-close { + width: 36px; + height: 36px; + position: absolute; + top: 0; + right: 0; + cursor: pointer; + text-align: center; + color: #666; +} + +#find-posts-close:hover { + color: #2ea2cc; +} + +#find-posts-close:before { + font: normal 20px/36px 'dashicons'; + vertical-align: top; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + content: '\f158'; +} + +.find-box-buttons { + padding: 8px 16px; + background: #fcfcfc; + border-top: 1px solid #dfdfdf; + position: absolute; + bottom: 0; + left: 0; + right: 0; +} + +@media screen and ( max-width: 782px ) { + .find-box-inside { + bottom: 57px; + } +} + +@media screen and ( max-width: 660px ) { + + .find-box { + top: 0; + bottom: 0; + left: 0; + right: 0; + margin: 0; + width: 100%; + } + +} + +.ui-find-overlay { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: #000; + opacity: 0.7; + filter: alpha(opacity=70); + z-index: 100100; +} + +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: 1px solid #ddd; + line-height: 1.8em; + word-spacing: 3px; + -webkit-border-radius: 6px; + border-radius: 6px; +} + +.drag-drop #drag-drop-area { + border: 4px dashed #bbb; + 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-area:-moz-drag-over { + border-color: #83b4d8; +} +border color while dragging a file over the uploader drop area */ +.drag-drop.drag-over #drag-drop-area { + border-color: #83b4d8; +} + +#plupload-upload-ui { + position: relative; +} + + +/*------------------------------------------------------------------------------ + 14.2 - Image Editor +------------------------------------------------------------------------------*/ + +.wp_attachment_details label[for="content"] { + font-size: 13px; + line-height: 1.5; + margin: 1em 0; +} + +.wp_attachment_details #attachment_caption { + height: 4em; +} + +.describe .image-editor { + vertical-align: top; +} + +.imgedit-wrap { + position: relative; +} + +.imgedit-settings p { + margin: 8px 0 0; +} + +.describe .imgedit-wrap .imgedit-settings { + padding: 0 5px; +} + +.wp_attachment_holder div.updated { + margin-top: 0; +} + +.wp_attachment_holder .imgedit-wrap > div { + height: auto; + overflow: hidden; +} + +.wp_attachment_holder .imgedit-wrap .imgedit-panel-content { + padding-right: 16px; + width: auto; + overflow: hidden; +} + +.wp_attachment_holder .imgedit-wrap .imgedit-settings { + float: right; + width: 250px; +} + +.imgedit-settings input { + margin-top: 0; + vertical-align: middle; +} + +.imgedit-wait { + position: absolute; + top: 0; + background: #fff url(../images/spinner.gif) no-repeat center; + -webkit-background-size: 20px 20px; + background-size: 20px 20px; + opacity: 0.7; + filter: alpha(opacity=70); + width: 100%; + height: 500px; + display: none; +} + +.no-float { + float: none; +} + +.media-disabled, +.imgedit-settings .disabled { + color: grey; +} + +.wp_attachment_image, +.A1B1 { + overflow: hidden; +} + +.wp_attachment_image .button, +.A1B1 .button { + float: left; +} + +.no-js .wp_attachment_image .button { + display: none; +} + +.wp_attachment_image .spinner, +.A1B1 .spinner { + float: left; + padding: 0 0 4px 0; + vertical-align: bottom; +} + +.imgedit-menu { + margin: 0 0 12px; + min-width: 300px; +} + +.imgedit-menu div { + float: left; + width: 32px; + border: 1px solid #d5d5d5; + background: #f1f1f1; + margin: 0 8px 0 0; + height: 32px; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-align: center; + line-height: 28px; + color: #777; + cursor: pointer; +} + +.imgedit-menu div:before { + font: normal 20px/1 'dashicons'; + speak: none; + vertical-align: middle; +} + +.imgedit-menu div:hover { + border-color: #c1c1c1; + background-color: #eaeaea; + color: #333; +} + +.imgedit-menu div.disabled { + border-color: #ccc; + background-color: #ddd; + color: #777; + filter: alpha(opacity=50); + opacity: 0.5; + cursor: default; +} + +.imgedit-crop:before { + content:'\f165'; +} + +.imgedit-rleft:before { + content:'\f166'; +} + +.imgedit-rright:before { + content:'\f167'; +} + +.imgedit-flipv:before { + content:'\f168'; +} + +.imgedit-fliph:before { + content:'\f169'; +} + +.imgedit-undo:before { + content:'\f171'; +} + +.imgedit-redo:before { + content:'\f172'; +} + +.imgedit-crop-wrap { + position: relative; +} + +.imgedit-crop { + margin: 0 8px 0 0; +} + +.imgedit-rleft { + margin: 0 3px; +} + +.imgedit-rright { + margin: 0 8px 0 3px; +} + +.imgedit-flipv { + margin: 0 3px; +} + +.imgedit-fliph { + margin: 0 8px 0 3px; +} + +.imgedit-undo { + margin: 0 3px; +} + +.imgedit-redo { + margin: 0 8px 0 3px; +} + +.imgedit-applyto img { + margin: 0 8px 0 0; +} + +.imgedit-group-top { + margin: 5px 0; +} + +#poststuff .imgedit-group-top h3 { + padding: 0; +} + +.imgedit-group-top h3 a { + text-decoration: none; +} + +.imgedit-applyto .imgedit-label { + padding: 2px 0 0; + display: block; +} + +.imgedit-help { + display: none; + font-style: italic; +} + +a.imgedit-help-toggle { + text-decoration: none; +} + +.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 { + margin-bottom: 8px; + padding: 2px 10px; +} + +audio, video { + display: inline-block; + max-width: 100%; +} + +.mejs-container { + width: 100%; +} + +/* =Media Queries +-------------------------------------------------------------- */ + +/** + * HiDPI Displays + */ +@media print, + (-o-min-device-pixel-ratio: 5/4), + (-webkit-min-device-pixel-ratio: 1.25), + (min-resolution: 120dpi) { + .imgedit-wait { + background-image: url(../images/spinner-2x.gif); + } +} + +@media screen and ( max-width: 782px ) { + .wp_attachment_details label[for="content"] { + font-size: 14px; + line-height: 1.5em; + } +} diff --git a/wp-admin/css/nav-menus-rtl.css b/wp-admin/css/nav-menus-rtl.css new file mode 100644 index 0000000..82c91e9 --- /dev/null +++ b/wp-admin/css/nav-menus-rtl.css @@ -0,0 +1,853 @@ +/* nav-menu */ + +/* @todo: determine if this is truly for nav menus only */ +.no-js #message { + display: block; +} + +ul.add-menu-item-tabs li { + padding: 3px 8px 3px 5px; +} + +.accordion-section ul.category-tabs, +.accordion-section ul.add-menu-item-tabs, +.accordion-section ul.wp-tab-bar { + margin: 0; +} + +.accordion-section .categorychecklist { + margin: 13px 0; +} + +#nav-menu-meta .accordion-section-content { + padding: 18px 13px; +} + +#nav-menu-meta .button-controls { + margin-bottom: 0; +} + +#nav-menus-frame { + margin-right: 300px; + margin-top: 23px; +} + +#wpbody-content #menu-settings-column { + display:inline; + width:281px; + margin-right: -300px; + clear: both; + float: right; + padding-top: 0; +} + +#menu-settings-column .inside { + clear: both; + margin: 10px 0 0; +} + +.metabox-holder-disabled .postbox, +.metabox-holder-disabled .accordion-section-content, +.metabox-holder-disabled .accordion-section-title { + opacity: 0.5; + filter: alpha(opacity=50); +} + +.metabox-holder-disabled .button-controls .select-all { + display: none; +} + +#wpbody { + position: relative; +} + +.blank-slate .menu-name { + height: 2em; +} + +.blank-slate .menu-settings { + border: none; + margin-top: 0; + padding-top: 0; + overflow: hidden; +} + +.is-submenu { + color: #999; + font-style: italic; + font-weight: normal; + margin-right: 4px; +} + +.manage-menus { + margin-top: 23px; + padding: 10px; + overflow: hidden; + background: #fbfbfb; +} + +.manage-menus select { + float: right; + margin-left: 6px; +} + +.manage-menus .selected-menu { + float: right; + margin: 5px 0 0 6px; +} + +.manage-menus .submit-btn { + float: right; + margin-top: 1px; +} + +.menu-edit p { + margin: .3em 0 .6em; +} + +.menu-edit #post-body-content h3 { + margin: 1em 0 10px; +} + +.menu-settings { + border-top: 1px solid #eee; + margin-top: 2em; +} + +.menu-settings dl { + margin: 0 0 10px; + overflow: hidden; + padding-right: 18%; +} + +.menu-settings dd { + float: right; + margin: 0; + width: 100%; +} + +.menu-settings dt { + float: right; + clear: both; + width: 21.951%; + padding: 3px 0 0; + margin-right: -21.951%; +} + +.menu-settings label { + vertical-align: baseline; +} + +.menu-edit .checkbox-input { + margin-top: 4px; +} + +.theme-location-set { + color: #999; + font-size: 11px; +} + +/* Menu Container */ +#menu-management-liquid { + float: right; + min-width: 100%; + margin-top: 3px; +} + +#menu-management { + position: relative; + margin-left: 20px; + margin-top: -3px; + width: 100%; + background: #f5f5f5; +} + +#menu-management .menu-edit { + margin-bottom: 20px; +} + +.nav-menus-php #post-body { + padding: 0 10px 10px; + border-top: 1px solid #fff; + border-bottom: 1px solid #dfdfdf; + background: #fff; +} + +#nav-menu-header, +#nav-menu-footer { + padding: 0 10px; +} + +#nav-menu-header { + border-bottom: 1px solid #dfdfdf; + margin-bottom: 0; +} + +#nav-menu-header .menu-name-label { + margin-top: 4px; +} + +.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:600; +} + +#select-nav-menu-container { + text-align: left; + padding: 0 10px 3px 10px; + margin-bottom: 5px; +} + +#select-nav-menu { + width: 100px; + display: inline; +} + +#menu-name-label { + margin-top: -2px; +} + +.widefat td.menu-location-menus { + padding-bottom: 5px; +} + +.menu-location-menus select { + float: right; +} + +#locations-nav-menu-wrapper { + padding: 5px 0; +} + +.locations-nav-menu-select select { + float: right; + width: 160px; + margin-left: 5px; +} + +.locations-row-links { + float: right; + margin: 6px 6px 0 0; +} + +.locations-edit-menu-link, +.locations-add-menu-link { + margin: 0 3px; +} + +.locations-edit-menu-link { + padding-left: 3px; + border-left: 1px solid #ccc; +} + +#wpbody .open-label { + display: block; + float:right; +} + +#wpbody .open-label span { + padding-left: 10px; +} + +.js .input-with-default-title { + color: #aaa; + font-style: italic; +} + +#menu-management .inside { + padding: 0 10px; +} + +/* Add Menu Item Boxes */ +.postbox .howto input, +.accordion-container .howto input { + width: 180px; + float: left; +} + +.accordion-container .outer-border { + margin: 0; +} + +.customlinkdiv .howto input { + width: 180px; +} + +.customlinkdiv p { + margin-top: 0 +} + +#nav-menu-theme-locations .howto select { + width: 100%; +} + +#nav-menu-theme-locations .button-controls { + text-align: left; +} + +.add-menu-item-view-all { + height: 400px; +} + +/* Button Primary Actions */ +#menu-container .submit { + margin: 0 0 10px; + padding: 0; +} + +.nav-menus-php .add-new-menu-action { + float: right; + margin: 6px 6px 0 0; + line-height: 15px; +} + +.nav-menus-php .meta-sep, +.nav-menus-php .submitdelete, +.nav-menus-php .submitcancel { + display: block; + float: right; + margin: 6px 0; + line-height: 15px; +} + +.meta-sep { + padding: 0 2px; +} + +/* @todo: is this actually used? */ +#cancel-save { + text-decoration: underline; + font-size: 12px; + margin-right: 20px; + margin-top: 5px; +} + +.button.right, .button-secondary.right, .button-primary.right { + float: left; +} + +/* Button Secondary Actions */ +.list-controls { + float: right; + margin-top: 5px; +} + +.add-to-menu { + float: left; +} + +.postbox .spinner { + display: none; + vertical-align: middle; +} + +.button-controls { + clear:both; + margin: 10px 0; +} + +.show-all, +.hide-all { + cursor: pointer; +} + +.hide-all { + display: none; +} + +/* Create Menu */ +#menu-name { + width: 270px; +} + +#manage-menu .inside { + padding: 0px 0px; +} + +/* Custom Links */ +#available-links dt { + display: block; +} + +#add-custom-link .howto { + font-size: 12px; +} + +#add-custom-link label span { + display: block; + float: right; + margin-top: 5px; + padding-left: 5px; +} + +.menu-item-textbox { + width: 180px; +} + +.nav-menus-php .howto span { + margin-top: 6px; + display: block; + float: right; +} + +/* Menu item types */ +.quick-search { + width: 190px; +} + +.nav-menus-php .list-wrap { + display: none; + clear: both; + margin-bottom: 10px; +} + +.nav-menus-php .postbox p.submit { + margin-bottom: 0; +} + +/* Listings */ +.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-left: 3px; + margin-top: -3px; +} + +.menu-item-title input[type=checkbox] { + display: inline-block; + margin-top: -4px; +} + +/* Nav Menu */ +#menu-container .inside { + padding-bottom: 10px; +} + +.menu { + padding-top:1em; +} + +#menu-to-edit { + margin: 0; + padding: 0.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: 9px 0 0; +} + +.menu-item-bar .menu-item-handle { + border: 1px solid #dfdfdf; + position: relative; + padding: 10px 15px; + height: auto; + width: 382px; + line-height: 30px; + overflow: hidden; + word-wrap: break-word; +} + +.menu-item-bar .menu-item-handle:hover { + border-color: #999; +} + +#menu-to-edit .menu-item-invalid .menu-item-handle { + background: #f6c9cc; + border-color: #f1acb1; +} + +.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; + background-color: #f66; +} + +.menu-item-handle .item-title { + font-size: 13px; + font-weight: 600; + line-height: 20px; + display: block; + margin-left: 13em; +} + +/* Sortables */ +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; +} + +/* WARNING: The factor of 30px is hardcoded into the nav-menus javascript. */ +.menu-item-depth-0 { margin-right: 0px; } +.menu-item-depth-1 { margin-right: 30px; } +.menu-item-depth-2 { margin-right: 60px; } +.menu-item-depth-3 { margin-right: 90px; } +.menu-item-depth-4 { margin-right: 120px; } +.menu-item-depth-5 { margin-right: 150px; } +.menu-item-depth-6 { margin-right: 180px; } +.menu-item-depth-7 { margin-right: 210px; } +.menu-item-depth-8 { margin-right: 240px; } +.menu-item-depth-9 { margin-right: 270px; } +.menu-item-depth-10 { margin-right: 300px; } +.menu-item-depth-11 { margin-right: 330px; } + +.menu-item-depth-0 .menu-item-transport { margin-right: 0px; } +.menu-item-depth-1 .menu-item-transport { margin-right: -30px; } +.menu-item-depth-2 .menu-item-transport { margin-right: -60px; } +.menu-item-depth-3 .menu-item-transport { margin-right: -90px; } +.menu-item-depth-4 .menu-item-transport { margin-right: -120px; } +.menu-item-depth-5 .menu-item-transport { margin-right: -150px; } +.menu-item-depth-6 .menu-item-transport { margin-right: -180px; } +.menu-item-depth-7 .menu-item-transport { margin-right: -210px; } +.menu-item-depth-8 .menu-item-transport { margin-right: -240px; } +.menu-item-depth-9 .menu-item-transport { margin-right: -270px; } +.menu-item-depth-10 .menu-item-transport { margin-right: -300px; } +.menu-item-depth-11 .menu-item-transport { margin-right: -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; } + +/* Menu item controls */ +.item-type { + color: #777; + font-size: 12px; + padding: 12px 10px; + line-height: 18px; + display: block; +} + +.item-controls { + font-size: 12px; + position: absolute; + left: 20px; + top: -1px; +} + +.item-controls a { + text-decoration: none; +} + +.item-controls a:hover { + cursor: pointer; +} + +.item-controls .item-order { + padding-left: 10px; +} + +.nav-menus-php .item-edit { + position: absolute; + left: -20px; + top: 0; + display: block; + width: 30px; + height: 40px; + margin-left: 0 !important; + text-indent: 100%; + outline: none; + overflow: hidden; + white-space: nowrap; +} + +/* Menu editing */ +.menu-instructions-inactive { + display: none; +} + +.menu-item-settings { + display: block; + width: 402px; + padding: 10px 10px 10px 0; + position: relative; + z-index: 10; /* Keep .item-title's shadow from appearing on top of .menu-item-settings */ + border: 1px solid #e5e5e5; + border-top: none; + -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.04); + box-shadow: 0 1px 1px rgba(0,0,0,0.04); +} + +.menu-item-settings .field-move a { + display: none; + margin: 0 2px; +} + +.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; + border: 1px solid #dfdfdf; + color: #777; + font-size: 12px; + font-style: italic; +} + +.link-to-original a { + padding-right: 4px; + font-style: normal; +} + +.hidden-field { + display: none; +} + +.menu-item-settings .description-thin, +.menu-item-settings .description-wide { + margin-left: 10px; + float: right; +} + +.description-thin { + width: 190px; + height: 40px; +} + +.description-wide { + width: 390px; +} + +.menu-item-actions { + padding-top: 15px; +} + +#cancel-save { + cursor: pointer; +} + +/* Major/minor publishing actions (classes) */ +.nav-menus-php .major-publishing-actions { + clear: both; + padding: 3px 0 6px; +} + +.nav-menus-php .major-publishing-actions .publishing-action { + text-align: left; + float: left; + line-height: 23px; + margin: 4px 0 1px; +} + +.nav-menus-php .blank-slate .menu-settings { + display: none; +} + +.nav-menus-php .delete-action { + float: right; + margin-top: 2px; +} + +.nav-menus-php .submitbox .submitcancel { + border-bottom: 1px solid #0074a2; + padding: 1px 2px; + color: #0074a2; + text-decoration: none; +} + +.nav-menus-php .submitbox .submitcancel:hover { + background: #0074a2; + color: #fff; +} + +.nav-menus-php .major-publishing-actions .form-invalid { + padding-right: 4px; + margin-right: -4px; +} + +/* Clearfix */ +#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; +} + +/* =Media Queries +-------------------------------------------------------------- */ + +@media screen and ( max-width: 782px ) { + body.nav-menus-php { + min-width: 0 !important; + } + + #nav-menus-frame { + margin-right: 0; + float: none; + width: 100%; + } + + #wpbody-content #menu-settings-column { + display: block; + width: 100%; + float: none; + margin-right: 0; + } + + #side-sortables .add-menu-item-tabs { + margin: 15px 0 14px; + } + + ul.add-menu-item-tabs li.tabs { + padding: 13px 15px 14px; + } + + .nav-menus-php .item-controls .item-type { + margin-top: 2px; + } + + .nav-menus-php .customlinkdiv .howto input { + width: 65%; + } + + .nav-menus-php .quick-search { + width: 85%; + } + + #menu-management-liquid { + margin-top: 25px; + } + + .nav-menus-php .menu-name-label.howto span { + margin-top: 13px + } + + .menu-name-label #menu-name { + margin-top: 4px; + } + + .nav-menus-php .major-publishing-actions .publishing-action { + margin-top: 6px; + } + + .nav-menus-php .delete-action { + font-size: 14px; + line-height: 50px; + margin-top: 12px; + } + + .menu-item-bar .menu-item-handle, + .menu-item-settings, + .description-wide { + width: auto; + } + + .menu-item-settings { + padding: 10px; + } + + .menu-item-settings .description-thin, + .menu-item-settings .description-wide { + width: 100%; + height: auto; + } + + .menu-item-settings input { + width: 100%; + } + + .menu-settings dl { + padding-right: 0; + } + + .menu-settings dd { + float: none; + width: 100%; + margin-bottom: 15px; + } + + .menu-settings dt { + float: none; + width: auto; + margin-right: 0; + margin-bottom: 15px; + } +} + +@media only screen and (max-width: 768px) { + /* menu locations */ + #menu-locations-wrap .widefat { + width: 100%; + } +} diff --git a/wp-admin/css/nav-menus.css b/wp-admin/css/nav-menus.css new file mode 100644 index 0000000..6466d94 --- /dev/null +++ b/wp-admin/css/nav-menus.css @@ -0,0 +1,853 @@ +/* nav-menu */ + +/* @todo: determine if this is truly for nav menus only */ +.no-js #message { + display: block; +} + +ul.add-menu-item-tabs li { + padding: 3px 5px 3px 8px; +} + +.accordion-section ul.category-tabs, +.accordion-section ul.add-menu-item-tabs, +.accordion-section ul.wp-tab-bar { + margin: 0; +} + +.accordion-section .categorychecklist { + margin: 13px 0; +} + +#nav-menu-meta .accordion-section-content { + padding: 18px 13px; +} + +#nav-menu-meta .button-controls { + margin-bottom: 0; +} + +#nav-menus-frame { + margin-left: 300px; + margin-top: 23px; +} + +#wpbody-content #menu-settings-column { + display:inline; + width:281px; + margin-left: -300px; + clear: both; + float: left; + padding-top: 0; +} + +#menu-settings-column .inside { + clear: both; + margin: 10px 0 0; +} + +.metabox-holder-disabled .postbox, +.metabox-holder-disabled .accordion-section-content, +.metabox-holder-disabled .accordion-section-title { + opacity: 0.5; + filter: alpha(opacity=50); +} + +.metabox-holder-disabled .button-controls .select-all { + display: none; +} + +#wpbody { + position: relative; +} + +.blank-slate .menu-name { + height: 2em; +} + +.blank-slate .menu-settings { + border: none; + margin-top: 0; + padding-top: 0; + overflow: hidden; +} + +.is-submenu { + color: #999; + font-style: italic; + font-weight: normal; + margin-left: 4px; +} + +.manage-menus { + margin-top: 23px; + padding: 10px; + overflow: hidden; + background: #fbfbfb; +} + +.manage-menus select { + float: left; + margin-right: 6px; +} + +.manage-menus .selected-menu { + float: left; + margin: 5px 6px 0 0; +} + +.manage-menus .submit-btn { + float: left; + margin-top: 1px; +} + +.menu-edit p { + margin: .3em 0 .6em; +} + +.menu-edit #post-body-content h3 { + margin: 1em 0 10px; +} + +.menu-settings { + border-top: 1px solid #eee; + margin-top: 2em; +} + +.menu-settings dl { + margin: 0 0 10px; + overflow: hidden; + padding-left: 18%; +} + +.menu-settings dd { + float: left; + margin: 0; + width: 100%; +} + +.menu-settings dt { + float: left; + clear: both; + width: 21.951%; + padding: 3px 0 0; + margin-left: -21.951%; +} + +.menu-settings label { + vertical-align: baseline; +} + +.menu-edit .checkbox-input { + margin-top: 4px; +} + +.theme-location-set { + color: #999; + font-size: 11px; +} + +/* Menu Container */ +#menu-management-liquid { + float: left; + min-width: 100%; + margin-top: 3px; +} + +#menu-management { + position: relative; + margin-right: 20px; + margin-top: -3px; + width: 100%; + background: #f5f5f5; +} + +#menu-management .menu-edit { + margin-bottom: 20px; +} + +.nav-menus-php #post-body { + padding: 0 10px 10px; + border-top: 1px solid #fff; + border-bottom: 1px solid #dfdfdf; + background: #fff; +} + +#nav-menu-header, +#nav-menu-footer { + padding: 0 10px; +} + +#nav-menu-header { + border-bottom: 1px solid #dfdfdf; + margin-bottom: 0; +} + +#nav-menu-header .menu-name-label { + margin-top: 4px; +} + +.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:600; +} + +#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; +} + +.widefat td.menu-location-menus { + padding-bottom: 5px; +} + +.menu-location-menus select { + float: left; +} + +#locations-nav-menu-wrapper { + padding: 5px 0; +} + +.locations-nav-menu-select select { + float: left; + width: 160px; + margin-right: 5px; +} + +.locations-row-links { + float: left; + margin: 6px 0 0 6px; +} + +.locations-edit-menu-link, +.locations-add-menu-link { + margin: 0 3px; +} + +.locations-edit-menu-link { + padding-right: 3px; + border-right: 1px solid #ccc; +} + +#wpbody .open-label { + display: block; + float:left; +} + +#wpbody .open-label span { + padding-right: 10px; +} + +.js .input-with-default-title { + color: #aaa; + font-style: italic; +} + +#menu-management .inside { + padding: 0 10px; +} + +/* Add Menu Item Boxes */ +.postbox .howto input, +.accordion-container .howto input { + width: 180px; + float: right; +} + +.accordion-container .outer-border { + margin: 0; +} + +.customlinkdiv .howto input { + width: 180px; +} + +.customlinkdiv p { + margin-top: 0 +} + +#nav-menu-theme-locations .howto select { + width: 100%; +} + +#nav-menu-theme-locations .button-controls { + text-align: right; +} + +.add-menu-item-view-all { + height: 400px; +} + +/* Button Primary Actions */ +#menu-container .submit { + margin: 0 0 10px; + padding: 0; +} + +.nav-menus-php .add-new-menu-action { + float: left; + margin: 6px 0 0 6px; + line-height: 15px; +} + +.nav-menus-php .meta-sep, +.nav-menus-php .submitdelete, +.nav-menus-php .submitcancel { + display: block; + float: left; + margin: 6px 0; + line-height: 15px; +} + +.meta-sep { + padding: 0 2px; +} + +/* @todo: is this actually used? */ +#cancel-save { + text-decoration: underline; + font-size: 12px; + margin-left: 20px; + margin-top: 5px; +} + +.button.right, .button-secondary.right, .button-primary.right { + float: right; +} + +/* Button Secondary Actions */ +.list-controls { + float: left; + margin-top: 5px; +} + +.add-to-menu { + float: right; +} + +.postbox .spinner { + display: none; + vertical-align: middle; +} + +.button-controls { + clear:both; + margin: 10px 0; +} + +.show-all, +.hide-all { + cursor: pointer; +} + +.hide-all { + display: none; +} + +/* Create Menu */ +#menu-name { + width: 270px; +} + +#manage-menu .inside { + padding: 0px 0px; +} + +/* Custom Links */ +#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: 6px; + display: block; + float: left; +} + +/* Menu item types */ +.quick-search { + width: 190px; +} + +.nav-menus-php .list-wrap { + display: none; + clear: both; + margin-bottom: 10px; +} + +.nav-menus-php .postbox p.submit { + margin-bottom: 0; +} + +/* Listings */ +.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-item-title input[type=checkbox] { + display: inline-block; + margin-top: -4px; +} + +/* Nav Menu */ +#menu-container .inside { + padding-bottom: 10px; +} + +.menu { + padding-top:1em; +} + +#menu-to-edit { + margin: 0; + padding: 0.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: 9px 0 0; +} + +.menu-item-bar .menu-item-handle { + border: 1px solid #dfdfdf; + position: relative; + padding: 10px 15px; + height: auto; + width: 382px; + line-height: 30px; + overflow: hidden; + word-wrap: break-word; +} + +.menu-item-bar .menu-item-handle:hover { + border-color: #999; +} + +#menu-to-edit .menu-item-invalid .menu-item-handle { + background: #f6c9cc; + border-color: #f1acb1; +} + +.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; + background-color: #f66; +} + +.menu-item-handle .item-title { + font-size: 13px; + font-weight: 600; + line-height: 20px; + display: block; + margin-right: 13em; +} + +/* Sortables */ +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; +} + +/* WARNING: The factor of 30px is hardcoded into the nav-menus javascript. */ +.menu-item-depth-0 { margin-left: 0px; } +.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: 0px; } +.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; } + +/* Menu item controls */ +.item-type { + color: #777; + font-size: 12px; + padding: 12px 10px; + line-height: 18px; + display: block; +} + +.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: 40px; + margin-right: 0 !important; + text-indent: 100%; + outline: none; + overflow: hidden; + white-space: nowrap; +} + +/* Menu editing */ +.menu-instructions-inactive { + display: none; +} + +.menu-item-settings { + display: block; + width: 402px; + padding: 10px 0 10px 10px; + position: relative; + z-index: 10; /* Keep .item-title's shadow from appearing on top of .menu-item-settings */ + border: 1px solid #e5e5e5; + border-top: none; + -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.04); + box-shadow: 0 1px 1px rgba(0,0,0,0.04); +} + +.menu-item-settings .field-move a { + display: none; + margin: 0 2px; +} + +.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; + border: 1px solid #dfdfdf; + color: #777; + 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; +} + +/* Major/minor publishing actions (classes) */ +.nav-menus-php .major-publishing-actions { + clear: both; + padding: 3px 0 6px; +} + +.nav-menus-php .major-publishing-actions .publishing-action { + text-align: right; + float: right; + line-height: 23px; + margin: 4px 0 1px; +} + +.nav-menus-php .blank-slate .menu-settings { + display: none; +} + +.nav-menus-php .delete-action { + float: left; + margin-top: 2px; +} + +.nav-menus-php .submitbox .submitcancel { + border-bottom: 1px solid #0074a2; + padding: 1px 2px; + color: #0074a2; + text-decoration: none; +} + +.nav-menus-php .submitbox .submitcancel:hover { + background: #0074a2; + color: #fff; +} + +.nav-menus-php .major-publishing-actions .form-invalid { + padding-left: 4px; + margin-left: -4px; +} + +/* Clearfix */ +#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; +} + +/* =Media Queries +-------------------------------------------------------------- */ + +@media screen and ( max-width: 782px ) { + body.nav-menus-php { + min-width: 0 !important; + } + + #nav-menus-frame { + margin-left: 0; + float: none; + width: 100%; + } + + #wpbody-content #menu-settings-column { + display: block; + width: 100%; + float: none; + margin-left: 0; + } + + #side-sortables .add-menu-item-tabs { + margin: 15px 0 14px; + } + + ul.add-menu-item-tabs li.tabs { + padding: 13px 15px 14px; + } + + .nav-menus-php .item-controls .item-type { + margin-top: 2px; + } + + .nav-menus-php .customlinkdiv .howto input { + width: 65%; + } + + .nav-menus-php .quick-search { + width: 85%; + } + + #menu-management-liquid { + margin-top: 25px; + } + + .nav-menus-php .menu-name-label.howto span { + margin-top: 13px + } + + .menu-name-label #menu-name { + margin-top: 4px; + } + + .nav-menus-php .major-publishing-actions .publishing-action { + margin-top: 6px; + } + + .nav-menus-php .delete-action { + font-size: 14px; + line-height: 50px; + margin-top: 12px; + } + + .menu-item-bar .menu-item-handle, + .menu-item-settings, + .description-wide { + width: auto; + } + + .menu-item-settings { + padding: 10px; + } + + .menu-item-settings .description-thin, + .menu-item-settings .description-wide { + width: 100%; + height: auto; + } + + .menu-item-settings input { + width: 100%; + } + + .menu-settings dl { + padding-left: 0; + } + + .menu-settings dd { + float: none; + width: 100%; + margin-bottom: 15px; + } + + .menu-settings dt { + float: none; + width: auto; + margin-left: 0; + margin-bottom: 15px; + } +} + +@media only screen and (max-width: 768px) { + /* menu locations */ + #menu-locations-wrap .widefat { + width: 100%; + } +} diff --git a/wp-admin/css/press-this-rtl.css b/wp-admin/css/press-this-rtl.css new file mode 100644 index 0000000..4773ba4 --- /dev/null +++ b/wp-admin/css/press-this-rtl.css @@ -0,0 +1,458 @@ +.press-this #message { + border-right: 4px solid #7ad03a; + padding: 1px 12px; + background-color: #fff; + -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1); + box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1); +} + +.press-this #side-sortables .category-tabs li { + display: inline; + line-height: 1.35em; +} + +body.press-this ul.category-tabs li.tabs a { + color: #333; +} + +.press-this #content-resize-handle { + bottom: 2px; +} + +body.press-this { + color: #333; + margin: 0; + padding: 0; + min-width: 708px; + min-height: 400px; +} + +.press-this #titlediv #title { + font-size: 1.4em; +} + +.press-this #site-heading:before { + top: 3px; + position: relative; + display: inline-block; + font: normal 18px/1 'dashicons'; + speak: none; + color: #727272; + content: '\f120'; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.press-this #wphead { + height: 32px; + margin-right: 0; + margin-left: 0; + margin-bottom: 5px; +} + +.press-this #header-logo { + float: right; + margin: 7px 7px 0; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.press-this #wphead h1 { + font-weight: normal; + font-size: 16px; + line-height: 32px; + margin: 0; + float: right; +} + +.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 .posting { + margin-left: 250px; +} + +.press-this-sidebar { + float: left; + width: 240px; + padding-top: 10px; +} + +.press-this #title { + margin-right: 0; + margin-left: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.press-this .tagchecklist { + margin-top: 8px; +} + +.press-this #titlediv { + margin: 0; +} + +.press-this #wp-content-wrap #wp-content-editor-tools { + padding: 0; + top: 3px; + overflow: hidden; +} + +.press-this .wp-media-buttons { + cursor: default; + padding: 8px 8px 6px; +} + +.press-this #wp-content-wrap #wp-content-media-buttons a { + padding: 0; + line-height: normal; + height: auto; + font-size: 16px; +} + +.press-this #wp-content-wrap .mce-toolbar .mce-btn-group .mce-btn { + margin: 0 1px; +} + +.press-this #wp-content-wrap .mce-toolbar .mce-btn button { + padding: 2px 3px; +} + +.press-this #wp-content-wrap div.mce-toolbar-grp, +.press-this #wp-content-wrap .quicktags-toolbar { + padding-left: 3px; +} + +.press-this .howto { + margin-top: 2px; + margin-bottom: 3px; + font-size: 12px; + font-style: italic; + display: block; +} + +.press-this #wp-content-editor-container { + clear: none; +} + +.press-this #poststuff .inside { + margin-top: 18px; +} + +.press-this .category-tabs { + margin-bottom: 3px; +} + +/* Editor/Main Column */ +.press-this #poststuff { + margin: 0 8px; + padding: 0; +} + +.press-this #photo-add-url-div input[type="text"] { + width: 220px; +} + +#poststuff #editor-toolbar { + height: 30px; +} + +.posting { + margin-left: 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: left; +} + +.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 { + font-weight: 600; + font-size: 12px; + margin-right: 5px; +} + +.press-this .postbox, +.press-this .stuffbox { + margin-bottom: 10px; + min-width: 0; +} + +.press-this #submitdiv:hover .handlediv { + background: none; +} + +.tbtitle { + font-size: 1.7em; + outline: none; + padding: 3px 4px; + border: 1px solid #dfdfdf; +} + +.press-this .actions { + float: left; + margin: -19px 0 0; +} + +.press-this #extra-fields .actions { + margin: -32px 0 0 -7px; +} + +.press-this .actions li { + float: right; + list-style: none; + margin-left: 10px; +} + +#extra-fields .button { + margin-left: 5px; +} + +/* Photo Styles */ +#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; + overflow: hidden; +} + +#waiting span { + float: left; + margin: 0 5px 0 0; +} + +#waiting .spinner { + display: block; +} + +#extra-fields .postbox { + margin-bottom: 5px; +} + +#extra-fields .titlewrap { + padding: 0; + overflow: auto; + height: 120px; +} + +#img_container a { + display: block; + float: right; + overflow: hidden; +} + +#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: 1px; +} + +/* Video */ +#embed-code { + width: 100%; + height: 98px; +} + +/* Categories */ +.press-this .categorydiv div.tabs-panel { + height: 100px; +} + +/* Tags */ +.press-this .tagsdiv .newtag { + width: 120px; +} + +.press-this #content { + margin: 5px 0; + padding: 0 5px; + border: 0 none; + height: 340px; + font-family: Consolas, Monaco, monospace; + font-size: 13px; + line-height: 19px; + background: transparent; +} + +/* Submit */ +.press-this #publishing-actions .spinner { + display: inline; + vertical-align: middle; +} + +/* =Media Queries +-------------------------------------------------------------- */ + +/* Reset responsive styles in Press This */ +@media screen and ( max-width: 782px ) { + .press-this ul.category-tabs li.tabs { + padding: 3px 5px 5px; /* Reset tabs in Press This to standard size */ + } + + .press-this a.wp-switch-editor { + font: 13px/19px "Open Sans", sans-serif; + margin: 5px 5px 0 0; + padding: 3px 8px 4px; + } + + .press-this #wp-content-media-buttons a { + padding: 0; + line-height: normal; + height: auto; + } + + .press-this #wp-content-editor-tools { + padding: 0; + top: 3px; + } + + .press-this .category-tabs { + margin-top: 0; + } + + .press-this .tagsdiv .newtag { + width: 120px; + padding: 3px 5px; + margin-bottom: 0; + } + + .press-this .tagchecklist { + padding: 0; + margin-bottom: 0; + } + + .press-this .wp_themeSkin a.mceButton { + width: 20px; + height: 20px; + } + + .press-this .wp_themeSkin .mceButton .mceIcon { + margin: 0; + } + + .press-this #poststuff h3, + .press-this .metabox-holder h3 { + padding: 7px 12px; + } + + .press-this input[type=checkbox], + .press-this input[type=radio] { + height: 16px; + width: 16px; + } + + .press-this input[type=checkbox]:checked:before { + width: 16px; + font: normal 21px/1 'dashicons'; + margin: -3px -4px 0 0; + } + + .press-this input[type=radio]:checked:before { + font: normal 21px/1 'dashicons'; + width: 6px; + height: 6px; + margin: 4px; + } + + .press-this ul.categorychecklist ul, + .press-this ul.categorychecklist li { + margin-top: 0; + margin-bottom: 0; + } + + .press-this div.quicktags-toolbar input { + padding: 2px 4px; + } + + .press-this textarea, + .press-this input { + font-size: 14px; + } + + .press-this .tagchecklist span { + font-size: 13px; + line-height: 1.8em; + } +} diff --git a/wp-admin/css/press-this.css b/wp-admin/css/press-this.css new file mode 100644 index 0000000..dbf355a --- /dev/null +++ b/wp-admin/css/press-this.css @@ -0,0 +1,458 @@ +.press-this #message { + border-left: 4px solid #7ad03a; + padding: 1px 12px; + background-color: #fff; + -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1); + box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1); +} + +.press-this #side-sortables .category-tabs li { + display: inline; + line-height: 1.35em; +} + +body.press-this ul.category-tabs li.tabs a { + color: #333; +} + +.press-this #content-resize-handle { + bottom: 2px; +} + +body.press-this { + color: #333; + margin: 0; + padding: 0; + min-width: 708px; + min-height: 400px; +} + +.press-this #titlediv #title { + font-size: 1.4em; +} + +.press-this #site-heading:before { + top: 3px; + position: relative; + display: inline-block; + font: normal 18px/1 'dashicons'; + speak: none; + color: #727272; + content: '\f120'; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.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; + -ms-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 .posting { + margin-right: 250px; +} + +.press-this-sidebar { + float: right; + width: 240px; + padding-top: 10px; +} + +.press-this #title { + margin-left: 0; + margin-right: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.press-this .tagchecklist { + margin-top: 8px; +} + +.press-this #titlediv { + margin: 0; +} + +.press-this #wp-content-wrap #wp-content-editor-tools { + padding: 0; + top: 3px; + overflow: hidden; +} + +.press-this .wp-media-buttons { + cursor: default; + padding: 8px 8px 6px; +} + +.press-this #wp-content-wrap #wp-content-media-buttons a { + padding: 0; + line-height: normal; + height: auto; + font-size: 16px; +} + +.press-this #wp-content-wrap .mce-toolbar .mce-btn-group .mce-btn { + margin: 0 1px; +} + +.press-this #wp-content-wrap .mce-toolbar .mce-btn button { + padding: 2px 3px; +} + +.press-this #wp-content-wrap div.mce-toolbar-grp, +.press-this #wp-content-wrap .quicktags-toolbar { + padding-right: 3px; +} + +.press-this .howto { + margin-top: 2px; + margin-bottom: 3px; + font-size: 12px; + font-style: italic; + display: block; +} + +.press-this #wp-content-editor-container { + clear: none; +} + +.press-this #poststuff .inside { + margin-top: 18px; +} + +.press-this .category-tabs { + margin-bottom: 3px; +} + +/* Editor/Main Column */ +.press-this #poststuff { + margin: 0 8px; + padding: 0; +} + +.press-this #photo-add-url-div input[type="text"] { + width: 220px; +} + +#poststuff #editor-toolbar { + height: 30px; +} + +.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 { + font-weight: 600; + font-size: 12px; + margin-left: 5px; +} + +.press-this .postbox, +.press-this .stuffbox { + margin-bottom: 10px; + min-width: 0; +} + +.press-this #submitdiv:hover .handlediv { + background: none; +} + +.tbtitle { + font-size: 1.7em; + outline: none; + padding: 3px 4px; + border: 1px solid #dfdfdf; +} + +.press-this .actions { + float: right; + margin: -19px 0 0; +} + +.press-this #extra-fields .actions { + margin: -32px -7px 0 0; +} + +.press-this .actions li { + float: left; + list-style: none; + margin-right: 10px; +} + +#extra-fields .button { + margin-right: 5px; +} + +/* Photo Styles */ +#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; + overflow: hidden; +} + +#waiting span { + float: right; + margin: 0 0 0 5px; +} + +#waiting .spinner { + display: block; +} + +#extra-fields .postbox { + margin-bottom: 5px; +} + +#extra-fields .titlewrap { + padding: 0; + overflow: auto; + height: 120px; +} + +#img_container a { + display: block; + float: left; + overflow: hidden; +} + +#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: 1px; +} + +/* Video */ +#embed-code { + width: 100%; + height: 98px; +} + +/* Categories */ +.press-this .categorydiv div.tabs-panel { + height: 100px; +} + +/* Tags */ +.press-this .tagsdiv .newtag { + width: 120px; +} + +.press-this #content { + margin: 5px 0; + padding: 0 5px; + border: 0 none; + height: 340px; + font-family: Consolas, Monaco, monospace; + font-size: 13px; + line-height: 19px; + background: transparent; +} + +/* Submit */ +.press-this #publishing-actions .spinner { + display: inline; + vertical-align: middle; +} + +/* =Media Queries +-------------------------------------------------------------- */ + +/* Reset responsive styles in Press This */ +@media screen and ( max-width: 782px ) { + .press-this ul.category-tabs li.tabs { + padding: 3px 5px 5px; /* Reset tabs in Press This to standard size */ + } + + .press-this a.wp-switch-editor { + font: 13px/19px "Open Sans", sans-serif; + margin: 5px 0 0 5px; + padding: 3px 8px 4px; + } + + .press-this #wp-content-media-buttons a { + padding: 0; + line-height: normal; + height: auto; + } + + .press-this #wp-content-editor-tools { + padding: 0; + top: 3px; + } + + .press-this .category-tabs { + margin-top: 0; + } + + .press-this .tagsdiv .newtag { + width: 120px; + padding: 3px 5px; + margin-bottom: 0; + } + + .press-this .tagchecklist { + padding: 0; + margin-bottom: 0; + } + + .press-this .wp_themeSkin a.mceButton { + width: 20px; + height: 20px; + } + + .press-this .wp_themeSkin .mceButton .mceIcon { + margin: 0; + } + + .press-this #poststuff h3, + .press-this .metabox-holder h3 { + padding: 7px 12px; + } + + .press-this input[type=checkbox], + .press-this input[type=radio] { + height: 16px; + width: 16px; + } + + .press-this input[type=checkbox]:checked:before { + width: 16px; + font: normal 21px/1 'dashicons'; + margin: -3px 0 0 -4px; + } + + .press-this input[type=radio]:checked:before { + font: normal 21px/1 'dashicons'; + width: 6px; + height: 6px; + margin: 4px; + } + + .press-this ul.categorychecklist ul, + .press-this ul.categorychecklist li { + margin-top: 0; + margin-bottom: 0; + } + + .press-this div.quicktags-toolbar input { + padding: 2px 4px; + } + + .press-this textarea, + .press-this input { + font-size: 14px; + } + + .press-this .tagchecklist span { + font-size: 13px; + line-height: 1.8em; + } +} diff --git a/wp-admin/css/revisions-rtl.css b/wp-admin/css/revisions-rtl.css new file mode 100644 index 0000000..d870006 --- /dev/null +++ b/wp-admin/css/revisions-rtl.css @@ -0,0 +1,571 @@ +/*------------------------------------------------------------------------------ + 11.2 - Post Revisions +------------------------------------------------------------------------------*/ +.revisions-control-frame, +.revisions-diff-frame { + position: relative; +} + +.revisions-controls { + padding-top: 40px; + height: 100px; + z-index: 1; +} + +.revisions-controls input[type="checkbox"] { + position: relative; + top: -1px; + vertical-align: text-bottom; +} + +.revisions.pinned .revisions-controls { + position: fixed; + top: 0; + height: 82px; + background: #fff; + -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.1); + box-shadow: 0 1px 3px rgba(0,0,0,0.1); +} + +.revisions-tickmarks { + position: relative; + margin: 0 auto; + height: 0.7em; + top: 7px; + max-width: 70%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + background-color: #fff; +} + +.revisions-tickmarks > div { + position: absolute; + height: 100%; + border-right: 1px solid #aaa; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.revisions-tickmarks > div:first-child { + border-width: 0; +} + +.comparing-two-revisions .revisions-controls { + height: 140px; +} + +.comparing-two-revisions.pinned .revisions-controls { + height: 124px; +} + +.revisions .diff-error { + position: absolute; + text-align: center; + margin: 0 auto; + width: 100%; + display: none; +} + +.revisions.diff-error .diff-error { + display: block; +} + +.revisions .loading-indicator { + position: fixed; + vertical-align: middle; + opacity: 0; + width: 100%; + top: 50%; + margin-right: -90px; + -webkit-transition: opacity 0.5s; + transition: opacity 0.5s; + filter: alpha(opacity=0); /* ie8 and earlier */ +} + +body.folded .revisions .loading-indicator { + margin-right: -32px; +} + +.revisions .loading-indicator span.spinner { + display: block; + margin: 0 auto; + float: none; +} + +.revisions.loading .loading-indicator { + opacity: 1; + filter: alpha(opacity=100); /* ie8 and earlier */ +} + +.revisions .diff { + -webkit-transition: opacity 0.5s; + transition: opacity 0.5s; +} + +.revisions.loading .diff { + opacity: 0.5; + filter: alpha(opacity=50); /* ie8 and earlier */ +} + +.revisions.diff-error .diff { + visibility: hidden; +} + +.revisions-meta { + margin-top: 20px; + background-color: #fff; + -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.1); + box-shadow: 0 1px 3px rgba(0,0,0,0.1); +} + +.revisions.pinned .revisions-meta { + -webkit-box-shadow: none; + box-shadow: none; +} + +.revision-toggle-compare-mode { + position: absolute; + top: 0; + left: 0; +} + +.comparing-two-revisions .revisions-previous, +.comparing-two-revisions .revisions-next, +.revisions-meta .diff-meta-to strong { + display: none; +} + +.revisions-controls .author-card .date { + color: #777; +} + +.revisions-controls .author-card.autosave { + color: #d54e21; +} + +.revisions-controls .author-card .author-name { + font-weight: bold; +} + +.comparing-two-revisions .diff-meta-to strong { + display: block; +} + +.revisions.pinned .revisions-buttons { + padding: 0 11px; +} + +.revisions-previous, +.revisions-next { + position: relative; + z-index: 1; +} + +.revisions-previous { + float: right; +} + +.revisions-next { + float: left; +} + +.revisions-controls .wp-slider { + max-width: 70%; + margin: 0 auto; + top: -3px; +} + +.revisions-diff { + padding: 15px; + background-color: #fff; + -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.1); + box-shadow: 0 1px 3px rgba(0,0,0,0.1); +} + +.revisions-diff h3:first-child { + margin-top: 0; +} + +/* Revision meta box */ +.post-revisions li img, +#revisions-meta-restored img { + vertical-align: middle; +} + +table.diff tbody tr td:nth-child(2) { + width: 4%; +} + +table.diff { + table-layout: fixed; + width: 100%; + white-space: pre-wrap; +} + +table.diff col.content { + width: auto; +} + +table.diff col.content.diffsplit { + width: 48%; +} + +table.diff col.diffsplit.middle { + width: auto; +} + +table.diff col.ltype { + width: 30px; +} + +table.diff tr { + background-color: transparent; +} + +table.diff td, +table.diff th { + font-family: Consolas, Monaco, monospace; + font-size: 14px; + line-height: 1.618; + padding: .5em; + vertical-align: top; + word-wrap: break-word; +} + +table.diff td h1, +table.diff td h2, +table.diff td h3, +table.diff td h4, +table.diff td h5, +table.diff td h6 { + margin: 0; +} + +table.diff .diff-deletedline del, +table.diff .diff-addedline ins { + text-decoration: none; +} + +table.diff .diff-deletedline { + background-color: #ffe9e9; +} + +table.diff .diff-deletedline del { + background-color: #faa; +} + +table.diff .diff-addedline { + background-color: #e9ffe9; +} + +table.diff .diff-addedline ins { + background-color: #afa; +} + +.diff-meta { + padding: 5px; + clear: both; + min-height: 32px; +} + +.diff-title strong { + line-height: 32px; + min-width: 60px; + text-align: left; + float: right; + margin-left: 5px; +} + +.revisions-controls .author-card .author-info { + font-size: 12px; + line-height: 16px; +} + +.revisions-controls .author-card .avatar, +.revisions-controls .author-card .author-info { + float: right; + margin-right: 6px; + margin-left: 6px; +} + +.revisions-controls .author-card .byline { + display: block; + font-size: 12px; +} + +.revisions-controls .author-card .avatar { + vertical-align: middle; +} + +.diff-meta input.restore-revision { + float: left; + margin-right: 6px; + margin-left: 6px; + margin-top: 4px; +} + +.diff-meta-from { + display: none; +} + +.comparing-two-revisions .diff-meta-from { + display: block; +} + +.revisions-tooltip { + position: absolute; + bottom: 105px; + margin-left: 0; + margin-right: -69px; + z-index: 0; + max-width: 350px; + min-width: 130px; + padding: 8px 4px; + display: none; + opacity: 0; +} + +.revisions-tooltip.flipped { + margin-right: 0; + margin-left: -70px; +} + +.revisions.pinned .revisions-tooltip { + display: none !important; +} + +.comparing-two-revisions .revisions-tooltip { + bottom: 145px; +} + +.revisions-tooltip-arrow { + width: 70px; + height: 15px; + overflow: hidden; + position: absolute; + right: 0; + margin-right: 35px; + bottom: -15px; +} + +.revisions-tooltip.flipped .revisions-tooltip-arrow { + margin-right: 0; + margin-left: 35px; + right: auto; + left: 0; +} + +.revisions-tooltip-arrow > span { + content: ""; + position: absolute; + right: 20px; + top: -20px; + width: 25px; + height: 25px; + -webkit-transform: rotate(45deg); + -ms-transform: rotate(45deg); + transform: rotate(45deg); +} + +.revisions-tooltip.flipped .revisions-tooltip-arrow > span { + right: auto; + left: 20px; +} + +.ie8 .revisions-tooltip-arrow > span { + right: 15px; + top: -25px; + -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, M22=0.7071067811865476)"; +} + +.ie8 .revisions-tooltip.flipped .revisions-tooltip-arrow > span { + left: 25px; +} + +.revisions-tooltip, +.revisions-tooltip-arrow > span { + border: 1px solid #d7d7d7; + background-color: #fff; +} + +.revisions-tooltip { + display: none; +} + +.arrow { + width: 70px; + height: 16px; + overflow: hidden; + position: absolute; + right: 0; + margin-right: -35px; + bottom: 90px; + z-index: 10000; +} + +.arrow::after { + z-index: 9999; + background-color: #fff; + -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.1); + box-shadow: 0 1px 3px rgba(0,0,0,0.1); +} + +.arrow.top { + top: -16px; + bottom: auto; +} + +.arrow.left { + right: 20%; +} + +.arrow:after { + content: ""; + position: absolute; + right: 20px; + top: -20px; + width: 25px; + height: 25px; + -webkit-transform: rotate(45deg); + -ms-transform: rotate(45deg); + transform: rotate(45deg); +} + +.revisions-tooltip, +.revisions-tooltip-arrow:after { + border-width: 1px; + border-style: solid; +} + +div.revisions-controls > .wp-slider > .ui-slider-handle { + margin-right: -10px; +} + +.rtl div.revisions-controls > .wp-slider > .ui-slider-handle { + margin-left: -10px; +} + + /* jQuery UI Slider */ +.wp-slider.ui-slider { + position: relative; + border: 1px solid #d7d7d7; + text-align: right; + cursor: pointer; +} + +.wp-slider .ui-slider-handle { + -webkit-border-radius: 50%; + border-radius: 50%; + height: 18px; + margin-top: -3px; + outline: none; + position: absolute; + width: 18px; + z-index: 2; +} + +.wp-slider .ui-slider-handle, +.wp-slider .ui-slider-handle.ui-state-hover, +.wp-slider .ui-slider-handle.focus { + background: #2ea2cc; + border: 1px solid #0074a2; + -webkit-box-shadow: inset 0 1px 0 #78c8e6, 0 1px 0 rgba(0,0,0,.15); + box-shadow: inset 0 1px 0 #78c8e6, 0 1px 0 rgba(0,0,0,.15); +} + +.wp-slider .ui-slider-handle:before { + background: none; + position: absolute; + top: 0; + right: 0; + color: #fff; + content: "\f229"; + font: normal 18px/1 'dashicons'; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.wp-slider .ui-slider-handle.from-handle:before, +.wp-slider .ui-slider-handle.to-handle:before { + font-size: 20px !important; + margin: -1px -1px 0 0; +} + +.wp-slider .ui-slider-handle.from-handle:before { + content: '\f139'; +} + +.wp-slider .ui-slider-handle.to-handle:before { + content: '\f141'; +} + +.rtl .wp-slider .ui-slider-handle.from-handle:before { + content: '\f141'; +} + +.rtl .wp-slider .ui-slider-handle.to-handle:before { + content: '\f139'; + left: -1px; +} + +.wp-slider .ui-slider-range { + position: absolute; + font-size: .7em; + display: block; + border: 0; + background-color: transparent; + background-image: none; +} + +.wp-slider.ui-slider-horizontal { + height: .7em; +} + +.wp-slider.ui-slider-horizontal .ui-slider-handle { + top: -.25em; + margin-right: -.6em; +} + +.wp-slider.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} + +.wp-slider.ui-slider-horizontal .ui-slider-range-min { + right: 0; +} + +.wp-slider.ui-slider-horizontal .ui-slider-range-max { + left: 0; +} + +/* =Media Queries +-------------------------------------------------------------- */ + +/** + * HiDPI Displays + */ +@media print, + (-o-min-device-pixel-ratio: 5/4), + (-webkit-min-device-pixel-ratio: 1.25), + (min-resolution: 120dpi) { + .revision-tick.completed-false { + background-image: url(../images/spinner-2x.gif); + } +} + +@media screen and ( max-width: 782px ) { + #diff-next-revision, + #diff-previous-revision { + margin-top: -1em; + } + + table.diff { + -ms-word-break: break-all; + word-break: break-all; + word-wrap: break-word; + } +} diff --git a/wp-admin/css/revisions.css b/wp-admin/css/revisions.css new file mode 100644 index 0000000..0263674 --- /dev/null +++ b/wp-admin/css/revisions.css @@ -0,0 +1,571 @@ +/*------------------------------------------------------------------------------ + 11.2 - Post Revisions +------------------------------------------------------------------------------*/ +.revisions-control-frame, +.revisions-diff-frame { + position: relative; +} + +.revisions-controls { + padding-top: 40px; + height: 100px; + z-index: 1; +} + +.revisions-controls input[type="checkbox"] { + position: relative; + top: -1px; + vertical-align: text-bottom; +} + +.revisions.pinned .revisions-controls { + position: fixed; + top: 0; + height: 82px; + background: #fff; + -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.1); + box-shadow: 0 1px 3px rgba(0,0,0,0.1); +} + +.revisions-tickmarks { + position: relative; + margin: 0 auto; + height: 0.7em; + top: 7px; + max-width: 70%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + background-color: #fff; +} + +.revisions-tickmarks > div { + position: absolute; + height: 100%; + border-left: 1px solid #aaa; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.revisions-tickmarks > div:first-child { + border-width: 0; +} + +.comparing-two-revisions .revisions-controls { + height: 140px; +} + +.comparing-two-revisions.pinned .revisions-controls { + height: 124px; +} + +.revisions .diff-error { + position: absolute; + text-align: center; + margin: 0 auto; + width: 100%; + display: none; +} + +.revisions.diff-error .diff-error { + display: block; +} + +.revisions .loading-indicator { + position: fixed; + vertical-align: middle; + opacity: 0; + width: 100%; + top: 50%; + margin-left: -90px; + -webkit-transition: opacity 0.5s; + transition: opacity 0.5s; + filter: alpha(opacity=0); /* ie8 and earlier */ +} + +body.folded .revisions .loading-indicator { + margin-left: -32px; +} + +.revisions .loading-indicator span.spinner { + display: block; + margin: 0 auto; + float: none; +} + +.revisions.loading .loading-indicator { + opacity: 1; + filter: alpha(opacity=100); /* ie8 and earlier */ +} + +.revisions .diff { + -webkit-transition: opacity 0.5s; + transition: opacity 0.5s; +} + +.revisions.loading .diff { + opacity: 0.5; + filter: alpha(opacity=50); /* ie8 and earlier */ +} + +.revisions.diff-error .diff { + visibility: hidden; +} + +.revisions-meta { + margin-top: 20px; + background-color: #fff; + -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.1); + box-shadow: 0 1px 3px rgba(0,0,0,0.1); +} + +.revisions.pinned .revisions-meta { + -webkit-box-shadow: none; + box-shadow: none; +} + +.revision-toggle-compare-mode { + position: absolute; + top: 0; + right: 0; +} + +.comparing-two-revisions .revisions-previous, +.comparing-two-revisions .revisions-next, +.revisions-meta .diff-meta-to strong { + display: none; +} + +.revisions-controls .author-card .date { + color: #777; +} + +.revisions-controls .author-card.autosave { + color: #d54e21; +} + +.revisions-controls .author-card .author-name { + font-weight: bold; +} + +.comparing-two-revisions .diff-meta-to strong { + display: block; +} + +.revisions.pinned .revisions-buttons { + padding: 0 11px; +} + +.revisions-previous, +.revisions-next { + position: relative; + z-index: 1; +} + +.revisions-previous { + float: left; +} + +.revisions-next { + float: right; +} + +.revisions-controls .wp-slider { + max-width: 70%; + margin: 0 auto; + top: -3px; +} + +.revisions-diff { + padding: 15px; + background-color: #fff; + -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.1); + box-shadow: 0 1px 3px rgba(0,0,0,0.1); +} + +.revisions-diff h3:first-child { + margin-top: 0; +} + +/* Revision meta box */ +.post-revisions li img, +#revisions-meta-restored img { + vertical-align: middle; +} + +table.diff tbody tr td:nth-child(2) { + width: 4%; +} + +table.diff { + table-layout: fixed; + width: 100%; + white-space: pre-wrap; +} + +table.diff col.content { + width: auto; +} + +table.diff col.content.diffsplit { + width: 48%; +} + +table.diff col.diffsplit.middle { + width: auto; +} + +table.diff col.ltype { + width: 30px; +} + +table.diff tr { + background-color: transparent; +} + +table.diff td, +table.diff th { + font-family: Consolas, Monaco, monospace; + font-size: 14px; + line-height: 1.618; + padding: .5em; + vertical-align: top; + word-wrap: break-word; +} + +table.diff td h1, +table.diff td h2, +table.diff td h3, +table.diff td h4, +table.diff td h5, +table.diff td h6 { + margin: 0; +} + +table.diff .diff-deletedline del, +table.diff .diff-addedline ins { + text-decoration: none; +} + +table.diff .diff-deletedline { + background-color: #ffe9e9; +} + +table.diff .diff-deletedline del { + background-color: #faa; +} + +table.diff .diff-addedline { + background-color: #e9ffe9; +} + +table.diff .diff-addedline ins { + background-color: #afa; +} + +.diff-meta { + padding: 5px; + clear: both; + min-height: 32px; +} + +.diff-title strong { + line-height: 32px; + min-width: 60px; + text-align: right; + float: left; + margin-right: 5px; +} + +.revisions-controls .author-card .author-info { + font-size: 12px; + line-height: 16px; +} + +.revisions-controls .author-card .avatar, +.revisions-controls .author-card .author-info { + float: left; + margin-left: 6px; + margin-right: 6px; +} + +.revisions-controls .author-card .byline { + display: block; + font-size: 12px; +} + +.revisions-controls .author-card .avatar { + vertical-align: middle; +} + +.diff-meta input.restore-revision { + float: right; + margin-left: 6px; + margin-right: 6px; + margin-top: 4px; +} + +.diff-meta-from { + display: none; +} + +.comparing-two-revisions .diff-meta-from { + display: block; +} + +.revisions-tooltip { + position: absolute; + bottom: 105px; + margin-right: 0; + margin-left: -69px; + z-index: 0; + max-width: 350px; + min-width: 130px; + padding: 8px 4px; + display: none; + opacity: 0; +} + +.revisions-tooltip.flipped { + margin-left: 0; + margin-right: -70px; +} + +.revisions.pinned .revisions-tooltip { + display: none !important; +} + +.comparing-two-revisions .revisions-tooltip { + bottom: 145px; +} + +.revisions-tooltip-arrow { + width: 70px; + height: 15px; + overflow: hidden; + position: absolute; + left: 0; + margin-left: 35px; + bottom: -15px; +} + +.revisions-tooltip.flipped .revisions-tooltip-arrow { + margin-left: 0; + margin-right: 35px; + left: auto; + right: 0; +} + +.revisions-tooltip-arrow > span { + content: ""; + position: absolute; + left: 20px; + top: -20px; + width: 25px; + height: 25px; + -webkit-transform: rotate(45deg); + -ms-transform: rotate(45deg); + transform: rotate(45deg); +} + +.revisions-tooltip.flipped .revisions-tooltip-arrow > span { + left: auto; + right: 20px; +} + +.ie8 .revisions-tooltip-arrow > span { + left: 15px; + top: -25px; + -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, M22=0.7071067811865476)"; +} + +.ie8 .revisions-tooltip.flipped .revisions-tooltip-arrow > span { + right: 25px; +} + +.revisions-tooltip, +.revisions-tooltip-arrow > span { + border: 1px solid #d7d7d7; + background-color: #fff; +} + +.revisions-tooltip { + display: none; +} + +.arrow { + width: 70px; + height: 16px; + overflow: hidden; + position: absolute; + left: 0; + margin-left: -35px; + bottom: 90px; + z-index: 10000; +} + +.arrow::after { + z-index: 9999; + background-color: #fff; + -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.1); + box-shadow: 0 1px 3px rgba(0,0,0,0.1); +} + +.arrow.top { + top: -16px; + bottom: auto; +} + +.arrow.left { + left: 20%; +} + +.arrow:after { + content: ""; + position: absolute; + left: 20px; + top: -20px; + width: 25px; + height: 25px; + -webkit-transform: rotate(45deg); + -ms-transform: rotate(45deg); + transform: rotate(45deg); +} + +.revisions-tooltip, +.revisions-tooltip-arrow:after { + border-width: 1px; + border-style: solid; +} + +div.revisions-controls > .wp-slider > .ui-slider-handle { + margin-left: -10px; +} + +.rtl div.revisions-controls > .wp-slider > .ui-slider-handle { + margin-right: -10px; +} + + /* jQuery UI Slider */ +.wp-slider.ui-slider { + position: relative; + border: 1px solid #d7d7d7; + text-align: left; + cursor: pointer; +} + +.wp-slider .ui-slider-handle { + -webkit-border-radius: 50%; + border-radius: 50%; + height: 18px; + margin-top: -3px; + outline: none; + position: absolute; + width: 18px; + z-index: 2; +} + +.wp-slider .ui-slider-handle, +.wp-slider .ui-slider-handle.ui-state-hover, +.wp-slider .ui-slider-handle.focus { + background: #2ea2cc; + border: 1px solid #0074a2; + -webkit-box-shadow: inset 0 1px 0 #78c8e6, 0 1px 0 rgba(0,0,0,.15); + box-shadow: inset 0 1px 0 #78c8e6, 0 1px 0 rgba(0,0,0,.15); +} + +.wp-slider .ui-slider-handle:before { + background: none; + position: absolute; + top: 0; + left: 0; + color: #fff; + content: "\f229"; + font: normal 18px/1 'dashicons'; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.wp-slider .ui-slider-handle.from-handle:before, +.wp-slider .ui-slider-handle.to-handle:before { + font-size: 20px !important; + margin: -1px 0 0 -1px; +} + +.wp-slider .ui-slider-handle.from-handle:before { + content: '\f139'; +} + +.wp-slider .ui-slider-handle.to-handle:before { + content: '\f141'; +} + +.rtl .wp-slider .ui-slider-handle.from-handle:before { + content: '\f141'; +} + +.rtl .wp-slider .ui-slider-handle.to-handle:before { + content: '\f139'; + right: -1px; +} + +.wp-slider .ui-slider-range { + position: absolute; + font-size: .7em; + display: block; + border: 0; + background-color: transparent; + background-image: none; +} + +.wp-slider.ui-slider-horizontal { + height: .7em; +} + +.wp-slider.ui-slider-horizontal .ui-slider-handle { + top: -.25em; + margin-left: -.6em; +} + +.wp-slider.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} + +.wp-slider.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} + +.wp-slider.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} + +/* =Media Queries +-------------------------------------------------------------- */ + +/** + * HiDPI Displays + */ +@media print, + (-o-min-device-pixel-ratio: 5/4), + (-webkit-min-device-pixel-ratio: 1.25), + (min-resolution: 120dpi) { + .revision-tick.completed-false { + background-image: url(../images/spinner-2x.gif); + } +} + +@media screen and ( max-width: 782px ) { + #diff-next-revision, + #diff-previous-revision { + margin-top: -1em; + } + + table.diff { + -ms-word-break: break-all; + word-break: break-all; + word-wrap: break-word; + } +} diff --git a/wp-admin/css/themes-rtl.css b/wp-admin/css/themes-rtl.css new file mode 100644 index 0000000..5ae8f35 --- /dev/null +++ b/wp-admin/css/themes-rtl.css @@ -0,0 +1,1902 @@ +/*------------------------------------------------------------------------------ + 16.0 - Themes +------------------------------------------------------------------------------*/ + + +/*------------------------------------------------------------------------------ + 16.1 - Manage Themes +------------------------------------------------------------------------------*/ + +.theme-browser .themes { + clear: both; + padding: 0 0 100px; +} + +.themes-php .wrap h2 { + float: right; + margin-bottom: 15px; +} + +.network-admin.themes-php .wrap h2 { + margin-bottom: 0; +} + +.themes-php .wrap h2 .button { + margin-right: 20px; +} + +.themes-php .wrap .theme-count, +.theme-navigation .theme-count { + color: #fff; + -webkit-border-radius: 30px; + border-radius: 30px; + background: #777; + font-size: 14px; + padding: 4px 10px; + font-weight: 600; + margin-right: 5px; + margin-left: 20px; + position: relative; + top: -3px; +} + +.theme-navigation a { + text-decoration:none; +} + +/* Position admin messages */ +.themes-php div.updated, +.themes-php div.error { + margin: 0 0 20px 0; + clear: both; +} + +.themes-php div.updated a { + text-decoration: underline; +} + +/** + * Main theme element + * (has flexible margins) + */ +.theme-browser .theme { + cursor: pointer; + float: right; + margin: 0 0 4% 4%; + position: relative; + width: 30.6%; + border: 1px solid #dedede; + -webkit-box-shadow: 0 1px 1px -1px rgba(0,0,0,0.1); + box-shadow: 0 1px 1px -1px rgba(0,0,0,0.1); + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.ie8 .theme-browser .theme { + width: 30%; + margin: 0 0 4% 3%; +} + +.theme-browser .theme:nth-child(3n) { + margin-left: 0; +} + +.theme-browser .theme:hover, +.theme-browser .theme:focus { + cursor: pointer; +} + +.theme-browser .theme .theme-name { + font-size: 15px; + font-weight: 600; + height: 18px; + margin: 0; + padding: 15px; + -webkit-box-shadow: inset 0 1px 0 rgba(0,0,0,0.1); + box-shadow: inset 0 1px 0 rgba(0,0,0,0.1); + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + background: #fff; + background: rgba(255,255,255,0.65); +} + +/* Activate and Customize buttons, shown on hover and focus */ +.theme-browser .theme .theme-actions { + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + opacity: 0; + -webkit-transition: opacity 0.1s ease-in-out; + transition: opacity 0.1s ease-in-out; + position: absolute; + bottom: 0; + left: 0; + height: 38px; + padding: 9px 10px 0 10px; + background: rgba(244, 244, 244, 0.7); + border-right: 1px solid rgba(0,0,0,0.05); +} + +.theme-browser .theme:hover .theme-actions, +.theme-browser .theme.focus .theme-actions, +.theme-browser .theme:focus .theme-actions { + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; + opacity: 1; +} + +.theme-browser .theme .theme-actions .button-primary { + margin-left: 3px; +} + +.theme-browser .theme .theme-actions .button-secondary { + float: none; + margin-right: 3px; +} + +/** + * Theme Screenshot + * + * Has a fixed aspect ratio of 1.5 to 1 regardless of screenshot size + * It is also responsive. + */ +.theme-browser .theme .theme-screenshot { + display: block; + overflow: hidden; + position: relative; + -webkit-transition: opacity 0.2s ease-in-out; + transition: opacity 0.2s ease-in-out; +} + +.theme-browser .theme .theme-screenshot:after { + content: ''; + display: block; + padding-top: 66.66666%; /* using a 3/2 aspect ratio */ +} + +.theme-browser .theme .theme-screenshot img { + height: auto; + position: absolute; + right: 0; + top: 0; + width: 100%; + -webkit-transform: translateZ( 0 ); /* Prevents rendering bugs in Chrome */ + -webkit-transition: opacity 0.2s ease-in-out; /* Prevents rendering bugs in Chrome */ + transition: opacity 0.2s ease-in-out; +} + +.theme-browser .theme:hover .theme-screenshot, +.theme-browser .theme:focus .theme-screenshot { + background: #fff; +} + +.theme-browser.rendered .theme:hover .theme-screenshot img, +.theme-browser.rendered .theme:focus .theme-screenshot img { + opacity: 0.4; +} + +.theme-browser .theme .more-details { + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + opacity: 0; + position: absolute; + top: 35%; + left: 25%; + right: 25%; + background: #222; + background: rgba(0,0,0,0.7); + color: #fff; + font-size: 15px; + text-shadow: 0 1px 0 rgba(0,0,0,0.6); + -webkit-font-smoothing: antialiased; + font-weight: 600; + padding: 15px 12px; + text-align: center; + -webkit-border-radius: 3px; + border-radius: 3px; + -webkit-transition: opacity 0.1s ease-in-out; + transition: opacity 0.1s ease-in-out; +} +.theme-browser .theme:focus { + outline: 1px dotted #222; +} + +.theme-browser .theme:focus .more-details { + opacity: 1; +} +/* Current theme needs to have its action always on view */ +.theme-browser .theme.active:focus .theme-actions { + display: block; +} + +.theme-browser.rendered .theme:hover .more-details, +.theme-browser.rendered .theme:focus .more-details { + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; + opacity: 1; +} + +/** + * Displays a theme update notice + * when an update is available. + */ +.theme-browser .theme .theme-update, +.theme-browser .theme .theme-installed { + background: #d54e21; + background: rgba(213, 78, 33, 0.95); + color: #fff; + display: block; + font-size: 13px; + font-weight: 400; + height: 48px; + line-height: 48px; + padding: 0 10px; + position: absolute; + top: 0; + left: 0; + right: 0; + border-bottom: 1px solid rgba(0,0,0,0.25); + overflow: hidden; +} + +.theme-browser .theme .theme-update:before, +.theme-browser .theme .theme-installed:before { + content: '\f463'; + display: inline-block; + font: normal 20px/1 'dashicons'; + margin: 0 0 0 6px; + opacity: 0.8; + position: relative; + top: 5px; + speak: none; + -webkit-font-smoothing: antialiased; +} + + +/** + * The currently active theme + */ +.theme-browser .theme.active .theme-name { + background: #2f2f2f; + color: #fff; + padding-left: 110px; + font-weight: 300; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.5); + box-shadow: inset 0 1px 1px rgba(0,0,0,0.5); +} + +.theme-browser .theme.active .theme-name span { + font-weight: 600; +} + +.theme-browser .theme.active .theme-actions { + background: rgba(49,49,49,0.7); + border-right: none; + opacity: 1; +} + +.theme-browser .theme.active .theme-actions .button-primary { + margin-left: 0; +} + +.theme-browser .theme .theme-author { + background: #222; + color: #eee; + display: none; + font-size: 14px; + margin: 0 10px; + padding: 5px 10px; + position: absolute; + bottom: 56px; +} + +.theme-browser .theme.display-author .theme-author { + display: block; +} + +.theme-browser .theme.display-author .theme-author a { + color: inherit; + text-decoration: none; +} + +/** + * Add new theme + */ +.theme-browser .theme.add-new-theme { + border: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +.theme-browser .theme.add-new-theme a { + color: #999; + text-decoration: none; + display: block; + position: relative; + z-index: 1; +} + +.theme-browser .theme.add-new-theme:after { + display: block; + content: ''; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; + opacity: 1; + background: transparent; + background: rgba(0, 0, 0, 0); + position: absolute; + top: 0; + right: 0; + left: 0; + bottom: 0; + padding: 10% 0 0 0; + text-shadow: none; + border: 5px dashed #d5d2ca; + border: 5px dashed rgba(0, 0, 0, 0.1); + -webkit-transition: opacity 0.2s ease-in-out; + transition: opacity 0.2s ease-in-out; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.theme-browser .theme.add-new-theme span:after { + background: #e5e5e5; + background: rgba(153, 153, 153, 0.1); + -webkit-border-radius: 50%; + border-radius: 50%; + display: inline-block; + content: '\f132'; + -webkit-font-smoothing: antialiased; + font: normal 74px/115px 'dashicons'; + width: 100px; + height: 100px; + vertical-align: middle; + text-align: center; + color: rgb(153, 153, 153); + position: absolute; + top: 30%; + right: 50%; + margin-right: -50px; + text-indent: -4px; + padding: 0; + text-shadow: none; + z-index:4; +} + +.rtl .theme-browser .theme.add-new-theme span:after { + text-indent: 4px; +} + +.theme-browser .theme.add-new-theme:hover .theme-screenshot, +.theme-browser .theme.add-new-theme:focus .theme-screenshot { + background: none; +} + +.theme-browser .theme.add-new-theme:hover span:after, +.theme-browser .theme.add-new-theme:focus span:after { + background: #fff; + color: #0074a2; +} + +.theme-browser .theme.add-new-theme:hover:after, +.theme-browser .theme.add-new-theme:focus:after { + border-color: transparent; + color: #fff; + background: #0074a2; + content: ''; +} + +.theme-browser .theme.add-new-theme .theme-name { + background: none; + text-align: center; + -webkit-box-shadow: none; + box-shadow: none; + font-weight: 400; + position: relative; + top: 0; + margin-top: -10%; + margin-bottom: 10%; +} + +.theme-browser .theme.add-new-theme:hover .theme-name, +.theme-browser .theme.add-new-theme:focus .theme-name { + color: #fff; + z-index: 2; +} + +/* + * The search form + */ +.themes-php .theme-search { + position: relative; + top: -2px; + right: 20px; + font-size: 16px; + font-weight: 300; + line-height: 1.5; + width: 280px; +} + +/** + * Theme Overlay + * Shown when clicking a theme + */ +.theme-overlay .theme-backdrop { + position: absolute; + right: -20px; + left: 0; + top: 0; + bottom: 0; + background: #f1f1f1; + background: rgba( 238, 238, 238, 0.9 ); + z-index: 10; +} + +body.theme-overlay-open { + overflow: hidden; +} + +.theme-overlay .theme-header { + position: absolute; + top: 0; + right: 0; + left: 0; + height: 48px; + border-bottom: 1px solid #ddd; +} + +.theme-overlay .theme-header .close { + cursor: pointer; + height: 48px; + width: 50px; + text-align: center; + float: left; + border: 0; + border-right: 1px solid #ddd; + background-color: transparent; +} + +.theme-overlay .theme-header .close:hover:before, +.theme-overlay .theme-header .close:focus:before { + color: #fff; +} + +.theme-overlay .theme-header .close:before { + font: normal 30px/50px 'dashicons' !important; + color: #777; + display: inline-block; + content: '\f335'; + font-weight: 300; +} + +/* Left and right navigation */ +.theme-overlay .theme-header .right, +.theme-overlay .theme-header .left { + cursor: pointer; + color: #777; + background-color: transparent; + height: 48px; + width: 54px; + float: right; + text-align: center; + border: 0; + border-left: 1px solid #ddd; +} + +.theme-overlay .theme-header .close:hover, +.theme-overlay .theme-header .right:hover, +.theme-overlay .theme-header .left:hover, +.theme-overlay .theme-header .close:focus, +.theme-overlay .theme-header .right:focus, +.theme-overlay .theme-header .left:focus { + background: #0074a2; + color: #fff; +} + +.theme-overlay .theme-header .left.disabled, +.theme-overlay .theme-header .right.disabled, +.theme-overlay .theme-header .left.disabled:hover, +.theme-overlay .theme-header .right.disabled:hover { + color: #ccc; + background: inherit; + cursor: inherit; +} + +.theme-overlay .theme-header .right:before, +.theme-overlay .theme-header .left:before { + font: normal 20px/50px 'dashicons' !important; + display: inline; + font-weight: 300; +} + +.theme-overlay .theme-header .left:before { + content: '\f340'; +} + +.theme-overlay .theme-header .right:before { + content: '\f344'; +} + +.rtl .theme-overlay .theme-header .left:before { + content: '\f345'; +} + +.rtl .theme-overlay .theme-header .right:before { + content: '\f341'; +} + +.theme-overlay .theme-wrap { + clear: both; + position: fixed; + top: 9%; + right: 190px; + left: 30px; + bottom: 3%; + background: #fff; + -webkit-box-shadow: 0 1px 20px 5px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 20px 5px rgba(0, 0, 0, 0.1); + z-index: 20; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.theme-overlay .theme-wrap:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; +} + +body.folded .theme-overlay .theme-wrap { + right: 70px; +} + +.theme-overlay .theme-about { + position: absolute; + top: 49px; + bottom: 57px; + right: 0; + left: 0; + overflow: auto; + padding: 2% 4%; +} +.theme-overlay .theme-about:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; +} + +.theme-overlay .theme-actions { + position: absolute; + text-align: center; + bottom: 0; + right: 0; + left: 0; + padding: 10px 25px 5px; + background: #f3f3f3; + z-index: 30; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + border-top: 1px solid #eee; +} + +.ie8 .theme-overlay .theme-actions { + border: 1px solid #eee; +} + +.theme-overlay .theme-actions a { + margin-left: 5px; + margin-bottom: 5px; +} + +.theme-overlay .theme-actions .delete-theme { + color: #a00; + position: absolute; + left: 10px; + bottom: 5px; + text-decoration: none; + border-color: transparent; + -webkit-box-shadow: none; + box-shadow: none; + background: transparent; +} + +.theme-overlay .theme-actions .delete-theme:hover, +.theme-overlay .theme-actions .delete-theme:focus { + background: #d54e21; + color: #fff; + border-color: #d54e21; +} + +.theme-overlay .theme-actions .active-theme, +.theme-overlay.active .theme-actions .inactive-theme { + display: none; +} + +.theme-overlay .theme-actions .inactive-theme, +.theme-overlay.active .theme-actions .active-theme { + display: block; +} + +/** + * Theme Screenshots gallery + */ +.theme-overlay .theme-screenshots { + float: right; + margin: 0 0 0 30px; + width: 55%; + max-width: 880px; + text-align: center; +} + +/* First screenshot, shown big */ +.theme-overlay .screenshot { + border: 1px solid #fff; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + overflow: hidden; + position: relative; + -webkit-box-shadow: 0 0 0 1px rgba(0,0,0,0.2); + box-shadow: 0 0 0 1px rgba(0,0,0,0.2); +} + +.theme-overlay .screenshot:after { + content: ''; + display: block; + padding-top: 75%; /* using a 4/3 aspect ratio */ +} + +.theme-overlay .screenshot img { + height: auto; + position: absolute; + right: 0; + top: 0; + width: 100%; +} +/* Handles old 300px screenshots */ +.theme-overlay.small-screenshot .theme-screenshots { + position: absolute; + width: 302px; +} +.theme-overlay.small-screenshot .theme-info { + margin-right: 350px; + width: auto; +} + +/* Other screenshots, shown small and square */ +.theme-overlay .screenshot.thumb { + background: #ccc; + border: 1px solid #eee; + float: none; + display: inline-block; + margin: 10px 5px 0; + width: 140px; + height: 80px; + cursor: pointer; +} + +.theme-overlay .screenshot.thumb:after { + content: ''; + display: block; + padding-top: 100%; /* using a 1/1 aspect ratio */ +} + +.theme-overlay .screenshot.thumb img { + cursor: pointer; + height: auto; + position: absolute; + right: 0; + top: 0; + width: 100%; + height: auto; +} + +.theme-overlay .screenshot.selected { + background: transparent; + border: 2px solid #2ea2cc; +} + +.theme-overlay .screenshot.selected img { + opacity: 0.8; +} + +/* No screenshot placeholder */ +.theme-browser .theme .theme-screenshot.blank, +.theme-overlay .screenshot.blank { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAALElEQVQYGWO8d+/efwYkoKioiMRjYGBC4WHhUK6A8T8QIJt8//59ZC493AAAQssKpBK4F5AAAAAASUVORK5CYII=); +} + +/** + * Theme heading information + */ +.theme-overlay .theme-info { + width: 40%; + float: right; +} + +.theme-overlay .current-label { + background: #333; + color: #fff; + font-size: 11px; + display: inline-block; + padding: 2px 8px; + -webkit-border-radius: 2px; + border-radius: 2px; + margin: 0 0 -10px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.theme-overlay .theme-name { + color: #222; + font-size: 32px; + font-weight: 100; + margin: 10px 0 0; + line-height: 1.3; +} + +.theme-overlay .theme-version { + color: #999; + font-size: 13px; + font-weight: 400; + float: none; + display: inline-block; + margin-right: 10px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.theme-overlay .theme-author { + color: #686868; + font-size: 16px; + font-weight: 400; + margin: 15px 0 25px; +} + +.theme-overlay .theme-author a { + text-decoration: none; +} + +.theme-overlay .theme-description { + color: #555; + font-size: 15px; + font-weight: 400; + line-height: 1.5; + margin: 30px 0 0 0; +} + +.theme-overlay .theme-tags { + border-top: 3px solid #eee; + color: #888; + font-size: 13px; + font-weight: 400; + margin: 30px 0 0 0; + padding-top: 20px; +} + +.theme-overlay .theme-tags span { + color: #444; + font-weight: bold; + margin-left: 5px; +} + +/* Theme Updates info */ +.theme-overlay .theme-update-message { + background: #fef7f1; + border: 1px solid #eee; + border-right: 4px solid #d54e21; + -webkit-border-radius: 3px; + border-radius: 3px; + padding: 5px 20px 10px; +} + +.theme-overlay .theme-update { + color: #222; + font-size: 18px; + display: inline-block; + line-height: 40px; + margin: 0; +} + +.theme-overlay .parent-theme { + background: #f7fcfe; + border: 1px solid #eee; + border-right: 4px solid #2ea2cc; + font-size: 14px; + font-weight: normal; + margin-top: 30px; + padding: 10px 20px 10px 10px; +} + +.theme-overlay .parent-theme strong { + font-weight: 700; +} + +/** + * Single Theme Mode + * Displays detailed view inline when a user has no switch capabilities + */ +.single-theme .theme-overlay .theme-backdrop, +.single-theme .theme-overlay .theme-header, +.single-theme .theme { + display: none; +} + +.single-theme .theme-overlay .theme-wrap { + clear: both; + min-height: 330px; + position: relative; + right: auto; + left: auto; + top: auto; + bottom: auto; +} + +.single-theme .theme-overlay .theme-about { + padding: 30px 30px 70px; + position: static; +} + +.single-theme .theme-overlay .theme-actions { + position: absolute; +} + +/** + * Basic Responsive structure... + * + * Shuffles theme columns around based on screen width + */ + +@media only screen and (min-width: 2000px) { + #wpwrap .theme-browser .theme { + width: 17.6%; + margin: 0 0 3% 3%; + } + + #wpwrap .theme-browser .theme:nth-child(3n), + #wpwrap .theme-browser .theme:nth-child(4n) { + margin-left: 3%; + } + + #wpwrap .theme-browser .theme:nth-child(5n) { + margin-left: 0; + } +} + +@media only screen and (min-width: 1680px) { + .theme-overlay .theme-wrap { + width: 1450px; + margin: 0 auto; + } +} + +/* Maximum screenshot width reaches 440px */ +@media only screen and (min-width: 1640px) { + .theme-browser .theme { + width: 22.7%; + margin: 0 0 3% 3%; + } + .theme-browser .theme .theme-screenshot:after { + padding-top: 75%; /* using a 4/3 aspect ratio */ + } + + .theme-browser .theme:nth-child(3n) { + margin-left: 3%; + } + + .theme-browser .theme:nth-child(4n) { + margin-left: 0; + } +} +/* Maximum screenshot width reaches 440px */ +@media only screen and (max-width: 1120px) { + .theme-browser .theme { + width: 47.5%; + margin-left: 0; + } + + .theme-browser .theme:nth-child(even) { + margin-left: 0; + } + + .theme-browser .theme:nth-child(odd) { + margin-left: 5%; + } +} + +/* Admin menu is folded */ +@media only screen and (max-width: 900px) { + .theme-overlay .theme-wrap { + right: 65px; + } +} + +@media only screen and (max-width: 780px) { + body.folded .theme-overlay .theme-wrap, + .theme-overlay .theme-wrap { + top: 0; /* The adminmenu isn't fixed on mobile, so this can use the full viewport height */ + left: 0; + bottom: 0; + right: 0; + padding: 70px 20px 20px; + border: none; + z-index: 500; /* should overlap #wpadminbar, which is 500 on mobile. */ + position: fixed; + } + + .theme-browser .theme.active .theme-name span { + /* Hide the "Active: " label on smaller screens. */ + display: none; + } + + .theme-overlay .theme-screenshots { + width: 40%; + } + + .theme-overlay .theme-info { + width: 50%; + } + .single-theme .theme-wrap { + padding: 10px; + } + + .theme-browser .theme .theme-actions { + padding: 5px 10px 4px 10px; + } + + .theme-overlay.small-screenshot .theme-screenshots { + position: static; + float: none; + max-width: 302px; + } + + .theme-overlay.small-screenshot .theme-info { + margin-right: 0; + width: auto; + } + + .theme:not(.active):hover .theme-actions, + .theme:not(.active):focus .theme-actions, + .theme:hover .more-details, + .theme:focus .more-details { + display: none; + } + + .theme-browser.rendered .theme:hover .theme-screenshot img, + .theme-browser.rendered .theme:focus .theme-screenshot img { + opacity: 1.0; + } +} + +@media only screen and (max-width: 480px) { + .theme-browser .theme { + width: 100%; + margin-left: 0; + } + + .theme-browser .theme:nth-child(2n), + .theme-browser .theme:nth-child(3n) { + margin-left: 0; + } +} + +@media only screen and (max-width: 650px) { + .theme-overlay .theme-update, + .theme-overlay .theme-description { + margin-right: 0; + } + + .theme-overlay .theme-actions .delete-theme { + position: relative; + left: auto; + bottom: auto; + } + + .theme-overlay .theme-actions .inactive-theme { + display: inline; + } + + .theme-overlay .theme-screenshots { + width: 100%; + float: none; + } + + .theme-overlay .theme-info { + width: 100%; + } + + .theme-overlay .theme-author { + margin: 5px 0 15px 0; + } + + .theme-overlay .current-label { + margin-top: 10px; + font-size: 13px; + } + + .themes-php .wrap h2 { + width: 100%; + } + + .themes-php .theme-search { + float: none; + clear: both; + right: 0; + top: 0; + left: 0; + margin: 10px 0; + width: 100%; + } + + .theme-browser .theme.add-new-theme span:after { + font: normal 60px/90px 'dashicons'; + width: 80px; + height: 80px; + top: 30%; + right: 50%; + text-indent: 0; + margin-right: -40px; + } + + .single-theme .theme-wrap { + margin: 0 -10px 0 -12px; + padding: 10px; + } + .single-theme .theme-overlay .theme-about { + padding: 10px; + overflow: visible; + } + .single-theme .current-label { + display: none; + } + .single-theme .theme-overlay .theme-actions { + position: static; + } +} + +.broken-themes { + clear: both; +} + +.broken-themes table { + text-align: right; + width: 50%; + border-spacing: 3px; + padding: 3px; +} + + +/*------------------------------------------------------------------------------ + 16.2 - Install Themes +------------------------------------------------------------------------------*/ + +/* Already installed theme */ +.theme-browser .theme .theme-installed { + background: #0074a2; +} +.theme-browser .theme .theme-installed:before { + content: '\f147'; +} +.theme-browser .theme.is-installed .theme-actions .button-primary { + display: none !important; +} + +.theme-navigation { + background: #fff; + -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1); + box-shadow: 0 1px 1px 0 rgba(0,0,0,.1); + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + color: #555; + display: inline-block; + font-size: 13px; + margin: 20px 0 30px; + padding: 0 20px; + position: relative; + width: 100%; +} +.theme-install-php a.upload, +.theme-install-php a.browse-themes { + cursor: pointer; +} +.theme-install-php a.browse-themes, +.theme-install-php.show-upload-theme a.upload { + display: none; +} +.theme-install-php.show-upload-theme a.browse-themes { + display: inline; +} +.upload-theme { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + display: none; + margin: 0px 0 0; + padding: 0; + width: 100%; + overflow: hidden; + position: relative; + top: 10px; +} +body.show-upload-theme .upload-theme { + display: block; +} +.upload-theme .wp-upload-form { + background: #fafafa; + border: 1px solid #e5e5e5; + padding: 30px; + margin: 30px auto; + max-width: 380px; +} +.upload-theme .install-help { + color: #999; + font-size: 18px; + font-style: normal; + margin: 0; + padding: 40px 0 0; + text-align: center; +} +body.show-upload-theme .upload-theme + .theme-navigation, +body.show-upload-theme .upload-theme + .theme-navigation + .theme-browser { + display: none; +} +.theme-navigation .theme-count { + margin-right: 0; + position: absolute; + top: 12px; +} +.theme-count + .theme-section { + margin-right: 60px; +} +.theme-section, +.theme-filter { + border-bottom: 4px solid #fff; + color: #666; + cursor: pointer; + display: inline-block; + margin: 0 10px; + padding: 15px 0; +} +.theme-section.current, +.theme-filter.current { + border-bottom: 4px solid #666; + color: #222; +} +.theme-top-filters { + display: inline-block; +} +.theme-navigation .more-filters { + color: #666; + cursor: pointer; + display: inline-block; + margin: 0 10px; + padding: 4px 6px; +} +body.more-filters-opened .more-filters, +body.more-filters-opened .more-filters:before { + background: #777; + -webkit-border-radius: 2px; + border-radius: 2px; + border: none; + color: #fff; +} + +body.more-filters-opened .more-filters:hover, +body.more-filters-opened .more-filters:focus, +body.more-filters-opened .more-filters:hover:before, +body.more-filters-opened .more-filters:focus:before { + background: rgb(46, 162, 204); +} + +.theme-install-php .theme-search { + position: absolute; + left: 10px; + top: 9px; + font-size: 16px; + font-weight: 300; + line-height: 1.5; + width: 280px; +} +.more-filters:before { + color: #777; + text-align: center; + margin: 0 0 0 5px; + content: "\f111"; + display: inline-block; + width: 16px; + height: 16px; + -webkit-font-smoothing: antialiased; + font-size: 16px; + line-height: 1; + font-family: "dashicons"; + text-decoration: inherit; + font-weight: normal; + font-style: normal; + vertical-align: top; + -webkit-transition: color .1s ease-in 0; + transition: color .1s ease-in 0; + text-align: center; +} +.more-filters.current:before { + color: #fff; +} +.more-filters-container { + display: none; + padding: 20px; + border-top: 1px solid #eee; + margin: 0 -20px; + background: #fafafa; +} +body.more-filters-opened .more-filters-container { + display: block; + overflow: hidden; +} +body.more-filters-opened .theme-section.current { + border-bottom: none; +} +body.more-filters-opened .theme-browser, +body.more-filters-opened.filters-applied.loading-themes .theme-browser { + display: none; +} +body.more-filters-opened.filters-applied .theme-browser { + display: block; +} +.more-filters-container .filters-group { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: right; + width: 19%; + background: #fff; + margin: 0 0 0 1%; + border: 1px solid #e5e5e5; + -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.04); + box-shadow: 0 1px 1px rgba(0,0,0,0.04); + padding: 10px; +} +.more-filters-container .wide-filters-group { + width: 38%; +} +.more-filters-container .feature-name { + margin: 0; + position: relative; +} +.more-filters-container ol { + list-style-type: none; + margin: 20px 0 0; + font-size: 12px; +} +.more-filters-container li { + display: inline-block; + vertical-align: top; + list-style-type: none; + margin: 5px 0; + padding-left: 25px; + width: 160px; +} +.theme-navigation .more-filters-container .apply-filters { + margin: 0 0 20px; +} +.theme-navigation .more-filters-container .clear-filters { + display: none; + margin: 0 10px 20px 0; +} +.more-filters-container .apply-filters span { + display: inline-block; + font-size: 12px; + text-indent: 10px; + opacity: 0.8; +} +.more-filters-container .filtering-by { + display: none; + margin: 0; +} +.more-filters-container .filtering-by > span { + font-weight: 600; +} +.more-filters-container .filtering-by .tags { + display: inline; +} +.more-filters-container .filtering-by .tag { + background: #fff; + border: 1px solid #e5e5e5; + -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.04); + box-shadow: 0 1px 1px rgba(0,0,0,0.04); + font-size: 11px; + margin: 0 5px; + padding: 4px 8px; +} +.more-filters-container .filtering-by a { + margin-right: 10px; +} +body.filters-applied .more-filters-container .filters-group, +body.filters-applied .more-filters-container a.button, +body.filters-applied .more-filters-container br { + display: none !important; +} +body.filters-applied .more-filters-container .filtering-by { + display: block; +} +body.filters-applied .more-filters-container { + padding: 20px; +} +p.no-themes { + color: #999; + font-size: 18px; + font-style: normal; + margin: 0; + padding: 0; + text-align: center; + display: none; +} +body.no-results p.no-themes { + display: block; +} +body.show-upload-theme p.no-themes { + display: none !important; +} + + +.theme-install-php .add-new-theme { + display: none !important; +} + +@media only screen and (max-width: 1120px) { + .theme-install-php .theme-search { + margin: 20px 0; + position: static; + width: 100%; + } + .more-filters-container { + border-bottom: 1px solid #eee; + } + .upload-theme .wp-upload-form { + margin: 20px 0; + max-width: 100%; + } + .upload-theme .install-help { + font-size: 15px; + padding: 20px 0 0; + text-align: right; + } + .more-filters-container .filters-group { + margin-bottom: 0; + margin-top: 5px; + width: 100%; + } + .more-filters-container .filters-group li { + margin: 10px 0; + } +} + +@media only screen and (max-width: 782px) { + .more-filters-container .filters-group { + width: 100%; + } + .more-filters-container .filters-group li { + width: 100%; + } +} + +.rating { + margin: 30px 0; +} +.rating span:before { + color: #e6b800; + content: "\f154"; + display: inline-block; + -webkit-font-smoothing: antialiased; + font: normal 20px/1 'dashicons'; + vertical-align: top; +} +/* Half stars */ +.rating-10 span.one:before, +.rating-30 span.two:before, +.rating-50 span.three:before, +.rating-70 span.four:before, +.rating-90 span.five:before { + content: "\f459"; +} +/* Full stars */ +.rating-20 span.one:before { + content: "\f155"; +} +.rating-30 span.one:before, +.rating-40 span.one:before, +.rating-40 span.two:before { + content: "\f155"; +} +.rating-50 span.one:before, +.rating-50 span.two:before, +.rating-60 span.one:before, +.rating-60 span.two:before, +.rating-60 span.three:before { + content: "\f155"; +} +.rating-70 span.one:before, +.rating-70 span.two:before, +.rating-70 span.three:before, +.rating-80 span.one:before, +.rating-80 span.two:before, +.rating-80 span.three:before, +.rating-80 span.four:before { + content: "\f155"; +} +.rating-90 span.one:before, +.rating-90 span.two:before, +.rating-90 span.three:before, +.rating-90 span.four:before, +.rating-100 span.one:before, +.rating-100 span.two:before, +.rating-100 span.three:before, +.rating-100 span.four:before, +.rating-100 span.five:before { + content: "\f155"; +} +.rating .ratings { + display: inline; + margin-right: 10px; + line-height: 20px; + color: #999; +} +.loading-themes .theme-browser, +.error .theme-browser { + display: none; +} +.loading-themes .spinner { + display: block; + margin: 40px auto 0; + float: none; +} + +/*------------------------------------------------------------------------------ + 16.3 - Custom Header Screen +------------------------------------------------------------------------------*/ + +.appearance_page_custom-header #headimg { + border: 1px solid #DFDFDF; + overflow: hidden; + width: 100%; +} + +.appearance_page_custom-header #upload-form p label { + font-size: 12px; +} + +.appearance_page_custom-header .available-headers .default-header { + float: right; + margin: 0 0 20px 20px; +} + +.appearance_page_custom-header .random-header { + clear: both; + margin: 0 0 20px 20px; + vertical-align: middle; +} + +.appearance_page_custom-header .available-headers label input, +.appearance_page_custom-header .random-header label input { + margin-left: 10px; +} + +.appearance_page_custom-header .available-headers label img { + vertical-align: middle; +} + + +/*------------------------------------------------------------------------------ + 16.4 - Custom Background Screen +------------------------------------------------------------------------------*/ + +div#custom-background-image { + min-height: 100px; + border: 1px solid #dfdfdf; +} + +div#custom-background-image img { + max-width: 400px; + max-height: 300px; +} + +/*------------------------------------------------------------------------------ + 23.0 - Full Overlay w/ Sidebar +------------------------------------------------------------------------------*/ + +body.full-overlay-active { + overflow: hidden; +} + +.wp-full-overlay { + background: transparent; + z-index: 500000; + position: fixed; + overflow: visible; + top: 0; + bottom: 0; + right: 0; + left: 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; + right: 0; + padding: 0; + margin: 0; + z-index: 10; + overflow: auto; + background: #eee; + border-left: none; +} + +.wp-full-overlay.collapsed .wp-full-overlay-sidebar { + overflow: visible; +} + +.wp-full-overlay.collapsed, +.wp-full-overlay.expanded .wp-full-overlay-sidebar { + margin-right: 0 !important; +} + +.wp-full-overlay.expanded { + margin-right: 300px; +} + +.wp-full-overlay.collapsed .wp-full-overlay-sidebar { + margin-right: -300px; +} + +.wp-full-overlay-sidebar:after { + content: ''; + display: block; + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 3px; + z-index: 1000; +} + +.wp-full-overlay-main { + position: absolute; + right: 0; + left: 0; + top: 0; + bottom: 0; + height: 100%; +} + +.wp-full-overlay-sidebar .wp-full-overlay-header { + position: absolute; + right: 0; + left: 0; + height: 45px; + padding: 0 15px; + line-height: 45px; + z-index: 10; + margin: 0; + border-top: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +.wp-full-overlay-sidebar .wp-full-overlay-header a.back { + margin-top: 9px; +} + +.wp-full-overlay-sidebar .wp-full-overlay-footer { + bottom: 0; + border-bottom: none; + border-top: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +.wp-full-overlay-sidebar .wp-full-overlay-sidebar-content { + position: absolute; + top: 45px; + bottom: 45px; + right: 0; + left: 0; + overflow: auto; +} + +/* Close Link */ +.wp-full-overlay .close-full-overlay { + text-decoration: none; +} + +/* Collapse Button */ +.wp-full-overlay a.collapse-sidebar { + position: absolute; + bottom: 12px; + right: 0; + z-index: 50; + display: block; + width: 19px; + height: 19px; + margin-right: 15px; + padding: 0; + -webkit-border-radius: 50%; + border-radius: 50%; + color: #777; + text-decoration: none; +} + +.wp-full-overlay a.collapse-sidebar:hover { + color: #0074a2; +} + +.wp-full-overlay.collapsed .collapse-sidebar { + position: absolute; + right: 100%; +} + +.wp-full-overlay .collapse-sidebar-arrow { + position: static; + margin-top: 0; + margin-right: 0; + display: block; + width: auto; + height: auto; + background: none; +} + +.wp-full-overlay .collapse-sidebar-arrow:before { + -webkit-border-radius: 50%; + border-radius: 50%; + float: right; + content: "\f148"; + background: #eee; + font: normal 20px/1 'dashicons'; + speak: none; + display: block; + padding: 0; + text-indent: 0; + text-align: center; + position: relative; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-decoration: none !important; +} + +.wp-full-overlay.collapsed .collapse-sidebar-arrow:before, +.rtl .wp-full-overlay .collapse-sidebar-arrow:before { + -webkit-transform: rotate(180deg); + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} + +.rtl .wp-full-overlay.collapsed .collapse-sidebar-arrow:before { + -webkit-transform: none; + -ms-transform: none; + transform: none; +} + +.wp-full-overlay.collapsed .collapse-sidebar-arrow { + background-position: -1px -109px; +} + +.wp-full-overlay .collapse-sidebar-label { + position: absolute; + right: 100%; + line-height: 20px; + margin-right: 10px; +} + +.wp-full-overlay.collapsed .collapse-sidebar-label { + display: none; +} + +.wp-full-overlay .theme-navigation { + padding: 10px 20px; + position: absolute; + bottom: 10px; + text-align: right; +} +.wp-full-overlay .theme-navigation .next-theme { + float: left; +} +.wp-full-overlay.no-navigation .theme-navigation { + display: none; +} + +/* Animations */ +.wp-full-overlay, +.wp-full-overlay-sidebar, +.wp-full-overlay .collapse-sidebar, +.wp-full-overlay-main { + -webkit-transition-property: right, left, top, bottom, width, margin; + transition-property: right, left, top, bottom, width, margin; + -webkit-transition-duration: 0.2s; + transition-duration: 0.2s; +} + +/*------------------------------------------------------------------------------ + 24.0 - Customize Loader +------------------------------------------------------------------------------*/ + +.no-customize-support .hide-if-no-customize, +.customize-support .hide-if-customize, +.no-customize-support.wp-core-ui .hide-if-no-customize, +.no-customize-support .wp-core-ui .hide-if-no-customize, +.customize-support.wp-core-ui .hide-if-customize, +.customize-support .wp-core-ui .hide-if-customize { + display: none; +} + +#customize-container { + display: none; + background: #fff; + z-index: 500000; + position: fixed; + overflow: visible; + top: 0; + bottom: 0; + right: 0; + left: 0; + height: 100%; +} + +.customize-active #customize-container { + display: block; +} + +.customize-loading #customize-container iframe { + opacity: 0; +} + +.customize-loading #customize-container { + background: #fff url(../images/spinner.gif) no-repeat fixed center center; + -webkit-background-size: 20px 20px; + background-size: 20px 20px; +} + +#customize-container iframe, +.theme-install-overlay iframe { + height: 100%; + width: 100%; + z-index: 20; + -webkit-transition: opacity 0.3s; + transition: opacity 0.3s; +} + +#customize-container .collapse-sidebar { + bottom: 16px; +} + +#customize-controls { + margin-top: 0; +} + +.theme-install-overlay { + display: none; +} + +.theme-install-overlay.single-theme { + display: block; +} + +.install-theme-info { + display: none; + padding: 10px 20px 60px; +} + +.single-theme .install-theme-info { + padding-top: 15px; +} + +.theme-install-overlay .install-theme-info { + display: block; +} + +.install-theme-info .theme-install { + float: left; + margin-top: 18px; +} + +.install-theme-info .theme-name { + font-size: 16px; + line-height: 24px; + margin-bottom: 0; + margin-top: 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: right; +} + +.theme-details .star-rating { + margin: 7px 0; + float: left; +} + +.theme-details .theme-description { + float: right; + color: #777; + line-height: 20px; + max-width: 100%; +} + +.theme-install-overlay .wp-full-overlay-header { + margin-top: 9px; +} + +.theme-install-overlay .wp-full-overlay-header .theme-install { + float: left; + /* For when .theme-install is a span rather than a.button-primary (already installed theme) */ + line-height: 26px; +} + +.theme-install-overlay .wp-full-overlay-sidebar { + background: #EEE; + border-left: 1px solid #DDD; +} + +.theme-install-overlay .wp-full-overlay-main { + background: #fff url(../images/spinner.gif) no-repeat center center; + -webkit-background-size: 20px 20px; + background-size: 20px 20px; +} + +/* =Media Queries +-------------------------------------------------------------- */ + +/** + * HiDPI Displays + */ +@media print, + (-o-min-device-pixel-ratio: 5/4), + (-webkit-min-device-pixel-ratio: 1.25), + (min-resolution: 120dpi) { + .wp-full-overlay .collapse-sidebar-arrow { + background-image: url(../images/arrows-2x.png); + -webkit-background-size: 15px 123px; + background-size: 15px 123px; + } + + .customize-loading #customize-container, + .theme-install-overlay .wp-full-overlay-main { + background-image: url(../images/spinner-2x.gif); + } +} + +@media screen and ( max-width: 782px ) { + .available-theme .action-links .delete-theme { + float: none; + margin: 0; + padding: 0; + clear: both; + } + + .available-theme .action-links .delete-theme a { + padding: 0; + } +} diff --git a/wp-admin/css/themes.css b/wp-admin/css/themes.css new file mode 100644 index 0000000..13076cb --- /dev/null +++ b/wp-admin/css/themes.css @@ -0,0 +1,1902 @@ +/*------------------------------------------------------------------------------ + 16.0 - Themes +------------------------------------------------------------------------------*/ + + +/*------------------------------------------------------------------------------ + 16.1 - Manage Themes +------------------------------------------------------------------------------*/ + +.theme-browser .themes { + clear: both; + padding: 0 0 100px; +} + +.themes-php .wrap h2 { + float: left; + margin-bottom: 15px; +} + +.network-admin.themes-php .wrap h2 { + margin-bottom: 0; +} + +.themes-php .wrap h2 .button { + margin-left: 20px; +} + +.themes-php .wrap .theme-count, +.theme-navigation .theme-count { + color: #fff; + -webkit-border-radius: 30px; + border-radius: 30px; + background: #777; + font-size: 14px; + padding: 4px 10px; + font-weight: 600; + margin-left: 5px; + margin-right: 20px; + position: relative; + top: -3px; +} + +.theme-navigation a { + text-decoration:none; +} + +/* Position admin messages */ +.themes-php div.updated, +.themes-php div.error { + margin: 0 0 20px 0; + clear: both; +} + +.themes-php div.updated a { + text-decoration: underline; +} + +/** + * Main theme element + * (has flexible margins) + */ +.theme-browser .theme { + cursor: pointer; + float: left; + margin: 0 4% 4% 0; + position: relative; + width: 30.6%; + border: 1px solid #dedede; + -webkit-box-shadow: 0 1px 1px -1px rgba(0,0,0,0.1); + box-shadow: 0 1px 1px -1px rgba(0,0,0,0.1); + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.ie8 .theme-browser .theme { + width: 30%; + margin: 0 3% 4% 0; +} + +.theme-browser .theme:nth-child(3n) { + margin-right: 0; +} + +.theme-browser .theme:hover, +.theme-browser .theme:focus { + cursor: pointer; +} + +.theme-browser .theme .theme-name { + font-size: 15px; + font-weight: 600; + height: 18px; + margin: 0; + padding: 15px; + -webkit-box-shadow: inset 0 1px 0 rgba(0,0,0,0.1); + box-shadow: inset 0 1px 0 rgba(0,0,0,0.1); + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + background: #fff; + background: rgba(255,255,255,0.65); +} + +/* Activate and Customize buttons, shown on hover and focus */ +.theme-browser .theme .theme-actions { + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + opacity: 0; + -webkit-transition: opacity 0.1s ease-in-out; + transition: opacity 0.1s ease-in-out; + position: absolute; + bottom: 0; + right: 0; + height: 38px; + padding: 9px 10px 0 10px; + background: rgba(244, 244, 244, 0.7); + border-left: 1px solid rgba(0,0,0,0.05); +} + +.theme-browser .theme:hover .theme-actions, +.theme-browser .theme.focus .theme-actions, +.theme-browser .theme:focus .theme-actions { + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; + opacity: 1; +} + +.theme-browser .theme .theme-actions .button-primary { + margin-right: 3px; +} + +.theme-browser .theme .theme-actions .button-secondary { + float: none; + margin-left: 3px; +} + +/** + * Theme Screenshot + * + * Has a fixed aspect ratio of 1.5 to 1 regardless of screenshot size + * It is also responsive. + */ +.theme-browser .theme .theme-screenshot { + display: block; + overflow: hidden; + position: relative; + -webkit-transition: opacity 0.2s ease-in-out; + transition: opacity 0.2s ease-in-out; +} + +.theme-browser .theme .theme-screenshot:after { + content: ''; + display: block; + padding-top: 66.66666%; /* using a 3/2 aspect ratio */ +} + +.theme-browser .theme .theme-screenshot img { + height: auto; + position: absolute; + left: 0; + top: 0; + width: 100%; + -webkit-transform: translateZ( 0 ); /* Prevents rendering bugs in Chrome */ + -webkit-transition: opacity 0.2s ease-in-out; /* Prevents rendering bugs in Chrome */ + transition: opacity 0.2s ease-in-out; +} + +.theme-browser .theme:hover .theme-screenshot, +.theme-browser .theme:focus .theme-screenshot { + background: #fff; +} + +.theme-browser.rendered .theme:hover .theme-screenshot img, +.theme-browser.rendered .theme:focus .theme-screenshot img { + opacity: 0.4; +} + +.theme-browser .theme .more-details { + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + opacity: 0; + position: absolute; + top: 35%; + right: 25%; + left: 25%; + background: #222; + background: rgba(0,0,0,0.7); + color: #fff; + font-size: 15px; + text-shadow: 0 1px 0 rgba(0,0,0,0.6); + -webkit-font-smoothing: antialiased; + font-weight: 600; + padding: 15px 12px; + text-align: center; + -webkit-border-radius: 3px; + border-radius: 3px; + -webkit-transition: opacity 0.1s ease-in-out; + transition: opacity 0.1s ease-in-out; +} +.theme-browser .theme:focus { + outline: 1px dotted #222; +} + +.theme-browser .theme:focus .more-details { + opacity: 1; +} +/* Current theme needs to have its action always on view */ +.theme-browser .theme.active:focus .theme-actions { + display: block; +} + +.theme-browser.rendered .theme:hover .more-details, +.theme-browser.rendered .theme:focus .more-details { + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; + opacity: 1; +} + +/** + * Displays a theme update notice + * when an update is available. + */ +.theme-browser .theme .theme-update, +.theme-browser .theme .theme-installed { + background: #d54e21; + background: rgba(213, 78, 33, 0.95); + color: #fff; + display: block; + font-size: 13px; + font-weight: 400; + height: 48px; + line-height: 48px; + padding: 0 10px; + position: absolute; + top: 0; + right: 0; + left: 0; + border-bottom: 1px solid rgba(0,0,0,0.25); + overflow: hidden; +} + +.theme-browser .theme .theme-update:before, +.theme-browser .theme .theme-installed:before { + content: '\f463'; + display: inline-block; + font: normal 20px/1 'dashicons'; + margin: 0 6px 0 0; + opacity: 0.8; + position: relative; + top: 5px; + speak: none; + -webkit-font-smoothing: antialiased; +} + + +/** + * The currently active theme + */ +.theme-browser .theme.active .theme-name { + background: #2f2f2f; + color: #fff; + padding-right: 110px; + font-weight: 300; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.5); + box-shadow: inset 0 1px 1px rgba(0,0,0,0.5); +} + +.theme-browser .theme.active .theme-name span { + font-weight: 600; +} + +.theme-browser .theme.active .theme-actions { + background: rgba(49,49,49,0.7); + border-left: none; + opacity: 1; +} + +.theme-browser .theme.active .theme-actions .button-primary { + margin-right: 0; +} + +.theme-browser .theme .theme-author { + background: #222; + color: #eee; + display: none; + font-size: 14px; + margin: 0 10px; + padding: 5px 10px; + position: absolute; + bottom: 56px; +} + +.theme-browser .theme.display-author .theme-author { + display: block; +} + +.theme-browser .theme.display-author .theme-author a { + color: inherit; + text-decoration: none; +} + +/** + * Add new theme + */ +.theme-browser .theme.add-new-theme { + border: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +.theme-browser .theme.add-new-theme a { + color: #999; + text-decoration: none; + display: block; + position: relative; + z-index: 1; +} + +.theme-browser .theme.add-new-theme:after { + display: block; + content: ''; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; + opacity: 1; + background: transparent; + background: rgba(0, 0, 0, 0); + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + padding: 10% 0 0 0; + text-shadow: none; + border: 5px dashed #d5d2ca; + border: 5px dashed rgba(0, 0, 0, 0.1); + -webkit-transition: opacity 0.2s ease-in-out; + transition: opacity 0.2s ease-in-out; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.theme-browser .theme.add-new-theme span:after { + background: #e5e5e5; + background: rgba(153, 153, 153, 0.1); + -webkit-border-radius: 50%; + border-radius: 50%; + display: inline-block; + content: '\f132'; + -webkit-font-smoothing: antialiased; + font: normal 74px/115px 'dashicons'; + width: 100px; + height: 100px; + vertical-align: middle; + text-align: center; + color: rgb(153, 153, 153); + position: absolute; + top: 30%; + left: 50%; + margin-left: -50px; + text-indent: -4px; + padding: 0; + text-shadow: none; + z-index:4; +} + +.rtl .theme-browser .theme.add-new-theme span:after { + text-indent: 4px; +} + +.theme-browser .theme.add-new-theme:hover .theme-screenshot, +.theme-browser .theme.add-new-theme:focus .theme-screenshot { + background: none; +} + +.theme-browser .theme.add-new-theme:hover span:after, +.theme-browser .theme.add-new-theme:focus span:after { + background: #fff; + color: #0074a2; +} + +.theme-browser .theme.add-new-theme:hover:after, +.theme-browser .theme.add-new-theme:focus:after { + border-color: transparent; + color: #fff; + background: #0074a2; + content: ''; +} + +.theme-browser .theme.add-new-theme .theme-name { + background: none; + text-align: center; + -webkit-box-shadow: none; + box-shadow: none; + font-weight: 400; + position: relative; + top: 0; + margin-top: -10%; + margin-bottom: 10%; +} + +.theme-browser .theme.add-new-theme:hover .theme-name, +.theme-browser .theme.add-new-theme:focus .theme-name { + color: #fff; + z-index: 2; +} + +/* + * The search form + */ +.themes-php .theme-search { + position: relative; + top: -2px; + left: 20px; + font-size: 16px; + font-weight: 300; + line-height: 1.5; + width: 280px; +} + +/** + * Theme Overlay + * Shown when clicking a theme + */ +.theme-overlay .theme-backdrop { + position: absolute; + left: -20px; + right: 0; + top: 0; + bottom: 0; + background: #f1f1f1; + background: rgba( 238, 238, 238, 0.9 ); + z-index: 10; +} + +body.theme-overlay-open { + overflow: hidden; +} + +.theme-overlay .theme-header { + position: absolute; + top: 0; + left: 0; + right: 0; + height: 48px; + border-bottom: 1px solid #ddd; +} + +.theme-overlay .theme-header .close { + cursor: pointer; + height: 48px; + width: 50px; + text-align: center; + float: right; + border: 0; + border-left: 1px solid #ddd; + background-color: transparent; +} + +.theme-overlay .theme-header .close:hover:before, +.theme-overlay .theme-header .close:focus:before { + color: #fff; +} + +.theme-overlay .theme-header .close:before { + font: normal 30px/50px 'dashicons' !important; + color: #777; + display: inline-block; + content: '\f335'; + font-weight: 300; +} + +/* Left and right navigation */ +.theme-overlay .theme-header .right, +.theme-overlay .theme-header .left { + cursor: pointer; + color: #777; + background-color: transparent; + height: 48px; + width: 54px; + float: left; + text-align: center; + border: 0; + border-right: 1px solid #ddd; +} + +.theme-overlay .theme-header .close:hover, +.theme-overlay .theme-header .right:hover, +.theme-overlay .theme-header .left:hover, +.theme-overlay .theme-header .close:focus, +.theme-overlay .theme-header .right:focus, +.theme-overlay .theme-header .left:focus { + background: #0074a2; + color: #fff; +} + +.theme-overlay .theme-header .left.disabled, +.theme-overlay .theme-header .right.disabled, +.theme-overlay .theme-header .left.disabled:hover, +.theme-overlay .theme-header .right.disabled:hover { + color: #ccc; + background: inherit; + cursor: inherit; +} + +.theme-overlay .theme-header .right:before, +.theme-overlay .theme-header .left:before { + font: normal 20px/50px 'dashicons' !important; + display: inline; + font-weight: 300; +} + +.theme-overlay .theme-header .left:before { + content: '\f340'; +} + +.theme-overlay .theme-header .right:before { + content: '\f344'; +} + +.rtl .theme-overlay .theme-header .left:before { + content: '\f345'; +} + +.rtl .theme-overlay .theme-header .right:before { + content: '\f341'; +} + +.theme-overlay .theme-wrap { + clear: both; + position: fixed; + top: 9%; + left: 190px; + right: 30px; + bottom: 3%; + background: #fff; + -webkit-box-shadow: 0 1px 20px 5px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 20px 5px rgba(0, 0, 0, 0.1); + z-index: 20; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.theme-overlay .theme-wrap:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; +} + +body.folded .theme-overlay .theme-wrap { + left: 70px; +} + +.theme-overlay .theme-about { + position: absolute; + top: 49px; + bottom: 57px; + left: 0; + right: 0; + overflow: auto; + padding: 2% 4%; +} +.theme-overlay .theme-about:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; +} + +.theme-overlay .theme-actions { + position: absolute; + text-align: center; + bottom: 0; + left: 0; + right: 0; + padding: 10px 25px 5px; + background: #f3f3f3; + z-index: 30; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + border-top: 1px solid #eee; +} + +.ie8 .theme-overlay .theme-actions { + border: 1px solid #eee; +} + +.theme-overlay .theme-actions a { + margin-right: 5px; + margin-bottom: 5px; +} + +.theme-overlay .theme-actions .delete-theme { + color: #a00; + position: absolute; + right: 10px; + bottom: 5px; + text-decoration: none; + border-color: transparent; + -webkit-box-shadow: none; + box-shadow: none; + background: transparent; +} + +.theme-overlay .theme-actions .delete-theme:hover, +.theme-overlay .theme-actions .delete-theme:focus { + background: #d54e21; + color: #fff; + border-color: #d54e21; +} + +.theme-overlay .theme-actions .active-theme, +.theme-overlay.active .theme-actions .inactive-theme { + display: none; +} + +.theme-overlay .theme-actions .inactive-theme, +.theme-overlay.active .theme-actions .active-theme { + display: block; +} + +/** + * Theme Screenshots gallery + */ +.theme-overlay .theme-screenshots { + float: left; + margin: 0 30px 0 0; + width: 55%; + max-width: 880px; + text-align: center; +} + +/* First screenshot, shown big */ +.theme-overlay .screenshot { + border: 1px solid #fff; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + overflow: hidden; + position: relative; + -webkit-box-shadow: 0 0 0 1px rgba(0,0,0,0.2); + box-shadow: 0 0 0 1px rgba(0,0,0,0.2); +} + +.theme-overlay .screenshot:after { + content: ''; + display: block; + padding-top: 75%; /* using a 4/3 aspect ratio */ +} + +.theme-overlay .screenshot img { + height: auto; + position: absolute; + left: 0; + top: 0; + width: 100%; +} +/* Handles old 300px screenshots */ +.theme-overlay.small-screenshot .theme-screenshots { + position: absolute; + width: 302px; +} +.theme-overlay.small-screenshot .theme-info { + margin-left: 350px; + width: auto; +} + +/* Other screenshots, shown small and square */ +.theme-overlay .screenshot.thumb { + background: #ccc; + border: 1px solid #eee; + float: none; + display: inline-block; + margin: 10px 5px 0; + width: 140px; + height: 80px; + cursor: pointer; +} + +.theme-overlay .screenshot.thumb:after { + content: ''; + display: block; + padding-top: 100%; /* using a 1/1 aspect ratio */ +} + +.theme-overlay .screenshot.thumb img { + cursor: pointer; + height: auto; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: auto; +} + +.theme-overlay .screenshot.selected { + background: transparent; + border: 2px solid #2ea2cc; +} + +.theme-overlay .screenshot.selected img { + opacity: 0.8; +} + +/* No screenshot placeholder */ +.theme-browser .theme .theme-screenshot.blank, +.theme-overlay .screenshot.blank { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAALElEQVQYGWO8d+/efwYkoKioiMRjYGBC4WHhUK6A8T8QIJt8//59ZC493AAAQssKpBK4F5AAAAAASUVORK5CYII=); +} + +/** + * Theme heading information + */ +.theme-overlay .theme-info { + width: 40%; + float: left; +} + +.theme-overlay .current-label { + background: #333; + color: #fff; + font-size: 11px; + display: inline-block; + padding: 2px 8px; + -webkit-border-radius: 2px; + border-radius: 2px; + margin: 0 0 -10px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.theme-overlay .theme-name { + color: #222; + font-size: 32px; + font-weight: 100; + margin: 10px 0 0; + line-height: 1.3; +} + +.theme-overlay .theme-version { + color: #999; + font-size: 13px; + font-weight: 400; + float: none; + display: inline-block; + margin-left: 10px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.theme-overlay .theme-author { + color: #686868; + font-size: 16px; + font-weight: 400; + margin: 15px 0 25px; +} + +.theme-overlay .theme-author a { + text-decoration: none; +} + +.theme-overlay .theme-description { + color: #555; + font-size: 15px; + font-weight: 400; + line-height: 1.5; + margin: 30px 0 0 0; +} + +.theme-overlay .theme-tags { + border-top: 3px solid #eee; + color: #888; + font-size: 13px; + font-weight: 400; + margin: 30px 0 0 0; + padding-top: 20px; +} + +.theme-overlay .theme-tags span { + color: #444; + font-weight: bold; + margin-right: 5px; +} + +/* Theme Updates info */ +.theme-overlay .theme-update-message { + background: #fef7f1; + border: 1px solid #eee; + border-left: 4px solid #d54e21; + -webkit-border-radius: 3px; + border-radius: 3px; + padding: 5px 20px 10px; +} + +.theme-overlay .theme-update { + color: #222; + font-size: 18px; + display: inline-block; + line-height: 40px; + margin: 0; +} + +.theme-overlay .parent-theme { + background: #f7fcfe; + border: 1px solid #eee; + border-left: 4px solid #2ea2cc; + font-size: 14px; + font-weight: normal; + margin-top: 30px; + padding: 10px 10px 10px 20px; +} + +.theme-overlay .parent-theme strong { + font-weight: 700; +} + +/** + * Single Theme Mode + * Displays detailed view inline when a user has no switch capabilities + */ +.single-theme .theme-overlay .theme-backdrop, +.single-theme .theme-overlay .theme-header, +.single-theme .theme { + display: none; +} + +.single-theme .theme-overlay .theme-wrap { + clear: both; + min-height: 330px; + position: relative; + left: auto; + right: auto; + top: auto; + bottom: auto; +} + +.single-theme .theme-overlay .theme-about { + padding: 30px 30px 70px; + position: static; +} + +.single-theme .theme-overlay .theme-actions { + position: absolute; +} + +/** + * Basic Responsive structure... + * + * Shuffles theme columns around based on screen width + */ + +@media only screen and (min-width: 2000px) { + #wpwrap .theme-browser .theme { + width: 17.6%; + margin: 0 3% 3% 0; + } + + #wpwrap .theme-browser .theme:nth-child(3n), + #wpwrap .theme-browser .theme:nth-child(4n) { + margin-right: 3%; + } + + #wpwrap .theme-browser .theme:nth-child(5n) { + margin-right: 0; + } +} + +@media only screen and (min-width: 1680px) { + .theme-overlay .theme-wrap { + width: 1450px; + margin: 0 auto; + } +} + +/* Maximum screenshot width reaches 440px */ +@media only screen and (min-width: 1640px) { + .theme-browser .theme { + width: 22.7%; + margin: 0 3% 3% 0; + } + .theme-browser .theme .theme-screenshot:after { + padding-top: 75%; /* using a 4/3 aspect ratio */ + } + + .theme-browser .theme:nth-child(3n) { + margin-right: 3%; + } + + .theme-browser .theme:nth-child(4n) { + margin-right: 0; + } +} +/* Maximum screenshot width reaches 440px */ +@media only screen and (max-width: 1120px) { + .theme-browser .theme { + width: 47.5%; + margin-right: 0; + } + + .theme-browser .theme:nth-child(even) { + margin-right: 0; + } + + .theme-browser .theme:nth-child(odd) { + margin-right: 5%; + } +} + +/* Admin menu is folded */ +@media only screen and (max-width: 900px) { + .theme-overlay .theme-wrap { + left: 65px; + } +} + +@media only screen and (max-width: 780px) { + body.folded .theme-overlay .theme-wrap, + .theme-overlay .theme-wrap { + top: 0; /* The adminmenu isn't fixed on mobile, so this can use the full viewport height */ + right: 0; + bottom: 0; + left: 0; + padding: 70px 20px 20px; + border: none; + z-index: 500; /* should overlap #wpadminbar, which is 500 on mobile. */ + position: fixed; + } + + .theme-browser .theme.active .theme-name span { + /* Hide the "Active: " label on smaller screens. */ + display: none; + } + + .theme-overlay .theme-screenshots { + width: 40%; + } + + .theme-overlay .theme-info { + width: 50%; + } + .single-theme .theme-wrap { + padding: 10px; + } + + .theme-browser .theme .theme-actions { + padding: 5px 10px 4px 10px; + } + + .theme-overlay.small-screenshot .theme-screenshots { + position: static; + float: none; + max-width: 302px; + } + + .theme-overlay.small-screenshot .theme-info { + margin-left: 0; + width: auto; + } + + .theme:not(.active):hover .theme-actions, + .theme:not(.active):focus .theme-actions, + .theme:hover .more-details, + .theme:focus .more-details { + display: none; + } + + .theme-browser.rendered .theme:hover .theme-screenshot img, + .theme-browser.rendered .theme:focus .theme-screenshot img { + opacity: 1.0; + } +} + +@media only screen and (max-width: 480px) { + .theme-browser .theme { + width: 100%; + margin-right: 0; + } + + .theme-browser .theme:nth-child(2n), + .theme-browser .theme:nth-child(3n) { + margin-right: 0; + } +} + +@media only screen and (max-width: 650px) { + .theme-overlay .theme-update, + .theme-overlay .theme-description { + margin-left: 0; + } + + .theme-overlay .theme-actions .delete-theme { + position: relative; + right: auto; + bottom: auto; + } + + .theme-overlay .theme-actions .inactive-theme { + display: inline; + } + + .theme-overlay .theme-screenshots { + width: 100%; + float: none; + } + + .theme-overlay .theme-info { + width: 100%; + } + + .theme-overlay .theme-author { + margin: 5px 0 15px 0; + } + + .theme-overlay .current-label { + margin-top: 10px; + font-size: 13px; + } + + .themes-php .wrap h2 { + width: 100%; + } + + .themes-php .theme-search { + float: none; + clear: both; + left: 0; + top: 0; + right: 0; + margin: 10px 0; + width: 100%; + } + + .theme-browser .theme.add-new-theme span:after { + font: normal 60px/90px 'dashicons'; + width: 80px; + height: 80px; + top: 30%; + left: 50%; + text-indent: 0; + margin-left: -40px; + } + + .single-theme .theme-wrap { + margin: 0 -12px 0 -10px; + padding: 10px; + } + .single-theme .theme-overlay .theme-about { + padding: 10px; + overflow: visible; + } + .single-theme .current-label { + display: none; + } + .single-theme .theme-overlay .theme-actions { + position: static; + } +} + +.broken-themes { + clear: both; +} + +.broken-themes table { + text-align: left; + width: 50%; + border-spacing: 3px; + padding: 3px; +} + + +/*------------------------------------------------------------------------------ + 16.2 - Install Themes +------------------------------------------------------------------------------*/ + +/* Already installed theme */ +.theme-browser .theme .theme-installed { + background: #0074a2; +} +.theme-browser .theme .theme-installed:before { + content: '\f147'; +} +.theme-browser .theme.is-installed .theme-actions .button-primary { + display: none !important; +} + +.theme-navigation { + background: #fff; + -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1); + box-shadow: 0 1px 1px 0 rgba(0,0,0,.1); + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + color: #555; + display: inline-block; + font-size: 13px; + margin: 20px 0 30px; + padding: 0 20px; + position: relative; + width: 100%; +} +.theme-install-php a.upload, +.theme-install-php a.browse-themes { + cursor: pointer; +} +.theme-install-php a.browse-themes, +.theme-install-php.show-upload-theme a.upload { + display: none; +} +.theme-install-php.show-upload-theme a.browse-themes { + display: inline; +} +.upload-theme { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + display: none; + margin: 0px 0 0; + padding: 0; + width: 100%; + overflow: hidden; + position: relative; + top: 10px; +} +body.show-upload-theme .upload-theme { + display: block; +} +.upload-theme .wp-upload-form { + background: #fafafa; + border: 1px solid #e5e5e5; + padding: 30px; + margin: 30px auto; + max-width: 380px; +} +.upload-theme .install-help { + color: #999; + font-size: 18px; + font-style: normal; + margin: 0; + padding: 40px 0 0; + text-align: center; +} +body.show-upload-theme .upload-theme + .theme-navigation, +body.show-upload-theme .upload-theme + .theme-navigation + .theme-browser { + display: none; +} +.theme-navigation .theme-count { + margin-left: 0; + position: absolute; + top: 12px; +} +.theme-count + .theme-section { + margin-left: 60px; +} +.theme-section, +.theme-filter { + border-bottom: 4px solid #fff; + color: #666; + cursor: pointer; + display: inline-block; + margin: 0 10px; + padding: 15px 0; +} +.theme-section.current, +.theme-filter.current { + border-bottom: 4px solid #666; + color: #222; +} +.theme-top-filters { + display: inline-block; +} +.theme-navigation .more-filters { + color: #666; + cursor: pointer; + display: inline-block; + margin: 0 10px; + padding: 4px 6px; +} +body.more-filters-opened .more-filters, +body.more-filters-opened .more-filters:before { + background: #777; + -webkit-border-radius: 2px; + border-radius: 2px; + border: none; + color: #fff; +} + +body.more-filters-opened .more-filters:hover, +body.more-filters-opened .more-filters:focus, +body.more-filters-opened .more-filters:hover:before, +body.more-filters-opened .more-filters:focus:before { + background: rgb(46, 162, 204); +} + +.theme-install-php .theme-search { + position: absolute; + right: 10px; + top: 9px; + font-size: 16px; + font-weight: 300; + line-height: 1.5; + width: 280px; +} +.more-filters:before { + color: #777; + text-align: center; + margin: 0 5px 0 0; + content: "\f111"; + display: inline-block; + width: 16px; + height: 16px; + -webkit-font-smoothing: antialiased; + font-size: 16px; + line-height: 1; + font-family: "dashicons"; + text-decoration: inherit; + font-weight: normal; + font-style: normal; + vertical-align: top; + -webkit-transition: color .1s ease-in 0; + transition: color .1s ease-in 0; + text-align: center; +} +.more-filters.current:before { + color: #fff; +} +.more-filters-container { + display: none; + padding: 20px; + border-top: 1px solid #eee; + margin: 0 -20px; + background: #fafafa; +} +body.more-filters-opened .more-filters-container { + display: block; + overflow: hidden; +} +body.more-filters-opened .theme-section.current { + border-bottom: none; +} +body.more-filters-opened .theme-browser, +body.more-filters-opened.filters-applied.loading-themes .theme-browser { + display: none; +} +body.more-filters-opened.filters-applied .theme-browser { + display: block; +} +.more-filters-container .filters-group { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; + width: 19%; + background: #fff; + margin: 0 1% 0 0; + border: 1px solid #e5e5e5; + -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.04); + box-shadow: 0 1px 1px rgba(0,0,0,0.04); + padding: 10px; +} +.more-filters-container .wide-filters-group { + width: 38%; +} +.more-filters-container .feature-name { + margin: 0; + position: relative; +} +.more-filters-container ol { + list-style-type: none; + margin: 20px 0 0; + font-size: 12px; +} +.more-filters-container li { + display: inline-block; + vertical-align: top; + list-style-type: none; + margin: 5px 0; + padding-right: 25px; + width: 160px; +} +.theme-navigation .more-filters-container .apply-filters { + margin: 0 0 20px; +} +.theme-navigation .more-filters-container .clear-filters { + display: none; + margin: 0 0 20px 10px; +} +.more-filters-container .apply-filters span { + display: inline-block; + font-size: 12px; + text-indent: 10px; + opacity: 0.8; +} +.more-filters-container .filtering-by { + display: none; + margin: 0; +} +.more-filters-container .filtering-by > span { + font-weight: 600; +} +.more-filters-container .filtering-by .tags { + display: inline; +} +.more-filters-container .filtering-by .tag { + background: #fff; + border: 1px solid #e5e5e5; + -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.04); + box-shadow: 0 1px 1px rgba(0,0,0,0.04); + font-size: 11px; + margin: 0 5px; + padding: 4px 8px; +} +.more-filters-container .filtering-by a { + margin-left: 10px; +} +body.filters-applied .more-filters-container .filters-group, +body.filters-applied .more-filters-container a.button, +body.filters-applied .more-filters-container br { + display: none !important; +} +body.filters-applied .more-filters-container .filtering-by { + display: block; +} +body.filters-applied .more-filters-container { + padding: 20px; +} +p.no-themes { + color: #999; + font-size: 18px; + font-style: normal; + margin: 0; + padding: 0; + text-align: center; + display: none; +} +body.no-results p.no-themes { + display: block; +} +body.show-upload-theme p.no-themes { + display: none !important; +} + + +.theme-install-php .add-new-theme { + display: none !important; +} + +@media only screen and (max-width: 1120px) { + .theme-install-php .theme-search { + margin: 20px 0; + position: static; + width: 100%; + } + .more-filters-container { + border-bottom: 1px solid #eee; + } + .upload-theme .wp-upload-form { + margin: 20px 0; + max-width: 100%; + } + .upload-theme .install-help { + font-size: 15px; + padding: 20px 0 0; + text-align: left; + } + .more-filters-container .filters-group { + margin-bottom: 0; + margin-top: 5px; + width: 100%; + } + .more-filters-container .filters-group li { + margin: 10px 0; + } +} + +@media only screen and (max-width: 782px) { + .more-filters-container .filters-group { + width: 100%; + } + .more-filters-container .filters-group li { + width: 100%; + } +} + +.rating { + margin: 30px 0; +} +.rating span:before { + color: #e6b800; + content: "\f154"; + display: inline-block; + -webkit-font-smoothing: antialiased; + font: normal 20px/1 'dashicons'; + vertical-align: top; +} +/* Half stars */ +.rating-10 span.one:before, +.rating-30 span.two:before, +.rating-50 span.three:before, +.rating-70 span.four:before, +.rating-90 span.five:before { + content: "\f459"; +} +/* Full stars */ +.rating-20 span.one:before { + content: "\f155"; +} +.rating-30 span.one:before, +.rating-40 span.one:before, +.rating-40 span.two:before { + content: "\f155"; +} +.rating-50 span.one:before, +.rating-50 span.two:before, +.rating-60 span.one:before, +.rating-60 span.two:before, +.rating-60 span.three:before { + content: "\f155"; +} +.rating-70 span.one:before, +.rating-70 span.two:before, +.rating-70 span.three:before, +.rating-80 span.one:before, +.rating-80 span.two:before, +.rating-80 span.three:before, +.rating-80 span.four:before { + content: "\f155"; +} +.rating-90 span.one:before, +.rating-90 span.two:before, +.rating-90 span.three:before, +.rating-90 span.four:before, +.rating-100 span.one:before, +.rating-100 span.two:before, +.rating-100 span.three:before, +.rating-100 span.four:before, +.rating-100 span.five:before { + content: "\f155"; +} +.rating .ratings { + display: inline; + margin-left: 10px; + line-height: 20px; + color: #999; +} +.loading-themes .theme-browser, +.error .theme-browser { + display: none; +} +.loading-themes .spinner { + display: block; + margin: 40px auto 0; + float: none; +} + +/*------------------------------------------------------------------------------ + 16.3 - Custom Header Screen +------------------------------------------------------------------------------*/ + +.appearance_page_custom-header #headimg { + border: 1px solid #DFDFDF; + overflow: hidden; + 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; +} + + +/*------------------------------------------------------------------------------ + 16.4 - Custom Background Screen +------------------------------------------------------------------------------*/ + +div#custom-background-image { + min-height: 100px; + border: 1px solid #dfdfdf; +} + +div#custom-background-image img { + max-width: 400px; + max-height: 300px; +} + +/*------------------------------------------------------------------------------ + 23.0 - Full Overlay w/ Sidebar +------------------------------------------------------------------------------*/ + +body.full-overlay-active { + overflow: hidden; +} + +.wp-full-overlay { + background: transparent; + 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: #eee; + border-right: none; +} + +.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; + 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 { + position: absolute; + left: 0; + right: 0; + height: 45px; + padding: 0 15px; + line-height: 45px; + z-index: 10; + margin: 0; + border-top: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +.wp-full-overlay-sidebar .wp-full-overlay-header a.back { + margin-top: 9px; +} + +.wp-full-overlay-sidebar .wp-full-overlay-footer { + bottom: 0; + border-bottom: none; + border-top: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +.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 a.collapse-sidebar { + position: absolute; + bottom: 12px; + left: 0; + z-index: 50; + display: block; + width: 19px; + height: 19px; + margin-left: 15px; + padding: 0; + -webkit-border-radius: 50%; + border-radius: 50%; + color: #777; + text-decoration: none; +} + +.wp-full-overlay a.collapse-sidebar:hover { + color: #0074a2; +} + +.wp-full-overlay.collapsed .collapse-sidebar { + position: absolute; + left: 100%; +} + +.wp-full-overlay .collapse-sidebar-arrow { + position: static; + margin-top: 0; + margin-left: 0; + display: block; + width: auto; + height: auto; + background: none; +} + +.wp-full-overlay .collapse-sidebar-arrow:before { + -webkit-border-radius: 50%; + border-radius: 50%; + float: left; + content: "\f148"; + background: #eee; + font: normal 20px/1 'dashicons'; + speak: none; + display: block; + padding: 0; + text-indent: 0; + text-align: center; + position: relative; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-decoration: none !important; +} + +.wp-full-overlay.collapsed .collapse-sidebar-arrow:before, +.rtl .wp-full-overlay .collapse-sidebar-arrow:before { + -webkit-transform: rotate(180deg); + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} + +.rtl .wp-full-overlay.collapsed .collapse-sidebar-arrow:before { + -webkit-transform: none; + -ms-transform: none; + transform: none; +} + +.wp-full-overlay.collapsed .collapse-sidebar-arrow { + background-position: -1px -109px; +} + +.wp-full-overlay .collapse-sidebar-label { + position: absolute; + left: 100%; + line-height: 20px; + margin-left: 10px; +} + +.wp-full-overlay.collapsed .collapse-sidebar-label { + display: none; +} + +.wp-full-overlay .theme-navigation { + padding: 10px 20px; + position: absolute; + bottom: 10px; + text-align: left; +} +.wp-full-overlay .theme-navigation .next-theme { + float: right; +} +.wp-full-overlay.no-navigation .theme-navigation { + display: none; +} + +/* 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; + transition-property: left, right, top, bottom, width, margin; + -webkit-transition-duration: 0.2s; + transition-duration: 0.2s; +} + +/*------------------------------------------------------------------------------ + 24.0 - Customize Loader +------------------------------------------------------------------------------*/ + +.no-customize-support .hide-if-no-customize, +.customize-support .hide-if-customize, +.no-customize-support.wp-core-ui .hide-if-no-customize, +.no-customize-support .wp-core-ui .hide-if-no-customize, +.customize-support.wp-core-ui .hide-if-customize, +.customize-support .wp-core-ui .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/spinner.gif) no-repeat fixed center center; + -webkit-background-size: 20px 20px; + background-size: 20px 20px; +} + +#customize-container iframe, +.theme-install-overlay iframe { + height: 100%; + width: 100%; + z-index: 20; + -webkit-transition: opacity 0.3s; + transition: opacity 0.3s; +} + +#customize-container .collapse-sidebar { + bottom: 16px; +} + +#customize-controls { + margin-top: 0; +} + +.theme-install-overlay { + display: none; +} + +.theme-install-overlay.single-theme { + display: block; +} + +.install-theme-info { + display: none; + padding: 10px 20px 60px; +} + +.single-theme .install-theme-info { + padding-top: 15px; +} + +.theme-install-overlay .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; + margin-top: 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-rating { + margin: 7px 0; + float: right; +} + +.theme-details .theme-description { + float: left; + color: #777; + line-height: 20px; + max-width: 100%; +} + +.theme-install-overlay .wp-full-overlay-header { + margin-top: 9px; +} + +.theme-install-overlay .wp-full-overlay-header .theme-install { + float: right; + /* For when .theme-install is a span rather than a.button-primary (already installed theme) */ + line-height: 26px; +} + +.theme-install-overlay .wp-full-overlay-sidebar { + background: #EEE; + border-right: 1px solid #DDD; +} + +.theme-install-overlay .wp-full-overlay-main { + background: #fff url(../images/spinner.gif) no-repeat center center; + -webkit-background-size: 20px 20px; + background-size: 20px 20px; +} + +/* =Media Queries +-------------------------------------------------------------- */ + +/** + * HiDPI Displays + */ +@media print, + (-o-min-device-pixel-ratio: 5/4), + (-webkit-min-device-pixel-ratio: 1.25), + (min-resolution: 120dpi) { + .wp-full-overlay .collapse-sidebar-arrow { + background-image: url(../images/arrows-2x.png); + -webkit-background-size: 15px 123px; + background-size: 15px 123px; + } + + .customize-loading #customize-container, + .theme-install-overlay .wp-full-overlay-main { + background-image: url(../images/spinner-2x.gif); + } +} + +@media screen and ( max-width: 782px ) { + .available-theme .action-links .delete-theme { + float: none; + margin: 0; + padding: 0; + clear: both; + } + + .available-theme .action-links .delete-theme a { + padding: 0; + } +} diff --git a/wp-admin/css/widgets-rtl.css b/wp-admin/css/widgets-rtl.css new file mode 100644 index 0000000..be4d9c3 --- /dev/null +++ b/wp-admin/css/widgets-rtl.css @@ -0,0 +1,574 @@ +/* General Widgets Styles */ + +.widget { + margin: 0 auto 10px; + position: relative; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.widget-top { + font-size: 13px; + font-weight: 600; + background: #f7f7f7; +} + +.widget-top a.widget-action, +.widget-top a.widget-action:hover { + text-decoration: none; +} + +.widget-title h4 { + margin: 0; + padding: 15px; + line-height: 1; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.widgets-holder-wrap .widget-inside { + border-top: none; + padding: 1px 15px 15px 15px; + line-height: 16px; +} + +.in-widget-title, +#widgets-right a.widget-control-edit, +#available-widgets .widget-description { + color: #666; +} + +.deleting .widget-title, +.deleting .widget-top a.widget-action:after { + color: #aaa; +} + +/* Widget Dragging Helpers */ +.widget.ui-draggable-dragging { + min-width: 100%; +} + +.widget.ui-sortable-helper { + opacity: 0.8; +} + +.widget-placeholder { + border: 1px dashed #bbb; + margin: 0 auto 10px; + height: 45px; + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +#widgets-right .widget-placeholder { + margin-top: 0; +} + +#widgets-right .closed .widget-placeholder { + height: 0; + border: 0; + margin-top: -10px; +} + +/* Widget Sidebars */ +.sidebar-name { + position: relative; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.sidebar-name-arrow { + position: absolute; + top: 0; + left: 0; + bottom: 0; +} + +.js .sidebar-name { + cursor: pointer; +} + +.sidebar-name h3 { + margin: 0; + padding: 8px 10px; + overflow: hidden; + white-space: nowrap; +} + +.widgets-holder-wrap .description { + padding: 0 0 15px; + margin: 0; + font-style: normal; + color: #777; +} + +#widgets-right .widgets-holder-wrap .description { + padding-right: 7px; + padding-left: 7px; +} + +/* Widgets 2-col Layout */ +div.widget-liquid-left { + margin: 0; + width: 38%; + float: right; +} + +div.widget-liquid-right { + float: left; + width: 58%; +} + +/* Widgets Left - Available Widgets */ + +div#widgets-left { + padding-top: 12px; +} + +div#widgets-left .closed .sidebar-name, +div#widgets-left .inactive-sidebar.closed .sidebar-name { + margin-bottom: 10px; +} + +div#widgets-left .sidebar-name h3 { + padding: 10px 0; + margin: 0 0 0 10px; +} + +div#widgets-left .sidebar-name .sidebar-name-arrow:before { + left: 0; + top: 4px; + padding: 4px 4px 4px 6px; +} + +#widgets-left #available-widgets, +div#widgets-left .widget-holder { + background: transparent; + border: none; +} + +#widgets-left .widgets-holder-wrap { + border: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +#available-widgets .widget-action { + display: none; +} + +#available-widgets .widget { + margin: 0; +} + +#available-widgets .widget:nth-child(odd) { + clear: both; +} + +#available-widgets .widget .widget-description { + display: block; + padding: 10px 15px; + font-size: 12px; +} + +#available-widgets #widget-list { + position: relative; +} + +/* Inactive Sidebars */ +#widgets-left .inactive-sidebar { + clear: both; + width: 100%; + background: transparent; + padding: 0; + margin: 0 0 20px 0; + border: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +#widgets-left .inactive-sidebar.first { + margin-top: 40px; +} + +/* Not sure what this is for... */ +div#widgets-left .inactive-sidebar .widget.expanded { + right: auto; +} + +.widget-title-action { + float: left; + position: relative; +} + +div#widgets-left .inactive-sidebar .widgets-sortables { + min-height: 42px; + padding: 0; + background: transparent; + margin: 0; + position: relative; +} + +/* Widgets Right */ + +div#widgets-right:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; +} + +div#widgets-right .sidebars-column-1, +div#widgets-right .sidebars-column-2 { + max-width: 450px; +} + +div#widgets-right .widgets-holder-wrap { + margin: 10px 0 0 0; +} + +div#widgets-right .sidebar-description { + min-height: 20px; + margin-top: -5px; +} + +div#widgets-right .sidebar-name h3 { + padding: 15px 7px; +} + +div#widgets-right .sidebar-name .sidebar-name-arrow:before { + left: 0; + top: 4px; +} + +div#widgets-right .widget-top { + padding: 0; +} + +div#widgets-right .widgets-sortables { + padding: 0 8px; + margin-bottom: 9px; + position: relative; + min-height: 123px; +} + +div#widgets-right .closed .widgets-sortables { + min-height: 0; + margin-bottom: 0; +} + +.sidebar-name .spinner { + margin: -5px 5px; + float: none; +} + +/* Dragging a widget over a closed sidebar */ +#widgets-right .widgets-holder-wrap.widget-hover { + border-color: #777; + -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.3); + box-shadow: 0 1px 2px rgba(0,0,0,0.3); +} + +/* Accessibility Mode */ +.widgets_access #widgets-left .widget .widget-top { + cursor: auto; +} + +.widgets_access #wpwrap .widgets-holder-wrap.closed .sidebar-description, +.widgets_access #wpwrap .widgets-holder-wrap.closed .widget, +.widgets_access #wpwrap .widget-control-edit { + display: block; +} + +.widgets_access #widgets-left .widget .widget-top:hover, +.widgets_access #widgets-right .widget .widget-top:hover { + border-color: #ddd; +} + +#available-widgets .widget-control-edit .edit, +#widgets-left .inactive-sidebar .widget-control-edit .add, +#widgets-right .widget-control-edit .add { + display: none; +} + +.widget-control-edit { + display: block; + color: #666; + background: #EEE; + padding: 0 15px; + line-height: 43px; + border-right: 1px solid #DDD; +} + +#widgets-left .widget-control-edit:hover, +#widgets-right .widget-control-edit:hover { + color: #fff; + background: #444; + border-right: 0; + outline: 1px solid #444; +} + +.widgets-holder-wrap .sidebar-name, +.widgets-holder-wrap .sidebar-description { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.editwidget { + margin: 0 auto; +} + +.editwidget .widget-inside { + display: block; + padding: 0 15px; +} + +.editwidget .widget-control-actions { + margin-top: 20px; +} + +.js .widgets-holder-wrap.closed .widget, +.js .widgets-holder-wrap.closed .sidebar-description, +.js .closed br.clear { + display: none; +} + +/* Hide Widget Settings by Default */ +.widget-inside, +.widget-description { + display: none; +} + +.widget-inside { + background: #fff; +} + +/* Dragging widgets over the available widget area show's a "Deactivate" message */ +#removing-widget { + display: none; + font-weight: normal; + padding-right: 15px; + font-size: 12px; + line-height: 1; + color: black; +} + +.js #removing-widget { + color: #2ea2cc; +} + +.widget-control-noform, +#access-off, +.widgets_access .widget-action, +.widgets_access .sidebar-name-arrow, +.widgets_access #access-on, +.widgets_access .widget-holder .description, +.no-js .widget-holder .description { + display: none; +} + +.widgets_access .widget-holder, +.widgets_access #widget-list { + padding-top: 10px; +} + +.widgets_access #access-off { + display: inline; +} + +.widgets_access .sidebar-name, +.widgets_access .widget .widget-top { + cursor: default; +} + + +/* Widgets Area Chooser */ +.widget-liquid-left #widgets-left.chooser #available-widgets .widget, +.widget-liquid-left #widgets-left.chooser .inactive-sidebar { + -webkit-transition: opacity 0.1s linear; + transition: opacity 0.1s linear; +} + +.widget-liquid-left #widgets-left.chooser #available-widgets .widget, +.widget-liquid-left #widgets-left.chooser .inactive-sidebar { + /* -webkit-filter: blur(1px); */ + opacity: 0.2; + pointer-events: none; +} + +.widget-liquid-left #widgets-left.chooser #available-widgets .widget-in-question { + /* -webkit-filter: none; */ + opacity: 1; + pointer-events: auto; +} + +.widgets-chooser ul, +#widgets-left .widget-in-question .widget-top, +#available-widgets .widget-top:hover, +div#widgets-right .widget-top:hover, +#widgets-left .widget-top:hover { + border-color: #999; + -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.1); + box-shadow: 0 1px 2px rgba(0,0,0,0.1); +} + +.widgets-chooser ul.widgets-chooser-sidebars { + margin: 0; + list-style-type: none; + max-height: 300px; + overflow: auto; +} + +.widgets-chooser { + display: none; +} + +.widgets-chooser ul { + border: 1px solid #ccc; +} + +.widgets-chooser li { + padding: 10px 35px 10px 15px; + border-bottom: 1px solid #ccc; + background: #fff; + margin: 0; + cursor: pointer; + outline: none; + position: relative; + -webkit-transition: background 0.2s ease-in-out; + transition: background 0.2s ease-in-out; +} + +.widgets-chooser li:hover, +.widgets-chooser li:focus { + background: rgba(255,255,255,0.7); +} + +.widgets-chooser li:focus:before { + content: '\f147'; + display: block; + -webkit-font-smoothing: antialiased; + font: normal 26px/1 'dashicons'; + color: #999; + position: absolute; + top: 7px; + right: 5px; +} + +.widgets-chooser li:last-child { + border: none; +} + +.widgets-chooser li.widgets-chooser-selected { + background: #2ea2cc; + color: #fff; +} + +.widgets-chooser li.widgets-chooser-selected:before, +.widgets-chooser li.widgets-chooser-selected:focus:before { + content: '\f147'; + display: block; + -webkit-font-smoothing: antialiased; + font: normal 26px/1 'dashicons'; + color: #fff; + position: absolute; + top: 7px; + right: 5px; +} + +.widgets-chooser .widgets-chooser-actions { + padding: 10px 0 12px 0; + text-align: center; +} + +.widgets-chooser button { + margin-left: 5px; +} + +#available-widgets .widget .widget-top { + cursor: pointer; +} + +/* =Media Queries +-------------------------------------------------------------- */ + +@media screen and (max-width: 480px) { + div.widget-liquid-left { + width: 100%; + float: none; + border-left: none; + padding-left: 0; + } + + #widgets-left .sidebar-name { + margin-left: 0; + } + + #widgets-left #available-widgets .widget-top { + margin-left: 0; + } + + #widgets-left .inactive-sidebar .widgets-sortables { + margin-left: 0; + } + + div.widget-liquid-right { + width: 100%; + float: none; + } + + div.widget { + margin: 0 auto 10px !important; + max-width: 480px; + } +} + +@media screen and (max-width: 320px) { + div.widget { + max-width: 320px; + } +} + +@media only screen and (min-width: 1250px) { + #widgets-left #available-widgets .widget { + width: 49%; + float: right; + } + + .widget.ui-draggable-dragging { + min-width: 49%; + } + + #widgets-left #available-widgets .widget:nth-child(even) { + float: left; + } + + #widgets-right .sidebars-column-1, + #widgets-right .sidebars-column-2 { + float: right; + width: 49%; + } + + #widgets-right .sidebars-column-1 { + margin-left: 2%; + } + + #widgets-right.single-sidebar .sidebars-column-1, + #widgets-right.single-sidebar .sidebars-column-2 { + float: none; + width: 100%; + margin: 0; + } +} diff --git a/wp-admin/css/widgets.css b/wp-admin/css/widgets.css new file mode 100644 index 0000000..75014f6 --- /dev/null +++ b/wp-admin/css/widgets.css @@ -0,0 +1,574 @@ +/* General Widgets Styles */ + +.widget { + margin: 0 auto 10px; + position: relative; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.widget-top { + font-size: 13px; + font-weight: 600; + background: #f7f7f7; +} + +.widget-top a.widget-action, +.widget-top a.widget-action:hover { + text-decoration: none; +} + +.widget-title h4 { + margin: 0; + padding: 15px; + line-height: 1; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.widgets-holder-wrap .widget-inside { + border-top: none; + padding: 1px 15px 15px 15px; + line-height: 16px; +} + +.in-widget-title, +#widgets-right a.widget-control-edit, +#available-widgets .widget-description { + color: #666; +} + +.deleting .widget-title, +.deleting .widget-top a.widget-action:after { + color: #aaa; +} + +/* Widget Dragging Helpers */ +.widget.ui-draggable-dragging { + min-width: 100%; +} + +.widget.ui-sortable-helper { + opacity: 0.8; +} + +.widget-placeholder { + border: 1px dashed #bbb; + margin: 0 auto 10px; + height: 45px; + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +#widgets-right .widget-placeholder { + margin-top: 0; +} + +#widgets-right .closed .widget-placeholder { + height: 0; + border: 0; + margin-top: -10px; +} + +/* Widget Sidebars */ +.sidebar-name { + position: relative; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.sidebar-name-arrow { + position: absolute; + top: 0; + right: 0; + bottom: 0; +} + +.js .sidebar-name { + cursor: pointer; +} + +.sidebar-name h3 { + margin: 0; + padding: 8px 10px; + overflow: hidden; + white-space: nowrap; +} + +.widgets-holder-wrap .description { + padding: 0 0 15px; + margin: 0; + font-style: normal; + color: #777; +} + +#widgets-right .widgets-holder-wrap .description { + padding-left: 7px; + padding-right: 7px; +} + +/* Widgets 2-col Layout */ +div.widget-liquid-left { + margin: 0; + width: 38%; + float: left; +} + +div.widget-liquid-right { + float: right; + width: 58%; +} + +/* Widgets Left - Available Widgets */ + +div#widgets-left { + padding-top: 12px; +} + +div#widgets-left .closed .sidebar-name, +div#widgets-left .inactive-sidebar.closed .sidebar-name { + margin-bottom: 10px; +} + +div#widgets-left .sidebar-name h3 { + padding: 10px 0; + margin: 0 10px 0 0; +} + +div#widgets-left .sidebar-name .sidebar-name-arrow:before { + right: 0; + top: 4px; + padding: 4px 6px 4px 4px; +} + +#widgets-left #available-widgets, +div#widgets-left .widget-holder { + background: transparent; + border: none; +} + +#widgets-left .widgets-holder-wrap { + border: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +#available-widgets .widget-action { + display: none; +} + +#available-widgets .widget { + margin: 0; +} + +#available-widgets .widget:nth-child(odd) { + clear: both; +} + +#available-widgets .widget .widget-description { + display: block; + padding: 10px 15px; + font-size: 12px; +} + +#available-widgets #widget-list { + position: relative; +} + +/* Inactive Sidebars */ +#widgets-left .inactive-sidebar { + clear: both; + width: 100%; + background: transparent; + padding: 0; + margin: 0 0 20px 0; + border: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +#widgets-left .inactive-sidebar.first { + margin-top: 40px; +} + +/* Not sure what this is for... */ +div#widgets-left .inactive-sidebar .widget.expanded { + left: auto; +} + +.widget-title-action { + float: right; + position: relative; +} + +div#widgets-left .inactive-sidebar .widgets-sortables { + min-height: 42px; + padding: 0; + background: transparent; + margin: 0; + position: relative; +} + +/* Widgets Right */ + +div#widgets-right:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; +} + +div#widgets-right .sidebars-column-1, +div#widgets-right .sidebars-column-2 { + max-width: 450px; +} + +div#widgets-right .widgets-holder-wrap { + margin: 10px 0 0 0; +} + +div#widgets-right .sidebar-description { + min-height: 20px; + margin-top: -5px; +} + +div#widgets-right .sidebar-name h3 { + padding: 15px 7px; +} + +div#widgets-right .sidebar-name .sidebar-name-arrow:before { + right: 0; + top: 4px; +} + +div#widgets-right .widget-top { + padding: 0; +} + +div#widgets-right .widgets-sortables { + padding: 0 8px; + margin-bottom: 9px; + position: relative; + min-height: 123px; +} + +div#widgets-right .closed .widgets-sortables { + min-height: 0; + margin-bottom: 0; +} + +.sidebar-name .spinner { + margin: -5px 5px; + float: none; +} + +/* Dragging a widget over a closed sidebar */ +#widgets-right .widgets-holder-wrap.widget-hover { + border-color: #777; + -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.3); + box-shadow: 0 1px 2px rgba(0,0,0,0.3); +} + +/* Accessibility Mode */ +.widgets_access #widgets-left .widget .widget-top { + cursor: auto; +} + +.widgets_access #wpwrap .widgets-holder-wrap.closed .sidebar-description, +.widgets_access #wpwrap .widgets-holder-wrap.closed .widget, +.widgets_access #wpwrap .widget-control-edit { + display: block; +} + +.widgets_access #widgets-left .widget .widget-top:hover, +.widgets_access #widgets-right .widget .widget-top:hover { + border-color: #ddd; +} + +#available-widgets .widget-control-edit .edit, +#widgets-left .inactive-sidebar .widget-control-edit .add, +#widgets-right .widget-control-edit .add { + display: none; +} + +.widget-control-edit { + display: block; + color: #666; + background: #EEE; + padding: 0 15px; + line-height: 43px; + border-left: 1px solid #DDD; +} + +#widgets-left .widget-control-edit:hover, +#widgets-right .widget-control-edit:hover { + color: #fff; + background: #444; + border-left: 0; + outline: 1px solid #444; +} + +.widgets-holder-wrap .sidebar-name, +.widgets-holder-wrap .sidebar-description { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.editwidget { + margin: 0 auto; +} + +.editwidget .widget-inside { + display: block; + padding: 0 15px; +} + +.editwidget .widget-control-actions { + margin-top: 20px; +} + +.js .widgets-holder-wrap.closed .widget, +.js .widgets-holder-wrap.closed .sidebar-description, +.js .closed br.clear { + display: none; +} + +/* Hide Widget Settings by Default */ +.widget-inside, +.widget-description { + display: none; +} + +.widget-inside { + background: #fff; +} + +/* Dragging widgets over the available widget area show's a "Deactivate" message */ +#removing-widget { + display: none; + font-weight: normal; + padding-left: 15px; + font-size: 12px; + line-height: 1; + color: black; +} + +.js #removing-widget { + color: #2ea2cc; +} + +.widget-control-noform, +#access-off, +.widgets_access .widget-action, +.widgets_access .sidebar-name-arrow, +.widgets_access #access-on, +.widgets_access .widget-holder .description, +.no-js .widget-holder .description { + display: none; +} + +.widgets_access .widget-holder, +.widgets_access #widget-list { + padding-top: 10px; +} + +.widgets_access #access-off { + display: inline; +} + +.widgets_access .sidebar-name, +.widgets_access .widget .widget-top { + cursor: default; +} + + +/* Widgets Area Chooser */ +.widget-liquid-left #widgets-left.chooser #available-widgets .widget, +.widget-liquid-left #widgets-left.chooser .inactive-sidebar { + -webkit-transition: opacity 0.1s linear; + transition: opacity 0.1s linear; +} + +.widget-liquid-left #widgets-left.chooser #available-widgets .widget, +.widget-liquid-left #widgets-left.chooser .inactive-sidebar { + /* -webkit-filter: blur(1px); */ + opacity: 0.2; + pointer-events: none; +} + +.widget-liquid-left #widgets-left.chooser #available-widgets .widget-in-question { + /* -webkit-filter: none; */ + opacity: 1; + pointer-events: auto; +} + +.widgets-chooser ul, +#widgets-left .widget-in-question .widget-top, +#available-widgets .widget-top:hover, +div#widgets-right .widget-top:hover, +#widgets-left .widget-top:hover { + border-color: #999; + -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.1); + box-shadow: 0 1px 2px rgba(0,0,0,0.1); +} + +.widgets-chooser ul.widgets-chooser-sidebars { + margin: 0; + list-style-type: none; + max-height: 300px; + overflow: auto; +} + +.widgets-chooser { + display: none; +} + +.widgets-chooser ul { + border: 1px solid #ccc; +} + +.widgets-chooser li { + padding: 10px 15px 10px 35px; + border-bottom: 1px solid #ccc; + background: #fff; + margin: 0; + cursor: pointer; + outline: none; + position: relative; + -webkit-transition: background 0.2s ease-in-out; + transition: background 0.2s ease-in-out; +} + +.widgets-chooser li:hover, +.widgets-chooser li:focus { + background: rgba(255,255,255,0.7); +} + +.widgets-chooser li:focus:before { + content: '\f147'; + display: block; + -webkit-font-smoothing: antialiased; + font: normal 26px/1 'dashicons'; + color: #999; + position: absolute; + top: 7px; + left: 5px; +} + +.widgets-chooser li:last-child { + border: none; +} + +.widgets-chooser li.widgets-chooser-selected { + background: #2ea2cc; + color: #fff; +} + +.widgets-chooser li.widgets-chooser-selected:before, +.widgets-chooser li.widgets-chooser-selected:focus:before { + content: '\f147'; + display: block; + -webkit-font-smoothing: antialiased; + font: normal 26px/1 'dashicons'; + color: #fff; + position: absolute; + top: 7px; + left: 5px; +} + +.widgets-chooser .widgets-chooser-actions { + padding: 10px 0 12px 0; + text-align: center; +} + +.widgets-chooser button { + margin-right: 5px; +} + +#available-widgets .widget .widget-top { + cursor: pointer; +} + +/* =Media Queries +-------------------------------------------------------------- */ + +@media screen and (max-width: 480px) { + div.widget-liquid-left { + width: 100%; + float: none; + border-right: none; + padding-right: 0; + } + + #widgets-left .sidebar-name { + margin-right: 0; + } + + #widgets-left #available-widgets .widget-top { + margin-right: 0; + } + + #widgets-left .inactive-sidebar .widgets-sortables { + margin-right: 0; + } + + div.widget-liquid-right { + width: 100%; + float: none; + } + + div.widget { + margin: 0 auto 10px !important; + max-width: 480px; + } +} + +@media screen and (max-width: 320px) { + div.widget { + max-width: 320px; + } +} + +@media only screen and (min-width: 1250px) { + #widgets-left #available-widgets .widget { + width: 49%; + float: left; + } + + .widget.ui-draggable-dragging { + min-width: 49%; + } + + #widgets-left #available-widgets .widget:nth-child(even) { + float: right; + } + + #widgets-right .sidebars-column-1, + #widgets-right .sidebars-column-2 { + float: left; + width: 49%; + } + + #widgets-right .sidebars-column-1 { + margin-right: 2%; + } + + #widgets-right.single-sidebar .sidebars-column-1, + #widgets-right.single-sidebar .sidebars-column-2 { + float: none; + width: 100%; + margin: 0; + } +} diff --git a/wp-admin/css/wp-admin-rtl.css b/wp-admin/css/wp-admin-rtl.css new file mode 100644 index 0000000..c45d5b1 --- /dev/null +++ b/wp-admin/css/wp-admin-rtl.css @@ -0,0 +1,14 @@ +@import url(common-rtl.css); +@import url(forms-rtl.css); +@import url(admin-menu-rtl.css); +@import url(dashboard-rtl.css); +@import url(list-tables-rtl.css); +@import url(edit-rtl.css); +@import url(revisions-rtl.css); +@import url(media-rtl.css); +@import url(themes-rtl.css); +@import url(press-this-rtl.css); +@import url(about-rtl.css); +@import url(nav-menus-rtl.css); +@import url(widgets-rtl.css); +@import url(l10n-rtl.css); diff --git a/wp-admin/css/wp-admin-rtl.min.css b/wp-admin/css/wp-admin-rtl.min.css new file mode 100644 index 0000000..25e9fbb --- /dev/null +++ b/wp-admin/css/wp-admin-rtl.min.css @@ -0,0 +1 @@ +#wpwrap{height:auto;min-height:100%;width:100%;position:relative;-webkit-font-smoothing:subpixel-antialiased}#wpcontent{height:100%}#wpcontent,#wpfooter{margin-right:180px}.folded #wpcontent,.folded #wpfooter{margin-right:56px}#wpbody-content{padding-bottom:65px;float:right;width:100%;overflow:visible!important}.inner-sidebar{float:left;clear:left;display:none;width:281px;position:relative}.columns-2 .inner-sidebar{margin-left:auto;width:286px;display:block}.columns-2 .inner-sidebar #side-sortables,.inner-sidebar #side-sortables{min-height:300px;width:280px;padding:0}.has-right-sidebar .inner-sidebar{display:block}.has-right-sidebar #post-body{float:right;clear:right;width:100%;margin-left:-2000px}.has-right-sidebar #post-body-content{margin-left:300px;float:none;width:auto}#col-container,#col-left,#col-right{overflow:hidden;padding:0;margin:0}#col-left{width:35%}#col-right{float:left;clear:left;width:65%}.col-wrap{padding:0 7px}.alignleft{float:right}.alignright{float:left}.textleft{text-align:right}.textright{text-align:left}.clear{clear:both}.screen-reader-text,.screen-reader-text span,.ui-helper-hidden-accessible{position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0}.screen-reader-shortcut{position:absolute;top:-1000em}.screen-reader-shortcut:focus{right:6px;top:-25px;height:auto;width:auto;display:block;font-size:14px;font-weight:600;padding:15px 23px 14px;background:#f1f1f1;color:#21759b;z-index:100000;line-height:normal;-webkit-box-shadow:0 0 2px 2px rgba(0,0,0,.6);box-shadow:0 0 2px 2px rgba(0,0,0,.6);text-decoration:none;outline:0}.hidden,.js .closed .inside,.js .hide-if-js,.js .wp-core-ui .hide-if-js,.js.wp-core-ui .hide-if-js,.no-js .hide-if-no-js,.no-js .wp-core-ui .hide-if-no-js,.no-js.wp-core-ui .hide-if-no-js{display:none}#menu-management .menu-edit,#menu-settings-column .accordion-container,.feature-filter,.imgedit-group,.manage-menus,.menu-item-handle,.popular-tags,.stuffbox,.widget-inside,.widget-top,.widgets-holder-wrap,.wp-editor-container,p.popular-tags,table.widefat{border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04)}.feature-filter,.imgedit-group,.popular-tags,.stuffbox,.widgets-holder-wrap,.wp-editor-container,p.popular-tags,table.widefat{background:#fff}body,html{height:100%;margin:0;padding:0}html{background:#f1f1f1}body{color:#444;font-family:"Open Sans",sans-serif;font-size:13px;line-height:1.4em;min-width:600px}body.iframe{min-width:0;padding-top:1px}iframe,img{border:0}td{font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit}a{color:#0074a2;-webkit-transition-property:border,background,color;transition-property:border,background,color;-webkit-transition-duration:.05s;transition-duration:.05s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}a,div{outline:0}a:active,a:hover{color:#2ea2cc}a:focus{color:#124964}a:active,a:focus{outline:thin dotted}#adminmenu a:active,#adminmenu a:focus,.screen-reader-text:focus{outline:0}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}p{font-size:13px;line-height:1.5;margin:1em 0}blockquote{margin:1em}dd,li{margin-bottom:6px}h1,h2,h3,h4,h5,h6{display:block;font-weight:600}h1{font-size:2em;margin:.67em 0}h2{color:#222;font-size:1.5em;margin:.83em 0;font-weight:400}h3{color:#222;font-size:1.3em;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}ol,ul{padding:0}ul{list-style:none}ol{list-style-type:decimal;margin-right:2em}ul.ul-disc{list-style:disc outside}ul.ul-square{list-style:square outside}ol.ol-decimal{list-style:decimal outside}ol.ol-decimal,ul.ul-disc,ul.ul-square{margin-right:1.8em}ol.ol-decimal>li,ul.ul-disc>li,ul.ul-square>li{margin:0 0 .5em}.ltr{direction:ltr}.code,code{font-family:Consolas,Monaco,monospace;direction:ltr}code,kbd{padding:3px 5px 2px;margin:0 1px;background:#eaeaea;background:rgba(0,0,0,.07);font-size:13px}.subsubsub{list-style:none;margin:8px 0 0;padding:0;font-size:13px;float:right;color:#666}.subsubsub a{line-height:2;padding:.2em;text-decoration:none}.subsubsub a .count,.subsubsub a.current .count{color:#999;font-weight:400}.subsubsub a.current{font-weight:600;border:0}.subsubsub li{display:inline-block;margin:0;padding:0;white-space:nowrap}.widefat{border-spacing:0;width:100%;clear:both;margin:0}.widefat *{word-wrap:break-word}.widefat a{text-decoration:none}.widefat td,.widefat th{padding:8px 10px}.widefat thead th{border-bottom:1px solid #e1e1e1}.widefat tfoot th{border-top:1px solid #e1e1e1;border-bottom:0}.widefat .no-items td{border-bottom-width:0}.widefat td{vertical-align:top}.widefat td,.widefat td ol,.widefat td p,.widefat td ul{font-size:13px;line-height:1.5em}.widefat th{text-align:right;line-height:1.3em;font-size:14px}.widefat th input{margin:0 8px 0 0;padding:0;vertical-align:text-top}.widefat .check-column{width:2.2em;padding:6px 0 25px;vertical-align:top}.widefat th input[type=checkbox]{margin-top:-1px}.widefat.media .check-column{padding-top:8px}.widefat tbody th.check-column,.widefat tfoot th.check-column,.widefat thead th.check-column{padding:11px 3px 0 0}.widefat thead th.check-column{padding-top:10px}.update-php div.error,.update-php div.updated{margin-right:0}.no-js .widefat tfoot .check-column input,.no-js .widefat thead .check-column input{display:none}.column-comments,.column-links,.column-posts,.widefat .num{text-align:center}.widefat th#comments{vertical-align:middle}.wrap{margin:10px 2px 0 20px}div.error,div.updated{margin:5px 15px 2px}div.error p,div.updated p{margin:.5em 0;padding:2px}.media-upload-form div.error,.wrap div.error,.wrap div.updated{margin:5px 0 15px}div.updated{border-right:4px solid #7ad03a;padding:1px 12px;background-color:#fff;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}div.error{border-right:4px solid #dd3d36;background:#fff;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1);padding:1px 12px}.attention{color:#2ea2cc}.subtitle,.wrap h2{font-weight:400;margin:0}.wrap h2{font-size:23px;font-weight:400;padding:9px 0 4px 15px;line-height:29px}.subtitle{color:#777;font-size:14px;padding-right:25px}.wrap .add-new-h2,.wrap .add-new-h2:active{margin-right:4px;padding:4px 8px;position:relative;top:-3px;text-decoration:none;border:0;-webkit-border-radius:2px;border-radius:2px;background:#e0e0e0;text-shadow:none;font-weight:600;font-size:13px}.wrap .add-new-h2:hover{background:#2ea2cc;color:#fff}.wrap h2.long-header{padding-left:0}.wp-dialog{background-color:#fff}.sorthelper{background-color:#ccf3fa}.ac_match,.subsubsub a.current{color:#000}.alt,.alternate{background-color:#f9f9f9}.bar{background-color:#e8e8e8;border-left-color:#99d}.media-upload-form label.form-help,td.help{color:#9a9a9a}.highlight{background-color:#e4f2fd;color:#000}.wp-ui-primary{color:#fff;background-color:#333}.wp-ui-text-primary{color:#333}.wp-ui-highlight{color:#fff;background-color:#1e8cbe}.wp-ui-text-highlight{color:#1e8cbe}.wp-ui-notification{color:#fff;background-color:#d54e21}.wp-ui-text-notification{color:#d54e21}.wp-ui-text-icon{color:#999}#nav-menu-footer,#nav-menu-header,#your-profile #rich_editing,.checkbox,.control-section .accordion-section-title,.menu-item-handle,.postbox h3,.side-info,.sidebar-name,.stuffbox h3,.widefat tfoot th,.widefat thead th,.widget .widget-top,h3.dashboard-widget-title,h3.dashboard-widget-title small,h3.dashboard-widget-title span{line-height:1.4em}.menu-item-handle,.widget .widget-top{background:#fafafa;color:#222}#namediv h3,#submitdiv h3,.postbox h3{border-bottom:1px solid #eee}.quicktags,.search{background-color:#ccc;color:#000;font-size:12px}.icon32{display:none}#bulk-titles div a:before,#welcome-panel.welcome-panel .welcome-panel-close::before,.tagchecklist span a:before{background:0 0;color:#bbb;content:'\f153';display:block!important;font:400 16px/1 dashicons;speak:none;height:20px;margin:2px 0;text-align:center;width:20px;-webkit-font-smoothing:antialiased!important}#bulk-titles div a:hover:before,#welcome-panel.welcome-panel .welcome-panel-close:hover:before,.tagchecklist span a:hover:before{color:#c00}.key-labels label{line-height:24px}b,strong{font-weight:600}.pre{white-space:pre-wrap;word-wrap:break-word}.howto{color:#666;font-style:italic;display:block}p.install-help{margin:8px 0;font-style:italic}.no-break{white-space:nowrap}hr{border:0;border-top:1px solid #ddd;border-bottom:1px solid #fafafa}#all-plugins-table .plugins a.delete,#media-items a.delete,#media-items a.delete-permanently,#nav-menu-footer .menu-delete,#search-plugins-table .plugins a.delete,.plugins a.delete,.row-actions span.delete a,.row-actions span.spam a,.row-actions span.trash a,.submitbox .submitdelete{color:#a00}#all-plugins-table .plugins a.delete:hover,#media-items a.delete-permanently:hover,#media-items a.delete:hover,#nav-menu-footer .menu-delete:hover,#search-plugins-table .plugins a.delete:hover,.file-error,.plugins a.delete:hover,.row-actions .delete a:hover,.row-actions .spam a:hover,.row-actions .trash a:hover,.submitbox .submitdelete:hover,.widget-control-remove:hover,abbr.required{color:red;text-decoration:none;border:0}#major-publishing-actions{padding:10px;clear:both;border-top:1px solid #ddd;background:#f5f5f5}#delete-action{line-height:28px;vertical-align:middle;text-align:right;float:right}#publishing-action{text-align:left;float:left;line-height:23px}#publishing-action .spinner{float:right}#misc-publishing-actions{padding:6px 0 0}.misc-pub-section{padding:6px 10px 8px}#minor-publishing-actions{padding:10px 10px 0;text-align:left}#save-post{float:right}.preview{float:left}#sticky-span{margin-right: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:1px solid #dadada}.side-info ul{margin:0;padding-right:18px;list-style:square;color:#666}.approve,.unapproved .unapprove{display:none}.spam .approve,.trash .approve,.unapproved .approve{display:inline}td.action-links,th.action-links{text-align:left}#update-nag,.update-nag{display:inline-block;line-height:19px;padding:11px 15px;font-size:14px;text-align:right;margin:25px 2px 0 20px;background-color:#fff;border-right:4px solid #ffba00;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}.update-message{color:#000}.update-php .spinner{float:none;margin:-4px 0}#ajax-loading,.ajax-feedback,.ajax-loading,.imgedit-wait-spin,.list-ajax-loading{visibility:hidden}#ajax-response.alignleft{margin-right:2em}#adminmenu a,#catlist a,#sidemenu a,#taglist a{text-decoration:none}#contextual-help-wrap,#screen-options-wrap{margin:0;padding:8px 20px 12px;position:relative}#contextual-help-wrap{overflow:auto;margin-right:0!important}#screen-meta .screen-reader-text{visibility:hidden}#screen-meta-links{margin:0 0 0 20px}#screen-meta-links a{padding:3px 16px 3px 6px}#screen-meta-links a:focus{outline:0}#screen-meta{display:none;margin:0 0 -1px 20px;position:relative;background-color:#fff;border:1px solid #ddd;border-top:0;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.025);box-shadow:0 1px 0 rgba(0,0,0,.025)}#contextual-help-link-wrap,#screen-options-link-wrap{float:left;height:28px;margin:0 6px 0 0;border:1px solid #ddd;border-top:0;background:#fff;-webkit-box-shadow:0 1px 1px -1px rgba(0,0,0,.1);box-shadow:0 1px 1px -1px rgba(0,0,0,.1)}#screen-meta-links .screen-meta-toggle{position:relative;top:0}#screen-meta-links a{color:#777}#screen-meta-links a:active,#screen-meta-links a:focus,#screen-meta-links a:hover{color:#333}#screen-meta-links a:focus{border-color:#aaa;-webkit-box-shadow:0 2px 3px rgba(0,0,0,.15);box-shadow:0 2px 3px rgba(0,0,0,.15)}#screen-meta-links a.show-settings{display:block;font-size:13px;height:22px;line-height:22px;text-decoration:none;z-index:1}#screen-meta-links a:after{left:0;content:'\f140';font:400 20px/1 dashicons;speak:none;display:inline-block;padding:0 0 0 5px;bottom:2px;position:relative;vertical-align:bottom;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#bbb}#screen-meta-links a.screen-meta-active:after{content:'\f142'}#screen-meta-links a.show-settings:hover{text-decoration:none}.toggle-arrow{background-repeat:no-repeat;background-position:top right;background-color:transparent;height:22px;line-height:22px;display:block}.toggle-arrow-active{background-position:bottom right}#contextual-help-wrap h5,#screen-options-wrap h5{margin:8px 0;font-size:13px}.metabox-prefs label{display:inline-block;padding-left:15px;line-height:30px}.metabox-prefs label input[type=checkbox]{margin-top:-4px;margin-left:6px}.metabox-prefs label input{margin:0 2px 0 5px}.metabox-prefs .columns-prefs label input{margin:0 2px}.metabox-prefs label a{display:none}#contextual-help-wrap{padding:0}#contextual-help-columns{position:relative}#contextual-help-back{position:absolute;top:0;bottom:0;right:150px;left:170px;border:1px solid #e1e1e1;border-top:0;border-bottom:0;background:#f6fbfd}#contextual-help-wrap.no-sidebar #contextual-help-back{left:0;border-left-width:0;-webkit-border-bottom-left-radius:2px;border-bottom-left-radius:2px}.contextual-help-tabs{float:right;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:0 2px 0 0;border-color:transparent}.contextual-help-tabs a{display:block;padding:5px 12px 5px 5px;line-height:18px;text-decoration:none;border:1px solid transparent;border-left:0;border-right:0}.contextual-help-tabs a:hover{color:#333}.contextual-help-tabs .active{padding:0;margin:0 0 0 -1px;border-right:2px solid #2ea2cc;background:#f6fbfd;-webkit-box-shadow:0 2px 0 rgba(0,0,0,.02),0 1px 0 rgba(0,0,0,.02);box-shadow:0 2px 0 rgba(0,0,0,.02),0 1px 0 rgba(0,0,0,.02)}.contextual-help-tabs .active a{border-color:#e1e1e1;color:#333}.contextual-help-tabs-wrap{padding:0 20px;overflow:auto}.help-tab-content{display:none;margin:0 0 12px 22px;line-height:1.6em}.help-tab-content.active{display:block}.help-tab-content ul li{list-style-type:disc;margin-right:18px}.contextual-help-sidebar{width:150px;float:left;padding:0 12px 0 8px;overflow:auto}html.wp-toolbar{padding-top:32px;-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 td,.widefat th{overflow:hidden;color:#555}.widefat th{font-weight:400}.widefat tfoot tr th,.widefat thead tr th{color:#333}.widefat td p{margin:2px 0 .8em}.widefat ol,.widefat p,.widefat ul{color:#333}.widefat .column-comment p{margin:.6em 0}.postbox-container{float:right}.postbox-container .meta-box-sortables{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wpbody-content .metabox-holder{padding-top:10px}.metabox-holder .postbox-container .empty-container{border:3px dashed #bbb;height:250px}.columns-2 #postbox-container-3 .empty-container,.columns-2 #postbox-container-4 .empty-container,.columns-3 #postbox-container-4 .empty-container,.metabox-holder.columns-1 .postbox-container .empty-container{border:0 none;height:0;min-height:0}#post-body-content{width:100%;min-width:463px;float:right}#post-body.columns-2 #postbox-container-1{float:left;margin-left:-300px;width:280px}#post-body.columns-2 #side-sortables{min-height:250px}@media only screen and (max-width:799px){#wpbody-content .metabox-holder .postbox-container .empty-container{border:0 none;height:0;min-height:0}}.js .postbox .hndle{cursor:move}.hndle a{font-size:11px;font-weight:400}.postbox .handlediv{float:left;width:27px;height:30px}.js .postbox .handlediv{cursor:pointer}.sortable-placeholder{border:1px dashed #bbb;margin-bottom:20px}.postbox,.stuffbox{margin-bottom:20px;padding:0;line-height:1}.postbox h3,.stuffbox h3{margin-top:1px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.js .postbox h3,.js .widget .widget-top{cursor:move}.postbox .inside,.stuffbox .inside{padding:0 12px 12px;line-height:1.4em;font-size:13px}.postbox .inside{margin:11px 0;position:relative}.postbox .inside>p:last-child,.rss-widget ul li:last-child{margin-bottom:1px!important}.postbox.closed h3{border:0;-webkit-box-shadow:none;box-shadow:none}.postbox table.form-table{margin-bottom:0}.postbox table.widefat{-webkit-box-shadow:none;box-shadow:none}.temp-border{border:1px dotted #ccc}.columns-prefs label{padding:0 5px}#adminmenu .wp-submenu li.current,#adminmenu .wp-submenu li.current a,#adminmenu .wp-submenu li.current a:hover,#dashboard_right_now .versions .b,#ed_reply_toolbar #ed_reply_strong,#pass-strength-result.short,#pass-strength-result.strong,#post-status-display,#post-visibility-display,.feature-filter .feature-name,.item-controls .item-order a,.media-item .percent,.plugins .name{font-weight:600}#wpfooter{position:absolute;bottom:0;right:0;left:0;padding:10px 0;margin-left:20px;color:#777}#wpfooter p{font-size:13px;margin:0;line-height:20px}#footer-thankyou{font-style:italic}#wpfooter a{text-decoration:none}#wpfooter a:hover{text-decoration:underline}.nav-tab{border:1px solid #ccc;border-bottom:0;background:#e4e4e4;color:#555;font-size:12px;line-height:16px;display:inline-block;padding:4px 14px 6px;text-decoration:none;margin:-4px 0 -1px 4px}.nav-tab:hover{background-color:#fff;color:#464646}.nav-tab-active,.nav-tab-active:hover{border-bottom:1px solid #f1f1f1;background:#f1f1f1;color:#000}h2.nav-tab-wrapper,h3.nav-tab-wrapper{border-bottom:1px solid #ccc;padding-bottom:0;padding-right:10px}h2 .nav-tab{padding:6px 10px;font-weight:700;font-size:15px;line-height:24px}.spinner{background:url(../images/spinner.gif) no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px;display:none;float:left;opacity:.7;filter:alpha(opacity=70);width:20px;height:20px;margin:2px 5px 0}#template div{margin-left:190px}.metabox-holder h3{font-size:14px;padding:8px 12px;margin:0;line-height:1.4}#templateside ul li a{text-decoration:none}#sidemenu{margin:-30px 315px 0 15px;list-style:none;position:relative;float:left;padding-right:10px;font-size:12px}#sidemenu a{padding:0 7px;display:block;float:right;line-height:28px;border-top:1px solid #f9f9f9;border-bottom:1px solid #dfdfdf;background-color:#f9f9f9;-webkit-transition:none;transition:none}#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:400;padding-right:6px;padding-left:6px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;border:1px solid #dfdfdf;border-bottom-color:#f1f1f1;background-color:#f1f1f1;color:#000}.plugin-install #description,.plugin-install-network #description{width:60%}table .column-rating,table .column-visible,table .vers{text-align:right}.error-message{color:red;font-weight:600}body.iframe{height:98%}.lp-show-latest p{display:none}.lp-show-latest .lp-error p,.lp-show-latest p:last-child{display:block}td.media-icon{text-align:center;width:80px;padding-top:8px;padding-bottom:8px}td.media-icon img{max-width:80px;max-height:60px}#howto{font-size:11px;margin:0 5px;display:block}.importers td{padding-left:14px}.importers{font-size:16px;width:auto}#post-body #post-body-content #namediv h3{margin-top:0}#namediv h3 label{vertical-align:baseline}#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}div.star-holder{position:relative;height:17px;width:100px;background:url(../images/stars.png?ver=20121108) repeat-x bottom right}div.star-holder .star-rating{background:url(../images/stars.png?ver=20121108) repeat-x top right;height:17px;float:right}.star-rating{white-space:nowrap}.star-rating .star{display:inline-block;width:20px;height:20px;-webkit-font-smoothing:antialiased;font-size:20px;line-height:1;font-family:dashicons;text-decoration:inherit;font-weight:400;font-style:normal;vertical-align:top;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;text-align:center;color:#0074a2}.star-rating .star-full:before{content:'\f155'}.star-rating .star-half:before{content:'\f459'}.rtl .star-rating .star-half{-webkit-transform:rotateY(180deg);-ms-transform:rotateY(180deg);transform:rotateY(180deg)}.star-rating .star-empty:before{content:'\f154'}div.action-links{font-weight:400;margin:6px 0 0}#plugin-information{background:#fcfcfc;position:fixed;top:0;left:0;bottom:0;right:0;height:auto;padding:0}#plugin-information-title{padding:0 20px 0 76px;font-size:22px;font-weight:600;line-height:56px;top:0;left:0;right:0;height:56px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#plugin-information-tabs{padding:0 16px;position:absolute;top:56px;left:0;right:0;height:36px;z-index:1}#plugin-information-tabs a{position:relative;float:right;padding:8px 10px 9px;margin:0;height:18px;line-height:18px;font-size:14px;text-decoration:none;-webkit-transition:none;transition:none}#plugin-information-tabs a.current{margin:-1px -1px 0;background:#fff;border:1px solid #ddd;border-bottom:0;color:#333}#plugin-information-tabs a:active,#plugin-information-tabs a:focus{outline:0}#plugin-information-content{background:#fff;border-top:1px solid #ddd;border-bottom:1px solid #ddd;position:absolute;top:90px;left:0;bottom:58px;right:0}#section-holder{margin:0;padding:10px 26px;position:absolute;top:0;left:250px;bottom:0;right:0;overflow:auto}#section-holder .updated{margin:16px 0}#plugin-information .fyi{background:#f3f3f3;border-right:1px solid #ddd;color:#666;padding:16px;position:absolute;top:0;left:0;bottom:0;width:217px;overflow:auto}#plugin-information .fyi strong{color:#464646}#plugin-information .fyi h3{font-weight:700;text-transform:uppercase;font-size:12px;color:#666;margin:24px 0 8px}#plugin-information .fyi h2{font-size:.9em;margin-bottom:0;margin-left:0}#plugin-information .fyi ul{padding:0;margin:0;list-style:none}#plugin-information .fyi li{margin:0 0 10px}#plugin-information-footer{padding:15px 16px;position:absolute;left:0;bottom:0;right:0;height:28px}#plugin-information .section ol,#plugin-information .section ul{list-style-type:disc;margin-right:24px}#plugin-information .section,#plugin-information .section p{font-size:14px;line-height:1.7}#plugin-information #section-screenshots ol{list-style:none;margin:0}#plugin-information #section-screenshots li img{vertical-align:text-top;margin-top:16px;max-width:100%;width:auto;height:auto;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.3);box-shadow:0 1px 2px rgba(0,0,0,.3)}#plugin-information #section-screenshots li p{font-style:italic;padding-right:20px}#plugin-information pre{padding:7px;overflow:auto;border:1px solid #ccc}.plugin-version-author-uri{font-size:13px}@media screen and (max-width:782px){#plugin-information-content{overflow:auto;bottom:58px}#plugin-information .fyi{border:1px solid #ddd;position:static;width:auto;margin:26px 26px 16px}#section-holder{position:static}#plugin-information .fyi h3,#plugin-information .fyi small{display:none}#plugin-information-footer{padding:12px 16px 0;height:46px}}body.import-php #TB_window,body.index-php #TB_window,body.plugin-install-php #TB_window,body.plugins-php #TB_window,body.update-core-php #TB_window{background:#fcfcfc url( ../images/spinner.gif ) no-repeat center}@media print,(-o-min-device-pixel-ratio:5/4),(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){body.import-php #TB_window,body.index-php #TB_window,body.plugin-install-php #TB_window,body.plugins-php #TB_window,body.update-core-php #TB_window{background:#fcfcfc url( ../images/spinner-2x.gif ) no-repeat center;-webkit-background-size:20px 20px;background-size:20px 20px}}body.import-php #TB_title,body.index-php #TB_title,body.plugin-install-php #TB_title,body.plugins-php #TB_title,body.update-core-php #TB_title{float:right;height:1px}body.import-php #TB_ajaxWindowTitle,body.index-php #TB_ajaxWindowTitle,body.plugin-install-php #TB_ajaxWindowTitle,body.plugins-php #TB_ajaxWindowTitle,body.update-core-php #TB_ajaxWindowTitle{display:none}body.import-php .tb-close-icon,body.index-php .tb-close-icon,body.plugin-install-php .tb-close-icon,body.plugins-php .tb-close-icon,body.update-core-php .tb-close-icon{line-height:48px;width:48px;height:48px}body.import-php .tb-close-icon:before,body.index-php .tb-close-icon:before,body.plugin-install-php .tb-close-icon:before,body.plugins-php .tb-close-icon:before,body.update-core-php .tb-close-icon:before{line-height:48px}img{border:0}#wphead{border-bottom:1px solid #dfdfdf}#wphead h1 a{color:#464646}.js .meta-box-sortables .postbox:hover .handlediv{margin-left:0!important}.js .meta-box-sortables .postbox .handlediv:before,.js .sidebar-name .sidebar-name-arrow:before{left:12px;font:400 20px/1 dashicons;speak:none;display:inline-block;padding:8px 10px;top:0;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.js #widgets-left .sidebar-name .sidebar-name-arrow{display:none}.js #widgets-left .sidebar-name:hover .sidebar-name-arrow,.js #widgets-left .widgets-holder-wrap.closed .sidebar-name .sidebar-name-arrow{display:block}.js .meta-box-sortables .postbox .handlediv:before,.js .sidebar-name .sidebar-name-arrow:before{content:'\f142'}.js .meta-box-sortables .postbox.closed .handlediv:before,.js .widgets-holder-wrap.closed .sidebar-name-arrow:before{content:'\f140'}.error a{text-decoration:underline}.updated a{text-decoration:none;padding-bottom:2px}#photo-add-url-div input[type=text]{width:300px}.alignleft h3{margin:0}#template textarea{font-family:Consolas,Monaco,monospace;font-size:13px;width:97%;background:#f9f9f9;outline:0}#docs-list,#template textarea{direction:ltr}#template p{width:97%}#templateside{float:left;width:190px;word-wrap:break-word}#postcustomstuff p.submit,#templateside h3{margin:0}#templateside h4{margin:1em 0 0}#templateside ol,#templateside ul{margin:.5em 0;padding:0}#templateside li{margin:4px 0}#templateside a,.theme-editor-php .highlight{display:block;padding:3px 12px 3px 3px;text-decoration:none}.theme-editor-php .highlight{margin:-3px -12px -3px 3px}#templateside .highlight{border:0;font-weight:700}.nonessential{color:#666;font-size:11px;font-style:italic;padding-right:12px}#documentation{margin-top:10px}#documentation label{line-height:22px;vertical-align:baseline;font-weight:600}.fileedit-sub{padding:10px 0 8px;line-height:180%}.accordion-section-title:after,.control-section .accordion-section-title:after,.nav-menus-php .item-edit:before,.widget-top a.widget-action:after{left:0;content:'\f140';border:0;background:0 0;font:400 20px/1 dashicons;speak:none;display:block;padding:0;text-indent:0;text-align:center;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.accordion-section-title:after,.handlediv,.item-edit,.sidebar-name-arrow,.widget-action{color:#aaa}.accordion-section-title:hover:after,.handlediv:hover,.item-edit:hover,.sidebar-name:hover .sidebar-name-arrow,.widget-action:hover{color:#777}.widget-top a.widget-action:after{padding:12px 12px 0}.nav-menus-php .item-edit:before{line-height:2.1}.accordion-section-title:after,.control-section .accordion-section-title:after{float:left;left:20px;top:-2px}#customize-info.open .accordion-section-title:after,.control-section.open .accordion-section-title:after,.nav-menus-php .menu-item-edit-active .item-edit:before{content:'\f142'}.ui-draggable,.ui-sortable{-ms-touch-action:none;touch-action:none}.menu.ui-sortable,.meta-box-sortables.ui-sortable,.widgets-holder-wrap .ui-draggable,.widgets-holder-wrap .ui-sortable{-ms-touch-action:auto;touch-action:auto}.menu.ui-sortable .menu-item-handle,.meta-box-sortables.ui-sortable .hndle{-ms-touch-action:none;touch-action:none}.accordion-section{border-bottom:1px solid #dfdfdf;margin:0}.accordion-section.open .accordion-section-content,.no-js .accordion-section .accordion-section-content{display:block}.accordion-section.open:hover{border-bottom-color:#dfdfdf}.accordion-section-content{display:none;padding:10px 20px 15px;overflow:hidden;background:#fff}.accordion-section-title{margin:0;padding:12px 15px 15px;position:relative;border-right:1px solid #dfdfdf;border-left:1px solid #dfdfdf;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.js .accordion-section-title{cursor:pointer}.js .accordion-section-title:after{position:absolute;top:12px;left:10px;z-index:1}.accordion-section-title:focus{outline:0}.accordion-section-title:focus:after,.accordion-section-title:hover:after{border-color:#aaa transparent}.cannot-expand .accordion-section-title{cursor:auto}.cannot-expand .accordion-section-title:after{display:none}.control-section .accordion-section-title{border-right:0;border-left:0;padding:10px 14px 11px 10px;line-height:21px;background:#fff}.control-section .accordion-section-title:after{top:11px}.js .control-section .accordion-section-title:focus,.js .control-section .accordion-section-title:hover,.js .control-section.open .accordion-section-title,.js .control-section:hover .accordion-section-title{color:#222;background:#f5f5f5}.control-section.open .accordion-section-title{border-bottom:1px solid #dfdfdf}@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,#col-right{width:100%}}@media print,(-o-min-device-pixel-ratio:5/4),(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){div.star-holder,div.star-holder .star-rating{background:url(../images/stars-2x.png?ver=20121108) repeat-x bottom right;-webkit-background-size:21px 37px;background-size:21px 37px}.spinner{background-image:url(../images/spinner-2x.gif)}#bulk-titles div a,#bulk-titles div a:hover,#screen-meta-links a.show-settings,.curtime #timestamp,.meta-box-sortables .postbox:hover .handlediv,.sidebar-name-arrow,.sidebar-name:hover .sidebar-name-arrow,.tagchecklist span a,.tagchecklist span a:hover,.widget-top a.widget-action,.widget-top a.widget-action:hover{background:none!important}}@-ms-viewport{width:device-width}@media screen and (max-width:782px){html.wp-toolbar{padding-top:46px}body{min-width:240px;overflow-x:hidden}body *{-webkit-tap-highlight-color:rgba(0,0,0,0)!important}#wpwrap{background:#f0f0f0}#wpcontent{position:relative;margin-right:0;padding-right:10px}#wpbody-content{padding-bottom:100px}.wrap{margin-left:12px;margin-right:0}.col-wrap{padding:0}#collapse-menu,#screen-meta,#screen-meta-links,.post-format-select{display:none!important}.wrap .add-new-h2,.wrap .add-new-h2:active{padding:10px 15px;font-size:14px}.wp-color-result{height:auto;padding-right:45px}.wp-color-result:after{font-size:14px;height:auto;padding:6px 14px}.media-upload-form div.error,.wrap div.error,.wrap div.updated{margin:20px 0 10px;padding:5px 10px;font-size:14px;line-height:175%}.wrap .icon32+h2{margin-top:-2px}.wp-responsive-open #wpbody{left:-190px}.postbox{font-size:14px}.metabox-holder h3{padding:12px}.postbox .handlediv{margin-top:3px}.subsubsub{font-size:16px;text-align:center;margin-bottom:15px}#templateside{float:none;width:auto}#templateside li{margin:0}#templateside li a{display:block;padding:5px}#templateside .highlight{padding:5px;margin-right:-5px;margin-top:-5px}#template div{float:none;margin:0;width:auto}#template textarea{width:100%}.fileedit-sub .alignright{margin-top:15px}#comments-form .checkforspam,#wpfooter{display:none}}@media screen and (max-width:600px){#wpwrap.wp-responsive-open{overflow-x:hidden}html.wp-toolbar{padding-top:0}#wpbody{padding-top:46px}div#post-body.metabox-holder.columns-1{overflow-x:hidden}}input,input[type=email],input[type=number],input[type=password],input[type=search],input[type=text],input[type=url],textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=email],input[type=url]{direction:ltr}input[type=checkbox],input[type=radio]{border:1px solid #bbb;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 0 0 4px;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}input[type=radio]:checked+label:before{color:#888}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#2ea2cc}.wp-admin p input[type=checkbox],.wp-admin p input[type=radio],td>input[type=checkbox]{margin-top:0}.wp-admin p label input[type=checkbox]{margin-top:-4px}.wp-admin p label input[type=radio]{margin-top:-2px}input[type=radio]{-webkit-border-radius:50%;border-radius:50%;margin-left:4px;line-height:10px}input[type=checkbox]:checked:before,input[type=radio]:checked:before{float:right;display:inline-block;vertical-align:middle;width:16px;font:400 21px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}input[type=checkbox]:checked:before{content:'\f147';margin:-3px -4px 0 0;color:#1e8cbe}input[type=radio]:checked:before{content:'\2022';text-indent:-9999px;-webkit-border-radius:50px;border-radius:50px;font-size:24px;width:6px;height:6px;margin:4px;line-height:16px;background-color:#1e8cbe}input.readonly,textarea.readonly{background-color:#ddd}@-moz-document url-prefix(){.form-table input.tog,input[type=checkbox],input[type=radio]{margin-bottom:-1px}}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-decoration{display:none}.ie8 input[type=password]{font-family:sans-serif}button,input,select,textarea{font-family:inherit;font-size:inherit;font-weight:inherit}input,select,textarea{font-size:14px;padding:3px 5px;line-height:15px;-webkit-border-radius:0;border-radius:0}textarea{overflow:auto;padding:2px 6px;line-height:1.4}input[type=email],input[type=number],input[type=password],input[type=search],input[type=text],input[type=url],select,textarea{outline:0}.wp-admin input[type=file]{padding:3px 0}label{cursor:pointer}input,select{margin:1px;padding:3px 5px}input.code{padding-top:6px}textarea.code{line-height:1.4;padding:4px 6px 1px}input[type=email],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=url],select,textarea{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#333;-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}select[disabled]{color:#7f7f7f}input[type=checkbox]:focus,input[type=email]:focus,input[type=number]:focus,input[type=password]:focus,input[type=radio]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=url]:focus,select:focus,textarea:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}input[readonly]{background-color:#eee}.wp-core-ui :-moz-placeholder,:-moz-placeholder{color:#a9a9a9}.form-invalid{background-color:#ffebe8!important}.form-invalid input,.form-invalid select{border-color:#c00!important}.form-input-tip{color:#666}input.disabled,input:disabled,textarea.disabled,textarea:disabled{-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.04);box-shadow:inset 0 1px 2px rgba(0,0,0,.04);border-color:rgba(222,222,222,.75);background:rgba(255,255,255,.5);color:rgba(51,51,51,.5)}input[type=checkbox]:disabled,input[type=checkbox]:disabled:checked:before,input[type=radio]:disabled,input[type=radio]:disabled:checked:before{opacity:.7}.wp-admin select{padding:2px;line-height:28px;height:28px;vertical-align:middle}.wp-admin .button-cancel{padding:0 5px;line-height:2}.meta-box-sortables select{max-width:100%}.wp-admin select[multiple]{height:auto}.submit{padding:1.5em 0;margin:5px 0;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;border:0}form p.submit a.cancel:hover{text-decoration:none}p.submit{text-align:right;max-width:100%;margin-top:20px;padding-top:10px}.textright p.submit{border:0;text-align:left}table.form-table+input+input+p.submit,table.form-table+input+p.submit,table.form-table+p.submit{border-top:0;padding-top:0}#major-publishing-actions input,#minor-publishing-actions .preview,#minor-publishing-actions input{text-align:center}input.all-options,textarea.all-options{width:250px}input.large-text,textarea.large-text{width:99%}#adduser .form-field input,input.regular-text{width:25em}input.small-text{width:50px;padding:1px 6px}input[type=number].small-text{width:65px}#doaction,#doaction2,#post-query-submit{margin:1px 0 0 8px}.tablenav #changeit,.tablenav #clear-recent-list,.tablenav #delete_all{margin-top:1px}.tablenav .actions select{float:right;margin-left:6px;max-width:200px}.ie8 .tablenav .actions select{width:155px}.ie8 .tablenav .actions select#cat{width:200px}#timezone_string option{margin-right:1em}#upload-form label{color:#777}#your-profile label+a,fieldset label,label{vertical-align:middle}#misc-publishing-actions label,.options-media-php label[for*="_size_"]{vertical-align:baseline}#misc-publishing-actions label[for=post_status]:before{content:'\f173';display:inline-block;font:400 20px/1 dashicons;speak:none;right:-1px;padding:0 0 0 5px;position:relative;top:0;text-decoration:none!important;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#pass-strength-result{background-color:#eee;border:1px solid #ddd;float:right;margin:13px 1px 5px 5px;padding:3px 5px;text-align:center;width:200px;display:none}#pass-strength-result.short{background-color:#ffa0a0;border-color:#f04040}#pass-strength-result.bad{background-color:#ffb78c;border-color:#ff853c}#pass-strength-result.good{background-color:#ffec8b;border-color:#fc0}#pass-strength-result.strong{background-color:#c3ff88;border-color:#8dff1c}.indicator-hint{padding-top:8px}p.search-box{float:left;margin:0}.network-admin.themes-php p.search-box{clear:right}#search-plugins input[name="s"],.search-box input[name="s"],.tagsdiv .newtag{float:right;height:28px;margin:0 0 0 4px}input[type=text].ui-autocomplete-loading{background:transparent url(../images/loading.gif) no-repeat left center;visibility:visible}ul#add-to-blog-users{margin:0 14px 0 0}.ui-autocomplete-input.open{-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.ui-autocomplete{padding:0;margin:0;list-style:none;position:absolute;z-index:10000;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;border:1px solid #aaa;background-color:#efefef}.ui-autocomplete li{margin-bottom:0;white-space:nowrap;text-align:right}.ui-autocomplete li a{display:block;height:100%;padding:4px 10px;color:#444}.ui-autocomplete li a.ui-state-focus{background-color:#ddd;cursor:pointer}.form-table{border-collapse:collapse;margin-top:.5em;width:100%;clear:both}.form-table,.form-table td,.form-table td p,.form-table th,.form-wrap label{font-size:14px}.form-table td{margin-bottom:9px;padding:15px 10px;line-height:1.3;vertical-align:middle}.form-table th,.form-wrap label{color:#222;font-weight:400;text-shadow:none;vertical-align:baseline}.form-table th{vertical-align:top;text-align:right;padding:20px 0 20px 10px;width:200px;line-height:1.3;font-weight:600}.form-table th.th-full{width:auto;font-weight:400}.form-table td p{margin-top:4px;margin-bottom:0}.form-table td fieldset label{margin:.25em 0 .5em!important;display:inline-block}.form-table td fieldset label,.form-table td fieldset li,.form-table td fieldset p{line-height:1.4em}.form-table input.tog,.form-table input[type=radio]{margin-top:-4px;margin-left:4px;float:none}.form-table .pre{padding:8px;margin:0}table.form-table td .updated{font-size:13px}#profile-page .form-table textarea{width:500px;margin-bottom:6px}#profile-page .form-table #rich_editing{margin-left:5px}#your-profile legend{font-size:22px}#display_name{width:15em}#createuser .form-field input{width:25em}.color-option{display:inline-block;width:24%;padding:5px 15px 15px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:3px}.color-option.selected,.color-option:hover{background:#ddd}.color-palette{width:100%;border-spacing:0;border-collapse:collapse}.color-palette td{height:20px;padding:0;border:0}.color-option{cursor:pointer}.tool-box .title{margin:8px 0;font-size:18px;font-weight:400;line-height:24px}.pressthis{margin:20px 0}.pressthis a,.pressthis a:active,.pressthis a:focus,.pressthis a:hover{display:inline-block;position:relative;cursor:move;color:#333;background:#e6e6e6;-webkit-border-radius:5px;border-radius:5px;border:1px solid #b4b4b4;font-style:normal;line-height:16px;font-size:14px;text-decoration:none}.pressthis a:active{outline:0}.pressthis a:hover:after{-webkit-transform:skew(20deg) rotate(9deg);-ms-transform:skew(20deg) rotate(9deg);transform:skew(20deg) rotate(9deg);-webkit-box-shadow:0 10px 8px rgba(0,0,0,.7);box-shadow:0 10px 8px rgba(0,0,0,.7)}.pressthis a span{display:inline-block;margin:0;padding:0 9px 8px 12px}.pressthis a span:before{color:#777;font:400 20px/1 dashicons;content:'\f157';position:relative;display:inline-block;top:4px;margin-left:4px}.pressthis a:after{content:'';width:70%;height:55%;z-index:-1;position:absolute;left:10px;bottom:9px;background:0 0;-webkit-transform:skew(20deg) rotate(6deg);-ms-transform:skew(20deg) rotate(6deg);transform:skew(20deg) rotate(6deg);-webkit-box-shadow:0 10px 8px rgba(0,0,0,.6);box-shadow:0 10px 8px rgba(0,0,0,.6)}#local-time,#utc-time{padding-right:25px;font-style:italic}.defaultavatarpicker .avatar{margin:2px 0;vertical-align:middle}.options-general-php .spinner{float:none;margin:-3px 3px}@media screen and (max-width:782px){textarea{-webkit-appearance:none}input[type=number],input[type=password],input[type=search],input[type=text]{-webkit-appearance:none;padding:6px 10px}input.code{padding-bottom:5px;padding-top:10px}.widefat th input[type=checkbox],input[type=checkbox]{-webkit-appearance:none;padding:10px}.widefat th input[type=checkbox]{margin-bottom:8px}.widefat th input[type=checkbox]:before,input[type=checkbox]:checked:before{font:400 30px/1 Dashicons;margin:-3px -5px}input[type=checkbox],input[type=radio]{height:25px;width:25px}.wp-admin p input[type=checkbox],.wp-admin p input[type=radio]{margin-top:-3px}input[type=radio]:checked:before{vertical-align:middle;width:9px;height:9px;margin:7px;line-height:16px}.wp-upload-form input[type=submit]{margin-top:10px}#wpbody select{height:36px;font-size:16px}.wp-admin .button-cancel{padding:0;font-size:14px}#createuser .form-field input{width:100%}.form-table{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table td,.form-table th{display:block;width:auto;vertical-align:middle}.form-table .color-palette td{display:table-cell;width:15px}.form-table table.color-palette{margin-left:10px}input,textarea{font-size:16px}#profile-page .form-table textarea,.form-table span.description,.form-table td input[type=password],.form-table td input[type=text],.form-table td select,.form-table td textarea{width:100%;font-size:16px;line-height:1.5;padding:7px 10px;display:block;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table input[type=text].small-text,input[type=number].small-text,input[type=password].small-text,input[type=search].small-text,input[type=text].small-text{width:auto;max-width:55px;display:inline;padding:3px 6px;margin:0 3px}#pass-strength-result{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:8px}p.search-box{float:none;position:absolute;bottom:0;width:98%;height:90px;margin-bottom:20px}p.search-box input[name="s"]{height:auto;float:none;width:100%;margin-bottom:10px;vertical-align:middle;-webkit-appearance:none}p.search-box input[type=submit]{margin-bottom:10px}.form-table span.description{padding:4px 0 0;line-height:1.4em}.form-table th{padding-top:10px;padding-bottom:0;border-bottom:0}.form-table td{padding-top:8px;padding-right:0}.form-table input.regular-text{width:100%}.form-table label{font-size:14px}.form-table fieldset label{display:block}#utc-time{margin-top:10px}#local-time,#utc-time{display:block;float:none;padding:0;line-height:2}}@media only screen and (max-width:768px){.form-field input,.form-field textarea{width:99%}.form-wrap .form-field{padding:0}#profile-page .form-table textarea{max-width:400px;width:auto}}@media screen and (max-width:600px){.color-option{width:49%}}#adminmenu,#adminmenu .wp-submenu,#adminmenuback,#adminmenuwrap{width:160px;background-color:#222}#adminmenuback{position:absolute;top:0;bottom:0;z-index:-1}#adminmenu{clear:right;margin:12px 0 0;padding:0;list-style:none}.folded #adminmenu,.folded #adminmenu li.menu-top,.folded #adminmenuback,.folded #adminmenuwrap{width:36px}.icon16{height:18px;width:18px;padding:6px;margin:-6px -8px 0 0;float:right}.icon16:before{color:#999;font:400 20px/1 dashicons;speak:none;padding:6px 0;height:34px;width:20px;display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.icon16.icon-dashboard:before{content:'\f226'}.icon16.icon-post:before{content:'\f109'}.icon16.icon-media:before{content:'\f104'}.icon16.icon-links:before{content:'\f103'}.icon16.icon-page:before{content:'\f105'}.icon16.icon-comments:before{content:'\f101';margin-top:1px}.icon16.icon-appearance:before{content:'\f100'}.icon16.icon-plugins:before{content:'\f106'}.icon16.icon-users:before{content:'\f110'}.icon16.icon-tools:before{content:'\f107'}.icon16.icon-settings:before{content:'\f108'}.icon16.icon-site:before{content:'\f112'}.icon16.icon-generic:before{content:'\f111'}.icon16.icon-appearance,.icon16.icon-comments,.icon16.icon-dashboard,.icon16.icon-generic,.icon16.icon-links,.icon16.icon-media,.icon16.icon-page,.icon16.icon-plugins,.icon16.icon-post,.icon16.icon-settings,.icon16.icon-site,.icon16.icon-tools,.icon16.icon-users,.menu-icon-appearance div.wp-menu-image,.menu-icon-comments div.wp-menu-image,.menu-icon-dashboard div.wp-menu-image,.menu-icon-generic div.wp-menu-image,.menu-icon-links div.wp-menu-image,.menu-icon-media div.wp-menu-image,.menu-icon-page div.wp-menu-image,.menu-icon-plugins div.wp-menu-image,.menu-icon-post div.wp-menu-image,.menu-icon-settings div.wp-menu-image,.menu-icon-site div.wp-menu-image,.menu-icon-tools div.wp-menu-image,.menu-icon-users div.wp-menu-image{background-image:none!important}#adminmenuwrap{position:relative;float:right}#adminmenu *{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#adminmenu li{margin:0;padding:0;cursor:pointer}#adminmenu a{display:block;line-height:18px;padding:2px 5px;color:#eee}#adminmenu .wp-submenu a{color:#bbb}#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover{background:0 0}#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a:hover,#adminmenu li.menu-top>a:focus{color:#2ea2cc}#adminmenu li.menu-top{border:0;min-height:34px;position:relative}#adminmenu .wp-submenu{list-style:none;position:absolute;top:-1000em;right:160px;overflow:visible;word-wrap:break-word}#adminmenu .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu,.folded #adminmenu a.wp-has-current-submenu:focus+.wp-submenu{padding:7px 0 8px;z-index:9999;background-color:#333;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}#adminmenu a.menu-top:focus+.wp-submenu,.js #adminmenu .opensub .wp-submenu,.js #adminmenu .sub-open,.no-js li.wp-has-submenu:hover .wp-submenu{top:-1px}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu .wp-submenu.sub-open,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.no-js li.wp-has-current-submenu:hover .wp-submenu{position:relative;z-index:3;top:auto;right:auto;left:auto;bottom:auto;border:0 none;margin-top:0;-webkit-box-shadow:none;box-shadow:none;background-color:#333}#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{position:relative;background-color:#111}.folded #adminmenu li.menu-top:hover,.folded #adminmenu li.opensub>a.menu-top,.folded #adminmenu li>a.menu-top:focus{z-index:10000}#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu .wp-menu-arrow,#adminmenu .wp-menu-arrow div,#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top,.folded #adminmenu li.wp-has-current-submenu{background:#0074a2;color:#fff}.folded #adminmenu .opensub .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu.sub-open,.folded #adminmenu .wp-has-current-submenu a.menu-top:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu.opensub .wp-submenu,.folded #adminmenu .wp-submenu.sub-open,.folded #adminmenu a.menu-top:focus+.wp-submenu,.no-js.folded #adminmenu .wp-has-submenu:hover .wp-submenu{top:0;right:36px}.folded #adminmenu .wp-has-current-submenu .wp-submenu,.folded #adminmenu a.wp-has-current-submenu:focus+.wp-submenu{position:absolute;top:-1000em}#adminmenu .wp-not-current-submenu .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{min-width:160px;width:auto}#adminmenu .wp-submenu a{font-size:13px;line-height:1.2;margin:0;padding:6px 0}#adminmenu .opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current,#adminmenu .wp-submenu li.current a,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-not-current-submenu li>a,.folded #adminmenu .wp-has-current-submenu li>a{padding-left:16px;padding-right:14px;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#adminmenu .wp-has-current-submenu ul>li>a,.folded #adminmenu li.menu-top .wp-submenu>li>a{padding:6px 12px}#adminmenu .wp-submenu-head,#adminmenu a.menu-top{font-size:14px;font-weight:400;line-height:18px;padding:0}#adminmenu .wp-submenu-head,.folded #adminmenu .wp-menu-name{display:none}.folded #adminmenu .wp-submenu-head{display:block}#adminmenu .wp-submenu li{padding:0;margin:0;overflow:hidden}#adminmenu .wp-menu-image img{padding:9px 0 0;opacity:.6;filter:alpha(opacity=60)}#adminmenu div.wp-menu-name{padding:8px 0}#adminmenu div.wp-menu-image{float:right;width:36px;height:34px;margin:0;text-align:center}#adminmenu div.wp-menu-image.svg{background-repeat:no-repeat;background-position:center;-webkit-background-size:20px auto;background-size:20px auto}div.wp-menu-image:before{color:#999;padding:7px 0;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#adminmenu div.wp-menu-image:before{color:#999}#adminmenu .current div.wp-menu-image:before,#adminmenu .wp-has-current-submenu div.wp-menu-image:before,#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu a.wp-has-current-submenu:hover div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu:hover div.wp-menu-image:before{color:#fff}#adminmenu li:hover div.wp-menu-image:before{color:#2ea2cc}.folded #adminmenu div.wp-menu-image{width:35px;height:30px;position:absolute;z-index:25}.folded #adminmenu a.menu-top{height:34px}.no-font-face #adminmenu .wp-menu-image{display:none}.no-font-face #adminmenu div.wp-menu-name{padding:8px 12px}.no-font-face.auto-fold #adminmenu .wp-menu-name{margin-right:0}.sticky-menu #adminmenuwrap{position:fixed;z-index:9999}.wp-menu-arrow{display:none!important}ul#adminmenu a.wp-has-current-submenu{position:relative}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{left:0;border:solid 8px transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;border-left-color:#f1f1f1;top:50%;margin-top:-8px}.folded ul#adminmenu li:hover a.wp-has-current-submenu:after{display:none}.folded ul#adminmenu a.wp-has-current-submenu:after,.folded ul#adminmenu>li a.current:after{border-width:4px;margin-top:-4px}#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after{left:0;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;border-width:8px;top:10px;z-index:10000}.folded ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after{border-width:4px;margin-top:-4px;top:18px}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-left-color:#333}#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:5px;padding:0;margin:0 0 6px;cursor:inherit}#adminmenu div.separator{height:2px;padding:0}#adminmenu .wp-submenu .wp-submenu-head{color:#fff;font-weight:400;font-size:14px;padding:8px 11px 8px 4px;margin:-7px 0 4px}#adminmenu li.current,.folded #adminmenu li.wp-menu-open{border:0 none}#adminmenu .awaiting-mod,#adminmenu .update-plugins,#sidemenu li a span.update-plugins{display:inline-block;background-color:#d54e21;color:#fff;font-size:9px;line-height:17px;font-weight:600;margin:1px 2px 0 0;vertical-align:top;-webkit-border-radius:10px;border-radius:10px;z-index:26}#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 a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod{background-color:#2ea2cc;color:#fff}#adminmenu li span.count-0,#sidemenu li a .count-0{display:none}#collapse-menu{font-size:13px;line-height:34px;margin-top:10px;color:#aaa;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#collapse-menu:hover,#collapse-menu:hover #collapse-button div:after{color:#2ea2cc}.folded #collapse-menu span{display:none}#collapse-button,#collapse-button div{width:15px;height:15px}#collapse-button{float:right;height:15px;margin:10px 11px 10px 8px;width:15px;-webkit-border-radius:10px;border-radius:10px}#wpwrap #collapse-button div{padding:0}#collapse-button div:after{content:'\f148';display:block;line-height:15px;right:-3px;top:-3px;color:#aaa;font:400 20px/1 dashicons!important;speak:none;margin:0 auto;padding:0!important;position:relative;text-align:center;width:20px;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.folded #collapse-button div:after,.rtl #collapse-button div:after{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.rtl.folded #collapse-button div:after{-webkit-transform:none;-ms-transform:none;transform:none}li#wp-admin-bar-menu-toggle{display:none}@media only screen and (max-width:900px){.auto-fold #wpcontent,.auto-fold #wpfooter{margin-right:56px}.auto-fold #adminmenu,.auto-fold #adminmenu li.menu-top,.auto-fold #adminmenuback,.auto-fold #adminmenuwrap{width:36px}.auto-fold #adminmenu .opensub .wp-submenu,.auto-fold #adminmenu .wp-has-current-submenu .wp-submenu.sub-open,.auto-fold #adminmenu .wp-has-current-submenu a.menu-top:focus+.wp-submenu,.auto-fold #adminmenu .wp-has-current-submenu.opensub .wp-submenu,.auto-fold #adminmenu .wp-submenu.sub-open,.auto-fold #adminmenu a.menu-top:focus+.wp-submenu{top:0;right:36px}.auto-fold #adminmenu .wp-has-current-submenu .wp-submenu,.auto-fold #adminmenu a.wp-has-current-submenu:focus+.wp-submenu{position:absolute;top:-1000em;margin-left:-1px;padding:7px 0 8px;z-index:9999}.auto-fold #adminmenu .wp-has-current-submenu .wp-submenu{min-width:150px;width:auto}.auto-fold #adminmenu .wp-has-current-submenu li>a{padding-left:16px;padding-right:14px}.auto-fold #adminmenu li.menu-top .wp-submenu>li>a{padding-right:12px}.auto-fold #adminmenu .wp-menu-name{display:none}.auto-fold #adminmenu .wp-submenu-head{display:block}.auto-fold #adminmenu div.wp-menu-image{height:30px;width:34px;position:absolute;z-index:25}.auto-fold #adminmenu a.menu-top{height:34px}.auto-fold #adminmenu li.wp-menu-open{border:0 none}.auto-fold #adminmenu .wp-has-current-submenu.menu-top-last{margin-bottom:0}.auto-fold ul#adminmenu li:hover a.wp-has-current-submenu:after{display:none}.auto-fold ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after{border-width:4px;margin-top:-4px;top:16px}.auto-fold ul#adminmenu a.wp-has-current-submenu:after,.auto-fold ul#adminmenu>li a.current:after{border-width:4px;margin-top:-4px}.auto-fold #adminmenu li.menu-top:hover,.auto-fold #adminmenu li.opensub>a.menu-top,.auto-fold #adminmenu li>a.menu-top:focus{z-index:10000}.auto-fold #collapse-menu span{display:none}.auto-fold #collapse-button div{background:0 0}.auto-fold #collapse-button div:after{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.rtl.auto-fold #collapse-button div:after{-webkit-transform:none;-ms-transform:none;transform:none}}@media screen and (max-width:782px){.auto-fold #wpcontent{position:relative;margin-right:0;padding-right:10px}.sticky-menu #adminmenuwrap{position:relative;z-index:auto;top:0}.auto-fold #adminmenu,.auto-fold #adminmenuback,.auto-fold #adminmenuwrap{position:absolute;width:190px;z-index:100}.auto-fold #adminmenuback,.auto-fold #adminmenuwrap{display:none}.auto-fold .wp-responsive-open #adminmenuback,.auto-fold .wp-responsive-open #adminmenuwrap{display:block}.auto-fold #adminmenu li.menu-top{width:100%}.auto-fold #adminmenu li a{font-size:16px;padding:5px}.auto-fold #adminmenu li.menu-top .wp-submenu>li>a{padding:10px 20px 10px 10px}.auto-fold #adminmenu .wp-menu-name{display:block;margin-right:35px}.auto-fold ul#adminmenu a.wp-has-current-submenu:after,.auto-fold ul#adminmenu>li.current>a.current:after{border-width:8px;margin-top:-8px}.auto-fold ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after{display:none}#adminmenu .wp-submenu{position:relative;display:none}.auto-fold #adminmenu .selected .wp-submenu,.auto-fold #adminmenu .wp-menu-open .wp-submenu{position:relative;display:block;top:0;right:-1px;-webkit-box-shadow:none;box-shadow:none}.auto-fold #adminmenu .opensub .wp-submenu,.auto-fold #adminmenu .selected .wp-submenu:after,.auto-fold #adminmenu .wp-menu-open .wp-submenu:after{display:none}.auto-fold #adminmenu .selected .wp-submenu,.auto-fold ul#adminmenu li:hover a.wp-has-current-submenu:after{display:block}.auto-fold #adminmenu .wp-has-current-submenu a.menu-top:focus+.wp-submenu,.auto-fold #adminmenu a.menu-top:focus+.wp-submenu{position:relative;right:-1px;left:0;top:0}#adminmenu .wp-submenu .wp-submenu-head{display:none}#wp-responsive-toggle{position:fixed;top:5px;right:4px;padding-left:10px;z-index:99999;border:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wpadminbar #wp-admin-bar-menu-toggle a{display:block;padding:0;overflow:hidden;outline:0;text-decoration:none;border:1px solid transparent;background:0 0;height:44px;margin-right:-1px}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#333}li#wp-admin-bar-menu-toggle{display:block}#wpadminbar #wp-admin-bar-menu-toggle a:hover{border:1px solid transparent}#wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{content:'\f228';display:inline-block;float:right;font:400 40px/45px Dashicons;vertical-align:middle;outline:0;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;height:44px;width:50px;padding:0;border:0;text-align:center;text-decoration:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}}@media screen and (max-width:600px){#adminmenuback,#adminmenuwrap{display:none}.wp-responsive-open #adminmenuback,.wp-responsive-open #adminmenuwrap{display:block}.auto-fold #adminmenu{top:46px}}#wpbody-content #dashboard-widgets.columns-1 .postbox-container{width:100%}#wpbody-content #dashboard-widgets.columns-2 .postbox-container{width:49.5%}#wpbody-content #dashboard-widgets.columns-2 #postbox-container-2,#wpbody-content #dashboard-widgets.columns-2 #postbox-container-3,#wpbody-content #dashboard-widgets.columns-2 #postbox-container-4{float:left;width:50.5%}#wpbody-content #dashboard-widgets.columns-3 .postbox-container{width:33.5%}#wpbody-content #dashboard-widgets.columns-3 #postbox-container-1{width:33%}#wpbody-content #dashboard-widgets.columns-3 #postbox-container-3,#wpbody-content #dashboard-widgets.columns-3 #postbox-container-4{float:left}#dashboard-widgets .postbox-container,#wpbody-content #dashboard-widgets.columns-4 .postbox-container{width:25%}#dashboard-widgets-wrap .columns-3 #postbox-container-4 .empty-container{border:0!important}.ie8 #wpbody-content #dashboard-widgets .postbox-container{width:49.5%}.ie8 #wpbody-content #dashboard-widgets #postbox-container-2,.ie8 #wpbody-content #dashboard-widgets #postbox-container-3,.ie8 #wpbody-content #dashboard-widgets #postbox-container-4{float:left;width:50.5%}.ie8 #dashboard-widgets #postbox-container-3 .empty-container,.ie8 #dashboard-widgets #postbox-container-4 .empty-container{border:0 none;height:0;min-height:0}#dashboard-widgets-wrap{overflow:hidden;margin:0 -8px}#dashboard-widgets .postbox .inside{margin-bottom:0}#dashboard-widgets .meta-box-sortables{margin:0 8px;min-height:100px}h3.dashboard-widget-title,h3.dashboard-widget-title small,h3.dashboard-widget-title span{color:#333}h3.dashboard-widget-title small a{color:#d7d7d7}h3.dashboard-widget-title small a:hover{color:#fff}#the-comment-list td.comment p.comment-author{margin-top:0;margin-right:0}#the-comment-list p.comment-author img{float:right;margin-left: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}#the-comment-list td.comment img{max-width:100%}.welcome-panel{position:relative;overflow:auto;margin:16px 0;padding:23px 10px 0;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fff;font-size:13px;line-height:2.1em}.welcome-panel h3{margin:0;font-size:21px;font-weight:400;line-height:1.2}.welcome-panel h4{margin:1.33em 0 0;font-size:16px}.welcome-panel li{font-size:14px}.welcome-panel p{color:#777}.welcome-panel a{text-decoration:none}.welcome-panel .about-description{font-size:16px;margin:0}.welcome-panel .welcome-panel-close{position:absolute;top:5px;left:10px;padding:20px 3px 0 15px;font-size:13px;text-decoration:none;line-height:1}#welcome-panel.welcome-panel .welcome-panel-close::before{position:absolute;right:-18px;margin-top:-2px;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.wp-core-ui .welcome-panel .button.button-hero{margin:15px 0 3px}.welcome-panel-content{margin-right:13px;max-width:1500px}.welcome-panel .welcome-panel-column-container{clear:both;overflow:hidden;position:relative}.welcome-panel .welcome-panel-column{width:32%;min-width:200px;float:right}.ie8 .welcome-panel .welcome-panel-column{min-width:230px}.welcome-panel .welcome-panel-column:first-child{width:36%}.welcome-panel-column p.hide-if-no-customize{margin-top:10px}.welcome-panel-column p{margin-top:7px;color:#464646}.welcome-panel .welcome-icon{display:block;padding:0 0 8px;background:transparent!important}.welcome-panel .welcome-icon:before{color:#888;font:400 20px/1 dashicons;speak:none;display:inline-block;padding:0 0 0 10px;top:-1px;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;vertical-align:top}.welcome-panel .welcome-edit-page:before,.welcome-panel .welcome-write-blog:before{content:'\f119';top:-3px}.welcome-panel .welcome-add-page:before{content:'\f132'}.welcome-panel .welcome-view-site:before{content:'\f115';top:-2px}.welcome-panel .welcome-widgets-menus:before{content:'\f116';top:-2px}.welcome-panel .welcome-comments:before{content:'\f117';top:-1px}.welcome-panel .welcome-learn-more:before{content:'\f118';top:-1px}.welcome-panel .welcome-widgets-menus{line-height:16px}.welcome-panel .welcome-panel-column ul{margin:.8em 0 1em 1em}.welcome-panel .welcome-panel-column li{line-height:16px;list-style-type:none}#dashboard_primary .inside{margin:0;padding:0}#dashboard_primary .dashboard-widget-control-form,#dashboard_primary .widget-loading{padding:12px 12px 0}body #dashboard-widgets .postbox form .submit{margin:0}.dashboard-widget-control-form{overflow:hidden}.dashboard-widget-control-form p{margin-top:0}div.dashboard-widget-error{background-color:#c43}div.dashboard-widget-notice{background-color:#cfe1ef}.rssSummary{color:#777;margin-top:4px}#dashboard_primary .rss-widget{border-bottom:1px solid #eee;font-size:13px;padding:8px 12px 10px}#dashboard_primary .rss-widget:last-child{border-bottom:0;padding-bottom:8px}#dashboard_primary .rss-widget a{font-weight:400}#dashboard_primary .rss-widget span,#dashboard_primary .rss-widget span.rss-date{color:#777}#dashboard_primary .rss-widget span.rss-date{margin-right:12px}#dashboard_primary .rss-widget ul li{margin-bottom:8px}#dashboard_right_now ul{margin:0;overflow:hidden}#dashboard_right_now li{width:50%;float:right;margin-bottom:10px}#dashboard_right_now .inside{overflow:hidden;padding:0}#dashboard_right_now .main{overflow:hidden;padding:0 12px 11px}#dashboard_right_now .main p{margin:0}#dashboard_right_now #wp-version-message .button{clear:left;float:left;position:relative;top:-5px}.mu-storage{overflow:hidden}#dashboard-widgets h4.mu-storage{margin-bottom:10px}#dashboard_right_now li a:before,#dashboard_right_now li span:before{color:#888}#dashboard_right_now .sub{color:#777;background:#f5f5f5;border-top:1px solid #eee;padding:10px 12px 6px}#dashboard_right_now .sub h4{color:#555}#dashboard_right_now .sub p{margin:0 0 1em}#dashboard_right_now .warning a:before,#dashboard_right_now .warning span:before{color:#d54e21}#dashboard_right_now li a:before,#dashboard_right_now li span:before{content:'\f159';font:400 20px/1 dashicons;speak:none;display:block;float:right;margin:0 0 0 5px;padding:0;text-indent:0;text-align:center;position:relative;-webkit-font-smoothing:antialiased;text-decoration:none!important}#dashboard_right_now .page-count a:before,#dashboard_right_now .page-count span:before{content:'\f105'}#dashboard_right_now .post-count a:before,#dashboard_right_now .post-count span:before{content:'\f109'}#dashboard_right_now .comment-count a:before{content:'\f101'}#dashboard_right_now .comment-mod-count a:before{content:'\f125'}#dashboard_right_now .storage-count a:before{content:'\f104'}#dashboard_right_now .storage-count.warning a:before{content:'\f153'}#dashboard_quick_press .inside{margin:0;padding:0}#dashboard_quick_press div.updated{margin-bottom:10px;border:1px solid #eee;border-width:1px 0 1px 1px}#dashboard_quick_press form{overflow:hidden;margin:12px}#dashboard_quick_press .drafts,#dashboard_quick_press .easy-blogging{padding:10px 0 0}input#save-post{float:right}form.initial-form.quickpress-open label.prompt{font-style:normal}form.initial-form.quickpress-open input#title{height:auto}#dashboard_quick_press input,#dashboard_quick_press textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0}#dashboard_quick_press textarea{resize:vertical}#description-wrap{margin-top:12px}#title-wrap #title-prompt-text,.textarea-wrap #content-prompt-text{color:#777}.input-text-wrap,.textarea-wrap{position:relative}.input-text-wrap .prompt,.textarea-wrap .prompt{position:absolute}.textarea-wrap #content-prompt-text{font-size:1.1em;padding:7px 8px}.textarea-wrap textarea#content{margin:0 0 8px;padding:6px 7px}#quick-press textarea#content{min-height:90px;max-height:1300px;resize:none}.js #dashboard_quick_press .drafts{border-top:1px solid #eee}#dashboard_quick_press .drafts abbr{border:0}#dashboard_quick_press .drafts h4{margin:0 12px 8px;font-weight:400}#dashboard_quick_press .drafts .view-all{float:left;margin:0 0 0 12px}#dashboard_primary a.rsswidget{font-weight:400}#dashboard_quick_press .drafts ul{margin:0 12px}#dashboard_quick_press .drafts li{margin-bottom:1em}#dashboard_quick_press .drafts li time{color:#777}#dashboard_quick_press .drafts p{margin:0;word-wrap:break-word}#dashboard_quick_press .draft-title{overflow:hidden}#dashboard_quick_press .draft-title a,#dashboard_quick_press .draft-title time{float:right;margin:0 0 0 5px}#dashboard-widgets #dashboard_activity h4{margin:0 12px 8px 0;font-weight:400}#dashboard-widgets #dashboard_activity h4.comment-meta{margin:0}#dashboard_activity h4.comment-meta{margin-bottom:4px}#dashboard_activity ul{padding:0 12px}#dashboard_activity .comment-meta span.approve:before{content:'\f227';font:20px/.5 dashicons;margin-right:12px;vertical-align:middle;position:relative;top:-1px;margin-left:2px}#dashboard_activity .inside{padding:0;margin:0}#dashboard_activity .no-activity{overflow:hidden;padding:0 12px 12px;text-align:center}#dashboard_activity .no-activity p{color:#999;font-size:16px}#dashboard_activity .no-activity .smiley{margin-top:0}#dashboard_activity .no-activity .smiley:before{content:'\f328';font:400 120px/1 dashicons;speak:none;display:block;margin:0 0 0 5px;padding:0;text-indent:0;text-align:center;position:relative;-webkit-font-smoothing:antialiased;text-decoration:none!important}#dashboard_activity .subsubsub{float:none;border-top:1px solid #eee;margin-top:0;padding:8px 12px 4px}#future-posts ul,#published-posts ul{clear:both;margin-bottom:0}#future-posts li,#published-posts li{overflow:hidden;margin-bottom:8px}#future-posts ul span,#published-posts ul span{color:#777;float:right;margin-left:8px;min-width:150px}.activity-block{border-bottom:1px solid #eee;overflow:hidden;padding:8px 0 4px}.activity-block:last-child{border-bottom:0}.activity-block .subsubsub li{color:#ddd}#activity-widget #the-comment-list div.undo,#activity-widget #the-comment-list tr.undo{background:0 0;padding:6px 0}#activity-widget #the-comment-list .alt,#activity-widget #the-comment-list .alternate{background:0 0}#activity-widget #the-comment-list .comment-item{background:#fafafa;padding:12px;position:relative}#activity-widget #the-comment-list img{position:absolute;right:13px;top:13px}#activity-widget #the-comment-list .dashboard-comment-wrap{padding-right:63px}#activity-widget #the-comment-list .dashboard-comment-wrap blockquote{margin:1em 0}#activity-widget #the-comment-list .comment-item h4{font-size:13px;color:#999}#activity-widget #the-comment-list .comment-item p.row-actions{margin:4px 0 0}#activity-widget #the-comment-list .comment-item:first-child{border-top:1px solid #eee}#activity-widget #the-comment-list .unapproved{background-color:#fef7f1}#activity-widget #the-comment-list .unapproved:before{content:"";display:block;position:absolute;right:0;top:0;bottom:0;background:#d54e21;width:4px}#activity-widget #the-comment-list .spam-undo-inside .avatar,#activity-widget #the-comment-list .trash-undo-inside .avatar{margin-left:20px;position:relative;top:0}#dashboard-widgets #dashboard_browser_nag.postbox .inside{margin:10px}.edit-box{display:none}h3:hover .edit-box{display:inline}#dashboard-widgets form .input-text-wrap input,#dashboard-widgets form .textarea-wrap textarea{width:100%}#dashboard-widgets .postbox form .submit{float:none;margin:.5em 0 0;padding:0;border: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;left:10px;padding:0;top:5px}.js #dashboard-widgets h3 .postbox-title-action{left:33px}#dashboard-widgets h4{color:#222;font-weight:400;font-size:14px;margin:0 0 .2em;padding:0}#dashboard_plugins h5{font-size:14px}#latest-comments #the-comment-list{position:relative}#activity-widget #the-comment-list .comment{-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.06);box-shadow:inset 0 1px 0 rgba(0,0,0,.06)}#activity-widget .comments #the-comment-list .alt{background-color:transparent}#activity-widget #latest-comments #the-comment-list .comment-item{padding:1em 12px}#latest-comments #the-comment-list .pingback{padding-right:12px!important}#latest-comments #the-comment-list .comment-item:first-child{border-top:0}#latest-comments #the-comment-list .comment-item h4{line-height:1.5em;margin-top:0;color:#666}#latest-comments #the-comment-list .comment-item h4 cite{font-style:normal;font-weight:400}#latest-comments #the-comment-list .comment-item blockquote,#latest-comments #the-comment-list .comment-item blockquote p{margin:0;padding:0;display:inline}#latest-comments #the-comment-list .comment-item p.row-actions{margin:3px 0 0;padding:0;font-size:13px}#title-wrap label{cursor:text}#title-wrap #title{padding:2px 6px;font-size:1.3em;line-height:100%;outline:0}#title-wrap #title-prompt-text{font-size:1.1em;padding:5px 8px}.rss-widget ul{margin:0;padding:0;list-style:none}a.rsswidget{font-size:14px;font-weight:600;line-height:1.7em}.rss-widget ul li{line-height:1.5em;margin-bottom:12px}.rss-widget span.rss-date{color:#999;font-size:13px;margin-right:3px}.rss-widget cite{display:block;text-align:left;margin:0 0 1em;padding:0}.rss-widget cite:before{content:'\2014'}.dashboard-comment-wrap{overflow:hidden;word-wrap:break-word}#dashboard_browser_nag a.update-browser-link{font-size:1.2em;font-weight:600}#dashboard_browser_nag a{text-decoration:underline}#dashboard_browser_nag p.browser-update-nag.has-browser-icon{padding-left: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;color:#fff;-webkit-box-shadow:none;box-shadow:none}#dashboard_browser_nag.postbox.browser-insecure h3{border-bottom-color:#cd5a5a;color:#fff}#dashboard_browser_nag.postbox h3{border-bottom-color:#f6e2ac;background:transparent none;color:#fff;-webkit-box-shadow:none;box-shadow:none}#dashboard_browser_nag a{color:#fff}#dashboard_browser_nag h3.hndle{border:0;font-weight:600;font-size:20px;padding-top:10px}.postbox#dashboard_browser_nag p a.dismiss{font-size:14px}.postbox#dashboard_browser_nag a,.postbox#dashboard_browser_nag p,.postbox#dashboard_browser_nag p.browser-update-nag{font-size:16px}@media only screen and (max-width:799px){#wpbody-content #dashboard-widgets .postbox-container{width:100%}}@media only screen and (min-width:800px) and (max-width:1499px){#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:left;width:50.5%}#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 .columns-prefs,.index-php .screen-layout{display:block}.columns-prefs .columns-prefs-3,.columns-prefs .columns-prefs-4{display:none}}@media only screen and (min-width:1500px) and (max-width:1800px){#wpbody-content #dashboard-widgets .postbox-container{width:33.5%}#wpbody-content #dashboard-widgets #postbox-container-1{width:33%}#wpbody-content #dashboard-widgets #postbox-container-3,#wpbody-content #dashboard-widgets #postbox-container-4{float:left}#dashboard-widgets #postbox-container-4 .empty-container{border:0 none;height:0;min-height:0}}@media screen and (max-width:870px){.welcome-panel .welcome-panel-column,.welcome-panel .welcome-panel-column:first-child{display:block;float:none;width:100%}.welcome-panel .welcome-panel-column li{display:inline-block;margin-left:13px}.welcome-panel .welcome-panel-column ul{margin:.4em 0 0}}@media screen and (max-width:782px){#dashboard_recent_comments #the-comment-list .comment-item .avatar{height:30px;width:30px;margin:4px 0 5px 10px}}@media screen and (max-width:600px){.welcome-panel .welcome-panel-close{overflow:hidden;text-indent:100%;white-space:nowrap;width:20px;height:20px;left:0;padding:5px}#welcome-panel.welcome-panel .welcome-panel-close::before{font-size:20px;margin:0}}.post-com-count-wrapper{min-width:22px}.post-com-count{background:0 0;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;color:#fff}.post-com-count:after{content:"";display:block;width:0;height:0;margin-right:8px;border-top:5px solid #bbb;border-left:5px solid transparent}.post-com-count span{font-size:11px;font-weight:600;height:1.4em;line-height:1.4em;min-width:.7em;padding:0 6px;display:inline-block;-webkit-border-radius:5px;border-radius:5px;background-color:#bbb;color:#fff}.post-com-count:hover{background-position:center -3px}.post-com-count:hover span{background-color:#2ea2cc}.post-com-count:hover:after{border-top:5px solid #2ea2cc}strong .post-com-count{background-position:center -55px}strong .post-com-count span{background-color:#0074a2}strong .post-com-count:after{border-top:5px solid #0074a2}.column-response .post-com-count{float:right;margin-left:5px;text-align:center}.response-links{float:right}.commentlist li{padding:1em 1em .2em;margin:0;border-bottom:1px solid #ccc}.commentlist li li{border-bottom:0;padding:0}.commentlist p{padding:0;margin:0 0 .8em}#submitted-on,.submitted-on{color:#777}#replyrow td{padding:2px}#replysubmit{margin:0;padding:0 5px 3px;text-align:center}#replysubmit .spinner{padding:2px 0 0;vertical-align:top;float:left}#replysubmit .button{margin-left:5px}#replysubmit .error{color:red;line-height:21px;text-align:center}#replyrow h5{margin:.2em 0 0;padding:0 5px;line-height:1.4em;font-size:1em}#edithead .inside{float:right;padding:3px 5px 2px 0;margin:0;text-align:center}#edithead .inside input{width:180px}#edithead label{padding:2px 0}#replycontainer{padding:5px}#replycontent{height:120px;-webkit-box-shadow:none;box-shadow:none}#replyerror{border-color:#ddd;background-color:#f9f9f9}.commentlist .avatar{vertical-align:text-top}#the-comment-list .attachment-80x60{padding:4px 8px}#the-comment-list div.undo,#the-comment-list tr.undo{background-color:#f4f4f4}#the-comment-list .unapproved td,#the-comment-list .unapproved th{background-color:#fef7f1}#the-comment-list .unapproved th.check-column{border-right:4px solid #d54e21}#the-comment-list .unapproved th.check-column input{margin-right:4px}#the-comment-list .approve a{color:#006505}#the-comment-list .unapprove a{color:#d98500}#the-comment-list td,#the-comment-list th{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}#the-comment-list tr:last-child td,#the-comment-list tr:last-child th{-webkit-box-shadow:none;box-shadow:none}#the-comment-list tr.unapproved+tr.approved td,#the-comment-list tr.unapproved+tr.approved th{border-top:1px solid rgba(0,0,0,.03)}.vim-current,.vim-current td,.vim-current th{background-color:#e4f2fd!important}th .comment-grey-bubble{height:16px;width:16px}th .comment-grey-bubble:before{content:'\f101';font:400 20px/.5 dashicons;speak:none;display:inline-block;padding:0;top:4px;right:-4px;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#444}table.fixed{table-layout:fixed}.fixed .column-rating,.fixed .column-visible{width:8%}.fixed .column-author,.fixed .column-date,.fixed .column-format,.fixed .column-links,.fixed .column-parent,.fixed .column-posts{width:10%}.fixed .column-comment .comment-author{display:none}.fixed .column-categories,.fixed .column-rel,.fixed .column-response,.fixed .column-role,.fixed .column-tags{width:15%}.fixed .column-slug{width:25%}.fixed .column-locations{width:35%}.fixed .column-comments{width:4em;padding:8px 0;text-align:right}.fixed .column-comments .vers{padding-right:3px}.fixed .column-comments a{float:right}.fixed .column-icon{width:80px}.wp-list-table a{-webkit-transition:none;transition:none}#the-list tr:last-child td,#the-list tr:last-child th{border-bottom:0!important;-webkit-box-shadow:none;box-shadow:none}#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 .comments-box{border:0 none}#commentsdiv .comments-box thead th{background:0 0;padding:0 7px 4px;font-style:italic}#commentsdiv .comments-box tr:last-child td{border-bottom:0 none}#commentsdiv .spinner{padding-right:5px}.sorting-indicator{display:none;width:10px;height:4px;margin-top:8px;margin-right:7px}.sorting-indicator:before{background:0 0;content:'\f142';font:400 20px/1 dashicons;speak:none;display:inline-block;padding:0;top:-4px;right:-8px;line-height:10px;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#444}.column-comments .sorting-indicator:before{top:0;right:-10px}th.desc:hover span.sorting-indicator:before,th.sorted.asc .sorting-indicator:before{content:'\f142'}th.asc:hover span.sorting-indicator:before,th.sorted.desc .sorting-indicator:before{content:'\f140'}tr.wp-locked .locked-indicator{margin-right:6px;height:20px;width:16px}tr.wp-locked .locked-indicator:before{color:#888;content:'\f160';display:inline-block;float:right;font:400 20px/1 dashicons;speak:none;vertical-align:middle;margin-right:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}tr.wp-locked .check-column input[type=checkbox],tr.wp-locked .check-column label,tr.wp-locked .row-actions .inline,tr.wp-locked .row-actions .trash{display:none}tr .locked-info{height:0;opacity:0}tr.wp-locked .locked-info{margin-top:8px;height:auto;opacity:1}.locked-text{vertical-align:top}tr.locked-info,tr.wp-locked .locked-info{-webkit-transition:height 1s,opacity .5s;transition:height 1s,opacity .5s}.fixed .column-comments .sorting-indicator{margin-top:3px}#menu-locations-wrap .widefat{width:60%}.widefat th.sortable,.widefat th.sorted{padding:0}th.sortable a,th.sorted a{display:block;overflow:hidden;padding:7px 10px 8px 7px}th.manage-column a,th.sortable a:active,th.sortable a:focus,th.sortable a:hover{color:#333}th.sortable a:focus{background:#e1e1e1}.fixed .column-comments.sortable a,.fixed .column-comments.sorted a{padding:8px 0}th.sortable a span,th.sorted a span{float:right;cursor:pointer}th.desc:hover span.sorting-indicator,th.sorted.asc .sorting-indicator{display:block;background-position:0 0}th.asc:hover span.sorting-indicator,th.sorted.desc .sorting-indicator{display:block;background-position:-7px 0}.tablenav-pages a{font-weight:600;margin-left:1px;padding:0 2px}.tablenav-pages .current-page{padding-top:0;text-align:center}.tablenav-pages .next-page{margin-right:2px}.tablenav a.button-secondary{display:block;margin:3px 0 0 8px}.tablenav{clear:both;height:30px;margin:6px 0 4px;vertical-align:middle}.tablenav.themes{max-width:98%}.tablenav .tablenav-pages{float:left;display:block;cursor:default;height:30px;color:#555;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{padding:0 10px 3px;background:#eee;background:rgba(0,0,0,.05);font-size:16px;font-weight:400}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover{color:#fff;background:#2ea2cc}.tablenav .tablenav-pages a.disabled,.tablenav .tablenav-pages a.disabled:active,.tablenav .tablenav-pages a.disabled:focus,.tablenav .tablenav-pages a.disabled:hover{color:#aaa;background:#eee;background:rgba(0,0,0,.05)}.tablenav .displaying-num{margin-left:2px;color:#777;font-size:12px;font-style:italic}.tablenav .actions{overflow:hidden;padding:2px 0 0 8px}.tablenav .delete{margin-left:20px}.tablenav .dots{border-color:transparent}.tablenav .next,.tablenav .prev{border-color:transparent;color:#0074a2}.tablenav .next:hover,.tablenav .prev:hover{border-color:transparent;color:#2ea2cc}.view-switch{float:left;margin:5px 8px 0 16px}.view-switch img{display:none}.view-switch a{text-decoration:none}.view-switch>a{display:inline-block;width:18px;height:18px}.view-switch>a:before{color:#bbb;content:'\f163';display:inline-block;float:right;font:400 20px/1 dashicons;speak:none;vertical-align:middle;margin-right:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.view-switch a:hover:before{color:#727272}.view-switch a.current:before{color:#0074a2}.view-switch>a+a:before{margin-right:5px;content:'\f164'}.filter{float:right;margin:-5px 10px 0 0}.filter .subsubsub{margin-right:-10px;margin-top:13px}.screen-per-page{width:4em}#posts-filter fieldset{float:right;margin:0 0 1em 1.5ex;padding:0}#posts-filter fieldset legend{padding:0 1px .2em 0}p.pagenav{margin:0;display:inline}.pagenav span{font-weight:600;margin:0 6px}.row-title{font-size:14px!important;font-weight:600}.column-comment .comment-author{margin-bottom:.6em}.column-author img,.column-comment .comment-author img,.column-username img{float:right;margin-left:10px;margin-top:1px}.row-actions{color:#ddd;font-size:13px;visibility:hidden;padding:2px 0 0}.mobile .row-actions,.row-actions.visible,div.comment-item:hover .row-actions,tr:hover .row-actions{visibility:visible}.row-actions-visible{padding:2px 0 0}#wpbody-content .inline-edit-row fieldset{font-size:12px;float:right;margin:0;padding:0;width:100%}#wpbody-content .inline-edit-row fieldset .inline-edit-col,tr.inline-edit-row td{padding:0 .5em}#wpbody-content .quick-edit-row-page fieldset.inline-edit-col-right .inline-edit-col{border-width:0 1px 0 0;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 .bulk-edit-row-post .inline-edit-col-right,#wpbody-content .quick-edit-row-page .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:left;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.checkbox-title,.inline-edit-row fieldset span.title{margin:0;padding:0}.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;width:auto}.inline-edit-row fieldset label span.title{display:block;float:right;width:5em}.inline-edit-row fieldset label span.input-text-wrap{display:block;margin-right:5em}.quick-edit-row-post fieldset.inline-edit-col-right label span.title{width:auto;padding-left:.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-left:.5em}.inline-edit-col-right .input-text-wrap input.inline-edit-menu-order-input{width:6em}.inline-edit-save .spinner{padding:4px 10px 0;vertical-align:top;float:left}.inline-edit-row h4{text-transform:uppercase}.inline-edit-row fieldset span.checkbox-title,.inline-edit-row fieldset span.title{font-style:italic;line-height:1.8em}.inline-edit-row fieldset .inline-edit-date{float:right}.inline-edit-row fieldset input[name=hh],.inline-edit-row fieldset input[name=jj],.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}ul.cat-checklist{height:12em;border:solid 1px #ddd;overflow-y:scroll;padding:0 5px;margin:0;background-color:#fff}#bulk-titles{display:block;height:12em;border:1px solid #ddd;overflow-y:scroll;padding:0 5px;margin:0 0 5px}.inline-edit-row fieldset ul.cat-checklist input,.inline-edit-row fieldset ul.cat-checklist li{margin:0;position:relative}.inline-edit-row #bulk-titles div,.inline-edit-row fieldset ul.cat-checklist label{font-style:normal;font-size:11px}.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%}.inline-edit-row #post_parent,.inline-edit-row select[name=page_template]{max-width:80%}.ie8 .inline-edit-row #post_parent,.ie8 .inline-edit-row select[name=page_template]{width:250px}.quick-edit-row-post fieldset label.inline-edit-status{float:right}#bulk-titles{line-height:140%}#bulk-titles div{margin:.2em .3em}#bulk-titles div a{cursor:pointer;display:block;float:right;height:18px;margin:0 -2px 0 3px;overflow:hidden;position:relative;width:20px}#bulk-titles div a:before{position:relative;top:-3px}.plugins tbody,.plugins tbody th.check-column{padding:8px 2px 0 0}.plugins tbody th.check-column input[type=checkbox]{margin-top:4px}#update-plugins-table tbody td p{margin-top:0}#update-plugins-table tbody td p strong{font-size:14px}.plugins .inactive th.check-column,.plugins tfoot th.check-column,.plugins thead th.check-column{padding-right:6px}#update-plugins-table tfoot th.check-column,#update-plugins-table thead th.check-column{padding-top:11px}.plugins,.plugins td,.plugins th{color:#000}.plugins tr{background:#fff}.plugins p{margin:0 4px;padding:0}.plugins .desc p{margin:0 0 8px}.plugins td.desc{line-height:1.5em}.plugins .desc ol,.plugins .desc ul{margin:0 2em 0 0}.plugins .desc ul{list-style-type:disc}.plugins .row-actions{font-size:13px}.plugins .active td,.plugins .active th,.plugins .inactive td,.plugins .inactive th{padding:10px 9px}.plugins .active td,.plugins .active th{background-color:#f7fcfe}.plugins .update td,.plugins .update th{border-bottom:0}.plugin-update-tr td{border-top:0}.plugin-install #the-list td,.plugins .active td,.plugins .active th,.plugins .inactive td,.plugins .inactive th,.upgrade .plugins td,.upgrade .plugins th{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}.plugins tr.active+tr.inactive td,.plugins tr.active+tr.inactive th,.plugins tr.active.plugin-update-tr+tr.inactive td,.plugins tr.active.plugin-update-tr+tr.inactive th{border-top:1px solid rgba(0,0,0,.03);-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.02),inset 0 -1px 0 #e1e1e1;box-shadow:inset 0 1px 0 rgba(0,0,0,.02),inset 0 -1px 0 #e1e1e1}.plugins .update td,.plugins .update th,.plugins tr.active+tr.inactive.update td,.plugins tr.active+tr.inactive.update th,.upgrade .plugins tr:last-of-type td,.upgrade .plugins tr:last-of-type th{-webkit-box-shadow:none;box-shadow:none}.plugins .active.update td,.plugins .active.update th,tr.active.update+tr.plugin-update-tr .plugin-update{background-color:#fef7f1}.plugins .active th.check-column{border-right:4px solid #2ea2cc}.plugins .active.update th.check-column,.plugins .active.update+.plugin-update-tr .plugin-update{border-right:4px solid #d54e21}#wpbody-content .plugins .plugin-title,#wpbody-content .plugins .theme-title{padding-left:12px;white-space:nowrap}.plugins .inactive .plugin-title strong{font-weight:400}.plugins .row-actions,.plugins .second{padding:0 0 5px}.plugins .update .row-actions,.plugins .update .second{padding-bottom:0}.plugins-php .widefat tfoot td,.plugins-php .widefat tfoot th{border-top-style:solid;border-top-width:1px}.plugin-update-tr .update-message{font-size:13px;font-weight:400;padding:6px 12px;margin:0 31px 8px 10px;background-color:#f7f7f7;background-color:rgba(0,0,0,.03)}.plugin-update-tr .update-message:before{color:#d54e21;content:'\f463';display:inline-block;font:400 20px/1 dashicons;speak:none;margin:0 -2px 0 8px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top}.plugins .plugin-update{padding:0;border:0;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}tr.active+tr.plugin-update-tr .plugin-update{background-color:#f7fcfe}tr.active+tr.plugin-update-tr .plugin-update .update-message{background-color:#fcf3ef}.plugin-install-php h4{margin:2.5em 0 8px}.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}@media screen and (max-width:782px){.tablenav{height:auto}.tablenav.top{margin:0}.tablenav.bottom{position:relative;margin-top:15px}.tablenav br{display:none}.tablenav br.clear{display:block}.tablenav.top .actions,.tablenav.top .displaying-num,.view-switch{display:none}.tablenav.bottom .displaying-num{position:absolute;left:0;top:10px;font-size:14px}.tablenav-pages{width:100%;text-align:center;margin:0 0 25px}.tablenav.bottom .tablenav-pages{margin-top:25px}.tablenav.top .tablenav-pages.one-page{display:none}.tablenav.bottom .tablenav-pages.one-page{margin:15px 0 0;height:0}.tablenav-pages .pagination-links .paging-input{font-size:18px}.tablenav-pages .pagination-links a{padding:8px 20px 11px;font-size:18px;background:rgba(0,0,0,.05)}.tablenav-pages .pagination-links .current-page{padding:10px;font-size:14px}.form-wrap>p{display:none}.comment-count{font-size:14px}.column-categories,.column-tags,.fixed .column-author,.fixed .column-date,.media .column-parent,.sites .column-registered,.sites .column-users,.tags .column-description,.users .column-email,.users .column-name{display:none}.fixed .column-comment .comment-author{display:block}.column-title{width:85%}.fixed .column-comments,.widefat .check-column{width:35px}.widefat tfoot .check-column,.widefat thead .check-column{padding:10px 0}.widefat *{word-wrap:normal}#wpbody-content .bulk-edit-row .inline-edit-col-bottom,#wpbody-content .bulk-edit-row .inline-edit-col-left,#wpbody-content .bulk-edit-row-page .inline-edit-col-right,#wpbody-content .bulk-edit-row-post .inline-edit-col-right,#wpbody-content .inline-edit-row-post .inline-edit-col-center,#wpbody-content .quick-edit-row-page .inline-edit-col-left,#wpbody-content .quick-edit-row-page .inline-edit-col-right,#wpbody-content .quick-edit-row-post .inline-edit-col-left,#wpbody-content .quick-edit-row-post .inline-edit-col-right{float:none;width:100%}#wpbody-content .bulk-edit-row fieldset .inline-edit-col label,#wpbody-content .bulk-edit-row fieldset .inline-edit-group label,#wpbody-content .quick-edit-row fieldset .inline-edit-col label,#wpbody-content .quick-edit-row fieldset .inline-edit-group label{max-width:none;float:none;margin-bottom:5px}#wpbody .bulk-edit-row fieldset select{display:block;width:100%;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.inline-edit-row #bulk-titles div,.inline-edit-row fieldset ul.cat-checklist label{font-size:16px}.inline-edit-row fieldset label span.title{float:none}.inline-edit-row fieldset label.inline-edit-tags{padding:0 .5em}.inline-edit-row fieldset .inline-edit-col label.inline-edit-tags{padding:0}.inline-edit-row fieldset label span.input-text-wrap{margin-right:0}.inline-edit-row fieldset input[name=hh],.inline-edit-row fieldset input[name=jj],.inline-edit-row fieldset input[name=mn]{width:3em}.inline-edit-row fieldset input[name=aa]{width:4.5em}#bulk-titles div{margin:.8em .3em}#bulk-titles div a{height:22px}.tags .column-posts{width:50px}.tags .column-slug{width:30%}.comments .column-response,.users .column-role{width:35%}.sites .column-blogname{width:55%}#wpbody-content #update-themes-table .plugin-title{width:auto}.link-manager-php #posts-filter{margin-top:25px}.link-manager-php .tablenav.bottom{overflow:hidden}.wp-list-table.plugins{position:relative;margin-top:35px;margin-bottom:50px}#wpbody-content .wp-list-table.plugins tfoot .column-description,.wp-list-table.plugins th#description,.wp-list-table.plugins thead .column-description{display:none}#wpbody-content .wp-list-table.plugins,#wpbody-content .wp-list-table.plugins .column-description,#wpbody-content .wp-list-table.plugins .manage-column.column-name,#wpbody-content .wp-list-table.plugins .plugin-title,#wpbody-content .wp-list-table.plugins .plugin-update,#wpbody-content .wp-list-table.plugins .theme-title,#wpbody-content .wp-list-table.plugins tbody,#wpbody-content .wp-list-table.plugins thead,#wpbody-content .wp-list-table.plugins tr{display:block;width:auto}.wp-list-table.plugins tfoot,.wp-list-table.plugins thead{position:absolute;top:-35px;right:0;left:0;width:auto;height:35px}.wp-list-table.plugins tfoot{bottom:-35px;top:auto}.active,.inactive{padding-top:0}.wp-list-table.plugins .plugin-title,.wp-list-table.plugins .theme-title{padding-top:13px;padding-bottom:4px}.plugins tr.active+tr.inactive td,.plugins tr.active+tr.inactive th.check-column,.wp-list-table.plugins .plugin-title,.wp-list-table.plugins .theme-title,.wp-list-table.plugins tbody th{-webkit-box-shadow:none;box-shadow:none}.plugins tbody{padding:1px 0 0}.plugins tr.active+tr.inactive td.column-description{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}.plugins tr.active+tr.inactive td,.plugins tr.active+tr.inactive th.check-column{border-top:0}.wp-list-table.plugins .column-description{padding-top:0}.wp-list-table.plugins .column-description,.wp-list-table.plugins .manage-column.column-name,.wp-list-table.plugins .plugin-title,.wp-list-table.plugins .theme-title{padding-left:12px;padding-right:46px}.wp-list-table.plugins tr{position:relative}.wp-list-table.plugins th.check-column,.wp-list-table.plugins tr.update th.check-column{position:absolute;height:auto;top:0;bottom:0;right:0;padding-right:2px;padding-top:18px}.wp-list-table.plugins tfoot th.check-column,.wp-list-table.plugins thead th.check-column{padding-right:3px;padding-top:11px;background:0 0}.widefat tbody th.check-column input[type=checkbox]{margin-top:-3px;margin-right:8px}.wp-list-table.plugins .active .check-column input,.wp-list-table.plugins .update .check-column input{margin-right:5px}.wp-list-table.plugins tfoot .check-column input,.wp-list-table.plugins thead .check-column input{margin-top:-6px}.wp-list-table.plugins .active th.check-column{background:0 0}.wp-list-table.plugins .plugin-title strong,.wp-list-table.plugins .theme-title strong{font-size:1.4em;line-height:1.6em}table.plugin-install .column-description,table.plugin-install .column-name,table.plugin-install .column-rating,table.plugin-install .column-version{display:block;width:auto}table.plugin-install th.column-description,table.plugin-install th.column-name,table.plugin-install th.column-rating,table.plugin-install th.column-version{display:none}table.plugin-install td.column-name strong{font-size:1.4em;line-height:1.6em}table.plugin-install #the-list td{-webkit-box-shadow:none;box-shadow:none}table.plugin-install #the-list tr{display:block;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}}#poststuff{padding-top:10px;min-width:763px}#poststuff #post-body{padding:0}#poststuff .postbox-container{width:100%}#poststuff #post-body.columns-2{margin-left:300px}#show-comments{overflow:hidden}#save-action .spinner,#show-comments .spinner,#show-comments a{float:right}#lost-connection-notice .spinner{display:block;float:right;margin:0 0 0 5px}#titlediv{position:relative;margin-bottom:10px}#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%;height:1.7em;width:100%;outline:0;margin:0;background-color:#fff}#titlediv #title-prompt-text{color:#777;position:absolute;font-size:1.7em;padding:11px 10px}#wp-fullscreen-save .fs-saved{color:#999;float:left;margin-top:4px}#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{line-height:24px;min-height:25px;margin-top:5px;padding:0 10px;color:#666}#edit-slug-box .cancel{margin-left:10px;font-size:11px}#editable-post-name-full{display:none}#editable-post-name{background-color:#fffbcc}#editable-post-name input{font-size:13px;height:22px;margin:0;width:16em}.postarea h3 label{float:right}.submitbox .submit{text-align:right;padding:12px 10px 10px;font-size:11px;background-color:#464646;color:#ccc}.submitbox .submitdelete{text-decoration:none;padding:1px 2px}#normal-sortables .submitbox .submitdelete:hover{color:#000;background-color:red;border-bottom-color:red}.submitbox .submit a:hover{text-decoration:underline}.submitbox .submit input{margin-bottom:8px;margin-left:4px;padding:6px}.inside-submitbox #post_status{margin:2px -2px 2px 0}#post-status-select{margin-top:3px}#post-body #normal-sortables{min-height:50px}.postbox{position:relative;min-width:255px;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fff}#trackback_url{width:99%}#normal-sortables .postbox .submit{background:transparent none;border:0 none;float:left;padding:0 12px;margin:0}.category-add input[type=text],.category-add select{width:100%;max-width:260px;vertical-align:baseline}#side-sortables .category-add input[type=text],#side-sortables .category-add select{margin:0 0 1em}#side-sortables .add-menu-item-tabs li,.wp-tab-bar li,ul.category-tabs li{display:inline;line-height:1.35em}.no-js .category-tabs li.hide-if-no-js{display:none}#side-sortables .add-menu-item-tabs a,.category-tabs a,.wp-tab-bar a{text-decoration:none}#post-body ul.add-menu-item-tabs li.tabs a,#post-body ul.category-tabs li.tabs a,#side-sortables .add-menu-item-tabs .tabs a,#side-sortables .category-tabs .tabs a,.wp-tab-bar .wp-tab-active a{color:#333}.category-tabs{margin:8px 0 5px}#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 .preview,#side-sortables .submitbox .submit a.preview:hover,#side-sortables .submitbox .submit input{border:0 none}#side-sortables .inside-submitbox .insidebox,.stuffbox .insidebox{margin:11px 0}ul.add-menu-item-tabs,ul.category-tabs,ul.wp-tab-bar{margin-top:12px}ul.add-menu-item-tabs li,ul.category-tabs li{border:solid 1px transparent;position:relative}.wp-tab-active,ul.add-menu-item-tabs li.tabs,ul.category-tabs li.tabs{border:1px solid #dfdfdf;border-bottom-color:#fdfdfd;background-color:#fdfdfd}ul.add-menu-item-tabs li,ul.category-tabs li,ul.wp-tab-bar li{padding:3px 5px 5px}#postimagediv .inside img{max-width:100%;height:auto}form#tags-filter{position:relative}td.plugin-title strong,td.post-title strong{display:block;margin-bottom:.2em;font-size:14px}td.plugin-title p,td.post-title p{margin:6px 0}.ui-tabs-hide,.wp-hidden-children .wp-hidden-child{display:none}#post-body .tagsdiv #newtag{margin-left:5px;width:16em}#side-sortables input#post_password{width:94%}#side-sortables .tagsdiv #newtag{width:68%}#post-status-info{width:100%;border-spacing:0;border:1px solid #e5e5e5;border-top:0;background-color:#f7f7f7;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04)}#post-status-info td{font-size:12px}.autosave-info{padding:2px;text-align:left}#editorcontent #post-status-info{border:0}#content-resize-handle{background:transparent url(../images/resize.gif) no-repeat scroll left bottom;width:12px;cursor:row-resize}.rtl #content-resize-handle{background:transparent url(../images/resize-rtl.gif) no-repeat scroll right bottom}#wp-word-count{display:block;padding:2px 10px}#timestampdiv select{height:21px;line-height:14px;padding:0;vertical-align:top;font-size:12px}#aa,#hh,#jj,#mn{padding:1px;font-size:12px}#hh,#jj,#mn{width:2em}#aa{width:3.4em}.curtime #timestamp{padding:2px 0 1px;display:inline!important;height:auto!important}#misc-publishing-actions label[for=post_status]:before,#post-body #visibility:before,#post-body .misc-pub-revisions:before,.curtime #timestamp:before,span.wp-media-buttons-icon:before{color:#888}#post-body #visibility:before,#post-body .misc-pub-revisions:before,.curtime #timestamp:before{font:400 20px/1 dashicons;speak:none;display:inline-block;padding:0 0 0 2px;top:0;right:-1px;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}#post-body #visibility:before{content:'\f177'}.curtime #timestamp:before{content:'\f145';top:-1px}#post-body .misc-pub-revisions:before{content:'\f321'}#timestampdiv{padding-top:5px;line-height:23px}#timestampdiv p{margin:8px 0 6px}#timestampdiv input{border-width:1px;border-style:solid}.notification-dialog{position:fixed;top:30%;right:50%;width:450px;margin-right:-225px;background:#fff;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3);line-height:1.5;z-index:1000005}.notification-dialog-background{position:fixed;top:0;right:0;left:0;bottom:0;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:1000000}#post-lock-dialog .post-locked-message,#post-lock-dialog .post-taken-over{margin:25px}#post-lock-dialog .post-locked-message a.button{margin-left:10px}#post-lock-dialog .post-locked-avatar{float:right;margin:0 0 20px 20px}#post-lock-dialog .wp-tab-first{outline:0}#post-lock-dialog .locked-saving img{float:right;margin-left:3px}#post-lock-dialog.saved .locked-saved,#post-lock-dialog.saving .locked-saving{display:inline}#excerpt,.attachmentlinks{margin:0;height:4em;width:98%}.tagchecklist{margin-right:14px;font-size:12px;overflow:auto}.tagchecklist br{display:none}.tagchecklist strong{margin-right:-8px;position:absolute}.tagchecklist span{margin-left:25px;display:block;float:right;font-size:13px;line-height:1.8em;white-space:nowrap;cursor:default}.tagchecklist span a{margin:1px -17px 0 0;cursor:pointer;width:20px;height:20px;display:block;float:right;text-indent:0;overflow:hidden;position:absolute}#poststuff h2{margin-top:20px;font-size:1.5em;margin-bottom:15px;padding:0 0 3px;clear:right}#poststuff h3{font-size:14px;padding:8px 12px;margin:0;line-height:1.4}#poststuff .inside{margin:6px 0 0}#poststuff .inside #page_template,#poststuff .inside #parent_id{max-width:100%}#poststuff .inside label.deleted,#poststuff .inside label.spam{color:red}#poststuff .inside label.waiting{color:orange}#poststuff .inside label.approved{color:green}.ie8 #poststuff .inside #page_template,.ie8 #poststuff .inside #parent_id{width:250px}#post-visibility-select{line-height:1.5em;margin-top:3px}#poststuff #submitdiv .inside{margin:0;padding:0}.edit-form-section{margin-bottom:20px}#postcustomstuff thead th{padding:5px 8px 8px;background-color:#f1f1f1}#postcustom #postcustomstuff .submit{border:0 none;float:none;padding:0 8px 8px}#side-sortables #postcustom #postcustomstuff .submit{margin:0;padding:0}#side-sortables #postcustom #postcustomstuff #the-list textarea{height:85px}#side-sortables #postcustom #postcustomstuff td.left input,#side-sortables #postcustom #postcustomstuff td.left select,#side-sortables #postcustomstuff #newmetaleft a{margin:3px 3px 0}#postcustomstuff table{margin:0;width:100%;border:1px solid #dfdfdf;border-spacing:0;background-color:#f9f9f9}#postcustomstuff tr{vertical-align:top}#postcustomstuff table input,#postcustomstuff table select,#postcustomstuff table textarea{width:96%;margin:8px}#side-sortables #postcustomstuff table input,#side-sortables #postcustomstuff table select,#side-sortables #postcustomstuff table textarea{margin:3px}#postcustomstuff td.left,#postcustomstuff th.left{width:38%}#postcustomstuff .submit input{margin:0;width:auto}#postcustomstuff #newmetaleft a{display:inline-block;margin:0 8px 8px;text-decoration:none}.no-js #postcustomstuff #enternew{display:none}#post-body-content .compat-attachment-fields{margin-bottom:20px}.compat-attachment-fields th{padding-top:5px;padding-left:10px}#select-featured-image{padding:4px 0;overflow:hidden}#select-featured-image img{max-width:100%;height:auto;margin-bottom:10px}#select-featured-image a{float:right;clear:both}#select-featured-image .remove{display:none;margin-top:10px}.js #select-featured-image.has-featured-image .remove{display:inline-block}.no-js #select-featured-image .choose{display:none}.post-state-format{overflow:hidden;display:inline-block;vertical-align:middle;height:20px;width:20px;margin-left:5px;margin-top:-4px}.post-state-format:before{display:block;height:20px;width:20px;font:400 20px/1 dashicons!important;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.post-format-icon:before,.post-state-format:before{color:#ddd;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}a.post-format-icon:hover:before,a.post-state-format:hover:before{color:#2ea2cc}#post-formats-select{line-height:2em}#post-formats-select .post-format-icon:before{top:5px}input.post-format{margin-top:1px}label.post-format-icon{margin-right:0;padding:2px 0}.post-format-icon:before{position:relative;display:inline-block;margin-left:7px;font:400 20px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.post-format-icon.post-format-standard:before,.post-state-format.post-format-standard:before,a.post-state-format.format-standard:before{content:'\f109'}.post-format-icon.post-format-image:before,.post-state-format.post-format-image:before,a.post-state-format.format-image:before{content:'\f128'}.post-format-icon.post-format-gallery:before,.post-state-format.post-format-gallery:before,a.post-state-format.format-gallery:before{content:'\f161'}.post-format-icon.post-format-audio:before,.post-state-format.post-format-audio:before,a.post-state-format.format-audio:before{content:'\f127'}.post-format-icon.post-format-video:before,.post-state-format.post-format-video:before,a.post-state-format.format-video:before{content:'\f126'}.post-format-icon.post-format-chat:before,.post-state-format.post-format-chat:before,a.post-state-format.format-chat:before{content:'\f125'}.post-format-icon.post-format-status:before,.post-state-format.post-format-status:before,a.post-state-format.format-status:before{content:'\f130'}.post-format-icon.post-format-aside:before,.post-state-format.post-format-aside:before,a.post-state-format.format-aside:before{content:'\f123'}.post-format-icon.post-format-quote:before,.post-state-format.post-format-quote:before,a.post-state-format.format-quote:before{content:'\f122'}.post-format-icon.post-format-link:before,.post-state-format.post-format-link:before,a.post-state-format.format-link:before{content:'\f103'}.category-adder{margin-right:120px;padding:4px 0}.category-adder h4{margin:0 0 8px}#side-sortables .category-adder{margin:0}.categorydiv div.tabs-panel,.customlinkdiv div.tabs-panel,.posttypediv div.tabs-panel,.taxonomydiv div.tabs-panel,.wp-tab-panel{min-height:42px;max-height:200px;overflow:auto;padding:0 .9em;border:solid 1px #dfdfdf;background-color:#fdfdfd}div.tabs-panel-active{display:block}div.tabs-panel-inactive{display:none}#front-page-warning,#front-static-pages ul,.categorydiv ul.categorychecklist ul,.customlinkdiv ul.categorychecklist ul,.inline-editor ul.cat-checklist ul,.posttypediv ul.categorychecklist ul,.taxonomydiv ul.categorychecklist ul,ul.export-filters{margin-right:18px}ul.categorychecklist li{margin:0;padding:0;line-height:22px;word-wrap:break-word}.categorydiv .tabs-panel,.customlinkdiv .tabs-panel,.posttypediv .tabs-panel,.taxonomydiv .tabs-panel{border-width:3px;border-style:solid}.form-wrap label{display:block;padding:2px;font-size:12px}.form-field input,.form-field textarea{border-style:solid;border-width:1px;width:95%}.form-wrap p,p.description{margin:2px 0 5px;color:#666}.form-wrap p,p.description,p.help,span.description{font-size:13px;font-style:italic}.form-wrap .form-field{margin:0 0 10px;padding:8px 0}.form-wrap .form-field #parent{max-width:100%}.col-wrap h3{margin:12px 0;font-size:1.1em}.col-wrap p.submit{margin-top:-10px}.tagsdiv{margin-top:-8px}#poststuff .taghint{color:#aaa;margin:15px 12px -24px 0}#poststuff .tagsdiv .howto{margin:0 0 6px}.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}.taghint{color:#aaa;margin:-17px 7px 0 0;visibility:hidden}input.newtag~div.taghint{visibility:visible}input.newtag:focus~div.taghint{visibility:hidden}p.popular-tags{border:0;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:1px solid gray;background-color:#fff}.wp-customizer .ac_results{z-index:500000}.ac_results li{padding:2px 5px;white-space:nowrap;color:#101010;text-align:right}.ac_over{background-color:#f0f0b8;cursor:pointer}.ac_match{text-decoration:underline}.comment-php .wp-editor-area{height:200px}.comment-ays{margin-bottom:0;border-bottom-style:solid;border-bottom-width:1px}.comment-ays .alt{background-color:transparent}.spam-undo-inside,.trash-undo-inside{margin:1px 0 1px 8px;line-height:16px}.spam-undo-inside .avatar,.trash-undo-inside .avatar{height:20px;width:20px;margin-left:8px;vertical-align:middle}.stuffbox .editcomment{clear:none}#comment-status-radio p{margin:3px 0 5px}#comment-status-radio input{margin:2px 0 5px 3px;vertical-align:middle}#comment-status-radio label{padding:5px 0}table.links-table{width:100%;border-spacing:0}.links-table th{font-weight:400;text-align:right;vertical-align:top;min-width:80px;width:20%;word-wrap:break-word}.links-table td,.links-table th{padding:5px 0}.links-table td label{margin-left:8px}.links-table td input[type=text],.links-table td textarea{width:100%}.links-table #link_rel{max-width:280px}@media print,(-o-min-device-pixel-ratio:5/4),(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){#content-resize-handle,#post-body .wp_themeSkin .mceStatusbar a.mceResize{background:transparent url(../images/resize-2x.gif) no-repeat scroll left bottom;-webkit-background-size:11px 11px;background-size:11px 11px}.rtl #content-resize-handle,.rtl #post-body .wp_themeSkin .mceStatusbar a.mceResize{background:transparent url(../images/resize-rtl-2x.gif) no-repeat scroll left bottom}}@media only screen and (max-width:850px){#poststuff{min-width:0}#wpbody-content #poststuff #post-body{margin:0}#wpbody-content #post-body.columns-2 #postbox-container-1{margin-left:0;width:100%}#poststuff #postbox-container-1 #side-sortables:empty,#poststuff #postbox-container-1 .empty-container{border:0 none;height:0;min-height:0}#poststuff #post-body.columns-2 #side-sortables{min-height:0}.columns-prefs,.screen-layout{display:none}}@media screen and (max-width:782px){#post-body-content{min-width:0}#titlediv #title-prompt-text{padding:10px}#poststuff h3{padding:12px}.post-format-options{padding-left:0}.post-format-options a{margin-left:5px;margin-bottom:5px;min-width:52px}.post-format-options .post-format-title{font-size:11px}.post-format-options a div{height:28px;width:28px}.post-format-options a div:before{font-size:26px!important}#post-visibility-select{line-height:280%}.wp-core-ui .save-post-visibility,.wp-core-ui .save-timestamp{vertical-align:middle;margin-left:15px}.timestamp-wrap select#mm{display:block;width:100%;margin-bottom:10px}.timestamp-wrap #aa,.timestamp-wrap #hh,.timestamp-wrap #jj,.timestamp-wrap #mn{padding:12px 3px;font-size:14px;margin-bottom:5px;width:auto;text-align:center}ul.category-tabs{margin:30px 0 15px}ul.category-tabs li.tabs{padding:15px}ul.categorychecklist li{margin-bottom:15px}ul.categorychecklist ul{margin-top:15px}.category-add input[type=text],.category-add select{max-width:none;margin-bottom:15px}.tagsdiv .newtag{width:100%;height:auto;margin-bottom:15px}.tagchecklist{margin:25px 10px}.tagchecklist span{font-size:16px;line-height:120%}#commentstatusdiv p{line-height:2.8}.mceToolbar *{white-space:normal!important}.mceToolbar td,.mceToolbar tr{float:right!important}.wp_themeSkin a.mceButton{width:30px;height:30px}.wp_themeSkin .mceButton .mceIcon{margin-top:5px;margin-right:5px}.wp_themeSkin .mceSplitButton{margin-top:1px}.wp_themeSkin .mceSplitButton td a.mceAction{padding-top:6px;padding-bottom:6px;padding-right:6px;padding-left:3px}.wp_themeSkin .mceSplitButton td a.mceOpen,.wp_themeSkin .mceSplitButtonEnabled:hover td a.mceOpen{padding-top:6px;padding-bottom:6px;background-position:1px 6px}.wp_themeSkin table.mceListBox{margin:5px}div.quicktags-toolbar input{padding:10px 20px}#wp-content-editor-tools{overflow:hidden;padding:20px 0 1px 15px;top:1px}a.wp-switch-editor{font-size:16px;line-height:1em;margin:3px 7px 0 0;padding:12px 15px}#wp-content-media-buttons a{font-size:16px;line-height:37px;height:39px;padding:0 15px 0 20px}.wp-media-buttons span.jetpack-contact-form-icon,.wp-media-buttons span.wp-media-buttons-icon{width:22px!important;margin-top:-3px!important;margin-right:-5px!important}.wp-media-buttons #insert-jetpack-contact-form span.jetpack-contact-form-icon:before,.wp-media-buttons .add_media span.wp-media-buttons-icon:before{font-size:20px!important}#content_wp_fullscreen{display:none}.misc-pub-section{padding:20px 10px}.misc-pub-section>a{float:left;font-size:16px}#delete-action,#publishing-action{line-height:47px}.comment-ays{border-bottom:0}.links-table #link_rel{max-width:none}.links-table td,.links-table th{padding:10px 0}}@media only screen and (max-width:500px){#wp-content-media-buttons a{font-size:14px;padding:0 10px}}.revisions-control-frame,.revisions-diff-frame{position:relative}.revisions-controls{padding-top:40px;height:100px;z-index:1}.revisions-controls input[type=checkbox]{position:relative;top:-1px;vertical-align:text-bottom}.revisions.pinned .revisions-controls{position:fixed;top:0;height:82px;background:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.1);box-shadow:0 1px 3px rgba(0,0,0,.1)}.revisions-tickmarks{position:relative;margin:0 auto;height:.7em;top:7px;max-width:70%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background-color:#fff}.revisions-tickmarks>div{position:absolute;height:100%;border-right:1px solid #aaa;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.revisions-tickmarks>div:first-child{border-width:0}.comparing-two-revisions .revisions-controls{height:140px}.comparing-two-revisions.pinned .revisions-controls{height:124px}.revisions .diff-error{position:absolute;text-align:center;margin:0 auto;width:100%;display:none}.revisions.diff-error .diff-error{display:block}.revisions .loading-indicator{position:fixed;vertical-align:middle;opacity:0;width:100%;top:50%;margin-right:-90px;-webkit-transition:opacity .5s;transition:opacity .5s;filter:alpha(opacity=0)}body.folded .revisions .loading-indicator{margin-right:-32px}.revisions .loading-indicator span.spinner{display:block;margin:0 auto;float:none}.revisions.loading .loading-indicator{opacity:1;filter:alpha(opacity=100)}.revisions .diff{-webkit-transition:opacity .5s;transition:opacity .5s}.revisions.loading .diff{opacity:.5;filter:alpha(opacity=50)}.revisions.diff-error .diff{visibility:hidden}.revisions-meta{margin-top:20px;background-color:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.1);box-shadow:0 1px 3px rgba(0,0,0,.1)}.revisions.pinned .revisions-meta{-webkit-box-shadow:none;box-shadow:none}.revision-toggle-compare-mode{position:absolute;top:0;left:0}.comparing-two-revisions .revisions-next,.comparing-two-revisions .revisions-previous,.revisions-meta .diff-meta-to strong{display:none}.revisions-controls .author-card .date{color:#777}.revisions-controls .author-card.autosave{color:#d54e21}.revisions-controls .author-card .author-name{font-weight:700}.comparing-two-revisions .diff-meta-to strong{display:block}.revisions.pinned .revisions-buttons{padding:0 11px}.revisions-next,.revisions-previous{position:relative;z-index:1}.revisions-previous{float:right}.revisions-next{float:left}.revisions-controls .wp-slider{max-width:70%;margin:0 auto;top:-3px}.revisions-diff{padding:15px;background-color:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.1);box-shadow:0 1px 3px rgba(0,0,0,.1)}.revisions-diff h3:first-child{margin-top:0}#revisions-meta-restored img,.post-revisions li img{vertical-align:middle}table.diff tbody tr td:nth-child(2){width:4%}table.diff{table-layout:fixed;width:100%;white-space:pre-wrap}table.diff col.content{width:auto}table.diff col.content.diffsplit{width:48%}table.diff col.diffsplit.middle{width:auto}table.diff col.ltype{width:30px}table.diff tr{background-color:transparent}table.diff td,table.diff th{font-family:Consolas,Monaco,monospace;font-size:14px;line-height:1.618;padding:.5em;vertical-align:top;word-wrap:break-word}table.diff td h1,table.diff td h2,table.diff td h3,table.diff td h4,table.diff td h5,table.diff td h6{margin:0}table.diff .diff-addedline ins,table.diff .diff-deletedline del{text-decoration:none}table.diff .diff-deletedline{background-color:#ffe9e9}table.diff .diff-deletedline del{background-color:#faa}table.diff .diff-addedline{background-color:#e9ffe9}table.diff .diff-addedline ins{background-color:#afa}.diff-meta{padding:5px;clear:both;min-height:32px}.diff-title strong{line-height:32px;min-width:60px;text-align:left;float:right;margin-left:5px}.revisions-controls .author-card .author-info{font-size:12px;line-height:16px}.revisions-controls .author-card .author-info,.revisions-controls .author-card .avatar{float:right;margin-right:6px;margin-left:6px}.revisions-controls .author-card .byline{display:block;font-size:12px}.revisions-controls .author-card .avatar{vertical-align:middle}.diff-meta input.restore-revision{float:left;margin-right:6px;margin-left:6px;margin-top:4px}.diff-meta-from{display:none}.comparing-two-revisions .diff-meta-from{display:block}.revisions-tooltip{position:absolute;bottom:105px;margin-left:0;margin-right:-69px;z-index:0;max-width:350px;min-width:130px;padding:8px 4px;opacity:0}.revisions-tooltip.flipped{margin-right:0;margin-left:-70px}.revisions.pinned .revisions-tooltip{display:none!important}.comparing-two-revisions .revisions-tooltip{bottom:145px}.revisions-tooltip-arrow{width:70px;height:15px;overflow:hidden;position:absolute;right:0;margin-right:35px;bottom:-15px}.revisions-tooltip.flipped .revisions-tooltip-arrow{margin-right:0;margin-left:35px;right:auto;left:0}.revisions-tooltip-arrow>span{content:"";position:absolute;right:20px;top:-20px;width:25px;height:25px;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.revisions-tooltip.flipped .revisions-tooltip-arrow>span{right:auto;left:20px}.ie8 .revisions-tooltip-arrow>span{right:15px;top:-25px;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, M22=0.7071067811865476)"}.ie8 .revisions-tooltip.flipped .revisions-tooltip-arrow>span{left:25px}.revisions-tooltip,.revisions-tooltip-arrow>span{border:1px solid #d7d7d7;background-color:#fff}.revisions-tooltip{display:none}.arrow{width:70px;height:16px;overflow:hidden;position:absolute;right:0;margin-right:-35px;bottom:90px;z-index:10000}.arrow::after{z-index:9999;background-color:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.1);box-shadow:0 1px 3px rgba(0,0,0,.1)}.arrow.top{top:-16px;bottom:auto}.arrow.left{right:20%}.arrow:after{content:"";position:absolute;right:20px;top:-20px;width:25px;height:25px;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.revisions-tooltip,.revisions-tooltip-arrow:after{border-width:1px;border-style:solid}div.revisions-controls>.wp-slider>.ui-slider-handle{margin-right:-10px}.rtl div.revisions-controls>.wp-slider>.ui-slider-handle{margin-left:-10px}.wp-slider.ui-slider{position:relative;border:1px solid #d7d7d7;text-align:right;cursor:pointer}.wp-slider .ui-slider-handle{-webkit-border-radius:50%;border-radius:50%;height:18px;margin-top:-3px;outline:0;position:absolute;width:18px;z-index:2}.wp-slider .ui-slider-handle,.wp-slider .ui-slider-handle.focus,.wp-slider .ui-slider-handle.ui-state-hover{background:#2ea2cc;border:1px solid #0074a2;-webkit-box-shadow:inset 0 1px 0 #78c8e6,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #78c8e6,0 1px 0 rgba(0,0,0,.15)}.wp-slider .ui-slider-handle:before{background:0 0;position:absolute;top:0;right:0;color:#fff;content:"\f229";font:400 18px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wp-slider .ui-slider-handle.from-handle:before,.wp-slider .ui-slider-handle.to-handle:before{font-size:20px!important;margin:-1px -1px 0 0}.wp-slider .ui-slider-handle.from-handle:before{content:'\f139'}.rtl .wp-slider .ui-slider-handle.from-handle:before,.wp-slider .ui-slider-handle.to-handle:before{content:'\f141'}.rtl .wp-slider .ui-slider-handle.to-handle:before{content:'\f139';left:-1px}.wp-slider .ui-slider-range{position:absolute;font-size:.7em;display:block;border:0;background-color:transparent;background-image:none}.wp-slider.ui-slider-horizontal{height:.7em}.wp-slider.ui-slider-horizontal .ui-slider-handle{top:-.25em;margin-right:-.6em}.wp-slider.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.wp-slider.ui-slider-horizontal .ui-slider-range-min{right:0}.wp-slider.ui-slider-horizontal .ui-slider-range-max{left:0}@media print,(-o-min-device-pixel-ratio:5/4),(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.revision-tick.completed-false{background-image:url(../images/spinner-2x.gif)}}@media screen and (max-width:782px){#diff-next-revision,#diff-previous-revision{margin-top:-1em}table.diff{-ms-word-break:break-all;word-break:break-all;word-wrap:break-word}}.media-item .describe{border-collapse:collapse;width:100%;border-top:1px solid #dfdfdf;clear:both;cursor:default}.media-item.media-blank .describe{border:0}.media-item .describe th{vertical-align:top;text-align:right;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 0 8px 8px;vertical-align:top}.media-item thead.media-item-info td{padding:4px 10px 0}.media-item .media-item-info .A1B1{padding:0 10px 0 0}.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-left:6px;margin-right:2px}.media-upload-form .align .field label{display:inline;padding:0 23px 0 0;margin:0 3px 0 1em;font-weight:600}.media-upload-form tr.image-size label{margin:0 5px 0 0;font-weight:600}.media-upload-form th.label label{font-weight:600;margin:.5em;font-size:13px}.media-upload-form th.label label span{padding:0 5px}.media-item .describe input[type=text],.media-item .describe textarea{width:460px}.media-item .describe p.help{margin:0;padding:0 5px 0 0}.describe-toggle-off,.describe-toggle-on,.media-item .edit-attachment{display:block;line-height:36px;float:left}.media-item .describe-toggle-off,.media-item.open .describe-toggle-on{display:none}.media-item.open .describe-toggle-off{display:block}#media-items .media-item{border-bottom:1px solid #dfdfdf;min-height:36px;position:relative;width:100%}#media-items{width:623px}.media-new-php #media-items{margin:1em 0}#media-items:empty{border:0 none}.media-item .filename{line-height:36px;overflow:hidden}.media-item .pinkynail{float:right;margin:2px 0 0 10px;max-width:40px;max-height:32px}.media-item .startclosed,.media-item .startopen{display:none}.media-item .original{position:relative;height:34px}.media-item .progress{float:left;height:22px;margin:7px 0 0;width:200px;line-height:2em;padding:0;overflow:hidden;margin-bottom:2px;-webkit-border-radius:22px;border-radius:22px;background:#ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.media-item .bar{z-index:9;width:0;height:100%;margin-top:-22px;-webkit-border-radius:22px;border-radius:22px;background-color:#0074a2;-webkit-box-shadow:inset 0 0 2px rgba(0,0,0,.3);box-shadow:inset 0 0 2px rgba(0,0,0,.3)}.media-item .progress .percent{z-index:10;position:relative;width:200px;padding:0;color:#fff;text-align:center;line-height:22px;font-weight:400;text-shadow:0 1px 2px rgba(0,0,0,.2)}.upload-php .fixed .column-parent{width:15%}.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-item .error-div,.media-upload-form .media-item.error p{line-height:16px;margin:5px 10px;padding:0}.media-item .error-div a.dismiss{display:block;float:left;margin:5px 15px 0 4px}.find-box{background-color:#fff;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3);width:600px;overflow:hidden;margin-right:-300px;position:fixed;top:30px;bottom:30px;right:50%;z-index:100105}.find-box-head{background:#fcfcfc;border-bottom:1px solid #dfdfdf;height:36px;font-size:18px;font-weight:600;line-height:36px;padding:0 16px 0 36px;position:absolute;top:0;right:0;left:0}.find-box-inside{overflow:auto;padding:16px;background-color:#fff;position:absolute;top:37px;bottom:45px;overflow-y:scroll;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.find-box-search{padding-bottom:16px}.find-box-search .spinner{float:none;right:125px;position:absolute;top:18px}#find-posts-input,#find-posts-search{float:right}#find-posts-input{width:140px;height:28px;margin:0 0 0 4px}.widefat .found-radio{padding-left:0;width:16px}#find-posts-close{width:36px;height:36px;position:absolute;top:0;left:0;cursor:pointer;text-align:center;color:#666}#find-posts-close:hover{color:#2ea2cc}#find-posts-close:before{font:400 20px/36px dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:'\f158'}.find-box-buttons{padding:8px 16px;background:#fcfcfc;border-top:1px solid #dfdfdf;position:absolute;bottom:0;right:0;left:0}@media screen and (max-width:782px){.find-box-inside{bottom:57px}}@media screen and (max-width:660px){.find-box{top:0;bottom:0;right:0;left:0;margin:0;width:100%}}.ui-find-overlay{position:fixed;top:0;right:0;left:0;bottom:0;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:100100}ul#dismissed-updates{display:none}form.upgrade{margin-top:8px}form.upgrade .hint{font-style:italic;font-size:85%;margin:-.5em 0 2em 0}#poststuff .inside .the-tagcloud{margin:5px 0 10px;padding:8px;border:1px solid #ddd;line-height:1.8em;word-spacing:3px;-webkit-border-radius:6px;border-radius:6px}.drag-drop #drag-drop-area{border:4px dashed #bbb;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}.wp_attachment_details label[for=content]{font-size:13px;line-height:1.5;margin:1em 0}.wp_attachment_details #attachment_caption{height:4em}.describe .image-editor{vertical-align:top}.imgedit-wrap{position:relative}.imgedit-settings p{margin:8px 0 0}.describe .imgedit-wrap .imgedit-settings{padding:0 5px}.wp_attachment_holder div.updated{margin-top:0}.wp_attachment_holder .imgedit-wrap>div{height:auto;overflow:hidden}.wp_attachment_holder .imgedit-wrap .imgedit-panel-content{padding-left:16px;width:auto;overflow:hidden}.wp_attachment_holder .imgedit-wrap .imgedit-settings{float:left;width:250px}.imgedit-settings input{margin-top:0;vertical-align:middle}.imgedit-wait{position:absolute;top:0;background:#fff url(../images/spinner.gif) no-repeat center;-webkit-background-size:20px 20px;background-size:20px 20px;opacity:.7;filter:alpha(opacity=70);width:100%;height:500px;display:none}.no-float{float:none}.imgedit-settings .disabled,.media-disabled{color:grey}.A1B1,.wp_attachment_image{overflow:hidden}.A1B1 .button,.wp_attachment_image .button{float:right}.no-js .wp_attachment_image .button{display:none}.A1B1 .spinner,.wp_attachment_image .spinner{float:right;padding:0 0 4px;vertical-align:bottom}.imgedit-menu{margin:0 0 12px;min-width:300px}.imgedit-menu div{float:right;width:32px;border:1px solid #d5d5d5;background:#f1f1f1;margin:0 0 0 8px;height:32px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;line-height:28px;color:#777;cursor:pointer}.imgedit-menu div:before{font:400 20px/1 dashicons;speak:none;vertical-align:middle}.imgedit-menu div:hover{border-color:#c1c1c1;background-color:#eaeaea;color:#333}.imgedit-menu div.disabled{border-color:#ccc;background-color:#ddd;color:#777;filter:alpha(opacity=50);opacity:.5;cursor:default}.imgedit-crop:before{content:'\f165'}.imgedit-rleft:before{content:'\f166'}.imgedit-rright:before{content:'\f167'}.imgedit-flipv:before{content:'\f168'}.imgedit-fliph:before{content:'\f169'}.imgedit-undo:before{content:'\f171'}.imgedit-redo:before{content:'\f172'}.imgedit-crop-wrap{position:relative}.imgedit-crop{margin:0 0 0 8px}.imgedit-rleft{margin:0 3px}.imgedit-rright{margin:0 3px 0 8px}.imgedit-flipv{margin:0 3px}.imgedit-fliph{margin:0 3px 0 8px}.imgedit-undo{margin:0 3px}.imgedit-redo{margin:0 3px 0 8px}.imgedit-applyto img{margin:0 0 0 8px}.imgedit-group-top{margin:5px 0}#poststuff .imgedit-group-top h3{padding:0}.imgedit-group-top h3 a{text-decoration:none}.imgedit-applyto .imgedit-label{padding:2px 0 0;display:block}.imgedit-help{display:none;font-style:italic}a.imgedit-help-toggle{text-decoration:none}.form-table td.imgedit-response{padding:0}.imgedit-submit{margin:8px 0}.imgedit-submit-btn{margin-right: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{margin-bottom:8px;padding:2px 10px}audio,video{display:inline-block;max-width:100%}.mejs-container{width:100%}@media print,(-o-min-device-pixel-ratio:5/4),(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.imgedit-wait{background-image:url(../images/spinner-2x.gif)}}@media screen and (max-width:782px){.wp_attachment_details label[for=content]{font-size:14px;line-height:1.5em}}.theme-browser .themes{clear:both;padding:0 0 100px}.themes-php .wrap h2{float:right;margin-bottom:15px}.network-admin.themes-php .wrap h2{margin-bottom:0}.themes-php .wrap h2 .button{margin-right:20px}.theme-navigation .theme-count,.themes-php .wrap .theme-count{color:#fff;-webkit-border-radius:30px;border-radius:30px;background:#777;font-size:14px;padding:4px 10px;font-weight:600;margin-right:5px;margin-left:20px;position:relative;top:-3px}.theme-navigation a{text-decoration:none}.themes-php div.error,.themes-php div.updated{margin:0 0 20px;clear:both}.themes-php div.updated a{text-decoration:underline}.theme-browser .theme{cursor:pointer;float:right;margin:0 0 4% 4%;position:relative;width:30.6%;border:1px solid #dedede;-webkit-box-shadow:0 1px 1px -1px rgba(0,0,0,.1);box-shadow:0 1px 1px -1px rgba(0,0,0,.1);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ie8 .theme-browser .theme{width:30%;margin:0 0 4% 3%}.theme-browser .theme:nth-child(3n){margin-left:0}.theme-browser .theme:focus,.theme-browser .theme:hover{cursor:pointer}.theme-browser .theme .theme-name{font-size:15px;font-weight:600;height:18px;margin:0;padding:15px;-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(0,0,0,.1);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;background:#fff;background:rgba(255,255,255,.65)}.theme-browser .theme .theme-actions{-ms-filter:"alpha(Opacity=0)";opacity:0;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;position:absolute;bottom:0;left:0;height:38px;padding:9px 10px 0;background:rgba(244,244,244,.7);border-right:1px solid rgba(0,0,0,.05)}.theme-browser .theme.focus .theme-actions,.theme-browser .theme:focus .theme-actions,.theme-browser .theme:hover .theme-actions{-ms-filter:"alpha(Opacity=100)";opacity:1}.theme-browser .theme .theme-actions .button-primary{margin-left:3px}.theme-browser .theme .theme-actions .button-secondary{float:none;margin-right:3px}.theme-browser .theme .theme-screenshot{display:block;overflow:hidden;position:relative;-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out}.theme-browser .theme .theme-screenshot:after{content:'';display:block;padding-top:66.66666%}.theme-browser .theme .theme-screenshot img{height:auto;position:absolute;right:0;top:0;width:100%;-webkit-transform:translateZ(0);-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out}.theme-browser .theme:focus .theme-screenshot,.theme-browser .theme:hover .theme-screenshot{background:#fff}.theme-browser.rendered .theme:focus .theme-screenshot img,.theme-browser.rendered .theme:hover .theme-screenshot img{opacity:.4}.theme-browser .theme .more-details{-ms-filter:"alpha(Opacity=0)";opacity:0;position:absolute;top:35%;left:25%;right:25%;background:#222;background:rgba(0,0,0,.7);color:#fff;font-size:15px;text-shadow:0 1px 0 rgba(0,0,0,.6);-webkit-font-smoothing:antialiased;font-weight:600;padding:15px 12px;text-align:center;-webkit-border-radius:3px;border-radius:3px;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.theme-browser .theme:focus{outline:1px dotted #222}.theme-browser .theme:focus .more-details{opacity:1}.theme-browser .theme.active:focus .theme-actions{display:block}.theme-browser.rendered .theme:focus .more-details,.theme-browser.rendered .theme:hover .more-details{-ms-filter:"alpha(Opacity=100)";opacity:1}.theme-browser .theme .theme-installed,.theme-browser .theme .theme-update{background:#d54e21;background:rgba(213,78,33,.95);color:#fff;display:block;font-size:13px;font-weight:400;height:48px;line-height:48px;padding:0 10px;position:absolute;top:0;left:0;right:0;border-bottom:1px solid rgba(0,0,0,.25);overflow:hidden}.theme-browser .theme .theme-installed:before,.theme-browser .theme .theme-update:before{content:'\f463';display:inline-block;font:400 20px/1 dashicons;margin:0 0 0 6px;opacity:.8;position:relative;top:5px;speak:none;-webkit-font-smoothing:antialiased}.theme-browser .theme.active .theme-name{background:#2f2f2f;color:#fff;padding-left:110px;font-weight:300;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.5);box-shadow:inset 0 1px 1px rgba(0,0,0,.5)}.theme-browser .theme.active .theme-name span{font-weight:600}.theme-browser .theme.active .theme-actions{background:rgba(49,49,49,.7);border-right:0;opacity:1}.theme-browser .theme.active .theme-actions .button-primary{margin-left:0}.theme-browser .theme .theme-author{background:#222;color:#eee;display:none;font-size:14px;margin:0 10px;padding:5px 10px;position:absolute;bottom:56px}.theme-browser .theme.display-author .theme-author{display:block}.theme-browser .theme.display-author .theme-author a{color:inherit;text-decoration:none}.theme-browser .theme.add-new-theme{border:0;-webkit-box-shadow:none;box-shadow:none}.theme-browser .theme.add-new-theme a{color:#999;text-decoration:none;display:block;position:relative;z-index:1}.theme-browser .theme.add-new-theme:after{display:block;content:'';-ms-filter:"alpha(Opacity=100)";opacity:1;background:0 0;background:rgba(0,0,0,0);position:absolute;top:0;right:0;left:0;bottom:0;padding:10% 0 0;text-shadow:none;border:5px dashed #d5d2ca;border:5px dashed rgba(0,0,0,.1);-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.theme-browser .theme.add-new-theme span:after{background:#e5e5e5;background:rgba(153,153,153,.1);-webkit-border-radius:50%;border-radius:50%;display:inline-block;content:'\f132';-webkit-font-smoothing:antialiased;font:400 74px/115px dashicons;width:100px;height:100px;vertical-align:middle;text-align:center;color:#999;position:absolute;top:30%;right:50%;margin-right:-50px;text-indent:-4px;padding:0;text-shadow:none;z-index:4}.rtl .theme-browser .theme.add-new-theme span:after{text-indent:4px}.theme-browser .theme.add-new-theme:focus .theme-screenshot,.theme-browser .theme.add-new-theme:hover .theme-screenshot{background:0 0}.theme-browser .theme.add-new-theme:focus span:after,.theme-browser .theme.add-new-theme:hover span:after{background:#fff;color:#0074a2}.theme-browser .theme.add-new-theme:focus:after,.theme-browser .theme.add-new-theme:hover:after{border-color:transparent;color:#fff;background:#0074a2;content:''}.theme-browser .theme.add-new-theme .theme-name{background:0 0;text-align:center;-webkit-box-shadow:none;box-shadow:none;font-weight:400;position:relative;top:0;margin-top:-10%;margin-bottom:10%}.theme-browser .theme.add-new-theme:focus .theme-name,.theme-browser .theme.add-new-theme:hover .theme-name{color:#fff;z-index:2}.themes-php .theme-search{position:relative;top:-2px;right:20px;font-size:16px;font-weight:300;line-height:1.5;width:280px}.theme-overlay .theme-backdrop{position:absolute;right:-20px;left:0;top:0;bottom:0;background:#f1f1f1;background:rgba(238,238,238,.9);z-index:10}body.theme-overlay-open{overflow:hidden}.theme-overlay .theme-header{position:absolute;top:0;right:0;left:0;height:48px;border-bottom:1px solid #ddd}.theme-overlay .theme-header .close{cursor:pointer;height:48px;width:50px;text-align:center;float:left;border:0;border-right:1px solid #ddd;background-color:transparent}.theme-overlay .theme-header .close:focus:before,.theme-overlay .theme-header .close:hover:before{color:#fff}.theme-overlay .theme-header .close:before{font:400 30px/50px dashicons!important;color:#777;display:inline-block;content:'\f335';font-weight:300}.theme-overlay .theme-header .left,.theme-overlay .theme-header .right{cursor:pointer;color:#777;background-color:transparent;height:48px;width:54px;float:right;text-align:center;border:0;border-left:1px solid #ddd}.theme-overlay .theme-header .close:focus,.theme-overlay .theme-header .close:hover,.theme-overlay .theme-header .left:focus,.theme-overlay .theme-header .left:hover,.theme-overlay .theme-header .right:focus,.theme-overlay .theme-header .right:hover{background:#0074a2;color:#fff}.theme-overlay .theme-header .left.disabled,.theme-overlay .theme-header .left.disabled:hover,.theme-overlay .theme-header .right.disabled,.theme-overlay .theme-header .right.disabled:hover{color:#ccc;background:inherit;cursor:inherit}.theme-overlay .theme-header .left:before,.theme-overlay .theme-header .right:before{font:400 20px/50px dashicons!important;display:inline;font-weight:300}.theme-overlay .theme-header .left:before{content:'\f340'}.theme-overlay .theme-header .right:before{content:'\f344'}.rtl .theme-overlay .theme-header .left:before{content:'\f345'}.rtl .theme-overlay .theme-header .right:before{content:'\f341'}.theme-overlay .theme-wrap{clear:both;position:fixed;top:9%;right:190px;left:30px;bottom:3%;background:#fff;-webkit-box-shadow:0 1px 20px 5px rgba(0,0,0,.1);box-shadow:0 1px 20px 5px rgba(0,0,0,.1);z-index:20;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.theme-overlay .theme-wrap:after{content:".";display:block;height:0;clear:both;visibility:hidden}body.folded .theme-overlay .theme-wrap{right:70px}.theme-overlay .theme-about{position:absolute;top:49px;bottom:57px;right:0;left:0;overflow:auto;padding:2% 4%}.theme-overlay .theme-about:after{content:".";display:block;height:0;clear:both;visibility:hidden}.theme-overlay .theme-actions{position:absolute;text-align:center;bottom:0;right:0;left:0;padding:10px 25px 5px;background:#f3f3f3;z-index:30;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border-top:1px solid #eee}.ie8 .theme-overlay .theme-actions{border:1px solid #eee}.theme-overlay .theme-actions a{margin-left:5px;margin-bottom:5px}.theme-overlay .theme-actions .delete-theme{color:#a00;position:absolute;left:10px;bottom:5px;text-decoration:none;border-color:transparent;-webkit-box-shadow:none;box-shadow:none;background:0 0}.theme-overlay .theme-actions .delete-theme:focus,.theme-overlay .theme-actions .delete-theme:hover{background:#d54e21;color:#fff;border-color:#d54e21}.theme-overlay .theme-actions .active-theme,.theme-overlay.active .theme-actions .inactive-theme{display:none}.theme-overlay .theme-actions .inactive-theme,.theme-overlay.active .theme-actions .active-theme{display:block}.theme-overlay .theme-screenshots{float:right;margin:0 0 0 30px;width:55%;max-width:880px;text-align:center}.theme-overlay .screenshot{border:1px solid #fff;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;overflow:hidden;position:relative;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.2);box-shadow:0 0 0 1px rgba(0,0,0,.2)}.theme-overlay .screenshot:after{content:'';display:block;padding-top:75%}.theme-overlay .screenshot img{height:auto;position:absolute;right:0;top:0;width:100%}.theme-overlay.small-screenshot .theme-screenshots{position:absolute;width:302px}.theme-overlay.small-screenshot .theme-info{margin-right:350px;width:auto}.theme-overlay .screenshot.thumb{background:#ccc;border:1px solid #eee;float:none;display:inline-block;margin:10px 5px 0;width:140px;height:80px;cursor:pointer}.theme-overlay .screenshot.thumb:after{content:'';display:block;padding-top:100%}.theme-overlay .screenshot.thumb img{cursor:pointer;position:absolute;right:0;top:0;width:100%;height:auto}.theme-overlay .screenshot.selected{background:0 0;border:2px solid #2ea2cc}.theme-overlay .screenshot.selected img{opacity:.8}.theme-browser .theme .theme-screenshot.blank,.theme-overlay .screenshot.blank{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAALElEQVQYGWO8d+/efwYkoKioiMRjYGBC4WHhUK6A8T8QIJt8//59ZC493AAAQssKpBK4F5AAAAAASUVORK5CYII=)}.theme-overlay .theme-info{width:40%;float:right}.theme-overlay .current-label{background:#333;color:#fff;font-size:11px;display:inline-block;padding:2px 8px;-webkit-border-radius:2px;border-radius:2px;margin:0 0 -10px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.theme-overlay .theme-name{color:#222;font-size:32px;font-weight:100;margin:10px 0 0;line-height:1.3}.theme-overlay .theme-version{color:#999;font-size:13px;font-weight:400;float:none;display:inline-block;margin-right:10px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.theme-overlay .theme-author{color:#686868;font-size:16px;font-weight:400;margin:15px 0 25px}.theme-overlay .theme-author a{text-decoration:none}.theme-overlay .theme-description{color:#555;font-size:15px;font-weight:400;line-height:1.5;margin:30px 0 0}.theme-overlay .theme-tags{border-top:3px solid #eee;color:#888;font-size:13px;font-weight:400;margin:30px 0 0;padding-top:20px}.theme-overlay .theme-tags span{color:#444;font-weight:700;margin-left:5px}.theme-overlay .theme-update-message{background:#fef7f1;border:1px solid #eee;border-right:4px solid #d54e21;-webkit-border-radius:3px;border-radius:3px;padding:5px 20px 10px}.theme-overlay .theme-update{color:#222;font-size:18px;display:inline-block;line-height:40px;margin:0}.theme-overlay .parent-theme{background:#f7fcfe;border:1px solid #eee;border-right:4px solid #2ea2cc;font-size:14px;font-weight:400;margin-top:30px;padding:10px 20px 10px 10px}.theme-overlay .parent-theme strong{font-weight:700}.single-theme .theme,.single-theme .theme-overlay .theme-backdrop,.single-theme .theme-overlay .theme-header{display:none}.single-theme .theme-overlay .theme-wrap{clear:both;min-height:330px;position:relative;right:auto;left:auto;top:auto;bottom:auto}.single-theme .theme-overlay .theme-about{padding:30px 30px 70px;position:static}.single-theme .theme-overlay .theme-actions{position:absolute}@media only screen and (min-width:2000px){#wpwrap .theme-browser .theme{width:17.6%;margin:0 0 3% 3%}#wpwrap .theme-browser .theme:nth-child(3n),#wpwrap .theme-browser .theme:nth-child(4n){margin-left:3%}#wpwrap .theme-browser .theme:nth-child(5n){margin-left:0}}@media only screen and (min-width:1680px){.theme-overlay .theme-wrap{width:1450px;margin:0 auto}}@media only screen and (min-width:1640px){.theme-browser .theme{width:22.7%;margin:0 0 3% 3%}.theme-browser .theme .theme-screenshot:after{padding-top:75%}.theme-browser .theme:nth-child(3n){margin-left:3%}.theme-browser .theme:nth-child(4n){margin-left:0}}@media only screen and (max-width:1120px){.theme-browser .theme{width:47.5%;margin-left:0}.theme-browser .theme:nth-child(even){margin-left:0}.theme-browser .theme:nth-child(odd){margin-left:5%}}@media only screen and (max-width:900px){.theme-overlay .theme-wrap{right:65px}}@media only screen and (max-width:780px){.theme-overlay .theme-wrap,body.folded .theme-overlay .theme-wrap{top:0;left:0;bottom:0;right:0;padding:70px 20px 20px;border:0;z-index:500;position:fixed}.theme-browser .theme.active .theme-name span{display:none}.theme-overlay .theme-screenshots{width:40%}.theme-overlay .theme-info{width:50%}.single-theme .theme-wrap{padding:10px}.theme-browser .theme .theme-actions{padding:5px 10px 4px}.theme-overlay.small-screenshot .theme-screenshots{position:static;float:none;max-width:302px}.theme-overlay.small-screenshot .theme-info{margin-right:0;width:auto}.theme:focus .more-details,.theme:hover .more-details,.theme:not(.active):focus .theme-actions,.theme:not(.active):hover .theme-actions{display:none}.theme-browser.rendered .theme:focus .theme-screenshot img,.theme-browser.rendered .theme:hover .theme-screenshot img{opacity:1}}@media only screen and (max-width:480px){.theme-browser .theme{width:100%;margin-left:0}.theme-browser .theme:nth-child(2n),.theme-browser .theme:nth-child(3n){margin-left:0}}@media only screen and (max-width:650px){.theme-overlay .theme-description,.theme-overlay .theme-update{margin-right:0}.theme-overlay .theme-actions .delete-theme{position:relative;left:auto;bottom:auto}.theme-overlay .theme-actions .inactive-theme{display:inline}.theme-overlay .theme-screenshots{width:100%;float:none}.theme-overlay .theme-info{width:100%}.theme-overlay .theme-author{margin:5px 0 15px}.theme-overlay .current-label{margin-top:10px;font-size:13px}.themes-php .wrap h2{width:100%}.themes-php .theme-search{float:none;clear:both;right:0;top:0;left:0;margin:10px 0;width:100%}.theme-browser .theme.add-new-theme span:after{font:400 60px/90px dashicons;width:80px;height:80px;top:30%;right:50%;text-indent:0;margin-right:-40px}.single-theme .theme-wrap{margin:0 -10px 0 -12px;padding:10px}.single-theme .theme-overlay .theme-about{padding:10px;overflow:visible}.single-theme .current-label{display:none}.single-theme .theme-overlay .theme-actions{position:static}}.broken-themes{clear:both}.broken-themes table{text-align:right;width:50%;border-spacing:3px;padding:3px}.theme-browser .theme .theme-installed{background:#0074a2}.theme-browser .theme .theme-installed:before{content:'\f147'}.theme-browser .theme.is-installed .theme-actions .button-primary{display:none!important}.theme-navigation{background:#fff;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;color:#555;display:inline-block;font-size:13px;margin:20px 0 30px;padding:0 20px;position:relative;width:100%}.theme-install-php a.browse-themes,.theme-install-php a.upload{cursor:pointer}.theme-install-php a.browse-themes,.theme-install-php.show-upload-theme a.upload{display:none}.theme-install-php.show-upload-theme a.browse-themes{display:inline}.upload-theme{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:none;margin:0;padding:0;width:100%;overflow:hidden;position:relative;top:10px}body.show-upload-theme .upload-theme{display:block}.upload-theme .wp-upload-form{background:#fafafa;border:1px solid #e5e5e5;padding:30px;margin:30px auto;max-width:380px}.upload-theme .install-help{color:#999;font-size:18px;font-style:normal;margin:0;padding:40px 0 0;text-align:center}body.show-upload-theme .upload-theme+.theme-navigation,body.show-upload-theme .upload-theme+.theme-navigation+.theme-browser{display:none}.theme-navigation .theme-count{margin-right:0;position:absolute;top:12px}.theme-count+.theme-section{margin-right:60px}.theme-filter,.theme-section{border-bottom:4px solid #fff;color:#666;cursor:pointer;display:inline-block;margin:0 10px;padding:15px 0}.theme-filter.current,.theme-section.current{border-bottom:4px solid #666;color:#222}.theme-top-filters{display:inline-block}.theme-navigation .more-filters{color:#666;cursor:pointer;display:inline-block;margin:0 10px;padding:4px 6px}body.more-filters-opened .more-filters,body.more-filters-opened .more-filters:before{background:#777;-webkit-border-radius:2px;border-radius:2px;border:0;color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover,body.more-filters-opened .more-filters:hover:before{background:#2ea2cc}.theme-install-php .theme-search{position:absolute;left:10px;top:9px;font-size:16px;font-weight:300;line-height:1.5;width:280px}.more-filters:before{color:#777;margin:0 0 0 5px;content:"\f111";display:inline-block;width:16px;height:16px;-webkit-font-smoothing:antialiased;font-size:16px;line-height:1;font-family:dashicons;text-decoration:inherit;font-weight:400;font-style:normal;vertical-align:top;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;text-align:center}.more-filters.current:before{color:#fff}.more-filters-container{display:none;padding:20px;border-top:1px solid #eee;margin:0 -20px;background:#fafafa}body.more-filters-opened .more-filters-container{display:block;overflow:hidden}body.more-filters-opened .theme-section.current{border-bottom:0}body.more-filters-opened .theme-browser,body.more-filters-opened.filters-applied.loading-themes .theme-browser{display:none}body.more-filters-opened.filters-applied .theme-browser{display:block}.more-filters-container .filters-group{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:right;width:19%;background:#fff;margin:0 0 0 1%;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);padding:10px}.more-filters-container .wide-filters-group{width:38%}.more-filters-container .feature-name{margin:0;position:relative}.more-filters-container ol{list-style-type:none;margin:20px 0 0;font-size:12px}.more-filters-container li{display:inline-block;vertical-align:top;list-style-type:none;margin:5px 0;padding-left:25px;width:160px}.theme-navigation .more-filters-container .apply-filters{margin:0 0 20px}.theme-navigation .more-filters-container .clear-filters{display:none;margin:0 10px 20px 0}.more-filters-container .apply-filters span{display:inline-block;font-size:12px;text-indent:10px;opacity:.8}.more-filters-container .filtering-by{display:none;margin:0}.more-filters-container .filtering-by>span{font-weight:600}.more-filters-container .filtering-by .tags{display:inline}.more-filters-container .filtering-by .tag{background:#fff;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);font-size:11px;margin:0 5px;padding:4px 8px}.more-filters-container .filtering-by a{margin-right:10px}body.filters-applied .more-filters-container .filters-group,body.filters-applied .more-filters-container a.button,body.filters-applied .more-filters-container br{display:none!important}body.filters-applied .more-filters-container .filtering-by{display:block}body.filters-applied .more-filters-container{padding:20px}p.no-themes{color:#999;font-size:18px;font-style:normal;margin:0;padding:0;text-align:center;display:none}body.no-results p.no-themes{display:block}.theme-install-php .add-new-theme,body.show-upload-theme p.no-themes{display:none!important}@media only screen and (max-width:1120px){.theme-install-php .theme-search{margin:20px 0;position:static;width:100%}.more-filters-container{border-bottom:1px solid #eee}.upload-theme .wp-upload-form{margin:20px 0;max-width:100%}.upload-theme .install-help{font-size:15px;padding:20px 0 0;text-align:right}.more-filters-container .filters-group{margin-bottom:0;margin-top:5px;width:100%}.more-filters-container .filters-group li{margin:10px 0}}@media only screen and (max-width:782px){.more-filters-container .filters-group,.more-filters-container .filters-group li{width:100%}}.rating{margin:30px 0}.rating span:before{color:#e6b800;content:"\f154";display:inline-block;-webkit-font-smoothing:antialiased;font:400 20px/1 dashicons;vertical-align:top}.rating-10 span.one:before,.rating-30 span.two:before,.rating-50 span.three:before,.rating-70 span.four:before,.rating-90 span.five:before{content:"\f459"}.rating-100 span.five:before,.rating-100 span.four:before,.rating-100 span.one:before,.rating-100 span.three:before,.rating-100 span.two:before,.rating-20 span.one:before,.rating-30 span.one:before,.rating-40 span.one:before,.rating-40 span.two:before,.rating-50 span.one:before,.rating-50 span.two:before,.rating-60 span.one:before,.rating-60 span.three:before,.rating-60 span.two:before,.rating-70 span.one:before,.rating-70 span.three:before,.rating-70 span.two:before,.rating-80 span.four:before,.rating-80 span.one:before,.rating-80 span.three:before,.rating-80 span.two:before,.rating-90 span.four:before,.rating-90 span.one:before,.rating-90 span.three:before,.rating-90 span.two:before{content:"\f155"}.rating .ratings{display:inline;margin-right:10px;line-height:20px;color:#999}.error .theme-browser,.loading-themes .theme-browser{display:none}.loading-themes .spinner{display:block;margin:40px auto 0;float:none}.appearance_page_custom-header #headimg{border:1px solid #DFDFDF;overflow:hidden;width:100%}.appearance_page_custom-header #upload-form p label{font-size:12px}.appearance_page_custom-header .available-headers .default-header{float:right;margin:0 0 20px 20px}.appearance_page_custom-header .random-header{clear:both;margin:0 0 20px 20px;vertical-align:middle}.appearance_page_custom-header .available-headers label input,.appearance_page_custom-header .random-header label input{margin-left: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}body.full-overlay-active{overflow:hidden}.wp-full-overlay{background:0 0;z-index:500000;position:fixed;overflow:visible;top:0;bottom:0;right:0;left: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;right:0;padding:0;margin:0;z-index:10;overflow:auto;background:#eee;border-left:0}.wp-full-overlay.collapsed .wp-full-overlay-sidebar{overflow:visible}.wp-full-overlay.collapsed,.wp-full-overlay.expanded .wp-full-overlay-sidebar{margin-right:0!important}.wp-full-overlay.expanded{margin-right:300px}.wp-full-overlay.collapsed .wp-full-overlay-sidebar{margin-right:-300px}.wp-full-overlay-sidebar:after{content:'';display:block;position:absolute;top:0;bottom:0;left:0;width:3px;z-index:1000}.wp-full-overlay-main{position:absolute;right:0;left:0;top:0;bottom:0;height:100%}.wp-full-overlay-sidebar .wp-full-overlay-header{position:absolute;right:0;left:0;height:45px;padding:0 15px;line-height:45px;z-index:10;margin:0;border-top:0;-webkit-box-shadow:none;box-shadow:none}.wp-full-overlay-sidebar .wp-full-overlay-header a.back{margin-top:9px}.wp-full-overlay-sidebar .wp-full-overlay-footer{bottom:0;border-bottom:0;border-top:0;-webkit-box-shadow:none;box-shadow:none}.wp-full-overlay-sidebar .wp-full-overlay-sidebar-content{position:absolute;top:45px;bottom:45px;right:0;left:0;overflow:auto}.wp-full-overlay .close-full-overlay{text-decoration:none}.wp-full-overlay a.collapse-sidebar{position:absolute;bottom:12px;right:0;z-index:50;display:block;width:19px;height:19px;margin-right:15px;padding:0;-webkit-border-radius:50%;border-radius:50%;color:#777;text-decoration:none}.wp-full-overlay a.collapse-sidebar:hover{color:#0074a2}.wp-full-overlay.collapsed .collapse-sidebar{position:absolute;right:100%}.wp-full-overlay .collapse-sidebar-arrow{position:static;margin-top:0;margin-right:0;display:block;width:auto;height:auto;background:0 0}.wp-full-overlay .collapse-sidebar-arrow:before{-webkit-border-radius:50%;border-radius:50%;float:right;content:"\f148";background:#eee;font:400 20px/1 dashicons;speak:none;display:block;padding:0;text-indent:0;text-align:center;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.rtl .wp-full-overlay .collapse-sidebar-arrow:before,.wp-full-overlay.collapsed .collapse-sidebar-arrow:before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.rtl .wp-full-overlay.collapsed .collapse-sidebar-arrow:before{-webkit-transform:none;-ms-transform:none;transform:none}.wp-full-overlay.collapsed .collapse-sidebar-arrow{background-position:-1px -109px}.wp-full-overlay .collapse-sidebar-label{position:absolute;right:100%;line-height:20px;margin-right:10px}.wp-full-overlay.collapsed .collapse-sidebar-label{display:none}.wp-full-overlay .theme-navigation{padding:10px 20px;position:absolute;bottom:10px;text-align:right}.wp-full-overlay .theme-navigation .next-theme{float:left}.wp-full-overlay.no-navigation .theme-navigation{display:none}.wp-full-overlay,.wp-full-overlay .collapse-sidebar,.wp-full-overlay-main,.wp-full-overlay-sidebar{-webkit-transition-property:right,left,top,bottom,width,margin;transition-property:right,left,top,bottom,width,margin;-webkit-transition-duration:.2s;transition-duration:.2s}.customize-support .hide-if-customize,.customize-support .wp-core-ui .hide-if-customize,.customize-support.wp-core-ui .hide-if-customize,.no-customize-support .hide-if-no-customize,.no-customize-support .wp-core-ui .hide-if-no-customize,.no-customize-support.wp-core-ui .hide-if-no-customize{display:none}#customize-container{display:none;background:#fff;z-index:500000;position:fixed;overflow:visible;top:0;bottom:0;right:0;left:0;height:100%}.customize-active #customize-container{display:block}.customize-loading #customize-container iframe{opacity:0}.customize-loading #customize-container{background:#fff url(../images/spinner.gif) no-repeat fixed center center;-webkit-background-size:20px 20px;background-size:20px 20px}#customize-container iframe,.theme-install-overlay iframe{height:100%;width:100%;z-index:20;-webkit-transition:opacity .3s;transition:opacity .3s}#customize-container .collapse-sidebar{bottom:16px}#customize-controls{margin-top:0}.theme-install-overlay{display:none}.theme-install-overlay.single-theme{display:block}.install-theme-info{display:none;padding:10px 20px 60px}.single-theme .install-theme-info{padding-top:15px}.theme-install-overlay .install-theme-info{display:block}.install-theme-info .theme-install{float:left;margin-top:18px}.install-theme-info .theme-name{font-size:16px;line-height:24px;margin-bottom:0;margin-top: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:right}.theme-details .star-rating{margin:7px 0;float:left}.theme-details .theme-description{float:right;color:#777;line-height:20px;max-width:100%}.theme-install-overlay .wp-full-overlay-header{margin-top:9px}.theme-install-overlay .wp-full-overlay-header .theme-install{float:left;line-height:26px}.theme-install-overlay .wp-full-overlay-sidebar{background:#EEE;border-left:1px solid #DDD}.theme-install-overlay .wp-full-overlay-main{background:#fff url(../images/spinner.gif) no-repeat center center;-webkit-background-size:20px 20px;background-size:20px 20px}@media print,(-o-min-device-pixel-ratio:5/4),(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.wp-full-overlay .collapse-sidebar-arrow{background-image:url(../images/arrows-2x.png);-webkit-background-size:15px 123px;background-size:15px 123px}.customize-loading #customize-container,.theme-install-overlay .wp-full-overlay-main{background-image:url(../images/spinner-2x.gif)}}@media screen and (max-width:782px){.available-theme .action-links .delete-theme{float:none;margin:0;padding:0;clear:both}.available-theme .action-links .delete-theme a{padding:0}}.press-this #message{border-right:4px solid #7ad03a;padding:1px 12px;background-color:#fff;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}.press-this #side-sortables .category-tabs li{display:inline;line-height:1.35em}body.press-this ul.category-tabs li.tabs a{color:#333}.press-this #content-resize-handle{bottom:2px}body.press-this{color:#333;margin:0;padding:0;min-width:708px;min-height:400px}.press-this #titlediv #title{font-size:1.4em}.press-this #site-heading:before{top:3px;position:relative;display:inline-block;font:400 18px/1 dashicons;speak:none;color:#727272;content:'\f120';-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.press-this #wphead{height:32px;margin-right:0;margin-left:0;margin-bottom:5px}.press-this #header-logo{float:right;margin:7px 7px 0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.press-this #wphead h1{font-weight:400;font-size:16px;line-height:32px;margin:0;float:right}.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 .posting{margin-left:250px}.press-this-sidebar{float:left;width:240px;padding-top:10px}.press-this #title{margin-right:0;margin-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.press-this .tagchecklist{margin-top:8px}.press-this #titlediv{margin:0}.press-this #wp-content-wrap #wp-content-editor-tools{padding:0;top:3px;overflow:hidden}.press-this .wp-media-buttons{cursor:default;padding:8px 8px 6px}.press-this #wp-content-wrap #wp-content-media-buttons a{padding:0;line-height:normal;height:auto;font-size:16px}.press-this #wp-content-wrap .mce-toolbar .mce-btn-group .mce-btn{margin:0 1px}.press-this #wp-content-wrap .mce-toolbar .mce-btn button{padding:2px 3px}.press-this #wp-content-wrap .quicktags-toolbar,.press-this #wp-content-wrap div.mce-toolbar-grp{padding-left:3px}.press-this .howto{margin-top:2px;margin-bottom:3px;font-size:12px;font-style:italic;display:block}.press-this #wp-content-editor-container{clear:none}.press-this #poststuff .inside{margin-top:18px}.press-this .category-tabs{margin-bottom:3px}.press-this #poststuff{margin:0 8px;padding:0}.press-this #photo-add-url-div input[type=text]{width:220px}#poststuff #editor-toolbar{height:30px}.posting{margin-left: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:left}.press-this #poststuff h2,.press-this #poststuff h3{font-size:14px;line-height:1}.press-this #categorydiv h3,.press-this #tagsdiv-post_tag h3{cursor:pointer}.press-this #submitdiv h3{cursor:default}h3.tb{font-weight:600;font-size:12px;margin-right:5px}.press-this .postbox,.press-this .stuffbox{margin-bottom:10px;min-width:0}.press-this #submitdiv:hover .handlediv{background:0 0}.tbtitle{font-size:1.7em;outline:0;padding:3px 4px;border:1px solid #dfdfdf}.press-this .actions{float:left;margin:-19px 0 0}.press-this #extra-fields .actions{margin:-32px 0 0 -7px}.press-this .actions li{float:right;list-style:none;margin-left:10px}#extra-fields .button{margin-left: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;overflow:hidden}#waiting span{float:left;margin:0 5px 0 0}#waiting .spinner{display:block}#extra-fields .postbox{margin-bottom:5px}#extra-fields .titlewrap{padding:0;overflow:auto;height:120px}#img_container a{float:right;overflow:hidden}#img_container a,#img_container img{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:active,#img_container a:hover{border-color:#000;z-index:1000;border-width:1px}#embed-code{width:100%;height:98px}.press-this .categorydiv div.tabs-panel{height:100px}.press-this .tagsdiv .newtag{width:120px}.press-this #content{margin:5px 0;padding:0 5px;border:0 none;height:340px;font-family:Consolas,Monaco,monospace;font-size:13px;line-height:19px;background:0 0}.press-this #publishing-actions .spinner{display:inline;vertical-align:middle}@media screen and (max-width:782px){.press-this ul.category-tabs li.tabs{padding:3px 5px 5px}.press-this a.wp-switch-editor{font:13px/19px "Open Sans",sans-serif;margin:5px 5px 0 0;padding:3px 8px 4px}.press-this #wp-content-media-buttons a{padding:0;line-height:normal;height:auto}.press-this #wp-content-editor-tools{padding:0;top:3px}.press-this .category-tabs{margin-top:0}.press-this .tagsdiv .newtag{width:120px;padding:3px 5px;margin-bottom:0}.press-this .tagchecklist{padding:0;margin-bottom:0}.press-this .wp_themeSkin a.mceButton{width:20px;height:20px}.press-this .wp_themeSkin .mceButton .mceIcon{margin:0}.press-this #poststuff h3,.press-this .metabox-holder h3{padding:7px 12px}.press-this input[type=checkbox],.press-this input[type=radio]{height:16px;width:16px}.press-this input[type=checkbox]:checked:before{width:16px;font:400 21px/1 dashicons;margin:-3px -4px 0 0}.press-this input[type=radio]:checked:before{font:400 21px/1 dashicons;width:6px;height:6px;margin:4px}.press-this ul.categorychecklist li,.press-this ul.categorychecklist ul{margin-top:0;margin-bottom:0}.press-this div.quicktags-toolbar input{padding:2px 4px}.press-this input,.press-this textarea{font-size:14px}.press-this .tagchecklist span{font-size:13px;line-height:1.8em}}.about-wrap{position:relative;margin:25px 20px 0 40px;max-width:1050px;font-size:15px}.about-wrap div.error,.about-wrap div.updated{display:none!important}.about-wrap hr{border:0;height:0;margin:0;border-top:1px solid rgba(0,0,0,.1)}.about-wrap img{margin:0;max-width:100%;vertical-align:middle}.about-wrap p{line-height:1.6em;font-size:14px}.about-wrap h1{margin:.2em 0 0 200px;color:#333;line-height:1.2em;font-size:2.8em;font-weight:400}.about-wrap h4{color:#222}.about-wrap .about-text,.about-wrap li.wp-person a.web,.about-wrap p.about-description{font-weight:400;line-height:1.6em;font-size:19px}.about-description{margin-top:1.4em}.about-text{margin:1em 0 1em 200px;min-height:60px;color:#777;font-size:24px}.about-wrap .changelog h2.about-headline-callout{margin:1.1em 0 .2em;font-size:2.4em;font-weight:300;line-height:1.3;text-align:center}.about-wrap h3{margin:1em 0 .6em;font-size:1.5em;line-height:1.5em}.customize h3{margin-top:1.75em;text-align:center}.about-wrap .feature-section h4{margin:1.4em 0 .6em;font-size:1.2em}.about-wrap .feature-section p{margin-top:.6em}.about-wrap code,.about-wrap ol li p{font-size:14px}.about-wrap .button.button-large{padding:8px 20px 10px!important;height:46px!important;font-size:14px;line-height:28px!important}.about-wrap .about-overview-img{margin:0}.about-wrap .point-releases{margin-top:5px;border-bottom:1px solid #dfdfdf}.about-wrap .changelog.point-releases h3{padding-top:35px}.about-wrap .changelog.point-releases h3:first-child{padding-top:7px}.wp-badge{background:#0074a2 url(../images/w-logo-white.png?ver=20131202) no-repeat;background:#0074a2,url(../images/wordpress-logo-white.svg?ver=20131110) no-repeat;background-position:center 24px;-webkit-background-size:85px 85px;background-size:85px 85px;color:#78c8e6;font-size:14px;text-align:center;font-weight:600;margin:5px 0 0;padding-top:120px;height:40px;display:inline-block;width:150px;text-rendering:optimizeLegibility;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.2);box-shadow:0 1px 3px rgba(0,0,0,.2)}.about-wrap .wp-badge{position:absolute;top:0;left:0}.about-wrap h2.nav-tab-wrapper{padding-right:6px}.about-wrap h2 .nav-tab{padding:4px 15px 6px;margin:0 0 -1px 3px;font-size:18px;vertical-align:top;border-width:1px}.about-overview{margin-top:40px;text-align:center}.about-overview .wp-video{margin:0 auto}.changelog .wp-playlist .wp-playlist-current-item img{height:64px;width:auto;max-width:100%}.about-wrap .feature-section{margin-top:40px;padding-bottom:20px}.about-wrap .feature-section.two-col>div{position:relative;width:47.5%;margin-left:4.999999999%;float:right}.about-wrap .feature-section.three-col>div{position:relative;width:29.95%;margin-left:4.999999999%;float:right}.about-wrap .feature-section.col .last-feature{margin-left:0}.about-wrap .under-the-hood .feature-section{margin-top:0}.about-wrap .changelog .feature-section{overflow:hidden}.about-wrap .feature-section.two-col div p{margin-left:3%}.about-wrap .feature-section div p img{float:left;margin-right:10px;max-width:20%}.about-wrap .changelog li{list-style-type:disc;margin-right:3em}.about-wrap .return-to-dashboard{margin:30px -5px 0 0;font-size:14px;font-weight:700}.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:0 5px;margin:0 -5px 0 -15px}.about-wrap ul.compact{margin-bottom:0}.about-wrap li.wp-person{float:right;margin-left:10px}.about-wrap li.wp-person img.gravatar{float:right;margin:0 0 10px 10px;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:700}.freedoms-php .about-wrap ol p{font-weight:400;margin:.6em 0}@media screen and (max-width:782px){.about-wrap .feature-section.one-col>div,.about-wrap .feature-section.three-col>div,.about-wrap .feature-section.two-col>div{width:100%;margin:0 0 40px;padding:0 0 40px;float:none;border-bottom:1px solid rgba(0,0,0,.1)}.about-wrap .feature-section.col>div.last-feature,.about-wrap .under-the-hood .feature-section>div{margin:0;padding:0;border-bottom:0}}@media only screen and (max-width:500px){.about-wrap{margin-left:20px;margin-right:10px}.about-text,.about-wrap h1{margin-left:0}.about-text{margin-bottom:.25em}.about-wrap .wp-badge{position:relative;margin-bottom:1.5em;width:100%}.about-wrap .feature-section.three-col div{width:100%;float:none}.about-wrap .three-col.about-updates .col-1{padding:0;float:none}.about-wrap .three-col.about-updates .col-2{margin:0 0 20px;width:100%;float:none}}.no-js #message{display:block}ul.add-menu-item-tabs li{padding:3px 8px 3px 5px}.accordion-section ul.add-menu-item-tabs,.accordion-section ul.category-tabs,.accordion-section ul.wp-tab-bar{margin:0}.accordion-section .categorychecklist{margin:13px 0}#nav-menu-meta .accordion-section-content{padding:18px 13px}#nav-menu-meta .button-controls{margin-bottom:0}#nav-menus-frame{margin-right:300px;margin-top:23px}#wpbody-content #menu-settings-column{display:inline;width:281px;margin-right:-300px;clear:both;float:right;padding-top:0}#menu-settings-column .inside{clear:both;margin:10px 0 0}.metabox-holder-disabled .accordion-section-content,.metabox-holder-disabled .accordion-section-title,.metabox-holder-disabled .postbox{opacity:.5;filter:alpha(opacity=50)}.metabox-holder-disabled .button-controls .select-all{display:none}#wpbody{position:relative}.blank-slate .menu-name{height:2em}.blank-slate .menu-settings{border:0;margin-top:0;padding-top:0;overflow:hidden}.is-submenu{color:#999;font-style:italic;font-weight:400;margin-right:4px}.manage-menus{margin-top:23px;padding:10px;overflow:hidden;background:#fbfbfb}.manage-menus select{float:right;margin-left:6px}.manage-menus .selected-menu{float:right;margin:5px 0 0 6px}.manage-menus .submit-btn{float:right;margin-top:1px}.menu-edit p{margin:.3em 0 .6em}.menu-edit #post-body-content h3{margin:1em 0 10px}.menu-settings{border-top:1px solid #eee;margin-top:2em}.menu-settings dl{margin:0 0 10px;overflow:hidden;padding-right:18%}.menu-settings dd{float:right;margin:0;width:100%}.menu-settings dt{float:right;clear:both;width:21.951%;padding:3px 0 0;margin-right:-21.951%}.menu-settings label{vertical-align:baseline}.menu-edit .checkbox-input{margin-top:4px}.theme-location-set{color:#999;font-size:11px}#menu-management-liquid{float:right;min-width:100%;margin-top:3px}#menu-management{position:relative;margin-left:20px;margin-top:-3px;width:100%;background:#f5f5f5}#menu-management .menu-edit{margin-bottom:20px}.nav-menus-php #post-body{padding:0 10px 10px;border-top:1px solid #fff;border-bottom:1px solid #dfdfdf;background:#fff}#nav-menu-footer,#nav-menu-header{padding:0 10px}#nav-menu-header{border-bottom:1px solid #dfdfdf;margin-bottom:0}#nav-menu-header .menu-name-label{margin-top:4px}.nav-menus-php #post-body div.error,.nav-menus-php #post-body div.updated{margin:0}.nav-menus-php #post-body-content{position:relative;float:none}#menu-management .menu-add-new abbr{font-weight:600}#select-nav-menu-container{text-align:left;padding:0 10px 3px;margin-bottom:5px}#select-nav-menu{width:100px;display:inline}#menu-name-label{margin-top:-2px}.widefat td.menu-location-menus{padding-bottom:5px}.menu-location-menus select{float:right}#locations-nav-menu-wrapper{padding:5px 0}.locations-nav-menu-select select{float:right;width:160px;margin-left:5px}.locations-row-links{float:right;margin:6px 6px 0 0}.locations-add-menu-link,.locations-edit-menu-link{margin:0 3px}.locations-edit-menu-link{padding-left:3px;border-left:1px solid #ccc}#wpbody .open-label{display:block;float:right}#wpbody .open-label span{padding-left:10px}.js .input-with-default-title{color:#aaa;font-style:italic}#menu-management .inside{padding:0 10px}.accordion-container .howto input,.postbox .howto input{width:180px;float:left}.accordion-container .outer-border{margin:0}.customlinkdiv .howto input{width:180px}.customlinkdiv p{margin-top:0}#nav-menu-theme-locations .howto select{width:100%}#nav-menu-theme-locations .button-controls{text-align:left}.add-menu-item-view-all{height:400px}#menu-container .submit{margin:0 0 10px;padding:0}.nav-menus-php .add-new-menu-action{float:right;margin:6px 6px 0 0;line-height:15px}.nav-menus-php .meta-sep,.nav-menus-php .submitcancel,.nav-menus-php .submitdelete{display:block;float:right;margin:6px 0;line-height:15px}.meta-sep{padding:0 2px}#cancel-save{text-decoration:underline;font-size:12px;margin-right:20px;margin-top:5px}.button-primary.right,.button-secondary.right,.button.right{float:left}.list-controls{float:right;margin-top:5px}.add-to-menu{float:left}.postbox .spinner{display:none;vertical-align:middle}.button-controls{clear:both;margin:10px 0}.hide-all,.show-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:right;margin-top:5px;padding-left:5px}.menu-item-textbox{width:180px}.nav-menus-php .howto span{margin-top:6px;display:block;float:right}.quick-search{width:190px}.nav-menus-php .list-wrap{display:none;clear:both;margin-bottom:10px}.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-left:3px;margin-top:-3px}.menu-item-title input[type=checkbox]{display:inline-block;margin-top:-4px}#menu-container .inside{padding-bottom:10px}.menu{padding-top:1em}#menu-to-edit{margin:0;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:9px 0 0}.menu-item-bar .menu-item-handle{border:1px solid #dfdfdf;position:relative;padding:10px 15px;height:auto;width:382px;line-height:30px;overflow:hidden;word-wrap:break-word}.menu-item-bar .menu-item-handle:hover{border-color:#999}#menu-to-edit .menu-item-invalid .menu-item-handle{background:#f6c9cc;border-color:#f1acb1}.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;background-color:#f66}.menu-item-handle .item-title{font-size:13px;font-weight:600;line-height:20px;display:block;margin-left: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-right:0}.menu-item-depth-1{margin-right:30px}.menu-item-depth-2{margin-right:60px}.menu-item-depth-3{margin-right:90px}.menu-item-depth-4{margin-right:120px}.menu-item-depth-5{margin-right:150px}.menu-item-depth-6{margin-right:180px}.menu-item-depth-7{margin-right:210px}.menu-item-depth-8{margin-right:240px}.menu-item-depth-9{margin-right:270px}.menu-item-depth-10{margin-right:300px}.menu-item-depth-11{margin-right:330px}.menu-item-depth-0 .menu-item-transport{margin-right:0}.menu-item-depth-1 .menu-item-transport{margin-right:-30px}.menu-item-depth-2 .menu-item-transport{margin-right:-60px}.menu-item-depth-3 .menu-item-transport{margin-right:-90px}.menu-item-depth-4 .menu-item-transport{margin-right:-120px}.menu-item-depth-5 .menu-item-transport{margin-right:-150px}.menu-item-depth-6 .menu-item-transport{margin-right:-180px}.menu-item-depth-7 .menu-item-transport{margin-right:-210px}.menu-item-depth-8 .menu-item-transport{margin-right:-240px}.menu-item-depth-9 .menu-item-transport{margin-right:-270px}.menu-item-depth-10 .menu-item-transport{margin-right:-300px}.menu-item-depth-11 .menu-item-transport{margin-right:-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{color:#777;font-size:12px;padding:12px 10px;line-height:18px;display:block}.item-controls{font-size:12px;position:absolute;left:20px;top:-1px}.item-controls a{text-decoration:none}.item-controls a:hover{cursor:pointer}.item-controls .item-order{padding-left:10px}.nav-menus-php .item-edit{position:absolute;left:-20px;top:0;display:block;width:30px;height:40px;margin-left:0!important;text-indent:100%;outline:0;overflow:hidden;white-space:nowrap}.menu-instructions-inactive{display:none}.menu-item-settings{display:block;width:402px;padding:10px 10px 10px 0;position:relative;z-index:10;border:1px solid #e5e5e5;border-top:0;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04)}.menu-item-settings .field-move a{display:none;margin:0 2px}.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;border:1px solid #dfdfdf;color:#777;font-size:12px;font-style:italic}.link-to-original a{padding-right:4px;font-style:normal}.hidden-field{display:none}.menu-item-settings .description-thin,.menu-item-settings .description-wide{margin-left:10px;float:right}.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 6px}.nav-menus-php .major-publishing-actions .publishing-action{text-align:left;float:left;line-height:23px;margin:4px 0 1px}.nav-menus-php .blank-slate .menu-settings{display:none}.nav-menus-php .delete-action{float:right;margin-top:2px}.nav-menus-php .submitbox .submitcancel{border-bottom:1px solid #0074a2;padding:1px 2px;color:#0074a2;text-decoration:none}.nav-menus-php .submitbox .submitcancel:hover{background:#0074a2;color:#fff}.nav-menus-php .major-publishing-actions .form-invalid{padding-right:4px;margin-right:-4px}#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}#menu-item-name-wrap,#menu-item-url-wrap,#nav-menus-frame,.button-controls{display:block}@media screen and (max-width:782px){body.nav-menus-php{min-width:0!important}#nav-menus-frame{margin-right:0;float:none;width:100%}#wpbody-content #menu-settings-column{display:block;width:100%;float:none;margin-right:0}#side-sortables .add-menu-item-tabs{margin:15px 0 14px}ul.add-menu-item-tabs li.tabs{padding:13px 15px 14px}.nav-menus-php .item-controls .item-type{margin-top:2px}.nav-menus-php .customlinkdiv .howto input{width:65%}.nav-menus-php .quick-search{width:85%}#menu-management-liquid{margin-top:25px}.nav-menus-php .menu-name-label.howto span{margin-top:13px}.menu-name-label #menu-name{margin-top:4px}.nav-menus-php .major-publishing-actions .publishing-action{margin-top:6px}.nav-menus-php .delete-action{font-size:14px;line-height:50px;margin-top:12px}.description-wide,.menu-item-bar .menu-item-handle,.menu-item-settings{width:auto}.menu-item-settings{padding:10px}.menu-item-settings .description-thin,.menu-item-settings .description-wide{width:100%;height:auto}.menu-item-settings input{width:100%}.menu-settings dl{padding-right:0}.menu-settings dd{float:none;width:100%;margin-bottom:15px}.menu-settings dt{float:none;width:auto;margin-right:0;margin-bottom:15px}}@media only screen and (max-width:768px){#menu-locations-wrap .widefat{width:100%}}.widget{margin:0 auto 10px;position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.widget-top{font-size:13px;font-weight:600;background:#f7f7f7}.widget-top a.widget-action,.widget-top a.widget-action:hover{text-decoration:none}.widget-title h4{margin:0;padding:15px;line-height:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.widgets-holder-wrap .widget-inside{border-top:0;padding:1px 15px 15px;line-height:16px}#available-widgets .widget-description,#widgets-right a.widget-control-edit,.in-widget-title{color:#666}.deleting .widget-title,.deleting .widget-top a.widget-action:after{color:#aaa}.widget.ui-draggable-dragging{min-width:100%}.widget.ui-sortable-helper{opacity:.8}.widget-placeholder{border:1px dashed #bbb;margin:0 auto 10px;height:45px;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#widgets-right .widget-placeholder{margin-top:0}#widgets-right .closed .widget-placeholder{height:0;border:0;margin-top:-10px}.sidebar-name{position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.sidebar-name-arrow{position:absolute;top:0;left:0;bottom:0}.js .sidebar-name{cursor:pointer}.sidebar-name h3{margin:0;padding:8px 10px;overflow:hidden;white-space:nowrap}.widgets-holder-wrap .description{padding:0 0 15px;margin:0;font-style:normal;color:#777}#widgets-right .widgets-holder-wrap .description{padding-right:7px;padding-left:7px}div.widget-liquid-left{margin:0;width:38%;float:right}div.widget-liquid-right{float:left;width:58%}div#widgets-left{padding-top:12px}div#widgets-left .closed .sidebar-name,div#widgets-left .inactive-sidebar.closed .sidebar-name{margin-bottom:10px}div#widgets-left .sidebar-name h3{padding:10px 0;margin:0 0 0 10px}div#widgets-left .sidebar-name .sidebar-name-arrow:before{left:0;top:4px;padding:4px 4px 4px 6px}#widgets-left #available-widgets,div#widgets-left .widget-holder{background:0 0;border:0}#widgets-left .widgets-holder-wrap{border:0;-webkit-box-shadow:none;box-shadow:none}#available-widgets .widget-action{display:none}#available-widgets .widget{margin:0}#available-widgets .widget:nth-child(odd){clear:both}#available-widgets .widget .widget-description{display:block;padding:10px 15px;font-size:12px}#available-widgets #widget-list{position:relative}#widgets-left .inactive-sidebar{clear:both;width:100%;background:0 0;padding:0;margin:0 0 20px;border:0;-webkit-box-shadow:none;box-shadow:none}#widgets-left .inactive-sidebar.first{margin-top:40px}div#widgets-left .inactive-sidebar .widget.expanded{right:auto}.widget-title-action{float:left;position:relative}div#widgets-left .inactive-sidebar .widgets-sortables{min-height:42px;padding:0;background:0 0;margin:0;position:relative}div#widgets-right:after{content:".";display:block;height:0;clear:both;visibility:hidden}div#widgets-right .sidebars-column-1,div#widgets-right .sidebars-column-2{max-width:450px}div#widgets-right .widgets-holder-wrap{margin:10px 0 0}div#widgets-right .sidebar-description{min-height:20px;margin-top:-5px}div#widgets-right .sidebar-name h3{padding:15px 7px}div#widgets-right .sidebar-name .sidebar-name-arrow:before{left:0;top:4px}div#widgets-right .widget-top{padding:0}div#widgets-right .widgets-sortables{padding:0 8px;margin-bottom:9px;position:relative;min-height:123px}div#widgets-right .closed .widgets-sortables{min-height:0;margin-bottom:0}.sidebar-name .spinner{margin:-5px 5px;float:none}#widgets-right .widgets-holder-wrap.widget-hover{border-color:#777;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.3);box-shadow:0 1px 2px rgba(0,0,0,.3)}.widgets_access #widgets-left .widget .widget-top{cursor:auto}.widgets_access #wpwrap .widget-control-edit,.widgets_access #wpwrap .widgets-holder-wrap.closed .sidebar-description,.widgets_access #wpwrap .widgets-holder-wrap.closed .widget{display:block}.widgets_access #widgets-left .widget .widget-top:hover,.widgets_access #widgets-right .widget .widget-top:hover{border-color:#ddd}#available-widgets .widget-control-edit .edit,#widgets-left .inactive-sidebar .widget-control-edit .add,#widgets-right .widget-control-edit .add{display:none}.widget-control-edit{display:block;color:#666;background:#EEE;padding:0 15px;line-height:43px;border-right:1px solid #DDD}#widgets-left .widget-control-edit:hover,#widgets-right .widget-control-edit:hover{color:#fff;background:#444;border-right:0;outline:1px solid #444}.widgets-holder-wrap .sidebar-description,.widgets-holder-wrap .sidebar-name{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.editwidget{margin:0 auto}.editwidget .widget-inside{display:block;padding:0 15px}.editwidget .widget-control-actions{margin-top:20px}.js .closed br.clear,.js .widgets-holder-wrap.closed .sidebar-description,.js .widgets-holder-wrap.closed .widget,.widget-description,.widget-inside{display:none}.widget-inside{background:#fff}#removing-widget{display:none;font-weight:400;padding-right:15px;font-size:12px;line-height:1;color:#000}.js #removing-widget{color:#2ea2cc}#access-off,.no-js .widget-holder .description,.widget-control-noform,.widgets_access #access-on,.widgets_access .sidebar-name-arrow,.widgets_access .widget-action,.widgets_access .widget-holder .description{display:none}.widgets_access #widget-list,.widgets_access .widget-holder{padding-top:10px}.widgets_access #access-off{display:inline}.widgets_access .sidebar-name,.widgets_access .widget .widget-top{cursor:default}.widget-liquid-left #widgets-left.chooser #available-widgets .widget,.widget-liquid-left #widgets-left.chooser .inactive-sidebar{-webkit-transition:opacity .1s linear;transition:opacity .1s linear;opacity:.2;pointer-events:none}.widget-liquid-left #widgets-left.chooser #available-widgets .widget-in-question{opacity:1;pointer-events:auto}#available-widgets .widget-top:hover,#widgets-left .widget-in-question .widget-top,#widgets-left .widget-top:hover,.widgets-chooser ul,div#widgets-right .widget-top:hover{border-color:#999;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.1);box-shadow:0 1px 2px rgba(0,0,0,.1)}.widgets-chooser ul.widgets-chooser-sidebars{margin:0;list-style-type:none;max-height:300px;overflow:auto}.widgets-chooser{display:none}.widgets-chooser ul{border:1px solid #ccc}.widgets-chooser li{padding:10px 35px 10px 15px;border-bottom:1px solid #ccc;background:#fff;margin:0;cursor:pointer;outline:0;position:relative;-webkit-transition:background .2s ease-in-out;transition:background .2s ease-in-out}.widgets-chooser li:focus,.widgets-chooser li:hover{background:rgba(255,255,255,.7)}.widgets-chooser li:focus:before{content:'\f147';display:block;-webkit-font-smoothing:antialiased;font:400 26px/1 dashicons;color:#999;position:absolute;top:7px;right:5px}.widgets-chooser li:last-child{border:0}.widgets-chooser li.widgets-chooser-selected{background:#2ea2cc;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{content:'\f147';display:block;-webkit-font-smoothing:antialiased;font:400 26px/1 dashicons;color:#fff;position:absolute;top:7px;right:5px}.widgets-chooser .widgets-chooser-actions{padding:10px 0 12px;text-align:center}.widgets-chooser button{margin-left:5px}#available-widgets .widget .widget-top{cursor:pointer}@media screen and (max-width:480px){div.widget-liquid-left{width:100%;float:none;border-left:0;padding-left:0}#widgets-left #available-widgets .widget-top,#widgets-left .inactive-sidebar .widgets-sortables,#widgets-left .sidebar-name{margin-left:0}div.widget-liquid-right{width:100%;float:none}div.widget{margin:0 auto 10px!important;max-width:480px}}@media screen and (max-width:320px){div.widget{max-width:320px}}@media only screen and (min-width:1250px){#widgets-left #available-widgets .widget{width:49%;float:right}.widget.ui-draggable-dragging{min-width:49%}#widgets-left #available-widgets .widget:nth-child(even){float:left}#widgets-right .sidebars-column-1,#widgets-right .sidebars-column-2{float:right;width:49%}#widgets-right .sidebars-column-1{margin-left:2%}#widgets-right.single-sidebar .sidebars-column-1,#widgets-right.single-sidebar .sidebars-column-2{float:none;width:100%;margin:0}}body.rtl,body.rtl .press-this a.wp-switch-editor{font-family:Tahoma,Arial,sans-serif}body.locale-he-il,body.locale-he-il .press-this a.wp-switch-editor{font-family:Arial,sans-serif}.locale-he-il em{font-style:normal;font-weight:700}.locale-zh-cn #local-time,.locale-zh-cn #utc-time,.locale-zh-cn .form-wrap p,.locale-zh-cn .howto,.locale-zh-cn .inline-edit-row fieldset span.checkbox-title,.locale-zh-cn .inline-edit-row fieldset span.title,.locale-zh-cn .js .input-with-default-title,.locale-zh-cn .link-to-original,.locale-zh-cn .tablenav .displaying-num,.locale-zh-cn p.description,.locale-zh-cn p.help,.locale-zh-cn p.install-help,.locale-zh-cn span.description{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-de-de .inline-edit-row fieldset label span.title{width:7em}.locale-de-de .inline-edit-row fieldset label span.input-text-wrap{margin-right:7em}.locale-de-de #customize-header-actions .button{padding:0 5px 1px}.locale-de-de #customize-header-actions .spinner{margin:16px 3px 0}.locale-ru-ru .inline-edit-row fieldset label span.title{width:8em}.locale-ru-ru .inline-edit-row fieldset label span.input-text-wrap{margin-right:8em}.locale-ru-ru.post-php .tagsdiv .newtag{width:165px}.locale-ru-ru.press-this .posting{margin-left:277px}.locale-ru-ru .press-this-sidebar{width:265px}.locale-ru-ru #customize-header-actions .button{padding:0 5px 1px}.locale-ru-ru #customize-header-actions .spinner{margin:16px 3px 0}.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-right:8em} \ No newline at end of file diff --git a/wp-admin/css/wp-admin.css b/wp-admin/css/wp-admin.css new file mode 100644 index 0000000..b29af79 --- /dev/null +++ b/wp-admin/css/wp-admin.css @@ -0,0 +1,14 @@ +@import url(common.css); +@import url(forms.css); +@import url(admin-menu.css); +@import url(dashboard.css); +@import url(list-tables.css); +@import url(edit.css); +@import url(revisions.css); +@import url(media.css); +@import url(themes.css); +@import url(press-this.css); +@import url(about.css); +@import url(nav-menus.css); +@import url(widgets.css); +@import url(l10n.css); diff --git a/wp-admin/css/wp-admin.min.css b/wp-admin/css/wp-admin.min.css new file mode 100644 index 0000000..15ded2f --- /dev/null +++ b/wp-admin/css/wp-admin.min.css @@ -0,0 +1 @@ +#wpwrap{height:auto;min-height:100%;width:100%;position:relative;-webkit-font-smoothing:subpixel-antialiased}#wpcontent{height:100%}#wpcontent,#wpfooter{margin-left:180px}.folded #wpcontent,.folded #wpfooter{margin-left:56px}#wpbody-content{padding-bottom:65px;float:left;width:100%;overflow:visible!important}.inner-sidebar{float:right;clear:right;display:none;width:281px;position:relative}.columns-2 .inner-sidebar{margin-right:auto;width:286px;display:block}.columns-2 .inner-sidebar #side-sortables,.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,.ui-helper-hidden-accessible{position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0}.screen-reader-shortcut{position:absolute;top:-1000em}.screen-reader-shortcut:focus{left:6px;top:-25px;height:auto;width:auto;display:block;font-size:14px;font-weight:600;padding:15px 23px 14px;background:#f1f1f1;color:#21759b;z-index:100000;line-height:normal;-webkit-box-shadow:0 0 2px 2px rgba(0,0,0,.6);box-shadow:0 0 2px 2px rgba(0,0,0,.6);text-decoration:none;outline:0}.hidden,.js .closed .inside,.js .hide-if-js,.js .wp-core-ui .hide-if-js,.js.wp-core-ui .hide-if-js,.no-js .hide-if-no-js,.no-js .wp-core-ui .hide-if-no-js,.no-js.wp-core-ui .hide-if-no-js{display:none}#menu-management .menu-edit,#menu-settings-column .accordion-container,.feature-filter,.imgedit-group,.manage-menus,.menu-item-handle,.popular-tags,.stuffbox,.widget-inside,.widget-top,.widgets-holder-wrap,.wp-editor-container,p.popular-tags,table.widefat{border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04)}.feature-filter,.imgedit-group,.popular-tags,.stuffbox,.widgets-holder-wrap,.wp-editor-container,p.popular-tags,table.widefat{background:#fff}body,html{height:100%;margin:0;padding:0}html{background:#f1f1f1}body{color:#444;font-family:"Open Sans",sans-serif;font-size:13px;line-height:1.4em;min-width:600px}body.iframe{min-width:0;padding-top:1px}iframe,img{border:0}td{font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit}a{color:#0074a2;-webkit-transition-property:border,background,color;transition-property:border,background,color;-webkit-transition-duration:.05s;transition-duration:.05s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}a,div{outline:0}a:active,a:hover{color:#2ea2cc}a:focus{color:#124964}a:active,a:focus{outline:thin dotted}#adminmenu a:active,#adminmenu a:focus,.screen-reader-text:focus{outline:0}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}p{font-size:13px;line-height:1.5;margin:1em 0}blockquote{margin:1em}dd,li{margin-bottom:6px}h1,h2,h3,h4,h5,h6{display:block;font-weight:600}h1{font-size:2em;margin:.67em 0}h2{color:#222;font-size:1.5em;margin:.83em 0;font-weight:400}h3{color:#222;font-size:1.3em;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}ol,ul{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}ol.ol-decimal,ul.ul-disc,ul.ul-square{margin-left:1.8em}ol.ol-decimal>li,ul.ul-disc>li,ul.ul-square>li{margin:0 0 .5em}.ltr{direction:ltr}.code,code{font-family:Consolas,Monaco,monospace;direction:ltr}code,kbd{padding:3px 5px 2px;margin:0 1px;background:#eaeaea;background:rgba(0,0,0,.07);font-size:13px}.subsubsub{list-style:none;margin:8px 0 0;padding:0;font-size:13px;float:left;color:#666}.subsubsub a{line-height:2;padding:.2em;text-decoration:none}.subsubsub a .count,.subsubsub a.current .count{color:#999;font-weight:400}.subsubsub a.current{font-weight:600;border:0}.subsubsub li{display:inline-block;margin:0;padding:0;white-space:nowrap}.widefat{border-spacing:0;width:100%;clear:both;margin:0}.widefat *{word-wrap:break-word}.widefat a{text-decoration:none}.widefat td,.widefat th{padding:8px 10px}.widefat thead th{border-bottom:1px solid #e1e1e1}.widefat tfoot th{border-top:1px solid #e1e1e1;border-bottom:0}.widefat .no-items td{border-bottom-width:0}.widefat td{vertical-align:top}.widefat td,.widefat td ol,.widefat td p,.widefat td ul{font-size:13px;line-height:1.5em}.widefat th{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:6px 0 25px;vertical-align:top}.widefat th input[type=checkbox]{margin-top:-1px}.widefat.media .check-column{padding-top:8px}.widefat tbody th.check-column,.widefat tfoot th.check-column,.widefat thead th.check-column{padding:11px 0 0 3px}.widefat thead th.check-column{padding-top:10px}.update-php div.error,.update-php div.updated{margin-left:0}.no-js .widefat tfoot .check-column input,.no-js .widefat thead .check-column input{display:none}.column-comments,.column-links,.column-posts,.widefat .num{text-align:center}.widefat th#comments{vertical-align:middle}.wrap{margin:10px 20px 0 2px}div.error,div.updated{margin:5px 15px 2px}div.error p,div.updated p{margin:.5em 0;padding:2px}.media-upload-form div.error,.wrap div.error,.wrap div.updated{margin:5px 0 15px}div.updated{border-left:4px solid #7ad03a;padding:1px 12px;background-color:#fff;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}div.error{border-left:4px solid #dd3d36;background:#fff;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1);padding:1px 12px}.attention{color:#2ea2cc}.subtitle,.wrap h2{font-weight:400;margin:0}.wrap h2{font-size:23px;font-weight:400;padding:9px 15px 4px 0;line-height:29px}.subtitle{color:#777;font-size:14px;padding-left:25px}.wrap .add-new-h2,.wrap .add-new-h2:active{margin-left:4px;padding:4px 8px;position:relative;top:-3px;text-decoration:none;border:0;-webkit-border-radius:2px;border-radius:2px;background:#e0e0e0;text-shadow:none;font-weight:600;font-size:13px}.wrap .add-new-h2:hover{background:#2ea2cc;color:#fff}.wrap h2.long-header{padding-right:0}.wp-dialog{background-color:#fff}.sorthelper{background-color:#ccf3fa}.ac_match,.subsubsub a.current{color:#000}.alt,.alternate{background-color:#f9f9f9}.bar{background-color:#e8e8e8;border-right-color:#99d}.media-upload-form label.form-help,td.help{color:#9a9a9a}.highlight{background-color:#e4f2fd;color:#000}.wp-ui-primary{color:#fff;background-color:#333}.wp-ui-text-primary{color:#333}.wp-ui-highlight{color:#fff;background-color:#1e8cbe}.wp-ui-text-highlight{color:#1e8cbe}.wp-ui-notification{color:#fff;background-color:#d54e21}.wp-ui-text-notification{color:#d54e21}.wp-ui-text-icon{color:#999}#nav-menu-footer,#nav-menu-header,#your-profile #rich_editing,.checkbox,.control-section .accordion-section-title,.menu-item-handle,.postbox h3,.side-info,.sidebar-name,.stuffbox h3,.widefat tfoot th,.widefat thead th,.widget .widget-top,h3.dashboard-widget-title,h3.dashboard-widget-title small,h3.dashboard-widget-title span{line-height:1.4em}.menu-item-handle,.widget .widget-top{background:#fafafa;color:#222}#namediv h3,#submitdiv h3,.postbox h3{border-bottom:1px solid #eee}.quicktags,.search{background-color:#ccc;color:#000;font-size:12px}.icon32{display:none}#bulk-titles div a:before,#welcome-panel.welcome-panel .welcome-panel-close::before,.tagchecklist span a:before{background:0 0;color:#bbb;content:'\f153';display:block!important;font:400 16px/1 dashicons;speak:none;height:20px;margin:2px 0;text-align:center;width:20px;-webkit-font-smoothing:antialiased!important}#bulk-titles div a:hover:before,#welcome-panel.welcome-panel .welcome-panel-close:hover:before,.tagchecklist span a:hover:before{color:#c00}.key-labels label{line-height:24px}b,strong{font-weight:600}.pre{white-space:pre-wrap;word-wrap:break-word}.howto{color:#666;font-style:italic;display:block}p.install-help{margin:8px 0;font-style:italic}.no-break{white-space:nowrap}hr{border:0;border-top:1px solid #ddd;border-bottom:1px solid #fafafa}#all-plugins-table .plugins a.delete,#media-items a.delete,#media-items a.delete-permanently,#nav-menu-footer .menu-delete,#search-plugins-table .plugins a.delete,.plugins a.delete,.row-actions span.delete a,.row-actions span.spam a,.row-actions span.trash a,.submitbox .submitdelete{color:#a00}#all-plugins-table .plugins a.delete:hover,#media-items a.delete-permanently:hover,#media-items a.delete:hover,#nav-menu-footer .menu-delete:hover,#search-plugins-table .plugins a.delete:hover,.file-error,.plugins a.delete:hover,.row-actions .delete a:hover,.row-actions .spam a:hover,.row-actions .trash a:hover,.submitbox .submitdelete:hover,.widget-control-remove:hover,abbr.required{color:red;text-decoration:none;border:0}#major-publishing-actions{padding:10px;clear:both;border-top:1px solid #ddd;background:#f5f5f5}#delete-action{line-height:28px;vertical-align:middle;text-align:left;float:left}#publishing-action{text-align:right;float:right;line-height:23px}#publishing-action .spinner{float:left}#misc-publishing-actions{padding:6px 0 0}.misc-pub-section{padding:6px 10px 8px}#minor-publishing-actions{padding:10px 10px 0;text-align:right}#save-post{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:1px solid #dadada}.side-info ul{margin:0;padding-left:18px;list-style:square;color:#666}.approve,.unapproved .unapprove{display:none}.spam .approve,.trash .approve,.unapproved .approve{display:inline}td.action-links,th.action-links{text-align:right}#update-nag,.update-nag{display:inline-block;line-height:19px;padding:11px 15px;font-size:14px;text-align:left;margin:25px 20px 0 2px;background-color:#fff;border-left:4px solid #ffba00;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}.update-message{color:#000}.update-php .spinner{float:none;margin:-4px 0}#ajax-loading,.ajax-feedback,.ajax-loading,.imgedit-wait-spin,.list-ajax-loading{visibility:hidden}#ajax-response.alignleft{margin-left:2em}#adminmenu a,#catlist a,#sidemenu a,#taglist a{text-decoration:none}#contextual-help-wrap,#screen-options-wrap{margin:0;padding:8px 20px 12px;position:relative}#contextual-help-wrap{overflow:auto;margin-left:0!important}#screen-meta .screen-reader-text{visibility:hidden}#screen-meta-links{margin:0 20px 0 0}#screen-meta-links a{padding:3px 6px 3px 16px}#screen-meta-links a:focus{outline:0}#screen-meta{display:none;margin:0 20px -1px 0;position:relative;background-color:#fff;border:1px solid #ddd;border-top:0;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.025);box-shadow:0 1px 0 rgba(0,0,0,.025)}#contextual-help-link-wrap,#screen-options-link-wrap{float:right;height:28px;margin:0 0 0 6px;border:1px solid #ddd;border-top:0;background:#fff;-webkit-box-shadow:0 1px 1px -1px rgba(0,0,0,.1);box-shadow:0 1px 1px -1px rgba(0,0,0,.1)}#screen-meta-links .screen-meta-toggle{position:relative;top:0}#screen-meta-links a{color:#777}#screen-meta-links a:active,#screen-meta-links a:focus,#screen-meta-links a:hover{color:#333}#screen-meta-links a:focus{border-color:#aaa;-webkit-box-shadow:0 2px 3px rgba(0,0,0,.15);box-shadow:0 2px 3px rgba(0,0,0,.15)}#screen-meta-links a.show-settings{display:block;font-size:13px;height:22px;line-height:22px;text-decoration:none;z-index:1}#screen-meta-links a:after{right:0;content:'\f140';font:400 20px/1 dashicons;speak:none;display:inline-block;padding:0 5px 0 0;bottom:2px;position:relative;vertical-align:bottom;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#bbb}#screen-meta-links a.screen-meta-active:after{content:'\f142'}#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}#contextual-help-wrap h5,#screen-options-wrap h5{margin:8px 0;font-size:13px}.metabox-prefs label{display:inline-block;padding-right:15px;line-height:30px}.metabox-prefs label input[type=checkbox]{margin-top:-4px;margin-right:6px}.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}#contextual-help-columns{position:relative}#contextual-help-back{position:absolute;top:0;bottom:0;left:150px;right:170px;border:1px solid #e1e1e1;border-top:0;border-bottom:0;background:#f6fbfd}#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:0 0 0 2px;border-color:transparent}.contextual-help-tabs a{display:block;padding:5px 5px 5px 12px;line-height:18px;text-decoration:none;border:1px solid transparent;border-right:0;border-left:0}.contextual-help-tabs a:hover{color:#333}.contextual-help-tabs .active{padding:0;margin:0 -1px 0 0;border-left:2px solid #2ea2cc;background:#f6fbfd;-webkit-box-shadow:0 2px 0 rgba(0,0,0,.02),0 1px 0 rgba(0,0,0,.02);box-shadow:0 2px 0 rgba(0,0,0,.02),0 1px 0 rgba(0,0,0,.02)}.contextual-help-tabs .active a{border-color:#e1e1e1;color:#333}.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 ul li{list-style-type:disc;margin-left:18px}.contextual-help-sidebar{width:150px;float:right;padding:0 8px 0 12px;overflow:auto}html.wp-toolbar{padding-top:32px;-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 td,.widefat th{overflow:hidden;color:#555}.widefat th{font-weight:400}.widefat tfoot tr th,.widefat thead tr th{color:#333}.widefat td p{margin:2px 0 .8em}.widefat ol,.widefat p,.widefat ul{color:#333}.widefat .column-comment p{margin:.6em 0}.postbox-container{float:left}.postbox-container .meta-box-sortables{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wpbody-content .metabox-holder{padding-top:10px}.metabox-holder .postbox-container .empty-container{border:3px dashed #bbb;height:250px}.columns-2 #postbox-container-3 .empty-container,.columns-2 #postbox-container-4 .empty-container,.columns-3 #postbox-container-4 .empty-container,.metabox-holder.columns-1 .postbox-container .empty-container{border:0 none;height:0;min-height:0}#post-body-content{width:100%;min-width:463px;float:left}#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 .metabox-holder .postbox-container .empty-container{border:0 none;height:0;min-height:0}}.js .postbox .hndle{cursor:move}.hndle a{font-size:11px;font-weight:400}.postbox .handlediv{float:right;width:27px;height:30px}.js .postbox .handlediv{cursor:pointer}.sortable-placeholder{border:1px dashed #bbb;margin-bottom:20px}.postbox,.stuffbox{margin-bottom:20px;padding:0;line-height:1}.postbox h3,.stuffbox h3{margin-top:1px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.js .postbox h3,.js .widget .widget-top{cursor:move}.postbox .inside,.stuffbox .inside{padding:0 12px 12px;line-height:1.4em;font-size:13px}.postbox .inside{margin:11px 0;position:relative}.postbox .inside>p:last-child,.rss-widget ul li:last-child{margin-bottom:1px!important}.postbox.closed h3{border:0;-webkit-box-shadow:none;box-shadow:none}.postbox table.form-table{margin-bottom:0}.postbox table.widefat{-webkit-box-shadow:none;box-shadow:none}.temp-border{border:1px dotted #ccc}.columns-prefs label{padding:0 5px}#adminmenu .wp-submenu li.current,#adminmenu .wp-submenu li.current a,#adminmenu .wp-submenu li.current a:hover,#dashboard_right_now .versions .b,#ed_reply_toolbar #ed_reply_strong,#pass-strength-result.short,#pass-strength-result.strong,#post-status-display,#post-visibility-display,.feature-filter .feature-name,.item-controls .item-order a,.media-item .percent,.plugins .name{font-weight:600}#wpfooter{position:absolute;bottom:0;left:0;right:0;padding:10px 0;margin-right:20px;color:#777}#wpfooter p{font-size:13px;margin:0;line-height:20px}#footer-thankyou{font-style:italic}#wpfooter a{text-decoration:none}#wpfooter a:hover{text-decoration:underline}.nav-tab{border:1px solid #ccc;border-bottom:0;background:#e4e4e4;color:#555;font-size:12px;line-height:16px;display:inline-block;padding:4px 14px 6px;text-decoration:none;margin:-4px 4px -1px 0}.nav-tab:hover{background-color:#fff;color:#464646}.nav-tab-active,.nav-tab-active:hover{border-bottom:1px solid #f1f1f1;background:#f1f1f1;color:#000}h2.nav-tab-wrapper,h3.nav-tab-wrapper{border-bottom:1px solid #ccc;padding-bottom:0;padding-left:10px}h2 .nav-tab{padding:6px 10px;font-weight:700;font-size:15px;line-height:24px}.spinner{background:url(../images/spinner.gif) no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px;display:none;float:right;opacity:.7;filter:alpha(opacity=70);width:20px;height:20px;margin:2px 5px 0}#template div{margin-right:190px}.metabox-holder h3{font-size:14px;padding:8px 12px;margin:0;line-height:1.4}#templateside ul li a{text-decoration:none}#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:1px solid #f9f9f9;border-bottom:1px solid #dfdfdf;background-color:#f9f9f9;-webkit-transition:none;transition:none}#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:400;padding-left:6px;padding-right:6px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;border:1px solid #dfdfdf;border-bottom-color:#f1f1f1;background-color:#f1f1f1;color:#000}.plugin-install #description,.plugin-install-network #description{width:60%}table .column-rating,table .column-visible,table .vers{text-align:left}.error-message{color:red;font-weight:600}body.iframe{height:98%}.lp-show-latest p{display:none}.lp-show-latest .lp-error p,.lp-show-latest p:last-child{display:block}td.media-icon{text-align:center;width:80px;padding-top:8px;padding-bottom:8px}td.media-icon img{max-width:80px;max-height:60px}#howto{font-size:11px;margin:0 5px;display:block}.importers td{padding-right:14px}.importers{font-size:16px;width:auto}#post-body #post-body-content #namediv h3{margin-top:0}#namediv h3 label{vertical-align:baseline}#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}div.star-holder{position:relative;height:17px;width:100px;background:url(../images/stars.png?ver=20121108) repeat-x bottom left}div.star-holder .star-rating{background:url(../images/stars.png?ver=20121108) repeat-x top left;height:17px;float:left}.star-rating{white-space:nowrap}.star-rating .star{display:inline-block;width:20px;height:20px;-webkit-font-smoothing:antialiased;font-size:20px;line-height:1;font-family:dashicons;text-decoration:inherit;font-weight:400;font-style:normal;vertical-align:top;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;text-align:center;color:#0074a2}.star-rating .star-full:before{content:'\f155'}.star-rating .star-half:before{content:'\f459'}.rtl .star-rating .star-half{-webkit-transform:rotateY(180deg);-ms-transform:rotateY(180deg);transform:rotateY(180deg)}.star-rating .star-empty:before{content:'\f154'}div.action-links{font-weight:400;margin:6px 0 0}#plugin-information{background:#fcfcfc;position:fixed;top:0;right:0;bottom:0;left:0;height:auto;padding:0}#plugin-information-title{padding:0 76px 0 20px;font-size:22px;font-weight:600;line-height:56px;top:0;right:0;left:0;height:56px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#plugin-information-tabs{padding:0 16px;position:absolute;top:56px;right:0;left:0;height:36px;z-index:1}#plugin-information-tabs a{position:relative;float:left;padding:8px 10px 9px;margin:0;height:18px;line-height:18px;font-size:14px;text-decoration:none;-webkit-transition:none;transition:none}#plugin-information-tabs a.current{margin:-1px -1px 0;background:#fff;border:1px solid #ddd;border-bottom:0;color:#333}#plugin-information-tabs a:active,#plugin-information-tabs a:focus{outline:0}#plugin-information-content{background:#fff;border-top:1px solid #ddd;border-bottom:1px solid #ddd;position:absolute;top:90px;right:0;bottom:58px;left:0}#section-holder{margin:0;padding:10px 26px;position:absolute;top:0;right:250px;bottom:0;left:0;overflow:auto}#section-holder .updated{margin:16px 0}#plugin-information .fyi{background:#f3f3f3;border-left:1px solid #ddd;color:#666;padding:16px;position:absolute;top:0;right:0;bottom:0;width:217px;overflow:auto}#plugin-information .fyi strong{color:#464646}#plugin-information .fyi h3{font-weight:700;text-transform:uppercase;font-size:12px;color:#666;margin:24px 0 8px}#plugin-information .fyi h2{font-size:.9em;margin-bottom:0;margin-right:0}#plugin-information .fyi ul{padding:0;margin:0;list-style:none}#plugin-information .fyi li{margin:0 0 10px}#plugin-information-footer{padding:15px 16px;position:absolute;right:0;bottom:0;left:0;height:28px}#plugin-information .section ol,#plugin-information .section ul{list-style-type:disc;margin-left:24px}#plugin-information .section,#plugin-information .section p{font-size:14px;line-height:1.7}#plugin-information #section-screenshots ol{list-style:none;margin:0}#plugin-information #section-screenshots li img{vertical-align:text-top;margin-top:16px;max-width:100%;width:auto;height:auto;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.3);box-shadow:0 1px 2px rgba(0,0,0,.3)}#plugin-information #section-screenshots li p{font-style:italic;padding-left:20px}#plugin-information pre{padding:7px;overflow:auto;border:1px solid #ccc}.plugin-version-author-uri{font-size:13px}@media screen and (max-width:782px){#plugin-information-content{overflow:auto;bottom:58px}#plugin-information .fyi{border:1px solid #ddd;position:static;width:auto;margin:26px 26px 16px}#section-holder{position:static}#plugin-information .fyi h3,#plugin-information .fyi small{display:none}#plugin-information-footer{padding:12px 16px 0;height:46px}}body.import-php #TB_window,body.index-php #TB_window,body.plugin-install-php #TB_window,body.plugins-php #TB_window,body.update-core-php #TB_window{background:#fcfcfc url( ../images/spinner.gif ) no-repeat center}@media print,(-o-min-device-pixel-ratio:5/4),(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){body.import-php #TB_window,body.index-php #TB_window,body.plugin-install-php #TB_window,body.plugins-php #TB_window,body.update-core-php #TB_window{background:#fcfcfc url( ../images/spinner-2x.gif ) no-repeat center;-webkit-background-size:20px 20px;background-size:20px 20px}}body.import-php #TB_title,body.index-php #TB_title,body.plugin-install-php #TB_title,body.plugins-php #TB_title,body.update-core-php #TB_title{float:left;height:1px}body.import-php #TB_ajaxWindowTitle,body.index-php #TB_ajaxWindowTitle,body.plugin-install-php #TB_ajaxWindowTitle,body.plugins-php #TB_ajaxWindowTitle,body.update-core-php #TB_ajaxWindowTitle{display:none}body.import-php .tb-close-icon,body.index-php .tb-close-icon,body.plugin-install-php .tb-close-icon,body.plugins-php .tb-close-icon,body.update-core-php .tb-close-icon{line-height:48px;width:48px;height:48px}body.import-php .tb-close-icon:before,body.index-php .tb-close-icon:before,body.plugin-install-php .tb-close-icon:before,body.plugins-php .tb-close-icon:before,body.update-core-php .tb-close-icon:before{line-height:48px}img{border:0}#wphead{border-bottom:1px solid #dfdfdf}#wphead h1 a{color:#464646}.js .meta-box-sortables .postbox:hover .handlediv{margin-right:0!important}.js .meta-box-sortables .postbox .handlediv:before,.js .sidebar-name .sidebar-name-arrow:before{right:12px;font:400 20px/1 dashicons;speak:none;display:inline-block;padding:8px 10px;top:0;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.js #widgets-left .sidebar-name .sidebar-name-arrow{display:none}.js #widgets-left .sidebar-name:hover .sidebar-name-arrow,.js #widgets-left .widgets-holder-wrap.closed .sidebar-name .sidebar-name-arrow{display:block}.js .meta-box-sortables .postbox .handlediv:before,.js .sidebar-name .sidebar-name-arrow:before{content:'\f142'}.js .meta-box-sortables .postbox.closed .handlediv:before,.js .widgets-holder-wrap.closed .sidebar-name-arrow:before{content:'\f140'}.error a{text-decoration:underline}.updated a{text-decoration:none;padding-bottom:2px}#photo-add-url-div input[type=text]{width:300px}.alignleft h3{margin:0}#template textarea{font-family:Consolas,Monaco,monospace;font-size:13px;width:97%;background:#f9f9f9;outline:0}#docs-list,#template textarea{direction:ltr}#template p{width:97%}#templateside{float:right;width:190px;word-wrap:break-word}#postcustomstuff p.submit,#templateside h3{margin:0}#templateside h4{margin:1em 0 0}#templateside ol,#templateside ul{margin:.5em 0;padding:0}#templateside li{margin:4px 0}#templateside a,.theme-editor-php .highlight{display:block;padding:3px 3px 3px 12px;text-decoration:none}.theme-editor-php .highlight{margin:-3px 3px -3px -12px}#templateside .highlight{border:0;font-weight:700}.nonessential{color:#666;font-size:11px;font-style:italic;padding-left:12px}#documentation{margin-top:10px}#documentation label{line-height:22px;vertical-align:baseline;font-weight:600}.fileedit-sub{padding:10px 0 8px;line-height:180%}.accordion-section-title:after,.control-section .accordion-section-title:after,.nav-menus-php .item-edit:before,.widget-top a.widget-action:after{right:0;content:'\f140';border:0;background:0 0;font:400 20px/1 dashicons;speak:none;display:block;padding:0;text-indent:0;text-align:center;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.accordion-section-title:after,.handlediv,.item-edit,.sidebar-name-arrow,.widget-action{color:#aaa}.accordion-section-title:hover:after,.handlediv:hover,.item-edit:hover,.sidebar-name:hover .sidebar-name-arrow,.widget-action:hover{color:#777}.widget-top a.widget-action:after{padding:12px 12px 0}.nav-menus-php .item-edit:before{line-height:2.1}.accordion-section-title:after,.control-section .accordion-section-title:after{float:right;right:20px;top:-2px}#customize-info.open .accordion-section-title:after,.control-section.open .accordion-section-title:after,.nav-menus-php .menu-item-edit-active .item-edit:before{content:'\f142'}.ui-draggable,.ui-sortable{-ms-touch-action:none;touch-action:none}.menu.ui-sortable,.meta-box-sortables.ui-sortable,.widgets-holder-wrap .ui-draggable,.widgets-holder-wrap .ui-sortable{-ms-touch-action:auto;touch-action:auto}.menu.ui-sortable .menu-item-handle,.meta-box-sortables.ui-sortable .hndle{-ms-touch-action:none;touch-action:none}.accordion-section{border-bottom:1px solid #dfdfdf;margin:0}.accordion-section.open .accordion-section-content,.no-js .accordion-section .accordion-section-content{display:block}.accordion-section.open:hover{border-bottom-color:#dfdfdf}.accordion-section-content{display:none;padding:10px 20px 15px;overflow:hidden;background:#fff}.accordion-section-title{margin:0;padding:12px 15px 15px;position:relative;border-left:1px solid #dfdfdf;border-right:1px solid #dfdfdf;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.js .accordion-section-title{cursor:pointer}.js .accordion-section-title:after{position:absolute;top:12px;right:10px;z-index:1}.accordion-section-title:focus{outline:0}.accordion-section-title:focus:after,.accordion-section-title:hover:after{border-color:#aaa transparent}.cannot-expand .accordion-section-title{cursor:auto}.cannot-expand .accordion-section-title:after{display:none}.control-section .accordion-section-title{border-left:0;border-right:0;padding:10px 10px 11px 14px;line-height:21px;background:#fff}.control-section .accordion-section-title:after{top:11px}.js .control-section .accordion-section-title:focus,.js .control-section .accordion-section-title:hover,.js .control-section.open .accordion-section-title,.js .control-section:hover .accordion-section-title{color:#222;background:#f5f5f5}.control-section.open .accordion-section-title{border-bottom:1px solid #dfdfdf}@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,#col-right{width:100%}}@media print,(-o-min-device-pixel-ratio:5/4),(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){div.star-holder,div.star-holder .star-rating{background:url(../images/stars-2x.png?ver=20121108) repeat-x bottom left;-webkit-background-size:21px 37px;background-size:21px 37px}.spinner{background-image:url(../images/spinner-2x.gif)}#bulk-titles div a,#bulk-titles div a:hover,#screen-meta-links a.show-settings,.curtime #timestamp,.meta-box-sortables .postbox:hover .handlediv,.sidebar-name-arrow,.sidebar-name:hover .sidebar-name-arrow,.tagchecklist span a,.tagchecklist span a:hover,.widget-top a.widget-action,.widget-top a.widget-action:hover{background:none!important}}@-ms-viewport{width:device-width}@media screen and (max-width:782px){html.wp-toolbar{padding-top:46px}body{min-width:240px;overflow-x:hidden}body *{-webkit-tap-highlight-color:rgba(0,0,0,0)!important}#wpwrap{background:#f0f0f0}#wpcontent{position:relative;margin-left:0;padding-left:10px}#wpbody-content{padding-bottom:100px}.wrap{margin-right:12px;margin-left:0}.col-wrap{padding:0}#collapse-menu,#screen-meta,#screen-meta-links,.post-format-select{display:none!important}.wrap .add-new-h2,.wrap .add-new-h2:active{padding:10px 15px;font-size:14px}.wp-color-result{height:auto;padding-left:45px}.wp-color-result:after{font-size:14px;height:auto;padding:6px 14px}.media-upload-form div.error,.wrap div.error,.wrap div.updated{margin:20px 0 10px;padding:5px 10px;font-size:14px;line-height:175%}.wrap .icon32+h2{margin-top:-2px}.wp-responsive-open #wpbody{right:-190px}.postbox{font-size:14px}.metabox-holder h3{padding:12px}.postbox .handlediv{margin-top:3px}.subsubsub{font-size:16px;text-align:center;margin-bottom:15px}#templateside{float:none;width:auto}#templateside li{margin:0}#templateside li a{display:block;padding:5px}#templateside .highlight{padding:5px;margin-left:-5px;margin-top:-5px}#template div{float:none;margin:0;width:auto}#template textarea{width:100%}.fileedit-sub .alignright{margin-top:15px}#comments-form .checkforspam,#wpfooter{display:none}}@media screen and (max-width:600px){#wpwrap.wp-responsive-open{overflow-x:hidden}html.wp-toolbar{padding-top:0}#wpbody{padding-top:46px}div#post-body.metabox-holder.columns-1{overflow-x:hidden}}input,input[type=email],input[type=number],input[type=password],input[type=search],input[type=text],input[type=url],textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=email],input[type=url]{direction:ltr}input[type=checkbox],input[type=radio]{border:1px solid #bbb;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 4px 0 0;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}input[type=radio]:checked+label:before{color:#888}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#2ea2cc}.wp-admin p input[type=checkbox],.wp-admin p input[type=radio],td>input[type=checkbox]{margin-top:0}.wp-admin p label input[type=checkbox]{margin-top:-4px}.wp-admin p label input[type=radio]{margin-top:-2px}input[type=radio]{-webkit-border-radius:50%;border-radius:50%;margin-right:4px;line-height:10px}input[type=checkbox]:checked:before,input[type=radio]:checked:before{float:left;display:inline-block;vertical-align:middle;width:16px;font:400 21px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}input[type=checkbox]:checked:before{content:'\f147';margin:-3px 0 0 -4px;color:#1e8cbe}input[type=radio]:checked:before{content:'\2022';text-indent:-9999px;-webkit-border-radius:50px;border-radius:50px;font-size:24px;width:6px;height:6px;margin:4px;line-height:16px;background-color:#1e8cbe}input.readonly,textarea.readonly{background-color:#ddd}@-moz-document url-prefix(){.form-table input.tog,input[type=checkbox],input[type=radio]{margin-bottom:-1px}}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-decoration{display:none}.ie8 input[type=password]{font-family:sans-serif}button,input,select,textarea{font-family:inherit;font-size:inherit;font-weight:inherit}input,select,textarea{font-size:14px;padding:3px 5px;line-height:15px;-webkit-border-radius:0;border-radius:0}textarea{overflow:auto;padding:2px 6px;line-height:1.4}input[type=email],input[type=number],input[type=password],input[type=search],input[type=text],input[type=url],select,textarea{outline:0}.wp-admin input[type=file]{padding:3px 0}label{cursor:pointer}input,select{margin:1px;padding:3px 5px}input.code{padding-top:6px}textarea.code{line-height:1.4;padding:4px 6px 1px}input[type=email],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=url],select,textarea{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#333;-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}select[disabled]{color:#7f7f7f}input[type=checkbox]:focus,input[type=email]:focus,input[type=number]:focus,input[type=password]:focus,input[type=radio]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=url]:focus,select:focus,textarea:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}input[readonly]{background-color:#eee}.wp-core-ui :-moz-placeholder,:-moz-placeholder{color:#a9a9a9}.form-invalid{background-color:#ffebe8!important}.form-invalid input,.form-invalid select{border-color:#c00!important}.form-input-tip{color:#666}input.disabled,input:disabled,textarea.disabled,textarea:disabled{-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.04);box-shadow:inset 0 1px 2px rgba(0,0,0,.04);border-color:rgba(222,222,222,.75);background:rgba(255,255,255,.5);color:rgba(51,51,51,.5)}input[type=checkbox]:disabled,input[type=checkbox]:disabled:checked:before,input[type=radio]:disabled,input[type=radio]:disabled:checked:before{opacity:.7}.wp-admin select{padding:2px;line-height:28px;height:28px;vertical-align:middle}.wp-admin .button-cancel{padding:0 5px;line-height:2}.meta-box-sortables select{max-width:100%}.wp-admin select[multiple]{height:auto}.submit{padding:1.5em 0;margin:5px 0;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;border:0}form p.submit a.cancel:hover{text-decoration:none}p.submit{text-align:left;max-width:100%;margin-top:20px;padding-top:10px}.textright p.submit{border:0;text-align:right}table.form-table+input+input+p.submit,table.form-table+input+p.submit,table.form-table+p.submit{border-top:0;padding-top:0}#major-publishing-actions input,#minor-publishing-actions .preview,#minor-publishing-actions input{text-align:center}input.all-options,textarea.all-options{width:250px}input.large-text,textarea.large-text{width:99%}#adduser .form-field input,input.regular-text{width:25em}input.small-text{width:50px;padding:1px 6px}input[type=number].small-text{width:65px}#doaction,#doaction2,#post-query-submit{margin:1px 8px 0 0}.tablenav #changeit,.tablenav #clear-recent-list,.tablenav #delete_all{margin-top:1px}.tablenav .actions select{float:left;margin-right:6px;max-width:200px}.ie8 .tablenav .actions select{width:155px}.ie8 .tablenav .actions select#cat{width:200px}#timezone_string option{margin-left:1em}#upload-form label{color:#777}#your-profile label+a,fieldset label,label{vertical-align:middle}#misc-publishing-actions label,.options-media-php label[for*="_size_"]{vertical-align:baseline}#misc-publishing-actions label[for=post_status]:before{content:'\f173';display:inline-block;font:400 20px/1 dashicons;speak:none;left:-1px;padding:0 5px 0 0;position:relative;top:0;text-decoration:none!important;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#pass-strength-result{background-color:#eee;border:1px solid #ddd;float:left;margin:13px 5px 5px 1px;padding:3px 5px;text-align:center;width:200px;display:none}#pass-strength-result.short{background-color:#ffa0a0;border-color:#f04040}#pass-strength-result.bad{background-color:#ffb78c;border-color:#ff853c}#pass-strength-result.good{background-color:#ffec8b;border-color:#fc0}#pass-strength-result.strong{background-color:#c3ff88;border-color:#8dff1c}.indicator-hint{padding-top:8px}p.search-box{float:right;margin:0}.network-admin.themes-php p.search-box{clear:left}#search-plugins input[name="s"],.search-box input[name="s"],.tagsdiv .newtag{float:left;height:28px;margin:0 4px 0 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{-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}.ui-autocomplete{padding:0;margin:0;list-style:none;position:absolute;z-index:10000;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;border:1px solid #aaa;background-color:#efefef}.ui-autocomplete li{margin-bottom:0;white-space:nowrap;text-align:left}.ui-autocomplete li a{display:block;height:100%;padding:4px 10px;color:#444}.ui-autocomplete li a.ui-state-focus{background-color:#ddd;cursor:pointer}.form-table{border-collapse:collapse;margin-top:.5em;width:100%;clear:both}.form-table,.form-table td,.form-table td p,.form-table th,.form-wrap label{font-size:14px}.form-table td{margin-bottom:9px;padding:15px 10px;line-height:1.3;vertical-align:middle}.form-table th,.form-wrap label{color:#222;font-weight:400;text-shadow:none;vertical-align:baseline}.form-table th{vertical-align:top;text-align:left;padding:20px 10px 20px 0;width:200px;line-height:1.3;font-weight:600}.form-table th.th-full{width:auto;font-weight:400}.form-table td p{margin-top:4px;margin-bottom:0}.form-table td fieldset label{margin:.25em 0 .5em!important;display:inline-block}.form-table td fieldset label,.form-table td fieldset li,.form-table td fieldset p{line-height:1.4em}.form-table input.tog,.form-table input[type=radio]{margin-top:-4px;margin-right:4px;float:none}.form-table .pre{padding:8px;margin:0}table.form-table td .updated{font-size:13px}#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}#display_name{width:15em}#createuser .form-field input{width:25em}.color-option{display:inline-block;width:24%;padding:5px 15px 15px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:3px}.color-option.selected,.color-option:hover{background:#ddd}.color-palette{width:100%;border-spacing:0;border-collapse:collapse}.color-palette td{height:20px;padding:0;border:0}.color-option{cursor:pointer}.tool-box .title{margin:8px 0;font-size:18px;font-weight:400;line-height:24px}.pressthis{margin:20px 0}.pressthis a,.pressthis a:active,.pressthis a:focus,.pressthis a:hover{display:inline-block;position:relative;cursor:move;color:#333;background:#e6e6e6;-webkit-border-radius:5px;border-radius:5px;border:1px solid #b4b4b4;font-style:normal;line-height:16px;font-size:14px;text-decoration:none}.pressthis a:active{outline:0}.pressthis a:hover:after{-webkit-transform:skew(20deg) rotate(9deg);-ms-transform:skew(20deg) rotate(9deg);transform:skew(20deg) rotate(9deg);-webkit-box-shadow:0 10px 8px rgba(0,0,0,.7);box-shadow:0 10px 8px rgba(0,0,0,.7)}.pressthis a span{display:inline-block;margin:0;padding:0 12px 8px 9px}.pressthis a span:before{color:#777;font:400 20px/1 dashicons;content:'\f157';position:relative;display:inline-block;top:4px;margin-right:4px}.pressthis a:after{content:'';width:70%;height:55%;z-index:-1;position:absolute;right:10px;bottom:9px;background:0 0;-webkit-transform:skew(20deg) rotate(6deg);-ms-transform:skew(20deg) rotate(6deg);transform:skew(20deg) rotate(6deg);-webkit-box-shadow:0 10px 8px rgba(0,0,0,.6);box-shadow:0 10px 8px rgba(0,0,0,.6)}#local-time,#utc-time{padding-left:25px;font-style:italic}.defaultavatarpicker .avatar{margin:2px 0;vertical-align:middle}.options-general-php .spinner{float:none;margin:-3px 3px}@media screen and (max-width:782px){textarea{-webkit-appearance:none}input[type=number],input[type=password],input[type=search],input[type=text]{-webkit-appearance:none;padding:6px 10px}input.code{padding-bottom:5px;padding-top:10px}.widefat th input[type=checkbox],input[type=checkbox]{-webkit-appearance:none;padding:10px}.widefat th input[type=checkbox]{margin-bottom:8px}.widefat th input[type=checkbox]:before,input[type=checkbox]:checked:before{font:400 30px/1 Dashicons;margin:-3px -5px}input[type=checkbox],input[type=radio]{height:25px;width:25px}.wp-admin p input[type=checkbox],.wp-admin p input[type=radio]{margin-top:-3px}input[type=radio]:checked:before{vertical-align:middle;width:9px;height:9px;margin:7px;line-height:16px}.wp-upload-form input[type=submit]{margin-top:10px}#wpbody select{height:36px;font-size:16px}.wp-admin .button-cancel{padding:0;font-size:14px}#createuser .form-field input{width:100%}.form-table{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table td,.form-table th{display:block;width:auto;vertical-align:middle}.form-table .color-palette td{display:table-cell;width:15px}.form-table table.color-palette{margin-right:10px}input,textarea{font-size:16px}#profile-page .form-table textarea,.form-table span.description,.form-table td input[type=password],.form-table td input[type=text],.form-table td select,.form-table td textarea{width:100%;font-size:16px;line-height:1.5;padding:7px 10px;display:block;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table input[type=text].small-text,input[type=number].small-text,input[type=password].small-text,input[type=search].small-text,input[type=text].small-text{width:auto;max-width:55px;display:inline;padding:3px 6px;margin:0 3px}#pass-strength-result{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:8px}p.search-box{float:none;position:absolute;bottom:0;width:98%;height:90px;margin-bottom:20px}p.search-box input[name="s"]{height:auto;float:none;width:100%;margin-bottom:10px;vertical-align:middle;-webkit-appearance:none}p.search-box input[type=submit]{margin-bottom:10px}.form-table span.description{padding:4px 0 0;line-height:1.4em}.form-table th{padding-top:10px;padding-bottom:0;border-bottom:0}.form-table td{padding-top:8px;padding-left:0}.form-table input.regular-text{width:100%}.form-table label{font-size:14px}.form-table fieldset label{display:block}#utc-time{margin-top:10px}#local-time,#utc-time{display:block;float:none;padding:0;line-height:2}}@media only screen and (max-width:768px){.form-field input,.form-field textarea{width:99%}.form-wrap .form-field{padding:0}#profile-page .form-table textarea{max-width:400px;width:auto}}@media screen and (max-width:600px){.color-option{width:49%}}#adminmenu,#adminmenu .wp-submenu,#adminmenuback,#adminmenuwrap{width:160px;background-color:#222}#adminmenuback{position:absolute;top:0;bottom:0;z-index:-1}#adminmenu{clear:left;margin:12px 0 0;padding:0;list-style:none}.folded #adminmenu,.folded #adminmenu li.menu-top,.folded #adminmenuback,.folded #adminmenuwrap{width:36px}.icon16{height:18px;width:18px;padding:6px;margin:-6px 0 0 -8px;float:left}.icon16:before{color:#999;font:400 20px/1 dashicons;speak:none;padding:6px 0;height:34px;width:20px;display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.icon16.icon-dashboard:before{content:'\f226'}.icon16.icon-post:before{content:'\f109'}.icon16.icon-media:before{content:'\f104'}.icon16.icon-links:before{content:'\f103'}.icon16.icon-page:before{content:'\f105'}.icon16.icon-comments:before{content:'\f101';margin-top:1px}.icon16.icon-appearance:before{content:'\f100'}.icon16.icon-plugins:before{content:'\f106'}.icon16.icon-users:before{content:'\f110'}.icon16.icon-tools:before{content:'\f107'}.icon16.icon-settings:before{content:'\f108'}.icon16.icon-site:before{content:'\f112'}.icon16.icon-generic:before{content:'\f111'}.icon16.icon-appearance,.icon16.icon-comments,.icon16.icon-dashboard,.icon16.icon-generic,.icon16.icon-links,.icon16.icon-media,.icon16.icon-page,.icon16.icon-plugins,.icon16.icon-post,.icon16.icon-settings,.icon16.icon-site,.icon16.icon-tools,.icon16.icon-users,.menu-icon-appearance div.wp-menu-image,.menu-icon-comments div.wp-menu-image,.menu-icon-dashboard div.wp-menu-image,.menu-icon-generic div.wp-menu-image,.menu-icon-links div.wp-menu-image,.menu-icon-media div.wp-menu-image,.menu-icon-page div.wp-menu-image,.menu-icon-plugins div.wp-menu-image,.menu-icon-post div.wp-menu-image,.menu-icon-settings div.wp-menu-image,.menu-icon-site div.wp-menu-image,.menu-icon-tools div.wp-menu-image,.menu-icon-users div.wp-menu-image{background-image:none!important}#adminmenuwrap{position:relative;float:left}#adminmenu *{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#adminmenu li{margin:0;padding:0;cursor:pointer}#adminmenu a{display:block;line-height:18px;padding:2px 5px;color:#eee}#adminmenu .wp-submenu a{color:#bbb}#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover{background:0 0}#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a:hover,#adminmenu li.menu-top>a:focus{color:#2ea2cc}#adminmenu li.menu-top{border:0;min-height:34px;position:relative}#adminmenu .wp-submenu{list-style:none;position:absolute;top:-1000em;left:160px;overflow:visible;word-wrap:break-word}#adminmenu .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu,.folded #adminmenu a.wp-has-current-submenu:focus+.wp-submenu{padding:7px 0 8px;z-index:9999;background-color:#333;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}#adminmenu a.menu-top:focus+.wp-submenu,.js #adminmenu .opensub .wp-submenu,.js #adminmenu .sub-open,.no-js li.wp-has-submenu:hover .wp-submenu{top:-1px}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu .wp-submenu.sub-open,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.no-js li.wp-has-current-submenu:hover .wp-submenu{position:relative;z-index:3;top:auto;left:auto;right:auto;bottom:auto;border:0 none;margin-top:0;-webkit-box-shadow:none;box-shadow:none;background-color:#333}#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{position:relative;background-color:#111}.folded #adminmenu li.menu-top:hover,.folded #adminmenu li.opensub>a.menu-top,.folded #adminmenu li>a.menu-top:focus{z-index:10000}#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu .wp-menu-arrow,#adminmenu .wp-menu-arrow div,#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top,.folded #adminmenu li.wp-has-current-submenu{background:#0074a2;color:#fff}.folded #adminmenu .opensub .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu.sub-open,.folded #adminmenu .wp-has-current-submenu a.menu-top:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu.opensub .wp-submenu,.folded #adminmenu .wp-submenu.sub-open,.folded #adminmenu a.menu-top:focus+.wp-submenu,.no-js.folded #adminmenu .wp-has-submenu:hover .wp-submenu{top:0;left:36px}.folded #adminmenu .wp-has-current-submenu .wp-submenu,.folded #adminmenu a.wp-has-current-submenu:focus+.wp-submenu{position:absolute;top:-1000em}#adminmenu .wp-not-current-submenu .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{min-width:160px;width:auto}#adminmenu .wp-submenu a{font-size:13px;line-height:1.2;margin:0;padding:6px 0}#adminmenu .opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current,#adminmenu .wp-submenu li.current a,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-not-current-submenu li>a,.folded #adminmenu .wp-has-current-submenu li>a{padding-right:16px;padding-left:14px;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#adminmenu .wp-has-current-submenu ul>li>a,.folded #adminmenu li.menu-top .wp-submenu>li>a{padding:6px 12px}#adminmenu .wp-submenu-head,#adminmenu a.menu-top{font-size:14px;font-weight:400;line-height:18px;padding:0}#adminmenu .wp-submenu-head,.folded #adminmenu .wp-menu-name{display:none}.folded #adminmenu .wp-submenu-head{display:block}#adminmenu .wp-submenu li{padding:0;margin:0;overflow:hidden}#adminmenu .wp-menu-image img{padding:9px 0 0;opacity:.6;filter:alpha(opacity=60)}#adminmenu div.wp-menu-name{padding:8px 0}#adminmenu div.wp-menu-image{float:left;width:36px;height:34px;margin:0;text-align:center}#adminmenu div.wp-menu-image.svg{background-repeat:no-repeat;background-position:center;-webkit-background-size:20px auto;background-size:20px auto}div.wp-menu-image:before{color:#999;padding:7px 0;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#adminmenu div.wp-menu-image:before{color:#999}#adminmenu .current div.wp-menu-image:before,#adminmenu .wp-has-current-submenu div.wp-menu-image:before,#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu a.wp-has-current-submenu:hover div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu:hover div.wp-menu-image:before{color:#fff}#adminmenu li:hover div.wp-menu-image:before{color:#2ea2cc}.folded #adminmenu div.wp-menu-image{width:35px;height:30px;position:absolute;z-index:25}.folded #adminmenu a.menu-top{height:34px}.no-font-face #adminmenu .wp-menu-image{display:none}.no-font-face #adminmenu div.wp-menu-name{padding:8px 12px}.no-font-face.auto-fold #adminmenu .wp-menu-name{margin-left:0}.sticky-menu #adminmenuwrap{position:fixed;z-index:9999}.wp-menu-arrow{display:none!important}ul#adminmenu a.wp-has-current-submenu{position:relative}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{right:0;border:solid 8px transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;border-right-color:#f1f1f1;top:50%;margin-top:-8px}.folded ul#adminmenu li:hover a.wp-has-current-submenu:after{display:none}.folded ul#adminmenu a.wp-has-current-submenu:after,.folded ul#adminmenu>li a.current:after{border-width:4px;margin-top:-4px}#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after{right:0;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;border-width:8px;top:10px;z-index:10000}.folded ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after{border-width:4px;margin-top:-4px;top:18px}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-right-color:#333}#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:5px;padding:0;margin:0 0 6px;cursor:inherit}#adminmenu div.separator{height:2px;padding:0}#adminmenu .wp-submenu .wp-submenu-head{color:#fff;font-weight:400;font-size:14px;padding:8px 4px 8px 11px;margin:-7px 0 4px}#adminmenu li.current,.folded #adminmenu li.wp-menu-open{border:0 none}#adminmenu .awaiting-mod,#adminmenu .update-plugins,#sidemenu li a span.update-plugins{display:inline-block;background-color:#d54e21;color:#fff;font-size:9px;line-height:17px;font-weight:600;margin:1px 0 0 2px;vertical-align:top;-webkit-border-radius:10px;border-radius:10px;z-index:26}#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 a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod{background-color:#2ea2cc;color:#fff}#adminmenu li span.count-0,#sidemenu li a .count-0{display:none}#collapse-menu{font-size:13px;line-height:34px;margin-top:10px;color:#aaa;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#collapse-menu:hover,#collapse-menu:hover #collapse-button div:after{color:#2ea2cc}.folded #collapse-menu span{display:none}#collapse-button,#collapse-button div{width:15px;height:15px}#collapse-button{float:left;height:15px;margin:10px 8px 10px 11px;width:15px;-webkit-border-radius:10px;border-radius:10px}#wpwrap #collapse-button div{padding:0}#collapse-button div:after{content:'\f148';display:block;line-height:15px;left:-3px;top:-3px;color:#aaa;font:400 20px/1 dashicons!important;speak:none;margin:0 auto;padding:0!important;position:relative;text-align:center;width:20px;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.folded #collapse-button div:after,.rtl #collapse-button div:after{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.rtl.folded #collapse-button div:after{-webkit-transform:none;-ms-transform:none;transform:none}li#wp-admin-bar-menu-toggle{display:none}@media only screen and (max-width:900px){.auto-fold #wpcontent,.auto-fold #wpfooter{margin-left:56px}.auto-fold #adminmenu,.auto-fold #adminmenu li.menu-top,.auto-fold #adminmenuback,.auto-fold #adminmenuwrap{width:36px}.auto-fold #adminmenu .opensub .wp-submenu,.auto-fold #adminmenu .wp-has-current-submenu .wp-submenu.sub-open,.auto-fold #adminmenu .wp-has-current-submenu a.menu-top:focus+.wp-submenu,.auto-fold #adminmenu .wp-has-current-submenu.opensub .wp-submenu,.auto-fold #adminmenu .wp-submenu.sub-open,.auto-fold #adminmenu a.menu-top:focus+.wp-submenu{top:0;left:36px}.auto-fold #adminmenu .wp-has-current-submenu .wp-submenu,.auto-fold #adminmenu a.wp-has-current-submenu:focus+.wp-submenu{position:absolute;top:-1000em;margin-right:-1px;padding:7px 0 8px;z-index:9999}.auto-fold #adminmenu .wp-has-current-submenu .wp-submenu{min-width:150px;width:auto}.auto-fold #adminmenu .wp-has-current-submenu li>a{padding-right:16px;padding-left:14px}.auto-fold #adminmenu li.menu-top .wp-submenu>li>a{padding-left:12px}.auto-fold #adminmenu .wp-menu-name{display:none}.auto-fold #adminmenu .wp-submenu-head{display:block}.auto-fold #adminmenu div.wp-menu-image{height:30px;width:34px;position:absolute;z-index:25}.auto-fold #adminmenu a.menu-top{height:34px}.auto-fold #adminmenu li.wp-menu-open{border:0 none}.auto-fold #adminmenu .wp-has-current-submenu.menu-top-last{margin-bottom:0}.auto-fold ul#adminmenu li:hover a.wp-has-current-submenu:after{display:none}.auto-fold ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after{border-width:4px;margin-top:-4px;top:16px}.auto-fold ul#adminmenu a.wp-has-current-submenu:after,.auto-fold ul#adminmenu>li a.current:after{border-width:4px;margin-top:-4px}.auto-fold #adminmenu li.menu-top:hover,.auto-fold #adminmenu li.opensub>a.menu-top,.auto-fold #adminmenu li>a.menu-top:focus{z-index:10000}.auto-fold #collapse-menu span{display:none}.auto-fold #collapse-button div{background:0 0}.auto-fold #collapse-button div:after{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.rtl.auto-fold #collapse-button div:after{-webkit-transform:none;-ms-transform:none;transform:none}}@media screen and (max-width:782px){.auto-fold #wpcontent{position:relative;margin-left:0;padding-left:10px}.sticky-menu #adminmenuwrap{position:relative;z-index:auto;top:0}.auto-fold #adminmenu,.auto-fold #adminmenuback,.auto-fold #adminmenuwrap{position:absolute;width:190px;z-index:100}.auto-fold #adminmenuback,.auto-fold #adminmenuwrap{display:none}.auto-fold .wp-responsive-open #adminmenuback,.auto-fold .wp-responsive-open #adminmenuwrap{display:block}.auto-fold #adminmenu li.menu-top{width:100%}.auto-fold #adminmenu li a{font-size:16px;padding:5px}.auto-fold #adminmenu li.menu-top .wp-submenu>li>a{padding:10px 10px 10px 20px}.auto-fold #adminmenu .wp-menu-name{display:block;margin-left:35px}.auto-fold ul#adminmenu a.wp-has-current-submenu:after,.auto-fold ul#adminmenu>li.current>a.current:after{border-width:8px;margin-top:-8px}.auto-fold ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after{display:none}#adminmenu .wp-submenu{position:relative;display:none}.auto-fold #adminmenu .selected .wp-submenu,.auto-fold #adminmenu .wp-menu-open .wp-submenu{position:relative;display:block;top:0;left:-1px;-webkit-box-shadow:none;box-shadow:none}.auto-fold #adminmenu .opensub .wp-submenu,.auto-fold #adminmenu .selected .wp-submenu:after,.auto-fold #adminmenu .wp-menu-open .wp-submenu:after{display:none}.auto-fold #adminmenu .selected .wp-submenu,.auto-fold ul#adminmenu li:hover a.wp-has-current-submenu:after{display:block}.auto-fold #adminmenu .wp-has-current-submenu a.menu-top:focus+.wp-submenu,.auto-fold #adminmenu a.menu-top:focus+.wp-submenu{position:relative;left:-1px;right:0;top:0}#adminmenu .wp-submenu .wp-submenu-head{display:none}#wp-responsive-toggle{position:fixed;top:5px;left:4px;padding-right:10px;z-index:99999;border:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wpadminbar #wp-admin-bar-menu-toggle a{display:block;padding:0;overflow:hidden;outline:0;text-decoration:none;border:1px solid transparent;background:0 0;height:44px;margin-left:-1px}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#333}li#wp-admin-bar-menu-toggle{display:block}#wpadminbar #wp-admin-bar-menu-toggle a:hover{border:1px solid transparent}#wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{content:'\f228';display:inline-block;float:left;font:400 40px/45px Dashicons;vertical-align:middle;outline:0;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;height:44px;width:50px;padding:0;border:0;text-align:center;text-decoration:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}}@media screen and (max-width:600px){#adminmenuback,#adminmenuwrap{display:none}.wp-responsive-open #adminmenuback,.wp-responsive-open #adminmenuwrap{display:block}.auto-fold #adminmenu{top:46px}}#wpbody-content #dashboard-widgets.columns-1 .postbox-container{width:100%}#wpbody-content #dashboard-widgets.columns-2 .postbox-container{width:49.5%}#wpbody-content #dashboard-widgets.columns-2 #postbox-container-2,#wpbody-content #dashboard-widgets.columns-2 #postbox-container-3,#wpbody-content #dashboard-widgets.columns-2 #postbox-container-4{float:right;width:50.5%}#wpbody-content #dashboard-widgets.columns-3 .postbox-container{width:33.5%}#wpbody-content #dashboard-widgets.columns-3 #postbox-container-1{width:33%}#wpbody-content #dashboard-widgets.columns-3 #postbox-container-3,#wpbody-content #dashboard-widgets.columns-3 #postbox-container-4{float:right}#dashboard-widgets .postbox-container,#wpbody-content #dashboard-widgets.columns-4 .postbox-container{width:25%}#dashboard-widgets-wrap .columns-3 #postbox-container-4 .empty-container{border:0!important}.ie8 #wpbody-content #dashboard-widgets .postbox-container{width:49.5%}.ie8 #wpbody-content #dashboard-widgets #postbox-container-2,.ie8 #wpbody-content #dashboard-widgets #postbox-container-3,.ie8 #wpbody-content #dashboard-widgets #postbox-container-4{float:right;width:50.5%}.ie8 #dashboard-widgets #postbox-container-3 .empty-container,.ie8 #dashboard-widgets #postbox-container-4 .empty-container{border:0 none;height:0;min-height:0}#dashboard-widgets-wrap{overflow:hidden;margin:0 -8px}#dashboard-widgets .postbox .inside{margin-bottom:0}#dashboard-widgets .meta-box-sortables{margin:0 8px;min-height:100px}h3.dashboard-widget-title,h3.dashboard-widget-title small,h3.dashboard-widget-title span{color:#333}h3.dashboard-widget-title small a{color:#d7d7d7}h3.dashboard-widget-title small a:hover{color:#fff}#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}#the-comment-list td.comment img{max-width:100%}.welcome-panel{position:relative;overflow:auto;margin:16px 0;padding:23px 10px 0;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fff;font-size:13px;line-height:2.1em}.welcome-panel h3{margin:0;font-size:21px;font-weight:400;line-height:1.2}.welcome-panel h4{margin:1.33em 0 0;font-size:16px}.welcome-panel li{font-size:14px}.welcome-panel p{color:#777}.welcome-panel a{text-decoration:none}.welcome-panel .about-description{font-size:16px;margin:0}.welcome-panel .welcome-panel-close{position:absolute;top:5px;right:10px;padding:20px 15px 0 3px;font-size:13px;text-decoration:none;line-height:1}#welcome-panel.welcome-panel .welcome-panel-close::before{position:absolute;left:-18px;margin-top:-2px;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.wp-core-ui .welcome-panel .button.button-hero{margin:15px 0 3px}.welcome-panel-content{margin-left:13px;max-width:1500px}.welcome-panel .welcome-panel-column-container{clear:both;overflow:hidden;position:relative}.welcome-panel .welcome-panel-column{width:32%;min-width:200px;float:left}.ie8 .welcome-panel .welcome-panel-column{min-width:230px}.welcome-panel .welcome-panel-column:first-child{width:36%}.welcome-panel-column p.hide-if-no-customize{margin-top:10px}.welcome-panel-column p{margin-top:7px;color:#464646}.welcome-panel .welcome-icon{display:block;padding:0 0 8px;background:transparent!important}.welcome-panel .welcome-icon:before{color:#888;font:400 20px/1 dashicons;speak:none;display:inline-block;padding:0 10px 0 0;top:-1px;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;vertical-align:top}.welcome-panel .welcome-edit-page:before,.welcome-panel .welcome-write-blog:before{content:'\f119';top:-3px}.welcome-panel .welcome-add-page:before{content:'\f132'}.welcome-panel .welcome-view-site:before{content:'\f115';top:-2px}.welcome-panel .welcome-widgets-menus:before{content:'\f116';top:-2px}.welcome-panel .welcome-comments:before{content:'\f117';top:-1px}.welcome-panel .welcome-learn-more:before{content:'\f118';top:-1px}.welcome-panel .welcome-widgets-menus{line-height:16px}.welcome-panel .welcome-panel-column ul{margin:.8em 1em 1em 0}.welcome-panel .welcome-panel-column li{line-height:16px;list-style-type:none}#dashboard_primary .inside{margin:0;padding:0}#dashboard_primary .dashboard-widget-control-form,#dashboard_primary .widget-loading{padding:12px 12px 0}body #dashboard-widgets .postbox form .submit{margin:0}.dashboard-widget-control-form{overflow:hidden}.dashboard-widget-control-form p{margin-top:0}div.dashboard-widget-error{background-color:#c43}div.dashboard-widget-notice{background-color:#cfe1ef}.rssSummary{color:#777;margin-top:4px}#dashboard_primary .rss-widget{border-bottom:1px solid #eee;font-size:13px;padding:8px 12px 10px}#dashboard_primary .rss-widget:last-child{border-bottom:0;padding-bottom:8px}#dashboard_primary .rss-widget a{font-weight:400}#dashboard_primary .rss-widget span,#dashboard_primary .rss-widget span.rss-date{color:#777}#dashboard_primary .rss-widget span.rss-date{margin-left:12px}#dashboard_primary .rss-widget ul li{margin-bottom:8px}#dashboard_right_now ul{margin:0;overflow:hidden}#dashboard_right_now li{width:50%;float:left;margin-bottom:10px}#dashboard_right_now .inside{overflow:hidden;padding:0}#dashboard_right_now .main{overflow:hidden;padding:0 12px 11px}#dashboard_right_now .main p{margin:0}#dashboard_right_now #wp-version-message .button{clear:right;float:right;position:relative;top:-5px}.mu-storage{overflow:hidden}#dashboard-widgets h4.mu-storage{margin-bottom:10px}#dashboard_right_now li a:before,#dashboard_right_now li span:before{color:#888}#dashboard_right_now .sub{color:#777;background:#f5f5f5;border-top:1px solid #eee;padding:10px 12px 6px}#dashboard_right_now .sub h4{color:#555}#dashboard_right_now .sub p{margin:0 0 1em}#dashboard_right_now .warning a:before,#dashboard_right_now .warning span:before{color:#d54e21}#dashboard_right_now li a:before,#dashboard_right_now li span:before{content:'\f159';font:400 20px/1 dashicons;speak:none;display:block;float:left;margin:0 5px 0 0;padding:0;text-indent:0;text-align:center;position:relative;-webkit-font-smoothing:antialiased;text-decoration:none!important}#dashboard_right_now .page-count a:before,#dashboard_right_now .page-count span:before{content:'\f105'}#dashboard_right_now .post-count a:before,#dashboard_right_now .post-count span:before{content:'\f109'}#dashboard_right_now .comment-count a:before{content:'\f101'}#dashboard_right_now .comment-mod-count a:before{content:'\f125'}#dashboard_right_now .storage-count a:before{content:'\f104'}#dashboard_right_now .storage-count.warning a:before{content:'\f153'}#dashboard_quick_press .inside{margin:0;padding:0}#dashboard_quick_press div.updated{margin-bottom:10px;border:1px solid #eee;border-width:1px 1px 1px 0}#dashboard_quick_press form{overflow:hidden;margin:12px}#dashboard_quick_press .drafts,#dashboard_quick_press .easy-blogging{padding:10px 0 0}input#save-post{float:left}form.initial-form.quickpress-open label.prompt{font-style:normal}form.initial-form.quickpress-open input#title{height:auto}#dashboard_quick_press input,#dashboard_quick_press textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0}#dashboard_quick_press textarea{resize:vertical}#description-wrap{margin-top:12px}#title-wrap #title-prompt-text,.textarea-wrap #content-prompt-text{color:#777}.input-text-wrap,.textarea-wrap{position:relative}.input-text-wrap .prompt,.textarea-wrap .prompt{position:absolute}.textarea-wrap #content-prompt-text{font-size:1.1em;padding:7px 8px}.textarea-wrap textarea#content{margin:0 0 8px;padding:6px 7px}#quick-press textarea#content{min-height:90px;max-height:1300px;resize:none}.js #dashboard_quick_press .drafts{border-top:1px solid #eee}#dashboard_quick_press .drafts abbr{border:0}#dashboard_quick_press .drafts h4{margin:0 12px 8px;font-weight:400}#dashboard_quick_press .drafts .view-all{float:right;margin:0 12px 0 0}#dashboard_primary a.rsswidget{font-weight:400}#dashboard_quick_press .drafts ul{margin:0 12px}#dashboard_quick_press .drafts li{margin-bottom:1em}#dashboard_quick_press .drafts li time{color:#777}#dashboard_quick_press .drafts p{margin:0;word-wrap:break-word}#dashboard_quick_press .draft-title{overflow:hidden}#dashboard_quick_press .draft-title a,#dashboard_quick_press .draft-title time{float:left;margin:0 5px 0 0}#dashboard-widgets #dashboard_activity h4{margin:0 0 8px 12px;font-weight:400}#dashboard-widgets #dashboard_activity h4.comment-meta{margin:0}#dashboard_activity h4.comment-meta{margin-bottom:4px}#dashboard_activity ul{padding:0 12px}#dashboard_activity .comment-meta span.approve:before{content:'\f227';font:20px/.5 dashicons;margin-left:12px;vertical-align:middle;position:relative;top:-1px;margin-right:2px}#dashboard_activity .inside{padding:0;margin:0}#dashboard_activity .no-activity{overflow:hidden;padding:0 12px 12px;text-align:center}#dashboard_activity .no-activity p{color:#999;font-size:16px}#dashboard_activity .no-activity .smiley{margin-top:0}#dashboard_activity .no-activity .smiley:before{content:'\f328';font:400 120px/1 dashicons;speak:none;display:block;margin:0 5px 0 0;padding:0;text-indent:0;text-align:center;position:relative;-webkit-font-smoothing:antialiased;text-decoration:none!important}#dashboard_activity .subsubsub{float:none;border-top:1px solid #eee;margin-top:0;padding:8px 12px 4px}#future-posts ul,#published-posts ul{clear:both;margin-bottom:0}#future-posts li,#published-posts li{overflow:hidden;margin-bottom:8px}#future-posts ul span,#published-posts ul span{color:#777;float:left;margin-right:8px;min-width:150px}.activity-block{border-bottom:1px solid #eee;overflow:hidden;padding:8px 0 4px}.activity-block:last-child{border-bottom:0}.activity-block .subsubsub li{color:#ddd}#activity-widget #the-comment-list div.undo,#activity-widget #the-comment-list tr.undo{background:0 0;padding:6px 0}#activity-widget #the-comment-list .alt,#activity-widget #the-comment-list .alternate{background:0 0}#activity-widget #the-comment-list .comment-item{background:#fafafa;padding:12px;position:relative}#activity-widget #the-comment-list img{position:absolute;left:13px;top:13px}#activity-widget #the-comment-list .dashboard-comment-wrap{padding-left:63px}#activity-widget #the-comment-list .dashboard-comment-wrap blockquote{margin:1em 0}#activity-widget #the-comment-list .comment-item h4{font-size:13px;color:#999}#activity-widget #the-comment-list .comment-item p.row-actions{margin:4px 0 0}#activity-widget #the-comment-list .comment-item:first-child{border-top:1px solid #eee}#activity-widget #the-comment-list .unapproved{background-color:#fef7f1}#activity-widget #the-comment-list .unapproved:before{content:"";display:block;position:absolute;left:0;top:0;bottom:0;background:#d54e21;width:4px}#activity-widget #the-comment-list .spam-undo-inside .avatar,#activity-widget #the-comment-list .trash-undo-inside .avatar{margin-right:20px;position:relative;top:0}#dashboard-widgets #dashboard_browser_nag.postbox .inside{margin:10px}.edit-box{display:none}h3:hover .edit-box{display:inline}#dashboard-widgets form .input-text-wrap input,#dashboard-widgets form .textarea-wrap textarea{width:100%}#dashboard-widgets .postbox form .submit{float:none;margin:.5em 0 0;padding:0;border: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:10px;padding:0;top:5px}.js #dashboard-widgets h3 .postbox-title-action{right:33px}#dashboard-widgets h4{color:#222;font-weight:400;font-size:14px;margin:0 0 .2em;padding:0}#dashboard_plugins h5{font-size:14px}#latest-comments #the-comment-list{position:relative}#activity-widget #the-comment-list .comment{-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.06);box-shadow:inset 0 1px 0 rgba(0,0,0,.06)}#activity-widget .comments #the-comment-list .alt{background-color:transparent}#activity-widget #latest-comments #the-comment-list .comment-item{padding:1em 12px}#latest-comments #the-comment-list .pingback{padding-left:12px!important}#latest-comments #the-comment-list .comment-item:first-child{border-top:0}#latest-comments #the-comment-list .comment-item h4{line-height:1.5em;margin-top:0;color:#666}#latest-comments #the-comment-list .comment-item h4 cite{font-style:normal;font-weight:400}#latest-comments #the-comment-list .comment-item blockquote,#latest-comments #the-comment-list .comment-item blockquote p{margin:0;padding:0;display:inline}#latest-comments #the-comment-list .comment-item p.row-actions{margin:3px 0 0;padding:0;font-size:13px}#title-wrap label{cursor:text}#title-wrap #title{padding:2px 6px;font-size:1.3em;line-height:100%;outline:0}#title-wrap #title-prompt-text{font-size:1.1em;padding:5px 8px}.rss-widget ul{margin:0;padding:0;list-style:none}a.rsswidget{font-size:14px;font-weight:600;line-height:1.7em}.rss-widget ul li{line-height:1.5em;margin-bottom:12px}.rss-widget span.rss-date{color:#999;font-size:13px;margin-left:3px}.rss-widget cite{display:block;text-align:right;margin:0 0 1em;padding:0}.rss-widget cite:before{content:'\2014'}.dashboard-comment-wrap{overflow:hidden;word-wrap:break-word}#dashboard_browser_nag a.update-browser-link{font-size:1.2em;font-weight:600}#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;color:#fff;-webkit-box-shadow:none;box-shadow:none}#dashboard_browser_nag.postbox.browser-insecure h3{border-bottom-color:#cd5a5a;color:#fff}#dashboard_browser_nag.postbox h3{border-bottom-color:#f6e2ac;background:transparent none;color:#fff;-webkit-box-shadow:none;box-shadow:none}#dashboard_browser_nag a{color:#fff}#dashboard_browser_nag h3.hndle{border:0;font-weight:600;font-size:20px;padding-top:10px}.postbox#dashboard_browser_nag p a.dismiss{font-size:14px}.postbox#dashboard_browser_nag a,.postbox#dashboard_browser_nag p,.postbox#dashboard_browser_nag p.browser-update-nag{font-size:16px}@media only screen and (max-width:799px){#wpbody-content #dashboard-widgets .postbox-container{width:100%}}@media only screen and (min-width:800px) and (max-width:1499px){#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 #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 .columns-prefs,.index-php .screen-layout{display:block}.columns-prefs .columns-prefs-3,.columns-prefs .columns-prefs-4{display:none}}@media only screen and (min-width:1500px) and (max-width:1800px){#wpbody-content #dashboard-widgets .postbox-container{width:33.5%}#wpbody-content #dashboard-widgets #postbox-container-1{width:33%}#wpbody-content #dashboard-widgets #postbox-container-3,#wpbody-content #dashboard-widgets #postbox-container-4{float:right}#dashboard-widgets #postbox-container-4 .empty-container{border:0 none;height:0;min-height:0}}@media screen and (max-width:870px){.welcome-panel .welcome-panel-column,.welcome-panel .welcome-panel-column:first-child{display:block;float:none;width:100%}.welcome-panel .welcome-panel-column li{display:inline-block;margin-right:13px}.welcome-panel .welcome-panel-column ul{margin:.4em 0 0}}@media screen and (max-width:782px){#dashboard_recent_comments #the-comment-list .comment-item .avatar{height:30px;width:30px;margin:4px 10px 5px 0}}@media screen and (max-width:600px){.welcome-panel .welcome-panel-close{overflow:hidden;text-indent:100%;white-space:nowrap;width:20px;height:20px;right:0;padding:5px}#welcome-panel.welcome-panel .welcome-panel-close::before{font-size:20px;margin:0}}.post-com-count-wrapper{min-width:22px}.post-com-count{background:0 0;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;color:#fff}.post-com-count:after{content:"";display:block;width:0;height:0;margin-left:8px;border-top:5px solid #bbb;border-right:5px solid transparent}.post-com-count span{font-size:11px;font-weight:600;height:1.4em;line-height:1.4em;min-width:.7em;padding:0 6px;display:inline-block;-webkit-border-radius:5px;border-radius:5px;background-color:#bbb;color:#fff}.post-com-count:hover{background-position:center -3px}.post-com-count:hover span{background-color:#2ea2cc}.post-com-count:hover:after{border-top:5px solid #2ea2cc}strong .post-com-count{background-position:center -55px}strong .post-com-count span{background-color:#0074a2}strong .post-com-count:after{border-top:5px solid #0074a2}.column-response .post-com-count{float:left;margin-right:5px;text-align:center}.response-links{float:left}.commentlist li{padding:1em 1em .2em;margin:0;border-bottom:1px solid #ccc}.commentlist li li{border-bottom:0;padding:0}.commentlist p{padding:0;margin:0 0 .8em}#submitted-on,.submitted-on{color:#777}#replyrow td{padding:2px}#replysubmit{margin:0;padding:0 5px 3px;text-align:center}#replysubmit .spinner{padding:2px 0 0;vertical-align:top;float:right}#replysubmit .button{margin-right:5px}#replysubmit .error{color:red;line-height:21px;text-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;-webkit-box-shadow:none;box-shadow:none}#replyerror{border-color:#ddd;background-color:#f9f9f9}.commentlist .avatar{vertical-align:text-top}#the-comment-list .attachment-80x60{padding:4px 8px}#the-comment-list div.undo,#the-comment-list tr.undo{background-color:#f4f4f4}#the-comment-list .unapproved td,#the-comment-list .unapproved th{background-color:#fef7f1}#the-comment-list .unapproved th.check-column{border-left:4px solid #d54e21}#the-comment-list .unapproved th.check-column input{margin-left:4px}#the-comment-list .approve a{color:#006505}#the-comment-list .unapprove a{color:#d98500}#the-comment-list td,#the-comment-list th{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}#the-comment-list tr:last-child td,#the-comment-list tr:last-child th{-webkit-box-shadow:none;box-shadow:none}#the-comment-list tr.unapproved+tr.approved td,#the-comment-list tr.unapproved+tr.approved th{border-top:1px solid rgba(0,0,0,.03)}.vim-current,.vim-current td,.vim-current th{background-color:#e4f2fd!important}th .comment-grey-bubble{height:16px;width:16px}th .comment-grey-bubble:before{content:'\f101';font:400 20px/.5 dashicons;speak:none;display:inline-block;padding:0;top:4px;left:-4px;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#444}table.fixed{table-layout:fixed}.fixed .column-rating,.fixed .column-visible{width:8%}.fixed .column-author,.fixed .column-date,.fixed .column-format,.fixed .column-links,.fixed .column-parent,.fixed .column-posts{width:10%}.fixed .column-comment .comment-author{display:none}.fixed .column-categories,.fixed .column-rel,.fixed .column-response,.fixed .column-role,.fixed .column-tags{width:15%}.fixed .column-slug{width:25%}.fixed .column-locations{width:35%}.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-icon{width:80px}.wp-list-table a{-webkit-transition:none;transition:none}#the-list tr:last-child td,#the-list tr:last-child th{border-bottom:0!important;-webkit-box-shadow:none;box-shadow:none}#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 .comments-box{border:0 none}#commentsdiv .comments-box thead th{background:0 0;padding:0 7px 4px;font-style:italic}#commentsdiv .comments-box tr:last-child td{border-bottom:0 none}#commentsdiv .spinner{padding-left:5px}.sorting-indicator{display:none;width:10px;height:4px;margin-top:8px;margin-left:7px}.sorting-indicator:before{background:0 0;content:'\f142';font:400 20px/1 dashicons;speak:none;display:inline-block;padding:0;top:-4px;left:-8px;line-height:10px;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#444}.column-comments .sorting-indicator:before{top:0;left:-10px}th.desc:hover span.sorting-indicator:before,th.sorted.asc .sorting-indicator:before{content:'\f142'}th.asc:hover span.sorting-indicator:before,th.sorted.desc .sorting-indicator:before{content:'\f140'}tr.wp-locked .locked-indicator{margin-left:6px;height:20px;width:16px}tr.wp-locked .locked-indicator:before{color:#888;content:'\f160';display:inline-block;float:left;font:400 20px/1 dashicons;speak:none;vertical-align:middle;margin-left:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}tr.wp-locked .check-column input[type=checkbox],tr.wp-locked .check-column label,tr.wp-locked .row-actions .inline,tr.wp-locked .row-actions .trash{display:none}tr .locked-info{height:0;opacity:0}tr.wp-locked .locked-info{margin-top:8px;height:auto;opacity:1}.locked-text{vertical-align:top}tr.locked-info,tr.wp-locked .locked-info{-webkit-transition:height 1s,opacity .5s;transition:height 1s,opacity .5s}.fixed .column-comments .sorting-indicator{margin-top:3px}#menu-locations-wrap .widefat{width:60%}.widefat th.sortable,.widefat th.sorted{padding:0}th.sortable a,th.sorted a{display:block;overflow:hidden;padding:7px 7px 8px 10px}th.manage-column a,th.sortable a:active,th.sortable a:focus,th.sortable a:hover{color:#333}th.sortable a:focus{background:#e1e1e1}.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.desc:hover span.sorting-indicator,th.sorted.asc .sorting-indicator{display:block;background-position:0 0}th.asc:hover span.sorting-indicator,th.sorted.desc .sorting-indicator{display:block;background-position:-7px 0}.tablenav-pages a{font-weight:600;margin-right:1px;padding:0 2px}.tablenav-pages .current-page{padding-top:0;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;color:#555;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{padding:0 10px 3px;background:#eee;background:rgba(0,0,0,.05);font-size:16px;font-weight:400}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover{color:#fff;background:#2ea2cc}.tablenav .tablenav-pages a.disabled,.tablenav .tablenav-pages a.disabled:active,.tablenav .tablenav-pages a.disabled:focus,.tablenav .tablenav-pages a.disabled:hover{color:#aaa;background:#eee;background:rgba(0,0,0,.05)}.tablenav .displaying-num{margin-right:2px;color:#777;font-size:12px;font-style:italic}.tablenav .actions{overflow:hidden;padding:2px 8px 0 0}.tablenav .delete{margin-right:20px}.tablenav .dots{border-color:transparent}.tablenav .next,.tablenav .prev{border-color:transparent;color:#0074a2}.tablenav .next:hover,.tablenav .prev:hover{border-color:transparent;color:#2ea2cc}.view-switch{float:right;margin:5px 16px 0 8px}.view-switch img{display:none}.view-switch a{text-decoration:none}.view-switch>a{display:inline-block;width:18px;height:18px}.view-switch>a:before{color:#bbb;content:'\f163';display:inline-block;float:left;font:400 20px/1 dashicons;speak:none;vertical-align:middle;margin-left:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.view-switch a:hover:before{color:#727272}.view-switch a.current:before{color:#0074a2}.view-switch>a+a:before{margin-left:5px;content:'\f164'}.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}p.pagenav{margin:0;display:inline}.pagenav span{font-weight:600;margin:0 6px}.row-title{font-size:14px!important;font-weight:600}.column-comment .comment-author{margin-bottom:.6em}.column-author img,.column-comment .comment-author img,.column-username img{float:left;margin-right:10px;margin-top:1px}.row-actions{color:#ddd;font-size:13px;visibility:hidden;padding:2px 0 0}.mobile .row-actions,.row-actions.visible,div.comment-item:hover .row-actions,tr:hover .row-actions{visibility:visible}.row-actions-visible{padding:2px 0 0}#wpbody-content .inline-edit-row fieldset{font-size:12px;float:left;margin:0;padding:0;width:100%}#wpbody-content .inline-edit-row fieldset .inline-edit-col,tr.inline-edit-row td{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 .bulk-edit-row-post .inline-edit-col-right,#wpbody-content .quick-edit-row-page .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.checkbox-title,.inline-edit-row fieldset span.title{margin:0;padding:0}.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;width:auto}.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-save .spinner{padding:4px 10px 0;vertical-align:top;float:right}.inline-edit-row h4{text-transform:uppercase}.inline-edit-row fieldset span.checkbox-title,.inline-edit-row fieldset span.title{font-style:italic;line-height:1.8em}.inline-edit-row fieldset .inline-edit-date{float:left}.inline-edit-row fieldset input[name=hh],.inline-edit-row fieldset input[name=jj],.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}ul.cat-checklist{height:12em;border:solid 1px #ddd;overflow-y:scroll;padding:0 5px;margin:0;background-color:#fff}#bulk-titles{display:block;height:12em;border:1px solid #ddd;overflow-y:scroll;padding:0 5px;margin:0 0 5px}.inline-edit-row fieldset ul.cat-checklist input,.inline-edit-row fieldset ul.cat-checklist li{margin:0;position:relative}.inline-edit-row #bulk-titles div,.inline-edit-row fieldset ul.cat-checklist label{font-style:normal;font-size:11px}.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%}.inline-edit-row #post_parent,.inline-edit-row select[name=page_template]{max-width:80%}.ie8 .inline-edit-row #post_parent,.ie8 .inline-edit-row select[name=page_template]{width:250px}.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:18px;margin:0 3px 0 -2px;overflow:hidden;position:relative;width:20px}#bulk-titles div a:before{position:relative;top:-3px}.plugins tbody,.plugins tbody th.check-column{padding:8px 0 0 2px}.plugins tbody th.check-column input[type=checkbox]{margin-top:4px}#update-plugins-table tbody td p{margin-top:0}#update-plugins-table tbody td p strong{font-size:14px}.plugins .inactive th.check-column,.plugins tfoot th.check-column,.plugins thead th.check-column{padding-left:6px}#update-plugins-table tfoot th.check-column,#update-plugins-table thead th.check-column{padding-top:11px}.plugins,.plugins td,.plugins th{color:#000}.plugins tr{background:#fff}.plugins p{margin:0 4px;padding:0}.plugins .desc p{margin:0 0 8px}.plugins td.desc{line-height:1.5em}.plugins .desc ol,.plugins .desc ul{margin:0 0 0 2em}.plugins .desc ul{list-style-type:disc}.plugins .row-actions{font-size:13px}.plugins .active td,.plugins .active th,.plugins .inactive td,.plugins .inactive th{padding:10px 9px}.plugins .active td,.plugins .active th{background-color:#f7fcfe}.plugins .update td,.plugins .update th{border-bottom:0}.plugin-update-tr td{border-top:0}.plugin-install #the-list td,.plugins .active td,.plugins .active th,.plugins .inactive td,.plugins .inactive th,.upgrade .plugins td,.upgrade .plugins th{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}.plugins tr.active+tr.inactive td,.plugins tr.active+tr.inactive th,.plugins tr.active.plugin-update-tr+tr.inactive td,.plugins tr.active.plugin-update-tr+tr.inactive th{border-top:1px solid rgba(0,0,0,.03);-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.02),inset 0 -1px 0 #e1e1e1;box-shadow:inset 0 1px 0 rgba(0,0,0,.02),inset 0 -1px 0 #e1e1e1}.plugins .update td,.plugins .update th,.plugins tr.active+tr.inactive.update td,.plugins tr.active+tr.inactive.update th,.upgrade .plugins tr:last-of-type td,.upgrade .plugins tr:last-of-type th{-webkit-box-shadow:none;box-shadow:none}.plugins .active.update td,.plugins .active.update th,tr.active.update+tr.plugin-update-tr .plugin-update{background-color:#fef7f1}.plugins .active th.check-column{border-left:4px solid #2ea2cc}.plugins .active.update th.check-column,.plugins .active.update+.plugin-update-tr .plugin-update{border-left:4px solid #d54e21}#wpbody-content .plugins .plugin-title,#wpbody-content .plugins .theme-title{padding-right:12px;white-space:nowrap}.plugins .inactive .plugin-title strong{font-weight:400}.plugins .row-actions,.plugins .second{padding:0 0 5px}.plugins .update .row-actions,.plugins .update .second{padding-bottom:0}.plugins-php .widefat tfoot td,.plugins-php .widefat tfoot th{border-top-style:solid;border-top-width:1px}.plugin-update-tr .update-message{font-size:13px;font-weight:400;padding:6px 12px;margin:0 10px 8px 31px;background-color:#f7f7f7;background-color:rgba(0,0,0,.03)}.plugin-update-tr .update-message:before{color:#d54e21;content:'\f463';display:inline-block;font:400 20px/1 dashicons;speak:none;margin:0 8px 0 -2px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top}.plugins .plugin-update{padding:0;border:0;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}tr.active+tr.plugin-update-tr .plugin-update{background-color:#f7fcfe}tr.active+tr.plugin-update-tr .plugin-update .update-message{background-color:#fcf3ef}.plugin-install-php h4{margin:2.5em 0 8px}.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}@media screen and (max-width:782px){.tablenav{height:auto}.tablenav.top{margin:0}.tablenav.bottom{position:relative;margin-top:15px}.tablenav br{display:none}.tablenav br.clear{display:block}.tablenav.top .actions,.tablenav.top .displaying-num,.view-switch{display:none}.tablenav.bottom .displaying-num{position:absolute;right:0;top:10px;font-size:14px}.tablenav-pages{width:100%;text-align:center;margin:0 0 25px}.tablenav.bottom .tablenav-pages{margin-top:25px}.tablenav.top .tablenav-pages.one-page{display:none}.tablenav.bottom .tablenav-pages.one-page{margin:15px 0 0;height:0}.tablenav-pages .pagination-links .paging-input{font-size:18px}.tablenav-pages .pagination-links a{padding:8px 20px 11px;font-size:18px;background:rgba(0,0,0,.05)}.tablenav-pages .pagination-links .current-page{padding:10px;font-size:14px}.form-wrap>p{display:none}.comment-count{font-size:14px}.column-categories,.column-tags,.fixed .column-author,.fixed .column-date,.media .column-parent,.sites .column-registered,.sites .column-users,.tags .column-description,.users .column-email,.users .column-name{display:none}.fixed .column-comment .comment-author{display:block}.column-title{width:85%}.fixed .column-comments,.widefat .check-column{width:35px}.widefat tfoot .check-column,.widefat thead .check-column{padding:10px 0}.widefat *{word-wrap:normal}#wpbody-content .bulk-edit-row .inline-edit-col-bottom,#wpbody-content .bulk-edit-row .inline-edit-col-left,#wpbody-content .bulk-edit-row-page .inline-edit-col-right,#wpbody-content .bulk-edit-row-post .inline-edit-col-right,#wpbody-content .inline-edit-row-post .inline-edit-col-center,#wpbody-content .quick-edit-row-page .inline-edit-col-left,#wpbody-content .quick-edit-row-page .inline-edit-col-right,#wpbody-content .quick-edit-row-post .inline-edit-col-left,#wpbody-content .quick-edit-row-post .inline-edit-col-right{float:none;width:100%}#wpbody-content .bulk-edit-row fieldset .inline-edit-col label,#wpbody-content .bulk-edit-row fieldset .inline-edit-group label,#wpbody-content .quick-edit-row fieldset .inline-edit-col label,#wpbody-content .quick-edit-row fieldset .inline-edit-group label{max-width:none;float:none;margin-bottom:5px}#wpbody .bulk-edit-row fieldset select{display:block;width:100%;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.inline-edit-row #bulk-titles div,.inline-edit-row fieldset ul.cat-checklist label{font-size:16px}.inline-edit-row fieldset label span.title{float:none}.inline-edit-row fieldset label.inline-edit-tags{padding:0 .5em}.inline-edit-row fieldset .inline-edit-col label.inline-edit-tags{padding:0}.inline-edit-row fieldset label span.input-text-wrap{margin-left:0}.inline-edit-row fieldset input[name=hh],.inline-edit-row fieldset input[name=jj],.inline-edit-row fieldset input[name=mn]{width:3em}.inline-edit-row fieldset input[name=aa]{width:4.5em}#bulk-titles div{margin:.8em .3em}#bulk-titles div a{height:22px}.tags .column-posts{width:50px}.tags .column-slug{width:30%}.comments .column-response,.users .column-role{width:35%}.sites .column-blogname{width:55%}#wpbody-content #update-themes-table .plugin-title{width:auto}.link-manager-php #posts-filter{margin-top:25px}.link-manager-php .tablenav.bottom{overflow:hidden}.wp-list-table.plugins{position:relative;margin-top:35px;margin-bottom:50px}#wpbody-content .wp-list-table.plugins tfoot .column-description,.wp-list-table.plugins th#description,.wp-list-table.plugins thead .column-description{display:none}#wpbody-content .wp-list-table.plugins,#wpbody-content .wp-list-table.plugins .column-description,#wpbody-content .wp-list-table.plugins .manage-column.column-name,#wpbody-content .wp-list-table.plugins .plugin-title,#wpbody-content .wp-list-table.plugins .plugin-update,#wpbody-content .wp-list-table.plugins .theme-title,#wpbody-content .wp-list-table.plugins tbody,#wpbody-content .wp-list-table.plugins thead,#wpbody-content .wp-list-table.plugins tr{display:block;width:auto}.wp-list-table.plugins tfoot,.wp-list-table.plugins thead{position:absolute;top:-35px;left:0;right:0;width:auto;height:35px}.wp-list-table.plugins tfoot{bottom:-35px;top:auto}.active,.inactive{padding-top:0}.wp-list-table.plugins .plugin-title,.wp-list-table.plugins .theme-title{padding-top:13px;padding-bottom:4px}.plugins tr.active+tr.inactive td,.plugins tr.active+tr.inactive th.check-column,.wp-list-table.plugins .plugin-title,.wp-list-table.plugins .theme-title,.wp-list-table.plugins tbody th{-webkit-box-shadow:none;box-shadow:none}.plugins tbody{padding:1px 0 0}.plugins tr.active+tr.inactive td.column-description{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}.plugins tr.active+tr.inactive td,.plugins tr.active+tr.inactive th.check-column{border-top:0}.wp-list-table.plugins .column-description{padding-top:0}.wp-list-table.plugins .column-description,.wp-list-table.plugins .manage-column.column-name,.wp-list-table.plugins .plugin-title,.wp-list-table.plugins .theme-title{padding-right:12px;padding-left:46px}.wp-list-table.plugins tr{position:relative}.wp-list-table.plugins th.check-column,.wp-list-table.plugins tr.update th.check-column{position:absolute;height:auto;top:0;bottom:0;left:0;padding-left:2px;padding-top:18px}.wp-list-table.plugins tfoot th.check-column,.wp-list-table.plugins thead th.check-column{padding-left:3px;padding-top:11px;background:0 0}.widefat tbody th.check-column input[type=checkbox]{margin-top:-3px;margin-left:8px}.wp-list-table.plugins .active .check-column input,.wp-list-table.plugins .update .check-column input{margin-left:5px}.wp-list-table.plugins tfoot .check-column input,.wp-list-table.plugins thead .check-column input{margin-top:-6px}.wp-list-table.plugins .active th.check-column{background:0 0}.wp-list-table.plugins .plugin-title strong,.wp-list-table.plugins .theme-title strong{font-size:1.4em;line-height:1.6em}table.plugin-install .column-description,table.plugin-install .column-name,table.plugin-install .column-rating,table.plugin-install .column-version{display:block;width:auto}table.plugin-install th.column-description,table.plugin-install th.column-name,table.plugin-install th.column-rating,table.plugin-install th.column-version{display:none}table.plugin-install td.column-name strong{font-size:1.4em;line-height:1.6em}table.plugin-install #the-list td{-webkit-box-shadow:none;box-shadow:none}table.plugin-install #the-list tr{display:block;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}}#poststuff{padding-top:10px;min-width:763px}#poststuff #post-body{padding:0}#poststuff .postbox-container{width:100%}#poststuff #post-body.columns-2{margin-right:300px}#show-comments{overflow:hidden}#save-action .spinner,#show-comments .spinner,#show-comments a{float:left}#lost-connection-notice .spinner{display:block;float:left;margin:0 5px 0 0}#titlediv{position:relative;margin-bottom:10px}#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%;height:1.7em;width:100%;outline:0;margin:0;background-color:#fff}#titlediv #title-prompt-text{color:#777;position:absolute;font-size:1.7em;padding:11px 10px}#wp-fullscreen-save .fs-saved{color:#999;float:right;margin-top:4px}#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{line-height:24px;min-height:25px;margin-top:5px;padding:0 10px;color:#666}#edit-slug-box .cancel{margin-right:10px;font-size:11px}#editable-post-name-full{display:none}#editable-post-name{background-color:#fffbcc}#editable-post-name input{font-size:13px;height:22px;margin:0;width:16em}.postarea h3 label{float:left}.submitbox .submit{text-align:left;padding:12px 10px 10px;font-size:11px;background-color:#464646;color:#ccc}.submitbox .submitdelete{text-decoration:none;padding:1px 2px}#normal-sortables .submitbox .submitdelete:hover{color:#000;background-color:red;border-bottom-color:red}.submitbox .submit a:hover{text-decoration:underline}.submitbox .submit input{margin-bottom:8px;margin-right:4px;padding:6px}.inside-submitbox #post_status{margin:2px 0 2px -2px}#post-status-select{margin-top:3px}#post-body #normal-sortables{min-height:50px}.postbox{position:relative;min-width:255px;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fff}#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;vertical-align:baseline}#side-sortables .category-add input[type=text],#side-sortables .category-add select{margin:0 0 1em}#side-sortables .add-menu-item-tabs li,.wp-tab-bar li,ul.category-tabs li{display:inline;line-height:1.35em}.no-js .category-tabs li.hide-if-no-js{display:none}#side-sortables .add-menu-item-tabs a,.category-tabs a,.wp-tab-bar a{text-decoration:none}#post-body ul.add-menu-item-tabs li.tabs a,#post-body ul.category-tabs li.tabs a,#side-sortables .add-menu-item-tabs .tabs a,#side-sortables .category-tabs .tabs a,.wp-tab-bar .wp-tab-active a{color:#333}.category-tabs{margin:8px 0 5px}#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 .preview,#side-sortables .submitbox .submit a.preview:hover,#side-sortables .submitbox .submit input{border:0 none}#side-sortables .inside-submitbox .insidebox,.stuffbox .insidebox{margin:11px 0}ul.add-menu-item-tabs,ul.category-tabs,ul.wp-tab-bar{margin-top:12px}ul.add-menu-item-tabs li,ul.category-tabs li{border:solid 1px transparent;position:relative}.wp-tab-active,ul.add-menu-item-tabs li.tabs,ul.category-tabs li.tabs{border:1px solid #dfdfdf;border-bottom-color:#fdfdfd;background-color:#fdfdfd}ul.add-menu-item-tabs li,ul.category-tabs li,ul.wp-tab-bar li{padding:3px 5px 5px}#postimagediv .inside img{max-width:100%;height:auto}form#tags-filter{position:relative}td.plugin-title strong,td.post-title strong{display:block;margin-bottom:.2em;font-size:14px}td.plugin-title p,td.post-title p{margin:6px 0}.ui-tabs-hide,.wp-hidden-children .wp-hidden-child{display:none}#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{width:100%;border-spacing:0;border:1px solid #e5e5e5;border-top:0;background-color:#f7f7f7;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04)}#post-status-info td{font-size:12px}.autosave-info{padding:2px;text-align:right}#editorcontent #post-status-info{border:0}#content-resize-handle{background:transparent url(../images/resize.gif) no-repeat scroll right bottom;width:12px;cursor:row-resize}.rtl #content-resize-handle{background:transparent url(../images/resize-rtl.gif) no-repeat scroll left bottom}#wp-word-count{display:block;padding:2px 10px}#timestampdiv select{height:21px;line-height:14px;padding:0;vertical-align:top;font-size:12px}#aa,#hh,#jj,#mn{padding:1px;font-size:12px}#hh,#jj,#mn{width:2em}#aa{width:3.4em}.curtime #timestamp{padding:2px 0 1px;display:inline!important;height:auto!important}#misc-publishing-actions label[for=post_status]:before,#post-body #visibility:before,#post-body .misc-pub-revisions:before,.curtime #timestamp:before,span.wp-media-buttons-icon:before{color:#888}#post-body #visibility:before,#post-body .misc-pub-revisions:before,.curtime #timestamp:before{font:400 20px/1 dashicons;speak:none;display:inline-block;padding:0 2px 0 0;top:0;left:-1px;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}#post-body #visibility:before{content:'\f177'}.curtime #timestamp:before{content:'\f145';top:-1px}#post-body .misc-pub-revisions:before{content:'\f321'}#timestampdiv{padding-top:5px;line-height:23px}#timestampdiv p{margin:8px 0 6px}#timestampdiv input{border-width:1px;border-style:solid}.notification-dialog{position:fixed;top:30%;left:50%;width:450px;margin-left:-225px;background:#fff;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3);line-height:1.5;z-index:1000005}.notification-dialog-background{position:fixed;top:0;left:0;right:0;bottom:0;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:1000000}#post-lock-dialog .post-locked-message,#post-lock-dialog .post-taken-over{margin:25px}#post-lock-dialog .post-locked-message a.button{margin-right:10px}#post-lock-dialog .post-locked-avatar{float:left;margin:0 20px 20px 0}#post-lock-dialog .wp-tab-first{outline:0}#post-lock-dialog .locked-saving img{float:left;margin-right:3px}#post-lock-dialog.saved .locked-saved,#post-lock-dialog.saving .locked-saving{display:inline}#excerpt,.attachmentlinks{margin:0;height:4em;width:98%}.tagchecklist{margin-left:14px;font-size:12px;overflow:auto}.tagchecklist br{display:none}.tagchecklist strong{margin-left:-8px;position:absolute}.tagchecklist span{margin-right:25px;display:block;float:left;font-size:13px;line-height:1.8em;white-space:nowrap;cursor:default}.tagchecklist span a{margin:1px 0 0 -17px;cursor:pointer;width:20px;height:20px;display:block;float:left;text-indent:0;overflow:hidden;position:absolute}#poststuff h2{margin-top:20px;font-size:1.5em;margin-bottom:15px;padding:0 0 3px;clear:left}#poststuff h3{font-size:14px;padding:8px 12px;margin:0;line-height:1.4}#poststuff .inside{margin:6px 0 0}#poststuff .inside #page_template,#poststuff .inside #parent_id{max-width:100%}#poststuff .inside label.deleted,#poststuff .inside label.spam{color:red}#poststuff .inside label.waiting{color:orange}#poststuff .inside label.approved{color:green}.ie8 #poststuff .inside #page_template,.ie8 #poststuff .inside #parent_id{width:250px}#post-visibility-select{line-height:1.5em;margin-top:3px}#poststuff #submitdiv .inside{margin:0;padding:0}.edit-form-section{margin-bottom:20px}#postcustomstuff thead th{padding:5px 8px 8px;background-color:#f1f1f1}#postcustom #postcustomstuff .submit{border:0 none;float:none;padding:0 8px 8px}#side-sortables #postcustom #postcustomstuff .submit{margin:0;padding:0}#side-sortables #postcustom #postcustomstuff #the-list textarea{height:85px}#side-sortables #postcustom #postcustomstuff td.left input,#side-sortables #postcustom #postcustomstuff td.left select,#side-sortables #postcustomstuff #newmetaleft a{margin:3px 3px 0}#postcustomstuff table{margin:0;width:100%;border:1px solid #dfdfdf;border-spacing:0;background-color:#f9f9f9}#postcustomstuff tr{vertical-align:top}#postcustomstuff table input,#postcustomstuff table select,#postcustomstuff table textarea{width:96%;margin:8px}#side-sortables #postcustomstuff table input,#side-sortables #postcustomstuff table select,#side-sortables #postcustomstuff table textarea{margin:3px}#postcustomstuff td.left,#postcustomstuff th.left{width:38%}#postcustomstuff .submit input{margin:0;width:auto}#postcustomstuff #newmetaleft a{display:inline-block;margin:0 8px 8px;text-decoration:none}.no-js #postcustomstuff #enternew{display:none}#post-body-content .compat-attachment-fields{margin-bottom:20px}.compat-attachment-fields th{padding-top:5px;padding-right:10px}#select-featured-image{padding:4px 0;overflow:hidden}#select-featured-image img{max-width:100%;height:auto;margin-bottom:10px}#select-featured-image a{float:left;clear:both}#select-featured-image .remove{display:none;margin-top:10px}.js #select-featured-image.has-featured-image .remove{display:inline-block}.no-js #select-featured-image .choose{display:none}.post-state-format{overflow:hidden;display:inline-block;vertical-align:middle;height:20px;width:20px;margin-right:5px;margin-top:-4px}.post-state-format:before{display:block;height:20px;width:20px;font:400 20px/1 dashicons!important;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.post-format-icon:before,.post-state-format:before{color:#ddd;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}a.post-format-icon:hover:before,a.post-state-format:hover:before{color:#2ea2cc}#post-formats-select{line-height:2em}#post-formats-select .post-format-icon:before{top:5px}input.post-format{margin-top:1px}label.post-format-icon{margin-left:0;padding:2px 0}.post-format-icon:before{position:relative;display:inline-block;margin-right:7px;font:400 20px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.post-format-icon.post-format-standard:before,.post-state-format.post-format-standard:before,a.post-state-format.format-standard:before{content:'\f109'}.post-format-icon.post-format-image:before,.post-state-format.post-format-image:before,a.post-state-format.format-image:before{content:'\f128'}.post-format-icon.post-format-gallery:before,.post-state-format.post-format-gallery:before,a.post-state-format.format-gallery:before{content:'\f161'}.post-format-icon.post-format-audio:before,.post-state-format.post-format-audio:before,a.post-state-format.format-audio:before{content:'\f127'}.post-format-icon.post-format-video:before,.post-state-format.post-format-video:before,a.post-state-format.format-video:before{content:'\f126'}.post-format-icon.post-format-chat:before,.post-state-format.post-format-chat:before,a.post-state-format.format-chat:before{content:'\f125'}.post-format-icon.post-format-status:before,.post-state-format.post-format-status:before,a.post-state-format.format-status:before{content:'\f130'}.post-format-icon.post-format-aside:before,.post-state-format.post-format-aside:before,a.post-state-format.format-aside:before{content:'\f123'}.post-format-icon.post-format-quote:before,.post-state-format.post-format-quote:before,a.post-state-format.format-quote:before{content:'\f122'}.post-format-icon.post-format-link:before,.post-state-format.post-format-link:before,a.post-state-format.format-link:before{content:'\f103'}.category-adder{margin-left:120px;padding:4px 0}.category-adder h4{margin:0 0 8px}#side-sortables .category-adder{margin:0}.categorydiv div.tabs-panel,.customlinkdiv div.tabs-panel,.posttypediv div.tabs-panel,.taxonomydiv div.tabs-panel,.wp-tab-panel{min-height:42px;max-height:200px;overflow:auto;padding:0 .9em;border:solid 1px #dfdfdf;background-color:#fdfdfd}div.tabs-panel-active{display:block}div.tabs-panel-inactive{display:none}#front-page-warning,#front-static-pages ul,.categorydiv ul.categorychecklist ul,.customlinkdiv ul.categorychecklist ul,.inline-editor ul.cat-checklist ul,.posttypediv ul.categorychecklist ul,.taxonomydiv ul.categorychecklist ul,ul.export-filters{margin-left:18px}ul.categorychecklist li{margin:0;padding:0;line-height:22px;word-wrap:break-word}.categorydiv .tabs-panel,.customlinkdiv .tabs-panel,.posttypediv .tabs-panel,.taxonomydiv .tabs-panel{border-width:3px;border-style:solid}.form-wrap label{display:block;padding:2px;font-size:12px}.form-field input,.form-field textarea{border-style:solid;border-width:1px;width:95%}.form-wrap p,p.description{margin:2px 0 5px;color:#666}.form-wrap p,p.description,p.help,span.description{font-size:13px;font-style:italic}.form-wrap .form-field{margin:0 0 10px;padding:8px 0}.form-wrap .form-field #parent{max-width:100%}.col-wrap h3{margin:12px 0;font-size:1.1em}.col-wrap p.submit{margin-top:-10px}.tagsdiv{margin-top:-8px}#poststuff .taghint{color:#aaa;margin:15px 0 -24px 12px}#poststuff .tagsdiv .howto{margin:0 0 6px}.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}.taghint{color:#aaa;margin:-17px 0 0 7px;visibility:hidden}input.newtag~div.taghint{visibility:visible}input.newtag:focus~div.taghint{visibility:hidden}p.popular-tags{border:0;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:1px solid gray;background-color:#fff}.wp-customizer .ac_results{z-index:500000}.ac_results li{padding:2px 5px;white-space:nowrap;color:#101010;text-align:left}.ac_over{background-color:#f0f0b8;cursor:pointer}.ac_match{text-decoration:underline}.comment-php .wp-editor-area{height:200px}.comment-ays{margin-bottom:0;border-bottom-style:solid;border-bottom-width:1px}.comment-ays .alt{background-color:transparent}.spam-undo-inside,.trash-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}table.links-table{width:100%;border-spacing:0}.links-table th{font-weight:400;text-align:left;vertical-align:top;min-width:80px;width:20%;word-wrap:break-word}.links-table td,.links-table th{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 print,(-o-min-device-pixel-ratio:5/4),(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){#content-resize-handle,#post-body .wp_themeSkin .mceStatusbar a.mceResize{background:transparent url(../images/resize-2x.gif) no-repeat scroll right bottom;-webkit-background-size:11px 11px;background-size:11px 11px}.rtl #content-resize-handle,.rtl #post-body .wp_themeSkin .mceStatusbar a.mceResize{background:transparent url(../images/resize-rtl-2x.gif) no-repeat scroll right bottom}}@media only screen and (max-width:850px){#poststuff{min-width:0}#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 #side-sortables:empty,#poststuff #postbox-container-1 .empty-container{border:0 none;height:0;min-height:0}#poststuff #post-body.columns-2 #side-sortables{min-height:0}.columns-prefs,.screen-layout{display:none}}@media screen and (max-width:782px){#post-body-content{min-width:0}#titlediv #title-prompt-text{padding:10px}#poststuff h3{padding:12px}.post-format-options{padding-right:0}.post-format-options a{margin-right:5px;margin-bottom:5px;min-width:52px}.post-format-options .post-format-title{font-size:11px}.post-format-options a div{height:28px;width:28px}.post-format-options a div:before{font-size:26px!important}#post-visibility-select{line-height:280%}.wp-core-ui .save-post-visibility,.wp-core-ui .save-timestamp{vertical-align:middle;margin-right:15px}.timestamp-wrap select#mm{display:block;width:100%;margin-bottom:10px}.timestamp-wrap #aa,.timestamp-wrap #hh,.timestamp-wrap #jj,.timestamp-wrap #mn{padding:12px 3px;font-size:14px;margin-bottom:5px;width:auto;text-align:center}ul.category-tabs{margin:30px 0 15px}ul.category-tabs li.tabs{padding:15px}ul.categorychecklist li{margin-bottom:15px}ul.categorychecklist ul{margin-top:15px}.category-add input[type=text],.category-add select{max-width:none;margin-bottom:15px}.tagsdiv .newtag{width:100%;height:auto;margin-bottom:15px}.tagchecklist{margin:25px 10px}.tagchecklist span{font-size:16px;line-height:120%}#commentstatusdiv p{line-height:2.8}.mceToolbar *{white-space:normal!important}.mceToolbar td,.mceToolbar tr{float:left!important}.wp_themeSkin a.mceButton{width:30px;height:30px}.wp_themeSkin .mceButton .mceIcon{margin-top:5px;margin-left:5px}.wp_themeSkin .mceSplitButton{margin-top:1px}.wp_themeSkin .mceSplitButton td a.mceAction{padding-top:6px;padding-bottom:6px;padding-left:6px;padding-right:3px}.wp_themeSkin .mceSplitButton td a.mceOpen,.wp_themeSkin .mceSplitButtonEnabled:hover td a.mceOpen{padding-top:6px;padding-bottom:6px;background-position:1px 6px}.wp_themeSkin table.mceListBox{margin:5px}div.quicktags-toolbar input{padding:10px 20px}#wp-content-editor-tools{overflow:hidden;padding:20px 15px 1px 0;top:1px}a.wp-switch-editor{font-size:16px;line-height:1em;margin:3px 0 0 7px;padding:12px 15px}#wp-content-media-buttons a{font-size:16px;line-height:37px;height:39px;padding:0 20px 0 15px}.wp-media-buttons span.jetpack-contact-form-icon,.wp-media-buttons span.wp-media-buttons-icon{width:22px!important;margin-top:-3px!important;margin-left:-5px!important}.wp-media-buttons #insert-jetpack-contact-form span.jetpack-contact-form-icon:before,.wp-media-buttons .add_media span.wp-media-buttons-icon:before{font-size:20px!important}#content_wp_fullscreen{display:none}.misc-pub-section{padding:20px 10px}.misc-pub-section>a{float:right;font-size:16px}#delete-action,#publishing-action{line-height:47px}.comment-ays{border-bottom:0}.links-table #link_rel{max-width:none}.links-table td,.links-table th{padding:10px 0}}@media only screen and (max-width:500px){#wp-content-media-buttons a{font-size:14px;padding:0 10px}}.revisions-control-frame,.revisions-diff-frame{position:relative}.revisions-controls{padding-top:40px;height:100px;z-index:1}.revisions-controls input[type=checkbox]{position:relative;top:-1px;vertical-align:text-bottom}.revisions.pinned .revisions-controls{position:fixed;top:0;height:82px;background:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.1);box-shadow:0 1px 3px rgba(0,0,0,.1)}.revisions-tickmarks{position:relative;margin:0 auto;height:.7em;top:7px;max-width:70%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background-color:#fff}.revisions-tickmarks>div{position:absolute;height:100%;border-left:1px solid #aaa;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.revisions-tickmarks>div:first-child{border-width:0}.comparing-two-revisions .revisions-controls{height:140px}.comparing-two-revisions.pinned .revisions-controls{height:124px}.revisions .diff-error{position:absolute;text-align:center;margin:0 auto;width:100%;display:none}.revisions.diff-error .diff-error{display:block}.revisions .loading-indicator{position:fixed;vertical-align:middle;opacity:0;width:100%;top:50%;margin-left:-90px;-webkit-transition:opacity .5s;transition:opacity .5s;filter:alpha(opacity=0)}body.folded .revisions .loading-indicator{margin-left:-32px}.revisions .loading-indicator span.spinner{display:block;margin:0 auto;float:none}.revisions.loading .loading-indicator{opacity:1;filter:alpha(opacity=100)}.revisions .diff{-webkit-transition:opacity .5s;transition:opacity .5s}.revisions.loading .diff{opacity:.5;filter:alpha(opacity=50)}.revisions.diff-error .diff{visibility:hidden}.revisions-meta{margin-top:20px;background-color:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.1);box-shadow:0 1px 3px rgba(0,0,0,.1)}.revisions.pinned .revisions-meta{-webkit-box-shadow:none;box-shadow:none}.revision-toggle-compare-mode{position:absolute;top:0;right:0}.comparing-two-revisions .revisions-next,.comparing-two-revisions .revisions-previous,.revisions-meta .diff-meta-to strong{display:none}.revisions-controls .author-card .date{color:#777}.revisions-controls .author-card.autosave{color:#d54e21}.revisions-controls .author-card .author-name{font-weight:700}.comparing-two-revisions .diff-meta-to strong{display:block}.revisions.pinned .revisions-buttons{padding:0 11px}.revisions-next,.revisions-previous{position:relative;z-index:1}.revisions-previous{float:left}.revisions-next{float:right}.revisions-controls .wp-slider{max-width:70%;margin:0 auto;top:-3px}.revisions-diff{padding:15px;background-color:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.1);box-shadow:0 1px 3px rgba(0,0,0,.1)}.revisions-diff h3:first-child{margin-top:0}#revisions-meta-restored img,.post-revisions li img{vertical-align:middle}table.diff tbody tr td:nth-child(2){width:4%}table.diff{table-layout:fixed;width:100%;white-space:pre-wrap}table.diff col.content{width:auto}table.diff col.content.diffsplit{width:48%}table.diff col.diffsplit.middle{width:auto}table.diff col.ltype{width:30px}table.diff tr{background-color:transparent}table.diff td,table.diff th{font-family:Consolas,Monaco,monospace;font-size:14px;line-height:1.618;padding:.5em;vertical-align:top;word-wrap:break-word}table.diff td h1,table.diff td h2,table.diff td h3,table.diff td h4,table.diff td h5,table.diff td h6{margin:0}table.diff .diff-addedline ins,table.diff .diff-deletedline del{text-decoration:none}table.diff .diff-deletedline{background-color:#ffe9e9}table.diff .diff-deletedline del{background-color:#faa}table.diff .diff-addedline{background-color:#e9ffe9}table.diff .diff-addedline ins{background-color:#afa}.diff-meta{padding:5px;clear:both;min-height:32px}.diff-title strong{line-height:32px;min-width:60px;text-align:right;float:left;margin-right:5px}.revisions-controls .author-card .author-info{font-size:12px;line-height:16px}.revisions-controls .author-card .author-info,.revisions-controls .author-card .avatar{float:left;margin-left:6px;margin-right:6px}.revisions-controls .author-card .byline{display:block;font-size:12px}.revisions-controls .author-card .avatar{vertical-align:middle}.diff-meta input.restore-revision{float:right;margin-left:6px;margin-right:6px;margin-top:4px}.diff-meta-from{display:none}.comparing-two-revisions .diff-meta-from{display:block}.revisions-tooltip{position:absolute;bottom:105px;margin-right:0;margin-left:-69px;z-index:0;max-width:350px;min-width:130px;padding:8px 4px;opacity:0}.revisions-tooltip.flipped{margin-left:0;margin-right:-70px}.revisions.pinned .revisions-tooltip{display:none!important}.comparing-two-revisions .revisions-tooltip{bottom:145px}.revisions-tooltip-arrow{width:70px;height:15px;overflow:hidden;position:absolute;left:0;margin-left:35px;bottom:-15px}.revisions-tooltip.flipped .revisions-tooltip-arrow{margin-left:0;margin-right:35px;left:auto;right:0}.revisions-tooltip-arrow>span{content:"";position:absolute;left:20px;top:-20px;width:25px;height:25px;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.revisions-tooltip.flipped .revisions-tooltip-arrow>span{left:auto;right:20px}.ie8 .revisions-tooltip-arrow>span{left:15px;top:-25px;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, M22=0.7071067811865476)"}.ie8 .revisions-tooltip.flipped .revisions-tooltip-arrow>span{right:25px}.revisions-tooltip,.revisions-tooltip-arrow>span{border:1px solid #d7d7d7;background-color:#fff}.revisions-tooltip{display:none}.arrow{width:70px;height:16px;overflow:hidden;position:absolute;left:0;margin-left:-35px;bottom:90px;z-index:10000}.arrow::after{z-index:9999;background-color:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.1);box-shadow:0 1px 3px rgba(0,0,0,.1)}.arrow.top{top:-16px;bottom:auto}.arrow.left{left:20%}.arrow:after{content:"";position:absolute;left:20px;top:-20px;width:25px;height:25px;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.revisions-tooltip,.revisions-tooltip-arrow:after{border-width:1px;border-style:solid}div.revisions-controls>.wp-slider>.ui-slider-handle{margin-left:-10px}.rtl div.revisions-controls>.wp-slider>.ui-slider-handle{margin-right:-10px}.wp-slider.ui-slider{position:relative;border:1px solid #d7d7d7;text-align:left;cursor:pointer}.wp-slider .ui-slider-handle{-webkit-border-radius:50%;border-radius:50%;height:18px;margin-top:-3px;outline:0;position:absolute;width:18px;z-index:2}.wp-slider .ui-slider-handle,.wp-slider .ui-slider-handle.focus,.wp-slider .ui-slider-handle.ui-state-hover{background:#2ea2cc;border:1px solid #0074a2;-webkit-box-shadow:inset 0 1px 0 #78c8e6,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #78c8e6,0 1px 0 rgba(0,0,0,.15)}.wp-slider .ui-slider-handle:before{background:0 0;position:absolute;top:0;left:0;color:#fff;content:"\f229";font:400 18px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wp-slider .ui-slider-handle.from-handle:before,.wp-slider .ui-slider-handle.to-handle:before{font-size:20px!important;margin:-1px 0 0 -1px}.wp-slider .ui-slider-handle.from-handle:before{content:'\f139'}.rtl .wp-slider .ui-slider-handle.from-handle:before,.wp-slider .ui-slider-handle.to-handle:before{content:'\f141'}.rtl .wp-slider .ui-slider-handle.to-handle:before{content:'\f139';right:-1px}.wp-slider .ui-slider-range{position:absolute;font-size:.7em;display:block;border:0;background-color:transparent;background-image:none}.wp-slider.ui-slider-horizontal{height:.7em}.wp-slider.ui-slider-horizontal .ui-slider-handle{top:-.25em;margin-left:-.6em}.wp-slider.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.wp-slider.ui-slider-horizontal .ui-slider-range-min{left:0}.wp-slider.ui-slider-horizontal .ui-slider-range-max{right:0}@media print,(-o-min-device-pixel-ratio:5/4),(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.revision-tick.completed-false{background-image:url(../images/spinner-2x.gif)}}@media screen and (max-width:782px){#diff-next-revision,#diff-previous-revision{margin-top:-1em}table.diff{-ms-word-break:break-all;word-break:break-all;word-wrap:break-word}}.media-item .describe{border-collapse:collapse;width:100%;border-top:1px solid #dfdfdf;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:600}.media-upload-form tr.image-size label{margin:0 0 0 5px;font-weight:600}.media-upload-form th.label label{font-weight:600;margin:.5em;font-size:13px}.media-upload-form th.label label span{padding:0 5px}.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-off,.describe-toggle-on,.media-item .edit-attachment{display:block;line-height:36px;float:right}.media-item .describe-toggle-off,.media-item.open .describe-toggle-on{display:none}.media-item.open .describe-toggle-off{display:block}#media-items .media-item{border-bottom:1px solid #dfdfdf;min-height:36px;position:relative;width:100%}#media-items{width:623px}.media-new-php #media-items{margin:1em 0}#media-items:empty{border:0 none}.media-item .filename{line-height:36px;overflow:hidden}.media-item .pinkynail{float:left;margin:2px 10px 0 0;max-width:40px;max-height:32px}.media-item .startclosed,.media-item .startopen{display:none}.media-item .original{position:relative;height:34px}.media-item .progress{float:right;height:22px;margin:7px 0 0;width:200px;line-height:2em;padding:0;overflow:hidden;margin-bottom:2px;-webkit-border-radius:22px;border-radius:22px;background:#ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.media-item .bar{z-index:9;width:0;height:100%;margin-top:-22px;-webkit-border-radius:22px;border-radius:22px;background-color:#0074a2;-webkit-box-shadow:inset 0 0 2px rgba(0,0,0,.3);box-shadow:inset 0 0 2px rgba(0,0,0,.3)}.media-item .progress .percent{z-index:10;position:relative;width:200px;padding:0;color:#fff;text-align:center;line-height:22px;font-weight:400;text-shadow:0 1px 2px rgba(0,0,0,.2)}.upload-php .fixed .column-parent{width:15%}.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-item .error-div,.media-upload-form .media-item.error p{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{background-color:#fff;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3);width:600px;overflow:hidden;margin-left:-300px;position:fixed;top:30px;bottom:30px;left:50%;z-index:100105}.find-box-head{background:#fcfcfc;border-bottom:1px solid #dfdfdf;height:36px;font-size:18px;font-weight:600;line-height:36px;padding:0 36px 0 16px;position:absolute;top:0;left:0;right:0}.find-box-inside{overflow:auto;padding:16px;background-color:#fff;position:absolute;top:37px;bottom:45px;overflow-y:scroll;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.find-box-search{padding-bottom:16px}.find-box-search .spinner{float:none;left:125px;position:absolute;top:18px}#find-posts-input,#find-posts-search{float:left}#find-posts-input{width:140px;height:28px;margin:0 4px 0 0}.widefat .found-radio{padding-right:0;width:16px}#find-posts-close{width:36px;height:36px;position:absolute;top:0;right:0;cursor:pointer;text-align:center;color:#666}#find-posts-close:hover{color:#2ea2cc}#find-posts-close:before{font:400 20px/36px dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:'\f158'}.find-box-buttons{padding:8px 16px;background:#fcfcfc;border-top:1px solid #dfdfdf;position:absolute;bottom:0;left:0;right:0}@media screen and (max-width:782px){.find-box-inside{bottom:57px}}@media screen and (max-width:660px){.find-box{top:0;bottom:0;left:0;right:0;margin:0;width:100%}}.ui-find-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:100100}ul#dismissed-updates{display:none}form.upgrade{margin-top:8px}form.upgrade .hint{font-style:italic;font-size:85%;margin:-.5em 0 2em 0}#poststuff .inside .the-tagcloud{margin:5px 0 10px;padding:8px;border:1px solid #ddd;line-height:1.8em;word-spacing:3px;-webkit-border-radius:6px;border-radius:6px}.drag-drop #drag-drop-area{border:4px dashed #bbb;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}.wp_attachment_details label[for=content]{font-size:13px;line-height:1.5;margin:1em 0}.wp_attachment_details #attachment_caption{height:4em}.describe .image-editor{vertical-align:top}.imgedit-wrap{position:relative}.imgedit-settings p{margin:8px 0 0}.describe .imgedit-wrap .imgedit-settings{padding:0 5px}.wp_attachment_holder div.updated{margin-top:0}.wp_attachment_holder .imgedit-wrap>div{height:auto;overflow:hidden}.wp_attachment_holder .imgedit-wrap .imgedit-panel-content{padding-right:16px;width:auto;overflow:hidden}.wp_attachment_holder .imgedit-wrap .imgedit-settings{float:right;width:250px}.imgedit-settings input{margin-top:0;vertical-align:middle}.imgedit-wait{position:absolute;top:0;background:#fff url(../images/spinner.gif) no-repeat center;-webkit-background-size:20px 20px;background-size:20px 20px;opacity:.7;filter:alpha(opacity=70);width:100%;height:500px;display:none}.no-float{float:none}.imgedit-settings .disabled,.media-disabled{color:grey}.A1B1,.wp_attachment_image{overflow:hidden}.A1B1 .button,.wp_attachment_image .button{float:left}.no-js .wp_attachment_image .button{display:none}.A1B1 .spinner,.wp_attachment_image .spinner{float:left;padding:0 0 4px;vertical-align:bottom}.imgedit-menu{margin:0 0 12px;min-width:300px}.imgedit-menu div{float:left;width:32px;border:1px solid #d5d5d5;background:#f1f1f1;margin:0 8px 0 0;height:32px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;line-height:28px;color:#777;cursor:pointer}.imgedit-menu div:before{font:400 20px/1 dashicons;speak:none;vertical-align:middle}.imgedit-menu div:hover{border-color:#c1c1c1;background-color:#eaeaea;color:#333}.imgedit-menu div.disabled{border-color:#ccc;background-color:#ddd;color:#777;filter:alpha(opacity=50);opacity:.5;cursor:default}.imgedit-crop:before{content:'\f165'}.imgedit-rleft:before{content:'\f166'}.imgedit-rright:before{content:'\f167'}.imgedit-flipv:before{content:'\f168'}.imgedit-fliph:before{content:'\f169'}.imgedit-undo:before{content:'\f171'}.imgedit-redo:before{content:'\f172'}.imgedit-crop-wrap{position:relative}.imgedit-crop{margin:0 8px 0 0}.imgedit-rleft{margin:0 3px}.imgedit-rright{margin:0 8px 0 3px}.imgedit-flipv{margin:0 3px}.imgedit-fliph{margin:0 8px 0 3px}.imgedit-undo{margin:0 3px}.imgedit-redo{margin:0 8px 0 3px}.imgedit-applyto img{margin:0 8px 0 0}.imgedit-group-top{margin:5px 0}#poststuff .imgedit-group-top h3{padding:0}.imgedit-group-top h3 a{text-decoration:none}.imgedit-applyto .imgedit-label{padding:2px 0 0;display:block}.imgedit-help{display:none;font-style:italic}a.imgedit-help-toggle{text-decoration:none}.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{margin-bottom:8px;padding:2px 10px}audio,video{display:inline-block;max-width:100%}.mejs-container{width:100%}@media print,(-o-min-device-pixel-ratio:5/4),(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.imgedit-wait{background-image:url(../images/spinner-2x.gif)}}@media screen and (max-width:782px){.wp_attachment_details label[for=content]{font-size:14px;line-height:1.5em}}.theme-browser .themes{clear:both;padding:0 0 100px}.themes-php .wrap h2{float:left;margin-bottom:15px}.network-admin.themes-php .wrap h2{margin-bottom:0}.themes-php .wrap h2 .button{margin-left:20px}.theme-navigation .theme-count,.themes-php .wrap .theme-count{color:#fff;-webkit-border-radius:30px;border-radius:30px;background:#777;font-size:14px;padding:4px 10px;font-weight:600;margin-left:5px;margin-right:20px;position:relative;top:-3px}.theme-navigation a{text-decoration:none}.themes-php div.error,.themes-php div.updated{margin:0 0 20px;clear:both}.themes-php div.updated a{text-decoration:underline}.theme-browser .theme{cursor:pointer;float:left;margin:0 4% 4% 0;position:relative;width:30.6%;border:1px solid #dedede;-webkit-box-shadow:0 1px 1px -1px rgba(0,0,0,.1);box-shadow:0 1px 1px -1px rgba(0,0,0,.1);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ie8 .theme-browser .theme{width:30%;margin:0 3% 4% 0}.theme-browser .theme:nth-child(3n){margin-right:0}.theme-browser .theme:focus,.theme-browser .theme:hover{cursor:pointer}.theme-browser .theme .theme-name{font-size:15px;font-weight:600;height:18px;margin:0;padding:15px;-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(0,0,0,.1);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;background:#fff;background:rgba(255,255,255,.65)}.theme-browser .theme .theme-actions{-ms-filter:"alpha(Opacity=0)";opacity:0;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;position:absolute;bottom:0;right:0;height:38px;padding:9px 10px 0;background:rgba(244,244,244,.7);border-left:1px solid rgba(0,0,0,.05)}.theme-browser .theme.focus .theme-actions,.theme-browser .theme:focus .theme-actions,.theme-browser .theme:hover .theme-actions{-ms-filter:"alpha(Opacity=100)";opacity:1}.theme-browser .theme .theme-actions .button-primary{margin-right:3px}.theme-browser .theme .theme-actions .button-secondary{float:none;margin-left:3px}.theme-browser .theme .theme-screenshot{display:block;overflow:hidden;position:relative;-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out}.theme-browser .theme .theme-screenshot:after{content:'';display:block;padding-top:66.66666%}.theme-browser .theme .theme-screenshot img{height:auto;position:absolute;left:0;top:0;width:100%;-webkit-transform:translateZ(0);-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out}.theme-browser .theme:focus .theme-screenshot,.theme-browser .theme:hover .theme-screenshot{background:#fff}.theme-browser.rendered .theme:focus .theme-screenshot img,.theme-browser.rendered .theme:hover .theme-screenshot img{opacity:.4}.theme-browser .theme .more-details{-ms-filter:"alpha(Opacity=0)";opacity:0;position:absolute;top:35%;right:25%;left:25%;background:#222;background:rgba(0,0,0,.7);color:#fff;font-size:15px;text-shadow:0 1px 0 rgba(0,0,0,.6);-webkit-font-smoothing:antialiased;font-weight:600;padding:15px 12px;text-align:center;-webkit-border-radius:3px;border-radius:3px;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.theme-browser .theme:focus{outline:1px dotted #222}.theme-browser .theme:focus .more-details{opacity:1}.theme-browser .theme.active:focus .theme-actions{display:block}.theme-browser.rendered .theme:focus .more-details,.theme-browser.rendered .theme:hover .more-details{-ms-filter:"alpha(Opacity=100)";opacity:1}.theme-browser .theme .theme-installed,.theme-browser .theme .theme-update{background:#d54e21;background:rgba(213,78,33,.95);color:#fff;display:block;font-size:13px;font-weight:400;height:48px;line-height:48px;padding:0 10px;position:absolute;top:0;right:0;left:0;border-bottom:1px solid rgba(0,0,0,.25);overflow:hidden}.theme-browser .theme .theme-installed:before,.theme-browser .theme .theme-update:before{content:'\f463';display:inline-block;font:400 20px/1 dashicons;margin:0 6px 0 0;opacity:.8;position:relative;top:5px;speak:none;-webkit-font-smoothing:antialiased}.theme-browser .theme.active .theme-name{background:#2f2f2f;color:#fff;padding-right:110px;font-weight:300;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.5);box-shadow:inset 0 1px 1px rgba(0,0,0,.5)}.theme-browser .theme.active .theme-name span{font-weight:600}.theme-browser .theme.active .theme-actions{background:rgba(49,49,49,.7);border-left:0;opacity:1}.theme-browser .theme.active .theme-actions .button-primary{margin-right:0}.theme-browser .theme .theme-author{background:#222;color:#eee;display:none;font-size:14px;margin:0 10px;padding:5px 10px;position:absolute;bottom:56px}.theme-browser .theme.display-author .theme-author{display:block}.theme-browser .theme.display-author .theme-author a{color:inherit;text-decoration:none}.theme-browser .theme.add-new-theme{border:0;-webkit-box-shadow:none;box-shadow:none}.theme-browser .theme.add-new-theme a{color:#999;text-decoration:none;display:block;position:relative;z-index:1}.theme-browser .theme.add-new-theme:after{display:block;content:'';-ms-filter:"alpha(Opacity=100)";opacity:1;background:0 0;background:rgba(0,0,0,0);position:absolute;top:0;left:0;right:0;bottom:0;padding:10% 0 0;text-shadow:none;border:5px dashed #d5d2ca;border:5px dashed rgba(0,0,0,.1);-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.theme-browser .theme.add-new-theme span:after{background:#e5e5e5;background:rgba(153,153,153,.1);-webkit-border-radius:50%;border-radius:50%;display:inline-block;content:'\f132';-webkit-font-smoothing:antialiased;font:400 74px/115px dashicons;width:100px;height:100px;vertical-align:middle;text-align:center;color:#999;position:absolute;top:30%;left:50%;margin-left:-50px;text-indent:-4px;padding:0;text-shadow:none;z-index:4}.rtl .theme-browser .theme.add-new-theme span:after{text-indent:4px}.theme-browser .theme.add-new-theme:focus .theme-screenshot,.theme-browser .theme.add-new-theme:hover .theme-screenshot{background:0 0}.theme-browser .theme.add-new-theme:focus span:after,.theme-browser .theme.add-new-theme:hover span:after{background:#fff;color:#0074a2}.theme-browser .theme.add-new-theme:focus:after,.theme-browser .theme.add-new-theme:hover:after{border-color:transparent;color:#fff;background:#0074a2;content:''}.theme-browser .theme.add-new-theme .theme-name{background:0 0;text-align:center;-webkit-box-shadow:none;box-shadow:none;font-weight:400;position:relative;top:0;margin-top:-10%;margin-bottom:10%}.theme-browser .theme.add-new-theme:focus .theme-name,.theme-browser .theme.add-new-theme:hover .theme-name{color:#fff;z-index:2}.themes-php .theme-search{position:relative;top:-2px;left:20px;font-size:16px;font-weight:300;line-height:1.5;width:280px}.theme-overlay .theme-backdrop{position:absolute;left:-20px;right:0;top:0;bottom:0;background:#f1f1f1;background:rgba(238,238,238,.9);z-index:10}body.theme-overlay-open{overflow:hidden}.theme-overlay .theme-header{position:absolute;top:0;left:0;right:0;height:48px;border-bottom:1px solid #ddd}.theme-overlay .theme-header .close{cursor:pointer;height:48px;width:50px;text-align:center;float:right;border:0;border-left:1px solid #ddd;background-color:transparent}.theme-overlay .theme-header .close:focus:before,.theme-overlay .theme-header .close:hover:before{color:#fff}.theme-overlay .theme-header .close:before{font:400 30px/50px dashicons!important;color:#777;display:inline-block;content:'\f335';font-weight:300}.theme-overlay .theme-header .left,.theme-overlay .theme-header .right{cursor:pointer;color:#777;background-color:transparent;height:48px;width:54px;float:left;text-align:center;border:0;border-right:1px solid #ddd}.theme-overlay .theme-header .close:focus,.theme-overlay .theme-header .close:hover,.theme-overlay .theme-header .left:focus,.theme-overlay .theme-header .left:hover,.theme-overlay .theme-header .right:focus,.theme-overlay .theme-header .right:hover{background:#0074a2;color:#fff}.theme-overlay .theme-header .left.disabled,.theme-overlay .theme-header .left.disabled:hover,.theme-overlay .theme-header .right.disabled,.theme-overlay .theme-header .right.disabled:hover{color:#ccc;background:inherit;cursor:inherit}.theme-overlay .theme-header .left:before,.theme-overlay .theme-header .right:before{font:400 20px/50px dashicons!important;display:inline;font-weight:300}.theme-overlay .theme-header .left:before{content:'\f340'}.theme-overlay .theme-header .right:before{content:'\f344'}.rtl .theme-overlay .theme-header .left:before{content:'\f345'}.rtl .theme-overlay .theme-header .right:before{content:'\f341'}.theme-overlay .theme-wrap{clear:both;position:fixed;top:9%;left:190px;right:30px;bottom:3%;background:#fff;-webkit-box-shadow:0 1px 20px 5px rgba(0,0,0,.1);box-shadow:0 1px 20px 5px rgba(0,0,0,.1);z-index:20;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.theme-overlay .theme-wrap:after{content:".";display:block;height:0;clear:both;visibility:hidden}body.folded .theme-overlay .theme-wrap{left:70px}.theme-overlay .theme-about{position:absolute;top:49px;bottom:57px;left:0;right:0;overflow:auto;padding:2% 4%}.theme-overlay .theme-about:after{content:".";display:block;height:0;clear:both;visibility:hidden}.theme-overlay .theme-actions{position:absolute;text-align:center;bottom:0;left:0;right:0;padding:10px 25px 5px;background:#f3f3f3;z-index:30;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border-top:1px solid #eee}.ie8 .theme-overlay .theme-actions{border:1px solid #eee}.theme-overlay .theme-actions a{margin-right:5px;margin-bottom:5px}.theme-overlay .theme-actions .delete-theme{color:#a00;position:absolute;right:10px;bottom:5px;text-decoration:none;border-color:transparent;-webkit-box-shadow:none;box-shadow:none;background:0 0}.theme-overlay .theme-actions .delete-theme:focus,.theme-overlay .theme-actions .delete-theme:hover{background:#d54e21;color:#fff;border-color:#d54e21}.theme-overlay .theme-actions .active-theme,.theme-overlay.active .theme-actions .inactive-theme{display:none}.theme-overlay .theme-actions .inactive-theme,.theme-overlay.active .theme-actions .active-theme{display:block}.theme-overlay .theme-screenshots{float:left;margin:0 30px 0 0;width:55%;max-width:880px;text-align:center}.theme-overlay .screenshot{border:1px solid #fff;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;overflow:hidden;position:relative;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.2);box-shadow:0 0 0 1px rgba(0,0,0,.2)}.theme-overlay .screenshot:after{content:'';display:block;padding-top:75%}.theme-overlay .screenshot img{height:auto;position:absolute;left:0;top:0;width:100%}.theme-overlay.small-screenshot .theme-screenshots{position:absolute;width:302px}.theme-overlay.small-screenshot .theme-info{margin-left:350px;width:auto}.theme-overlay .screenshot.thumb{background:#ccc;border:1px solid #eee;float:none;display:inline-block;margin:10px 5px 0;width:140px;height:80px;cursor:pointer}.theme-overlay .screenshot.thumb:after{content:'';display:block;padding-top:100%}.theme-overlay .screenshot.thumb img{cursor:pointer;position:absolute;left:0;top:0;width:100%;height:auto}.theme-overlay .screenshot.selected{background:0 0;border:2px solid #2ea2cc}.theme-overlay .screenshot.selected img{opacity:.8}.theme-browser .theme .theme-screenshot.blank,.theme-overlay .screenshot.blank{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAALElEQVQYGWO8d+/efwYkoKioiMRjYGBC4WHhUK6A8T8QIJt8//59ZC493AAAQssKpBK4F5AAAAAASUVORK5CYII=)}.theme-overlay .theme-info{width:40%;float:left}.theme-overlay .current-label{background:#333;color:#fff;font-size:11px;display:inline-block;padding:2px 8px;-webkit-border-radius:2px;border-radius:2px;margin:0 0 -10px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.theme-overlay .theme-name{color:#222;font-size:32px;font-weight:100;margin:10px 0 0;line-height:1.3}.theme-overlay .theme-version{color:#999;font-size:13px;font-weight:400;float:none;display:inline-block;margin-left:10px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.theme-overlay .theme-author{color:#686868;font-size:16px;font-weight:400;margin:15px 0 25px}.theme-overlay .theme-author a{text-decoration:none}.theme-overlay .theme-description{color:#555;font-size:15px;font-weight:400;line-height:1.5;margin:30px 0 0}.theme-overlay .theme-tags{border-top:3px solid #eee;color:#888;font-size:13px;font-weight:400;margin:30px 0 0;padding-top:20px}.theme-overlay .theme-tags span{color:#444;font-weight:700;margin-right:5px}.theme-overlay .theme-update-message{background:#fef7f1;border:1px solid #eee;border-left:4px solid #d54e21;-webkit-border-radius:3px;border-radius:3px;padding:5px 20px 10px}.theme-overlay .theme-update{color:#222;font-size:18px;display:inline-block;line-height:40px;margin:0}.theme-overlay .parent-theme{background:#f7fcfe;border:1px solid #eee;border-left:4px solid #2ea2cc;font-size:14px;font-weight:400;margin-top:30px;padding:10px 10px 10px 20px}.theme-overlay .parent-theme strong{font-weight:700}.single-theme .theme,.single-theme .theme-overlay .theme-backdrop,.single-theme .theme-overlay .theme-header{display:none}.single-theme .theme-overlay .theme-wrap{clear:both;min-height:330px;position:relative;left:auto;right:auto;top:auto;bottom:auto}.single-theme .theme-overlay .theme-about{padding:30px 30px 70px;position:static}.single-theme .theme-overlay .theme-actions{position:absolute}@media only screen and (min-width:2000px){#wpwrap .theme-browser .theme{width:17.6%;margin:0 3% 3% 0}#wpwrap .theme-browser .theme:nth-child(3n),#wpwrap .theme-browser .theme:nth-child(4n){margin-right:3%}#wpwrap .theme-browser .theme:nth-child(5n){margin-right:0}}@media only screen and (min-width:1680px){.theme-overlay .theme-wrap{width:1450px;margin:0 auto}}@media only screen and (min-width:1640px){.theme-browser .theme{width:22.7%;margin:0 3% 3% 0}.theme-browser .theme .theme-screenshot:after{padding-top:75%}.theme-browser .theme:nth-child(3n){margin-right:3%}.theme-browser .theme:nth-child(4n){margin-right:0}}@media only screen and (max-width:1120px){.theme-browser .theme{width:47.5%;margin-right:0}.theme-browser .theme:nth-child(even){margin-right:0}.theme-browser .theme:nth-child(odd){margin-right:5%}}@media only screen and (max-width:900px){.theme-overlay .theme-wrap{left:65px}}@media only screen and (max-width:780px){.theme-overlay .theme-wrap,body.folded .theme-overlay .theme-wrap{top:0;right:0;bottom:0;left:0;padding:70px 20px 20px;border:0;z-index:500;position:fixed}.theme-browser .theme.active .theme-name span{display:none}.theme-overlay .theme-screenshots{width:40%}.theme-overlay .theme-info{width:50%}.single-theme .theme-wrap{padding:10px}.theme-browser .theme .theme-actions{padding:5px 10px 4px}.theme-overlay.small-screenshot .theme-screenshots{position:static;float:none;max-width:302px}.theme-overlay.small-screenshot .theme-info{margin-left:0;width:auto}.theme:focus .more-details,.theme:hover .more-details,.theme:not(.active):focus .theme-actions,.theme:not(.active):hover .theme-actions{display:none}.theme-browser.rendered .theme:focus .theme-screenshot img,.theme-browser.rendered .theme:hover .theme-screenshot img{opacity:1}}@media only screen and (max-width:480px){.theme-browser .theme{width:100%;margin-right:0}.theme-browser .theme:nth-child(2n),.theme-browser .theme:nth-child(3n){margin-right:0}}@media only screen and (max-width:650px){.theme-overlay .theme-description,.theme-overlay .theme-update{margin-left:0}.theme-overlay .theme-actions .delete-theme{position:relative;right:auto;bottom:auto}.theme-overlay .theme-actions .inactive-theme{display:inline}.theme-overlay .theme-screenshots{width:100%;float:none}.theme-overlay .theme-info{width:100%}.theme-overlay .theme-author{margin:5px 0 15px}.theme-overlay .current-label{margin-top:10px;font-size:13px}.themes-php .wrap h2{width:100%}.themes-php .theme-search{float:none;clear:both;left:0;top:0;right:0;margin:10px 0;width:100%}.theme-browser .theme.add-new-theme span:after{font:400 60px/90px dashicons;width:80px;height:80px;top:30%;left:50%;text-indent:0;margin-left:-40px}.single-theme .theme-wrap{margin:0 -12px 0 -10px;padding:10px}.single-theme .theme-overlay .theme-about{padding:10px;overflow:visible}.single-theme .current-label{display:none}.single-theme .theme-overlay .theme-actions{position:static}}.broken-themes{clear:both}.broken-themes table{text-align:left;width:50%;border-spacing:3px;padding:3px}.theme-browser .theme .theme-installed{background:#0074a2}.theme-browser .theme .theme-installed:before{content:'\f147'}.theme-browser .theme.is-installed .theme-actions .button-primary{display:none!important}.theme-navigation{background:#fff;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;color:#555;display:inline-block;font-size:13px;margin:20px 0 30px;padding:0 20px;position:relative;width:100%}.theme-install-php a.browse-themes,.theme-install-php a.upload{cursor:pointer}.theme-install-php a.browse-themes,.theme-install-php.show-upload-theme a.upload{display:none}.theme-install-php.show-upload-theme a.browse-themes{display:inline}.upload-theme{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:none;margin:0;padding:0;width:100%;overflow:hidden;position:relative;top:10px}body.show-upload-theme .upload-theme{display:block}.upload-theme .wp-upload-form{background:#fafafa;border:1px solid #e5e5e5;padding:30px;margin:30px auto;max-width:380px}.upload-theme .install-help{color:#999;font-size:18px;font-style:normal;margin:0;padding:40px 0 0;text-align:center}body.show-upload-theme .upload-theme+.theme-navigation,body.show-upload-theme .upload-theme+.theme-navigation+.theme-browser{display:none}.theme-navigation .theme-count{margin-left:0;position:absolute;top:12px}.theme-count+.theme-section{margin-left:60px}.theme-filter,.theme-section{border-bottom:4px solid #fff;color:#666;cursor:pointer;display:inline-block;margin:0 10px;padding:15px 0}.theme-filter.current,.theme-section.current{border-bottom:4px solid #666;color:#222}.theme-top-filters{display:inline-block}.theme-navigation .more-filters{color:#666;cursor:pointer;display:inline-block;margin:0 10px;padding:4px 6px}body.more-filters-opened .more-filters,body.more-filters-opened .more-filters:before{background:#777;-webkit-border-radius:2px;border-radius:2px;border:0;color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover,body.more-filters-opened .more-filters:hover:before{background:#2ea2cc}.theme-install-php .theme-search{position:absolute;right:10px;top:9px;font-size:16px;font-weight:300;line-height:1.5;width:280px}.more-filters:before{color:#777;margin:0 5px 0 0;content:"\f111";display:inline-block;width:16px;height:16px;-webkit-font-smoothing:antialiased;font-size:16px;line-height:1;font-family:dashicons;text-decoration:inherit;font-weight:400;font-style:normal;vertical-align:top;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;text-align:center}.more-filters.current:before{color:#fff}.more-filters-container{display:none;padding:20px;border-top:1px solid #eee;margin:0 -20px;background:#fafafa}body.more-filters-opened .more-filters-container{display:block;overflow:hidden}body.more-filters-opened .theme-section.current{border-bottom:0}body.more-filters-opened .theme-browser,body.more-filters-opened.filters-applied.loading-themes .theme-browser{display:none}body.more-filters-opened.filters-applied .theme-browser{display:block}.more-filters-container .filters-group{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;width:19%;background:#fff;margin:0 1% 0 0;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);padding:10px}.more-filters-container .wide-filters-group{width:38%}.more-filters-container .feature-name{margin:0;position:relative}.more-filters-container ol{list-style-type:none;margin:20px 0 0;font-size:12px}.more-filters-container li{display:inline-block;vertical-align:top;list-style-type:none;margin:5px 0;padding-right:25px;width:160px}.theme-navigation .more-filters-container .apply-filters{margin:0 0 20px}.theme-navigation .more-filters-container .clear-filters{display:none;margin:0 0 20px 10px}.more-filters-container .apply-filters span{display:inline-block;font-size:12px;text-indent:10px;opacity:.8}.more-filters-container .filtering-by{display:none;margin:0}.more-filters-container .filtering-by>span{font-weight:600}.more-filters-container .filtering-by .tags{display:inline}.more-filters-container .filtering-by .tag{background:#fff;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);font-size:11px;margin:0 5px;padding:4px 8px}.more-filters-container .filtering-by a{margin-left:10px}body.filters-applied .more-filters-container .filters-group,body.filters-applied .more-filters-container a.button,body.filters-applied .more-filters-container br{display:none!important}body.filters-applied .more-filters-container .filtering-by{display:block}body.filters-applied .more-filters-container{padding:20px}p.no-themes{color:#999;font-size:18px;font-style:normal;margin:0;padding:0;text-align:center;display:none}body.no-results p.no-themes{display:block}.theme-install-php .add-new-theme,body.show-upload-theme p.no-themes{display:none!important}@media only screen and (max-width:1120px){.theme-install-php .theme-search{margin:20px 0;position:static;width:100%}.more-filters-container{border-bottom:1px solid #eee}.upload-theme .wp-upload-form{margin:20px 0;max-width:100%}.upload-theme .install-help{font-size:15px;padding:20px 0 0;text-align:left}.more-filters-container .filters-group{margin-bottom:0;margin-top:5px;width:100%}.more-filters-container .filters-group li{margin:10px 0}}@media only screen and (max-width:782px){.more-filters-container .filters-group,.more-filters-container .filters-group li{width:100%}}.rating{margin:30px 0}.rating span:before{color:#e6b800;content:"\f154";display:inline-block;-webkit-font-smoothing:antialiased;font:400 20px/1 dashicons;vertical-align:top}.rating-10 span.one:before,.rating-30 span.two:before,.rating-50 span.three:before,.rating-70 span.four:before,.rating-90 span.five:before{content:"\f459"}.rating-100 span.five:before,.rating-100 span.four:before,.rating-100 span.one:before,.rating-100 span.three:before,.rating-100 span.two:before,.rating-20 span.one:before,.rating-30 span.one:before,.rating-40 span.one:before,.rating-40 span.two:before,.rating-50 span.one:before,.rating-50 span.two:before,.rating-60 span.one:before,.rating-60 span.three:before,.rating-60 span.two:before,.rating-70 span.one:before,.rating-70 span.three:before,.rating-70 span.two:before,.rating-80 span.four:before,.rating-80 span.one:before,.rating-80 span.three:before,.rating-80 span.two:before,.rating-90 span.four:before,.rating-90 span.one:before,.rating-90 span.three:before,.rating-90 span.two:before{content:"\f155"}.rating .ratings{display:inline;margin-left:10px;line-height:20px;color:#999}.error .theme-browser,.loading-themes .theme-browser{display:none}.loading-themes .spinner{display:block;margin:40px auto 0;float:none}.appearance_page_custom-header #headimg{border:1px solid #DFDFDF;overflow:hidden;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}body.full-overlay-active{overflow:hidden}.wp-full-overlay{background:0 0;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:#eee;border-right:0}.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;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{position:absolute;left:0;right:0;height:45px;padding:0 15px;line-height:45px;z-index:10;margin:0;border-top:0;-webkit-box-shadow:none;box-shadow:none}.wp-full-overlay-sidebar .wp-full-overlay-header a.back{margin-top:9px}.wp-full-overlay-sidebar .wp-full-overlay-footer{bottom:0;border-bottom:0;border-top:0;-webkit-box-shadow:none;box-shadow:none}.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 a.collapse-sidebar{position:absolute;bottom:12px;left:0;z-index:50;display:block;width:19px;height:19px;margin-left:15px;padding:0;-webkit-border-radius:50%;border-radius:50%;color:#777;text-decoration:none}.wp-full-overlay a.collapse-sidebar:hover{color:#0074a2}.wp-full-overlay.collapsed .collapse-sidebar{position:absolute;left:100%}.wp-full-overlay .collapse-sidebar-arrow{position:static;margin-top:0;margin-left:0;display:block;width:auto;height:auto;background:0 0}.wp-full-overlay .collapse-sidebar-arrow:before{-webkit-border-radius:50%;border-radius:50%;float:left;content:"\f148";background:#eee;font:400 20px/1 dashicons;speak:none;display:block;padding:0;text-indent:0;text-align:center;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.rtl .wp-full-overlay .collapse-sidebar-arrow:before,.wp-full-overlay.collapsed .collapse-sidebar-arrow:before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.rtl .wp-full-overlay.collapsed .collapse-sidebar-arrow:before{-webkit-transform:none;-ms-transform:none;transform:none}.wp-full-overlay.collapsed .collapse-sidebar-arrow{background-position:-1px -109px}.wp-full-overlay .collapse-sidebar-label{position:absolute;left:100%;line-height:20px;margin-left:10px}.wp-full-overlay.collapsed .collapse-sidebar-label{display:none}.wp-full-overlay .theme-navigation{padding:10px 20px;position:absolute;bottom:10px;text-align:left}.wp-full-overlay .theme-navigation .next-theme{float:right}.wp-full-overlay.no-navigation .theme-navigation{display:none}.wp-full-overlay,.wp-full-overlay .collapse-sidebar,.wp-full-overlay-main,.wp-full-overlay-sidebar{-webkit-transition-property:left,right,top,bottom,width,margin;transition-property:left,right,top,bottom,width,margin;-webkit-transition-duration:.2s;transition-duration:.2s}.customize-support .hide-if-customize,.customize-support .wp-core-ui .hide-if-customize,.customize-support.wp-core-ui .hide-if-customize,.no-customize-support .hide-if-no-customize,.no-customize-support .wp-core-ui .hide-if-no-customize,.no-customize-support.wp-core-ui .hide-if-no-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/spinner.gif) no-repeat fixed center center;-webkit-background-size:20px 20px;background-size:20px 20px}#customize-container iframe,.theme-install-overlay iframe{height:100%;width:100%;z-index:20;-webkit-transition:opacity .3s;transition:opacity .3s}#customize-container .collapse-sidebar{bottom:16px}#customize-controls{margin-top:0}.theme-install-overlay{display:none}.theme-install-overlay.single-theme{display:block}.install-theme-info{display:none;padding:10px 20px 60px}.single-theme .install-theme-info{padding-top:15px}.theme-install-overlay .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;margin-top: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-rating{margin:7px 0;float:right}.theme-details .theme-description{float:left;color:#777;line-height:20px;max-width:100%}.theme-install-overlay .wp-full-overlay-header{margin-top:9px}.theme-install-overlay .wp-full-overlay-header .theme-install{float:right;line-height:26px}.theme-install-overlay .wp-full-overlay-sidebar{background:#EEE;border-right:1px solid #DDD}.theme-install-overlay .wp-full-overlay-main{background:#fff url(../images/spinner.gif) no-repeat center center;-webkit-background-size:20px 20px;background-size:20px 20px}@media print,(-o-min-device-pixel-ratio:5/4),(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.wp-full-overlay .collapse-sidebar-arrow{background-image:url(../images/arrows-2x.png);-webkit-background-size:15px 123px;background-size:15px 123px}.customize-loading #customize-container,.theme-install-overlay .wp-full-overlay-main{background-image:url(../images/spinner-2x.gif)}}@media screen and (max-width:782px){.available-theme .action-links .delete-theme{float:none;margin:0;padding:0;clear:both}.available-theme .action-links .delete-theme a{padding:0}}.press-this #message{border-left:4px solid #7ad03a;padding:1px 12px;background-color:#fff;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}.press-this #side-sortables .category-tabs li{display:inline;line-height:1.35em}body.press-this ul.category-tabs li.tabs a{color:#333}.press-this #content-resize-handle{bottom:2px}body.press-this{color:#333;margin:0;padding:0;min-width:708px;min-height:400px}.press-this #titlediv #title{font-size:1.4em}.press-this #site-heading:before{top:3px;position:relative;display:inline-block;font:400 18px/1 dashicons;speak:none;color:#727272;content:'\f120';-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.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;-ms-user-select:none;user-select:none}.press-this #wphead h1{font-weight:400;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 .posting{margin-right:250px}.press-this-sidebar{float:right;width:240px;padding-top:10px}.press-this #title{margin-left:0;margin-right:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.press-this .tagchecklist{margin-top:8px}.press-this #titlediv{margin:0}.press-this #wp-content-wrap #wp-content-editor-tools{padding:0;top:3px;overflow:hidden}.press-this .wp-media-buttons{cursor:default;padding:8px 8px 6px}.press-this #wp-content-wrap #wp-content-media-buttons a{padding:0;line-height:normal;height:auto;font-size:16px}.press-this #wp-content-wrap .mce-toolbar .mce-btn-group .mce-btn{margin:0 1px}.press-this #wp-content-wrap .mce-toolbar .mce-btn button{padding:2px 3px}.press-this #wp-content-wrap .quicktags-toolbar,.press-this #wp-content-wrap div.mce-toolbar-grp{padding-right:3px}.press-this .howto{margin-top:2px;margin-bottom:3px;font-size:12px;font-style:italic;display:block}.press-this #wp-content-editor-container{clear:none}.press-this #poststuff .inside{margin-top:18px}.press-this .category-tabs{margin-bottom:3px}.press-this #poststuff{margin:0 8px;padding:0}.press-this #photo-add-url-div input[type=text]{width:220px}#poststuff #editor-toolbar{height:30px}.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 #categorydiv h3,.press-this #tagsdiv-post_tag h3{cursor:pointer}.press-this #submitdiv h3{cursor:default}h3.tb{font-weight:600;font-size:12px;margin-left:5px}.press-this .postbox,.press-this .stuffbox{margin-bottom:10px;min-width:0}.press-this #submitdiv:hover .handlediv{background:0 0}.tbtitle{font-size:1.7em;outline:0;padding:3px 4px;border:1px solid #dfdfdf}.press-this .actions{float:right;margin:-19px 0 0}.press-this #extra-fields .actions{margin:-32px -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;overflow:hidden}#waiting span{float:right;margin:0 0 0 5px}#waiting .spinner{display:block}#extra-fields .postbox{margin-bottom:5px}#extra-fields .titlewrap{padding:0;overflow:auto;height:120px}#img_container a{float:left;overflow:hidden}#img_container a,#img_container img{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:active,#img_container a:hover{border-color:#000;z-index:1000;border-width:1px}#embed-code{width:100%;height:98px}.press-this .categorydiv div.tabs-panel{height:100px}.press-this .tagsdiv .newtag{width:120px}.press-this #content{margin:5px 0;padding:0 5px;border:0 none;height:340px;font-family:Consolas,Monaco,monospace;font-size:13px;line-height:19px;background:0 0}.press-this #publishing-actions .spinner{display:inline;vertical-align:middle}@media screen and (max-width:782px){.press-this ul.category-tabs li.tabs{padding:3px 5px 5px}.press-this a.wp-switch-editor{font:13px/19px "Open Sans",sans-serif;margin:5px 0 0 5px;padding:3px 8px 4px}.press-this #wp-content-media-buttons a{padding:0;line-height:normal;height:auto}.press-this #wp-content-editor-tools{padding:0;top:3px}.press-this .category-tabs{margin-top:0}.press-this .tagsdiv .newtag{width:120px;padding:3px 5px;margin-bottom:0}.press-this .tagchecklist{padding:0;margin-bottom:0}.press-this .wp_themeSkin a.mceButton{width:20px;height:20px}.press-this .wp_themeSkin .mceButton .mceIcon{margin:0}.press-this #poststuff h3,.press-this .metabox-holder h3{padding:7px 12px}.press-this input[type=checkbox],.press-this input[type=radio]{height:16px;width:16px}.press-this input[type=checkbox]:checked:before{width:16px;font:400 21px/1 dashicons;margin:-3px 0 0 -4px}.press-this input[type=radio]:checked:before{font:400 21px/1 dashicons;width:6px;height:6px;margin:4px}.press-this ul.categorychecklist li,.press-this ul.categorychecklist ul{margin-top:0;margin-bottom:0}.press-this div.quicktags-toolbar input{padding:2px 4px}.press-this input,.press-this textarea{font-size:14px}.press-this .tagchecklist span{font-size:13px;line-height:1.8em}}.about-wrap{position:relative;margin:25px 40px 0 20px;max-width:1050px;font-size:15px}.about-wrap div.error,.about-wrap div.updated{display:none!important}.about-wrap hr{border:0;height:0;margin:0;border-top:1px solid rgba(0,0,0,.1)}.about-wrap img{margin:0;max-width:100%;vertical-align:middle}.about-wrap p{line-height:1.6em;font-size:14px}.about-wrap h1{margin:.2em 200px 0 0;color:#333;line-height:1.2em;font-size:2.8em;font-weight:400}.about-wrap h4{color:#222}.about-wrap .about-text,.about-wrap li.wp-person a.web,.about-wrap p.about-description{font-weight:400;line-height:1.6em;font-size:19px}.about-description{margin-top:1.4em}.about-text{margin:1em 200px 1em 0;min-height:60px;color:#777;font-size:24px}.about-wrap .changelog h2.about-headline-callout{margin:1.1em 0 .2em;font-size:2.4em;font-weight:300;line-height:1.3;text-align:center}.about-wrap h3{margin:1em 0 .6em;font-size:1.5em;line-height:1.5em}.customize h3{margin-top:1.75em;text-align:center}.about-wrap .feature-section h4{margin:1.4em 0 .6em;font-size:1.2em}.about-wrap .feature-section p{margin-top:.6em}.about-wrap code,.about-wrap ol li p{font-size:14px}.about-wrap .button.button-large{padding:8px 20px 10px!important;height:46px!important;font-size:14px;line-height:28px!important}.about-wrap .about-overview-img{margin:0}.about-wrap .point-releases{margin-top:5px;border-bottom:1px solid #dfdfdf}.about-wrap .changelog.point-releases h3{padding-top:35px}.about-wrap .changelog.point-releases h3:first-child{padding-top:7px}.wp-badge{background:#0074a2 url(../images/w-logo-white.png?ver=20131202) no-repeat;background:#0074a2,url(../images/wordpress-logo-white.svg?ver=20131110) no-repeat;background-position:center 24px;-webkit-background-size:85px 85px;background-size:85px 85px;color:#78c8e6;font-size:14px;text-align:center;font-weight:600;margin:5px 0 0;padding-top:120px;height:40px;display:inline-block;width:150px;text-rendering:optimizeLegibility;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.2);box-shadow:0 1px 3px rgba(0,0,0,.2)}.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 15px 6px;margin:0 3px -1px 0;font-size:18px;vertical-align:top;border-width:1px}.about-overview{margin-top:40px;text-align:center}.about-overview .wp-video{margin:0 auto}.changelog .wp-playlist .wp-playlist-current-item img{height:64px;width:auto;max-width:100%}.about-wrap .feature-section{margin-top:40px;padding-bottom:20px}.about-wrap .feature-section.two-col>div{position:relative;width:47.5%;margin-right:4.999999999%;float:left}.about-wrap .feature-section.three-col>div{position:relative;width:29.95%;margin-right:4.999999999%;float:left}.about-wrap .feature-section.col .last-feature{margin-right:0}.about-wrap .under-the-hood .feature-section{margin-top:0}.about-wrap .changelog .feature-section{overflow:hidden}.about-wrap .feature-section.two-col div p{margin-right:3%}.about-wrap .feature-section div p img{float:right;margin-left:10px;max-width:20%}.about-wrap .changelog li{list-style-type:disc;margin-left:3em}.about-wrap .return-to-dashboard{margin:30px 0 0 -5px;font-size:14px;font-weight:700}.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:0 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:700}.freedoms-php .about-wrap ol p{font-weight:400;margin:.6em 0}@media screen and (max-width:782px){.about-wrap .feature-section.one-col>div,.about-wrap .feature-section.three-col>div,.about-wrap .feature-section.two-col>div{width:100%;margin:0 0 40px;padding:0 0 40px;float:none;border-bottom:1px solid rgba(0,0,0,.1)}.about-wrap .feature-section.col>div.last-feature,.about-wrap .under-the-hood .feature-section>div{margin:0;padding:0;border-bottom:0}}@media only screen and (max-width:500px){.about-wrap{margin-right:20px;margin-left:10px}.about-text,.about-wrap h1{margin-right:0}.about-text{margin-bottom:.25em}.about-wrap .wp-badge{position:relative;margin-bottom:1.5em;width:100%}.about-wrap .feature-section.three-col div{width:100%;float:none}.about-wrap .three-col.about-updates .col-1{padding:0;float:none}.about-wrap .three-col.about-updates .col-2{margin:0 0 20px;width:100%;float:none}}.no-js #message{display:block}ul.add-menu-item-tabs li{padding:3px 5px 3px 8px}.accordion-section ul.add-menu-item-tabs,.accordion-section ul.category-tabs,.accordion-section ul.wp-tab-bar{margin:0}.accordion-section .categorychecklist{margin:13px 0}#nav-menu-meta .accordion-section-content{padding:18px 13px}#nav-menu-meta .button-controls{margin-bottom:0}#nav-menus-frame{margin-left:300px;margin-top:23px}#wpbody-content #menu-settings-column{display:inline;width:281px;margin-left:-300px;clear:both;float:left;padding-top:0}#menu-settings-column .inside{clear:both;margin:10px 0 0}.metabox-holder-disabled .accordion-section-content,.metabox-holder-disabled .accordion-section-title,.metabox-holder-disabled .postbox{opacity:.5;filter:alpha(opacity=50)}.metabox-holder-disabled .button-controls .select-all{display:none}#wpbody{position:relative}.blank-slate .menu-name{height:2em}.blank-slate .menu-settings{border:0;margin-top:0;padding-top:0;overflow:hidden}.is-submenu{color:#999;font-style:italic;font-weight:400;margin-left:4px}.manage-menus{margin-top:23px;padding:10px;overflow:hidden;background:#fbfbfb}.manage-menus select{float:left;margin-right:6px}.manage-menus .selected-menu{float:left;margin:5px 6px 0 0}.manage-menus .submit-btn{float:left;margin-top:1px}.menu-edit p{margin:.3em 0 .6em}.menu-edit #post-body-content h3{margin:1em 0 10px}.menu-settings{border-top:1px solid #eee;margin-top:2em}.menu-settings dl{margin:0 0 10px;overflow:hidden;padding-left:18%}.menu-settings dd{float:left;margin:0;width:100%}.menu-settings dt{float:left;clear:both;width:21.951%;padding:3px 0 0;margin-left:-21.951%}.menu-settings label{vertical-align:baseline}.menu-edit .checkbox-input{margin-top:4px}.theme-location-set{color:#999;font-size:11px}#menu-management-liquid{float:left;min-width:100%;margin-top:3px}#menu-management{position:relative;margin-right:20px;margin-top:-3px;width:100%;background:#f5f5f5}#menu-management .menu-edit{margin-bottom:20px}.nav-menus-php #post-body{padding:0 10px 10px;border-top:1px solid #fff;border-bottom:1px solid #dfdfdf;background:#fff}#nav-menu-footer,#nav-menu-header{padding:0 10px}#nav-menu-header{border-bottom:1px solid #dfdfdf;margin-bottom:0}#nav-menu-header .menu-name-label{margin-top:4px}.nav-menus-php #post-body div.error,.nav-menus-php #post-body div.updated{margin:0}.nav-menus-php #post-body-content{position:relative;float:none}#menu-management .menu-add-new abbr{font-weight:600}#select-nav-menu-container{text-align:right;padding:0 10px 3px;margin-bottom:5px}#select-nav-menu{width:100px;display:inline}#menu-name-label{margin-top:-2px}.widefat td.menu-location-menus{padding-bottom:5px}.menu-location-menus select{float:left}#locations-nav-menu-wrapper{padding:5px 0}.locations-nav-menu-select select{float:left;width:160px;margin-right:5px}.locations-row-links{float:left;margin:6px 0 0 6px}.locations-add-menu-link,.locations-edit-menu-link{margin:0 3px}.locations-edit-menu-link{padding-right:3px;border-right:1px solid #ccc}#wpbody .open-label{display:block;float:left}#wpbody .open-label span{padding-right:10px}.js .input-with-default-title{color:#aaa;font-style:italic}#menu-management .inside{padding:0 10px}.accordion-container .howto input,.postbox .howto input{width:180px;float:right}.accordion-container .outer-border{margin:0}.customlinkdiv .howto input{width:180px}.customlinkdiv p{margin-top:0}#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 .add-new-menu-action{float:left;margin:6px 0 0 6px;line-height:15px}.nav-menus-php .meta-sep,.nav-menus-php .submitcancel,.nav-menus-php .submitdelete{display:block;float:left;margin:6px 0;line-height:15px}.meta-sep{padding:0 2px}#cancel-save{text-decoration:underline;font-size:12px;margin-left:20px;margin-top:5px}.button-primary.right,.button-secondary.right,.button.right{float:right}.list-controls{float:left;margin-top:5px}.add-to-menu{float:right}.postbox .spinner{display:none;vertical-align:middle}.button-controls{clear:both;margin:10px 0}.hide-all,.show-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:6px;display:block;float:left}.quick-search{width:190px}.nav-menus-php .list-wrap{display:none;clear:both;margin-bottom:10px}.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-item-title input[type=checkbox]{display:inline-block;margin-top:-4px}#menu-container .inside{padding-bottom:10px}.menu{padding-top:1em}#menu-to-edit{margin:0;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:9px 0 0}.menu-item-bar .menu-item-handle{border:1px solid #dfdfdf;position:relative;padding:10px 15px;height:auto;width:382px;line-height:30px;overflow:hidden;word-wrap:break-word}.menu-item-bar .menu-item-handle:hover{border-color:#999}#menu-to-edit .menu-item-invalid .menu-item-handle{background:#f6c9cc;border-color:#f1acb1}.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;background-color:#f66}.menu-item-handle .item-title{font-size:13px;font-weight:600;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{color:#777;font-size:12px;padding:12px 10px;line-height:18px;display:block}.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:40px;margin-right:0!important;text-indent:100%;outline:0;overflow:hidden;white-space:nowrap}.menu-instructions-inactive{display:none}.menu-item-settings{display:block;width:402px;padding:10px 0 10px 10px;position:relative;z-index:10;border:1px solid #e5e5e5;border-top:0;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04)}.menu-item-settings .field-move a{display:none;margin:0 2px}.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;border:1px solid #dfdfdf;color:#777;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 6px}.nav-menus-php .major-publishing-actions .publishing-action{text-align:right;float:right;line-height:23px;margin:4px 0 1px}.nav-menus-php .blank-slate .menu-settings{display:none}.nav-menus-php .delete-action{float:left;margin-top:2px}.nav-menus-php .submitbox .submitcancel{border-bottom:1px solid #0074a2;padding:1px 2px;color:#0074a2;text-decoration:none}.nav-menus-php .submitbox .submitcancel:hover{background:#0074a2;color:#fff}.nav-menus-php .major-publishing-actions .form-invalid{padding-left:4px;margin-left:-4px}#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}#menu-item-name-wrap,#menu-item-url-wrap,#nav-menus-frame,.button-controls{display:block}@media screen and (max-width:782px){body.nav-menus-php{min-width:0!important}#nav-menus-frame{margin-left:0;float:none;width:100%}#wpbody-content #menu-settings-column{display:block;width:100%;float:none;margin-left:0}#side-sortables .add-menu-item-tabs{margin:15px 0 14px}ul.add-menu-item-tabs li.tabs{padding:13px 15px 14px}.nav-menus-php .item-controls .item-type{margin-top:2px}.nav-menus-php .customlinkdiv .howto input{width:65%}.nav-menus-php .quick-search{width:85%}#menu-management-liquid{margin-top:25px}.nav-menus-php .menu-name-label.howto span{margin-top:13px}.menu-name-label #menu-name{margin-top:4px}.nav-menus-php .major-publishing-actions .publishing-action{margin-top:6px}.nav-menus-php .delete-action{font-size:14px;line-height:50px;margin-top:12px}.description-wide,.menu-item-bar .menu-item-handle,.menu-item-settings{width:auto}.menu-item-settings{padding:10px}.menu-item-settings .description-thin,.menu-item-settings .description-wide{width:100%;height:auto}.menu-item-settings input{width:100%}.menu-settings dl{padding-left:0}.menu-settings dd{float:none;width:100%;margin-bottom:15px}.menu-settings dt{float:none;width:auto;margin-left:0;margin-bottom:15px}}@media only screen and (max-width:768px){#menu-locations-wrap .widefat{width:100%}}.widget{margin:0 auto 10px;position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.widget-top{font-size:13px;font-weight:600;background:#f7f7f7}.widget-top a.widget-action,.widget-top a.widget-action:hover{text-decoration:none}.widget-title h4{margin:0;padding:15px;line-height:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.widgets-holder-wrap .widget-inside{border-top:0;padding:1px 15px 15px;line-height:16px}#available-widgets .widget-description,#widgets-right a.widget-control-edit,.in-widget-title{color:#666}.deleting .widget-title,.deleting .widget-top a.widget-action:after{color:#aaa}.widget.ui-draggable-dragging{min-width:100%}.widget.ui-sortable-helper{opacity:.8}.widget-placeholder{border:1px dashed #bbb;margin:0 auto 10px;height:45px;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#widgets-right .widget-placeholder{margin-top:0}#widgets-right .closed .widget-placeholder{height:0;border:0;margin-top:-10px}.sidebar-name{position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.sidebar-name-arrow{position:absolute;top:0;right:0;bottom:0}.js .sidebar-name{cursor:pointer}.sidebar-name h3{margin:0;padding:8px 10px;overflow:hidden;white-space:nowrap}.widgets-holder-wrap .description{padding:0 0 15px;margin:0;font-style:normal;color:#777}#widgets-right .widgets-holder-wrap .description{padding-left:7px;padding-right:7px}div.widget-liquid-left{margin:0;width:38%;float:left}div.widget-liquid-right{float:right;width:58%}div#widgets-left{padding-top:12px}div#widgets-left .closed .sidebar-name,div#widgets-left .inactive-sidebar.closed .sidebar-name{margin-bottom:10px}div#widgets-left .sidebar-name h3{padding:10px 0;margin:0 10px 0 0}div#widgets-left .sidebar-name .sidebar-name-arrow:before{right:0;top:4px;padding:4px 6px 4px 4px}#widgets-left #available-widgets,div#widgets-left .widget-holder{background:0 0;border:0}#widgets-left .widgets-holder-wrap{border:0;-webkit-box-shadow:none;box-shadow:none}#available-widgets .widget-action{display:none}#available-widgets .widget{margin:0}#available-widgets .widget:nth-child(odd){clear:both}#available-widgets .widget .widget-description{display:block;padding:10px 15px;font-size:12px}#available-widgets #widget-list{position:relative}#widgets-left .inactive-sidebar{clear:both;width:100%;background:0 0;padding:0;margin:0 0 20px;border:0;-webkit-box-shadow:none;box-shadow:none}#widgets-left .inactive-sidebar.first{margin-top:40px}div#widgets-left .inactive-sidebar .widget.expanded{left:auto}.widget-title-action{float:right;position:relative}div#widgets-left .inactive-sidebar .widgets-sortables{min-height:42px;padding:0;background:0 0;margin:0;position:relative}div#widgets-right:after{content:".";display:block;height:0;clear:both;visibility:hidden}div#widgets-right .sidebars-column-1,div#widgets-right .sidebars-column-2{max-width:450px}div#widgets-right .widgets-holder-wrap{margin:10px 0 0}div#widgets-right .sidebar-description{min-height:20px;margin-top:-5px}div#widgets-right .sidebar-name h3{padding:15px 7px}div#widgets-right .sidebar-name .sidebar-name-arrow:before{right:0;top:4px}div#widgets-right .widget-top{padding:0}div#widgets-right .widgets-sortables{padding:0 8px;margin-bottom:9px;position:relative;min-height:123px}div#widgets-right .closed .widgets-sortables{min-height:0;margin-bottom:0}.sidebar-name .spinner{margin:-5px 5px;float:none}#widgets-right .widgets-holder-wrap.widget-hover{border-color:#777;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.3);box-shadow:0 1px 2px rgba(0,0,0,.3)}.widgets_access #widgets-left .widget .widget-top{cursor:auto}.widgets_access #wpwrap .widget-control-edit,.widgets_access #wpwrap .widgets-holder-wrap.closed .sidebar-description,.widgets_access #wpwrap .widgets-holder-wrap.closed .widget{display:block}.widgets_access #widgets-left .widget .widget-top:hover,.widgets_access #widgets-right .widget .widget-top:hover{border-color:#ddd}#available-widgets .widget-control-edit .edit,#widgets-left .inactive-sidebar .widget-control-edit .add,#widgets-right .widget-control-edit .add{display:none}.widget-control-edit{display:block;color:#666;background:#EEE;padding:0 15px;line-height:43px;border-left:1px solid #DDD}#widgets-left .widget-control-edit:hover,#widgets-right .widget-control-edit:hover{color:#fff;background:#444;border-left:0;outline:1px solid #444}.widgets-holder-wrap .sidebar-description,.widgets-holder-wrap .sidebar-name{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.editwidget{margin:0 auto}.editwidget .widget-inside{display:block;padding:0 15px}.editwidget .widget-control-actions{margin-top:20px}.js .closed br.clear,.js .widgets-holder-wrap.closed .sidebar-description,.js .widgets-holder-wrap.closed .widget,.widget-description,.widget-inside{display:none}.widget-inside{background:#fff}#removing-widget{display:none;font-weight:400;padding-left:15px;font-size:12px;line-height:1;color:#000}.js #removing-widget{color:#2ea2cc}#access-off,.no-js .widget-holder .description,.widget-control-noform,.widgets_access #access-on,.widgets_access .sidebar-name-arrow,.widgets_access .widget-action,.widgets_access .widget-holder .description{display:none}.widgets_access #widget-list,.widgets_access .widget-holder{padding-top:10px}.widgets_access #access-off{display:inline}.widgets_access .sidebar-name,.widgets_access .widget .widget-top{cursor:default}.widget-liquid-left #widgets-left.chooser #available-widgets .widget,.widget-liquid-left #widgets-left.chooser .inactive-sidebar{-webkit-transition:opacity .1s linear;transition:opacity .1s linear;opacity:.2;pointer-events:none}.widget-liquid-left #widgets-left.chooser #available-widgets .widget-in-question{opacity:1;pointer-events:auto}#available-widgets .widget-top:hover,#widgets-left .widget-in-question .widget-top,#widgets-left .widget-top:hover,.widgets-chooser ul,div#widgets-right .widget-top:hover{border-color:#999;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.1);box-shadow:0 1px 2px rgba(0,0,0,.1)}.widgets-chooser ul.widgets-chooser-sidebars{margin:0;list-style-type:none;max-height:300px;overflow:auto}.widgets-chooser{display:none}.widgets-chooser ul{border:1px solid #ccc}.widgets-chooser li{padding:10px 15px 10px 35px;border-bottom:1px solid #ccc;background:#fff;margin:0;cursor:pointer;outline:0;position:relative;-webkit-transition:background .2s ease-in-out;transition:background .2s ease-in-out}.widgets-chooser li:focus,.widgets-chooser li:hover{background:rgba(255,255,255,.7)}.widgets-chooser li:focus:before{content:'\f147';display:block;-webkit-font-smoothing:antialiased;font:400 26px/1 dashicons;color:#999;position:absolute;top:7px;left:5px}.widgets-chooser li:last-child{border:0}.widgets-chooser li.widgets-chooser-selected{background:#2ea2cc;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{content:'\f147';display:block;-webkit-font-smoothing:antialiased;font:400 26px/1 dashicons;color:#fff;position:absolute;top:7px;left:5px}.widgets-chooser .widgets-chooser-actions{padding:10px 0 12px;text-align:center}.widgets-chooser button{margin-right:5px}#available-widgets .widget .widget-top{cursor:pointer}@media screen and (max-width:480px){div.widget-liquid-left{width:100%;float:none;border-right:0;padding-right:0}#widgets-left #available-widgets .widget-top,#widgets-left .inactive-sidebar .widgets-sortables,#widgets-left .sidebar-name{margin-right:0}div.widget-liquid-right{width:100%;float:none}div.widget{margin:0 auto 10px!important;max-width:480px}}@media screen and (max-width:320px){div.widget{max-width:320px}}@media only screen and (min-width:1250px){#widgets-left #available-widgets .widget{width:49%;float:left}.widget.ui-draggable-dragging{min-width:49%}#widgets-left #available-widgets .widget:nth-child(even){float:right}#widgets-right .sidebars-column-1,#widgets-right .sidebars-column-2{float:left;width:49%}#widgets-right .sidebars-column-1{margin-right:2%}#widgets-right.single-sidebar .sidebars-column-1,#widgets-right.single-sidebar .sidebars-column-2{float:none;width:100%;margin:0}}body.rtl,body.rtl .press-this a.wp-switch-editor{font-family:Tahoma,Arial,sans-serif}body.locale-he-il,body.locale-he-il .press-this a.wp-switch-editor{font-family:Arial,sans-serif}.locale-he-il em{font-style:normal;font-weight:700}.locale-zh-cn #local-time,.locale-zh-cn #utc-time,.locale-zh-cn .form-wrap p,.locale-zh-cn .howto,.locale-zh-cn .inline-edit-row fieldset span.checkbox-title,.locale-zh-cn .inline-edit-row fieldset span.title,.locale-zh-cn .js .input-with-default-title,.locale-zh-cn .link-to-original,.locale-zh-cn .tablenav .displaying-num,.locale-zh-cn p.description,.locale-zh-cn p.help,.locale-zh-cn p.install-help,.locale-zh-cn span.description{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-de-de .inline-edit-row fieldset label span.title{width:7em}.locale-de-de .inline-edit-row fieldset label span.input-text-wrap{margin-left:7em}.locale-de-de #customize-header-actions .button{padding:0 5px 1px}.locale-de-de #customize-header-actions .spinner{margin:16px 3px 0}.locale-ru-ru .inline-edit-row fieldset label span.title{width:8em}.locale-ru-ru .inline-edit-row fieldset label span.input-text-wrap{margin-left:8em}.locale-ru-ru.post-php .tagsdiv .newtag{width:165px}.locale-ru-ru.press-this .posting{margin-right:277px}.locale-ru-ru .press-this-sidebar{width:265px}.locale-ru-ru #customize-header-actions .button{padding:0 5px 1px}.locale-ru-ru #customize-header-actions .spinner{margin:16px 3px 0}.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/custom-background.php b/wp-admin/custom-background.php new file mode 100644 index 0000000..e53cd7d --- /dev/null +++ b/wp-admin/custom-background.php @@ -0,0 +1,429 @@ +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' ) ); + } + + /** + * Set up the hooks for the Custom Background admin page. + * + * @since 3.0.0 + */ + function init() { + if ( ! current_user_can('edit_theme_options') ) + return; + + $this->page = $page = add_theme_page(__('Background'), __('Background'), 'edit_theme_options', 'custom-background', array($this, 'admin_page')); + + add_action("load-$page", array($this, 'admin_load')); + add_action("load-$page", array($this, 'take_action'), 49); + add_action("load-$page", array($this, 'handle_upload'), 49); + + if ( $this->admin_header_callback ) + add_action("admin_head-$page", $this->admin_header_callback, 51); + } + + /** + * Set up the enqueue for the CSS & JavaScript files. + * + * @since 3.0.0 + */ + function admin_load() { + get_current_screen()->add_help_tab( array( + 'id' => 'overview', + 'title' => __('Overview'), + 'content' => + '

' . __( 'You can customize the look of your site without touching any of your theme’s code by using a custom background. Your background can be an image or a color.' ) . '

' . + '

' . __( 'To use a background image, simply upload it or choose an image that has already been uploaded to your Media Library by clicking the “Choose Image” button. You can display a single instance of your image, or tile it to fill the screen. You can have your background fixed in place, so your site content moves on top of it, or you can have it scroll with your site.' ) . '

' . + '

' . __( 'You can also choose a background color by clicking the Select Color button and either typing in a legitimate HTML hex value, e.g. “#ff0000” for red, or by choosing a color using the color picker.' ) . '

' . + '

' . __( 'Don’t forget to click on the Save Changes button when you are finished.' ) . '

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

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

' . + '

' . __( 'Documentation on Custom Background' ) . '

' . + '

' . __( 'Support Forums' ) . '

' + ); + + wp_enqueue_media(); + wp_enqueue_script('custom-background'); + wp_enqueue_style('wp-color-picker'); + } + + /** + * Execute custom background modification. + * + * @since 3.0.0 + */ + function take_action() { + + if ( empty($_POST) ) + return; + + if ( isset($_POST['reset-background']) ) { + check_admin_referer('custom-background-reset', '_wpnonce-custom-background-reset'); + remove_theme_mod('background_image'); + remove_theme_mod('background_image_thumb'); + $this->updated = true; + return; + } + + if ( isset($_POST['remove-background']) ) { + // @TODO: Uploaded files are not removed here. + check_admin_referer('custom-background-remove', '_wpnonce-custom-background-remove'); + set_theme_mod('background_image', ''); + set_theme_mod('background_image_thumb', ''); + $this->updated = true; + wp_safe_redirect( $_POST['_wp_http_referer'] ); + return; + } + + if ( isset($_POST['background-repeat']) ) { + check_admin_referer('custom-background'); + if ( in_array($_POST['background-repeat'], array('repeat', 'no-repeat', 'repeat-x', 'repeat-y')) ) + $repeat = $_POST['background-repeat']; + else + $repeat = 'repeat'; + set_theme_mod('background_repeat', $repeat); + } + + if ( isset($_POST['background-position-x']) ) { + check_admin_referer('custom-background'); + if ( in_array($_POST['background-position-x'], array('center', 'right', 'left')) ) + $position = $_POST['background-position-x']; + else + $position = 'left'; + set_theme_mod('background_position_x', $position); + } + + if ( isset($_POST['background-attachment']) ) { + check_admin_referer('custom-background'); + if ( in_array($_POST['background-attachment'], array('fixed', 'scroll')) ) + $attachment = $_POST['background-attachment']; + else + $attachment = 'fixed'; + set_theme_mod('background_attachment', $attachment); + } + + if ( isset($_POST['background-color']) ) { + check_admin_referer('custom-background'); + $color = preg_replace('/[^0-9a-fA-F]/', '', $_POST['background-color']); + if ( strlen($color) == 6 || strlen($color) == 3 ) + set_theme_mod('background_color', $color); + else + set_theme_mod('background_color', ''); + } + + $this->updated = true; + } + + /** + * Display the custom background page. + * + * @since 3.0.0 + */ + function admin_page() { +?> +
+

+ +updated ) ) { ?> +
+

Visit your site to see how it looks.' ), home_url( '/' ) ); ?>

+
+ + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ admin_image_div_callback ) { + call_user_func( $this->admin_image_div_callback ); + } else { + $background_styles = ''; + if ( $bgcolor = get_background_color() ) + $background_styles .= 'background-color: #' . $bgcolor . ';'; + + if ( get_background_image() ) { + $background_image_thumb = esc_url( set_url_scheme( get_theme_mod( 'background_image_thumb', str_replace( '%', '%%', get_background_image() ) ) ) ); + // background-image URL must be single quote, see below + $background_styles .= ' background-image: url(\'' . $background_image_thumb . '\');' + . ' background-repeat: ' . get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) ) . ';' + . ' background-position: top ' . get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) ); + } + ?> +
+ +
+ + +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+

+
+ + + + +

+

+
+ +

+
+
+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + /> +
+ + + +
+ +
+ false); + + $uploaded_file = $_FILES['import']; + $wp_filetype = wp_check_filetype_and_ext( $uploaded_file['tmp_name'], $uploaded_file['name'], false ); + if ( ! wp_match_mime_types( 'image', $wp_filetype['type'] ) ) + wp_die( __( 'The uploaded file is not a valid image. Please try again.' ) ); + + $file = wp_handle_upload($uploaded_file, $overrides); + + if ( isset($file['error']) ) + wp_die( $file['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-background' + ); + + // Save the data + $id = wp_insert_attachment($object, $file); + + // Add the meta-data + 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_raw($url)); + + $thumbnail = wp_get_attachment_image_src( $id, 'thumbnail' ); + set_theme_mod('background_image_thumb', esc_url_raw( $thumbnail[0] ) ); + + /** This action is documented in wp-admin/custom-header.php */ + do_action( 'wp_create_file_in_uploads', $file, $id ); // For replication + $this->updated = true; + } + + /** + * Unused since 3.5.0. + * + * @since 3.4.0 + */ + function attachment_fields_to_edit( $form_fields ) { + return $form_fields; + } + + /** + * Unused since 3.5.0. + * + * @since 3.4.0 + */ + function filter_upload_tabs( $tabs ) { + return $tabs; + } + + public function wp_set_background_image() { + if ( ! current_user_can('edit_theme_options') || ! isset( $_POST['attachment_id'] ) ) exit; + $attachment_id = absint($_POST['attachment_id']); + /** This filter is documented in wp-admin/includes/media.php */ + $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 new file mode 100644 index 0000000..1c9971f --- /dev/null +++ b/wp-admin/custom-header.php @@ -0,0 +1,1285 @@ +admin_header_callback = $admin_header_callback; + $this->admin_image_div_callback = $admin_image_div_callback; + + add_action( 'admin_menu', array( $this, 'init' ) ); + + add_action( 'customize_save_after', array( $this, 'customize_set_last_used' ) ); + add_action( 'wp_ajax_custom-header-crop', array( $this, 'ajax_header_crop' ) ); + add_action( 'wp_ajax_custom-header-add', array( $this, 'ajax_header_add' ) ); + add_action( 'wp_ajax_custom-header-remove', array( $this, 'ajax_header_remove' ) ); + } + + /** + * Set up the hooks for the Custom Header admin page. + * + * @since 2.1.0 + */ + function init() { + if ( ! current_user_can('edit_theme_options') ) + return; + + $this->page = $page = add_theme_page(__('Header'), __('Header'), 'edit_theme_options', 'custom-header', array($this, 'admin_page')); + + add_action("admin_print_scripts-$page", array($this, 'js_includes')); + add_action("admin_print_styles-$page", array($this, 'css_includes')); + 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); + if ( $this->admin_header_callback ) + add_action("admin_head-$page", $this->admin_header_callback, 51); + + } + + /** + * Adds contextual help. + * + * @since 3.0.0 + */ + function help() { + get_current_screen()->add_help_tab( array( + 'id' => 'overview', + 'title' => __('Overview'), + 'content' => + '

' . __( '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 clicking the Select Color button and either typing in a legitimate HTML hex value, e.g. “#ff0000” for red, or by choosing a color using the color picker.' ) . '

' . + '

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

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

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

' . + '

' . __( 'Documentation on Custom Header' ) . '

' . + '

' . __( 'Support Forums' ) . '

' + ); + } + + /** + * Get the current step. + * + * @since 2.6.0 + * + * @return int Current step + */ + function step() { + if ( ! isset( $_GET['step'] ) ) + return 1; + + $step = (int) $_GET['step']; + 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; + } + + /** + * Set up the enqueue for the JavaScript files. + * + * @since 2.1.0 + */ + function js_includes() { + $step = $this->step(); + + if ( ( 1 == $step || 3 == $step ) ) { + wp_enqueue_media(); + wp_enqueue_script( 'custom-header' ); + if ( current_theme_supports( 'custom-header', 'header-text' ) ) + wp_enqueue_script( 'wp-color-picker' ); + } elseif ( 2 == $step ) { + wp_enqueue_script('imgareaselect'); + } + } + + /** + * Set up the enqueue for the CSS files + * + * @since 2.7.0 + */ + function css_includes() { + $step = $this->step(); + + if ( ( 1 == $step || 3 == $step ) && current_theme_supports( 'custom-header', 'header-text' ) ) + wp_enqueue_style( 'wp-color-picker' ); + elseif ( 2 == $step ) + wp_enqueue_style('imgareaselect'); + } + + /** + * Execute custom header modification. + * + * @since 2.6.0 + */ + function take_action() { + if ( ! current_user_can('edit_theme_options') ) + return; + + if ( empty( $_POST ) ) + return; + + $this->updated = true; + + if ( isset( $_POST['resetheader'] ) ) { + check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' ); + $this->reset_header_image(); + return; + } + + if ( isset( $_POST['removeheader'] ) ) { + check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' ); + $this->remove_header_image(); + return; + } + + 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'] ); + $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' ); + } + + if ( isset( $_POST['default-header'] ) ) { + check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' ); + $this->set_header_image( $_POST['default-header'] ); + return; + } + } + + /** + * Process the default headers + * + * @since 3.0.0 + */ + function process_default_headers() { + global $_wp_default_headers; + + if ( !empty($this->headers) ) + return; + + if ( !isset($_wp_default_headers) ) + return; + + if ( ! empty( $this->default_headers ) ) { + return; + } + + $this->default_headers = $_wp_default_headers; + $template_directory_uri = get_template_directory_uri(); + $stylesheet_directory_uri = get_stylesheet_directory_uri(); + foreach ( array_keys($this->default_headers) as $header ) { + $this->default_headers[$header]['url'] = sprintf( $this->default_headers[$header]['url'], $template_directory_uri, $stylesheet_directory_uri ); + $this->default_headers[$header]['thumbnail_url'] = sprintf( $this->default_headers[$header]['thumbnail_url'], $template_directory_uri, $stylesheet_directory_uri ); + } + } + + /** + * Display UI for selecting one of several default headers. + * + * Show the random image option if this theme has multiple header images. + * Random image option is on by default if no header has been set. + * + * @since 3.0.0 + */ + function show_header_selector( $type = 'default' ) { + if ( 'default' == $type ) { + $headers = $this->default_headers; + } else { + $headers = get_uploaded_header_images(); + $type = 'uploaded'; + } + + if ( 1 < count( $headers ) ) { + echo '
'; + echo ''; + echo '
'; + } + + echo '
'; + foreach ( $headers as $header_key => $header ) { + $header_thumbnail = $header['thumbnail_url']; + $header_url = $header['url']; + $header_desc = empty( $header['description'] ) ? '' : $header['description']; + echo '
'; + echo ''; + echo '
'; + } + echo '
'; + } + + /** + * Execute Javascript depending on step. + * + * @since 2.1.0 + */ + function js() { + $step = $this->step(); + if ( ( 1 == $step || 3 == $step ) && current_theme_supports( 'custom-header', 'header-text' ) ) + $this->js_1(); + elseif ( 2 == $step ) + $this->js_2(); + } + + /** + * Display Javascript based on Step 1 and 3. + * + * @since 2.6.0 + */ + function js_1() { ?> + + + +process_default_headers(); +?> + +
+

+ +updated ) ) { ?> +
+

Visit your site to see how it looks.' ), home_url( '/' ) ); ?>

+
+ + +

+ + + + + + + + + + + + + + + + + + +
+ admin_image_div_callback ) { + call_user_func( $this->admin_image_div_callback ); + } else { + $custom_header = get_custom_header(); + $header_image_style = 'background-image:url(' . esc_url( get_header_image() ) . ');'; + if ( $custom_header->width ) + $header_image_style .= 'max-width:' . $custom_header->width . 'px;'; + if ( $custom_header->height ) + $header_image_style .= 'height:' . $custom_header->height . 'px;'; + ?> + + +
+


+ %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', + 'step' => 2, + '_wpnonce-custom-header-upload' => wp_create_nonce('custom-header-upload'), + ), admin_url('themes.php') ) ); + ?> +

+
+ +

+
+
+ +
+ + + + + + + + default_headers ) ) : ?> + + + + + + + + + + + + + + + + +
+

+ show_header_selector( 'uploaded' ); + ?> +
+ +

+ +

+ + show_header_selector( 'default' ); + ?> +
+

+ +
+

+ +
+ + + +

+ + + + + + + + + + + + + +
+

+ +

+
+

+'; + if ( $default_color ) + echo ' ' . sprintf( _x( 'Default: %s', 'color' ), $default_color ) . ''; +} +?> +

+
+ + + +
+
+ +step_2_manage_upload()); + } + + if ( file_exists( $file ) ) { + list( $width, $height, $type, $attr ) = getimagesize( $file ); + } else { + $data = wp_get_attachment_metadata( $attachment_id ); + $height = isset( $data[ 'height' ] ) ? $data[ 'height' ] : 0; + $width = isset( $data[ 'width' ] ) ? $data[ 'width' ] : 0; + unset( $data ); + } + + $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 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 + if ( file_exists( $file ) ) + wp_update_attachment_metadata( $attachment_id, wp_generate_attachment_metadata( $attachment_id, $file ) ); + + $this->set_header_image( compact( 'url', 'attachment_id', 'width', 'height' ) ); + + /** + * Fires after the header image is set or an error is returned. + * + * @since 2.1.0 + * + * @param string $file Path to the file. + * @param int $attachment_id Attachment ID. + */ + do_action( 'wp_create_file_in_uploads', $file, $attachment_id ); // For replication + + return $this->finished(); + } 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' ) ); + + /** This filter is documented in wp-admin/custom-header.php */ + $image = apply_filters( 'wp_create_file_in_uploads', $image, $attachment_id ); // For replication + + $url = str_replace(basename($url), basename($image), $url); + $width = $width / $oitar; + $height = $height / $oitar; + } else { + $oitar = 1; + } + ?> + +
+

+ +
+

+

+ +
+ +
+ + + + + + + + + + + + +

+ + +

+
+
+ false); + + $uploaded_file = $_FILES['import']; + $wp_filetype = wp_check_filetype_and_ext( $uploaded_file['tmp_name'], $uploaded_file['name'], false ); + if ( ! wp_match_mime_types( 'image', $wp_filetype['type'] ) ) + wp_die( __( 'The uploaded file is not a valid image. Please try again.' ) ); + + $file = wp_handle_upload($uploaded_file, $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' ) ) + wp_die( __( 'Cheatin’ uh?' ) ); + + if ( ! empty( $_POST['skip-cropping'] ) && ! ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) ) + wp_die( __( 'Cheatin’ uh?' ) ); + + if ( $_POST['oitar'] > 1 ) { + $_POST['x1'] = $_POST['x1'] * $_POST['oitar']; + $_POST['y1'] = $_POST['y1'] * $_POST['oitar']; + $_POST['width'] = $_POST['width'] * $_POST['oitar']; + $_POST['height'] = $_POST['height'] * $_POST['oitar']; + } + + $attachment_id = absint( $_POST['attachment_id'] ); + $original = get_attached_file($attachment_id); + + $dimensions = $this->get_header_dimensions( array( + 'height' => $_POST['height'], + 'width' => $_POST['width'], + ) ); + $height = $dimensions['dst_height']; + $width = $dimensions['dst_width']; + + if ( empty( $_POST['skip-cropping'] ) ) + $cropped = wp_crop_image( $attachment_id, (int) $_POST['x1'], (int) $_POST['y1'], (int) $_POST['width'], (int) $_POST['height'], $width, $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' ) ); + + /** This filter is documented in wp-admin/custom-header.php */ + $cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication + + $object = $this->create_attachment_object( $cropped, $attachment_id ); + + if ( ! empty( $_POST['create-new-attachment'] ) ) + unset( $object['ID'] ); + + // Update the attachment + $attachment_id = $this->insert_attachment( $object, $cropped ); + + $url = $object['guid']; + $this->set_header_image( compact( 'url', 'attachment_id', 'width', 'height' ) ); + + // cleanup + $medium = str_replace( basename( $original ), 'midsize-' . basename( $original ), $original ); + if ( file_exists( $medium ) ) { + /** + * Filter the path of the file to delete. + * + * @since 2.1.0 + * + * @param string $medium Path to the file to delete. + */ + @unlink( apply_filters( 'wp_delete_file', $medium ) ); + } + + if ( empty( $_POST['create-new-attachment'] ) && empty( $_POST['skip-cropping'] ) ) { + /** This filter is documented in wp-admin/custom-header.php */ + @unlink( apply_filters( 'wp_delete_file', $original ) ); + } + + return $this->finished(); + } + + /** + * Display last step of custom header image page. + * + * @since 2.1.0 + */ + function finished() { + $this->updated = true; + $this->step_1(); + } + + /** + * Display the page based on the current step. + * + * @since 2.1.0 + */ + function admin_page() { + if ( ! current_user_can('edit_theme_options') ) + wp_die(__('You do not have permission to customize headers.')); + $step = $this->step(); + if ( 2 == $step ) + $this->step_2(); + elseif ( 3 == $step ) + $this->step_3(); + else + $this->step_1(); + } + + /** + * Unused since 3.5.0. + * + * @since 3.4.0 + */ + function attachment_fields_to_edit( $form_fields ) { + return $form_fields; + } + + /** + * Unused since 3.5.0. + * + * @since 3.4.0 + */ + function filter_upload_tabs( $tabs ) { + return $tabs; + } + + /** + * 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() ); + + $default_data = array(); + 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 ); + } + + /** + * Calculate width and height based on what the currently selected theme supports. + * + * @return array dst_height and dst_width of header image. + */ + final public function get_header_dimensions( $dimensions ) { + $max_width = 0; + $width = absint( $dimensions['width'] ); + $height = absint( $dimensions['height'] ); + $theme_height = get_theme_support( 'custom-header', 'height' ); + $theme_width = get_theme_support( 'custom-header', 'width' ); + $has_flex_width = current_theme_supports( 'custom-header', 'flex-width' ); + $has_flex_height = current_theme_supports( 'custom-header', 'flex-height' ); + $has_max_width = current_theme_supports( 'custom-header', 'max-width' ) ; + $dst = array( 'dst_height' => null, 'dst_height' => null ); + + // For flex, limit size of image displayed to 1500px unless theme says otherwise + if ( $has_flex_width ) { + $max_width = 1500; + } + + if ( $has_max_width ) { + $max_width = max( $max_width, get_theme_support( 'custom-header', 'max-width' ) ); + } + $max_width = max( $max_width, $theme_width ); + + if ( $has_flex_height && ( ! $has_flex_width || $width > $max_width ) ) { + $dst['dst_height'] = absint( $height * ( $max_width / $width ) ); + } + elseif ( $has_flex_height && $has_flex_width ) { + $dst['dst_height'] = $height; + } + else { + $dst['dst_height'] = $theme_height; + } + + if ( $has_flex_width && ( ! $has_flex_height || $width > $max_width ) ) { + $dst['dst_width'] = absint( $width * ( $max_width / $width ) ); + } + elseif ( $has_flex_width && $has_flex_height ) { + $dst['dst_width'] = $width; + } + else { + $dst['dst_width'] = $theme_width; + } + + return $dst; + } + + /** + * Create an attachment 'object'. + * + * @param string $cropped Cropped image URL. + * @param int $parent_attachment_id Attachment ID of parent image. + * + * @return array Attachment object. + */ + final public function create_attachment_object( $cropped, $parent_attachment_id ) { + $parent = get_post( $parent_attachment_id ); + $parent_url = $parent->guid; + $url = str_replace( basename( $parent_url ), basename( $cropped ), $parent_url ); + + $size = @getimagesize( $cropped ); + $image_type = ( $size ) ? $size['mime'] : 'image/jpeg'; + + $object = array( + 'ID' => $parent_attachment_id, + 'post_title' => basename($cropped), + 'post_content' => $url, + 'post_mime_type' => $image_type, + 'guid' => $url, + 'context' => 'custom-header' + ); + + return $object; + } + + /** + * Insert an attachment & its metadata. + * + * @param array $object Attachment object. + * @param string $cropped Cropped image URL. + * + * @return int Attachment ID. + */ + final public function insert_attachment( $object, $cropped ) { + $attachment_id = wp_insert_attachment( $object, $cropped ); + $metadata = wp_generate_attachment_metadata( $attachment_id, $cropped ); + /** + * Allows us to insert custom meta data for an attachment. + * + */ + $metadata = apply_filters( 'wp_header_image_attachment_metadata', $metadata ); + wp_update_attachment_metadata( $attachment_id, $metadata ); + return $attachment_id; + } + + /** + * Gets attachment uploaded by Media Manager, crops it, then saves it as a + * new object. Returns JSON-encoded object details. + */ + function ajax_header_crop() { + check_ajax_referer( 'image_editor-' . $_POST['id'], 'nonce' ); + + if ( ! current_user_can( 'edit_theme_options' ) ) { + wp_send_json_error(); + } + + if ( ! current_theme_supports( 'custom-header', 'uploads' ) ) { + wp_send_json_error(); + } + + $crop_details = $_POST['cropDetails']; + + $dimensions = $this->get_header_dimensions( array( + 'height' => $crop_details['height'], + 'width' => $crop_details['width'], + ) ); + + $attachment_id = absint( $_POST['id'] ); + + $cropped = wp_crop_image( + $attachment_id, + (int) $crop_details['x1'], + (int) $crop_details['y1'], + (int) $crop_details['width'], + (int) $crop_details['height'], + (int) $dimensions['dst_width'], + (int) $dimensions['dst_height'] + ); + + if ( ! $cropped || is_wp_error( $cropped ) ) { + wp_send_json_error( array( 'message' => __( 'Image could not be processed. Please go back and try again.' ) ) ); + } + + $cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication + + $object = $this->create_attachment_object( $cropped, $attachment_id ); + + unset( $object['ID'] ); + + $new_attachment_id = $this->insert_attachment( $object, $cropped ); + + $object['attachment_id'] = $new_attachment_id; + $object['width'] = $dimensions['dst_width']; + $object['height'] = $dimensions['dst_height']; + + wp_send_json_success( $object ); + } + + /** + * Given an attachment ID for a header image, updates its "last used" + * timestamp to now. + * + * Triggered when the user tries adds a new header image from the + * Media Manager, even if s/he doesn't save that change. + */ + function ajax_header_add() { + check_ajax_referer( 'header-add', 'nonce' ); + + if ( ! current_user_can( 'edit_theme_options' ) ) { + wp_send_json_error(); + } + + $attachment_id = absint( $_POST['attachment_id'] ); + if ( $attachment_id < 1 ) { + wp_send_json_error(); + } + + $key = '_wp_attachment_custom_header_last_used_' . get_stylesheet(); + update_post_meta( $attachment_id, $key, time() ); + update_post_meta( $attachment_id, '_wp_attachment_is_custom_header', get_stylesheet() ); + + wp_send_json_success(); + } + + /** + * Given an attachment ID for a header image, unsets it as a user-uploaded + * header image for the current theme. + * + * Triggered when the user clicks the overlay "X" button next to each image + * choice in the Customizer's Header tool. + */ + function ajax_header_remove() { + check_ajax_referer( 'header-remove', 'nonce' ); + + if ( ! current_user_can( 'edit_theme_options' ) ) { + wp_send_json_error(); + } + + $attachment_id = absint( $_POST['attachment_id'] ); + if ( $attachment_id < 1 ) { + wp_send_json_error(); + } + + $key = '_wp_attachment_custom_header_last_used_' . get_stylesheet(); + delete_post_meta( $attachment_id, $key ); + delete_post_meta( $attachment_id, '_wp_attachment_is_custom_header', get_stylesheet() ); + + wp_send_json_success(); + } + + function customize_set_last_used( $wp_customize ) { + $data = $wp_customize->get_setting( 'header_image_data' )->post_value(); + + if ( ! isset( $data['attachment_id'] ) ) { + return; + } + + $attachment_id = $data['attachment_id']; + $key = '_wp_attachment_custom_header_last_used_' . get_stylesheet(); + update_post_meta( $attachment_id, $key, time() ); + } + + public function get_default_header_images() { + $this->process_default_headers(); + + // Get the default image if there is one. + $default = get_theme_support( 'custom-header', 'default-image' ); + + if ( ! $default ) { // If not, + return $this->default_headers; // easy peasy. + } + + $default = sprintf( $default, get_template_directory_uri(), get_stylesheet_directory_uri() ); + $already_has_default = false; + + foreach ( $this->default_headers as $k => $h ) { + if ( $h['url'] === $default ) { + $already_has_default = true; + break; + } + } + + if ( $already_has_default ) { + return $this->default_headers; + } + + // If the one true image isn't included in the default set, prepend it. + $header_images = array(); + $header_images['default'] = array( + 'url' => $default, + 'thumbnail_url' => $default, + 'description' => 'Default' + ); + + // The rest of the set comes after. + $header_images = array_merge( $header_images, $this->default_headers ); + return $header_images; + } + + public function get_uploaded_header_images() { + $header_images = get_uploaded_header_images(); + $timestamp_key = '_wp_attachment_custom_header_last_used_' . get_stylesheet(); + $alt_text_key = '_wp_attachment_image_alt'; + + foreach ( $header_images as &$header_image ) { + $header_meta = get_post_meta( $header_image['attachment_id'] ); + $header_image['timestamp'] = isset( $header_meta[ $timestamp_key ] ) ? $header_meta[ $timestamp_key ] : ''; + $header_image['alt_text'] = isset( $header_meta[ $alt_text_key ] ) ? $header_meta[ $alt_text_key ] : ''; + } + + return $header_images; + } +} diff --git a/wp-admin/customize.php b/wp-admin/customize.php new file mode 100644 index 0000000..b1485d1 --- /dev/null +++ b/wp-admin/customize.php @@ -0,0 +1,255 @@ +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 ); + +/** + * Fires when Customizer controls are initialized, before scripts are enqueued. + * + * @since 3.4.0 + */ +do_action( 'customize_controls_init' ); + +wp_enqueue_script( 'customize-controls' ); +wp_enqueue_style( 'customize-controls' ); + +wp_enqueue_script( 'accordion' ); + +/** + * Enqueue Customizer control scripts. + * + * @since 3.4.0 + */ +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 = 'wp-core-ui wp-customizer js'; + +if ( wp_is_mobile() ) : + $body_class .= ' mobile'; + + ?>theme()->display('Name') ) ) ); +?><?php echo $admin_title; ?> + + + + + + +
+
+ +
+ is_theme_active() ? __( 'Save & Publish' ) : __( 'Save & Activate' ); + submit_button( $save_text, 'primary save', '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() ); + + // Prepare customizer settings to pass to Javascript. + $settings = array( + 'theme' => array( + 'stylesheet' => $wp_customize->get_stylesheet(), + 'active' => $wp_customize->is_theme_active(), + ), + 'url' => array( + 'preview' => esc_url_raw( $url ? $url : home_url( '/' ) ), + 'parent' => esc_url_raw( admin_url() ), + 'activated' => esc_url_raw( admin_url( 'themes.php?activated=true&previewed' ) ), + 'ajax' => esc_url_raw( admin_url( 'admin-ajax.php', 'relative' ) ), + 'allowed' => array_map( 'esc_url_raw', $allowed_urls ), + 'isCrossDomain' => $cross_domain, + 'fallback' => esc_url_raw( $fallback_url ), + 'home' => esc_url_raw( home_url( '/' ) ), + 'login' => esc_url_raw( $login_url ), + ), + 'browser' => array( + 'mobile' => wp_is_mobile(), + 'ios' => $is_ios, + ), + 'settings' => array(), + 'controls' => array(), + 'nonce' => array( + 'save' => wp_create_nonce( 'save-customize_' . $wp_customize->get_stylesheet() ), + 'preview' => wp_create_nonce( 'preview-customize_' . $wp_customize->get_stylesheet() ) + ), + ); + + // Prepare Customize Setting objects to pass to Javascript. + foreach ( $wp_customize->settings() as $id => $setting ) { + $settings['settings'][ $id ] = array( + 'value' => $setting->js_value(), + 'transport' => $setting->transport, + ); + } + + // Prepare Customize Control objects to pass to Javascript. + 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 new file mode 100644 index 0000000..5f28976 --- /dev/null +++ b/wp-admin/edit-comments.php @@ -0,0 +1,254 @@ +get_pagenum(); + +$doaction = $wp_list_table->current_action(); + +if ( $doaction ) { + check_admin_referer( 'bulk-comments' ); + + if ( 'delete_all' == $doaction && !empty( $_REQUEST['pagegen_timestamp'] ) ) { + $comment_status = wp_unslash( $_REQUEST['comment_status'] ); + $delete_time = wp_unslash( $_REQUEST['pagegen_timestamp'] ); + $comment_ids = $wpdb->get_col( $wpdb->prepare( "SELECT comment_ID FROM $wpdb->comments WHERE comment_approved = %s AND %s > comment_date_gmt", $comment_status, $delete_time ) ); + $doaction = 'delete'; + } elseif ( isset( $_REQUEST['delete_comments'] ) ) { + $comment_ids = $_REQUEST['delete_comments']; + $doaction = ( $_REQUEST['action'] != -1 ) ? $_REQUEST['action'] : $_REQUEST['action2']; + } elseif ( isset( $_REQUEST['ids'] ) ) { + $comment_ids = array_map( 'absint', explode( ',', $_REQUEST['ids'] ) ); + } elseif ( wp_get_referer() ) { + wp_safe_redirect( wp_get_referer() ); + exit; + } + + $approved = $unapproved = $spammed = $unspammed = $trashed = $untrashed = $deleted = 0; + + $redirect_to = remove_query_arg( array( 'trashed', 'untrashed', 'deleted', 'spammed', 'unspammed', 'approved', 'unapproved', 'ids' ), wp_get_referer() ); + $redirect_to = add_query_arg( 'paged', $pagenum, $redirect_to ); + + foreach ( $comment_ids as $comment_id ) { // Check the permissions on each + if ( !current_user_can( 'edit_comment', $comment_id ) ) + continue; + + switch ( $doaction ) { + case 'approve' : + wp_set_comment_status( $comment_id, 'approve' ); + $approved++; + break; + case 'unapprove' : + wp_set_comment_status( $comment_id, 'hold' ); + $unapproved++; + break; + case 'spam' : + wp_spam_comment( $comment_id ); + $spammed++; + break; + case 'unspam' : + wp_unspam_comment( $comment_id ); + $unspammed++; + break; + case 'trash' : + wp_trash_comment( $comment_id ); + $trashed++; + break; + case 'untrash' : + wp_untrash_comment( $comment_id ); + $untrashed++; + break; + case 'delete' : + wp_delete_comment( $comment_id ); + $deleted++; + break; + } + } + + if ( $approved ) + $redirect_to = add_query_arg( 'approved', $approved, $redirect_to ); + if ( $unapproved ) + $redirect_to = add_query_arg( 'unapproved', $unapproved, $redirect_to ); + if ( $spammed ) + $redirect_to = add_query_arg( 'spammed', $spammed, $redirect_to ); + if ( $unspammed ) + $redirect_to = add_query_arg( 'unspammed', $unspammed, $redirect_to ); + if ( $trashed ) + $redirect_to = add_query_arg( 'trashed', $trashed, $redirect_to ); + if ( $untrashed ) + $redirect_to = add_query_arg( 'untrashed', $untrashed, $redirect_to ); + if ( $deleted ) + $redirect_to = add_query_arg( 'deleted', $deleted, $redirect_to ); + if ( $trashed || $spammed ) + $redirect_to = add_query_arg( 'ids', join( ',', $comment_ids ), $redirect_to ); + + wp_safe_redirect( $redirect_to ); + exit; +} elseif ( ! empty( $_GET['_wp_http_referer'] ) ) { + wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ); + exit; +} + +$wp_list_table->prepare_items(); + +wp_enqueue_script('admin-comments'); +enqueue_comment_hotkeys_js(); + +if ( $post_id ) + $title = sprintf( __( 'Comments on “%s”' ), wp_html_excerpt( _draft_or_post_title( $post_id ), 50, '…' ) ); +else + $title = __('Comments'); + +add_screen_option( 'per_page', array('label' => _x( 'Comments', 'comments per page (screen options)' )) ); + +get_current_screen()->add_help_tab( array( +'id' => 'overview', +'title' => __('Overview'), +'content' => + '

' . __( 'You can manage comments made on your site similar to the way you manage posts and other content. This screen is customizable in the same ways as other management screens, and you can act on comments using the on-hover action links or the Bulk Actions.' ) . '

' +) ); +get_current_screen()->add_help_tab( array( +'id' => 'moderating-comments', +'title' => __('Moderating Comments'), +'content' => + '

' . __( 'A red bar on the left 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 the number of approved 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( + '

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

' . + '

' . __( 'Documentation on Comments' ) . '

' . + '

' . __( 'Documentation on Comment Spam' ) . '

' . + '

' . __( 'Documentation on Keyboard Shortcuts' ) . '

' . + '

' . __( 'Support Forums' ) . '

' +); + +require_once( ABSPATH . 'wp-admin/admin-header.php' ); +?> + +
+

%s', + get_edit_post_link( $post_id ), + wp_html_excerpt( _draft_or_post_title( $post_id ), 50, '…' ) + ) + ); +else + echo __('Comments'); + +if ( isset($_REQUEST['s']) && $_REQUEST['s'] ) + echo '' . sprintf( __( 'Search results for “%s”' ), wp_html_excerpt( esc_html( wp_unslash( $_REQUEST['s'] ) ), 50, '…' ) ) . ''; ?> +

+ +

' . $error_msg . '

'; +} + +if ( isset($_REQUEST['approved']) || isset($_REQUEST['deleted']) || isset($_REQUEST['trashed']) || isset($_REQUEST['untrashed']) || isset($_REQUEST['spammed']) || isset($_REQUEST['unspammed']) || isset($_REQUEST['same']) ) { + $approved = isset( $_REQUEST['approved'] ) ? (int) $_REQUEST['approved'] : 0; + $deleted = isset( $_REQUEST['deleted'] ) ? (int) $_REQUEST['deleted'] : 0; + $trashed = isset( $_REQUEST['trashed'] ) ? (int) $_REQUEST['trashed'] : 0; + $untrashed = isset( $_REQUEST['untrashed'] ) ? (int) $_REQUEST['untrashed'] : 0; + $spammed = isset( $_REQUEST['spammed'] ) ? (int) $_REQUEST['spammed'] : 0; + $unspammed = isset( $_REQUEST['unspammed'] ) ? (int) $_REQUEST['unspammed'] : 0; + $same = isset( $_REQUEST['same'] ) ? (int) $_REQUEST['same'] : 0; + + if ( $approved > 0 || $deleted > 0 || $trashed > 0 || $untrashed > 0 || $spammed > 0 || $unspammed > 0 || $same > 0 ) { + if ( $approved > 0 ) + $messages[] = sprintf( _n( '%s comment approved', '%s comments approved', $approved ), $approved ); + + if ( $spammed > 0 ) { + $ids = isset($_REQUEST['ids']) ? $_REQUEST['ids'] : 0; + $messages[] = sprintf( _n( '%s comment marked as spam.', '%s comments marked as spam.', $spammed ), $spammed ) . ' ' . __('Undo') . '
'; + } + + if ( $unspammed > 0 ) + $messages[] = sprintf( _n( '%s comment restored from the spam', '%s comments restored from the spam', $unspammed ), $unspammed ); + + if ( $trashed > 0 ) { + $ids = isset($_REQUEST['ids']) ? $_REQUEST['ids'] : 0; + $messages[] = sprintf( _n( '%s comment moved to the Trash.', '%s comments moved to the Trash.', $trashed ), $trashed ) . ' ' . __('Undo') . '
'; + } + + if ( $untrashed > 0 ) + $messages[] = sprintf( _n( '%s comment restored from the Trash', '%s comments restored from the Trash', $untrashed ), $untrashed ); + + if ( $deleted > 0 ) + $messages[] = sprintf( _n( '%s comment permanently deleted', '%s comments permanently deleted', $deleted ), $deleted ); + + if ( $same > 0 && $comment = get_comment( $same ) ) { + switch ( $comment->comment_approved ) { + case '1' : + $messages[] = __('This comment is already approved.') . ' ' . __( 'Edit comment' ) . ''; + break; + case 'trash' : + $messages[] = __( 'This comment is already in the Trash.' ) . ' ' . __( 'View Trash' ) . ''; + break; + case 'spam' : + $messages[] = __( 'This comment is already marked as spam.' ) . ' ' . __( 'Edit comment' ) . ''; + break; + } + } + + echo '

' . implode( "
\n", $messages ) . '

'; + } +} +?> + +views(); ?> + +
+ +search_box( __( 'Search Comments' ), 'comment' ); ?> + + + + + + + + + + + + + + + +display(); ?> +
+
+ +
+ + diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php new file mode 100644 index 0000000..8dc4815 --- /dev/null +++ b/wp-admin/edit-form-advanced.php @@ -0,0 +1,619 @@ +post_mime_type ) { + if ( 0 === strpos( $post->post_mime_type, 'audio/' ) ) { + $thumbnail_support = post_type_supports( 'attachment:audio', 'thumbnail' ) || current_theme_supports( 'post-thumbnails', 'attachment:audio' ); + } elseif ( 0 === strpos( $post->post_mime_type, 'video/' ) ) { + $thumbnail_support = post_type_supports( 'attachment:video', 'thumbnail' ) || current_theme_supports( 'post-thumbnails', 'attachment:video' ); + } +} + +if ( $thumbnail_support ) { + add_thickbox(); + wp_enqueue_media( array( 'post' => $post_ID ) ); +} + +// Add the local autosave notice HTML +add_action( 'admin_footer', '_local_storage_notice' ); + +/* + * @todo Document the $messages array(s). + */ +$messages = array(); +$messages['post'] = array( + 0 => '', // Unused. Messages start at index 1. + 1 => sprintf( __('Post updated. View post'), esc_url( get_permalink($post_ID) ) ), + 2 => __('Custom field updated.'), + 3 => __('Custom field deleted.'), + 4 => __('Post updated.'), + /* translators: %s: date and time of the revision */ + 5 => isset($_GET['revision']) ? sprintf( __('Post restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, + 6 => sprintf( __('Post published. View post'), esc_url( get_permalink($post_ID) ) ), + 7 => __('Post saved.'), + 8 => sprintf( __('Post submitted. Preview post'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ), + 9 => sprintf( __('Post scheduled for: %1$s. Preview post'), + /* translators: Publish box date format, see http://php.net/date */ + date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post_ID) ) ), + 10 => sprintf( __('Post draft updated. Preview post'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ), +); +$messages['page'] = array( + 0 => '', // Unused. Messages start at index 1. + 1 => sprintf( __('Page updated. View page'), esc_url( get_permalink($post_ID) ) ), + 2 => __('Custom field updated.'), + 3 => __('Custom field deleted.'), + 4 => __('Page updated.'), + 5 => isset($_GET['revision']) ? sprintf( __('Page restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, + 6 => sprintf( __('Page published. View page'), esc_url( get_permalink($post_ID) ) ), + 7 => __('Page saved.'), + 8 => sprintf( __('Page submitted. Preview page'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ), + 9 => sprintf( __('Page scheduled for: %1$s. Preview page'), date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post_ID) ) ), + 10 => sprintf( __('Page draft updated. Preview page'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ), +); +$messages['attachment'] = array_fill( 1, 10, __( 'Media attachment updated.' ) ); // Hack, for now. + +/** + * Filter the post updated messages. + * + * @since 3.0.0 + * + * @param array $messages Post updated messages. For defaults @see $messages declarations above. + */ +$messages = apply_filters( 'post_updated_messages', $messages ); + +$message = false; +if ( isset($_GET['message']) ) { + $_GET['message'] = absint( $_GET['message'] ); + if ( isset($messages[$post_type][$_GET['message']]) ) + $message = $messages[$post_type][$_GET['message']]; + elseif ( !isset($messages[$post_type]) && isset($messages['post'][$_GET['message']]) ) + $message = $messages['post'][$_GET['message']]; +} + +$notice = false; +$form_extra = ''; +if ( 'auto-draft' == $post->post_status ) { + if ( 'edit' == $action ) + $post->post_title = ''; + $autosave = false; + $form_extra .= ""; +} else { + $autosave = wp_get_post_autosave( $post_ID ); +} + +$form_action = 'editpost'; +$nonce_action = 'update-post_' . $post_ID; +$form_extra .= ""; + +// Detect if there exists an autosave newer than the post and if that autosave is different than the post +if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt, false ) > mysql2date( 'U', $post->post_modified_gmt, false ) ) { + foreach ( _wp_post_revision_fields() as $autosave_field => $_autosave_field ) { + if ( normalize_whitespace( $autosave->$autosave_field ) != normalize_whitespace( $post->$autosave_field ) ) { + $notice = sprintf( __( '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; + } + } + // If this autosave isn't different from the current post, begone. + if ( ! $notice ) + wp_delete_post_revision( $autosave->ID ); + unset($autosave_field, $_autosave_field); +} + +$post_type_object = get_post_type_object($post_type); + +// All meta boxes should be defined and added before the first do_meta_boxes() call (or potentially during the do_meta_boxes action). +require_once( ABSPATH . 'wp-admin/includes/meta-boxes.php' ); + + +$publish_callback_args = null; +if ( post_type_supports($post_type, 'revisions') && 'auto-draft' != $post->post_status ) { + $revisions = wp_get_post_revisions( $post_ID ); + + // We should aim to show the revisions metabox only when there are revisions. + if ( count( $revisions ) > 1 ) { + reset( $revisions ); // Reset pointer for key() + $publish_callback_args = array( 'revisions_count' => count( $revisions ), 'revision_id' => key( $revisions ) ); + add_meta_box('revisionsdiv', __('Revisions'), 'post_revisions_meta_box', null, 'normal', 'core'); + } +} + +if ( 'attachment' == $post_type ) { + wp_enqueue_script( 'image-edit' ); + wp_enqueue_style( 'imgareaselect' ); + add_meta_box( 'submitdiv', __('Save'), 'attachment_submit_meta_box', null, 'side', 'core' ); + add_action( 'edit_form_after_title', 'edit_form_image_editor' ); + + if ( 0 === strpos( $post->post_mime_type, 'audio/' ) ) { + add_meta_box( 'attachment-id3', __( 'Metadata' ), 'attachment_id3_data_meta_box', null, 'normal', 'core' ); + } +} else { + add_meta_box( 'submitdiv', __( 'Publish' ), 'post_submit_meta_box', null, 'side', 'core', $publish_callback_args ); +} + +if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post_type, 'post-formats' ) ) + add_meta_box( 'formatdiv', _x( 'Format', 'post format' ), 'post_format_meta_box', null, 'side', 'core' ); + +// all taxonomies +foreach ( get_object_taxonomies( $post ) as $tax_name ) { + $taxonomy = get_taxonomy( $tax_name ); + if ( ! $taxonomy->show_ui || false === $taxonomy->meta_box_cb ) + continue; + + $label = $taxonomy->labels->name; + + if ( ! is_taxonomy_hierarchical( $tax_name ) ) + $tax_meta_box_id = 'tagsdiv-' . $tax_name; + else + $tax_meta_box_id = $tax_name . 'div'; + + add_meta_box( $tax_meta_box_id, $label, $taxonomy->meta_box_cb, null, 'side', 'core', array( 'taxonomy' => $tax_name ) ); +} + +if ( post_type_supports($post_type, 'page-attributes') ) + add_meta_box('pageparentdiv', 'page' == $post_type ? __('Page Attributes') : __('Attributes'), 'page_attributes_meta_box', null, 'side', 'core'); + +if ( $thumbnail_support ) + add_meta_box('postimagediv', __('Featured Image'), 'post_thumbnail_meta_box', null, 'side', 'low'); + +if ( post_type_supports($post_type, 'excerpt') ) + add_meta_box('postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', null, 'normal', 'core'); + +if ( post_type_supports($post_type, 'trackbacks') ) + add_meta_box('trackbacksdiv', __('Send Trackbacks'), 'post_trackback_meta_box', null, 'normal', 'core'); + +if ( post_type_supports($post_type, 'custom-fields') ) + add_meta_box('postcustom', __('Custom Fields'), 'post_custom_meta_box', null, 'normal', 'core'); + +/** + * Fires in the middle of built-in meta box registration. + * + * @since 2.1.0 + * @deprecated 3.7.0 Use 'add_meta_boxes' instead. + * + * @param WP_Post $post Post object. + */ +do_action( 'dbx_post_advanced', $post ); + +if ( post_type_supports($post_type, 'comments') ) + add_meta_box('commentstatusdiv', __('Discussion'), 'post_comment_status_meta_box', null, 'normal', 'core'); + +if ( ( 'publish' == get_post_status( $post ) || 'private' == get_post_status( $post ) ) && post_type_supports($post_type, 'comments') ) + add_meta_box('commentsdiv', __('Comments'), 'post_comment_meta_box', null, 'normal', 'core'); + +if ( ! ( 'pending' == get_post_status( $post ) && ! current_user_can( $post_type_object->cap->publish_posts ) ) ) + add_meta_box('slugdiv', __('Slug'), 'post_slug_meta_box', null, 'normal', 'core'); + +if ( post_type_supports($post_type, 'author') ) { + if ( is_super_admin() || current_user_can( $post_type_object->cap->edit_others_posts ) ) + add_meta_box('authordiv', __('Author'), 'post_author_meta_box', null, 'normal', 'core'); +} + +/** + * Fires after all built-in meta boxes have been added. + * + * @since 3.0.0 + * + * @param string $post_type Post type. + * @param WP_Post $post Post object. + */ +do_action( 'add_meta_boxes', $post_type, $post ); + +/** + * Fires after all built-in meta boxes have been added, contextually for the given post type. + * + * The dynamic portion of the hook, $post_type, refers to the post type of the post. + * + * @since 3.0.0 + * + * @param WP_Post $post Post object. + */ +do_action( 'add_meta_boxes_' . $post_type, $post ); + +/** + * Fires after meta boxes have been added. + * + * Fires once for each of the default meta box contexts: normal, advanced, and side. + * + * @since 3.0.0 + * + * @param string $post_type Post type of the post. + * @param string $context string Meta box context. + * @param WP_Post $post Post object. + */ +do_action( 'do_meta_boxes', $post_type, 'normal', $post ); +/** This action is documented in wp-admin/edit-form-advanced.php */ +do_action( 'do_meta_boxes', $post_type, 'advanced', $post ); +/** This action is documented in wp-admin/edit-form-advanced.php */ +do_action( 'do_meta_boxes', $post_type, 'side', $post ); + +add_screen_option('layout_columns', array('max' => 2, 'default' => 2) ); + +if ( 'post' == $post_type ) { + $customize_display = '

' . __('The title field and the big Post Editing Area are fixed in place, but you can reposition all the other boxes using drag and drop. You can also minimize or expand them by clicking the title bar of each box. Use the Screen Options tab to unhide more boxes (Excerpt, Send Trackbacks, Custom Fields, Discussion, Slug, Author) or to choose a 1- or 2-column layout for this screen.') . '

'; + + get_current_screen()->add_help_tab( array( + 'id' => 'customize-display', + 'title' => __('Customizing This Display'), + 'content' => $customize_display, + ) ); + + $title_and_editor = '

' . __('Title - Enter a title for your post. After you enter a title, you’ll see the permalink below, which you can edit.') . '

'; + $title_and_editor .= '

' . __('Post editor - Enter the text for your post. There are two modes of editing: Visual and Text. Choose the mode by clicking on the appropriate tab. Visual mode gives you a WYSIWYG editor. Click the last icon in the row to get a second row of controls. The Text mode allows you to enter HTML along with your post text. Line breaks will be converted to paragraphs automatically. You can insert media files by clicking the icons above the post editor and following the directions. You can go to the distraction-free writing screen via the Fullscreen icon in Visual mode (second to last in the top row) or the Fullscreen button in Text mode (last in the row). Once there, you can make buttons visible by hovering over the top area. Exit Fullscreen back to the regular post editor.') . '

'; + $title_and_editor .= '

' . __( 'Keyboard users: When you’re working in the visual editor, you can use Alt + F10 to access the toolbar.' ) . '

'; + + get_current_screen()->add_help_tab( array( + 'id' => 'title-post-editor', + 'title' => __('Title and Post Editor'), + 'content' => $title_and_editor, + ) ); + + get_current_screen()->set_help_sidebar( + '

' . sprintf(__('You can also create posts with the Press This bookmarklet.'), 'options-writing.php') . '

' . + '

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

' . + '

' . __('Documentation on Writing and Editing Posts') . '

' . + '

' . __('Support Forums') . '

' + ); +} elseif ( 'page' == $post_type ) { + $about_pages = '

' . __('Pages are similar to Posts in that they have a title, body text, and associated metadata, but they are different in that they are not part of the chronological blog stream, kind of like permanent posts. Pages are not categorized or tagged, but can have a hierarchy. You can nest Pages under other Pages by making one the “Parent” of the other, creating a group of Pages.') . '

' . + '

' . __('Creating a Page is very similar to creating a Post, and the screens can be customized in the same way using drag and drop, the Screen Options tab, and expanding/collapsing boxes as you choose. This screen also has the distraction-free writing space, available in both the Visual and Text modes via the Fullscreen buttons. The Page editor mostly works the same as the Post editor, but there are some Page-specific features in the Page Attributes box:') . '

'; + + get_current_screen()->add_help_tab( array( + 'id' => 'about-pages', + 'title' => __('About Pages'), + 'content' => $about_pages, + ) ); + + get_current_screen()->set_help_sidebar( + '

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

' . + '

' . __('Documentation on Adding New Pages') . '

' . + '

' . __('Documentation on Editing Pages') . '

' . + '

' . __('Support Forums') . '

' + ); +} elseif ( 'attachment' == $post_type ) { + get_current_screen()->add_help_tab( array( + 'id' => 'overview', + 'title' => __('Overview'), + 'content' => + '

' . __('This screen allows you to edit four fields for metadata in a file within the media library.') . '

' . + '

' . __('For images only, you can click on Edit Image under the thumbnail to expand out an inline image editor with icons for cropping, rotating, or flipping the image as well as for undoing and redoing. The boxes on the right give you more options for scaling the image, for cropping it, and for cropping the thumbnail in a different way than you crop the original image. You can click on Help in those boxes to get more information.') . '

' . + '

' . __('Note that you crop the image by clicking on it (the Crop icon is already selected) and dragging the cropping frame to select the desired part. Then click Save to retain the cropping.') . '

' . + '

' . __('Remember to click Update Media to save metadata entered or changed.') . '

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

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

' . + '

' . __('Documentation on Edit Media') . '

' . + '

' . __('Support Forums') . '

' + ); +} + +if ( 'post' == $post_type || 'page' == $post_type ) { + $inserting_media = '

' . __( 'You can upload and insert media (images, audio, documents, etc.) by clicking the Add Media button. You can select from the images and files already uploaded to the Media Library, or upload new media to add to your page or post. To create an image gallery, select the images to add and click the “Create a new gallery” button.' ) . '

'; + $inserting_media .= '

' . __( 'You can also embed media from many popular websites including Twitter, YouTube, Flickr and others by pasting the media URL on its own line into the content of your post/page. Please refer to the Codex to learn more about embeds.' ) . '

'; + + get_current_screen()->add_help_tab( array( + 'id' => 'inserting-media', + 'title' => __( 'Inserting Media' ), + 'content' => $inserting_media, + ) ); +} + +if ( 'post' == $post_type ) { + $publish_box = '

' . __('Several boxes on this screen contain settings for how your content will be published, including:') . '

'; + $publish_box .= '
  • ' . __('Publish - You can set the terms of publishing your post in the Publish box. For Status, Visibility, and Publish (immediately), click on the Edit link to reveal more options. Visibility includes options for password-protecting a post or making it stay at the top of your blog indefinitely (sticky). Publish (immediately) allows you to set a future or past date and time, so you can schedule a post to be published in the future or backdate a post.') . '
  • '; + + if ( current_theme_supports( 'post-formats' ) && post_type_supports( 'post', 'post-formats' ) ) { + $publish_box .= '
  • ' . __( 'Format - Post Formats designate how your theme will display a specific post. For example, you could have a standard blog post with a title and paragraphs, or a short aside that omits the title and contains a short text blurb. Please refer to the Codex for descriptions of each post format. Your theme could enable all or some of 10 possible formats.' ) . '
  • '; + } + + if ( current_theme_supports( 'post-thumbnails' ) && post_type_supports( 'post', 'thumbnail' ) ) { + $publish_box .= '
  • ' . __('Featured Image - This allows you to associate an image with your post without inserting it. This is usually useful only if your theme makes use of the featured image as a post thumbnail on the home page, a custom header, etc.') . '
  • '; + } + + $publish_box .= '
'; + + get_current_screen()->add_help_tab( array( + 'id' => 'publish-box', + 'title' => __('Publish Settings'), + 'content' => $publish_box, + ) ); + + $discussion_settings = '

' . __('Send Trackbacks - Trackbacks are a way to notify legacy blog systems that you’ve linked to them. Enter the URL(s) you want to send trackbacks. If you link to other WordPress sites they’ll be notified automatically using pingbacks, and this field is unnecessary.') . '

'; + $discussion_settings .= '

' . __('Discussion - You can turn comments and pings on or off, and if there are comments on the post, you can see them here and moderate them.') . '

'; + + get_current_screen()->add_help_tab( array( + 'id' => 'discussion-settings', + 'title' => __('Discussion Settings'), + 'content' => $discussion_settings, + ) ); +} elseif ( 'page' == $post_type ) { + $page_attributes = '

' . __('Parent - You can arrange your pages in hierarchies. For example, you could have an “About” page that has “Life Story” and “My Dog” pages under it. There are no limits to how many levels you can nest pages.') . '

' . + '

' . __('Template - Some themes have custom templates you can use for certain pages that might have additional features or custom layouts. If so, you’ll see them in this dropdown menu.') . '

' . + '

' . __('Order - Pages are usually ordered alphabetically, but you can choose your own order by entering a number (1 for first, etc.) in this field.') . '

'; + + get_current_screen()->add_help_tab( array( + 'id' => 'page-attributes', + 'title' => __('Page Attributes'), + 'content' => $page_attributes, + ) ); +} + +require_once( ABSPATH . 'wp-admin/admin-header.php' ); +?> + +
+

cap->create_posts ) ) + echo ' ' . esc_html( $post_type_object->labels->add_new ) . ''; +?>

+ +

+ + +

+ + + tag. + * + * @since 3.0.0 + * + * @param WP_Post $post Post object. + */ +?> +
> + + + + + + + + + + + + + + +
+
+
+ + +
+
+ + + +
+
+public ? get_sample_permalink_html($post->ID) : ''; +$shortlink = wp_get_shortlink($post->ID, 'post'); +$permalink = get_permalink( $post->ID ); +if ( !empty( $shortlink ) && $shortlink !== $permalink && $permalink !== home_url('?page_id=' . $post->ID) ) + $sample_permalink_html .= '' . __('Get Shortlink') . ''; + +if ( $post_type_object->public && ! ( 'pending' == get_post_status( $post ) && !current_user_can( $post_type_object->cap->publish_posts ) ) ) { + $has_sample_permalink = $sample_permalink_html && 'auto-draft' != $post->post_status; +?> +
+ +
+ +
+ +
+ +
+ +post_content, 'content', array( + 'dfw' => true, + 'drag_drop_upload' => true, + 'tabfocus_elements' => 'insert-media-button,save-post', + 'editor_height' => 360, + 'tinymce' => array( + 'resize' => false, + 'add_unload_trigger' => false, + ), +) ); ?> + + + + +
0' ); ?> +   +post_status ) { + echo ''; + if ( $last_user = get_userdata( get_post_meta( $post_ID, '_edit_last', true ) ) ) { + printf(__('Last edited by %1$s on %2$s at %3$s'), esc_html( $last_user->display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); + } else { + printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); + } + echo ''; + } ?> +
+ +
+ +
+ +
+ +
+
+ +
+ +
+
+
+
+
+ + + +post_title ) : ?> + + diff --git a/wp-admin/edit-form-comment.php b/wp-admin/edit-form-comment.php new file mode 100644 index 0000000..3d0ebf5 --- /dev/null +++ b/wp-admin/edit-form-comment.php @@ -0,0 +1,160 @@ + +
+comment_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') . ''; + /** This filter is documented in wp-includes/comment-template.php */ + printf( __( 'URL (%s):' ), apply_filters( 'get_comment_author_link', $link ) ); + } else { + _e( 'URL:' ); + } ?>
+
+
+
+ +
+ 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' ); + wp_editor( $comment->comment_content, 'content', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings ) ); + wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?> +
+
+ +
+
+

+
+
+
+ +
+
+ +
+
+
+ +
+ +
+
+
+ +
+ + +
+ +
+ + +
+%1$s'); +$date = date_i18n( $datef, strtotime( $comment->comment_date ) ); +?> +  +
+
+
+
+
+ +
+
+comment_ID&_wp_original_http_referer=" . urlencode(wp_get_referer()), 'delete-comment_' . $comment->comment_ID) . "'>" . ( !EMPTY_TRASH_DAYS ? __('Delete Permanently') : __('Move to Trash') ) . "\n"; ?> +
+
+ +
+
+
+
+
+
+
+ +
+ +
+ + + + + + + +
+
+
+
+ + diff --git a/wp-admin/edit-link-form.php b/wp-admin/edit-link-form.php new file mode 100644 index 0000000..007146c --- /dev/null +++ b/wp-admin/edit-link-form.php @@ -0,0 +1,154 @@ +Links / Edit Link' ), 'link-manager.php' ); + $submit_text = __('Update Link'); + $form = ' diff --git a/wp-admin/edit-tag-form.php b/wp-admin/edit-tag-form.php new file mode 100644 index 0000000..9d5ceb5 --- /dev/null +++ b/wp-admin/edit-tag-form.php @@ -0,0 +1,204 @@ + +

+ + +
+

labels->edit_item; ?>

+
+ +
> + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+

+ 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'))); ?> + +

+ +

+
+ +
+
+ diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php new file mode 100644 index 0000000..717954c --- /dev/null +++ b/wp-admin/edit-tags.php @@ -0,0 +1,594 @@ +cap->manage_terms ) ) + wp_die( __( 'Cheatin’ uh?' ) ); + +$wp_list_table = _get_list_table('WP_Terms_List_Table'); +$pagenum = $wp_list_table->get_pagenum(); + +$title = $tax->labels->name; + +if ( 'post' != $post_type ) { + $parent_file = ( 'attachment' == $post_type ) ? 'upload.php' : "edit.php?post_type=$post_type"; + $submenu_file = "edit-tags.php?taxonomy=$taxonomy&post_type=$post_type"; +} else if ( 'link_category' == $tax->name ) { + $parent_file = 'link-manager.php'; + $submenu_file = 'edit-tags.php?taxonomy=link_category'; +} else { + $parent_file = 'edit.php'; + $submenu_file = "edit-tags.php?taxonomy=$taxonomy"; +} + +add_screen_option( 'per_page', array( 'label' => $title, 'default' => 20, 'option' => 'edit_' . $tax->name . '_per_page' ) ); + +switch ( $wp_list_table->current_action() ) { + +case 'add-tag': + + check_admin_referer( 'add-tag', '_wpnonce_add-tag' ); + + if ( !current_user_can( $tax->cap->edit_terms ) ) + wp_die( __( 'Cheatin’ uh?' ) ); + + $ret = wp_insert_term( $_POST['tag-name'], $taxonomy, $_POST ); + $location = 'edit-tags.php?taxonomy=' . $taxonomy; + if ( 'post' != $post_type ) + $location .= '&post_type=' . $post_type; + + if ( $referer = wp_get_original_referer() ) { + if ( false !== strpos( $referer, 'edit-tags.php' ) ) + $location = $referer; + } + + if ( $ret && !is_wp_error( $ret ) ) + $location = add_query_arg( 'message', 1, $location ); + else + $location = add_query_arg( 'message', 4, $location ); + wp_redirect( $location ); + exit; +break; + +case 'delete': + $location = 'edit-tags.php?taxonomy=' . $taxonomy; + if ( 'post' != $post_type ) + $location .= '&post_type=' . $post_type; + if ( $referer = wp_get_referer() ) { + if ( false !== strpos( $referer, 'edit-tags.php' ) ) + $location = $referer; + } + + if ( !isset( $_REQUEST['tag_ID'] ) ) { + wp_redirect( $location ); + exit; + } + + $tag_ID = (int) $_REQUEST['tag_ID']; + check_admin_referer( 'delete-tag_' . $tag_ID ); + + if ( !current_user_can( $tax->cap->delete_terms ) ) + wp_die( __( 'Cheatin’ uh?' ) ); + + wp_delete_term( $tag_ID, $taxonomy ); + + $location = add_query_arg( 'message', 2, $location ); + wp_redirect( $location ); + exit; + +break; + +case 'bulk-delete': + check_admin_referer( 'bulk-tags' ); + + if ( !current_user_can( $tax->cap->delete_terms ) ) + wp_die( __( 'Cheatin’ uh?' ) ); + + $tags = (array) $_REQUEST['delete_tags']; + foreach ( $tags as $tag_ID ) { + wp_delete_term( $tag_ID, $taxonomy ); + } + + $location = 'edit-tags.php?taxonomy=' . $taxonomy; + if ( 'post' != $post_type ) + $location .= '&post_type=' . $post_type; + if ( $referer = wp_get_referer() ) { + if ( false !== strpos( $referer, 'edit-tags.php' ) ) + $location = $referer; + } + + $location = add_query_arg( 'message', 6, $location ); + wp_redirect( $location ); + exit; + +break; + +case 'edit': + $title = $tax->labels->edit_item; + + $tag_ID = (int) $_REQUEST['tag_ID']; + + $tag = get_term( $tag_ID, $taxonomy, OBJECT, 'edit' ); + if ( ! $tag ) + wp_die( __( 'You attempted to edit an item that doesn’t exist. Perhaps it was deleted?' ) ); + require_once( ABSPATH . 'wp-admin/admin-header.php' ); + include( ABSPATH . 'wp-admin/edit-tag-form.php' ); + +break; + +case 'editedtag': + $tag_ID = (int) $_POST['tag_ID']; + check_admin_referer( 'update-tag_' . $tag_ID ); + + if ( !current_user_can( $tax->cap->edit_terms ) ) + wp_die( __( 'Cheatin’ uh?' ) ); + + $tag = get_term( $tag_ID, $taxonomy ); + if ( ! $tag ) + wp_die( __( 'You attempted to edit an item that doesn’t exist. Perhaps it was deleted?' ) ); + + $ret = wp_update_term( $tag_ID, $taxonomy, $_POST ); + + $location = 'edit-tags.php?taxonomy=' . $taxonomy; + if ( 'post' != $post_type ) + $location .= '&post_type=' . $post_type; + + if ( $referer = wp_get_original_referer() ) { + if ( false !== strpos( $referer, 'edit-tags.php' ) ) + $location = $referer; + } + + if ( $ret && !is_wp_error( $ret ) ) + $location = add_query_arg( 'message', 3, $location ); + else + $location = add_query_arg( 'message', 5, $location ); + + wp_redirect( $location ); + exit; +break; + +default: +if ( ! empty($_REQUEST['_wp_http_referer']) ) { + $location = remove_query_arg( array('_wp_http_referer', '_wpnonce'), wp_unslash($_SERVER['REQUEST_URI']) ); + + if ( ! empty( $_REQUEST['paged'] ) ) + $location = add_query_arg( 'paged', (int) $_REQUEST['paged'] ); + + wp_redirect( $location ); + exit; +} + +$wp_list_table->prepare_items(); +$total_pages = $wp_list_table->get_pagination_arg( 'total_pages' ); + +if ( $pagenum > $total_pages && $total_pages > 0 ) { + wp_redirect( add_query_arg( 'paged', $total_pages ) ); + exit; +} + +wp_enqueue_script('admin-tags'); +if ( current_user_can($tax->cap->edit_terms) ) + wp_enqueue_script('inline-edit-tax'); + +if ( 'category' == $taxonomy || 'link_category' == $taxonomy || 'post_tag' == $taxonomy ) { + $help =''; + if ( 'category' == $taxonomy ) + $help = '

' . sprintf(__( 'You can use categories to define sections of your site and group related posts. The default category is “Uncategorized” until you change it in your writing settings.' ) , 'options-writing.php' ) . '

'; + elseif ( 'link_category' == $taxonomy ) + $help = '

' . __( 'You can create groups of links by using Link Categories. Link Category names must be unique and Link Categories are separate from the categories you use for posts.' ) . '

'; + else + $help = '

' . __( 'You can assign keywords to your posts using tags. Unlike categories, tags have no hierarchy, meaning there’s no relationship from one tag to another.' ) . '

'; + + if ( 'link_category' == $taxonomy ) + $help .= '

' . __( 'You can delete Link Categories in the Bulk Action pull-down, but that action does not delete the links within the category. Instead, it moves them to the default Link Category.' ) . '

'; + else + $help .='

' . __( 'What’s the difference between categories and tags? Normally, tags are ad-hoc keywords that identify important information in your post (names, subjects, etc) that may or may not recur in other posts, while categories are pre-determined sections. If you think of your site like a book, the categories are like the Table of Contents and the tags are like the terms in the index.' ) . '

'; + + get_current_screen()->add_help_tab( array( + 'id' => 'overview', + 'title' => __('Overview'), + 'content' => $help, + ) ); + + if ( 'category' == $taxonomy || 'post_tag' == $taxonomy ) { + if ( 'category' == $taxonomy ) + $help = '

' . __( 'When adding a new category on this screen, you’ll fill in the following fields:' ) . '

'; + else + $help = '

' . __( 'When adding a new tag on this screen, you’ll fill in the following fields:' ) . '

'; + + $help .= '
    ' . + '
  • ' . __( 'Name - The name is how it appears on your site.' ) . '
  • '; + + if ( ! global_terms_enabled() ) + $help .= '
  • ' . __( 'Slug - The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.' ) . '
  • '; + + if ( 'category' == $taxonomy ) + $help .= '
  • ' . __( 'Parent - Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have child categories for Bebop and Big Band. Totally optional. To create a subcategory, just choose another category from the Parent dropdown.' ) . '
  • '; + + $help .= '
  • ' . __( 'Description - The description is not prominent by default; however, some themes may display it.' ) . '
  • ' . + '
' . + '

' . __( 'You can change the display of this screen using the Screen Options tab to set how many items are displayed per screen and to display/hide columns in the table.' ) . '

'; + + get_current_screen()->add_help_tab( array( + 'id' => 'adding-terms', + 'title' => 'category' == $taxonomy ? __( 'Adding Categories' ) : __( 'Adding Tags' ), + 'content' => $help, + ) ); + } + + $help = '

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

'; + + if ( 'category' == $taxonomy ) + $help .= '

' . __( 'Documentation on Categories' ) . '

'; + elseif ( 'link_category' == $taxonomy ) + $help .= '

' . __( 'Documentation on Link Categories' ) . '

'; + else + $help .= '

' . __( 'Documentation on Tags' ) . '

'; + + $help .= '

' . __('Support Forums') . '

'; + + get_current_screen()->set_help_sidebar( $help ); + + unset( $help ); +} + +require_once( ABSPATH . 'wp-admin/admin-header.php' ); + +if ( !current_user_can($tax->cap->edit_terms) ) + wp_die( __('You are not allowed to edit this item.') ); + +$messages = array(); +$messages['_item'] = array( + 0 => '', // Unused. Messages start at index 1. + 1 => __( 'Item added.' ), + 2 => __( 'Item deleted.' ), + 3 => __( 'Item updated.' ), + 4 => __( 'Item not added.' ), + 5 => __( 'Item not updated.' ), + 6 => __( 'Items deleted.' ) +); +$messages['category'] = array( + 0 => '', // Unused. Messages start at index 1. + 1 => __( 'Category added.' ), + 2 => __( 'Category deleted.' ), + 3 => __( 'Category updated.' ), + 4 => __( 'Category not added.' ), + 5 => __( 'Category not updated.' ), + 6 => __( 'Categories deleted.' ) +); +$messages['post_tag'] = array( + 0 => '', // Unused. Messages start at index 1. + 1 => __( 'Tag added.' ), + 2 => __( 'Tag deleted.' ), + 3 => __( 'Tag updated.' ), + 4 => __( 'Tag not added.' ), + 5 => __( 'Tag not updated.' ), + 6 => __( 'Tags deleted.' ) +); + +/** + * Filter the messages displayed when a tag is updated. + * + * @since 3.7.0 + * + * @param array $messages The messages to be displayed. + */ +$messages = apply_filters( 'term_updated_messages', $messages ); + +$message = false; +if ( isset( $_REQUEST['message'] ) && ( $msg = (int) $_REQUEST['message'] ) ) { + if ( isset( $messages[ $taxonomy ][ $msg ] ) ) + $message = $messages[ $taxonomy ][ $msg ]; + elseif ( ! isset( $messages[ $taxonomy ] ) && isset( $messages['_item'][ $msg ] ) ) + $message = $messages['_item'][ $msg ]; +} + +?> + +
+

' . __('Search results for “%s”') . '', esc_html( wp_unslash($_REQUEST['s']) ) ); ?> +

+ + +

+ +
+ +
+ + + +search_box( $tax->labels->search_items, 'tag' ); ?> + +
+
+ +
+ +
+
+
+ + + +display(); ?> + +
+
+ + +
+ +

Note:
Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the category %s.'), apply_filters('the_category', get_cat_name(get_option('default_category')))) ?>

+ +

category to tag converter.'), 'import.php') ?>

+ +
+ +
+

tag to category converter.'), 'import.php') ;?>

+
+ + +
+
+ +
+
+ +labels->popular_items ) ) { + if ( current_user_can( $tax->cap->edit_terms ) ) + $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'post_type' => $post_type, 'echo' => false, 'link' => 'edit' ) ); + else + $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false ) ); + + if ( $tag_cloud ) : + ?> +
+

labels->popular_items; ?>

+ +
+cap->edit_terms) ) { + if ( 'category' == $taxonomy ) { + /** + * Fires before the Add Category form. + * + * @since 2.1.0 + * @deprecated 3.0.0 Use {$taxonomy}_pre_add_form instead. + * + * @param object $arg Optional arguments cast to an object. + */ + do_action( 'add_category_form_pre', (object) array( 'parent' => 0 ) ); + } elseif ( 'link_category' == $taxonomy ) { + /** + * Fires before the link category form. + * + * @since 2.3.0 + * @deprecated 3.0.0 Use {$taxonomy}_pre_add_form instead. + * + * @param object $arg Optional arguments cast to an object. + */ + do_action( 'add_link_category_form_pre', (object) array( 'parent' => 0 ) ); + } else { + /** + * Fires before the Add Tag form. + * + * @since 2.5.0 + * @deprecated 3.0.0 Use {$taxonomy}_pre_add_form instead. + * + * @param string $taxonomy The taxonomy slug. + */ + do_action( 'add_tag_form_pre', $taxonomy ); + } + + /** + * Fires before the Add Term form for all taxonomies. + * + * The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug. + * + * @since 3.0.0 + * + * @param string $taxonomy The taxonomy slug. + */ + do_action( "{$taxonomy}_pre_add_form", $taxonomy ); +?> + +
+

labels->add_new_item; ?>

+ +
> + + + + + + +
+ + +

+
+ +
+ + +

+
+ + +
+ + 0, + 'hide_if_empty' => false, + 'taxonomy' => $taxonomy, + 'name' => 'parent', + 'orderby' => 'name', + 'hierarchical' => true, + 'show_option_none' => __( 'None' ), + ); + + /** + * Filter the taxonomy parent drop-down on the Edit Term page. + * + * @since 3.7.0 + * + * @param array $dropdown_args { + * An array of taxonomy parent drop-down arguments. + * + * @type int|bool $hide_empty Whether to hide terms not attached to any posts. Default 0|false. + * @type bool $hide_if_empty Whether to hide the drop-down if no terms exist. Default false. + * @type string $taxonomy The taxonomy slug. + * @type string $name Value of the name attribute to use for the drop-down select element. + * Default 'parent'. + * @type string $orderby The field to order by. Default 'name'. + * @type bool $hierarchical Whether the taxonomy is hierarchical. Default true. + * @type string $show_option_none Label to display if there are no terms. Default 'None'. + * } + * @param string $taxonomy The taxonomy slug. + */ + $dropdown_args = apply_filters( 'taxonomy_parent_dropdown_args', $dropdown_args, $taxonomy ); + wp_dropdown_categories( $dropdown_args ); + ?> + +

+ +
+ +
+ + +

+
+ +labels->add_new_item ); + +if ( 'category' == $taxonomy ) { + /** + * Fires at the end of the Edit Category form. + * + * @since 2.1.0 + * @deprecated 3.0.0 Use {$taxonomy}_add_form instead. + * + * @param object $arg Optional arguments cast to an object. + */ + do_action( 'edit_category_form', (object) array( 'parent' => 0 ) ); +} elseif ( 'link_category' == $taxonomy ) { + /** + * Fires at the end of the Edit Link form. + * + * @since 2.3.0 + * @deprecated 3.0.0 Use {$taxonomy}_add_form instead. + * + * @param object $arg Optional arguments cast to an object. + */ + do_action( 'edit_link_category_form', (object) array( 'parent' => 0 ) ); +} else { + /** + * Fires at the end of the Add Tag form. + * + * @since 2.7.0 + * @deprecated 3.0.0 Use {$taxonomy}_add_form instead. + * + * @param string $taxonomy The taxonomy slug. + */ + do_action( 'add_tag_form', $taxonomy ); +} + +/** + * Fires at the end of the Add Term form for all taxonomies. + * + * The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug. + * + * @since 3.0.0 + * + * @param string $taxonomy The taxonomy slug. + */ +do_action( "{$taxonomy}_add_form", $taxonomy ); +?> +
+ + +
+
+ +
+
+ +inline_edit(); ?> + +cap->edit_posts ) ) + wp_die( __( 'Cheatin’ uh?' ) ); + +$wp_list_table = _get_list_table('WP_Posts_List_Table'); +$pagenum = $wp_list_table->get_pagenum(); + +// Back-compat for viewing comments of an entry +foreach ( array( 'p', 'attachment_id', 'page_id' ) as $_redirect ) { + if ( ! empty( $_REQUEST[ $_redirect ] ) ) { + wp_redirect( admin_url( 'edit-comments.php?p=' . absint( $_REQUEST[ $_redirect ] ) ) ); + exit; + } +} +unset( $_redirect ); + +if ( 'post' != $post_type ) { + $parent_file = "edit.php?post_type=$post_type"; + $submenu_file = "edit.php?post_type=$post_type"; + $post_new_file = "post-new.php?post_type=$post_type"; +} else { + $parent_file = 'edit.php'; + $submenu_file = 'edit.php'; + $post_new_file = 'post-new.php'; +} + +$doaction = $wp_list_table->current_action(); + +if ( $doaction ) { + check_admin_referer('bulk-posts'); + + $sendback = remove_query_arg( array('trashed', 'untrashed', 'deleted', 'locked', 'ids'), wp_get_referer() ); + if ( ! $sendback ) + $sendback = admin_url( $parent_file ); + $sendback = add_query_arg( 'paged', $pagenum, $sendback ); + if ( strpos($sendback, 'post.php') !== false ) + $sendback = admin_url($post_new_file); + + if ( 'delete_all' == $doaction ) { + $post_status = preg_replace('/[^a-z0-9_-]+/i', '', $_REQUEST['post_status']); + if ( get_post_status_object($post_status) ) // Check the post status exists first + $post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type=%s AND post_status = %s", $post_type, $post_status ) ); + $doaction = 'delete'; + } elseif ( isset( $_REQUEST['media'] ) ) { + $post_ids = $_REQUEST['media']; + } elseif ( isset( $_REQUEST['ids'] ) ) { + $post_ids = explode( ',', $_REQUEST['ids'] ); + } elseif ( !empty( $_REQUEST['post'] ) ) { + $post_ids = array_map('intval', $_REQUEST['post']); + } + + if ( !isset( $post_ids ) ) { + wp_redirect( $sendback ); + exit; + } + + switch ( $doaction ) { + case 'trash': + $trashed = $locked = 0; + + foreach( (array) $post_ids as $post_id ) { + if ( !current_user_can( 'delete_post', $post_id) ) + wp_die( __('You are not allowed to move this item to the Trash.') ); + + if ( wp_check_post_lock( $post_id ) ) { + $locked++; + continue; + } + + if ( !wp_trash_post($post_id) ) + wp_die( __('Error in moving to Trash.') ); + + $trashed++; + } + + $sendback = add_query_arg( array('trashed' => $trashed, 'ids' => join(',', $post_ids), 'locked' => $locked ), $sendback ); + break; + case 'untrash': + $untrashed = 0; + foreach( (array) $post_ids as $post_id ) { + if ( !current_user_can( 'delete_post', $post_id) ) + wp_die( __('You are not allowed to restore this item from the Trash.') ); + + if ( !wp_untrash_post($post_id) ) + wp_die( __('Error in restoring from Trash.') ); + + $untrashed++; + } + $sendback = add_query_arg('untrashed', $untrashed, $sendback); + break; + case 'delete': + $deleted = 0; + foreach( (array) $post_ids as $post_id ) { + $post_del = get_post($post_id); + + if ( !current_user_can( 'delete_post', $post_id ) ) + wp_die( __('You are not allowed to delete this item.') ); + + if ( $post_del->post_type == 'attachment' ) { + if ( ! wp_delete_attachment($post_id) ) + wp_die( __('Error in deleting.') ); + } else { + if ( !wp_delete_post($post_id) ) + wp_die( __('Error in deleting.') ); + } + $deleted++; + } + $sendback = add_query_arg('deleted', $deleted, $sendback); + break; + case 'edit': + if ( isset($_REQUEST['bulk_edit']) ) { + $done = bulk_edit_posts($_REQUEST); + + if ( is_array($done) ) { + $done['updated'] = count( $done['updated'] ); + $done['skipped'] = count( $done['skipped'] ); + $done['locked'] = count( $done['locked'] ); + $sendback = add_query_arg( $done, $sendback ); + } + } + break; + } + + $sendback = 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(); +} elseif ( ! empty($_REQUEST['_wp_http_referer']) ) { + wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), wp_unslash($_SERVER['REQUEST_URI']) ) ); + exit; +} + +$wp_list_table->prepare_items(); + +wp_enqueue_script('inline-edit-post'); + +$title = $post_type_object->labels->name; + +if ( 'post' == $post_type ) { + get_current_screen()->add_help_tab( array( + 'id' => 'overview', + 'title' => __('Overview'), + 'content' => + '

' . __('This screen provides access to all of your posts. You can customize the display of this screen to suit your workflow.') . '

' + ) ); + get_current_screen()->add_help_tab( array( + 'id' => 'screen-content', + 'title' => __('Screen Content'), + 'content' => + '

' . __('You can customize the display of this screen’s contents in a number of ways:') . '

' . + '
    ' . + '
  • ' . __('You can hide/display columns based on your needs and decide how many posts to list per screen using the Screen Options tab.') . '
  • ' . + '
  • ' . __('You can filter the list of posts by post status using the text links in the upper left to show All, Published, Draft, or Trashed posts. The default view is to show all posts.') . '
  • ' . + '
  • ' . __('You can view posts in a simple title list or with an excerpt. Choose the view you prefer by clicking on the icons at the top of the list on the right.') . '
  • ' . + '
  • ' . __('You can refine the list to show only posts in a specific category or from a specific month by using the dropdown menus above the posts list. Click the Filter button after making your selection. You also can refine the list by clicking on the post author, category or tag in the posts list.') . '
  • ' . + '
' + ) ); + get_current_screen()->add_help_tab( array( + 'id' => 'action-links', + 'title' => __('Available Actions'), + 'content' => + '

' . __('Hovering over a row in the posts list will display action links that allow you to manage your post. You can perform the following actions:') . '

' . + '
    ' . + '
  • ' . __('Edit takes you to the editing screen for that post. You can also reach that screen by clicking on the post title.') . '
  • ' . + '
  • ' . __('Quick Edit provides inline access to the metadata of your post, allowing you to update post details without leaving this screen.') . '
  • ' . + '
  • ' . __('Trash removes your post from this list and places it in the trash, from which you can permanently delete it.') . '
  • ' . + '
  • ' . __('Preview will show you what your draft post will look like if you publish it. View will take you to your live site to view the post. Which link is available depends on your post’s status.') . '
  • ' . + '
' + ) ); + get_current_screen()->add_help_tab( array( + 'id' => 'bulk-actions', + 'title' => __('Bulk Actions'), + 'content' => + '

' . __('You can also edit or move multiple posts to the trash at once. Select the posts you want to act on using the checkboxes, then select the action you want to take from the Bulk Actions menu and click Apply.') . '

' . + '

' . __('When using Bulk Edit, you can change the metadata (categories, author, etc.) for all selected posts at once. To remove a post from the grouping, just click the x next to its name in the Bulk Edit area that appears.') . '

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

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

' . + '

' . __('Documentation on Managing Posts') . '

' . + '

' . __('Support Forums') . '

' + ); + +} elseif ( 'page' == $post_type ) { + get_current_screen()->add_help_tab( array( + 'id' => 'overview', + 'title' => __('Overview'), + 'content' => + '

' . __('Pages are similar to posts in that they have a title, body text, and associated metadata, but they are different in that they are not part of the chronological blog stream, kind of like permanent posts. Pages are not categorized or tagged, but can have a hierarchy. You can nest pages under other pages by making one the “Parent” of the other, creating a group of pages.') . '

' + ) ); + get_current_screen()->add_help_tab( array( + 'id' => 'managing-pages', + 'title' => __('Managing Pages'), + 'content' => + '

' . __('Managing pages is very similar to managing posts, and the screens can be customized in the same way.') . '

' . + '

' . __('You can also perform the same types of actions, including narrowing the list by using the filters, acting on a page using the action links that appear when you hover over a row, or using the Bulk Actions menu to edit the metadata for multiple pages at once.') . '

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

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

' . + '

' . __('Documentation on Managing Pages') . '

' . + '

' . __('Support Forums') . '

' + ); +} + +add_screen_option( 'per_page', array( 'label' => $title, 'default' => 20, 'option' => 'edit_' . $post_type . '_per_page' ) ); + +$bulk_counts = array( + 'updated' => isset( $_REQUEST['updated'] ) ? absint( $_REQUEST['updated'] ) : 0, + 'locked' => isset( $_REQUEST['locked'] ) ? absint( $_REQUEST['locked'] ) : 0, + 'deleted' => isset( $_REQUEST['deleted'] ) ? absint( $_REQUEST['deleted'] ) : 0, + 'trashed' => isset( $_REQUEST['trashed'] ) ? absint( $_REQUEST['trashed'] ) : 0, + 'untrashed' => isset( $_REQUEST['untrashed'] ) ? absint( $_REQUEST['untrashed'] ) : 0, +); + +$bulk_messages = array(); +$bulk_messages['post'] = array( + 'updated' => _n( '%s post updated.', '%s posts updated.', $bulk_counts['updated'] ), + 'locked' => _n( '%s post not updated, somebody is editing it.', '%s posts not updated, somebody is editing them.', $bulk_counts['locked'] ), + 'deleted' => _n( '%s post permanently deleted.', '%s posts permanently deleted.', $bulk_counts['deleted'] ), + 'trashed' => _n( '%s post moved to the Trash.', '%s posts moved to the Trash.', $bulk_counts['trashed'] ), + 'untrashed' => _n( '%s post restored from the Trash.', '%s posts restored from the Trash.', $bulk_counts['untrashed'] ), +); +$bulk_messages['page'] = array( + 'updated' => _n( '%s page updated.', '%s pages updated.', $bulk_counts['updated'] ), + 'locked' => _n( '%s page not updated, somebody is editing it.', '%s pages not updated, somebody is editing them.', $bulk_counts['locked'] ), + 'deleted' => _n( '%s page permanently deleted.', '%s pages permanently deleted.', $bulk_counts['deleted'] ), + 'trashed' => _n( '%s page moved to the Trash.', '%s pages moved to the Trash.', $bulk_counts['trashed'] ), + 'untrashed' => _n( '%s page restored from the Trash.', '%s pages restored from the Trash.', $bulk_counts['untrashed'] ), +); + +/** + * Filter the bulk action updated messages. + * + * By default, custom post types use the messages for the 'post' post type. + * + * @since 3.7.0 + * + * @param array $bulk_messages Arrays of messages, each keyed by the corresponding post type. Messages are + * keyed with 'updated', 'locked', 'deleted', 'trashed', and 'untrashed'. + * @param array $bulk_counts Array of item counts for each message, used to build internationalized strings. + */ +$bulk_messages = apply_filters( 'bulk_post_updated_messages', $bulk_messages, $bulk_counts ); +$bulk_counts = array_filter( $bulk_counts ); + +require_once( ABSPATH . 'wp-admin/admin-header.php' ); +?> +
+

labels->name ); +if ( current_user_can( $post_type_object->cap->create_posts ) ) + echo ' ' . esc_html( $post_type_object->labels->add_new ) . ''; +if ( ! empty( $_REQUEST['s'] ) ) + printf( ' ' . __('Search results for “%s”') . '', get_search_query() ); +?>

+ + $count ) { + if ( isset( $bulk_messages[ $post_type ][ $message ] ) ) + $messages[] = sprintf( $bulk_messages[ $post_type ][ $message ], number_format_i18n( $count ) ); + elseif ( isset( $bulk_messages['post'][ $message ] ) ) + $messages[] = sprintf( $bulk_messages['post'][ $message ], number_format_i18n( $count ) ); + + if ( $message == 'trashed' && isset( $_REQUEST['ids'] ) ) { + $ids = preg_replace( '/[^0-9,]/', '', $_REQUEST['ids'] ); + $messages[] = '' . __('Undo') . ''; + } +} + +if ( $messages ) + echo '

' . join( ' ', $messages ) . '

'; +unset( $messages ); + +$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'locked', 'skipped', 'updated', 'deleted', 'trashed', 'untrashed' ), $_SERVER['REQUEST_URI'] ); +?> + +views(); ?> + +
+ +search_box( $post_type_object->labels->search_items, 'post' ); ?> + + + + + + + +display(); ?> + +
+ +has_items() ) + $wp_list_table->inline_edit(); +?> + +
+
+
+ + + +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.') . '

' . + '

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

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

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

' . + '

' . __('Documentation on Export') . '

' . + '

' . __('Support Forums') . '

' +); + +if ( isset( $_GET['download'] ) ) { + $args = array(); + + if ( ! isset( $_GET['content'] ) || 'all' == $_GET['content'] ) { + $args['content'] = 'all'; + } else if ( 'posts' == $_GET['content'] ) { + $args['content'] = 'post'; + + if ( $_GET['cat'] ) + $args['category'] = (int) $_GET['cat']; + + if ( $_GET['post_author'] ) + $args['author'] = (int) $_GET['post_author']; + + if ( $_GET['post_start_date'] || $_GET['post_end_date'] ) { + $args['start_date'] = $_GET['post_start_date']; + $args['end_date'] = $_GET['post_end_date']; + } + + if ( $_GET['post_status'] ) + $args['status'] = $_GET['post_status']; + } else if ( 'pages' == $_GET['content'] ) { + $args['content'] = 'page'; + + if ( $_GET['page_author'] ) + $args['author'] = (int) $_GET['page_author']; + + if ( $_GET['page_start_date'] || $_GET['page_end_date'] ) { + $args['start_date'] = $_GET['page_start_date']; + $args['end_date'] = $_GET['page_end_date']; + } + + if ( $_GET['page_status'] ) + $args['status'] = $_GET['page_status']; + } else { + $args['content'] = $_GET['content']; + } + + /** + * Filter the export args. + * + * @since 3.5.0 + * + * @param array $args The arguments to send to the exporter. + */ + $args = apply_filters( 'export_args', $args ); + + export_wp( $args ); + die(); +} + +require_once( ABSPATH . 'wp-admin/admin-header.php' ); + +/** + * Create the date options fields for exporting a given post type. + * + * @global wpdb $wpdb WordPress database object. + * @global WP_Locale $wp_locale Date and Time Locale object. + * + * @since 3.1.0 + * + * @param string $post_type The post type. Default 'post'. + */ +function export_date_options( $post_type = 'post' ) { + global $wpdb, $wp_locale; + + $months = $wpdb->get_results( $wpdb->prepare( " + SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month + FROM $wpdb->posts + 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 ) ) + return; + + foreach ( $months as $date ) { + if ( 0 == $date->year ) + continue; + + $month = zeroise( $date->month, 2 ); + echo ''; + } +} +?> + +
+

+ +

+

+

+ +

+
+ +

+

+ +

+
    +
  • + + __('All') ) ); ?> +
  • +
  • + +get_col( "SELECT DISTINCT post_author FROM {$wpdb->posts} WHERE post_type = 'post'" ); + wp_dropdown_users( array( 'include' => $authors, 'name' => 'post_author', 'multi' => true, 'show_option_all' => __('All') ) ); +?> +
  • +
  • + + + +
  • +
  • + + +
  • +
+ +

+
    +
  • + +get_col( "SELECT DISTINCT post_author FROM {$wpdb->posts} WHERE post_type = 'page'" ); + wp_dropdown_users( array( 'include' => $authors, 'name' => 'page_author', 'multi' => true, 'show_option_all' => __('All') ) ); +?> +
  • +
  • + + + +
  • +
  • + + +
  • +
+ + false, 'can_export' => true ), 'objects' ) as $post_type ) : ?> +

+ + + + + +
+
+ + diff --git a/wp-admin/freedoms.php b/wp-admin/freedoms.php new file mode 100644 index 0000000..2bc7a8d --- /dev/null +++ b/wp-admin/freedoms.php @@ -0,0 +1,57 @@ + +
+ +

+ +
+ +
+ + + +

license, the GPL.' ), 'https://wordpress.org/about/license/' ); ?>

+ +
    +
  1. +
  2. +
  3. +
  4. +
+ +

check out our trademark guidelines first.' ), 'http://wordpressfoundation.org/trademark-policy/' ); ?>

+ +

plugins and themes there. If you get a plugin or theme from another source, make sure to ask them if it’s GPL first. If they don’t respect the WordPress license, we don’t recommend them.' ), $plugins_url, $themes_url, 'https://wordpress.org/about/license/' ); ?>

+ +

Free Software Foundation.' ); ?>

+ +
+ diff --git a/wp-admin/images/align-center-2x.png b/wp-admin/images/align-center-2x.png new file mode 100644 index 0000000..0b62734 Binary files /dev/null and b/wp-admin/images/align-center-2x.png differ diff --git a/wp-admin/images/align-center.png b/wp-admin/images/align-center.png new file mode 100644 index 0000000..e7bc807 Binary files /dev/null and b/wp-admin/images/align-center.png differ diff --git a/wp-admin/images/align-left-2x.png b/wp-admin/images/align-left-2x.png new file mode 100644 index 0000000..1b2d428 Binary files /dev/null and b/wp-admin/images/align-left-2x.png differ diff --git a/wp-admin/images/align-left.png b/wp-admin/images/align-left.png new file mode 100644 index 0000000..b438f7e Binary files /dev/null and b/wp-admin/images/align-left.png differ diff --git a/wp-admin/images/align-none-2x.png b/wp-admin/images/align-none-2x.png new file mode 100644 index 0000000..a64a0be Binary files /dev/null and b/wp-admin/images/align-none-2x.png differ diff --git a/wp-admin/images/align-none.png b/wp-admin/images/align-none.png new file mode 100644 index 0000000..b72df64 Binary files /dev/null and b/wp-admin/images/align-none.png differ diff --git a/wp-admin/images/align-right-2x.png b/wp-admin/images/align-right-2x.png new file mode 100644 index 0000000..0131505 Binary files /dev/null and b/wp-admin/images/align-right-2x.png differ diff --git a/wp-admin/images/align-right.png b/wp-admin/images/align-right.png new file mode 100644 index 0000000..86a1b2e Binary files /dev/null and b/wp-admin/images/align-right.png differ diff --git a/wp-admin/images/arrows-2x.png b/wp-admin/images/arrows-2x.png new file mode 100644 index 0000000..0b0c53d Binary files /dev/null and b/wp-admin/images/arrows-2x.png differ diff --git a/wp-admin/images/arrows.png b/wp-admin/images/arrows.png new file mode 100644 index 0000000..9e4a96c Binary files /dev/null and b/wp-admin/images/arrows.png differ diff --git a/wp-admin/images/bubble_bg-2x.gif b/wp-admin/images/bubble_bg-2x.gif new file mode 100644 index 0000000..77ac312 Binary files /dev/null and b/wp-admin/images/bubble_bg-2x.gif differ diff --git a/wp-admin/images/bubble_bg.gif b/wp-admin/images/bubble_bg.gif new file mode 100644 index 0000000..f4535c9 Binary files /dev/null and b/wp-admin/images/bubble_bg.gif differ diff --git a/wp-admin/images/comment-grey-bubble-2x.png b/wp-admin/images/comment-grey-bubble-2x.png new file mode 100644 index 0000000..0eec4a6 Binary files /dev/null and b/wp-admin/images/comment-grey-bubble-2x.png differ diff --git a/wp-admin/images/comment-grey-bubble.png b/wp-admin/images/comment-grey-bubble.png new file mode 100644 index 0000000..558ee8f Binary files /dev/null and b/wp-admin/images/comment-grey-bubble.png differ diff --git a/wp-admin/images/date-button-2x.gif b/wp-admin/images/date-button-2x.gif new file mode 100644 index 0000000..53cc417 Binary files /dev/null and b/wp-admin/images/date-button-2x.gif differ diff --git a/wp-admin/images/date-button.gif b/wp-admin/images/date-button.gif new file mode 100644 index 0000000..dc40633 Binary files /dev/null and b/wp-admin/images/date-button.gif differ diff --git a/wp-admin/images/generic.png b/wp-admin/images/generic.png new file mode 100644 index 0000000..00575a0 Binary files /dev/null and b/wp-admin/images/generic.png differ diff --git a/wp-admin/images/icons32-2x.png b/wp-admin/images/icons32-2x.png new file mode 100644 index 0000000..67893fe 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 0000000..512aea8 Binary files /dev/null and b/wp-admin/images/icons32-vs-2x.png differ diff --git a/wp-admin/images/icons32-vs.png b/wp-admin/images/icons32-vs.png new file mode 100644 index 0000000..c967844 Binary files /dev/null and b/wp-admin/images/icons32-vs.png differ diff --git a/wp-admin/images/icons32.png b/wp-admin/images/icons32.png new file mode 100644 index 0000000..af061c1 Binary files /dev/null and b/wp-admin/images/icons32.png differ diff --git a/wp-admin/images/imgedit-icons-2x.png b/wp-admin/images/imgedit-icons-2x.png new file mode 100644 index 0000000..814da5e Binary files /dev/null and b/wp-admin/images/imgedit-icons-2x.png differ diff --git a/wp-admin/images/imgedit-icons.png b/wp-admin/images/imgedit-icons.png new file mode 100644 index 0000000..ca0b88d Binary files /dev/null and b/wp-admin/images/imgedit-icons.png differ diff --git a/wp-admin/images/list-2x.png b/wp-admin/images/list-2x.png new file mode 100644 index 0000000..05c6eb3 Binary files /dev/null and b/wp-admin/images/list-2x.png differ diff --git a/wp-admin/images/list.png b/wp-admin/images/list.png new file mode 100644 index 0000000..85d1295 Binary files /dev/null and b/wp-admin/images/list.png differ diff --git a/wp-admin/images/loading.gif b/wp-admin/images/loading.gif new file mode 100644 index 0000000..7df3368 Binary files /dev/null and b/wp-admin/images/loading.gif differ diff --git a/wp-admin/images/marker.png b/wp-admin/images/marker.png new file mode 100644 index 0000000..30313b8 Binary files /dev/null and b/wp-admin/images/marker.png differ diff --git a/wp-admin/images/mask.png b/wp-admin/images/mask.png new file mode 100644 index 0000000..0fc9cbe Binary files /dev/null and b/wp-admin/images/mask.png differ diff --git a/wp-admin/images/media-button-2x.png b/wp-admin/images/media-button-2x.png new file mode 100644 index 0000000..b8f8ed4 Binary files /dev/null and b/wp-admin/images/media-button-2x.png differ diff --git a/wp-admin/images/media-button-image.gif b/wp-admin/images/media-button-image.gif new file mode 100644 index 0000000..d3db580 Binary files /dev/null and b/wp-admin/images/media-button-image.gif differ diff --git a/wp-admin/images/media-button-music.gif b/wp-admin/images/media-button-music.gif new file mode 100644 index 0000000..c9795b3 Binary files /dev/null and b/wp-admin/images/media-button-music.gif differ diff --git a/wp-admin/images/media-button-other.gif b/wp-admin/images/media-button-other.gif new file mode 100644 index 0000000..86b9777 Binary files /dev/null and b/wp-admin/images/media-button-other.gif differ diff --git a/wp-admin/images/media-button-video.gif b/wp-admin/images/media-button-video.gif new file mode 100644 index 0000000..15fe0a4 Binary files /dev/null and b/wp-admin/images/media-button-video.gif differ diff --git a/wp-admin/images/media-button.png b/wp-admin/images/media-button.png new file mode 100644 index 0000000..752ee45 Binary files /dev/null and b/wp-admin/images/media-button.png differ diff --git a/wp-admin/images/menu-2x.png b/wp-admin/images/menu-2x.png new file mode 100644 index 0000000..0038190 Binary files /dev/null and b/wp-admin/images/menu-2x.png differ diff --git a/wp-admin/images/menu-vs-2x.png b/wp-admin/images/menu-vs-2x.png new file mode 100644 index 0000000..17309fc Binary files /dev/null and b/wp-admin/images/menu-vs-2x.png differ diff --git a/wp-admin/images/menu-vs.png b/wp-admin/images/menu-vs.png new file mode 100644 index 0000000..afdb3d3 Binary files /dev/null and b/wp-admin/images/menu-vs.png differ diff --git a/wp-admin/images/menu.png b/wp-admin/images/menu.png new file mode 100644 index 0000000..52189c2 Binary files /dev/null and b/wp-admin/images/menu.png differ diff --git a/wp-admin/images/no.png b/wp-admin/images/no.png new file mode 100644 index 0000000..59c35bd Binary files /dev/null and b/wp-admin/images/no.png differ diff --git a/wp-admin/images/post-formats-vs.png b/wp-admin/images/post-formats-vs.png new file mode 100644 index 0000000..c8e7e8d Binary files /dev/null and b/wp-admin/images/post-formats-vs.png differ diff --git a/wp-admin/images/post-formats.png b/wp-admin/images/post-formats.png new file mode 100644 index 0000000..cae309e Binary files /dev/null and b/wp-admin/images/post-formats.png differ diff --git a/wp-admin/images/post-formats32-vs.png b/wp-admin/images/post-formats32-vs.png new file mode 100644 index 0000000..af2c59f Binary files /dev/null and b/wp-admin/images/post-formats32-vs.png differ diff --git a/wp-admin/images/post-formats32.png b/wp-admin/images/post-formats32.png new file mode 100644 index 0000000..ccafc80 Binary files /dev/null and b/wp-admin/images/post-formats32.png differ diff --git a/wp-admin/images/resize-2x.gif b/wp-admin/images/resize-2x.gif new file mode 100644 index 0000000..315ea06 Binary files /dev/null and b/wp-admin/images/resize-2x.gif differ diff --git a/wp-admin/images/resize-rtl-2x.gif b/wp-admin/images/resize-rtl-2x.gif new file mode 100644 index 0000000..a379ad4 Binary files /dev/null and b/wp-admin/images/resize-rtl-2x.gif differ diff --git a/wp-admin/images/resize-rtl.gif b/wp-admin/images/resize-rtl.gif new file mode 100644 index 0000000..329f93d Binary files /dev/null and b/wp-admin/images/resize-rtl.gif differ diff --git a/wp-admin/images/resize.gif b/wp-admin/images/resize.gif new file mode 100644 index 0000000..4bff03d Binary files /dev/null and b/wp-admin/images/resize.gif differ diff --git a/wp-admin/images/se.png b/wp-admin/images/se.png new file mode 100644 index 0000000..eb487b4 Binary files /dev/null and b/wp-admin/images/se.png differ diff --git a/wp-admin/images/sort-2x.gif b/wp-admin/images/sort-2x.gif new file mode 100644 index 0000000..1362f43 Binary files /dev/null and b/wp-admin/images/sort-2x.gif differ diff --git a/wp-admin/images/sort.gif b/wp-admin/images/sort.gif new file mode 100644 index 0000000..70b4bf9 Binary files /dev/null and b/wp-admin/images/sort.gif differ diff --git a/wp-admin/images/spinner-2x.gif b/wp-admin/images/spinner-2x.gif new file mode 100644 index 0000000..9593f3d Binary files /dev/null and b/wp-admin/images/spinner-2x.gif differ diff --git a/wp-admin/images/spinner.gif b/wp-admin/images/spinner.gif new file mode 100644 index 0000000..c15632f Binary files /dev/null and b/wp-admin/images/spinner.gif differ diff --git a/wp-admin/images/stars-2x.png b/wp-admin/images/stars-2x.png new file mode 100644 index 0000000..15aa9de Binary files /dev/null and b/wp-admin/images/stars-2x.png differ diff --git a/wp-admin/images/stars.png b/wp-admin/images/stars.png new file mode 100644 index 0000000..c01ada1 Binary files /dev/null and b/wp-admin/images/stars.png differ diff --git a/wp-admin/images/w-logo-blue.png b/wp-admin/images/w-logo-blue.png new file mode 100644 index 0000000..11e550c Binary files /dev/null and b/wp-admin/images/w-logo-blue.png differ diff --git a/wp-admin/images/w-logo-white.png b/wp-admin/images/w-logo-white.png new file mode 100644 index 0000000..bb70f57 Binary files /dev/null and b/wp-admin/images/w-logo-white.png differ diff --git a/wp-admin/images/wheel.png b/wp-admin/images/wheel.png new file mode 100644 index 0000000..7e53103 Binary files /dev/null and b/wp-admin/images/wheel.png differ diff --git a/wp-admin/images/wordpress-logo-white.svg b/wp-admin/images/wordpress-logo-white.svg new file mode 100644 index 0000000..c0d0ba9 --- /dev/null +++ b/wp-admin/images/wordpress-logo-white.svg @@ -0,0 +1 @@ + diff --git a/wp-admin/images/wordpress-logo.png b/wp-admin/images/wordpress-logo.png new file mode 100644 index 0000000..63b0379 Binary files /dev/null and b/wp-admin/images/wordpress-logo.png differ diff --git a/wp-admin/images/wordpress-logo.svg b/wp-admin/images/wordpress-logo.svg new file mode 100644 index 0000000..da5e5df --- /dev/null +++ b/wp-admin/images/wordpress-logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/wp-admin/images/wpspin_light-2x.gif b/wp-admin/images/wpspin_light-2x.gif new file mode 100644 index 0000000..fe2d5c0 Binary files /dev/null and b/wp-admin/images/wpspin_light-2x.gif differ diff --git a/wp-admin/images/wpspin_light.gif b/wp-admin/images/wpspin_light.gif new file mode 100644 index 0000000..7f71727 Binary files /dev/null and b/wp-admin/images/wpspin_light.gif differ diff --git a/wp-admin/images/xit-2x.gif b/wp-admin/images/xit-2x.gif new file mode 100644 index 0000000..b5ce86b Binary files /dev/null and b/wp-admin/images/xit-2x.gif differ diff --git a/wp-admin/images/xit.gif b/wp-admin/images/xit.gif new file mode 100644 index 0000000..64cb854 Binary files /dev/null and b/wp-admin/images/xit.gif differ diff --git a/wp-admin/images/yes.png b/wp-admin/images/yes.png new file mode 100644 index 0000000..fbb3983 Binary files /dev/null and b/wp-admin/images/yes.png differ diff --git a/wp-admin/import.php b/wp-admin/import.php new file mode 100644 index 0000000..e6f05e0 --- /dev/null +++ b/wp-admin/import.php @@ -0,0 +1,132 @@ +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.') . '

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

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

' . + '

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

' . + '

' . __('Support Forums') . '

' +); + +if ( current_user_can( 'install_plugins' ) ) + $popular_importers = wp_get_popular_importers(); +else + $popular_importers = array(); + +// Detect and redirect invalid importers like 'movabletype', which is registered as 'mt' +if ( ! empty( $_GET['invalid'] ) && isset( $popular_importers[ $_GET['invalid'] ] ) ) { + $importer_id = $popular_importers[ $_GET['invalid'] ]['importer-id']; + if ( $importer_id != $_GET['invalid'] ) { // Prevent redirect loops. + wp_redirect( admin_url( 'admin.php?import=' . $importer_id ) ); + exit; + } + unset( $importer_id ); +} + +add_thickbox(); +wp_enqueue_script( 'plugin-install' ); + +require_once( ABSPATH . 'wp-admin/admin-header.php' ); +$parent_file = 'tools.php'; +?> + +
+

+ +

%s importer is invalid or is not installed.'), esc_html( $_GET['invalid'] ) ); ?>

+ +

+ + $pop_data ) { + if ( isset( $importers[ $pop_importer ] ) ) + continue; + if ( isset( $importers[ $pop_data['importer-id'] ] ) ) + continue; + $importers[ $pop_data['importer-id'] ] = array( $pop_data['name'], $pop_data['description'], 'install' => $pop_data['plugin-slug'] ); +} + +if ( empty( $importers ) ) { + echo '

' . __('No importers are available.') . '

'; // TODO: make more helpful +} else { + uasort( $importers, '_usort_by_first_member' ); +?> + + + $data) { + $action = ''; + if ( isset( $data['install'] ) ) { + $plugin_slug = $data['install']; + if ( file_exists( WP_PLUGIN_DIR . '/' . $plugin_slug ) ) { + // Looks like Importer is installed, But not active + $plugins = get_plugins( '/' . $plugin_slug ); + if ( !empty($plugins) ) { + $keys = array_keys($plugins); + $plugin_file = $plugin_slug . '/' . $keys[0]; + $action = '' . $data[0] . ''; + } + } + if ( empty($action) ) { + if ( is_main_site() ) { + $action = '' . $data[0] . ''; + } else { + $action = $data[0]; + $data[1] = sprintf( __( 'This importer is not installed. Please install importers from the main site.' ), get_admin_url( $current_site->blog_id, 'import.php' ) ); + } + } + } else { + $action = "{$data[0]}"; + } + + $alt = $alt ? '' : ' class="alternate"'; + echo " + + + + "; + } +?> + +
$action{$data[1]}
+' . sprintf( __('If the importer you need is not listed, search the plugin directory to see if an importer is available.'), esc_url( network_admin_url( 'plugin-install.php?tab=search&type=tag&s=importer' ) ) ) . '

'; +?> + +
+ +id and the JS global 'pagenow' + if ( ! empty($_POST['screen_id']) ) + $screen_id = sanitize_key($_POST['screen_id']); + else + $screen_id = 'front'; + + if ( ! empty($_POST['data']) ) { + $data = wp_unslash( (array) $_POST['data'] ); + + /** + * Filter Heartbeat AJAX response in no-privilege environments. + * + * @since 3.6.0 + * + * @param array|object $response The no-priv Heartbeat response object or array. + * @param array $data An array of data passed via $_POST. + * @param string $screen_id The screen id. + */ + $response = apply_filters( 'heartbeat_nopriv_received', $response, $data, $screen_id ); + } + + /** + * Filter Heartbeat AJAX response when no data is passed. + * + * @since 3.6.0 + * + * @param array|object $response The Heartbeat response object or array. + * @param string $screen_id The screen id. + */ + $response = apply_filters( 'heartbeat_nopriv_send', $response, $screen_id ); + + /** + * Fires when Heartbeat ticks in no-privilege environments. + * + * Allows the transport to be easily replaced with long-polling. + * + * @since 3.6.0 + * + * @param array|object $response The no-priv Heartbeat response. + * @param string $screen_id The screen id. + */ + do_action( 'heartbeat_nopriv_tick', $response, $screen_id ); + + // send the current time according to the server + $response['server_time'] = time(); + + wp_send_json($response); +} + +/* + * GET-based Ajax handlers. + */ +function wp_ajax_fetch_list() { + global $wp_list_table; + + $list_class = $_GET['list_args']['class']; + check_ajax_referer( "fetch-list-$list_class", '_ajax_fetch_list_nonce' ); + + $wp_list_table = _get_list_table( $list_class, array( 'screen' => $_GET['list_args']['screen']['id'] ) ); + 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 = wp_unslash( $_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 = get_terms( $taxonomy, array( 'name__like' => $s, 'fields' => 'names', 'hide_empty' => false ) ); + + 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 ); + + /** This filter is documented in wp-admin/user-new.php */ + if ( ! is_super_admin() && ! apply_filters( 'autocomplete_users_for_site_admins', false ) ) + wp_die( -1 ); + + $return = array(); + + // Check the type of request + // Current allowed values are `add` and `search` + if ( isset( $_REQUEST['autocomplete_type'] ) && 'search' === $_REQUEST['autocomplete_type'] ) { + $type = $_REQUEST['autocomplete_type']; + } else { + $type = 'add'; + } + + // Check the desired field for value + // Current allowed values are `user_email` and `user_login` + if ( isset( $_REQUEST['autocomplete_field'] ) && 'user_email' === $_REQUEST['autocomplete_field'] ) { + $field = $_REQUEST['autocomplete_field']; + } else { + $field = 'user_login'; + } + + // 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->$field, + ); + } + + wp_die( json_encode( $return ) ); +} + +function wp_ajax_dashboard_widgets() { + require_once ABSPATH . 'wp-admin/includes/dashboard.php'; + + $pagenow = $_GET['pagenow']; + if ( $pagenow === 'dashboard-user' || $pagenow === 'dashboard-network' || $pagenow === 'dashboard' ) { + set_current_screen( $pagenow ); + } + + switch ( $_GET['widget'] ) { + case 'dashboard_primary' : + wp_dashboard_primary(); + 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.0 + * + * @param int $comment_id + * @return die + */ +function _wp_ajax_delete_comment_response( $comment_id, $delta = -1 ) { + $total = isset( $_POST['_total'] ) ? (int) $_POST['_total'] : 0; + $per_page = isset( $_POST['_per_page'] ) ? (int) $_POST['_per_page'] : 0; + $page = isset( $_POST['_page'] ) ? (int) $_POST['_page'] : 0; + $url = isset( $_POST['_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_post( $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 ( isset( $_POST['new'] ) && $_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(',', wp_unslash( $_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( $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(); + } + + $wp_list_table = _get_list_table( 'WP_Terms_List_Table', array( 'screen' => $_POST['screen'] ) ); + + $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( $tax->labels->not_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 ); + + if ( empty( $post_id ) && ! empty( $_REQUEST['p'] ) ) { + $id = absint( $_REQUEST['p'] ); + if ( ! empty( $id ) ) + $post_id = $id; + } + + if ( empty( $post_id ) ) + wp_die( -1 ); + + $wp_list_table = _get_list_table( 'WP_Post_Comments_List_Table', array( 'screen' => 'edit-comments' ) ); + + 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' ); + + $comment_post_ID = (int) $_POST['comment_post_ID']; + $post = get_post( $comment_post_ID ); + if ( ! $post ) + wp_die( -1 ); + + if ( !current_user_can( 'edit_post', $comment_post_ID ) ) + wp_die( -1 ); + + if ( empty( $post->post_status ) ) + wp_die( 1 ); + elseif ( in_array($post->post_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 = wp_slash( $user->display_name ); + $comment_author_email = wp_slash( $user->user_email ); + $comment_author_url = wp_slash( $user->user_url ); + $comment_content = trim($_POST['content']); + if ( current_user_can( 'unfiltered_html' ) ) { + if ( ! isset( $_POST['_wp_unfiltered_html_comment'] ) ) + $_POST['_wp_unfiltered_html_comment'] = ''; + + 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 = 0; + if ( isset( $_POST['comment_ID'] ) ) + $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'); + + // 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; + } + } + + $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'; + + ob_start(); + if ( isset( $_REQUEST['mode'] ) && 'dashboard' == $_REQUEST['mode'] ) { + require_once( ABSPATH . 'wp-admin/includes/dashboard.php' ); + _wp_dashboard_recent_comments_row( $comment ); + } else { + if ( isset( $_REQUEST['mode'] ) && 'single' == $_REQUEST['mode'] ) { + $wp_list_table = _get_list_table('WP_Post_Comments_List_Table', array( 'screen' => 'edit-comments' ) ); + } else { + $wp_list_table = _get_list_table('WP_Comments_List_Table', array( 'screen' => 'edit-comments' ) ); + } + $wp_list_table->single_row( $comment ); + } + $comment_list_item = ob_get_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' ); + + $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.' ) ); + + if ( isset( $_POST['status'] ) ) + $_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', array( 'screen' => 'edit-comments' ) ); + + $comment = get_comment( $comment_id ); + if ( empty( $comment->comment_ID ) ) + wp_die( -1 ); + + ob_start(); + $wp_list_table->single_row( $comment ); + $comment_list_item = ob_get_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; + } + } + + /** + * Filter the Walker class used when adding nav menu items. + * + * @since 3.4.0 + * + * @param string $class The walker class to use. Default 'Walker_Nav_Menu_Edit'. + * @param int $menu_id The menu id, derived from $_POST['menu']. + */ + $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 ); + } + wp_die(); +} + +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 %1$s at %2$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 = wp_unslash( $_POST['meta'][$mid]['key'] ); + $value = wp_unslash( $_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 = get_userdata( $user_id ); + + $wp_list_table = _get_list_table('WP_Users_List_Table'); + + $role = current( $user_object->roles ); + + $x = new WP_Ajax_Response( array( + 'what' => 'user', + 'id' => $user_id, + 'data' => $wp_list_table->single_row( $user_object, '', $role ), + 'supplemental' => array( + 'show-link' => sprintf(__( 'User %s added' ), "user-$user_id", $user_object->user_login), + 'role' => $role, + ) + ) ); + $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']] ) ) { + $menus_meta_box_object = $items[ $_POST['item-object'] ]; + /** + * Filter a nav menu meta box object. + * + * @since 3.0.0 + * + * @param object $menus_meta_box_object A nav menu meta box object, such as Page, + * Post, Category, Tag, etc. + */ + $item = apply_filters( 'nav_menu_meta_box_object', $menus_meta_box_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'] = wp_unslash( $_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.' ) ); + } + + 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 = wp_slash($post); //since it is from db + + $data['content'] = $post['post_content']; + $data['excerpt'] = $post['post_excerpt']; + + // rename + $data['user_ID'] = get_current_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'; + + // Hack: wp_unique_post_slug() doesn't work for drafts, so we will fake that our post is published. + if ( ! empty( $data['post_name'] ) && in_array( $post['post_status'], array( 'draft', 'pending' ) ) ) { + $post['post_status'] = 'publish'; + $data['post_name'] = wp_unique_post_slug( $data['post_name'], $post['ID'], $post['post_status'], $post['post_type'], $post['post_parent'] ); + } + + // update the post + edit_post(); + + $wp_list_table = _get_list_table( 'WP_Posts_List_Table', array( 'screen' => $_POST['screen'] ) ); + + $mode = $_POST['post_view']; + + $level = 0; + $request_post = array( get_post( $_POST['post_ID'] ) ); + $parent = $request_post[0]->post_parent; + + while ( $parent > 0 ) { + $parent_post = get_post( $parent ); + $parent = $parent_post->post_parent; + $level++; + } + + $wp_list_table->display_rows( array( get_post( $_POST['post_ID'] ) ), $level ); + + 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 ); + + $wp_list_table = _get_list_table( 'WP_Terms_List_Table', array( 'screen' => 'edit-' . $taxonomy ) ); + + 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.' ) ); + } + } else { + if ( is_wp_error($updated) && $updated->get_error_message() ) + wp_die( $updated->get_error_message() ); + wp_die( __( 'Item not updated.' ) ); + } + $level = 0; + $parent = $tag->parent; + while ( $parent > 0 ) { + $parent_tag = get_term( $parent, $taxonomy ); + $parent = $parent_tag->parent; + $level++; + } + $wp_list_table->single_row( $tag, $level ); + wp_die(); +} + +function wp_ajax_find_posts() { + global $wpdb; + + check_ajax_referer( 'find-posts' ); + + $post_types = get_post_types( array( 'public' => true ), 'objects' ); + unset( $post_types['attachment'] ); + + $s = wp_unslash( $_POST['ps'] ); + $searchand = $search = ''; + $args = array( + 'post_type' => array_keys( $post_types ), + 'post_status' => 'any', + 'posts_per_page' => 50, + ); + if ( '' !== $s ) + $args['s'] = $s; + + $posts = get_posts( $args ); + + if ( ! $posts ) + wp_die( __('No items found.') ); + + $html = ''; + $alt = ''; + foreach ( $posts as $post ) { + $title = trim( $post->post_title ) ? $post->post_title : __( '(no title)' ); + $alt = ( 'alternate' == $alt ) ? '' : 'alternate'; + + 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').''.__('Type').''.__('Date').''.__('Status').'
' . esc_html( $post_types[$post->post_type]->labels->singular_name ) . ''.esc_html( $time ) . '' . esc_html( $stat ). '
'; + + wp_send_json_success( $html ); +} + +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'] ); + + /** + * Fires early when editing the widgets displayed in sidebars. + * + * @since 2.8.0 + */ + do_action( 'load-widgets.php' ); + + /** + * Fires early when editing the widgets displayed in sidebars. + * + * @since 2.8.0 + */ + do_action( 'widgets.php' ); + + /** This action is documented in wp-admin/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_update_widget() { + global $wp_customize; + $wp_customize->widgets->wp_ajax_update_widget(); +} + +function wp_ajax_upload_attachment() { + check_ajax_referer( 'media-form' ); + + if ( ! current_user_can( 'upload_files' ) ) + wp_die(); + + if ( isset( $_REQUEST['post_id'] ) ) { + $post_id = $_REQUEST['post_id']; + if ( ! current_user_can( 'edit_post', $post_id ) ) + wp_die(); + } else { + $post_id = null; + } + + $post_data = isset( $_REQUEST['post_data'] ) ? $_REQUEST['post_data'] : array(); + + // If the context is custom header or background, make sure the uploaded file is an image. + if ( isset( $post_data['context'] ) && in_array( $post_data['context'], array( 'custom-header', 'custom-background' ) ) ) { + $wp_filetype = wp_check_filetype_and_ext( $_FILES['async-upload']['tmp_name'], $_FILES['async-upload']['name'], false ); + if ( ! wp_match_mime_types( 'image', $wp_filetype['type'] ) ) { + echo json_encode( array( + 'success' => false, + 'data' => array( + 'message' => __( 'The uploaded file is not a valid image. Please try again.' ), + 'filename' => $_FILES['async-upload']['name'], + ) + ) ); + + wp_die(); + } + } + + $attachment_id = media_handle_upload( 'async-upload', $post_id, $post_data ); + + if ( is_wp_error( $attachment_id ) ) { + echo json_encode( array( + 'success' => false, + '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'] ); + } + + if ( ! $attachment = wp_prepare_attachment_for_js( $attachment_id ) ) + wp_die(); + + echo json_encode( array( + 'success' => true, + 'data' => $attachment, + ) ); + + 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() { + $json = ! empty( $_REQUEST['json'] ); // New-style request + + $post_ID = intval( $_POST['post_id'] ); + if ( ! current_user_can( 'edit_post', $post_ID ) ) + wp_die( -1 ); + + $thumbnail_id = intval( $_POST['thumbnail_id'] ); + + if ( $json ) + check_ajax_referer( "update-post_$post_ID" ); + else + check_ajax_referer( "set_post_thumbnail-$post_ID" ); + + if ( $thumbnail_id == '-1' ) { + if ( delete_post_thumbnail( $post_ID ) ) { + $return = _wp_post_thumbnail_html( null, $post_ID ); + $json ? wp_send_json_success( $return ) : wp_die( $return ); + } else { + wp_die( 0 ); + } + } + + if ( set_post_thumbnail( $post_ID, $thumbnail_id ) ) { + $return = _wp_post_thumbnail_html( $thumbnail_id, $post_ID ); + $json ? wp_send_json_success( $return ) : wp_die( $return ); + } + + wp_die( 0 ); +} + +function wp_ajax_date_format() { + wp_die( date_i18n( sanitize_option( 'date_format', wp_unslash( $_POST['date'] ) ) ) ); +} + +function wp_ajax_time_format() { + wp_die( date_i18n( sanitize_option( 'time_format', wp_unslash( $_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_' . $post_id, '_wpnonce'); + + $post_id = edit_post(); + + if ( is_wp_error( $post_id ) ) { + wp_send_json_error(); + } + + 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 ); + } + + wp_send_json_success( array( 'last_edited' => $last_edited ) ); +} + +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_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 ); + + /** + * Filter the post lock window duration. + * + * @since 3.3.0 + * + * @param int $interval The interval in seconds the post lock duration + * should last, plus 5 seconds. Default 150. + */ + $new_lock = ( time() - apply_filters( 'wp_check_post_lock_window', 150 ) + 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 ); +} + +/** + * Get an attachment. + * + * @since 3.5.0 + */ +function wp_ajax_get_attachment() { + if ( ! isset( $_REQUEST['id'] ) ) + wp_send_json_error(); + + if ( ! $id = absint( $_REQUEST['id'] ) ) + wp_send_json_error(); + + if ( ! $post = get_post( $id ) ) + wp_send_json_error(); + + if ( 'attachment' != $post->post_type ) + wp_send_json_error(); + + if ( ! current_user_can( 'upload_files' ) ) + wp_send_json_error(); + + if ( ! $attachment = wp_prepare_attachment_for_js( $id ) ) + wp_send_json_error(); + + wp_send_json_success( $attachment ); +} + +/** + * Query for attachments. + * + * @since 3.5.0 + */ +function wp_ajax_query_attachments() { + if ( ! current_user_can( 'upload_files' ) ) + wp_send_json_error(); + + $query = isset( $_REQUEST['query'] ) ? (array) $_REQUEST['query'] : array(); + $query = array_intersect_key( $query, array_flip( array( + 's', 'order', 'orderby', 'posts_per_page', 'paged', 'post_mime_type', + 'post_parent', 'post__in', 'post__not_in', + ) ) ); + + $query['post_type'] = 'attachment'; + $query['post_status'] = 'inherit'; + if ( current_user_can( get_post_type_object( 'attachment' )->cap->read_private_posts ) ) + $query['post_status'] .= ',private'; + + /** + * Filter the arguments passed to WP_Query during an AJAX + * call for querying attachments. + * + * @since 3.7.0 + * + * @see WP_Query::parse_query() + * + * @param array $query An array of query variables. + */ + $query = apply_filters( 'ajax_query_attachments_args', $query ); + $query = new WP_Query( $query ); + + $posts = array_map( 'wp_prepare_attachment_for_js', $query->posts ); + $posts = array_filter( $posts ); + + wp_send_json_success( $posts ); +} + +/** + * Save attachment attributes. + * + * @since 3.5.0 + */ +function wp_ajax_save_attachment() { + if ( ! isset( $_REQUEST['id'] ) || ! isset( $_REQUEST['changes'] ) ) + wp_send_json_error(); + + if ( ! $id = absint( $_REQUEST['id'] ) ) + wp_send_json_error(); + + check_ajax_referer( 'update-post_' . $id, 'nonce' ); + + if ( ! current_user_can( 'edit_post', $id ) ) + wp_send_json_error(); + + $changes = $_REQUEST['changes']; + $post = get_post( $id, ARRAY_A ); + + if ( 'attachment' != $post['post_type'] ) + wp_send_json_error(); + + if ( isset( $changes['title'] ) ) + $post['post_title'] = $changes['title']; + + if ( isset( $changes['caption'] ) ) + $post['post_excerpt'] = $changes['caption']; + + if ( isset( $changes['description'] ) ) + $post['post_content'] = $changes['description']; + + if ( isset( $changes['alt'] ) ) { + $alt = wp_unslash( $changes['alt'] ); + if ( $alt != get_post_meta( $id, '_wp_attachment_image_alt', true ) ) { + $alt = wp_strip_all_tags( $alt, true ); + update_post_meta( $id, '_wp_attachment_image_alt', wp_slash( $alt ) ); + } + } + + wp_update_post( $post ); + wp_send_json_success(); +} + +/** + * Save backwards compatible attachment attributes. + * + * @since 3.5.0 + */ +function wp_ajax_save_attachment_compat() { + if ( ! isset( $_REQUEST['id'] ) ) + wp_send_json_error(); + + if ( ! $id = absint( $_REQUEST['id'] ) ) + wp_send_json_error(); + + if ( empty( $_REQUEST['attachments'] ) || empty( $_REQUEST['attachments'][ $id ] ) ) + wp_send_json_error(); + $attachment_data = $_REQUEST['attachments'][ $id ]; + + check_ajax_referer( 'update-post_' . $id, 'nonce' ); + + if ( ! current_user_can( 'edit_post', $id ) ) + wp_send_json_error(); + + $post = get_post( $id, ARRAY_A ); + + if ( 'attachment' != $post['post_type'] ) + wp_send_json_error(); + + /** This filter is documented in wp-admin/includes/media.php */ + $post = apply_filters( 'attachment_fields_to_save', $post, $attachment_data ); + + if ( isset( $post['errors'] ) ) { + $errors = $post['errors']; // @todo return me and display me! + unset( $post['errors'] ); + } + + wp_update_post( $post ); + + foreach ( get_attachment_taxonomies( $post ) as $taxonomy ) { + if ( isset( $attachment_data[ $taxonomy ] ) ) + wp_set_object_terms( $id, array_map( 'trim', preg_split( '/,+/', $attachment_data[ $taxonomy ] ) ), $taxonomy, false ); + } + + if ( ! $attachment = wp_prepare_attachment_for_js( $id ) ) + wp_send_json_error(); + + wp_send_json_success( $attachment ); +} + +function wp_ajax_save_attachment_order() { + if ( ! isset( $_REQUEST['post_id'] ) ) + wp_send_json_error(); + + if ( ! $post_id = absint( $_REQUEST['post_id'] ) ) + wp_send_json_error(); + + if ( empty( $_REQUEST['attachments'] ) ) + wp_send_json_error(); + + check_ajax_referer( 'update-post_' . $post_id, 'nonce' ); + + $attachments = $_REQUEST['attachments']; + + if ( ! current_user_can( 'edit_post', $post_id ) ) + wp_send_json_error(); + + $post = get_post( $post_id, ARRAY_A ); + + foreach ( $attachments as $attachment_id => $menu_order ) { + if ( ! current_user_can( 'edit_post', $attachment_id ) ) + continue; + if ( ! $attachment = get_post( $attachment_id ) ) + continue; + if ( 'attachment' != $attachment->post_type ) + continue; + + wp_update_post( array( 'ID' => $attachment_id, 'menu_order' => $menu_order ) ); + } + + wp_send_json_success(); +} + +/** + * Generates the HTML to send an attachment to the editor. + * Backwards compatible with the media_send_to_editor filter and the chain + * of filters that follow. + * + * @since 3.5.0 + */ +function wp_ajax_send_attachment_to_editor() { + check_ajax_referer( 'media-send-to-editor', 'nonce' ); + + $attachment = wp_unslash( $_POST['attachment'] ); + + $id = intval( $attachment['id'] ); + + if ( ! $post = get_post( $id ) ) + wp_send_json_error(); + + if ( 'attachment' != $post->post_type ) + wp_send_json_error(); + + if ( current_user_can( 'edit_post', $id ) ) { + // If this attachment is unattached, attach it. Primarily a back compat thing. + if ( 0 == $post->post_parent && $insert_into_post_id = intval( $_POST['post_id'] ) ) { + wp_update_post( array( 'ID' => $id, 'post_parent' => $insert_into_post_id ) ); + } + } + + $rel = $url = ''; + $html = $title = isset( $attachment['post_title'] ) ? $attachment['post_title'] : ''; + if ( ! empty( $attachment['url'] ) ) { + $url = $attachment['url']; + if ( strpos( $url, 'attachment_id') || get_attachment_link( $id ) == $url ) + $rel = ' rel="attachment wp-att-' . $id . '"'; + $html = '' . $html . ''; + } + + remove_filter( 'media_send_to_editor', 'image_media_send_to_editor' ); + + if ( 'image' === substr( $post->post_mime_type, 0, 5 ) ) { + $align = isset( $attachment['align'] ) ? $attachment['align'] : 'none'; + $size = isset( $attachment['image-size'] ) ? $attachment['image-size'] : 'medium'; + $alt = isset( $attachment['image_alt'] ) ? $attachment['image_alt'] : ''; + $caption = isset( $attachment['post_excerpt'] ) ? $attachment['post_excerpt'] : ''; + $title = ''; // We no longer insert title tags into tags, as they are redundant. + $html = get_image_send_to_editor( $id, $caption, $title, $align, $url, (bool) $rel, $size, $alt ); + } elseif ( 'video' === substr( $post->post_mime_type, 0, 5 ) || 'audio' === substr( $post->post_mime_type, 0, 5 ) ) { + $html = stripslashes_deep( $_POST['html'] ); + } + + /** This filter is documented in wp-admin/includes/media.php */ + $html = apply_filters( 'media_send_to_editor', $html, $id, $attachment ); + + wp_send_json_success( $html ); +} + +/** + * Generates the HTML to send a non-image embed link to the editor. + * + * Backwards compatible with the following filters: + * - file_send_to_editor_url + * - audio_send_to_editor_url + * - video_send_to_editor_url + * + * @since 3.5.0 + */ +function wp_ajax_send_link_to_editor() { + check_ajax_referer( 'media-send-to-editor', 'nonce' ); + + if ( ! $src = wp_unslash( $_POST['src'] ) ) + wp_send_json_error(); + + if ( ! strpos( $src, '://' ) ) + $src = 'http://' . $src; + + if ( ! $src = esc_url_raw( $src ) ) + wp_send_json_error(); + + if ( ! $title = trim( wp_unslash( $_POST['title'] ) ) ) + $title = wp_basename( $src ); + + $html = ''; + if ( $title ) + $html = '' . $title . ''; + + // Figure out what filter to run: + $type = 'file'; + if ( ( $ext = preg_replace( '/^.+?\.([^.]+)$/', '$1', $src ) ) && ( $ext_type = wp_ext2type( $ext ) ) + && ( 'audio' == $ext_type || 'video' == $ext_type ) ) + $type = $ext_type; + + /** This filter is documented in wp-admin/includes/media.php */ + $html = apply_filters( $type . '_send_to_editor_url', $html, $src, $title ); + + wp_send_json_success( $html ); +} + +/** + * Heartbeat API (experimental) + * + * Runs when the user is logged in. + */ +function wp_ajax_heartbeat() { + if ( empty( $_POST['_nonce'] ) ) + wp_send_json_error(); + + $response = array(); + + if ( false === wp_verify_nonce( $_POST['_nonce'], 'heartbeat-nonce' ) ) { + // User is logged in but nonces have expired. + $response['nonces_expired'] = true; + wp_send_json($response); + } + + // screen_id is the same as $current_screen->id and the JS global 'pagenow' + if ( ! empty($_POST['screen_id']) ) + $screen_id = sanitize_key($_POST['screen_id']); + else + $screen_id = 'front'; + + if ( ! empty($_POST['data']) ) { + $data = wp_unslash( (array) $_POST['data'] ); + + /** + * Filter the Heartbeat response received. + * + * @since 3.6.0 + * + * @param array|object $response The Heartbeat response object or array. + * @param array $data The $_POST data sent. + * @param string $screen_id The screen id. + */ + $response = apply_filters( 'heartbeat_received', $response, $data, $screen_id ); + } + + /** + * Filter the Heartbeat response sent. + * + * @since 3.6.0 + * + * @param array|object $response The Heartbeat response object or array. + * @param string $screen_id The screen id. + */ + $response = apply_filters( 'heartbeat_send', $response, $screen_id ); + + /** + * Fires when Heartbeat ticks in logged-in environments. + * + * Allows the transport to be easily replaced with long-polling. + * + * @since 3.6.0 + * + * @param array|object $response The Heartbeat response object or array. + * @param string $screen_id The screen id. + */ + do_action( 'heartbeat_tick', $response, $screen_id ); + + // Send the current time according to the server + $response['server_time'] = time(); + + wp_send_json($response); +} + +function wp_ajax_get_revision_diffs() { + require ABSPATH . 'wp-admin/includes/revision.php'; + + if ( ! $post = get_post( (int) $_REQUEST['post_id'] ) ) + wp_send_json_error(); + + if ( ! current_user_can( 'read_post', $post->ID ) ) + wp_send_json_error(); + + // Really just pre-loading the cache here. + if ( ! $revisions = wp_get_post_revisions( $post->ID, array( 'check_enabled' => false ) ) ) + wp_send_json_error(); + + $return = array(); + @set_time_limit( 0 ); + + foreach ( $_REQUEST['compare'] as $compare_key ) { + list( $compare_from, $compare_to ) = explode( ':', $compare_key ); // from:to + + $return[] = array( + 'id' => $compare_key, + 'fields' => wp_get_revision_ui_diff( $post, $compare_from, $compare_to ), + ); + } + wp_send_json_success( $return ); +} + +/** + * Auto-save the selected color scheme for a user's own profile. + * + * @since 3.8.0 + */ +function wp_ajax_save_user_color_scheme() { + global $_wp_admin_css_colors; + + check_ajax_referer( 'save-color-scheme', 'nonce' ); + + $color_scheme = sanitize_key( $_POST['color_scheme'] ); + + if ( ! isset( $_wp_admin_css_colors[ $color_scheme ] ) ) { + wp_send_json_error(); + } + + update_user_meta( get_current_user_id(), 'admin_color', $color_scheme ); + wp_send_json_success(); +} + +/** + * Get themes from themes_api(). + * + * @since 3.9.0 + */ +function wp_ajax_query_themes() { + global $themes_allowedtags, $theme_field_defaults; + + if ( ! current_user_can( 'install_themes' ) ) { + wp_send_json_error(); + } + + $args = wp_parse_args( wp_unslash( $_REQUEST['request'] ), array( + 'per_page' => 20, + 'fields' => $theme_field_defaults + ) ); + + $old_filter = isset( $args['browse'] ) ? $args['browse'] : 'search'; + + /** This filter is documented in wp-admin/includes/class-wp-theme-install-list-table.php */ + $args = apply_filters( 'install_themes_table_api_args_' . $old_filter, $args ); + + $api = themes_api( 'query_themes', $args ); + + if ( is_wp_error( $api ) ) { + wp_send_json_error(); + } + + $update_php = network_admin_url( 'update.php?action=install-theme' ); + foreach ( $api->themes as &$theme ) { + $theme->install_url = add_query_arg( array( + 'theme' => $theme->slug, + '_wpnonce' => wp_create_nonce( 'install-theme_' . $theme->slug ) + ), $update_php ); + + $theme->name = wp_kses( $theme->name, $themes_allowedtags ); + $theme->author = wp_kses( $theme->author, $themes_allowedtags ); + $theme->version = wp_kses( $theme->version, $themes_allowedtags ); + $theme->description = wp_kses( $theme->description, $themes_allowedtags ); + $theme->num_ratings = sprintf( _n( '(based on %s rating)', '(based on %s ratings)', $theme->num_ratings ), number_format_i18n( $theme->num_ratings ) ); + } + + wp_send_json_success( $api ); +} diff --git a/wp-admin/includes/bookmark.php b/wp-admin/includes/bookmark.php new file mode 100644 index 0000000..3378596 --- /dev/null +++ b/wp-admin/includes/bookmark.php @@ -0,0 +1,316 @@ +link_url = esc_url( wp_unslash( $_GET['linkurl'] ) ); + else + $link->link_url = ''; + + if ( isset( $_GET['name'] ) ) + $link->link_name = esc_attr( wp_unslash( $_GET['name'] ) ); + else + $link->link_name = ''; + + $link->link_visible = 'Y'; + + return $link; +} + +/** + * Delete link specified from database. + * + * @since 2.0.0 + * + * @param int $link_id ID of the link to delete + * @return bool True + */ +function wp_delete_link( $link_id ) { + global $wpdb; + /** + * Fires before a link is deleted. + * + * @since 2.0.0 + * + * @param int $link_id ID of the link to delete. + */ + do_action( 'delete_link', $link_id ); + + wp_delete_object_term_relationships( $link_id, 'link_category' ); + + $wpdb->delete( $wpdb->links, array( 'link_id' => $link_id ) ); + /** + * Fires after a link has been deleted. + * + * @since 2.2.0 + * + * @param int $link_id ID of the deleted link. + */ + do_action( 'deleted_link', $link_id ); + + clean_bookmark_cache( $link_id ); + + return true; +} + +/** + * Retrieves the link categories associated with the link specified. + * + * @since 2.1.0 + * + * @param int $link_id Link ID to look up + * @return array The requested link's categories + */ +function wp_get_link_cats( $link_id = 0 ) { + + $cats = wp_get_object_terms( $link_id, 'link_category', array('fields' => 'ids') ); + + return array_unique( $cats ); +} + +/** + * Retrieve link data based on ID. + * + * @since 2.0.0 + * + * @param int $link_id ID of link to retrieve + * @return object Link for editing + */ +function get_link_to_edit( $link_id ) { + return get_bookmark( $link_id, OBJECT, 'edit' ); +} + +/** + * This function inserts/updates links into/in the database. + * + * @since 2.0.0 + * + * @param array $linkdata Elements that make up the link to insert. + * @param bool $wp_error Optional. If true return WP_Error object on failure. + * @return int|WP_Error Value 0 or WP_Error on failure. The link ID on success. + */ +function wp_insert_link( $linkdata, $wp_error = false ) { + global $wpdb; + + $defaults = array( 'link_id' => 0, 'link_name' => '', 'link_url' => '', 'link_rating' => 0 ); + + $linkdata = wp_parse_args( $linkdata, $defaults ); + $linkdata = sanitize_bookmark( $linkdata, 'db' ); + + extract( wp_unslash( $linkdata ), EXTR_SKIP ); + + $update = false; + + if ( !empty( $link_id ) ) + $update = true; + + if ( trim( $link_name ) == '' ) { + if ( trim( $link_url ) != '' ) { + $link_name = $link_url; + } else { + return 0; + } + } + + if ( trim( $link_url ) == '' ) + return 0; + + if ( empty( $link_rating ) ) + $link_rating = 0; + + if ( empty( $link_image ) ) + $link_image = ''; + + if ( empty( $link_target ) ) + $link_target = ''; + + if ( empty( $link_visible ) ) + $link_visible = 'Y'; + + if ( empty( $link_owner ) ) + $link_owner = get_current_user_id(); + + if ( empty( $link_notes ) ) + $link_notes = ''; + + if ( empty( $link_description ) ) + $link_description = ''; + + if ( empty( $link_rss ) ) + $link_rss = ''; + + if ( empty( $link_rel ) ) + $link_rel = ''; + + // Make sure we set a valid category + if ( ! isset( $link_category ) || 0 == count( $link_category ) || !is_array( $link_category ) ) { + $link_category = array( get_option( 'default_link_category' ) ); + } + + if ( $update ) { + if ( false === $wpdb->update( $wpdb->links, compact('link_url', 'link_name', 'link_image', 'link_target', 'link_description', 'link_visible', 'link_rating', 'link_rel', 'link_notes', 'link_rss'), compact('link_id') ) ) { + if ( $wp_error ) + return new WP_Error( 'db_update_error', __( 'Could not update link in the database' ), $wpdb->last_error ); + else + return 0; + } + } else { + if ( false === $wpdb->insert( $wpdb->links, compact('link_url', 'link_name', 'link_image', 'link_target', 'link_description', 'link_visible', 'link_owner', 'link_rating', 'link_rel', 'link_notes', 'link_rss') ) ) { + if ( $wp_error ) + return new WP_Error( 'db_insert_error', __( 'Could not insert link into the database' ), $wpdb->last_error ); + else + return 0; + } + $link_id = (int) $wpdb->insert_id; + } + + wp_set_link_cats( $link_id, $link_category ); + + if ( $update ) { + /** + * Fires after a link was updated in the database. + * + * @since 2.0.0 + * + * @param int $link_id ID of the link that was updated. + */ + do_action( 'edit_link', $link_id ); + } else { + /** + * Fires after a link was added to the database. + * + * @since 2.0.0 + * + * @param int $link_id ID of the link that was added. + */ + do_action( 'add_link', $link_id ); + } + clean_bookmark_cache( $link_id ); + + return $link_id; +} + +/** + * Update link with the specified link categories. + * + * @since 2.1.0 + * + * @param int $link_id ID of link to update + * @param array $link_categories Array of categories to + */ +function wp_set_link_cats( $link_id = 0, $link_categories = array() ) { + // If $link_categories isn't already an array, make it one: + if ( !is_array( $link_categories ) || 0 == count( $link_categories ) ) + $link_categories = array( get_option( 'default_link_category' ) ); + + $link_categories = array_map( 'intval', $link_categories ); + $link_categories = array_unique( $link_categories ); + + wp_set_object_terms( $link_id, $link_categories, 'link_category' ); + + clean_bookmark_cache( $link_id ); +} + +/** + * Update a link in the database. + * + * @since 2.0.0 + * + * @param array $linkdata Link data to update. + * @return int|WP_Error Value 0 or WP_Error on failure. The updated link ID on success. + */ +function wp_update_link( $linkdata ) { + $link_id = (int) $linkdata['link_id']; + + $link = get_bookmark( $link_id, ARRAY_A ); + + // Escape data pulled from DB. + $link = wp_slash( $link ); + + // Passed link category list overwrites existing category list if not empty. + if ( isset( $linkdata['link_category'] ) && is_array( $linkdata['link_category'] ) + && 0 != count( $linkdata['link_category'] ) ) + $link_cats = $linkdata['link_category']; + else + $link_cats = $link['link_category']; + + // Merge old and new fields with new fields overwriting old ones. + $linkdata = array_merge( $link, $linkdata ); + $linkdata['link_category'] = $link_cats; + + return wp_insert_link( $linkdata ); +} + +/** + * @since 3.5.0 + * @access private + */ +function wp_link_manager_disabled_message() { + global $pagenow; + if ( 'link-manager.php' != $pagenow && 'link-add.php' != $pagenow && 'link.php' != $pagenow ) + return; + + add_filter( 'pre_option_link_manager_enabled', '__return_true', 100 ); + $really_can_manage_links = current_user_can( 'manage_links' ); + remove_filter( 'pre_option_link_manager_enabled', '__return_true', 100 ); + + if ( $really_can_manage_links && current_user_can( 'install_plugins' ) ) { + $link = network_admin_url( 'plugin-install.php?tab=search&s=Link+Manager' ); + wp_die( sprintf( __( 'If you are looking to use the link manager, please install the Link Manager plugin.' ), $link ) ); + } + + wp_die( __( 'You do not have sufficient permissions to edit the links for this site.' ) ); +} +add_action( 'admin_page_access_denied', 'wp_link_manager_disabled_message' ); diff --git a/wp-admin/includes/class-ftp-pure.php b/wp-admin/includes/class-ftp-pure.php new file mode 100644 index 0000000..bb7742a --- /dev/null +++ b/wp-admin/includes/class-ftp-pure.php @@ -0,0 +1,190 @@ +__construct($verb, $le); + } + + function __construct($verb=FALSE, $le=FALSE) { + parent::__construct(false, $verb, $le); + } + +// +// +// + + function _settimeout($sock) { + if(!@stream_set_timeout($sock, $this->_timeout)) { + $this->PushError('_settimeout','socket set send timeout'); + $this->_quit(); + return FALSE; + } + return TRUE; + } + + function _connect($host, $port) { + $this->SendMSG("Creating socket"); + $sock = @fsockopen($host, $port, $errno, $errstr, $this->_timeout); + if (!$sock) { + $this->PushError('_connect','socket connect failed', $errstr." (".$errno.")"); + return FALSE; + } + $this->_connected=true; + return $sock; + } + + function _readmsg($fnction="_readmsg"){ + if(!$this->_connected) { + $this->PushError($fnction, 'Connect first'); + return FALSE; + } + $result=true; + $this->_message=""; + $this->_code=0; + $go=true; + do { + $tmp=@fgets($this->_ftp_control_sock, 512); + if($tmp===false) { + $go=$result=false; + $this->PushError($fnction,'Read failed'); + } else { + $this->_message.=$tmp; + if(preg_match("/^([0-9]{3})(-(.*[".CRLF."]{1,2})+\\1)? [^".CRLF."]+[".CRLF."]{1,2}$/", $this->_message, $regs)) $go=false; + } + } while($go); + if($this->LocalEcho) echo "GET < ".rtrim($this->_message, CRLF).CRLF; + $this->_code=(int)$regs[1]; + return $result; + } + + function _exec($cmd, $fnction="_exec") { + if(!$this->_ready) { + $this->PushError($fnction,'Connect first'); + return FALSE; + } + if($this->LocalEcho) echo "PUT > ",$cmd,CRLF; + $status=@fputs($this->_ftp_control_sock, $cmd.CRLF); + if($status===false) { + $this->PushError($fnction,'socket write failed'); + return FALSE; + } + $this->_lastaction=time(); + if(!$this->_readmsg($fnction)) return FALSE; + return TRUE; + } + + function _data_prepare($mode=FTP_ASCII) { + if(!$this->_settype($mode)) return FALSE; + if($this->_passive) { + if(!$this->_exec("PASV", "pasv")) { + $this->_data_close(); + return FALSE; + } + if(!$this->_checkCode()) { + $this->_data_close(); + return FALSE; + } + $ip_port = explode(",", ereg_replace("^.+ \\(?([0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]+,[0-9]+)\\)?.*".CRLF."$", "\\1", $this->_message)); + $this->_datahost=$ip_port[0].".".$ip_port[1].".".$ip_port[2].".".$ip_port[3]; + $this->_dataport=(((int)$ip_port[4])<<8) + ((int)$ip_port[5]); + $this->SendMSG("Connecting to ".$this->_datahost.":".$this->_dataport); + $this->_ftp_data_sock=@fsockopen($this->_datahost, $this->_dataport, $errno, $errstr, $this->_timeout); + if(!$this->_ftp_data_sock) { + $this->PushError("_data_prepare","fsockopen fails", $errstr." (".$errno.")"); + $this->_data_close(); + return FALSE; + } + else $this->_ftp_data_sock; + } else { + $this->SendMSG("Only passive connections available!"); + return FALSE; + } + return TRUE; + } + + function _data_read($mode=FTP_ASCII, $fp=NULL) { + if(is_resource($fp)) $out=0; + else $out=""; + if(!$this->_passive) { + $this->SendMSG("Only passive connections available!"); + return FALSE; + } + while (!feof($this->_ftp_data_sock)) { + $block=fread($this->_ftp_data_sock, $this->_ftp_buff_size); + if($mode!=FTP_BINARY) $block=preg_replace("/\r\n|\r|\n/", $this->_eol_code[$this->OS_local], $block); + if(is_resource($fp)) $out+=fwrite($fp, $block, strlen($block)); + else $out.=$block; + } + return $out; + } + + function _data_write($mode=FTP_ASCII, $fp=NULL) { + if(is_resource($fp)) $out=0; + else $out=""; + if(!$this->_passive) { + $this->SendMSG("Only passive connections available!"); + return FALSE; + } + if(is_resource($fp)) { + while(!feof($fp)) { + $block=fread($fp, $this->_ftp_buff_size); + if(!$this->_data_write_block($mode, $block)) return false; + } + } elseif(!$this->_data_write_block($mode, $fp)) return false; + return TRUE; + } + + function _data_write_block($mode, $block) { + if($mode!=FTP_BINARY) $block=preg_replace("/\r\n|\r|\n/", $this->_eol_code[$this->OS_remote], $block); + do { + if(($t=@fwrite($this->_ftp_data_sock, $block))===FALSE) { + $this->PushError("_data_write","Can't write to socket"); + return FALSE; + } + $block=substr($block, $t); + } while(!empty($block)); + return true; + } + + function _data_close() { + @fclose($this->_ftp_data_sock); + $this->SendMSG("Disconnected data from remote host"); + return TRUE; + } + + function _quit($force=FALSE) { + if($this->_connected or $force) { + @fclose($this->_ftp_control_sock); + $this->_connected=false; + $this->SendMSG("Socket closed"); + } + } +} + +?> diff --git a/wp-admin/includes/class-ftp-sockets.php b/wp-admin/includes/class-ftp-sockets.php new file mode 100644 index 0000000..f9ea6cd --- /dev/null +++ b/wp-admin/includes/class-ftp-sockets.php @@ -0,0 +1,250 @@ +__construct($verb, $le); + } + + function __construct($verb=FALSE, $le=FALSE) { + parent::__construct(true, $verb, $le); + } + +// +// +// + + function _settimeout($sock) { + if(!@socket_set_option($sock, SOL_SOCKET, SO_RCVTIMEO, array("sec"=>$this->_timeout, "usec"=>0))) { + $this->PushError('_connect','socket set receive timeout',socket_strerror(socket_last_error($sock))); + @socket_close($sock); + return FALSE; + } + if(!@socket_set_option($sock, SOL_SOCKET , SO_SNDTIMEO, array("sec"=>$this->_timeout, "usec"=>0))) { + $this->PushError('_connect','socket set send timeout',socket_strerror(socket_last_error($sock))); + @socket_close($sock); + return FALSE; + } + return true; + } + + function _connect($host, $port) { + $this->SendMSG("Creating socket"); + if(!($sock = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP))) { + $this->PushError('_connect','socket create failed',socket_strerror(socket_last_error($sock))); + return FALSE; + } + if(!$this->_settimeout($sock)) return FALSE; + $this->SendMSG("Connecting to \"".$host.":".$port."\""); + if (!($res = @socket_connect($sock, $host, $port))) { + $this->PushError('_connect','socket connect failed',socket_strerror(socket_last_error($sock))); + @socket_close($sock); + return FALSE; + } + $this->_connected=true; + return $sock; + } + + function _readmsg($fnction="_readmsg"){ + if(!$this->_connected) { + $this->PushError($fnction,'Connect first'); + return FALSE; + } + $result=true; + $this->_message=""; + $this->_code=0; + $go=true; + do { + $tmp=@socket_read($this->_ftp_control_sock, 4096, PHP_BINARY_READ); + if($tmp===false) { + $go=$result=false; + $this->PushError($fnction,'Read failed', socket_strerror(socket_last_error($this->_ftp_control_sock))); + } else { + $this->_message.=$tmp; + $go = !preg_match("/^([0-9]{3})(-.+\\1)? [^".CRLF."]+".CRLF."$/Us", $this->_message, $regs); + } + } while($go); + if($this->LocalEcho) echo "GET < ".rtrim($this->_message, CRLF).CRLF; + $this->_code=(int)$regs[1]; + return $result; + } + + function _exec($cmd, $fnction="_exec") { + if(!$this->_ready) { + $this->PushError($fnction,'Connect first'); + return FALSE; + } + if($this->LocalEcho) echo "PUT > ",$cmd,CRLF; + $status=@socket_write($this->_ftp_control_sock, $cmd.CRLF); + if($status===false) { + $this->PushError($fnction,'socket write failed', socket_strerror(socket_last_error($this->stream))); + return FALSE; + } + $this->_lastaction=time(); + if(!$this->_readmsg($fnction)) return FALSE; + return TRUE; + } + + function _data_prepare($mode=FTP_ASCII) { + if(!$this->_settype($mode)) return FALSE; + $this->SendMSG("Creating data socket"); + $this->_ftp_data_sock = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP); + if ($this->_ftp_data_sock < 0) { + $this->PushError('_data_prepare','socket create failed',socket_strerror(socket_last_error($this->_ftp_data_sock))); + return FALSE; + } + if(!$this->_settimeout($this->_ftp_data_sock)) { + $this->_data_close(); + return FALSE; + } + if($this->_passive) { + if(!$this->_exec("PASV", "pasv")) { + $this->_data_close(); + return FALSE; + } + if(!$this->_checkCode()) { + $this->_data_close(); + return FALSE; + } + $ip_port = explode(",", ereg_replace("^.+ \\(?([0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]+,[0-9]+)\\)?.*".CRLF."$", "\\1", $this->_message)); + $this->_datahost=$ip_port[0].".".$ip_port[1].".".$ip_port[2].".".$ip_port[3]; + $this->_dataport=(((int)$ip_port[4])<<8) + ((int)$ip_port[5]); + $this->SendMSG("Connecting to ".$this->_datahost.":".$this->_dataport); + if(!@socket_connect($this->_ftp_data_sock, $this->_datahost, $this->_dataport)) { + $this->PushError("_data_prepare","socket_connect", socket_strerror(socket_last_error($this->_ftp_data_sock))); + $this->_data_close(); + return FALSE; + } + else $this->_ftp_temp_sock=$this->_ftp_data_sock; + } else { + if(!@socket_getsockname($this->_ftp_control_sock, $addr, $port)) { + $this->PushError("_data_prepare","can't get control socket information", socket_strerror(socket_last_error($this->_ftp_control_sock))); + $this->_data_close(); + return FALSE; + } + if(!@socket_bind($this->_ftp_data_sock,$addr)){ + $this->PushError("_data_prepare","can't bind data socket", socket_strerror(socket_last_error($this->_ftp_data_sock))); + $this->_data_close(); + return FALSE; + } + if(!@socket_listen($this->_ftp_data_sock)) { + $this->PushError("_data_prepare","can't listen data socket", socket_strerror(socket_last_error($this->_ftp_data_sock))); + $this->_data_close(); + return FALSE; + } + if(!@socket_getsockname($this->_ftp_data_sock, $this->_datahost, $this->_dataport)) { + $this->PushError("_data_prepare","can't get data socket information", socket_strerror(socket_last_error($this->_ftp_data_sock))); + $this->_data_close(); + return FALSE; + } + if(!$this->_exec('PORT '.str_replace('.',',',$this->_datahost.'.'.($this->_dataport>>8).'.'.($this->_dataport&0x00FF)), "_port")) { + $this->_data_close(); + return FALSE; + } + if(!$this->_checkCode()) { + $this->_data_close(); + return FALSE; + } + } + return TRUE; + } + + function _data_read($mode=FTP_ASCII, $fp=NULL) { + $NewLine=$this->_eol_code[$this->OS_local]; + if(is_resource($fp)) $out=0; + else $out=""; + if(!$this->_passive) { + $this->SendMSG("Connecting to ".$this->_datahost.":".$this->_dataport); + $this->_ftp_temp_sock=socket_accept($this->_ftp_data_sock); + if($this->_ftp_temp_sock===FALSE) { + $this->PushError("_data_read","socket_accept", socket_strerror(socket_last_error($this->_ftp_temp_sock))); + $this->_data_close(); + return FALSE; + } + } + + while(($block=@socket_read($this->_ftp_temp_sock, $this->_ftp_buff_size, PHP_BINARY_READ))!==false) { + if($block==="") break; + if($mode!=FTP_BINARY) $block=preg_replace("/\r\n|\r|\n/", $this->_eol_code[$this->OS_local], $block); + if(is_resource($fp)) $out+=fwrite($fp, $block, strlen($block)); + else $out.=$block; + } + return $out; + } + + function _data_write($mode=FTP_ASCII, $fp=NULL) { + $NewLine=$this->_eol_code[$this->OS_local]; + if(is_resource($fp)) $out=0; + else $out=""; + if(!$this->_passive) { + $this->SendMSG("Connecting to ".$this->_datahost.":".$this->_dataport); + $this->_ftp_temp_sock=socket_accept($this->_ftp_data_sock); + if($this->_ftp_temp_sock===FALSE) { + $this->PushError("_data_write","socket_accept", socket_strerror(socket_last_error($this->_ftp_temp_sock))); + $this->_data_close(); + return false; + } + } + if(is_resource($fp)) { + while(!feof($fp)) { + $block=fread($fp, $this->_ftp_buff_size); + if(!$this->_data_write_block($mode, $block)) return false; + } + } elseif(!$this->_data_write_block($mode, $fp)) return false; + return true; + } + + function _data_write_block($mode, $block) { + if($mode!=FTP_BINARY) $block=preg_replace("/\r\n|\r|\n/", $this->_eol_code[$this->OS_remote], $block); + do { + if(($t=@socket_write($this->_ftp_temp_sock, $block))===FALSE) { + $this->PushError("_data_write","socket_write", socket_strerror(socket_last_error($this->_ftp_temp_sock))); + $this->_data_close(); + return FALSE; + } + $block=substr($block, $t); + } while(!empty($block)); + return true; + } + + function _data_close() { + @socket_close($this->_ftp_temp_sock); + @socket_close($this->_ftp_data_sock); + $this->SendMSG("Disconnected data from remote host"); + return TRUE; + } + + function _quit() { + if($this->_connected) { + @socket_close($this->_ftp_control_sock); + $this->_connected=false; + $this->SendMSG("Socket closed"); + } + } +} +?> diff --git a/wp-admin/includes/class-ftp.php b/wp-admin/includes/class-ftp.php new file mode 100644 index 0000000..f068f15 --- /dev/null +++ b/wp-admin/includes/class-ftp.php @@ -0,0 +1,907 @@ +__construct($port_mode); + } + + function __construct($port_mode=FALSE, $verb=FALSE, $le=FALSE) { + $this->LocalEcho=$le; + $this->Verbose=$verb; + $this->_lastaction=NULL; + $this->_error_array=array(); + $this->_eol_code=array(FTP_OS_Unix=>"\n", FTP_OS_Mac=>"\r", FTP_OS_Windows=>"\r\n"); + $this->AuthorizedTransferMode=array(FTP_AUTOASCII, FTP_ASCII, FTP_BINARY); + $this->OS_FullName=array(FTP_OS_Unix => 'UNIX', FTP_OS_Windows => 'WINDOWS', FTP_OS_Mac => 'MACOS'); + $this->AutoAsciiExt=array("ASP","BAT","C","CPP","CSS","CSV","JS","H","HTM","HTML","SHTML","INI","LOG","PHP3","PHTML","PL","PERL","SH","SQL","TXT"); + $this->_port_available=($port_mode==TRUE); + $this->SendMSG("Staring FTP client class".($this->_port_available?"":" without PORT mode support")); + $this->_connected=FALSE; + $this->_ready=FALSE; + $this->_can_restore=FALSE; + $this->_code=0; + $this->_message=""; + $this->_ftp_buff_size=4096; + $this->_curtype=NULL; + $this->SetUmask(0022); + $this->SetType(FTP_AUTOASCII); + $this->SetTimeout(30); + $this->Passive(!$this->_port_available); + $this->_login="anonymous"; + $this->_password="anon@ftp.com"; + $this->_features=array(); + $this->OS_local=FTP_OS_Unix; + $this->OS_remote=FTP_OS_Unix; + $this->features=array(); + if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') $this->OS_local=FTP_OS_Windows; + elseif(strtoupper(substr(PHP_OS, 0, 3)) === 'MAC') $this->OS_local=FTP_OS_Mac; + } + +// +// +// + + function parselisting($line) { + $is_windows = ($this->OS_remote == FTP_OS_Windows); + if ($is_windows && preg_match("/([0-9]{2})-([0-9]{2})-([0-9]{2}) +([0-9]{2}):([0-9]{2})(AM|PM) +([0-9]+|) +(.+)/",$line,$lucifer)) { + $b = array(); + if ($lucifer[3]<70) { $lucifer[3]+=2000; } else { $lucifer[3]+=1900; } // 4digit year fix + $b['isdir'] = ($lucifer[7]==""); + if ( $b['isdir'] ) + $b['type'] = 'd'; + else + $b['type'] = 'f'; + $b['size'] = $lucifer[7]; + $b['month'] = $lucifer[1]; + $b['day'] = $lucifer[2]; + $b['year'] = $lucifer[3]; + $b['hour'] = $lucifer[4]; + $b['minute'] = $lucifer[5]; + $b['time'] = @mktime($lucifer[4]+(strcasecmp($lucifer[6],"PM")==0?12:0),$lucifer[5],0,$lucifer[1],$lucifer[2],$lucifer[3]); + $b['am/pm'] = $lucifer[6]; + $b['name'] = $lucifer[8]; + } else if (!$is_windows && $lucifer=preg_split("/[ ]/",$line,9,PREG_SPLIT_NO_EMPTY)) { + //echo $line."\n"; + $lcount=count($lucifer); + if ($lcount<8) return ''; + $b = array(); + $b['isdir'] = $lucifer[0]{0} === "d"; + $b['islink'] = $lucifer[0]{0} === "l"; + if ( $b['isdir'] ) + $b['type'] = 'd'; + elseif ( $b['islink'] ) + $b['type'] = 'l'; + else + $b['type'] = 'f'; + $b['perms'] = $lucifer[0]; + $b['number'] = $lucifer[1]; + $b['owner'] = $lucifer[2]; + $b['group'] = $lucifer[3]; + $b['size'] = $lucifer[4]; + if ($lcount==8) { + sscanf($lucifer[5],"%d-%d-%d",$b['year'],$b['month'],$b['day']); + sscanf($lucifer[6],"%d:%d",$b['hour'],$b['minute']); + $b['time'] = @mktime($b['hour'],$b['minute'],0,$b['month'],$b['day'],$b['year']); + $b['name'] = $lucifer[7]; + } else { + $b['month'] = $lucifer[5]; + $b['day'] = $lucifer[6]; + if (preg_match("/([0-9]{2}):([0-9]{2})/",$lucifer[7],$l2)) { + $b['year'] = date("Y"); + $b['hour'] = $l2[1]; + $b['minute'] = $l2[2]; + } else { + $b['year'] = $lucifer[7]; + $b['hour'] = 0; + $b['minute'] = 0; + } + $b['time'] = strtotime(sprintf("%d %s %d %02d:%02d",$b['day'],$b['month'],$b['year'],$b['hour'],$b['minute'])); + $b['name'] = $lucifer[8]; + } + } + + return $b; + } + + function SendMSG($message = "", $crlf=true) { + if ($this->Verbose) { + echo $message.($crlf?CRLF:""); + flush(); + } + return TRUE; + } + + function SetType($mode=FTP_AUTOASCII) { + if(!in_array($mode, $this->AuthorizedTransferMode)) { + $this->SendMSG("Wrong type"); + return FALSE; + } + $this->_type=$mode; + $this->SendMSG("Transfer type: ".($this->_type==FTP_BINARY?"binary":($this->_type==FTP_ASCII?"ASCII":"auto ASCII") ) ); + return TRUE; + } + + function _settype($mode=FTP_ASCII) { + if($this->_ready) { + if($mode==FTP_BINARY) { + if($this->_curtype!=FTP_BINARY) { + if(!$this->_exec("TYPE I", "SetType")) return FALSE; + $this->_curtype=FTP_BINARY; + } + } elseif($this->_curtype!=FTP_ASCII) { + if(!$this->_exec("TYPE A", "SetType")) return FALSE; + $this->_curtype=FTP_ASCII; + } + } else return FALSE; + return TRUE; + } + + function Passive($pasv=NULL) { + if(is_null($pasv)) $this->_passive=!$this->_passive; + else $this->_passive=$pasv; + if(!$this->_port_available and !$this->_passive) { + $this->SendMSG("Only passive connections available!"); + $this->_passive=TRUE; + return FALSE; + } + $this->SendMSG("Passive mode ".($this->_passive?"on":"off")); + return TRUE; + } + + function SetServer($host, $port=21, $reconnect=true) { + if(!is_long($port)) { + $this->verbose=true; + $this->SendMSG("Incorrect port syntax"); + return FALSE; + } else { + $ip=@gethostbyname($host); + $dns=@gethostbyaddr($host); + if(!$ip) $ip=$host; + if(!$dns) $dns=$host; + // Validate the IPAddress PHP4 returns -1 for invalid, PHP5 false + // -1 === "255.255.255.255" which is the broadcast address which is also going to be invalid + $ipaslong = ip2long($ip); + if ( ($ipaslong == false) || ($ipaslong === -1) ) { + $this->SendMSG("Wrong host name/address \"".$host."\""); + return FALSE; + } + $this->_host=$ip; + $this->_fullhost=$dns; + $this->_port=$port; + $this->_dataport=$port-1; + } + $this->SendMSG("Host \"".$this->_fullhost."(".$this->_host."):".$this->_port."\""); + if($reconnect){ + if($this->_connected) { + $this->SendMSG("Reconnecting"); + if(!$this->quit(FTP_FORCE)) return FALSE; + if(!$this->connect()) return FALSE; + } + } + return TRUE; + } + + function SetUmask($umask=0022) { + $this->_umask=$umask; + umask($this->_umask); + $this->SendMSG("UMASK 0".decoct($this->_umask)); + return TRUE; + } + + function SetTimeout($timeout=30) { + $this->_timeout=$timeout; + $this->SendMSG("Timeout ".$this->_timeout); + if($this->_connected) + if(!$this->_settimeout($this->_ftp_control_sock)) return FALSE; + return TRUE; + } + + function connect($server=NULL) { + if(!empty($server)) { + if(!$this->SetServer($server)) return false; + } + if($this->_ready) return true; + $this->SendMsg('Local OS : '.$this->OS_FullName[$this->OS_local]); + if(!($this->_ftp_control_sock = $this->_connect($this->_host, $this->_port))) { + $this->SendMSG("Error : Cannot connect to remote host \"".$this->_fullhost." :".$this->_port."\""); + return FALSE; + } + $this->SendMSG("Connected to remote host \"".$this->_fullhost.":".$this->_port."\". Waiting for greeting."); + do { + if(!$this->_readmsg()) return FALSE; + if(!$this->_checkCode()) return FALSE; + $this->_lastaction=time(); + } while($this->_code<200); + $this->_ready=true; + $syst=$this->systype(); + if(!$syst) $this->SendMSG("Can't detect remote OS"); + else { + if(preg_match("/win|dos|novell/i", $syst[0])) $this->OS_remote=FTP_OS_Windows; + elseif(preg_match("/os/i", $syst[0])) $this->OS_remote=FTP_OS_Mac; + elseif(preg_match("/(li|u)nix/i", $syst[0])) $this->OS_remote=FTP_OS_Unix; + else $this->OS_remote=FTP_OS_Mac; + $this->SendMSG("Remote OS: ".$this->OS_FullName[$this->OS_remote]); + } + if(!$this->features()) $this->SendMSG("Can't get features list. All supported - disabled"); + else $this->SendMSG("Supported features: ".implode(", ", array_keys($this->_features))); + return TRUE; + } + + function quit($force=false) { + if($this->_ready) { + if(!$this->_exec("QUIT") and !$force) return FALSE; + if(!$this->_checkCode() and !$force) return FALSE; + $this->_ready=false; + $this->SendMSG("Session finished"); + } + $this->_quit(); + return TRUE; + } + + function login($user=NULL, $pass=NULL) { + if(!is_null($user)) $this->_login=$user; + else $this->_login="anonymous"; + if(!is_null($pass)) $this->_password=$pass; + else $this->_password="anon@anon.com"; + if(!$this->_exec("USER ".$this->_login, "login")) return FALSE; + if(!$this->_checkCode()) return FALSE; + if($this->_code!=230) { + if(!$this->_exec((($this->_code==331)?"PASS ":"ACCT ").$this->_password, "login")) return FALSE; + if(!$this->_checkCode()) return FALSE; + } + $this->SendMSG("Authentication succeeded"); + if(empty($this->_features)) { + if(!$this->features()) $this->SendMSG("Can't get features list. All supported - disabled"); + else $this->SendMSG("Supported features: ".implode(", ", array_keys($this->_features))); + } + return TRUE; + } + + function pwd() { + if(!$this->_exec("PWD", "pwd")) return FALSE; + if(!$this->_checkCode()) return FALSE; + return ereg_replace("^[0-9]{3} \"(.+)\".+", "\\1", $this->_message); + } + + function cdup() { + if(!$this->_exec("CDUP", "cdup")) return FALSE; + if(!$this->_checkCode()) return FALSE; + return true; + } + + function chdir($pathname) { + if(!$this->_exec("CWD ".$pathname, "chdir")) return FALSE; + if(!$this->_checkCode()) return FALSE; + return TRUE; + } + + function rmdir($pathname) { + if(!$this->_exec("RMD ".$pathname, "rmdir")) return FALSE; + if(!$this->_checkCode()) return FALSE; + return TRUE; + } + + function mkdir($pathname) { + if(!$this->_exec("MKD ".$pathname, "mkdir")) return FALSE; + if(!$this->_checkCode()) return FALSE; + return TRUE; + } + + function rename($from, $to) { + if(!$this->_exec("RNFR ".$from, "rename")) return FALSE; + if(!$this->_checkCode()) return FALSE; + if($this->_code==350) { + if(!$this->_exec("RNTO ".$to, "rename")) return FALSE; + if(!$this->_checkCode()) return FALSE; + } else return FALSE; + return TRUE; + } + + function filesize($pathname) { + if(!isset($this->_features["SIZE"])) { + $this->PushError("filesize", "not supported by server"); + return FALSE; + } + if(!$this->_exec("SIZE ".$pathname, "filesize")) return FALSE; + if(!$this->_checkCode()) return FALSE; + return ereg_replace("^[0-9]{3} ([0-9]+)".CRLF, "\\1", $this->_message); + } + + function abort() { + if(!$this->_exec("ABOR", "abort")) return FALSE; + if(!$this->_checkCode()) { + if($this->_code!=426) return FALSE; + if(!$this->_readmsg("abort")) return FALSE; + if(!$this->_checkCode()) return FALSE; + } + return true; + } + + function mdtm($pathname) { + if(!isset($this->_features["MDTM"])) { + $this->PushError("mdtm", "not supported by server"); + return FALSE; + } + if(!$this->_exec("MDTM ".$pathname, "mdtm")) return FALSE; + if(!$this->_checkCode()) return FALSE; + $mdtm = ereg_replace("^[0-9]{3} ([0-9]+)".CRLF, "\\1", $this->_message); + $date = sscanf($mdtm, "%4d%2d%2d%2d%2d%2d"); + $timestamp = mktime($date[3], $date[4], $date[5], $date[1], $date[2], $date[0]); + return $timestamp; + } + + function systype() { + if(!$this->_exec("SYST", "systype")) return FALSE; + if(!$this->_checkCode()) return FALSE; + $DATA = explode(" ", $this->_message); + return array($DATA[1], $DATA[3]); + } + + function delete($pathname) { + if(!$this->_exec("DELE ".$pathname, "delete")) return FALSE; + if(!$this->_checkCode()) return FALSE; + return TRUE; + } + + function site($command, $fnction="site") { + if(!$this->_exec("SITE ".$command, $fnction)) return FALSE; + if(!$this->_checkCode()) return FALSE; + return TRUE; + } + + function chmod($pathname, $mode) { + if(!$this->site( sprintf('CHMOD %o %s', $mode, $pathname), "chmod")) return FALSE; + return TRUE; + } + + function restore($from) { + if(!isset($this->_features["REST"])) { + $this->PushError("restore", "not supported by server"); + return FALSE; + } + if($this->_curtype!=FTP_BINARY) { + $this->PushError("restore", "can't restore in ASCII mode"); + return FALSE; + } + if(!$this->_exec("REST ".$from, "resore")) return FALSE; + if(!$this->_checkCode()) return FALSE; + return TRUE; + } + + function features() { + if(!$this->_exec("FEAT", "features")) return FALSE; + if(!$this->_checkCode()) return FALSE; + $f=preg_split("/[".CRLF."]+/", preg_replace("/[0-9]{3}[ -].*[".CRLF."]+/", "", $this->_message), -1, PREG_SPLIT_NO_EMPTY); + $this->_features=array(); + foreach($f as $k=>$v) { + $v=explode(" ", trim($v)); + $this->_features[array_shift($v)]=$v; + } + return true; + } + + function rawlist($pathname="", $arg="") { + return $this->_list(($arg?" ".$arg:"").($pathname?" ".$pathname:""), "LIST", "rawlist"); + } + + function nlist($pathname="") { + return $this->_list(($arg?" ".$arg:"").($pathname?" ".$pathname:""), "NLST", "nlist"); + } + + function is_exists($pathname) { + return $this->file_exists($pathname); + } + + function file_exists($pathname) { + $exists=true; + if(!$this->_exec("RNFR ".$pathname, "rename")) $exists=FALSE; + else { + if(!$this->_checkCode()) $exists=FALSE; + $this->abort(); + } + if($exists) $this->SendMSG("Remote file ".$pathname." exists"); + else $this->SendMSG("Remote file ".$pathname." does not exist"); + return $exists; + } + + function fget($fp, $remotefile,$rest=0) { + if($this->_can_restore and $rest!=0) fseek($fp, $rest); + $pi=pathinfo($remotefile); + if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"]), $this->AutoAsciiExt))) $mode=FTP_ASCII; + else $mode=FTP_BINARY; + if(!$this->_data_prepare($mode)) { + return FALSE; + } + if($this->_can_restore and $rest!=0) $this->restore($rest); + if(!$this->_exec("RETR ".$remotefile, "get")) { + $this->_data_close(); + return FALSE; + } + if(!$this->_checkCode()) { + $this->_data_close(); + return FALSE; + } + $out=$this->_data_read($mode, $fp); + $this->_data_close(); + if(!$this->_readmsg()) return FALSE; + if(!$this->_checkCode()) return FALSE; + return $out; + } + + function get($remotefile, $localfile=NULL, $rest=0) { + if(is_null($localfile)) $localfile=$remotefile; + if (@file_exists($localfile)) $this->SendMSG("Warning : local file will be overwritten"); + $fp = @fopen($localfile, "w"); + if (!$fp) { + $this->PushError("get","can't open local file", "Cannot create \"".$localfile."\""); + return FALSE; + } + if($this->_can_restore and $rest!=0) fseek($fp, $rest); + $pi=pathinfo($remotefile); + if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"]), $this->AutoAsciiExt))) $mode=FTP_ASCII; + else $mode=FTP_BINARY; + if(!$this->_data_prepare($mode)) { + fclose($fp); + return FALSE; + } + if($this->_can_restore and $rest!=0) $this->restore($rest); + if(!$this->_exec("RETR ".$remotefile, "get")) { + $this->_data_close(); + fclose($fp); + return FALSE; + } + if(!$this->_checkCode()) { + $this->_data_close(); + fclose($fp); + return FALSE; + } + $out=$this->_data_read($mode, $fp); + fclose($fp); + $this->_data_close(); + if(!$this->_readmsg()) return FALSE; + if(!$this->_checkCode()) return FALSE; + return $out; + } + + function fput($remotefile, $fp) { + if($this->_can_restore and $rest!=0) fseek($fp, $rest); + $pi=pathinfo($remotefile); + if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"]), $this->AutoAsciiExt))) $mode=FTP_ASCII; + else $mode=FTP_BINARY; + if(!$this->_data_prepare($mode)) { + return FALSE; + } + if($this->_can_restore and $rest!=0) $this->restore($rest); + if(!$this->_exec("STOR ".$remotefile, "put")) { + $this->_data_close(); + return FALSE; + } + if(!$this->_checkCode()) { + $this->_data_close(); + return FALSE; + } + $ret=$this->_data_write($mode, $fp); + $this->_data_close(); + if(!$this->_readmsg()) return FALSE; + if(!$this->_checkCode()) return FALSE; + return $ret; + } + + function put($localfile, $remotefile=NULL, $rest=0) { + if(is_null($remotefile)) $remotefile=$localfile; + if (!file_exists($localfile)) { + $this->PushError("put","can't open local file", "No such file or directory \"".$localfile."\""); + return FALSE; + } + $fp = @fopen($localfile, "r"); + + if (!$fp) { + $this->PushError("put","can't open local file", "Cannot read file \"".$localfile."\""); + return FALSE; + } + if($this->_can_restore and $rest!=0) fseek($fp, $rest); + $pi=pathinfo($localfile); + if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"]), $this->AutoAsciiExt))) $mode=FTP_ASCII; + else $mode=FTP_BINARY; + if(!$this->_data_prepare($mode)) { + fclose($fp); + return FALSE; + } + if($this->_can_restore and $rest!=0) $this->restore($rest); + if(!$this->_exec("STOR ".$remotefile, "put")) { + $this->_data_close(); + fclose($fp); + return FALSE; + } + if(!$this->_checkCode()) { + $this->_data_close(); + fclose($fp); + return FALSE; + } + $ret=$this->_data_write($mode, $fp); + fclose($fp); + $this->_data_close(); + if(!$this->_readmsg()) return FALSE; + if(!$this->_checkCode()) return FALSE; + return $ret; + } + + function mput($local=".", $remote=NULL, $continious=false) { + $local=realpath($local); + if(!@file_exists($local)) { + $this->PushError("mput","can't open local folder", "Cannot stat folder \"".$local."\""); + return FALSE; + } + if(!is_dir($local)) return $this->put($local, $remote); + if(empty($remote)) $remote="."; + elseif(!$this->file_exists($remote) and !$this->mkdir($remote)) return FALSE; + if($handle = opendir($local)) { + $list=array(); + while (false !== ($file = readdir($handle))) { + if ($file != "." && $file != "..") $list[]=$file; + } + closedir($handle); + } else { + $this->PushError("mput","can't open local folder", "Cannot read folder \"".$local."\""); + return FALSE; + } + if(empty($list)) return TRUE; + $ret=true; + foreach($list as $el) { + if(is_dir($local."/".$el)) $t=$this->mput($local."/".$el, $remote."/".$el); + else $t=$this->put($local."/".$el, $remote."/".$el); + if(!$t) { + $ret=FALSE; + if(!$continious) break; + } + } + return $ret; + + } + + function mget($remote, $local=".", $continious=false) { + $list=$this->rawlist($remote, "-lA"); + if($list===false) { + $this->PushError("mget","can't read remote folder list", "Can't read remote folder \"".$remote."\" contents"); + return FALSE; + } + if(empty($list)) return true; + if(!@file_exists($local)) { + if(!@mkdir($local)) { + $this->PushError("mget","can't create local folder", "Cannot create folder \"".$local."\""); + return FALSE; + } + } + foreach($list as $k=>$v) { + $list[$k]=$this->parselisting($v); + if($list[$k]["name"]=="." or $list[$k]["name"]=="..") unset($list[$k]); + } + $ret=true; + foreach($list as $el) { + if($el["type"]=="d") { + if(!$this->mget($remote."/".$el["name"], $local."/".$el["name"], $continious)) { + $this->PushError("mget", "can't copy folder", "Can't copy remote folder \"".$remote."/".$el["name"]."\" to local \"".$local."/".$el["name"]."\""); + $ret=false; + if(!$continious) break; + } + } else { + if(!$this->get($remote."/".$el["name"], $local."/".$el["name"])) { + $this->PushError("mget", "can't copy file", "Can't copy remote file \"".$remote."/".$el["name"]."\" to local \"".$local."/".$el["name"]."\""); + $ret=false; + if(!$continious) break; + } + } + @chmod($local."/".$el["name"], $el["perms"]); + $t=strtotime($el["date"]); + if($t!==-1 and $t!==false) @touch($local."/".$el["name"], $t); + } + return $ret; + } + + function mdel($remote, $continious=false) { + $list=$this->rawlist($remote, "-la"); + if($list===false) { + $this->PushError("mdel","can't read remote folder list", "Can't read remote folder \"".$remote."\" contents"); + return false; + } + + foreach($list as $k=>$v) { + $list[$k]=$this->parselisting($v); + if($list[$k]["name"]=="." or $list[$k]["name"]=="..") unset($list[$k]); + } + $ret=true; + + foreach($list as $el) { + if ( empty($el) ) + continue; + + if($el["type"]=="d") { + if(!$this->mdel($remote."/".$el["name"], $continious)) { + $ret=false; + if(!$continious) break; + } + } else { + if (!$this->delete($remote."/".$el["name"])) { + $this->PushError("mdel", "can't delete file", "Can't delete remote file \"".$remote."/".$el["name"]."\""); + $ret=false; + if(!$continious) break; + } + } + } + + if(!$this->rmdir($remote)) { + $this->PushError("mdel", "can't delete folder", "Can't delete remote folder \"".$remote."/".$el["name"]."\""); + $ret=false; + } + return $ret; + } + + function mmkdir($dir, $mode = 0777) { + if(empty($dir)) return FALSE; + if($this->is_exists($dir) or $dir == "/" ) return TRUE; + if(!$this->mmkdir(dirname($dir), $mode)) return false; + $r=$this->mkdir($dir, $mode); + $this->chmod($dir,$mode); + return $r; + } + + function glob($pattern, $handle=NULL) { + $path=$output=null; + if(PHP_OS=='WIN32') $slash='\\'; + else $slash='/'; + $lastpos=strrpos($pattern,$slash); + if(!($lastpos===false)) { + $path=substr($pattern,0,-$lastpos-1); + $pattern=substr($pattern,$lastpos); + } else $path=getcwd(); + if(is_array($handle) and !empty($handle)) { + while($dir=each($handle)) { + if($this->glob_pattern_match($pattern,$dir)) + $output[]=$dir; + } + } else { + $handle=@opendir($path); + if($handle===false) return false; + while($dir=readdir($handle)) { + if($this->glob_pattern_match($pattern,$dir)) + $output[]=$dir; + } + closedir($handle); + } + if(is_array($output)) return $output; + return false; + } + + function glob_pattern_match($pattern,$string) { + $out=null; + $chunks=explode(';',$pattern); + foreach($chunks as $pattern) { + $escape=array('$','^','.','{','}','(',')','[',']','|'); + while(strpos($pattern,'**')!==false) + $pattern=str_replace('**','*',$pattern); + foreach($escape as $probe) + $pattern=str_replace($probe,"\\$probe",$pattern); + $pattern=str_replace('?*','*', + str_replace('*?','*', + str_replace('*',".*", + str_replace('?','.{1,1}',$pattern)))); + $out[]=$pattern; + } + if(count($out)==1) return($this->glob_regexp("^$out[0]$",$string)); + else { + foreach($out as $tester) + if($this->my_regexp("^$tester$",$string)) return true; + } + return false; + } + + function glob_regexp($pattern,$probe) { + $sensitive=(PHP_OS!='WIN32'); + return ($sensitive? + ereg($pattern,$probe): + eregi($pattern,$probe) + ); + } + + function dirlist($remote) { + $list=$this->rawlist($remote, "-la"); + if($list===false) { + $this->PushError("dirlist","can't read remote folder list", "Can't read remote folder \"".$remote."\" contents"); + return false; + } + + $dirlist = array(); + foreach($list as $k=>$v) { + $entry=$this->parselisting($v); + if ( empty($entry) ) + continue; + + if($entry["name"]=="." or $entry["name"]=="..") + continue; + + $dirlist[$entry['name']] = $entry; + } + + return $dirlist; + } +// +// +// + function _checkCode() { + return ($this->_code<400 and $this->_code>0); + } + + function _list($arg="", $cmd="LIST", $fnction="_list") { + if(!$this->_data_prepare()) return false; + if(!$this->_exec($cmd.$arg, $fnction)) { + $this->_data_close(); + return FALSE; + } + if(!$this->_checkCode()) { + $this->_data_close(); + return FALSE; + } + $out=""; + if($this->_code<200) { + $out=$this->_data_read(); + $this->_data_close(); + if(!$this->_readmsg()) return FALSE; + if(!$this->_checkCode()) return FALSE; + if($out === FALSE ) return FALSE; + $out=preg_split("/[".CRLF."]+/", $out, -1, PREG_SPLIT_NO_EMPTY); +// $this->SendMSG(implode($this->_eol_code[$this->OS_local], $out)); + } + return $out; + } + +// +// +// +// Gnre une erreur pour traitement externe la classe + function PushError($fctname,$msg,$desc=false){ + $error=array(); + $error['time']=time(); + $error['fctname']=$fctname; + $error['msg']=$msg; + $error['desc']=$desc; + if($desc) $tmp=' ('.$desc.')'; else $tmp=''; + $this->SendMSG($fctname.': '.$msg.$tmp); + return(array_push($this->_error_array,$error)); + } + +// Rcupre une erreur externe + function PopError(){ + if(count($this->_error_array)) return(array_pop($this->_error_array)); + else return(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"; +?> diff --git a/wp-admin/includes/class-pclzip.php b/wp-admin/includes/class-pclzip.php new file mode 100644 index 0000000..5e6a619 --- /dev/null +++ b/wp-admin/includes/class-pclzip.php @@ -0,0 +1,5687 @@ +zipname = $p_zipname; + $this->zip_fd = 0; + $this->magic_quotes_status = -1; + + // ----- Return + return; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : + // create($p_filelist, $p_add_dir="", $p_remove_dir="") + // create($p_filelist, $p_option, $p_option_value, ...) + // Description : + // This method supports two different synopsis. The first one is historical. + // This method creates a Zip Archive. The Zip file is created in the + // filesystem. The files and directories indicated in $p_filelist + // are added in the archive. See the parameters description for the + // supported format of $p_filelist. + // When a directory is in the list, the directory and its content is added + // in the archive. + // In this synopsis, the function takes an optional variable list of + // options. See bellow the supported options. + // Parameters : + // $p_filelist : An array containing file or directory names, or + // a string containing one filename or one directory name, or + // a string containing a list of filenames and/or directory + // names separated by spaces. + // $p_add_dir : A path to add before the real path of the archived file, + // in order to have it memorized in the archive. + // $p_remove_dir : A path to remove from the real path of the file to archive, + // in order to have a shorter path memorized in the archive. + // When $p_add_dir and $p_remove_dir are set, $p_remove_dir + // is removed first, before $p_add_dir is added. + // Options : + // PCLZIP_OPT_ADD_PATH : + // PCLZIP_OPT_REMOVE_PATH : + // PCLZIP_OPT_REMOVE_ALL_PATH : + // PCLZIP_OPT_COMMENT : + // PCLZIP_CB_PRE_ADD : + // PCLZIP_CB_POST_ADD : + // Return Values : + // 0 on failure, + // The list of the added files, with a status of the add action. + // (see PclZip::listContent() for list entry format) + // -------------------------------------------------------------------------------- + function create($p_filelist) + { + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Set default values + $v_options = array(); + $v_options[PCLZIP_OPT_NO_COMPRESSION] = FALSE; + + // ----- Look for variable options arguments + $v_size = func_num_args(); + + // ----- Look for arguments + if ($v_size > 1) { + // ----- Get the arguments + $v_arg_list = func_get_args(); + + // ----- Remove from the options list the first argument + array_shift($v_arg_list); + $v_size--; + + // ----- Look for first arg + if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) { + + // ----- Parse the options + $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, + array (PCLZIP_OPT_REMOVE_PATH => 'optional', + PCLZIP_OPT_REMOVE_ALL_PATH => 'optional', + PCLZIP_OPT_ADD_PATH => 'optional', + PCLZIP_CB_PRE_ADD => 'optional', + PCLZIP_CB_POST_ADD => 'optional', + PCLZIP_OPT_NO_COMPRESSION => 'optional', + PCLZIP_OPT_COMMENT => 'optional', + PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional', + PCLZIP_OPT_TEMP_FILE_ON => 'optional', + PCLZIP_OPT_TEMP_FILE_OFF => 'optional' + //, PCLZIP_OPT_CRYPT => 'optional' + )); + if ($v_result != 1) { + return 0; + } + } + + // ----- Look for 2 args + // Here we need to support the first historic synopsis of the + // method. + else { + + // ----- Get the first argument + $v_options[PCLZIP_OPT_ADD_PATH] = $v_arg_list[0]; + + // ----- Look for the optional second argument + if ($v_size == 2) { + $v_options[PCLZIP_OPT_REMOVE_PATH] = $v_arg_list[1]; + } + else if ($v_size > 2) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, + "Invalid number / type of arguments"); + return 0; + } + } + } + + // ----- Look for default option values + $this->privOptionDefaultThreshold($v_options); + + // ----- Init + $v_string_list = array(); + $v_att_list = array(); + $v_filedescr_list = array(); + $p_result_list = array(); + + // ----- Look if the $p_filelist is really an array + if (is_array($p_filelist)) { + + // ----- Look if the first element is also an array + // This will mean that this is a file description entry + if (isset($p_filelist[0]) && is_array($p_filelist[0])) { + $v_att_list = $p_filelist; + } + + // ----- The list is a list of string names + else { + $v_string_list = $p_filelist; + } + } + + // ----- Look if the $p_filelist is a string + else if (is_string($p_filelist)) { + // ----- Create a list from the string + $v_string_list = explode(PCLZIP_SEPARATOR, $p_filelist); + } + + // ----- Invalid variable type for $p_filelist + else { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_filelist"); + return 0; + } + + // ----- Reformat the string list + if (sizeof($v_string_list) != 0) { + foreach ($v_string_list as $v_string) { + if ($v_string != '') { + $v_att_list[][PCLZIP_ATT_FILE_NAME] = $v_string; + } + else { + } + } + } + + // ----- For each file in the list check the attributes + $v_supported_attributes + = array ( PCLZIP_ATT_FILE_NAME => 'mandatory' + ,PCLZIP_ATT_FILE_NEW_SHORT_NAME => 'optional' + ,PCLZIP_ATT_FILE_NEW_FULL_NAME => 'optional' + ,PCLZIP_ATT_FILE_MTIME => 'optional' + ,PCLZIP_ATT_FILE_CONTENT => 'optional' + ,PCLZIP_ATT_FILE_COMMENT => 'optional' + ); + foreach ($v_att_list as $v_entry) { + $v_result = $this->privFileDescrParseAtt($v_entry, + $v_filedescr_list[], + $v_options, + $v_supported_attributes); + if ($v_result != 1) { + return 0; + } + } + + // ----- Expand the filelist (expand directories) + $v_result = $this->privFileDescrExpand($v_filedescr_list, $v_options); + if ($v_result != 1) { + return 0; + } + + // ----- Call the create fct + $v_result = $this->privCreate($v_filedescr_list, $p_result_list, $v_options); + if ($v_result != 1) { + return 0; + } + + // ----- Return + return $p_result_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : + // add($p_filelist, $p_add_dir="", $p_remove_dir="") + // add($p_filelist, $p_option, $p_option_value, ...) + // Description : + // This method supports two synopsis. The first one is historical. + // This methods add the list of files in an existing archive. + // If a file with the same name already exists, it is added at the end of the + // archive, the first one is still present. + // If the archive does not exist, it is created. + // Parameters : + // $p_filelist : An array containing file or directory names, or + // a string containing one filename or one directory name, or + // a string containing a list of filenames and/or directory + // names separated by spaces. + // $p_add_dir : A path to add before the real path of the archived file, + // in order to have it memorized in the archive. + // $p_remove_dir : A path to remove from the real path of the file to archive, + // in order to have a shorter path memorized in the archive. + // When $p_add_dir and $p_remove_dir are set, $p_remove_dir + // is removed first, before $p_add_dir is added. + // Options : + // PCLZIP_OPT_ADD_PATH : + // PCLZIP_OPT_REMOVE_PATH : + // PCLZIP_OPT_REMOVE_ALL_PATH : + // PCLZIP_OPT_COMMENT : + // PCLZIP_OPT_ADD_COMMENT : + // PCLZIP_OPT_PREPEND_COMMENT : + // PCLZIP_CB_PRE_ADD : + // PCLZIP_CB_POST_ADD : + // Return Values : + // 0 on failure, + // The list of the added files, with a status of the add action. + // (see PclZip::listContent() for list entry format) + // -------------------------------------------------------------------------------- + function add($p_filelist) + { + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Set default values + $v_options = array(); + $v_options[PCLZIP_OPT_NO_COMPRESSION] = FALSE; + + // ----- Look for variable options arguments + $v_size = func_num_args(); + + // ----- Look for arguments + if ($v_size > 1) { + // ----- Get the arguments + $v_arg_list = func_get_args(); + + // ----- Remove form the options list the first argument + array_shift($v_arg_list); + $v_size--; + + // ----- Look for first arg + if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) { + + // ----- Parse the options + $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, + array (PCLZIP_OPT_REMOVE_PATH => 'optional', + PCLZIP_OPT_REMOVE_ALL_PATH => 'optional', + PCLZIP_OPT_ADD_PATH => 'optional', + PCLZIP_CB_PRE_ADD => 'optional', + PCLZIP_CB_POST_ADD => 'optional', + PCLZIP_OPT_NO_COMPRESSION => 'optional', + PCLZIP_OPT_COMMENT => 'optional', + PCLZIP_OPT_ADD_COMMENT => 'optional', + PCLZIP_OPT_PREPEND_COMMENT => 'optional', + PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional', + PCLZIP_OPT_TEMP_FILE_ON => 'optional', + PCLZIP_OPT_TEMP_FILE_OFF => 'optional' + //, PCLZIP_OPT_CRYPT => 'optional' + )); + if ($v_result != 1) { + return 0; + } + } + + // ----- Look for 2 args + // Here we need to support the first historic synopsis of the + // method. + else { + + // ----- Get the first argument + $v_options[PCLZIP_OPT_ADD_PATH] = $v_add_path = $v_arg_list[0]; + + // ----- Look for the optional second argument + if ($v_size == 2) { + $v_options[PCLZIP_OPT_REMOVE_PATH] = $v_arg_list[1]; + } + else if ($v_size > 2) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments"); + + // ----- Return + return 0; + } + } + } + + // ----- Look for default option values + $this->privOptionDefaultThreshold($v_options); + + // ----- Init + $v_string_list = array(); + $v_att_list = array(); + $v_filedescr_list = array(); + $p_result_list = array(); + + // ----- Look if the $p_filelist is really an array + if (is_array($p_filelist)) { + + // ----- Look if the first element is also an array + // This will mean that this is a file description entry + if (isset($p_filelist[0]) && is_array($p_filelist[0])) { + $v_att_list = $p_filelist; + } + + // ----- The list is a list of string names + else { + $v_string_list = $p_filelist; + } + } + + // ----- Look if the $p_filelist is a string + else if (is_string($p_filelist)) { + // ----- Create a list from the string + $v_string_list = explode(PCLZIP_SEPARATOR, $p_filelist); + } + + // ----- Invalid variable type for $p_filelist + else { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type '".gettype($p_filelist)."' for p_filelist"); + return 0; + } + + // ----- Reformat the string list + if (sizeof($v_string_list) != 0) { + foreach ($v_string_list as $v_string) { + $v_att_list[][PCLZIP_ATT_FILE_NAME] = $v_string; + } + } + + // ----- For each file in the list check the attributes + $v_supported_attributes + = array ( PCLZIP_ATT_FILE_NAME => 'mandatory' + ,PCLZIP_ATT_FILE_NEW_SHORT_NAME => 'optional' + ,PCLZIP_ATT_FILE_NEW_FULL_NAME => 'optional' + ,PCLZIP_ATT_FILE_MTIME => 'optional' + ,PCLZIP_ATT_FILE_CONTENT => 'optional' + ,PCLZIP_ATT_FILE_COMMENT => 'optional' + ); + foreach ($v_att_list as $v_entry) { + $v_result = $this->privFileDescrParseAtt($v_entry, + $v_filedescr_list[], + $v_options, + $v_supported_attributes); + if ($v_result != 1) { + return 0; + } + } + + // ----- Expand the filelist (expand directories) + $v_result = $this->privFileDescrExpand($v_filedescr_list, $v_options); + if ($v_result != 1) { + return 0; + } + + // ----- Call the create fct + $v_result = $this->privAdd($v_filedescr_list, $p_result_list, $v_options); + if ($v_result != 1) { + return 0; + } + + // ----- Return + return $p_result_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : listContent() + // Description : + // This public method, gives the list of the files and directories, with their + // properties. + // The properties of each entries in the list are (used also in other functions) : + // filename : Name of the file. For a create or add action it is the filename + // given by the user. For an extract function it is the filename + // of the extracted file. + // stored_filename : Name of the file / directory stored in the archive. + // size : Size of the stored file. + // compressed_size : Size of the file's data compressed in the archive + // (without the headers overhead) + // mtime : Last known modification date of the file (UNIX timestamp) + // comment : Comment associated with the file + // folder : true | false + // index : index of the file in the archive + // status : status of the action (depending of the action) : + // Values are : + // ok : OK ! + // filtered : the file / dir is not extracted (filtered by user) + // already_a_directory : the file can not be extracted because a + // directory with the same name already exists + // write_protected : the file can not be extracted because a file + // with the same name already exists and is + // write protected + // newer_exist : the file was not extracted because a newer file exists + // path_creation_fail : the file is not extracted because the folder + // does not exist and can not be created + // write_error : the file was not extracted because there was a + // error while writing the file + // read_error : the file was not extracted because there was a error + // while reading the file + // invalid_header : the file was not extracted because of an archive + // format error (bad file header) + // Note that each time a method can continue operating when there + // is an action error on a file, the error is only logged in the file status. + // Return Values : + // 0 on an unrecoverable failure, + // The list of the files in the archive. + // -------------------------------------------------------------------------------- + function listContent() + { + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + return(0); + } + + // ----- Call the extracting fct + $p_list = array(); + if (($v_result = $this->privList($p_list)) != 1) + { + unset($p_list); + return(0); + } + + // ----- Return + return $p_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : + // extract($p_path="./", $p_remove_path="") + // extract([$p_option, $p_option_value, ...]) + // Description : + // This method supports two synopsis. The first one is historical. + // This method extract all the files / directories from the archive to the + // folder indicated in $p_path. + // If you want to ignore the 'root' part of path of the memorized files + // you can indicate this in the optional $p_remove_path parameter. + // By default, if a newer file with the same name already exists, the + // file is not extracted. + // + // If both PCLZIP_OPT_PATH and PCLZIP_OPT_ADD_PATH aoptions + // are used, the path indicated in PCLZIP_OPT_ADD_PATH is append + // at the end of the path value of PCLZIP_OPT_PATH. + // Parameters : + // $p_path : Path where the files and directories are to be extracted + // $p_remove_path : First part ('root' part) of the memorized path + // (if any similar) to remove while extracting. + // Options : + // PCLZIP_OPT_PATH : + // PCLZIP_OPT_ADD_PATH : + // PCLZIP_OPT_REMOVE_PATH : + // PCLZIP_OPT_REMOVE_ALL_PATH : + // PCLZIP_CB_PRE_EXTRACT : + // PCLZIP_CB_POST_EXTRACT : + // Return Values : + // 0 or a negative value on failure, + // The list of the extracted files, with a status of the action. + // (see PclZip::listContent() for list entry format) + // -------------------------------------------------------------------------------- + function extract() + { + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + return(0); + } + + // ----- Set default values + $v_options = array(); +// $v_path = "./"; + $v_path = ''; + $v_remove_path = ""; + $v_remove_all_path = false; + + // ----- Look for variable options arguments + $v_size = func_num_args(); + + // ----- Default values for option + $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE; + + // ----- Look for arguments + if ($v_size > 0) { + // ----- Get the arguments + $v_arg_list = func_get_args(); + + // ----- Look for first arg + if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) { + + // ----- Parse the options + $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, + array (PCLZIP_OPT_PATH => 'optional', + PCLZIP_OPT_REMOVE_PATH => 'optional', + PCLZIP_OPT_REMOVE_ALL_PATH => 'optional', + PCLZIP_OPT_ADD_PATH => 'optional', + PCLZIP_CB_PRE_EXTRACT => 'optional', + PCLZIP_CB_POST_EXTRACT => 'optional', + PCLZIP_OPT_SET_CHMOD => 'optional', + PCLZIP_OPT_BY_NAME => 'optional', + PCLZIP_OPT_BY_EREG => 'optional', + PCLZIP_OPT_BY_PREG => 'optional', + PCLZIP_OPT_BY_INDEX => 'optional', + PCLZIP_OPT_EXTRACT_AS_STRING => 'optional', + PCLZIP_OPT_EXTRACT_IN_OUTPUT => 'optional', + PCLZIP_OPT_REPLACE_NEWER => 'optional' + ,PCLZIP_OPT_STOP_ON_ERROR => 'optional' + ,PCLZIP_OPT_EXTRACT_DIR_RESTRICTION => 'optional', + PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional', + PCLZIP_OPT_TEMP_FILE_ON => 'optional', + PCLZIP_OPT_TEMP_FILE_OFF => 'optional' + )); + if ($v_result != 1) { + return 0; + } + + // ----- Set the arguments + if (isset($v_options[PCLZIP_OPT_PATH])) { + $v_path = $v_options[PCLZIP_OPT_PATH]; + } + if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) { + $v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH]; + } + if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) { + $v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH]; + } + if (isset($v_options[PCLZIP_OPT_ADD_PATH])) { + // ----- Check for '/' in last path char + if ((strlen($v_path) > 0) && (substr($v_path, -1) != '/')) { + $v_path .= '/'; + } + $v_path .= $v_options[PCLZIP_OPT_ADD_PATH]; + } + } + + // ----- Look for 2 args + // Here we need to support the first historic synopsis of the + // method. + else { + + // ----- Get the first argument + $v_path = $v_arg_list[0]; + + // ----- Look for the optional second argument + if ($v_size == 2) { + $v_remove_path = $v_arg_list[1]; + } + else if ($v_size > 2) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments"); + + // ----- Return + return 0; + } + } + } + + // ----- Look for default option values + $this->privOptionDefaultThreshold($v_options); + + // ----- Trace + + // ----- Call the extracting fct + $p_list = array(); + $v_result = $this->privExtractByRule($p_list, $v_path, $v_remove_path, + $v_remove_all_path, $v_options); + if ($v_result < 1) { + unset($p_list); + return(0); + } + + // ----- Return + return $p_list; + } + // -------------------------------------------------------------------------------- + + + // -------------------------------------------------------------------------------- + // Function : + // extractByIndex($p_index, $p_path="./", $p_remove_path="") + // extractByIndex($p_index, [$p_option, $p_option_value, ...]) + // Description : + // This method supports two synopsis. The first one is historical. + // This method is doing a partial extract of the archive. + // The extracted files or folders are identified by their index in the + // archive (from 0 to n). + // Note that if the index identify a folder, only the folder entry is + // extracted, not all the files included in the archive. + // Parameters : + // $p_index : A single index (integer) or a string of indexes of files to + // extract. The form of the string is "0,4-6,8-12" with only numbers + // and '-' for range or ',' to separate ranges. No spaces or ';' + // are allowed. + // $p_path : Path where the files and directories are to be extracted + // $p_remove_path : First part ('root' part) of the memorized path + // (if any similar) to remove while extracting. + // Options : + // PCLZIP_OPT_PATH : + // PCLZIP_OPT_ADD_PATH : + // PCLZIP_OPT_REMOVE_PATH : + // PCLZIP_OPT_REMOVE_ALL_PATH : + // PCLZIP_OPT_EXTRACT_AS_STRING : The files are extracted as strings and + // not as files. + // The resulting content is in a new field 'content' in the file + // structure. + // This option must be used alone (any other options are ignored). + // PCLZIP_CB_PRE_EXTRACT : + // PCLZIP_CB_POST_EXTRACT : + // Return Values : + // 0 on failure, + // The list of the extracted files, with a status of the action. + // (see PclZip::listContent() for list entry format) + // -------------------------------------------------------------------------------- + //function extractByIndex($p_index, options...) + function extractByIndex($p_index) + { + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + return(0); + } + + // ----- Set default values + $v_options = array(); +// $v_path = "./"; + $v_path = ''; + $v_remove_path = ""; + $v_remove_all_path = false; + + // ----- Look for variable options arguments + $v_size = func_num_args(); + + // ----- Default values for option + $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE; + + // ----- Look for arguments + if ($v_size > 1) { + // ----- Get the arguments + $v_arg_list = func_get_args(); + + // ----- Remove form the options list the first argument + array_shift($v_arg_list); + $v_size--; + + // ----- Look for first arg + if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) { + + // ----- Parse the options + $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, + array (PCLZIP_OPT_PATH => 'optional', + PCLZIP_OPT_REMOVE_PATH => 'optional', + PCLZIP_OPT_REMOVE_ALL_PATH => 'optional', + PCLZIP_OPT_EXTRACT_AS_STRING => 'optional', + PCLZIP_OPT_ADD_PATH => 'optional', + PCLZIP_CB_PRE_EXTRACT => 'optional', + PCLZIP_CB_POST_EXTRACT => 'optional', + PCLZIP_OPT_SET_CHMOD => 'optional', + PCLZIP_OPT_REPLACE_NEWER => 'optional' + ,PCLZIP_OPT_STOP_ON_ERROR => 'optional' + ,PCLZIP_OPT_EXTRACT_DIR_RESTRICTION => 'optional', + PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional', + PCLZIP_OPT_TEMP_FILE_ON => 'optional', + PCLZIP_OPT_TEMP_FILE_OFF => 'optional' + )); + if ($v_result != 1) { + return 0; + } + + // ----- Set the arguments + if (isset($v_options[PCLZIP_OPT_PATH])) { + $v_path = $v_options[PCLZIP_OPT_PATH]; + } + if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) { + $v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH]; + } + if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) { + $v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH]; + } + if (isset($v_options[PCLZIP_OPT_ADD_PATH])) { + // ----- Check for '/' in last path char + if ((strlen($v_path) > 0) && (substr($v_path, -1) != '/')) { + $v_path .= '/'; + } + $v_path .= $v_options[PCLZIP_OPT_ADD_PATH]; + } + if (!isset($v_options[PCLZIP_OPT_EXTRACT_AS_STRING])) { + $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE; + } + else { + } + } + + // ----- Look for 2 args + // Here we need to support the first historic synopsis of the + // method. + else { + + // ----- Get the first argument + $v_path = $v_arg_list[0]; + + // ----- Look for the optional second argument + if ($v_size == 2) { + $v_remove_path = $v_arg_list[1]; + } + else if ($v_size > 2) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments"); + + // ----- Return + return 0; + } + } + } + + // ----- Trace + + // ----- Trick + // Here I want to reuse extractByRule(), so I need to parse the $p_index + // with privParseOptions() + $v_arg_trick = array (PCLZIP_OPT_BY_INDEX, $p_index); + $v_options_trick = array(); + $v_result = $this->privParseOptions($v_arg_trick, sizeof($v_arg_trick), $v_options_trick, + array (PCLZIP_OPT_BY_INDEX => 'optional' )); + if ($v_result != 1) { + return 0; + } + $v_options[PCLZIP_OPT_BY_INDEX] = $v_options_trick[PCLZIP_OPT_BY_INDEX]; + + // ----- Look for default option values + $this->privOptionDefaultThreshold($v_options); + + // ----- Call the extracting fct + if (($v_result = $this->privExtractByRule($p_list, $v_path, $v_remove_path, $v_remove_all_path, $v_options)) < 1) { + return(0); + } + + // ----- Return + return $p_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : + // delete([$p_option, $p_option_value, ...]) + // Description : + // This method removes files from the archive. + // If no parameters are given, then all the archive is emptied. + // Parameters : + // None or optional arguments. + // Options : + // PCLZIP_OPT_BY_INDEX : + // PCLZIP_OPT_BY_NAME : + // PCLZIP_OPT_BY_EREG : + // PCLZIP_OPT_BY_PREG : + // Return Values : + // 0 on failure, + // The list of the files which are still present in the archive. + // (see PclZip::listContent() for list entry format) + // -------------------------------------------------------------------------------- + function delete() + { + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + return(0); + } + + // ----- Set default values + $v_options = array(); + + // ----- Look for variable options arguments + $v_size = func_num_args(); + + // ----- Look for arguments + if ($v_size > 0) { + // ----- Get the arguments + $v_arg_list = func_get_args(); + + // ----- Parse the options + $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, + array (PCLZIP_OPT_BY_NAME => 'optional', + PCLZIP_OPT_BY_EREG => 'optional', + PCLZIP_OPT_BY_PREG => 'optional', + PCLZIP_OPT_BY_INDEX => 'optional' )); + if ($v_result != 1) { + return 0; + } + } + + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Call the delete fct + $v_list = array(); + if (($v_result = $this->privDeleteByRule($v_list, $v_options)) != 1) { + $this->privSwapBackMagicQuotes(); + unset($v_list); + return(0); + } + + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : deleteByIndex() + // Description : + // ***** Deprecated ***** + // delete(PCLZIP_OPT_BY_INDEX, $p_index) should be prefered. + // -------------------------------------------------------------------------------- + function deleteByIndex($p_index) + { + + $p_list = $this->delete(PCLZIP_OPT_BY_INDEX, $p_index); + + // ----- Return + return $p_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : properties() + // Description : + // This method gives the properties of the archive. + // The properties are : + // nb : Number of files in the archive + // comment : Comment associated with the archive file + // status : not_exist, ok + // Parameters : + // None + // Return Values : + // 0 on failure, + // An array with the archive properties. + // -------------------------------------------------------------------------------- + function properties() + { + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + $this->privSwapBackMagicQuotes(); + return(0); + } + + // ----- Default properties + $v_prop = array(); + $v_prop['comment'] = ''; + $v_prop['nb'] = 0; + $v_prop['status'] = 'not_exist'; + + // ----- Look if file exists + if (@is_file($this->zipname)) + { + // ----- Open the zip file + if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0) + { + $this->privSwapBackMagicQuotes(); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode'); + + // ----- Return + return 0; + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + $this->privSwapBackMagicQuotes(); + return 0; + } + + // ----- Close the zip file + $this->privCloseFd(); + + // ----- Set the user attributes + $v_prop['comment'] = $v_central_dir['comment']; + $v_prop['nb'] = $v_central_dir['entries']; + $v_prop['status'] = 'ok'; + } + + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_prop; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : duplicate() + // Description : + // This method creates an archive by copying the content of an other one. If + // the archive already exist, it is replaced by the new one without any warning. + // Parameters : + // $p_archive : The filename of a valid archive, or + // a valid PclZip object. + // Return Values : + // 1 on success. + // 0 or a negative value on error (error code). + // -------------------------------------------------------------------------------- + function duplicate($p_archive) + { + $v_result = 1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Look if the $p_archive is a PclZip object + if ((is_object($p_archive)) && (get_class($p_archive) == 'pclzip')) + { + + // ----- Duplicate the archive + $v_result = $this->privDuplicate($p_archive->zipname); + } + + // ----- Look if the $p_archive is a string (so a filename) + else if (is_string($p_archive)) + { + + // ----- Check that $p_archive is a valid zip file + // TBC : Should also check the archive format + if (!is_file($p_archive)) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "No file with filename '".$p_archive."'"); + $v_result = PCLZIP_ERR_MISSING_FILE; + } + else { + // ----- Duplicate the archive + $v_result = $this->privDuplicate($p_archive); + } + } + + // ----- Invalid variable + else + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_archive_to_add"); + $v_result = PCLZIP_ERR_INVALID_PARAMETER; + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : merge() + // Description : + // This method merge the $p_archive_to_add archive at the end of the current + // one ($this). + // If the archive ($this) does not exist, the merge becomes a duplicate. + // If the $p_archive_to_add archive does not exist, the merge is a success. + // Parameters : + // $p_archive_to_add : It can be directly the filename of a valid zip archive, + // or a PclZip object archive. + // Return Values : + // 1 on success, + // 0 or negative values on error (see below). + // -------------------------------------------------------------------------------- + function merge($p_archive_to_add) + { + $v_result = 1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + return(0); + } + + // ----- Look if the $p_archive_to_add is a PclZip object + if ((is_object($p_archive_to_add)) && (get_class($p_archive_to_add) == 'pclzip')) + { + + // ----- Merge the archive + $v_result = $this->privMerge($p_archive_to_add); + } + + // ----- Look if the $p_archive_to_add is a string (so a filename) + else if (is_string($p_archive_to_add)) + { + + // ----- Create a temporary archive + $v_object_archive = new PclZip($p_archive_to_add); + + // ----- Merge the archive + $v_result = $this->privMerge($v_object_archive); + } + + // ----- Invalid variable + else + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_archive_to_add"); + $v_result = PCLZIP_ERR_INVALID_PARAMETER; + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + + + // -------------------------------------------------------------------------------- + // Function : errorCode() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function errorCode() + { + if (PCLZIP_ERROR_EXTERNAL == 1) { + return(PclErrorCode()); + } + else { + return($this->error_code); + } + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : errorName() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function errorName($p_with_code=false) + { + $v_name = array ( PCLZIP_ERR_NO_ERROR => 'PCLZIP_ERR_NO_ERROR', + PCLZIP_ERR_WRITE_OPEN_FAIL => 'PCLZIP_ERR_WRITE_OPEN_FAIL', + PCLZIP_ERR_READ_OPEN_FAIL => 'PCLZIP_ERR_READ_OPEN_FAIL', + PCLZIP_ERR_INVALID_PARAMETER => 'PCLZIP_ERR_INVALID_PARAMETER', + PCLZIP_ERR_MISSING_FILE => 'PCLZIP_ERR_MISSING_FILE', + PCLZIP_ERR_FILENAME_TOO_LONG => 'PCLZIP_ERR_FILENAME_TOO_LONG', + PCLZIP_ERR_INVALID_ZIP => 'PCLZIP_ERR_INVALID_ZIP', + PCLZIP_ERR_BAD_EXTRACTED_FILE => 'PCLZIP_ERR_BAD_EXTRACTED_FILE', + PCLZIP_ERR_DIR_CREATE_FAIL => 'PCLZIP_ERR_DIR_CREATE_FAIL', + PCLZIP_ERR_BAD_EXTENSION => 'PCLZIP_ERR_BAD_EXTENSION', + PCLZIP_ERR_BAD_FORMAT => 'PCLZIP_ERR_BAD_FORMAT', + PCLZIP_ERR_DELETE_FILE_FAIL => 'PCLZIP_ERR_DELETE_FILE_FAIL', + PCLZIP_ERR_RENAME_FILE_FAIL => 'PCLZIP_ERR_RENAME_FILE_FAIL', + PCLZIP_ERR_BAD_CHECKSUM => 'PCLZIP_ERR_BAD_CHECKSUM', + PCLZIP_ERR_INVALID_ARCHIVE_ZIP => 'PCLZIP_ERR_INVALID_ARCHIVE_ZIP', + PCLZIP_ERR_MISSING_OPTION_VALUE => 'PCLZIP_ERR_MISSING_OPTION_VALUE', + PCLZIP_ERR_INVALID_OPTION_VALUE => 'PCLZIP_ERR_INVALID_OPTION_VALUE', + PCLZIP_ERR_UNSUPPORTED_COMPRESSION => 'PCLZIP_ERR_UNSUPPORTED_COMPRESSION', + PCLZIP_ERR_UNSUPPORTED_ENCRYPTION => 'PCLZIP_ERR_UNSUPPORTED_ENCRYPTION' + ,PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE => 'PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE' + ,PCLZIP_ERR_DIRECTORY_RESTRICTION => 'PCLZIP_ERR_DIRECTORY_RESTRICTION' + ); + + if (isset($v_name[$this->error_code])) { + $v_value = $v_name[$this->error_code]; + } + else { + $v_value = 'NoName'; + } + + if ($p_with_code) { + return($v_value.' ('.$this->error_code.')'); + } + else { + return($v_value); + } + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : errorInfo() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function errorInfo($p_full=false) + { + if (PCLZIP_ERROR_EXTERNAL == 1) { + return(PclErrorString()); + } + else { + if ($p_full) { + return($this->errorName(true)." : ".$this->error_string); + } + else { + return($this->error_string." [code ".$this->error_code."]"); + } + } + } + // -------------------------------------------------------------------------------- + + +// -------------------------------------------------------------------------------- +// ***** UNDER THIS LINE ARE DEFINED PRIVATE INTERNAL FUNCTIONS ***** +// ***** ***** +// ***** THESES FUNCTIONS MUST NOT BE USED DIRECTLY ***** +// -------------------------------------------------------------------------------- + + + + // -------------------------------------------------------------------------------- + // Function : privCheckFormat() + // Description : + // This method check that the archive exists and is a valid zip archive. + // Several level of check exists. (futur) + // Parameters : + // $p_level : Level of check. Default 0. + // 0 : Check the first bytes (magic codes) (default value)) + // 1 : 0 + Check the central directory (futur) + // 2 : 1 + Check each file header (futur) + // Return Values : + // true on success, + // false on error, the error code is set. + // -------------------------------------------------------------------------------- + function privCheckFormat($p_level=0) + { + $v_result = true; + + // ----- Reset the file system cache + clearstatcache(); + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Look if the file exits + if (!is_file($this->zipname)) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "Missing archive file '".$this->zipname."'"); + return(false); + } + + // ----- Check that the file is readeable + if (!is_readable($this->zipname)) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to read archive '".$this->zipname."'"); + return(false); + } + + // ----- Check the magic code + // TBC + + // ----- Check the central header + // TBC + + // ----- Check each file header + // TBC + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privParseOptions() + // Description : + // This internal methods reads the variable list of arguments ($p_options_list, + // $p_size) and generate an array with the options and values ($v_result_list). + // $v_requested_options contains the options that can be present and those that + // must be present. + // $v_requested_options is an array, with the option value as key, and 'optional', + // or 'mandatory' as value. + // Parameters : + // See above. + // Return Values : + // 1 on success. + // 0 on failure. + // -------------------------------------------------------------------------------- + function privParseOptions(&$p_options_list, $p_size, &$v_result_list, $v_requested_options=false) + { + $v_result=1; + + // ----- Read the options + $i=0; + while ($i<$p_size) { + + // ----- Check if the option is supported + if (!isset($v_requested_options[$p_options_list[$i]])) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid optional parameter '".$p_options_list[$i]."' for this method"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Look for next option + switch ($p_options_list[$i]) { + // ----- Look for options that request a path value + case PCLZIP_OPT_PATH : + case PCLZIP_OPT_REMOVE_PATH : + case PCLZIP_OPT_ADD_PATH : + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + $v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], FALSE); + $i++; + break; + + case PCLZIP_OPT_TEMP_FILE_THRESHOLD : + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + return PclZip::errorCode(); + } + + // ----- Check for incompatible options + if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_OFF])) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_OFF'"); + return PclZip::errorCode(); + } + + // ----- Check the value + $v_value = $p_options_list[$i+1]; + if ((!is_integer($v_value)) || ($v_value<0)) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Integer expected for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + return PclZip::errorCode(); + } + + // ----- Get the value (and convert it in bytes) + $v_result_list[$p_options_list[$i]] = $v_value*1048576; + $i++; + break; + + case PCLZIP_OPT_TEMP_FILE_ON : + // ----- Check for incompatible options + if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_OFF])) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_OFF'"); + return PclZip::errorCode(); + } + + $v_result_list[$p_options_list[$i]] = true; + break; + + case PCLZIP_OPT_TEMP_FILE_OFF : + // ----- Check for incompatible options + if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_ON])) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_ON'"); + return PclZip::errorCode(); + } + // ----- Check for incompatible options + if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_THRESHOLD])) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_THRESHOLD'"); + return PclZip::errorCode(); + } + + $v_result_list[$p_options_list[$i]] = true; + break; + + case PCLZIP_OPT_EXTRACT_DIR_RESTRICTION : + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + if ( is_string($p_options_list[$i+1]) + && ($p_options_list[$i+1] != '')) { + $v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], FALSE); + $i++; + } + else { + } + break; + + // ----- Look for options that request an array of string for value + case PCLZIP_OPT_BY_NAME : + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + if (is_string($p_options_list[$i+1])) { + $v_result_list[$p_options_list[$i]][0] = $p_options_list[$i+1]; + } + else if (is_array($p_options_list[$i+1])) { + $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1]; + } + else { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + $i++; + break; + + // ----- Look for options that request an EREG or PREG expression + case PCLZIP_OPT_BY_EREG : + // ereg() is deprecated starting with PHP 5.3. Move PCLZIP_OPT_BY_EREG + // to PCLZIP_OPT_BY_PREG + $p_options_list[$i] = PCLZIP_OPT_BY_PREG; + case PCLZIP_OPT_BY_PREG : + //case PCLZIP_OPT_CRYPT : + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + if (is_string($p_options_list[$i+1])) { + $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1]; + } + else { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + $i++; + break; + + // ----- Look for options that takes a string + case PCLZIP_OPT_COMMENT : + case PCLZIP_OPT_ADD_COMMENT : + case PCLZIP_OPT_PREPEND_COMMENT : + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, + "Missing parameter value for option '" + .PclZipUtilOptionText($p_options_list[$i]) + ."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + if (is_string($p_options_list[$i+1])) { + $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1]; + } + else { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, + "Wrong parameter value for option '" + .PclZipUtilOptionText($p_options_list[$i]) + ."'"); + + // ----- Return + return PclZip::errorCode(); + } + $i++; + break; + + // ----- Look for options that request an array of index + case PCLZIP_OPT_BY_INDEX : + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + $v_work_list = array(); + if (is_string($p_options_list[$i+1])) { + + // ----- Remove spaces + $p_options_list[$i+1] = strtr($p_options_list[$i+1], ' ', ''); + + // ----- Parse items + $v_work_list = explode(",", $p_options_list[$i+1]); + } + else if (is_integer($p_options_list[$i+1])) { + $v_work_list[0] = $p_options_list[$i+1].'-'.$p_options_list[$i+1]; + } + else if (is_array($p_options_list[$i+1])) { + $v_work_list = $p_options_list[$i+1]; + } + else { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Value must be integer, string or array for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Reduce the index list + // each index item in the list must be a couple with a start and + // an end value : [0,3], [5-5], [8-10], ... + // ----- Check the format of each item + $v_sort_flag=false; + $v_sort_value=0; + for ($j=0; $j= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1]; + $i++; + break; + + // ----- Look for options that request a call-back + case PCLZIP_CB_PRE_EXTRACT : + case PCLZIP_CB_POST_EXTRACT : + case PCLZIP_CB_PRE_ADD : + case PCLZIP_CB_POST_ADD : + /* for futur use + case PCLZIP_CB_PRE_DELETE : + case PCLZIP_CB_POST_DELETE : + case PCLZIP_CB_PRE_LIST : + case PCLZIP_CB_POST_LIST : + */ + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + $v_function_name = $p_options_list[$i+1]; + + // ----- Check that the value is a valid existing function + if (!function_exists($v_function_name)) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Function '".$v_function_name."()' is not an existing function for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Set the attribute + $v_result_list[$p_options_list[$i]] = $v_function_name; + $i++; + break; + + default : + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, + "Unknown parameter '" + .$p_options_list[$i]."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Next options + $i++; + } + + // ----- Look for mandatory options + if ($v_requested_options !== false) { + for ($key=reset($v_requested_options); $key=key($v_requested_options); $key=next($v_requested_options)) { + // ----- Look for mandatory option + if ($v_requested_options[$key] == 'mandatory') { + // ----- Look if present + if (!isset($v_result_list[$key])) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter ".PclZipUtilOptionText($key)."(".$key.")"); + + // ----- Return + return PclZip::errorCode(); + } + } + } + } + + // ----- Look for default values + if (!isset($v_result_list[PCLZIP_OPT_TEMP_FILE_THRESHOLD])) { + + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privOptionDefaultThreshold() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privOptionDefaultThreshold(&$p_options) + { + $v_result=1; + + if (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]) + || isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF])) { + return $v_result; + } + + // ----- Get 'memory_limit' configuration value + $v_memory_limit = ini_get('memory_limit'); + $v_memory_limit = trim($v_memory_limit); + $last = strtolower(substr($v_memory_limit, -1)); + + if($last == 'g') + //$v_memory_limit = $v_memory_limit*1024*1024*1024; + $v_memory_limit = $v_memory_limit*1073741824; + if($last == 'm') + //$v_memory_limit = $v_memory_limit*1024*1024; + $v_memory_limit = $v_memory_limit*1048576; + if($last == 'k') + $v_memory_limit = $v_memory_limit*1024; + + $p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] = floor($v_memory_limit*PCLZIP_TEMPORARY_FILE_RATIO); + + + // ----- Sanity check : No threshold if value lower than 1M + if ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] < 1048576) { + unset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privFileDescrParseAtt() + // Description : + // Parameters : + // Return Values : + // 1 on success. + // 0 on failure. + // -------------------------------------------------------------------------------- + function privFileDescrParseAtt(&$p_file_list, &$p_filedescr, $v_options, $v_requested_options=false) + { + $v_result=1; + + // ----- For each file in the list check the attributes + foreach ($p_file_list as $v_key => $v_value) { + + // ----- Check if the option is supported + if (!isset($v_requested_options[$v_key])) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid file attribute '".$v_key."' for this file"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Look for attribute + switch ($v_key) { + case PCLZIP_ATT_FILE_NAME : + if (!is_string($v_value)) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + + $p_filedescr['filename'] = PclZipUtilPathReduction($v_value); + + if ($p_filedescr['filename'] == '') { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty filename for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + + break; + + case PCLZIP_ATT_FILE_NEW_SHORT_NAME : + if (!is_string($v_value)) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + + $p_filedescr['new_short_name'] = PclZipUtilPathReduction($v_value); + + if ($p_filedescr['new_short_name'] == '') { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty short filename for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + break; + + case PCLZIP_ATT_FILE_NEW_FULL_NAME : + if (!is_string($v_value)) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + + $p_filedescr['new_full_name'] = PclZipUtilPathReduction($v_value); + + if ($p_filedescr['new_full_name'] == '') { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty full filename for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + break; + + // ----- Look for options that takes a string + case PCLZIP_ATT_FILE_COMMENT : + if (!is_string($v_value)) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + + $p_filedescr['comment'] = $v_value; + break; + + case PCLZIP_ATT_FILE_MTIME : + if (!is_integer($v_value)) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". Integer expected for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + + $p_filedescr['mtime'] = $v_value; + break; + + case PCLZIP_ATT_FILE_CONTENT : + $p_filedescr['content'] = $v_value; + break; + + default : + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, + "Unknown parameter '".$v_key."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Look for mandatory options + if ($v_requested_options !== false) { + for ($key=reset($v_requested_options); $key=key($v_requested_options); $key=next($v_requested_options)) { + // ----- Look for mandatory option + if ($v_requested_options[$key] == 'mandatory') { + // ----- Look if present + if (!isset($p_file_list[$key])) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter ".PclZipUtilOptionText($key)."(".$key.")"); + return PclZip::errorCode(); + } + } + } + } + + // end foreach + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privFileDescrExpand() + // Description : + // This method look for each item of the list to see if its a file, a folder + // or a string to be added as file. For any other type of files (link, other) + // just ignore the item. + // Then prepare the information that will be stored for that file. + // When its a folder, expand the folder with all the files that are in that + // folder (recursively). + // Parameters : + // Return Values : + // 1 on success. + // 0 on failure. + // -------------------------------------------------------------------------------- + function privFileDescrExpand(&$p_filedescr_list, &$p_options) + { + $v_result=1; + + // ----- Create a result list + $v_result_list = array(); + + // ----- Look each entry + for ($i=0; $iprivCalculateStoredFilename($v_descr, $p_options); + + // ----- Add the descriptor in result list + $v_result_list[sizeof($v_result_list)] = $v_descr; + + // ----- Look for folder + if ($v_descr['type'] == 'folder') { + // ----- List of items in folder + $v_dirlist_descr = array(); + $v_dirlist_nb = 0; + if ($v_folder_handler = @opendir($v_descr['filename'])) { + while (($v_item_handler = @readdir($v_folder_handler)) !== false) { + + // ----- Skip '.' and '..' + if (($v_item_handler == '.') || ($v_item_handler == '..')) { + continue; + } + + // ----- Compose the full filename + $v_dirlist_descr[$v_dirlist_nb]['filename'] = $v_descr['filename'].'/'.$v_item_handler; + + // ----- Look for different stored filename + // Because the name of the folder was changed, the name of the + // files/sub-folders also change + if (($v_descr['stored_filename'] != $v_descr['filename']) + && (!isset($p_options[PCLZIP_OPT_REMOVE_ALL_PATH]))) { + if ($v_descr['stored_filename'] != '') { + $v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_descr['stored_filename'].'/'.$v_item_handler; + } + else { + $v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_item_handler; + } + } + + $v_dirlist_nb++; + } + + @closedir($v_folder_handler); + } + else { + // TBC : unable to open folder in read mode + } + + // ----- Expand each element of the list + if ($v_dirlist_nb != 0) { + // ----- Expand + if (($v_result = $this->privFileDescrExpand($v_dirlist_descr, $p_options)) != 1) { + return $v_result; + } + + // ----- Concat the resulting list + $v_result_list = array_merge($v_result_list, $v_dirlist_descr); + } + else { + } + + // ----- Free local array + unset($v_dirlist_descr); + } + } + + // ----- Get the result list + $p_filedescr_list = $v_result_list; + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privCreate() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privCreate($p_filedescr_list, &$p_result_list, &$p_options) + { + $v_result=1; + $v_list_detail = array(); + + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Open the file in write mode + if (($v_result = $this->privOpenFd('wb')) != 1) + { + // ----- Return + return $v_result; + } + + // ----- Add the list of files + $v_result = $this->privAddList($p_filedescr_list, $p_result_list, $p_options); + + // ----- Close + $this->privCloseFd(); + + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privAdd() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privAdd($p_filedescr_list, &$p_result_list, &$p_options) + { + $v_result=1; + $v_list_detail = array(); + + // ----- Look if the archive exists or is empty + if ((!is_file($this->zipname)) || (filesize($this->zipname) == 0)) + { + + // ----- Do a create + $v_result = $this->privCreate($p_filedescr_list, $p_result_list, $p_options); + + // ----- Return + return $v_result; + } + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Open the zip file + if (($v_result=$this->privOpenFd('rb')) != 1) + { + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_result; + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + return $v_result; + } + + // ----- Go to beginning of File + @rewind($this->zip_fd); + + // ----- Creates a temporay file + $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp'; + + // ----- Open the temporary file in write mode + if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0) + { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Copy the files from the archive to the temporary file + // TBC : Here I should better append the file and go back to erase the central dir + $v_size = $v_central_dir['offset']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = fread($this->zip_fd, $v_read_size); + @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Swap the file descriptor + // Here is a trick : I swap the temporary fd with the zip fd, in order to use + // the following methods on the temporary fil and not the real archive + $v_swap = $this->zip_fd; + $this->zip_fd = $v_zip_temp_fd; + $v_zip_temp_fd = $v_swap; + + // ----- Add the files + $v_header_list = array(); + if (($v_result = $this->privAddFileList($p_filedescr_list, $v_header_list, $p_options)) != 1) + { + fclose($v_zip_temp_fd); + $this->privCloseFd(); + @unlink($v_zip_temp_name); + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_result; + } + + // ----- Store the offset of the central dir + $v_offset = @ftell($this->zip_fd); + + // ----- Copy the block of file headers from the old archive + $v_size = $v_central_dir['size']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($v_zip_temp_fd, $v_read_size); + @fwrite($this->zip_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Create the Central Dir files header + for ($i=0, $v_count=0; $iprivWriteCentralFileHeader($v_header_list[$i])) != 1) { + fclose($v_zip_temp_fd); + $this->privCloseFd(); + @unlink($v_zip_temp_name); + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_result; + } + $v_count++; + } + + // ----- Transform the header to a 'usable' info + $this->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]); + } + + // ----- Zip file comment + $v_comment = $v_central_dir['comment']; + if (isset($p_options[PCLZIP_OPT_COMMENT])) { + $v_comment = $p_options[PCLZIP_OPT_COMMENT]; + } + if (isset($p_options[PCLZIP_OPT_ADD_COMMENT])) { + $v_comment = $v_comment.$p_options[PCLZIP_OPT_ADD_COMMENT]; + } + if (isset($p_options[PCLZIP_OPT_PREPEND_COMMENT])) { + $v_comment = $p_options[PCLZIP_OPT_PREPEND_COMMENT].$v_comment; + } + + // ----- Calculate the size of the central header + $v_size = @ftell($this->zip_fd)-$v_offset; + + // ----- Create the central dir footer + if (($v_result = $this->privWriteCentralHeader($v_count+$v_central_dir['entries'], $v_size, $v_offset, $v_comment)) != 1) + { + // ----- Reset the file list + unset($v_header_list); + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_result; + } + + // ----- Swap back the file descriptor + $v_swap = $this->zip_fd; + $this->zip_fd = $v_zip_temp_fd; + $v_zip_temp_fd = $v_swap; + + // ----- Close + $this->privCloseFd(); + + // ----- Close the temporary file + @fclose($v_zip_temp_fd); + + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Delete the zip file + // TBC : I should test the result ... + @unlink($this->zipname); + + // ----- Rename the temporary file + // TBC : I should test the result ... + //@rename($v_zip_temp_name, $this->zipname); + PclZipUtilRename($v_zip_temp_name, $this->zipname); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privOpenFd() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function privOpenFd($p_mode) + { + $v_result=1; + + // ----- Look if already open + if ($this->zip_fd != 0) + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Zip file \''.$this->zipname.'\' already open'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Open the zip file + if (($this->zip_fd = @fopen($this->zipname, $p_mode)) == 0) + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in '.$p_mode.' mode'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privCloseFd() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function privCloseFd() + { + $v_result=1; + + if ($this->zip_fd != 0) + @fclose($this->zip_fd); + $this->zip_fd = 0; + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privAddList() + // Description : + // $p_add_dir and $p_remove_dir will give the ability to memorize a path which is + // different from the real path of the file. This is usefull if you want to have PclTar + // running in any directory, and memorize relative path from an other directory. + // Parameters : + // $p_list : An array containing the file or directory names to add in the tar + // $p_result_list : list of added files with their properties (specially the status field) + // $p_add_dir : Path to add in the filename path archived + // $p_remove_dir : Path to remove in the filename path archived + // Return Values : + // -------------------------------------------------------------------------------- +// function privAddList($p_list, &$p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_options) + function privAddList($p_filedescr_list, &$p_result_list, &$p_options) + { + $v_result=1; + + // ----- Add the files + $v_header_list = array(); + if (($v_result = $this->privAddFileList($p_filedescr_list, $v_header_list, $p_options)) != 1) + { + // ----- Return + return $v_result; + } + + // ----- Store the offset of the central dir + $v_offset = @ftell($this->zip_fd); + + // ----- Create the Central Dir files header + for ($i=0,$v_count=0; $iprivWriteCentralFileHeader($v_header_list[$i])) != 1) { + // ----- Return + return $v_result; + } + $v_count++; + } + + // ----- Transform the header to a 'usable' info + $this->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]); + } + + // ----- Zip file comment + $v_comment = ''; + if (isset($p_options[PCLZIP_OPT_COMMENT])) { + $v_comment = $p_options[PCLZIP_OPT_COMMENT]; + } + + // ----- Calculate the size of the central header + $v_size = @ftell($this->zip_fd)-$v_offset; + + // ----- Create the central dir footer + if (($v_result = $this->privWriteCentralHeader($v_count, $v_size, $v_offset, $v_comment)) != 1) + { + // ----- Reset the file list + unset($v_header_list); + + // ----- Return + return $v_result; + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privAddFileList() + // Description : + // Parameters : + // $p_filedescr_list : An array containing the file description + // or directory names to add in the zip + // $p_result_list : list of added files with their properties (specially the status field) + // Return Values : + // -------------------------------------------------------------------------------- + function privAddFileList($p_filedescr_list, &$p_result_list, &$p_options) + { + $v_result=1; + $v_header = array(); + + // ----- Recuperate the current number of elt in list + $v_nb = sizeof($p_result_list); + + // ----- Loop on the files + for ($j=0; ($jprivAddFile($p_filedescr_list[$j], $v_header, + $p_options); + if ($v_result != 1) { + return $v_result; + } + + // ----- Store the file infos + $p_result_list[$v_nb++] = $v_header; + } + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privAddFile() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privAddFile($p_filedescr, &$p_header, &$p_options) + { + $v_result=1; + + // ----- Working variable + $p_filename = $p_filedescr['filename']; + + // TBC : Already done in the fileAtt check ... ? + if ($p_filename == "") { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid file list parameter (invalid or empty list)"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Look for a stored different filename + /* TBC : Removed + if (isset($p_filedescr['stored_filename'])) { + $v_stored_filename = $p_filedescr['stored_filename']; + } + else { + $v_stored_filename = $p_filedescr['stored_filename']; + } + */ + + // ----- Set the file properties + clearstatcache(); + $p_header['version'] = 20; + $p_header['version_extracted'] = 10; + $p_header['flag'] = 0; + $p_header['compression'] = 0; + $p_header['crc'] = 0; + $p_header['compressed_size'] = 0; + $p_header['filename_len'] = strlen($p_filename); + $p_header['extra_len'] = 0; + $p_header['disk'] = 0; + $p_header['internal'] = 0; + $p_header['offset'] = 0; + $p_header['filename'] = $p_filename; +// TBC : Removed $p_header['stored_filename'] = $v_stored_filename; + $p_header['stored_filename'] = $p_filedescr['stored_filename']; + $p_header['extra'] = ''; + $p_header['status'] = 'ok'; + $p_header['index'] = -1; + + // ----- Look for regular file + if ($p_filedescr['type']=='file') { + $p_header['external'] = 0x00000000; + $p_header['size'] = filesize($p_filename); + } + + // ----- Look for regular folder + else if ($p_filedescr['type']=='folder') { + $p_header['external'] = 0x00000010; + $p_header['mtime'] = filemtime($p_filename); + $p_header['size'] = filesize($p_filename); + } + + // ----- Look for virtual file + else if ($p_filedescr['type'] == 'virtual_file') { + $p_header['external'] = 0x00000000; + $p_header['size'] = strlen($p_filedescr['content']); + } + + + // ----- Look for filetime + if (isset($p_filedescr['mtime'])) { + $p_header['mtime'] = $p_filedescr['mtime']; + } + else if ($p_filedescr['type'] == 'virtual_file') { + $p_header['mtime'] = time(); + } + else { + $p_header['mtime'] = filemtime($p_filename); + } + + // ------ Look for file comment + if (isset($p_filedescr['comment'])) { + $p_header['comment_len'] = strlen($p_filedescr['comment']); + $p_header['comment'] = $p_filedescr['comment']; + } + else { + $p_header['comment_len'] = 0; + $p_header['comment'] = ''; + } + + // ----- Look for pre-add callback + if (isset($p_options[PCLZIP_CB_PRE_ADD])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_header, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. + $v_result = $p_options[PCLZIP_CB_PRE_ADD](PCLZIP_CB_PRE_ADD, $v_local_header); + if ($v_result == 0) { + // ----- Change the file status + $p_header['status'] = "skipped"; + $v_result = 1; + } + + // ----- Update the informations + // Only some fields can be modified + if ($p_header['stored_filename'] != $v_local_header['stored_filename']) { + $p_header['stored_filename'] = PclZipUtilPathReduction($v_local_header['stored_filename']); + } + } + + // ----- Look for empty stored filename + if ($p_header['stored_filename'] == "") { + $p_header['status'] = "filtered"; + } + + // ----- Check the path length + if (strlen($p_header['stored_filename']) > 0xFF) { + $p_header['status'] = 'filename_too_long'; + } + + // ----- Look if no error, or file not skipped + if ($p_header['status'] == 'ok') { + + // ----- Look for a file + if ($p_filedescr['type'] == 'file') { + // ----- Look for using temporary file to zip + if ( (!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF])) + && (isset($p_options[PCLZIP_OPT_TEMP_FILE_ON]) + || (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]) + && ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] <= $p_header['size'])) ) ) { + $v_result = $this->privAddFileUsingTempFile($p_filedescr, $p_header, $p_options); + if ($v_result < PCLZIP_ERR_NO_ERROR) { + return $v_result; + } + } + + // ----- Use "in memory" zip algo + else { + + // ----- Open the source file + if (($v_file = @fopen($p_filename, "rb")) == 0) { + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to open file '$p_filename' in binary read mode"); + return PclZip::errorCode(); + } + + // ----- Read the file content + $v_content = @fread($v_file, $p_header['size']); + + // ----- Close the file + @fclose($v_file); + + // ----- Calculate the CRC + $p_header['crc'] = @crc32($v_content); + + // ----- Look for no compression + if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) { + // ----- Set header parameters + $p_header['compressed_size'] = $p_header['size']; + $p_header['compression'] = 0; + } + + // ----- Look for normal compression + else { + // ----- Compress the content + $v_content = @gzdeflate($v_content); + + // ----- Set header parameters + $p_header['compressed_size'] = strlen($v_content); + $p_header['compression'] = 8; + } + + // ----- Call the header generation + if (($v_result = $this->privWriteFileHeader($p_header)) != 1) { + @fclose($v_file); + return $v_result; + } + + // ----- Write the compressed (or not) content + @fwrite($this->zip_fd, $v_content, $p_header['compressed_size']); + + } + + } + + // ----- Look for a virtual file (a file from string) + else if ($p_filedescr['type'] == 'virtual_file') { + + $v_content = $p_filedescr['content']; + + // ----- Calculate the CRC + $p_header['crc'] = @crc32($v_content); + + // ----- Look for no compression + if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) { + // ----- Set header parameters + $p_header['compressed_size'] = $p_header['size']; + $p_header['compression'] = 0; + } + + // ----- Look for normal compression + else { + // ----- Compress the content + $v_content = @gzdeflate($v_content); + + // ----- Set header parameters + $p_header['compressed_size'] = strlen($v_content); + $p_header['compression'] = 8; + } + + // ----- Call the header generation + if (($v_result = $this->privWriteFileHeader($p_header)) != 1) { + @fclose($v_file); + return $v_result; + } + + // ----- Write the compressed (or not) content + @fwrite($this->zip_fd, $v_content, $p_header['compressed_size']); + } + + // ----- Look for a directory + else if ($p_filedescr['type'] == 'folder') { + // ----- Look for directory last '/' + if (@substr($p_header['stored_filename'], -1) != '/') { + $p_header['stored_filename'] .= '/'; + } + + // ----- Set the file properties + $p_header['size'] = 0; + //$p_header['external'] = 0x41FF0010; // Value for a folder : to be checked + $p_header['external'] = 0x00000010; // Value for a folder : to be checked + + // ----- Call the header generation + if (($v_result = $this->privWriteFileHeader($p_header)) != 1) + { + return $v_result; + } + } + } + + // ----- Look for post-add callback + if (isset($p_options[PCLZIP_CB_POST_ADD])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_header, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. + $v_result = $p_options[PCLZIP_CB_POST_ADD](PCLZIP_CB_POST_ADD, $v_local_header); + if ($v_result == 0) { + // ----- Ignored + $v_result = 1; + } + + // ----- Update the informations + // Nothing can be modified + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privAddFileUsingTempFile() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privAddFileUsingTempFile($p_filedescr, &$p_header, &$p_options) + { + $v_result=PCLZIP_ERR_NO_ERROR; + + // ----- Working variable + $p_filename = $p_filedescr['filename']; + + + // ----- Open the source file + if (($v_file = @fopen($p_filename, "rb")) == 0) { + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to open file '$p_filename' in binary read mode"); + return PclZip::errorCode(); + } + + // ----- Creates a compressed temporary file + $v_gzip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.gz'; + if (($v_file_compressed = @gzopen($v_gzip_temp_name, "wb")) == 0) { + fclose($v_file); + PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary write mode'); + return PclZip::errorCode(); + } + + // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks + $v_size = filesize($p_filename); + while ($v_size != 0) { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($v_file, $v_read_size); + //$v_binary_data = pack('a'.$v_read_size, $v_buffer); + @gzputs($v_file_compressed, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Close the file + @fclose($v_file); + @gzclose($v_file_compressed); + + // ----- Check the minimum file size + if (filesize($v_gzip_temp_name) < 18) { + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'gzip temporary file \''.$v_gzip_temp_name.'\' has invalid filesize - should be minimum 18 bytes'); + return PclZip::errorCode(); + } + + // ----- Extract the compressed attributes + if (($v_file_compressed = @fopen($v_gzip_temp_name, "rb")) == 0) { + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode'); + return PclZip::errorCode(); + } + + // ----- Read the gzip file header + $v_binary_data = @fread($v_file_compressed, 10); + $v_data_header = unpack('a1id1/a1id2/a1cm/a1flag/Vmtime/a1xfl/a1os', $v_binary_data); + + // ----- Check some parameters + $v_data_header['os'] = bin2hex($v_data_header['os']); + + // ----- Read the gzip file footer + @fseek($v_file_compressed, filesize($v_gzip_temp_name)-8); + $v_binary_data = @fread($v_file_compressed, 8); + $v_data_footer = unpack('Vcrc/Vcompressed_size', $v_binary_data); + + // ----- Set the attributes + $p_header['compression'] = ord($v_data_header['cm']); + //$p_header['mtime'] = $v_data_header['mtime']; + $p_header['crc'] = $v_data_footer['crc']; + $p_header['compressed_size'] = filesize($v_gzip_temp_name)-18; + + // ----- Close the file + @fclose($v_file_compressed); + + // ----- Call the header generation + if (($v_result = $this->privWriteFileHeader($p_header)) != 1) { + return $v_result; + } + + // ----- Add the compressed data + if (($v_file_compressed = @fopen($v_gzip_temp_name, "rb")) == 0) + { + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode'); + return PclZip::errorCode(); + } + + // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks + fseek($v_file_compressed, 10); + $v_size = $p_header['compressed_size']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($v_file_compressed, $v_read_size); + //$v_binary_data = pack('a'.$v_read_size, $v_buffer); + @fwrite($this->zip_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Close the file + @fclose($v_file_compressed); + + // ----- Unlink the temporary file + @unlink($v_gzip_temp_name); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privCalculateStoredFilename() + // Description : + // Based on file descriptor properties and global options, this method + // calculate the filename that will be stored in the archive. + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privCalculateStoredFilename(&$p_filedescr, &$p_options) + { + $v_result=1; + + // ----- Working variables + $p_filename = $p_filedescr['filename']; + if (isset($p_options[PCLZIP_OPT_ADD_PATH])) { + $p_add_dir = $p_options[PCLZIP_OPT_ADD_PATH]; + } + else { + $p_add_dir = ''; + } + if (isset($p_options[PCLZIP_OPT_REMOVE_PATH])) { + $p_remove_dir = $p_options[PCLZIP_OPT_REMOVE_PATH]; + } + else { + $p_remove_dir = ''; + } + if (isset($p_options[PCLZIP_OPT_REMOVE_ALL_PATH])) { + $p_remove_all_dir = $p_options[PCLZIP_OPT_REMOVE_ALL_PATH]; + } + else { + $p_remove_all_dir = 0; + } + + + // ----- Look for full name change + if (isset($p_filedescr['new_full_name'])) { + // ----- Remove drive letter if any + $v_stored_filename = PclZipUtilTranslateWinPath($p_filedescr['new_full_name']); + } + + // ----- Look for path and/or short name change + else { + + // ----- Look for short name change + // Its when we cahnge just the filename but not the path + if (isset($p_filedescr['new_short_name'])) { + $v_path_info = pathinfo($p_filename); + $v_dir = ''; + if ($v_path_info['dirname'] != '') { + $v_dir = $v_path_info['dirname'].'/'; + } + $v_stored_filename = $v_dir.$p_filedescr['new_short_name']; + } + else { + // ----- Calculate the stored filename + $v_stored_filename = $p_filename; + } + + // ----- Look for all path to remove + if ($p_remove_all_dir) { + $v_stored_filename = basename($p_filename); + } + // ----- Look for partial path remove + else if ($p_remove_dir != "") { + if (substr($p_remove_dir, -1) != '/') + $p_remove_dir .= "/"; + + if ( (substr($p_filename, 0, 2) == "./") + || (substr($p_remove_dir, 0, 2) == "./")) { + + if ( (substr($p_filename, 0, 2) == "./") + && (substr($p_remove_dir, 0, 2) != "./")) { + $p_remove_dir = "./".$p_remove_dir; + } + if ( (substr($p_filename, 0, 2) != "./") + && (substr($p_remove_dir, 0, 2) == "./")) { + $p_remove_dir = substr($p_remove_dir, 2); + } + } + + $v_compare = PclZipUtilPathInclusion($p_remove_dir, + $v_stored_filename); + if ($v_compare > 0) { + if ($v_compare == 2) { + $v_stored_filename = ""; + } + else { + $v_stored_filename = substr($v_stored_filename, + strlen($p_remove_dir)); + } + } + } + + // ----- Remove drive letter if any + $v_stored_filename = PclZipUtilTranslateWinPath($v_stored_filename); + + // ----- Look for path to add + if ($p_add_dir != "") { + if (substr($p_add_dir, -1) == "/") + $v_stored_filename = $p_add_dir.$v_stored_filename; + else + $v_stored_filename = $p_add_dir."/".$v_stored_filename; + } + } + + // ----- Filename (reduce the path of stored name) + $v_stored_filename = PclZipUtilPathReduction($v_stored_filename); + $p_filedescr['stored_filename'] = $v_stored_filename; + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privWriteFileHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privWriteFileHeader(&$p_header) + { + $v_result=1; + + // ----- Store the offset position of the file + $p_header['offset'] = ftell($this->zip_fd); + + // ----- Transform UNIX mtime to DOS format mdate/mtime + $v_date = getdate($p_header['mtime']); + $v_mtime = ($v_date['hours']<<11) + ($v_date['minutes']<<5) + $v_date['seconds']/2; + $v_mdate = (($v_date['year']-1980)<<9) + ($v_date['mon']<<5) + $v_date['mday']; + + // ----- Packed data + $v_binary_data = pack("VvvvvvVVVvv", 0x04034b50, + $p_header['version_extracted'], $p_header['flag'], + $p_header['compression'], $v_mtime, $v_mdate, + $p_header['crc'], $p_header['compressed_size'], + $p_header['size'], + strlen($p_header['stored_filename']), + $p_header['extra_len']); + + // ----- Write the first 148 bytes of the header in the archive + fputs($this->zip_fd, $v_binary_data, 30); + + // ----- Write the variable fields + if (strlen($p_header['stored_filename']) != 0) + { + fputs($this->zip_fd, $p_header['stored_filename'], strlen($p_header['stored_filename'])); + } + if ($p_header['extra_len'] != 0) + { + fputs($this->zip_fd, $p_header['extra'], $p_header['extra_len']); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privWriteCentralFileHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privWriteCentralFileHeader(&$p_header) + { + $v_result=1; + + // TBC + //for(reset($p_header); $key = key($p_header); next($p_header)) { + //} + + // ----- Transform UNIX mtime to DOS format mdate/mtime + $v_date = getdate($p_header['mtime']); + $v_mtime = ($v_date['hours']<<11) + ($v_date['minutes']<<5) + $v_date['seconds']/2; + $v_mdate = (($v_date['year']-1980)<<9) + ($v_date['mon']<<5) + $v_date['mday']; + + + // ----- Packed data + $v_binary_data = pack("VvvvvvvVVVvvvvvVV", 0x02014b50, + $p_header['version'], $p_header['version_extracted'], + $p_header['flag'], $p_header['compression'], + $v_mtime, $v_mdate, $p_header['crc'], + $p_header['compressed_size'], $p_header['size'], + strlen($p_header['stored_filename']), + $p_header['extra_len'], $p_header['comment_len'], + $p_header['disk'], $p_header['internal'], + $p_header['external'], $p_header['offset']); + + // ----- Write the 42 bytes of the header in the zip file + fputs($this->zip_fd, $v_binary_data, 46); + + // ----- Write the variable fields + if (strlen($p_header['stored_filename']) != 0) + { + fputs($this->zip_fd, $p_header['stored_filename'], strlen($p_header['stored_filename'])); + } + if ($p_header['extra_len'] != 0) + { + fputs($this->zip_fd, $p_header['extra'], $p_header['extra_len']); + } + if ($p_header['comment_len'] != 0) + { + fputs($this->zip_fd, $p_header['comment'], $p_header['comment_len']); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privWriteCentralHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privWriteCentralHeader($p_nb_entries, $p_size, $p_offset, $p_comment) + { + $v_result=1; + + // ----- Packed data + $v_binary_data = pack("VvvvvVVv", 0x06054b50, 0, 0, $p_nb_entries, + $p_nb_entries, $p_size, + $p_offset, strlen($p_comment)); + + // ----- Write the 22 bytes of the header in the zip file + fputs($this->zip_fd, $v_binary_data, 22); + + // ----- Write the variable fields + if (strlen($p_comment) != 0) + { + fputs($this->zip_fd, $p_comment, strlen($p_comment)); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privList() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privList(&$p_list) + { + $v_result=1; + + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Open the zip file + if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0) + { + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + $this->privSwapBackMagicQuotes(); + return $v_result; + } + + // ----- Go to beginning of Central Dir + @rewind($this->zip_fd); + if (@fseek($this->zip_fd, $v_central_dir['offset'])) + { + $this->privSwapBackMagicQuotes(); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read each entry + for ($i=0; $i<$v_central_dir['entries']; $i++) + { + // ----- Read the file header + if (($v_result = $this->privReadCentralFileHeader($v_header)) != 1) + { + $this->privSwapBackMagicQuotes(); + return $v_result; + } + $v_header['index'] = $i; + + // ----- Get the only interesting attributes + $this->privConvertHeader2FileInfo($v_header, $p_list[$i]); + unset($v_header); + } + + // ----- Close the zip file + $this->privCloseFd(); + + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privConvertHeader2FileInfo() + // Description : + // This function takes the file informations from the central directory + // entries and extract the interesting parameters that will be given back. + // The resulting file infos are set in the array $p_info + // $p_info['filename'] : Filename with full path. Given by user (add), + // extracted in the filesystem (extract). + // $p_info['stored_filename'] : Stored filename in the archive. + // $p_info['size'] = Size of the file. + // $p_info['compressed_size'] = Compressed size of the file. + // $p_info['mtime'] = Last modification date of the file. + // $p_info['comment'] = Comment associated with the file. + // $p_info['folder'] = true/false : indicates if the entry is a folder or not. + // $p_info['status'] = status of the action on the file. + // $p_info['crc'] = CRC of the file content. + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privConvertHeader2FileInfo($p_header, &$p_info) + { + $v_result=1; + + // ----- Get the interesting attributes + $v_temp_path = PclZipUtilPathReduction($p_header['filename']); + $p_info['filename'] = $v_temp_path; + $v_temp_path = PclZipUtilPathReduction($p_header['stored_filename']); + $p_info['stored_filename'] = $v_temp_path; + $p_info['size'] = $p_header['size']; + $p_info['compressed_size'] = $p_header['compressed_size']; + $p_info['mtime'] = $p_header['mtime']; + $p_info['comment'] = $p_header['comment']; + $p_info['folder'] = (($p_header['external']&0x00000010)==0x00000010); + $p_info['index'] = $p_header['index']; + $p_info['status'] = $p_header['status']; + $p_info['crc'] = $p_header['crc']; + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privExtractByRule() + // Description : + // Extract a file or directory depending of rules (by index, by name, ...) + // Parameters : + // $p_file_list : An array where will be placed the properties of each + // extracted file + // $p_path : Path to add while writing the extracted files + // $p_remove_path : Path to remove (from the file memorized path) while writing the + // extracted files. If the path does not match the file path, + // the file is extracted with its memorized path. + // $p_remove_path does not apply to 'list' mode. + // $p_path and $p_remove_path are commulative. + // Return Values : + // 1 on success,0 or less on error (see error code list) + // -------------------------------------------------------------------------------- + function privExtractByRule(&$p_file_list, $p_path, $p_remove_path, $p_remove_all_path, &$p_options) + { + $v_result=1; + + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Check the path + if ( ($p_path == "") + || ( (substr($p_path, 0, 1) != "/") + && (substr($p_path, 0, 3) != "../") + && (substr($p_path,1,2)!=":/"))) + $p_path = "./".$p_path; + + // ----- Reduce the path last (and duplicated) '/' + if (($p_path != "./") && ($p_path != "/")) + { + // ----- Look for the path end '/' + while (substr($p_path, -1) == "/") + { + $p_path = substr($p_path, 0, strlen($p_path)-1); + } + } + + // ----- Look for path to remove format (should end by /) + if (($p_remove_path != "") && (substr($p_remove_path, -1) != '/')) + { + $p_remove_path .= '/'; + } + $p_remove_path_size = strlen($p_remove_path); + + // ----- Open the zip file + if (($v_result = $this->privOpenFd('rb')) != 1) + { + $this->privSwapBackMagicQuotes(); + return $v_result; + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + // ----- Close the zip file + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + return $v_result; + } + + // ----- Start at beginning of Central Dir + $v_pos_entry = $v_central_dir['offset']; + + // ----- Read each entry + $j_start = 0; + for ($i=0, $v_nb_extracted=0; $i<$v_central_dir['entries']; $i++) + { + + // ----- Read next Central dir entry + @rewind($this->zip_fd); + if (@fseek($this->zip_fd, $v_pos_entry)) + { + // ----- Close the zip file + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read the file header + $v_header = array(); + if (($v_result = $this->privReadCentralFileHeader($v_header)) != 1) + { + // ----- Close the zip file + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + return $v_result; + } + + // ----- Store the index + $v_header['index'] = $i; + + // ----- Store the file position + $v_pos_entry = ftell($this->zip_fd); + + // ----- Look for the specific extract rules + $v_extract = false; + + // ----- Look for extract by name rule + if ( (isset($p_options[PCLZIP_OPT_BY_NAME])) + && ($p_options[PCLZIP_OPT_BY_NAME] != 0)) { + + // ----- Look if the filename is in the list + for ($j=0; ($j strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) + && (substr($v_header['stored_filename'], 0, strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) == $p_options[PCLZIP_OPT_BY_NAME][$j])) { + $v_extract = true; + } + } + // ----- Look for a filename + elseif ($v_header['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) { + $v_extract = true; + } + } + } + + // ----- Look for extract by ereg rule + // ereg() is deprecated with PHP 5.3 + /* + else if ( (isset($p_options[PCLZIP_OPT_BY_EREG])) + && ($p_options[PCLZIP_OPT_BY_EREG] != "")) { + + if (ereg($p_options[PCLZIP_OPT_BY_EREG], $v_header['stored_filename'])) { + $v_extract = true; + } + } + */ + + // ----- Look for extract by preg rule + else if ( (isset($p_options[PCLZIP_OPT_BY_PREG])) + && ($p_options[PCLZIP_OPT_BY_PREG] != "")) { + + if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header['stored_filename'])) { + $v_extract = true; + } + } + + // ----- Look for extract by index rule + else if ( (isset($p_options[PCLZIP_OPT_BY_INDEX])) + && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) { + + // ----- Look if the index is in the list + for ($j=$j_start; ($j=$p_options[PCLZIP_OPT_BY_INDEX][$j]['start']) && ($i<=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end'])) { + $v_extract = true; + } + if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) { + $j_start = $j+1; + } + + if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) { + break; + } + } + } + + // ----- Look for no rule, which means extract all the archive + else { + $v_extract = true; + } + + // ----- Check compression method + if ( ($v_extract) + && ( ($v_header['compression'] != 8) + && ($v_header['compression'] != 0))) { + $v_header['status'] = 'unsupported_compression'; + + // ----- Look for PCLZIP_OPT_STOP_ON_ERROR + if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) + && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { + + $this->privSwapBackMagicQuotes(); + + PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_COMPRESSION, + "Filename '".$v_header['stored_filename']."' is " + ."compressed by an unsupported compression " + ."method (".$v_header['compression'].") "); + + return PclZip::errorCode(); + } + } + + // ----- Check encrypted files + if (($v_extract) && (($v_header['flag'] & 1) == 1)) { + $v_header['status'] = 'unsupported_encryption'; + + // ----- Look for PCLZIP_OPT_STOP_ON_ERROR + if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) + && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { + + $this->privSwapBackMagicQuotes(); + + PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION, + "Unsupported encryption for " + ." filename '".$v_header['stored_filename'] + ."'"); + + return PclZip::errorCode(); + } + } + + // ----- Look for real extraction + if (($v_extract) && ($v_header['status'] != 'ok')) { + $v_result = $this->privConvertHeader2FileInfo($v_header, + $p_file_list[$v_nb_extracted++]); + if ($v_result != 1) { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + return $v_result; + } + + $v_extract = false; + } + + // ----- Look for real extraction + if ($v_extract) + { + + // ----- Go to the file position + @rewind($this->zip_fd); + if (@fseek($this->zip_fd, $v_header['offset'])) + { + // ----- Close the zip file + $this->privCloseFd(); + + $this->privSwapBackMagicQuotes(); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Look for extraction as string + if ($p_options[PCLZIP_OPT_EXTRACT_AS_STRING]) { + + $v_string = ''; + + // ----- Extracting the file + $v_result1 = $this->privExtractFileAsString($v_header, $v_string, $p_options); + if ($v_result1 < 1) { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + return $v_result1; + } + + // ----- Get the only interesting attributes + if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted])) != 1) + { + // ----- Close the zip file + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + return $v_result; + } + + // ----- Set the file content + $p_file_list[$v_nb_extracted]['content'] = $v_string; + + // ----- Next extracted file + $v_nb_extracted++; + + // ----- Look for user callback abort + if ($v_result1 == 2) { + break; + } + } + // ----- Look for extraction in standard output + elseif ( (isset($p_options[PCLZIP_OPT_EXTRACT_IN_OUTPUT])) + && ($p_options[PCLZIP_OPT_EXTRACT_IN_OUTPUT])) { + // ----- Extracting the file in standard output + $v_result1 = $this->privExtractFileInOutput($v_header, $p_options); + if ($v_result1 < 1) { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + return $v_result1; + } + + // ----- Get the only interesting attributes + if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted++])) != 1) { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + return $v_result; + } + + // ----- Look for user callback abort + if ($v_result1 == 2) { + break; + } + } + // ----- Look for normal extraction + else { + // ----- Extracting the file + $v_result1 = $this->privExtractFile($v_header, + $p_path, $p_remove_path, + $p_remove_all_path, + $p_options); + if ($v_result1 < 1) { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + return $v_result1; + } + + // ----- Get the only interesting attributes + if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted++])) != 1) + { + // ----- Close the zip file + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + return $v_result; + } + + // ----- Look for user callback abort + if ($v_result1 == 2) { + break; + } + } + } + } + + // ----- Close the zip file + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privExtractFile() + // Description : + // Parameters : + // Return Values : + // + // 1 : ... ? + // PCLZIP_ERR_USER_ABORTED(2) : User ask for extraction stop in callback + // -------------------------------------------------------------------------------- + function privExtractFile(&$p_entry, $p_path, $p_remove_path, $p_remove_all_path, &$p_options) + { + $v_result=1; + + // ----- Read the file header + if (($v_result = $this->privReadFileHeader($v_header)) != 1) + { + // ----- Return + return $v_result; + } + + + // ----- Check that the file header is coherent with $p_entry info + if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) { + // TBC + } + + // ----- Look for all path to remove + if ($p_remove_all_path == true) { + // ----- Look for folder entry that not need to be extracted + if (($p_entry['external']&0x00000010)==0x00000010) { + + $p_entry['status'] = "filtered"; + + return $v_result; + } + + // ----- Get the basename of the path + $p_entry['filename'] = basename($p_entry['filename']); + } + + // ----- Look for path to remove + else if ($p_remove_path != "") + { + if (PclZipUtilPathInclusion($p_remove_path, $p_entry['filename']) == 2) + { + + // ----- Change the file status + $p_entry['status'] = "filtered"; + + // ----- Return + return $v_result; + } + + $p_remove_path_size = strlen($p_remove_path); + if (substr($p_entry['filename'], 0, $p_remove_path_size) == $p_remove_path) + { + + // ----- Remove the path + $p_entry['filename'] = substr($p_entry['filename'], $p_remove_path_size); + + } + } + + // ----- Add the path + if ($p_path != '') { + $p_entry['filename'] = $p_path."/".$p_entry['filename']; + } + + // ----- Check a base_dir_restriction + if (isset($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION])) { + $v_inclusion + = PclZipUtilPathInclusion($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION], + $p_entry['filename']); + if ($v_inclusion == 0) { + + PclZip::privErrorLog(PCLZIP_ERR_DIRECTORY_RESTRICTION, + "Filename '".$p_entry['filename']."' is " + ."outside PCLZIP_OPT_EXTRACT_DIR_RESTRICTION"); + + return PclZip::errorCode(); + } + } + + // ----- Look for pre-extract callback + if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_entry, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. + $v_result = $p_options[PCLZIP_CB_PRE_EXTRACT](PCLZIP_CB_PRE_EXTRACT, $v_local_header); + if ($v_result == 0) { + // ----- Change the file status + $p_entry['status'] = "skipped"; + $v_result = 1; + } + + // ----- Look for abort result + if ($v_result == 2) { + // ----- This status is internal and will be changed in 'skipped' + $p_entry['status'] = "aborted"; + $v_result = PCLZIP_ERR_USER_ABORTED; + } + + // ----- Update the informations + // Only some fields can be modified + $p_entry['filename'] = $v_local_header['filename']; + } + + + // ----- Look if extraction should be done + if ($p_entry['status'] == 'ok') { + + // ----- Look for specific actions while the file exist + if (file_exists($p_entry['filename'])) + { + + // ----- Look if file is a directory + if (is_dir($p_entry['filename'])) + { + + // ----- Change the file status + $p_entry['status'] = "already_a_directory"; + + // ----- Look for PCLZIP_OPT_STOP_ON_ERROR + // For historical reason first PclZip implementation does not stop + // when this kind of error occurs. + if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) + && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { + + PclZip::privErrorLog(PCLZIP_ERR_ALREADY_A_DIRECTORY, + "Filename '".$p_entry['filename']."' is " + ."already used by an existing directory"); + + return PclZip::errorCode(); + } + } + // ----- Look if file is write protected + else if (!is_writeable($p_entry['filename'])) + { + + // ----- Change the file status + $p_entry['status'] = "write_protected"; + + // ----- Look for PCLZIP_OPT_STOP_ON_ERROR + // For historical reason first PclZip implementation does not stop + // when this kind of error occurs. + if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) + && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { + + PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, + "Filename '".$p_entry['filename']."' exists " + ."and is write protected"); + + return PclZip::errorCode(); + } + } + + // ----- Look if the extracted file is older + else if (filemtime($p_entry['filename']) > $p_entry['mtime']) + { + // ----- Change the file status + if ( (isset($p_options[PCLZIP_OPT_REPLACE_NEWER])) + && ($p_options[PCLZIP_OPT_REPLACE_NEWER]===true)) { + } + else { + $p_entry['status'] = "newer_exist"; + + // ----- Look for PCLZIP_OPT_STOP_ON_ERROR + // For historical reason first PclZip implementation does not stop + // when this kind of error occurs. + if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) + && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { + + PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, + "Newer version of '".$p_entry['filename']."' exists " + ."and option PCLZIP_OPT_REPLACE_NEWER is not selected"); + + return PclZip::errorCode(); + } + } + } + else { + } + } + + // ----- Check the directory availability and create it if necessary + else { + if ((($p_entry['external']&0x00000010)==0x00000010) || (substr($p_entry['filename'], -1) == '/')) + $v_dir_to_check = $p_entry['filename']; + else if (!strstr($p_entry['filename'], "/")) + $v_dir_to_check = ""; + else + $v_dir_to_check = dirname($p_entry['filename']); + + if (($v_result = $this->privDirCheck($v_dir_to_check, (($p_entry['external']&0x00000010)==0x00000010))) != 1) { + + // ----- Change the file status + $p_entry['status'] = "path_creation_fail"; + + // ----- Return + //return $v_result; + $v_result = 1; + } + } + } + + // ----- Look if extraction should be done + if ($p_entry['status'] == 'ok') { + + // ----- Do the extraction (if not a folder) + if (!(($p_entry['external']&0x00000010)==0x00000010)) + { + // ----- Look for not compressed file + if ($p_entry['compression'] == 0) { + + // ----- Opening destination file + if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) + { + + // ----- Change the file status + $p_entry['status'] = "write_error"; + + // ----- Return + return $v_result; + } + + + // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks + $v_size = $p_entry['compressed_size']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($this->zip_fd, $v_read_size); + /* Try to speed up the code + $v_binary_data = pack('a'.$v_read_size, $v_buffer); + @fwrite($v_dest_file, $v_binary_data, $v_read_size); + */ + @fwrite($v_dest_file, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Closing the destination file + fclose($v_dest_file); + + // ----- Change the file mtime + touch($p_entry['filename'], $p_entry['mtime']); + + + } + else { + // ----- TBC + // Need to be finished + if (($p_entry['flag'] & 1) == 1) { + PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION, 'File \''.$p_entry['filename'].'\' is encrypted. Encrypted files are not supported.'); + return PclZip::errorCode(); + } + + + // ----- Look for using temporary file to unzip + if ( (!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF])) + && (isset($p_options[PCLZIP_OPT_TEMP_FILE_ON]) + || (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]) + && ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] <= $p_entry['size'])) ) ) { + $v_result = $this->privExtractFileUsingTempFile($p_entry, $p_options); + if ($v_result < PCLZIP_ERR_NO_ERROR) { + return $v_result; + } + } + + // ----- Look for extract in memory + else { + + + // ----- Read the compressed file in a buffer (one shot) + $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']); + + // ----- Decompress the file + $v_file_content = @gzinflate($v_buffer); + unset($v_buffer); + if ($v_file_content === FALSE) { + + // ----- Change the file status + // TBC + $p_entry['status'] = "error"; + + return $v_result; + } + + // ----- Opening destination file + if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) { + + // ----- Change the file status + $p_entry['status'] = "write_error"; + + return $v_result; + } + + // ----- Write the uncompressed data + @fwrite($v_dest_file, $v_file_content, $p_entry['size']); + unset($v_file_content); + + // ----- Closing the destination file + @fclose($v_dest_file); + + } + + // ----- Change the file mtime + @touch($p_entry['filename'], $p_entry['mtime']); + } + + // ----- Look for chmod option + if (isset($p_options[PCLZIP_OPT_SET_CHMOD])) { + + // ----- Change the mode of the file + @chmod($p_entry['filename'], $p_options[PCLZIP_OPT_SET_CHMOD]); + } + + } + } + + // ----- Change abort status + if ($p_entry['status'] == "aborted") { + $p_entry['status'] = "skipped"; + } + + // ----- Look for post-extract callback + elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_entry, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. + $v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header); + + // ----- Look for abort result + if ($v_result == 2) { + $v_result = PCLZIP_ERR_USER_ABORTED; + } + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privExtractFileUsingTempFile() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privExtractFileUsingTempFile(&$p_entry, &$p_options) + { + $v_result=1; + + // ----- Creates a temporary file + $v_gzip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.gz'; + if (($v_dest_file = @fopen($v_gzip_temp_name, "wb")) == 0) { + fclose($v_file); + PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary write mode'); + return PclZip::errorCode(); + } + + + // ----- Write gz file format header + $v_binary_data = pack('va1a1Va1a1', 0x8b1f, Chr($p_entry['compression']), Chr(0x00), time(), Chr(0x00), Chr(3)); + @fwrite($v_dest_file, $v_binary_data, 10); + + // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks + $v_size = $p_entry['compressed_size']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($this->zip_fd, $v_read_size); + //$v_binary_data = pack('a'.$v_read_size, $v_buffer); + @fwrite($v_dest_file, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Write gz file format footer + $v_binary_data = pack('VV', $p_entry['crc'], $p_entry['size']); + @fwrite($v_dest_file, $v_binary_data, 8); + + // ----- Close the temporary file + @fclose($v_dest_file); + + // ----- Opening destination file + if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) { + $p_entry['status'] = "write_error"; + return $v_result; + } + + // ----- Open the temporary gz file + if (($v_src_file = @gzopen($v_gzip_temp_name, 'rb')) == 0) { + @fclose($v_dest_file); + $p_entry['status'] = "read_error"; + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode'); + return PclZip::errorCode(); + } + + + // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks + $v_size = $p_entry['size']; + while ($v_size != 0) { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @gzread($v_src_file, $v_read_size); + //$v_binary_data = pack('a'.$v_read_size, $v_buffer); + @fwrite($v_dest_file, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + @fclose($v_dest_file); + @gzclose($v_src_file); + + // ----- Delete the temporary file + @unlink($v_gzip_temp_name); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privExtractFileInOutput() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privExtractFileInOutput(&$p_entry, &$p_options) + { + $v_result=1; + + // ----- Read the file header + if (($v_result = $this->privReadFileHeader($v_header)) != 1) { + return $v_result; + } + + + // ----- Check that the file header is coherent with $p_entry info + if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) { + // TBC + } + + // ----- Look for pre-extract callback + if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_entry, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. +// eval('$v_result = '.$p_options[PCLZIP_CB_PRE_EXTRACT].'(PCLZIP_CB_PRE_EXTRACT, $v_local_header);'); + $v_result = $p_options[PCLZIP_CB_PRE_EXTRACT](PCLZIP_CB_PRE_EXTRACT, $v_local_header); + if ($v_result == 0) { + // ----- Change the file status + $p_entry['status'] = "skipped"; + $v_result = 1; + } + + // ----- Look for abort result + if ($v_result == 2) { + // ----- This status is internal and will be changed in 'skipped' + $p_entry['status'] = "aborted"; + $v_result = PCLZIP_ERR_USER_ABORTED; + } + + // ----- Update the informations + // Only some fields can be modified + $p_entry['filename'] = $v_local_header['filename']; + } + + // ----- Trace + + // ----- Look if extraction should be done + if ($p_entry['status'] == 'ok') { + + // ----- Do the extraction (if not a folder) + if (!(($p_entry['external']&0x00000010)==0x00000010)) { + // ----- Look for not compressed file + if ($p_entry['compressed_size'] == $p_entry['size']) { + + // ----- Read the file in a buffer (one shot) + $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']); + + // ----- Send the file to the output + echo $v_buffer; + unset($v_buffer); + } + else { + + // ----- Read the compressed file in a buffer (one shot) + $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']); + + // ----- Decompress the file + $v_file_content = gzinflate($v_buffer); + unset($v_buffer); + + // ----- Send the file to the output + echo $v_file_content; + unset($v_file_content); + } + } + } + + // ----- Change abort status + if ($p_entry['status'] == "aborted") { + $p_entry['status'] = "skipped"; + } + + // ----- Look for post-extract callback + elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_entry, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. + $v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header); + + // ----- Look for abort result + if ($v_result == 2) { + $v_result = PCLZIP_ERR_USER_ABORTED; + } + } + + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privExtractFileAsString() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privExtractFileAsString(&$p_entry, &$p_string, &$p_options) + { + $v_result=1; + + // ----- Read the file header + $v_header = array(); + if (($v_result = $this->privReadFileHeader($v_header)) != 1) + { + // ----- Return + return $v_result; + } + + + // ----- Check that the file header is coherent with $p_entry info + if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) { + // TBC + } + + // ----- Look for pre-extract callback + if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_entry, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. + $v_result = $p_options[PCLZIP_CB_PRE_EXTRACT](PCLZIP_CB_PRE_EXTRACT, $v_local_header); + if ($v_result == 0) { + // ----- Change the file status + $p_entry['status'] = "skipped"; + $v_result = 1; + } + + // ----- Look for abort result + if ($v_result == 2) { + // ----- This status is internal and will be changed in 'skipped' + $p_entry['status'] = "aborted"; + $v_result = PCLZIP_ERR_USER_ABORTED; + } + + // ----- Update the informations + // Only some fields can be modified + $p_entry['filename'] = $v_local_header['filename']; + } + + + // ----- Look if extraction should be done + if ($p_entry['status'] == 'ok') { + + // ----- Do the extraction (if not a folder) + if (!(($p_entry['external']&0x00000010)==0x00000010)) { + // ----- Look for not compressed file + // if ($p_entry['compressed_size'] == $p_entry['size']) + if ($p_entry['compression'] == 0) { + + // ----- Reading the file + $p_string = @fread($this->zip_fd, $p_entry['compressed_size']); + } + else { + + // ----- Reading the file + $v_data = @fread($this->zip_fd, $p_entry['compressed_size']); + + // ----- Decompress the file + if (($p_string = @gzinflate($v_data)) === FALSE) { + // TBC + } + } + + // ----- Trace + } + else { + // TBC : error : can not extract a folder in a string + } + + } + + // ----- Change abort status + if ($p_entry['status'] == "aborted") { + $p_entry['status'] = "skipped"; + } + + // ----- Look for post-extract callback + elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_entry, $v_local_header); + + // ----- Swap the content to header + $v_local_header['content'] = $p_string; + $p_string = ''; + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. + $v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header); + + // ----- Swap back the content to header + $p_string = $v_local_header['content']; + unset($v_local_header['content']); + + // ----- Look for abort result + if ($v_result == 2) { + $v_result = PCLZIP_ERR_USER_ABORTED; + } + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privReadFileHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privReadFileHeader(&$p_header) + { + $v_result=1; + + // ----- Read the 4 bytes signature + $v_binary_data = @fread($this->zip_fd, 4); + $v_data = unpack('Vid', $v_binary_data); + + // ----- Check signature + if ($v_data['id'] != 0x04034b50) + { + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid archive structure'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read the first 42 bytes of the header + $v_binary_data = fread($this->zip_fd, 26); + + // ----- Look for invalid block size + if (strlen($v_binary_data) != 26) + { + $p_header['filename'] = ""; + $p_header['status'] = "invalid_header"; + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data)); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Extract the values + $v_data = unpack('vversion/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len', $v_binary_data); + + // ----- Get filename + $p_header['filename'] = fread($this->zip_fd, $v_data['filename_len']); + + // ----- Get extra_fields + if ($v_data['extra_len'] != 0) { + $p_header['extra'] = fread($this->zip_fd, $v_data['extra_len']); + } + else { + $p_header['extra'] = ''; + } + + // ----- Extract properties + $p_header['version_extracted'] = $v_data['version']; + $p_header['compression'] = $v_data['compression']; + $p_header['size'] = $v_data['size']; + $p_header['compressed_size'] = $v_data['compressed_size']; + $p_header['crc'] = $v_data['crc']; + $p_header['flag'] = $v_data['flag']; + $p_header['filename_len'] = $v_data['filename_len']; + + // ----- Recuperate date in UNIX format + $p_header['mdate'] = $v_data['mdate']; + $p_header['mtime'] = $v_data['mtime']; + if ($p_header['mdate'] && $p_header['mtime']) + { + // ----- Extract time + $v_hour = ($p_header['mtime'] & 0xF800) >> 11; + $v_minute = ($p_header['mtime'] & 0x07E0) >> 5; + $v_seconde = ($p_header['mtime'] & 0x001F)*2; + + // ----- Extract date + $v_year = (($p_header['mdate'] & 0xFE00) >> 9) + 1980; + $v_month = ($p_header['mdate'] & 0x01E0) >> 5; + $v_day = $p_header['mdate'] & 0x001F; + + // ----- Get UNIX date format + $p_header['mtime'] = @mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year); + + } + else + { + $p_header['mtime'] = time(); + } + + // TBC + //for(reset($v_data); $key = key($v_data); next($v_data)) { + //} + + // ----- Set the stored filename + $p_header['stored_filename'] = $p_header['filename']; + + // ----- Set the status field + $p_header['status'] = "ok"; + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privReadCentralFileHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privReadCentralFileHeader(&$p_header) + { + $v_result=1; + + // ----- Read the 4 bytes signature + $v_binary_data = @fread($this->zip_fd, 4); + $v_data = unpack('Vid', $v_binary_data); + + // ----- Check signature + if ($v_data['id'] != 0x02014b50) + { + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid archive structure'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read the first 42 bytes of the header + $v_binary_data = fread($this->zip_fd, 42); + + // ----- Look for invalid block size + if (strlen($v_binary_data) != 42) + { + $p_header['filename'] = ""; + $p_header['status'] = "invalid_header"; + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data)); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Extract the values + $p_header = unpack('vversion/vversion_extracted/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len/vcomment_len/vdisk/vinternal/Vexternal/Voffset', $v_binary_data); + + // ----- Get filename + if ($p_header['filename_len'] != 0) + $p_header['filename'] = fread($this->zip_fd, $p_header['filename_len']); + else + $p_header['filename'] = ''; + + // ----- Get extra + if ($p_header['extra_len'] != 0) + $p_header['extra'] = fread($this->zip_fd, $p_header['extra_len']); + else + $p_header['extra'] = ''; + + // ----- Get comment + if ($p_header['comment_len'] != 0) + $p_header['comment'] = fread($this->zip_fd, $p_header['comment_len']); + else + $p_header['comment'] = ''; + + // ----- Extract properties + + // ----- Recuperate date in UNIX format + //if ($p_header['mdate'] && $p_header['mtime']) + // TBC : bug : this was ignoring time with 0/0/0 + if (1) + { + // ----- Extract time + $v_hour = ($p_header['mtime'] & 0xF800) >> 11; + $v_minute = ($p_header['mtime'] & 0x07E0) >> 5; + $v_seconde = ($p_header['mtime'] & 0x001F)*2; + + // ----- Extract date + $v_year = (($p_header['mdate'] & 0xFE00) >> 9) + 1980; + $v_month = ($p_header['mdate'] & 0x01E0) >> 5; + $v_day = $p_header['mdate'] & 0x001F; + + // ----- Get UNIX date format + $p_header['mtime'] = @mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year); + + } + else + { + $p_header['mtime'] = time(); + } + + // ----- Set the stored filename + $p_header['stored_filename'] = $p_header['filename']; + + // ----- Set default status to ok + $p_header['status'] = 'ok'; + + // ----- Look if it is a directory + if (substr($p_header['filename'], -1) == '/') { + //$p_header['external'] = 0x41FF0010; + $p_header['external'] = 0x00000010; + } + + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privCheckFileHeaders() + // Description : + // Parameters : + // Return Values : + // 1 on success, + // 0 on error; + // -------------------------------------------------------------------------------- + function privCheckFileHeaders(&$p_local_header, &$p_central_header) + { + $v_result=1; + + // ----- Check the static values + // TBC + if ($p_local_header['filename'] != $p_central_header['filename']) { + } + if ($p_local_header['version_extracted'] != $p_central_header['version_extracted']) { + } + if ($p_local_header['flag'] != $p_central_header['flag']) { + } + if ($p_local_header['compression'] != $p_central_header['compression']) { + } + if ($p_local_header['mtime'] != $p_central_header['mtime']) { + } + if ($p_local_header['filename_len'] != $p_central_header['filename_len']) { + } + + // ----- Look for flag bit 3 + if (($p_local_header['flag'] & 8) == 8) { + $p_local_header['size'] = $p_central_header['size']; + $p_local_header['compressed_size'] = $p_central_header['compressed_size']; + $p_local_header['crc'] = $p_central_header['crc']; + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privReadEndCentralDir() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privReadEndCentralDir(&$p_central_dir) + { + $v_result=1; + + // ----- Go to the end of the zip file + $v_size = filesize($this->zipname); + @fseek($this->zip_fd, $v_size); + if (@ftell($this->zip_fd) != $v_size) + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to go to the end of the archive \''.$this->zipname.'\''); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- First try : look if this is an archive with no commentaries (most of the time) + // in this case the end of central dir is at 22 bytes of the file end + $v_found = 0; + if ($v_size > 26) { + @fseek($this->zip_fd, $v_size-22); + if (($v_pos = @ftell($this->zip_fd)) != ($v_size-22)) + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\''); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read for bytes + $v_binary_data = @fread($this->zip_fd, 4); + $v_data = @unpack('Vid', $v_binary_data); + + // ----- Check signature + if ($v_data['id'] == 0x06054b50) { + $v_found = 1; + } + + $v_pos = ftell($this->zip_fd); + } + + // ----- Go back to the maximum possible size of the Central Dir End Record + if (!$v_found) { + $v_maximum_size = 65557; // 0xFFFF + 22; + if ($v_maximum_size > $v_size) + $v_maximum_size = $v_size; + @fseek($this->zip_fd, $v_size-$v_maximum_size); + if (@ftell($this->zip_fd) != ($v_size-$v_maximum_size)) + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\''); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read byte per byte in order to find the signature + $v_pos = ftell($this->zip_fd); + $v_bytes = 0x00000000; + while ($v_pos < $v_size) + { + // ----- Read a byte + $v_byte = @fread($this->zip_fd, 1); + + // ----- Add the byte + //$v_bytes = ($v_bytes << 8) | Ord($v_byte); + // Note we mask the old value down such that once shifted we can never end up with more than a 32bit number + // Otherwise on systems where we have 64bit integers the check below for the magic number will fail. + $v_bytes = ( ($v_bytes & 0xFFFFFF) << 8) | Ord($v_byte); + + // ----- Compare the bytes + if ($v_bytes == 0x504b0506) + { + $v_pos++; + break; + } + + $v_pos++; + } + + // ----- Look if not found end of central dir + if ($v_pos == $v_size) + { + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Unable to find End of Central Dir Record signature"); + + // ----- Return + return PclZip::errorCode(); + } + } + + // ----- Read the first 18 bytes of the header + $v_binary_data = fread($this->zip_fd, 18); + + // ----- Look for invalid block size + if (strlen($v_binary_data) != 18) + { + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid End of Central Dir Record size : ".strlen($v_binary_data)); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Extract the values + $v_data = unpack('vdisk/vdisk_start/vdisk_entries/ventries/Vsize/Voffset/vcomment_size', $v_binary_data); + + // ----- Check the global size + if (($v_pos + $v_data['comment_size'] + 18) != $v_size) { + + // ----- Removed in release 2.2 see readme file + // The check of the file size is a little too strict. + // Some bugs where found when a zip is encrypted/decrypted with 'crypt'. + // While decrypted, zip has training 0 bytes + if (0) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, + 'The central dir is not at the end of the archive.' + .' Some trailing bytes exists after the archive.'); + + // ----- Return + return PclZip::errorCode(); + } + } + + // ----- Get comment + if ($v_data['comment_size'] != 0) { + $p_central_dir['comment'] = fread($this->zip_fd, $v_data['comment_size']); + } + else + $p_central_dir['comment'] = ''; + + $p_central_dir['entries'] = $v_data['entries']; + $p_central_dir['disk_entries'] = $v_data['disk_entries']; + $p_central_dir['offset'] = $v_data['offset']; + $p_central_dir['size'] = $v_data['size']; + $p_central_dir['disk'] = $v_data['disk']; + $p_central_dir['disk_start'] = $v_data['disk_start']; + + // TBC + //for(reset($p_central_dir); $key = key($p_central_dir); next($p_central_dir)) { + //} + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privDeleteByRule() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privDeleteByRule(&$p_result_list, &$p_options) + { + $v_result=1; + $v_list_detail = array(); + + // ----- Open the zip file + if (($v_result=$this->privOpenFd('rb')) != 1) + { + // ----- Return + return $v_result; + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + $this->privCloseFd(); + return $v_result; + } + + // ----- Go to beginning of File + @rewind($this->zip_fd); + + // ----- Scan all the files + // ----- Start at beginning of Central Dir + $v_pos_entry = $v_central_dir['offset']; + @rewind($this->zip_fd); + if (@fseek($this->zip_fd, $v_pos_entry)) + { + // ----- Close the zip file + $this->privCloseFd(); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read each entry + $v_header_list = array(); + $j_start = 0; + for ($i=0, $v_nb_extracted=0; $i<$v_central_dir['entries']; $i++) + { + + // ----- Read the file header + $v_header_list[$v_nb_extracted] = array(); + if (($v_result = $this->privReadCentralFileHeader($v_header_list[$v_nb_extracted])) != 1) + { + // ----- Close the zip file + $this->privCloseFd(); + + return $v_result; + } + + + // ----- Store the index + $v_header_list[$v_nb_extracted]['index'] = $i; + + // ----- Look for the specific extract rules + $v_found = false; + + // ----- Look for extract by name rule + if ( (isset($p_options[PCLZIP_OPT_BY_NAME])) + && ($p_options[PCLZIP_OPT_BY_NAME] != 0)) { + + // ----- Look if the filename is in the list + for ($j=0; ($j strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) + && (substr($v_header_list[$v_nb_extracted]['stored_filename'], 0, strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) == $p_options[PCLZIP_OPT_BY_NAME][$j])) { + $v_found = true; + } + elseif ( (($v_header_list[$v_nb_extracted]['external']&0x00000010)==0x00000010) /* Indicates a folder */ + && ($v_header_list[$v_nb_extracted]['stored_filename'].'/' == $p_options[PCLZIP_OPT_BY_NAME][$j])) { + $v_found = true; + } + } + // ----- Look for a filename + elseif ($v_header_list[$v_nb_extracted]['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) { + $v_found = true; + } + } + } + + // ----- Look for extract by ereg rule + // ereg() is deprecated with PHP 5.3 + /* + else if ( (isset($p_options[PCLZIP_OPT_BY_EREG])) + && ($p_options[PCLZIP_OPT_BY_EREG] != "")) { + + if (ereg($p_options[PCLZIP_OPT_BY_EREG], $v_header_list[$v_nb_extracted]['stored_filename'])) { + $v_found = true; + } + } + */ + + // ----- Look for extract by preg rule + else if ( (isset($p_options[PCLZIP_OPT_BY_PREG])) + && ($p_options[PCLZIP_OPT_BY_PREG] != "")) { + + if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header_list[$v_nb_extracted]['stored_filename'])) { + $v_found = true; + } + } + + // ----- Look for extract by index rule + else if ( (isset($p_options[PCLZIP_OPT_BY_INDEX])) + && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) { + + // ----- Look if the index is in the list + for ($j=$j_start; ($j=$p_options[PCLZIP_OPT_BY_INDEX][$j]['start']) && ($i<=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end'])) { + $v_found = true; + } + if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) { + $j_start = $j+1; + } + + if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) { + break; + } + } + } + else { + $v_found = true; + } + + // ----- Look for deletion + if ($v_found) + { + unset($v_header_list[$v_nb_extracted]); + } + else + { + $v_nb_extracted++; + } + } + + // ----- Look if something need to be deleted + if ($v_nb_extracted > 0) { + + // ----- Creates a temporay file + $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp'; + + // ----- Creates a temporary zip archive + $v_temp_zip = new PclZip($v_zip_temp_name); + + // ----- Open the temporary zip file in write mode + if (($v_result = $v_temp_zip->privOpenFd('wb')) != 1) { + $this->privCloseFd(); + + // ----- Return + return $v_result; + } + + // ----- Look which file need to be kept + for ($i=0; $izip_fd); + if (@fseek($this->zip_fd, $v_header_list[$i]['offset'])) { + // ----- Close the zip file + $this->privCloseFd(); + $v_temp_zip->privCloseFd(); + @unlink($v_zip_temp_name); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read the file header + $v_local_header = array(); + if (($v_result = $this->privReadFileHeader($v_local_header)) != 1) { + // ----- Close the zip file + $this->privCloseFd(); + $v_temp_zip->privCloseFd(); + @unlink($v_zip_temp_name); + + // ----- Return + return $v_result; + } + + // ----- Check that local file header is same as central file header + if ($this->privCheckFileHeaders($v_local_header, + $v_header_list[$i]) != 1) { + // TBC + } + unset($v_local_header); + + // ----- Write the file header + if (($v_result = $v_temp_zip->privWriteFileHeader($v_header_list[$i])) != 1) { + // ----- Close the zip file + $this->privCloseFd(); + $v_temp_zip->privCloseFd(); + @unlink($v_zip_temp_name); + + // ----- Return + return $v_result; + } + + // ----- Read/write the data block + if (($v_result = PclZipUtilCopyBlock($this->zip_fd, $v_temp_zip->zip_fd, $v_header_list[$i]['compressed_size'])) != 1) { + // ----- Close the zip file + $this->privCloseFd(); + $v_temp_zip->privCloseFd(); + @unlink($v_zip_temp_name); + + // ----- Return + return $v_result; + } + } + + // ----- Store the offset of the central dir + $v_offset = @ftell($v_temp_zip->zip_fd); + + // ----- Re-Create the Central Dir files header + for ($i=0; $iprivWriteCentralFileHeader($v_header_list[$i])) != 1) { + $v_temp_zip->privCloseFd(); + $this->privCloseFd(); + @unlink($v_zip_temp_name); + + // ----- Return + return $v_result; + } + + // ----- Transform the header to a 'usable' info + $v_temp_zip->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]); + } + + + // ----- Zip file comment + $v_comment = ''; + if (isset($p_options[PCLZIP_OPT_COMMENT])) { + $v_comment = $p_options[PCLZIP_OPT_COMMENT]; + } + + // ----- Calculate the size of the central header + $v_size = @ftell($v_temp_zip->zip_fd)-$v_offset; + + // ----- Create the central dir footer + if (($v_result = $v_temp_zip->privWriteCentralHeader(sizeof($v_header_list), $v_size, $v_offset, $v_comment)) != 1) { + // ----- Reset the file list + unset($v_header_list); + $v_temp_zip->privCloseFd(); + $this->privCloseFd(); + @unlink($v_zip_temp_name); + + // ----- Return + return $v_result; + } + + // ----- Close + $v_temp_zip->privCloseFd(); + $this->privCloseFd(); + + // ----- Delete the zip file + // TBC : I should test the result ... + @unlink($this->zipname); + + // ----- Rename the temporary file + // TBC : I should test the result ... + //@rename($v_zip_temp_name, $this->zipname); + PclZipUtilRename($v_zip_temp_name, $this->zipname); + + // ----- Destroy the temporary archive + unset($v_temp_zip); + } + + // ----- Remove every files : reset the file + else if ($v_central_dir['entries'] != 0) { + $this->privCloseFd(); + + if (($v_result = $this->privOpenFd('wb')) != 1) { + return $v_result; + } + + if (($v_result = $this->privWriteCentralHeader(0, 0, 0, '')) != 1) { + return $v_result; + } + + $this->privCloseFd(); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privDirCheck() + // Description : + // Check if a directory exists, if not it creates it and all the parents directory + // which may be useful. + // Parameters : + // $p_dir : Directory path to check. + // Return Values : + // 1 : OK + // -1 : Unable to create directory + // -------------------------------------------------------------------------------- + function privDirCheck($p_dir, $p_is_dir=false) + { + $v_result = 1; + + + // ----- Remove the final '/' + if (($p_is_dir) && (substr($p_dir, -1)=='/')) + { + $p_dir = substr($p_dir, 0, strlen($p_dir)-1); + } + + // ----- Check the directory availability + if ((is_dir($p_dir)) || ($p_dir == "")) + { + return 1; + } + + // ----- Extract parent directory + $p_parent_dir = dirname($p_dir); + + // ----- Just a check + if ($p_parent_dir != $p_dir) + { + // ----- Look for parent directory + if ($p_parent_dir != "") + { + if (($v_result = $this->privDirCheck($p_parent_dir)) != 1) + { + return $v_result; + } + } + } + + // ----- Create the directory + if (!@mkdir($p_dir, 0777)) + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_DIR_CREATE_FAIL, "Unable to create directory '$p_dir'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privMerge() + // Description : + // If $p_archive_to_add does not exist, the function exit with a success result. + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privMerge(&$p_archive_to_add) + { + $v_result=1; + + // ----- Look if the archive_to_add exists + if (!is_file($p_archive_to_add->zipname)) + { + + // ----- Nothing to merge, so merge is a success + $v_result = 1; + + // ----- Return + return $v_result; + } + + // ----- Look if the archive exists + if (!is_file($this->zipname)) + { + + // ----- Do a duplicate + $v_result = $this->privDuplicate($p_archive_to_add->zipname); + + // ----- Return + return $v_result; + } + + // ----- Open the zip file + if (($v_result=$this->privOpenFd('rb')) != 1) + { + // ----- Return + return $v_result; + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + $this->privCloseFd(); + return $v_result; + } + + // ----- Go to beginning of File + @rewind($this->zip_fd); + + // ----- Open the archive_to_add file + if (($v_result=$p_archive_to_add->privOpenFd('rb')) != 1) + { + $this->privCloseFd(); + + // ----- Return + return $v_result; + } + + // ----- Read the central directory informations + $v_central_dir_to_add = array(); + if (($v_result = $p_archive_to_add->privReadEndCentralDir($v_central_dir_to_add)) != 1) + { + $this->privCloseFd(); + $p_archive_to_add->privCloseFd(); + + return $v_result; + } + + // ----- Go to beginning of File + @rewind($p_archive_to_add->zip_fd); + + // ----- Creates a temporay file + $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp'; + + // ----- Open the temporary file in write mode + if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0) + { + $this->privCloseFd(); + $p_archive_to_add->privCloseFd(); + + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Copy the files from the archive to the temporary file + // TBC : Here I should better append the file and go back to erase the central dir + $v_size = $v_central_dir['offset']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = fread($this->zip_fd, $v_read_size); + @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Copy the files from the archive_to_add into the temporary file + $v_size = $v_central_dir_to_add['offset']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = fread($p_archive_to_add->zip_fd, $v_read_size); + @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Store the offset of the central dir + $v_offset = @ftell($v_zip_temp_fd); + + // ----- Copy the block of file headers from the old archive + $v_size = $v_central_dir['size']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($this->zip_fd, $v_read_size); + @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Copy the block of file headers from the archive_to_add + $v_size = $v_central_dir_to_add['size']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($p_archive_to_add->zip_fd, $v_read_size); + @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Merge the file comments + $v_comment = $v_central_dir['comment'].' '.$v_central_dir_to_add['comment']; + + // ----- Calculate the size of the (new) central header + $v_size = @ftell($v_zip_temp_fd)-$v_offset; + + // ----- Swap the file descriptor + // Here is a trick : I swap the temporary fd with the zip fd, in order to use + // the following methods on the temporary fil and not the real archive fd + $v_swap = $this->zip_fd; + $this->zip_fd = $v_zip_temp_fd; + $v_zip_temp_fd = $v_swap; + + // ----- Create the central dir footer + if (($v_result = $this->privWriteCentralHeader($v_central_dir['entries']+$v_central_dir_to_add['entries'], $v_size, $v_offset, $v_comment)) != 1) + { + $this->privCloseFd(); + $p_archive_to_add->privCloseFd(); + @fclose($v_zip_temp_fd); + $this->zip_fd = null; + + // ----- Reset the file list + unset($v_header_list); + + // ----- Return + return $v_result; + } + + // ----- Swap back the file descriptor + $v_swap = $this->zip_fd; + $this->zip_fd = $v_zip_temp_fd; + $v_zip_temp_fd = $v_swap; + + // ----- Close + $this->privCloseFd(); + $p_archive_to_add->privCloseFd(); + + // ----- Close the temporary file + @fclose($v_zip_temp_fd); + + // ----- Delete the zip file + // TBC : I should test the result ... + @unlink($this->zipname); + + // ----- Rename the temporary file + // TBC : I should test the result ... + //@rename($v_zip_temp_name, $this->zipname); + PclZipUtilRename($v_zip_temp_name, $this->zipname); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privDuplicate() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privDuplicate($p_archive_filename) + { + $v_result=1; + + // ----- Look if the $p_archive_filename exists + if (!is_file($p_archive_filename)) + { + + // ----- Nothing to duplicate, so duplicate is a success. + $v_result = 1; + + // ----- Return + return $v_result; + } + + // ----- Open the zip file + if (($v_result=$this->privOpenFd('wb')) != 1) + { + // ----- Return + return $v_result; + } + + // ----- Open the temporary file in write mode + if (($v_zip_temp_fd = @fopen($p_archive_filename, 'rb')) == 0) + { + $this->privCloseFd(); + + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive file \''.$p_archive_filename.'\' in binary write mode'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Copy the files from the archive to the temporary file + // TBC : Here I should better append the file and go back to erase the central dir + $v_size = filesize($p_archive_filename); + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = fread($v_zip_temp_fd, $v_read_size); + @fwrite($this->zip_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Close + $this->privCloseFd(); + + // ----- Close the temporary file + @fclose($v_zip_temp_fd); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privErrorLog() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function privErrorLog($p_error_code=0, $p_error_string='') + { + if (PCLZIP_ERROR_EXTERNAL == 1) { + PclError($p_error_code, $p_error_string); + } + else { + $this->error_code = $p_error_code; + $this->error_string = $p_error_string; + } + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privErrorReset() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function privErrorReset() + { + if (PCLZIP_ERROR_EXTERNAL == 1) { + PclErrorReset(); + } + else { + $this->error_code = 0; + $this->error_string = ''; + } + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privDisableMagicQuotes() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privDisableMagicQuotes() + { + $v_result=1; + + // ----- Look if function exists + if ( (!function_exists("get_magic_quotes_runtime")) + || (!function_exists("set_magic_quotes_runtime"))) { + return $v_result; + } + + // ----- Look if already done + if ($this->magic_quotes_status != -1) { + return $v_result; + } + + // ----- Get and memorize the magic_quote value + $this->magic_quotes_status = @get_magic_quotes_runtime(); + + // ----- Disable magic_quotes + if ($this->magic_quotes_status == 1) { + @set_magic_quotes_runtime(0); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privSwapBackMagicQuotes() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privSwapBackMagicQuotes() + { + $v_result=1; + + // ----- Look if function exists + if ( (!function_exists("get_magic_quotes_runtime")) + || (!function_exists("set_magic_quotes_runtime"))) { + return $v_result; + } + + // ----- Look if something to do + if ($this->magic_quotes_status != -1) { + return $v_result; + } + + // ----- Swap back magic_quotes + if ($this->magic_quotes_status == 1) { + @set_magic_quotes_runtime($this->magic_quotes_status); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + } + // End of class + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclZipUtilPathReduction() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function PclZipUtilPathReduction($p_dir) + { + $v_result = ""; + + // ----- Look for not empty path + if ($p_dir != "") { + // ----- Explode path by directory names + $v_list = explode("/", $p_dir); + + // ----- Study directories from last to first + $v_skip = 0; + for ($i=sizeof($v_list)-1; $i>=0; $i--) { + // ----- Look for current path + if ($v_list[$i] == ".") { + // ----- Ignore this directory + // Should be the first $i=0, but no check is done + } + else if ($v_list[$i] == "..") { + $v_skip++; + } + else if ($v_list[$i] == "") { + // ----- First '/' i.e. root slash + if ($i == 0) { + $v_result = "/".$v_result; + if ($v_skip > 0) { + // ----- It is an invalid path, so the path is not modified + // TBC + $v_result = $p_dir; + $v_skip = 0; + } + } + // ----- Last '/' i.e. indicates a directory + else if ($i == (sizeof($v_list)-1)) { + $v_result = $v_list[$i]; + } + // ----- Double '/' inside the path + else { + // ----- Ignore only the double '//' in path, + // but not the first and last '/' + } + } + else { + // ----- Look for item to skip + if ($v_skip > 0) { + $v_skip--; + } + else { + $v_result = $v_list[$i].($i!=(sizeof($v_list)-1)?"/".$v_result:""); + } + } + } + + // ----- Look for skip + if ($v_skip > 0) { + while ($v_skip > 0) { + $v_result = '../'.$v_result; + $v_skip--; + } + } + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclZipUtilPathInclusion() + // Description : + // This function indicates if the path $p_path is under the $p_dir tree. Or, + // said in an other way, if the file or sub-dir $p_path is inside the dir + // $p_dir. + // The function indicates also if the path is exactly the same as the dir. + // This function supports path with duplicated '/' like '//', but does not + // support '.' or '..' statements. + // Parameters : + // Return Values : + // 0 if $p_path is not inside directory $p_dir + // 1 if $p_path is inside directory $p_dir + // 2 if $p_path is exactly the same as $p_dir + // -------------------------------------------------------------------------------- + function PclZipUtilPathInclusion($p_dir, $p_path) + { + $v_result = 1; + + // ----- Look for path beginning by ./ + if ( ($p_dir == '.') + || ((strlen($p_dir) >=2) && (substr($p_dir, 0, 2) == './'))) { + $p_dir = PclZipUtilTranslateWinPath(getcwd(), FALSE).'/'.substr($p_dir, 1); + } + if ( ($p_path == '.') + || ((strlen($p_path) >=2) && (substr($p_path, 0, 2) == './'))) { + $p_path = PclZipUtilTranslateWinPath(getcwd(), FALSE).'/'.substr($p_path, 1); + } + + // ----- Explode dir and path by directory separator + $v_list_dir = explode("/", $p_dir); + $v_list_dir_size = sizeof($v_list_dir); + $v_list_path = explode("/", $p_path); + $v_list_path_size = sizeof($v_list_path); + + // ----- Study directories paths + $i = 0; + $j = 0; + while (($i < $v_list_dir_size) && ($j < $v_list_path_size) && ($v_result)) { + + // ----- Look for empty dir (path reduction) + if ($v_list_dir[$i] == '') { + $i++; + continue; + } + if ($v_list_path[$j] == '') { + $j++; + continue; + } + + // ----- Compare the items + if (($v_list_dir[$i] != $v_list_path[$j]) && ($v_list_dir[$i] != '') && ( $v_list_path[$j] != '')) { + $v_result = 0; + } + + // ----- Next items + $i++; + $j++; + } + + // ----- Look if everything seems to be the same + if ($v_result) { + // ----- Skip all the empty items + while (($j < $v_list_path_size) && ($v_list_path[$j] == '')) $j++; + while (($i < $v_list_dir_size) && ($v_list_dir[$i] == '')) $i++; + + if (($i >= $v_list_dir_size) && ($j >= $v_list_path_size)) { + // ----- There are exactly the same + $v_result = 2; + } + else if ($i < $v_list_dir_size) { + // ----- The path is shorter than the dir + $v_result = 0; + } + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclZipUtilCopyBlock() + // Description : + // Parameters : + // $p_mode : read/write compression mode + // 0 : src & dest normal + // 1 : src gzip, dest normal + // 2 : src normal, dest gzip + // 3 : src & dest gzip + // Return Values : + // -------------------------------------------------------------------------------- + function PclZipUtilCopyBlock($p_src, $p_dest, $p_size, $p_mode=0) + { + $v_result = 1; + + if ($p_mode==0) + { + while ($p_size != 0) + { + $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($p_src, $v_read_size); + @fwrite($p_dest, $v_buffer, $v_read_size); + $p_size -= $v_read_size; + } + } + else if ($p_mode==1) + { + while ($p_size != 0) + { + $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @gzread($p_src, $v_read_size); + @fwrite($p_dest, $v_buffer, $v_read_size); + $p_size -= $v_read_size; + } + } + else if ($p_mode==2) + { + while ($p_size != 0) + { + $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($p_src, $v_read_size); + @gzwrite($p_dest, $v_buffer, $v_read_size); + $p_size -= $v_read_size; + } + } + else if ($p_mode==3) + { + while ($p_size != 0) + { + $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @gzread($p_src, $v_read_size); + @gzwrite($p_dest, $v_buffer, $v_read_size); + $p_size -= $v_read_size; + } + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclZipUtilRename() + // Description : + // This function tries to do a simple rename() function. If it fails, it + // tries to copy the $p_src file in a new $p_dest file and then unlink the + // first one. + // Parameters : + // $p_src : Old filename + // $p_dest : New filename + // Return Values : + // 1 on success, 0 on failure. + // -------------------------------------------------------------------------------- + function PclZipUtilRename($p_src, $p_dest) + { + $v_result = 1; + + // ----- Try to rename the files + if (!@rename($p_src, $p_dest)) { + + // ----- Try to copy & unlink the src + if (!@copy($p_src, $p_dest)) { + $v_result = 0; + } + else if (!@unlink($p_src)) { + $v_result = 0; + } + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclZipUtilOptionText() + // Description : + // Translate option value in text. Mainly for debug purpose. + // Parameters : + // $p_option : the option value. + // Return Values : + // The option text value. + // -------------------------------------------------------------------------------- + function PclZipUtilOptionText($p_option) + { + + $v_list = get_defined_constants(); + for (reset($v_list); $v_key = key($v_list); next($v_list)) { + $v_prefix = substr($v_key, 0, 10); + if (( ($v_prefix == 'PCLZIP_OPT') + || ($v_prefix == 'PCLZIP_CB_') + || ($v_prefix == 'PCLZIP_ATT')) + && ($v_list[$v_key] == $p_option)) { + return $v_key; + } + } + + $v_result = 'Unknown'; + + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclZipUtilTranslateWinPath() + // Description : + // Translate windows path by replacing '\' by '/' and optionally removing + // drive letter. + // Parameters : + // $p_path : path to translate. + // $p_remove_disk_letter : true | false + // Return Values : + // The path translated. + // -------------------------------------------------------------------------------- + function PclZipUtilTranslateWinPath($p_path, $p_remove_disk_letter=true) + { + if (stristr(php_uname(), 'windows')) { + // ----- Look for potential disk letter + if (($p_remove_disk_letter) && (($v_position = strpos($p_path, ':')) != false)) { + $p_path = substr($p_path, $v_position+1); + } + // ----- Change potential windows directory separator + if ((strpos($p_path, '\\') > 0) || (substr($p_path, 0,1) == '\\')) { + $p_path = strtr($p_path, '\\', '/'); + } + } + return $p_path; + } + // -------------------------------------------------------------------------------- + + +?> diff --git a/wp-admin/includes/class-wp-comments-list-table.php b/wp-admin/includes/class-wp-comments-list-table.php new file mode 100644 index 0000000..c489efe --- /dev/null +++ b/wp-admin/includes/class-wp-comments-list-table.php @@ -0,0 +1,616 @@ + 'comments', + 'singular' => 'comment', + 'ajax' => true, + 'screen' => isset( $args['screen'] ) ? $args['screen'] : null, + ) ); + } + + function ajax_user_can() { + return current_user_can('edit_posts'); + } + + function prepare_items() { + global $post_id, $comment_status, $search, $comment_type; + + $comment_status = isset( $_REQUEST['comment_status'] ) ? $_REQUEST['comment_status'] : 'all'; + if ( !in_array( $comment_status, array( 'all', 'moderated', 'approved', 'spam', 'trash' ) ) ) + $comment_status = 'all'; + + $comment_type = !empty( $_REQUEST['comment_type'] ) ? $_REQUEST['comment_type'] : ''; + + $search = ( isset( $_REQUEST['s'] ) ) ? $_REQUEST['s'] : ''; + + $post_type = ( isset( $_REQUEST['post_type'] ) ) ? sanitize_key( $_REQUEST['post_type'] ) : ''; + + $user_id = ( isset( $_REQUEST['user_id'] ) ) ? $_REQUEST['user_id'] : ''; + + $orderby = ( isset( $_REQUEST['orderby'] ) ) ? $_REQUEST['orderby'] : ''; + $order = ( isset( $_REQUEST['order'] ) ) ? $_REQUEST['order'] : ''; + + $comments_per_page = $this->get_per_page( $comment_status ); + + $doing_ajax = defined( 'DOING_AJAX' ) && DOING_AJAX; + + if ( isset( $_REQUEST['number'] ) ) { + $number = (int) $_REQUEST['number']; + } + else { + $number = $comments_per_page + min( 8, $comments_per_page ); // Grab a few extra + } + + $page = $this->get_pagenum(); + + if ( isset( $_REQUEST['start'] ) ) { + $start = $_REQUEST['start']; + } else { + $start = ( $page - 1 ) * $comments_per_page; + } + + if ( $doing_ajax && isset( $_REQUEST['offset'] ) ) { + $start += $_REQUEST['offset']; + } + + $status_map = array( + 'moderated' => 'hold', + 'approved' => 'approve', + 'all' => '', + ); + + $args = array( + 'status' => isset( $status_map[$comment_status] ) ? $status_map[$comment_status] : $comment_status, + 'search' => $search, + 'user_id' => $user_id, + 'offset' => $start, + 'number' => $number, + 'post_id' => $post_id, + 'type' => $comment_type, + 'orderby' => $orderby, + 'order' => $order, + 'post_type' => $post_type, + ); + + $_comments = get_comments( $args ); + + update_comment_cache( $_comments ); + + $this->items = array_slice( $_comments, 0, $comments_per_page ); + $this->extra_items = array_slice( $_comments, $comments_per_page ); + + $total_comments = get_comments( array_merge( $args, array('count' => true, 'offset' => 0, 'number' => 0) ) ); + + $_comment_post_ids = array(); + foreach ( $_comments as $_c ) { + $_comment_post_ids[] = $_c->comment_post_ID; + } + + $_comment_post_ids = array_unique( $_comment_post_ids ); + + $this->pending_count = get_pending_comments_num( $_comment_post_ids ); + + $this->set_pagination_args( array( + 'total_items' => $total_comments, + 'per_page' => $comments_per_page, + ) ); + } + + function get_per_page( $comment_status = 'all' ) { + $comments_per_page = $this->get_items_per_page( 'edit_comments_per_page' ); + /** + * Filter the number of comments listed per page in the comments list table. + * + * @since 2.6.0 + * + * @param int $comments_per_page The number of comments to list per page. + * @param string $comment_status The comment status name. Default 'All'. + */ + $comments_per_page = apply_filters( 'comments_per_page', $comments_per_page, $comment_status ); + return $comments_per_page; + } + + function no_items() { + global $comment_status; + + if ( 'moderated' == $comment_status ) + _e( 'No comments awaiting moderation.' ); + else + _e( 'No comments found.' ); + } + + function get_views() { + global $post_id, $comment_status, $comment_type; + + $status_links = array(); + $num_comments = ( $post_id ) ? wp_count_comments( $post_id ) : wp_count_comments(); + //, number_format_i18n($num_comments->moderated) ), "" . number_format_i18n($num_comments->moderated) . ""), + //, number_format_i18n($num_comments->spam) ), "" . number_format_i18n($num_comments->spam) . "") + $stati = array( + 'all' => _nx_noop('All', 'All', 'comments'), // singular not used + 'moderated' => _n_noop('Pending (%s)', 'Pending (%s)'), + 'approved' => _n_noop('Approved', 'Approved'), // singular not used + 'spam' => _n_noop('Spam (%s)', 'Spam (%s)'), + 'trash' => _n_noop('Trash (%s)', 'Trash (%s)') + ); + + if ( !EMPTY_TRASH_DAYS ) + unset($stati['trash']); + + $link = 'edit-comments.php'; + if ( !empty($comment_type) && 'all' != $comment_type ) + $link = add_query_arg( 'comment_type', $comment_type, $link ); + + foreach ( $stati as $status => $label ) { + $class = ( $status == $comment_status ) ? ' class="current"' : ''; + + if ( !isset( $num_comments->$status ) ) + $num_comments->$status = 10; + $link = add_query_arg( 'comment_status', $status, $link ); + if ( $post_id ) + $link = add_query_arg( 'p', absint( $post_id ), $link ); + /* + // I toyed with this, but decided against it. Leaving it in here in case anyone thinks it is a good idea. ~ Mark + if ( !empty( $_REQUEST['s'] ) ) + $link = add_query_arg( 's', esc_attr( wp_unslash( $_REQUEST['s'] ) ), $link ); + */ + $status_links[$status] = "" . sprintf( + translate_nooped_plural( $label, $num_comments->$status ), + number_format_i18n( $num_comments->$status ) + ) . ''; + } + + /** + * Filter the comment status links. + * + * @since 2.5.0 + * + * @param array $status_links An array of fully-formed status links. Default 'All'. + * Accepts 'All', 'Pending', 'Approved', 'Spam', and 'Trash'. + */ + $status_links = apply_filters( 'comment_status_links', $status_links ); + return $status_links; + } + + function get_bulk_actions() { + global $comment_status; + + $actions = array(); + if ( in_array( $comment_status, array( 'all', 'approved' ) ) ) + $actions['unapprove'] = __( 'Unapprove' ); + 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' ); + + if ( 'trash' == $comment_status ) + $actions['untrash'] = __( 'Restore' ); + elseif ( 'spam' == $comment_status ) + $actions['unspam'] = _x( 'Not Spam', 'comment' ); + + if ( in_array( $comment_status, array( 'trash', 'spam' ) ) || !EMPTY_TRASH_DAYS ) + $actions['delete'] = __( 'Delete Permanently' ); + else + $actions['trash'] = __( 'Move to Trash' ); + + return $actions; + } + + function extra_tablenav( $which ) { + global $comment_status, $comment_type; +?> +
+ + + 'post-query-submit' ) ); + } + + if ( ( 'spam' == $comment_status || 'trash' == $comment_status ) && current_user_can( 'moderate_comments' ) ) { + wp_nonce_field( 'bulk-destroy', '_destroy_nonce' ); + $title = ( 'spam' == $comment_status ) ? esc_attr__( 'Empty Spam' ) : esc_attr__( 'Empty Trash' ); + submit_button( $title, 'apply', 'delete_all', false ); + } + /** + * Fires after the Filter submit button for comment types. + * + * @since 2.5.0 + * + * @param string $comment_status The comment status name. Default 'All'. + */ + do_action( 'manage_comments_nav', $comment_status ); + echo '
'; + } + + function current_action() { + if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) ) + return 'delete_all'; + + return parent::current_action(); + } + + function get_columns() { + global $post_id; + + $columns = array(); + + if ( $this->checkbox ) + $columns['cb'] = ''; + + $columns['author'] = __( 'Author' ); + $columns['comment'] = _x( 'Comment', 'column name' ); + + if ( !$post_id ) + $columns['response'] = _x( 'In Response To', 'column name' ); + + return $columns; + } + + function get_sortable_columns() { + return array( + 'author' => 'comment_author', + 'response' => 'comment_post_ID' + ); + } + + function display() { + extract( $this->_args ); + + wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' ); + + $this->display_tablenav( 'top' ); + +?> + + + + print_column_headers(); ?> + + + + + + print_column_headers( false ); ?> + + + + + display_rows_or_placeholder(); ?> + + + + items = $this->extra_items; $this->display_rows(); ?> + +
+display_tablenav( 'bottom' ); + } + + function single_row( $a_comment ) { + global $post, $comment; + + $comment = $a_comment; + $the_comment_class = wp_get_comment_status( $comment->comment_ID ); + $the_comment_class = join( ' ', get_comment_class( $the_comment_class, $comment->comment_ID, $comment->comment_post_ID ) ); + + $post = get_post( $comment->comment_post_ID ); + + $this->user_can = current_user_can( 'edit_comment', $comment->comment_ID ); + + echo ""; + $this->single_row_columns( $comment ); + echo "\n"; + } + + function column_cb( $comment ) { + if ( $this->user_can ) { ?> + + + user_can; + + $comment_url = esc_url( get_comment_link( $comment->comment_ID ) ); + $the_comment_status = wp_get_comment_status( $comment->comment_ID ); + + if ( $user_can ) { + $del_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "delete-comment_$comment->comment_ID" ) ); + $approve_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "approve-comment_$comment->comment_ID" ) ); + + $url = "comment.php?c=$comment->comment_ID"; + + $approve_url = esc_url( $url . "&action=approvecomment&$approve_nonce" ); + $unapprove_url = esc_url( $url . "&action=unapprovecomment&$approve_nonce" ); + $spam_url = esc_url( $url . "&action=spamcomment&$del_nonce" ); + $unspam_url = esc_url( $url . "&action=unspamcomment&$del_nonce" ); + $trash_url = esc_url( $url . "&action=trashcomment&$del_nonce" ); + $untrash_url = esc_url( $url . "&action=untrashcomment&$del_nonce" ); + $delete_url = esc_url( $url . "&action=deletecomment&$del_nonce" ); + } + + echo '
'; + $this->column_author( $comment ); + echo '
'; + + echo ''; + comment_text(); + if ( $user_can ) { ?> + + '', 'unapprove' => '', + 'reply' => '', + 'quickedit' => '', + 'edit' => '', + 'spam' => '', 'unspam' => '', + 'trash' => '', 'untrash' => '', 'delete' => '' + ); + + if ( $comment_status && 'all' != $comment_status ) { // not looking at all comments + if ( 'approved' == $the_comment_status ) + $actions['unapprove'] = "" . __( 'Unapprove' ) . ''; + else if ( 'unapproved' == $the_comment_status ) + $actions['approve'] = "" . __( 'Approve' ) . ''; + } else { + $actions['approve'] = "" . __( 'Approve' ) . ''; + $actions['unapprove'] = "" . __( 'Unapprove' ) . ''; + } + + if ( 'spam' != $the_comment_status && 'trash' != $the_comment_status ) { + $actions['spam'] = "" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . ''; + } elseif ( 'spam' == $the_comment_status ) { + $actions['unspam'] = "" . _x( 'Not Spam', 'comment' ) . ''; + } elseif ( 'trash' == $the_comment_status ) { + $actions['untrash'] = "" . __( 'Restore' ) . ''; + } + + if ( 'spam' == $the_comment_status || 'trash' == $the_comment_status || !EMPTY_TRASH_DAYS ) { + $actions['delete'] = "" . __( 'Delete Permanently' ) . ''; + } else { + $actions['trash'] = "" . _x( 'Trash', 'verb' ) . ''; + } + + if ( 'spam' != $the_comment_status && 'trash' != $the_comment_status ) { + $actions['edit'] = "". __( 'Edit' ) . ''; + $actions['quickedit'] = '' . __( 'Quick Edit' ) . ''; + $actions['reply'] = '' . __( 'Reply' ) . ''; + } + + /** This filter is documented in wp-admin/includes/dashboard.php */ + $actions = apply_filters( 'comment_row_actions', array_filter( $actions ), $comment ); + + $i = 0; + echo '
'; + foreach ( $actions as $action => $link ) { + ++$i; + ( ( ( 'approve' == $action || 'unapprove' == $action ) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' | '; + + // Reply and quickedit need a hide-if-no-js span when not added with ajax + if ( ( 'reply' == $action || 'quickedit' == $action ) && ! defined('DOING_AJAX') ) + $action .= ' hide-if-no-js'; + elseif ( ( $action == 'untrash' && $the_comment_status == 'trash' ) || ( $action == 'unspam' && $the_comment_status == 'spam' ) ) { + if ( '1' == get_comment_meta( $comment->comment_ID, '_wp_trash_meta_status', true ) ) + $action .= ' approve'; + else + $action .= ' unapprove'; + } + + echo "$sep$link"; + } + echo '
'; + } + } + + function column_author( $comment ) { + global $comment_status; + + $author_url = get_comment_author_url(); + if ( 'http://' == $author_url ) + $author_url = ''; + $author_url_display = preg_replace( '|http://(www\.)?|i', '', $author_url ); + if ( strlen( $author_url_display ) > 50 ) + $author_url_display = substr( $author_url_display, 0, 49 ) . '…'; + + echo ""; comment_author(); echo '
'; + if ( !empty( $author_url ) ) + echo "$author_url_display
"; + + if ( $this->user_can ) { + if ( !empty( $comment->comment_author_email ) ) { + comment_author_email_link(); + echo '
'; + } + echo ''; + comment_author_IP(); + echo ''; + } + } + + function column_date( $comment ) { + return get_comment_date( __( 'Y/m/d \a\t g:ia' ) ); + } + + function column_response( $comment ) { + $post = get_post(); + + if ( isset( $this->pending_count[$post->ID] ) ) { + $pending_comments = $this->pending_count[$post->ID]; + } else { + $_pending_count_temp = get_pending_comments_num( array( $post->ID ) ); + $pending_comments = $this->pending_count[$post->ID] = $_pending_count_temp[$post->ID]; + } + + if ( current_user_can( 'edit_post', $post->ID ) ) { + $post_link = ""; + $post_link .= get_the_title( $post->ID ) . ''; + } else { + $post_link = get_the_title( $post->ID ); + } + + echo ''; + if ( 'attachment' == $post->post_type && ( $thumb = wp_get_attachment_image( $post->ID, array( 80, 60 ), true ) ) ) + echo $thumb; + } + + function column_default( $comment, $column_name ) { + /** + * Fires when the default column output is displayed for a single row. + * + * @since 2.8.0 + * + * @param string $column_name The custom column's name. + * @param int $comment->comment_ID The custom column's unique ID number. + */ + do_action( 'manage_comments_custom_column', $column_name, $comment->comment_ID ); + } +} + +/** + * Post Comments List Table class. + * + * @package WordPress + * @subpackage List_Table + * @since 3.1.0 + * @access private + * + * @see WP_Comments_Table + */ +class WP_Post_Comments_List_Table extends WP_Comments_List_Table { + + function get_column_info() { + $this->_column_headers = array( + array( + 'author' => __( 'Author' ), + 'comment' => _x( 'Comment', 'column name' ), + ), + array(), + array(), + ); + + return $this->_column_headers; + } + + function get_table_classes() { + $classes = parent::get_table_classes(); + $classes[] = 'comments-box'; + return $classes; + } + + function display( $output_empty = false ) { + extract( $this->_args ); + + wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' ); +?> + + > + display_rows_or_placeholder(); ?> + + +find_folder(ABSPATH); + // Perhaps the FTP folder is rooted at the WordPress install, Check for wp-includes folder in root, Could have some false positives, but rare. + if ( ! $folder && $this->is_dir('/wp-includes') ) + $folder = '/'; + return $folder; + } + + /** + * Return the path on the remote filesystem of WP_CONTENT_DIR. + * + * @access public + * @since 2.7.0 + * + * @return string The location of the remote path. + */ + function wp_content_dir() { + return $this->find_folder(WP_CONTENT_DIR); + } + + /** + * Return the path on the remote filesystem of WP_PLUGIN_DIR. + * + * @access public + * @since 2.7.0 + * + * @return string The location of the remote path. + */ + function wp_plugins_dir() { + return $this->find_folder(WP_PLUGIN_DIR); + } + + /** + * Return the path on the remote filesystem of the Themes Directory. + * + * @access public + * @since 2.7.0 + * + * @param string $theme The Theme stylesheet or template for the directory. + * @return string The location of the remote path. + */ + function wp_themes_dir( $theme = false ) { + $theme_root = get_theme_root( $theme ); + + // Account for relative theme roots + if ( '/themes' == $theme_root || ! is_dir( $theme_root ) ) + $theme_root = WP_CONTENT_DIR . $theme_root; + + return $this->find_folder( $theme_root ); + } + + /** + * Return the path on the remote filesystem of WP_LANG_DIR. + * + * @access public + * @since 3.2.0 + * + * @return string The location of the remote path. + */ + function wp_lang_dir() { + return $this->find_folder(WP_LANG_DIR); + } + + /** + * Locate a folder on the remote filesystem. + * + * @access public + * @since 2.5.0 + * @deprecated 2.7.0 use WP_Filesystem::abspath() or WP_Filesystem::wp_*_dir() instead. + * @see WP_Filesystem::abspath() + * @see WP_Filesystem::wp_content_dir() + * @see WP_Filesystem::wp_plugins_dir() + * @see WP_Filesystem::wp_themes_dir() + * @see WP_Filesystem::wp_lang_dir() + * + * @param string $base The folder to start searching from. + * @param bool $echo True to display debug information. + * Default false. + * @return string The location of the remote path. + */ + function find_base_dir( $base = '.', $echo = false ) { + _deprecated_function(__FUNCTION__, '2.7', 'WP_Filesystem::abspath() or WP_Filesystem::wp_*_dir()' ); + $this->verbose = $echo; + return $this->abspath(); + } + + /** + * Locate a folder on the remote filesystem. + * + * @access public + * @since 2.5.0 + * @deprecated 2.7.0 use WP_Filesystem::abspath() or WP_Filesystem::wp_*_dir() methods instead. + * @see WP_Filesystem::abspath() + * @see WP_Filesystem::wp_content_dir() + * @see WP_Filesystem::wp_plugins_dir() + * @see WP_Filesystem::wp_themes_dir() + * @see WP_Filesystem::wp_lang_dir() + * + * @param string $base The folder to start searching from. + * @param bool $echo True to display debug information. + * @return string The location of the remote path. + */ + function get_base_dir( $base = '.', $echo = false ) { + _deprecated_function(__FUNCTION__, '2.7', 'WP_Filesystem::abspath() or WP_Filesystem::wp_*_dir()' ); + $this->verbose = $echo; + return $this->abspath(); + } + + /** + * Locate a folder on the remote filesystem. + * + * Assumes that on Windows systems, Stripping off the Drive + * letter is OK Sanitizes \\ to / in windows filepaths. + * + * @access public + * @since 2.7.0 + * + * @param string $folder the folder to locate. + * @return string The location of the remote path. + */ + function find_folder( $folder ) { + + if ( isset( $this->cache[ $folder ] ) ) + return $this->cache[ $folder ]; + + if ( stripos($this->method, 'ftp') !== false ) { + $constant_overrides = array( + 'FTP_BASE' => ABSPATH, + 'FTP_CONTENT_DIR' => WP_CONTENT_DIR, + 'FTP_PLUGIN_DIR' => WP_PLUGIN_DIR, + 'FTP_LANG_DIR' => WP_LANG_DIR + ); + + // Direct matches ( folder = CONSTANT/ ) + foreach ( $constant_overrides as $constant => $dir ) { + if ( ! defined( $constant ) ) + continue; + if ( $folder === $dir ) + return trailingslashit( constant( $constant ) ); + } + + // Prefix Matches ( folder = CONSTANT/subdir ) + foreach ( $constant_overrides as $constant => $dir ) { + if ( ! defined( $constant ) ) + continue; + if ( 0 === stripos( $folder, $dir ) ) { // $folder starts with $dir + $potential_folder = preg_replace( '#^' . preg_quote( $dir, '#' ) . '/#i', trailingslashit( constant( $constant ) ), $folder ); + $potential_folder = trailingslashit( $potential_folder ); + + if ( $this->is_dir( $potential_folder ) ) { + $this->cache[ $folder ] = $potential_folder; + return $potential_folder; + } + } + } + } elseif ( 'direct' == $this->method ) { + $folder = str_replace('\\', '/', $folder); // Windows path sanitisation + return trailingslashit($folder); + } + + $folder = preg_replace('|^([a-z]{1}):|i', '', $folder); // Strip out windows drive letter if it's there. + $folder = str_replace('\\', '/', $folder); // Windows path sanitisation + + if ( isset($this->cache[ $folder ] ) ) + return $this->cache[ $folder ]; + + if ( $this->exists($folder) ) { // Folder exists at that absolute path. + $folder = trailingslashit($folder); + $this->cache[ $folder ] = $folder; + return $folder; + } + if ( $return = $this->search_for_folder($folder) ) + $this->cache[ $folder ] = $return; + return $return; + } + + /** + * Locate a folder on the remote filesystem. + * + * Expects Windows sanitized path. + * + * @access private + * @since 2.7.0 + * + * @param string $folder The folder to locate. + * @param string $base The folder to start searching from. + * @param bool $loop If the function has recursed, Internal use only. + * @return string The location of the remote path. + */ + function search_for_folder( $folder, $base = '.', $loop = false ) { + if ( empty( $base ) || '.' == $base ) + $base = trailingslashit($this->cwd()); + + $folder = untrailingslashit($folder); + + if ( $this->verbose ) + printf( "\n" . __('Looking for %1$s in %2$s') . "
\n", $folder, $base ); + + $folder_parts = explode('/', $folder); + $folder_part_keys = array_keys( $folder_parts ); + $last_index = array_pop( $folder_part_keys ); + $last_path = $folder_parts[ $last_index ]; + + $files = $this->dirlist( $base ); + + foreach ( $folder_parts as $index => $key ) { + if ( $index == $last_index ) + continue; // We want this to be caught by the next code block. + + // Working from /home/ to /user/ to /wordpress/ see if that file exists within the current folder, + // If it's found, change into it and follow through looking for it. + // If it cant find WordPress down that route, it'll continue onto the next folder level, and see if that matches, and so on. + // If it reaches the end, and still cant find it, it'll return false for the entire function. + if ( isset($files[ $key ]) ){ + // Lets try that folder: + $newdir = trailingslashit(path_join($base, $key)); + if ( $this->verbose ) + printf( "\n" . __('Changing to %s') . "
\n", $newdir ); + // only search for the remaining path tokens in the directory, not the full path again + $newfolder = implode( '/', array_slice( $folder_parts, $index + 1 ) ); + if ( $ret = $this->search_for_folder( $newfolder, $newdir, $loop) ) + return $ret; + } + } + + // Only check this as a last resort, to prevent locating the incorrect install. All above procedures will fail quickly if this is the right branch to take. + if (isset( $files[ $last_path ] ) ) { + if ( $this->verbose ) + printf( "\n" . __('Found %s') . "
\n", $base . $last_path ); + return trailingslashit($base . $last_path); + } + + // Prevent this function from looping again. + // No need to proceed if we've just searched in / + if ( $loop || '/' == $base ) + return false; + + // As an extra last resort, Change back to / if the folder wasn't found. + // This comes into effect when the CWD is /home/user/ but WP is at /var/www/.... + return $this->search_for_folder( $folder, '/', true ); + + } + + /** + * Return the *nix-style file permissions for a file. + * + * From the PHP documentation page for fileperms(). + * + * @link http://docs.php.net/fileperms + * + * @access public + * @since 2.5.0 + * + * @param string $file String filename. + * @return string The *nix-style representation of permissions. + */ + function gethchmod( $file ){ + $perms = $this->getchmod($file); + if (($perms & 0xC000) == 0xC000) // Socket + $info = 's'; + elseif (($perms & 0xA000) == 0xA000) // Symbolic Link + $info = 'l'; + elseif (($perms & 0x8000) == 0x8000) // Regular + $info = '-'; + elseif (($perms & 0x6000) == 0x6000) // Block special + $info = 'b'; + elseif (($perms & 0x4000) == 0x4000) // Directory + $info = 'd'; + elseif (($perms & 0x2000) == 0x2000) // Character special + $info = 'c'; + elseif (($perms & 0x1000) == 0x1000) // FIFO pipe + $info = 'p'; + else // Unknown + $info = 'u'; + + // Owner + $info .= (($perms & 0x0100) ? 'r' : '-'); + $info .= (($perms & 0x0080) ? 'w' : '-'); + $info .= (($perms & 0x0040) ? + (($perms & 0x0800) ? 's' : 'x' ) : + (($perms & 0x0800) ? 'S' : '-')); + + // Group + $info .= (($perms & 0x0020) ? 'r' : '-'); + $info .= (($perms & 0x0010) ? 'w' : '-'); + $info .= (($perms & 0x0008) ? + (($perms & 0x0400) ? 's' : 'x' ) : + (($perms & 0x0400) ? 'S' : '-')); + + // World + $info .= (($perms & 0x0004) ? 'r' : '-'); + $info .= (($perms & 0x0002) ? 'w' : '-'); + $info .= (($perms & 0x0001) ? + (($perms & 0x0200) ? 't' : 'x' ) : + (($perms & 0x0200) ? 'T' : '-')); + return $info; + } + + /** + * Convert *nix-style file permissions to a octal number. + * + * Converts '-rw-r--r--' to 0644 + * From "info at rvgate dot nl"'s comment on the PHP documentation for chmod() + * + * @link http://docs.php.net/manual/en/function.chmod.php#49614 + * + * @access public + * @since 2.5.0 + * + * @param string $mode string The *nix-style file permission. + * @return int octal representation + */ + function getnumchmodfromh( $mode ) { + $realmode = ''; + $legal = array('', 'w', 'r', 'x', '-'); + $attarray = preg_split('//', $mode); + + for ($i=0; $i < count($attarray); $i++) + if ($key = array_search($attarray[$i], $legal)) + $realmode .= $legal[$key]; + + $mode = str_pad($realmode, 10, '-', STR_PAD_LEFT); + $trans = array('-'=>'0', 'r'=>'4', 'w'=>'2', 'x'=>'1'); + $mode = strtr($mode,$trans); + + $newmode = $mode[0]; + $newmode .= $mode[1] + $mode[2] + $mode[3]; + $newmode .= $mode[4] + $mode[5] + $mode[6]; + $newmode .= $mode[7] + $mode[8] + $mode[9]; + return $newmode; + } + + /** + * Determine if the string provided contains binary characters. + * + * @access private + * @since 2.7.0 + * + * @param string $text String to test against. + * @return bool true if string is binary, false otherwise. + */ + function is_binary( $text ) { + return (bool) preg_match( '|[^\x20-\x7E]|', $text ); // chr(32)..chr(127) + } + + /** + * Change the ownership of a file / folder. + * + * Default behavior is to do nothing, override this in your subclass, if desired. + * + * @since 2.5.0 + * + * @param string $file Path to the file. + * @param mixed $owner A user name or number. + * @param bool $recursive Optional. If set True changes file owner recursivly. Defaults to False. + * @return bool Returns true on success or false on failure. + */ + function chown( $file, $owner, $recursive = false ) { + return false; + } + + /** + * Connect filesystem. + * + * @since 2.5.0 + * + * @return bool True on success or false on failure (always true for WP_Filesystem_Direct). + */ + function connect() { + return true; + } + + /** + * Read entire file into a string. + * + * @since 2.5.0 + * + * @param string $file Name of the file to read. + * @return string|bool Returns the read data or false on failure. + */ + function get_contents( $file ) { + return false; + } + + /** + * Read entire file into an array. + * + * @since 2.5.0 + * + * @param string $file Path to the file. + * @return array|bool the file contents in an array or false on failure. + */ + function get_contents_array( $file ) { + return false; + } + + /** + * Write a string to a file. + * + * @since 2.5.0 + * + * @param string $file Remote path to the file where to write the data. + * @param string $contents The data to write. + * @param int $mode Optional. The file permissions as octal number, usually 0644. + * @return bool False on failure. + */ + function put_contents( $file, $contents, $mode = false ) { + return false; + } + + /** + * Get the current working directory. + * + * @since 2.5.0 + * + * @return string|bool The current working directory on success, or false on failure. + */ + function cwd() { + return false; + } + + /** + * Change current directory. + * + * @since 2.5.0 + * + * @param string $dir The new current directory. + * @return bool Returns true on success or false on failure. + */ + function chdir( $dir ) { + return false; + } + + /** + * Change the file group. + * + * @since 2.5.0 + * + * @param string $file Path to the file. + * @param mixed $group A group name or number. + * @param bool $recursive Optional. If set True changes file group recursively. Defaults to False. + * @return bool Returns true on success or false on failure. + */ + function chgrp( $file, $group, $recursive = false ) { + return false; + } + + /** + * Change filesystem permissions. + * + * @since 2.5.0 + * + * @param string $file Path to the file. + * @param int $mode Optional. The permissions as octal number, usually 0644 for files, 0755 for dirs. + * @param bool $recursive Optional. If set True changes file group recursively. Defaults to False. + * @return bool Returns true on success or false on failure. + */ + function chmod( $file, $mode = false, $recursive = false ) { + return false; + } + + /** + * Get the file owner. + * + * @since 2.5.0 + * + * @param string $file Path to the file. + * @return string|bool Username of the user or false on error. + */ + function owner( $file ) { + return false; + } + + /** + * Get the file's group. + * + * @since 2.5.0 + * + * @param string $file Path to the file. + * @return string|bool The group or false on error. + */ + function group( $file ) { + return false; + } + + /** + * Copy a file. + * + * @since 2.5.0 + * + * @param string $source Path to the source file. + * @param string $destination Path to the destination file. + * @param bool $overwrite Optional. Whether to overwrite the destination file if it exists. + * Default false. + * @param int $mode Optional. The permissions as octal number, usually 0644 for files, 0755 for dirs. + * Default false. + * @return bool True if file copied successfully, False otherwise. + */ + function copy( $source, $destination, $overwrite = false, $mode = false ) { + return false; + } + + /** + * Move a file. + * + * @since 2.5.0 + * + * @param string $source Path to the source file. + * @param string $destination Path to the destination file. + * @param bool $overwrite Optional. Whether to overwrite the destination file if it exists. + * Default false. + * @return bool True if file copied successfully, False otherwise. + */ + function move( $source, $destination, $overwrite = false ) { + return false; + } + + /** + * Delete a file or directory. + * + * @since 2.5.0 + * + * @param string $file Path to the file. + * @param bool $recursive Optional. If set True changes file group recursively. Defaults to False. + * Default false. + * @param bool $type Type of resource. 'f' for file, 'd' for directory. + * Default false. + * @return bool True if the file or directory was deleted, false on failure. + */ + function delete( $file, $recursive = false, $type = false ) { + return false; + } + + /** + * Check if a file or directory exists. + * + * @since 2.5.0 + * + * @param string $file Path to file/directory. + * @return bool Whether $file exists or not. + */ + function exists( $file ) { + return false; + } + + /** + * Check if resource is a file. + * + * @since 2.5.0 + * + * @param string $file File path. + * @return bool Whether $file is a file. + */ + function is_file( $file ) { + return false; + } + + /** + * Check if resource is a directory. + * + * @since 2.5.0 + * + * @param string $path Directory path. + * @return bool Whether $path is a directory. + */ + function is_dir( $path ) { + return false; + } + + /** + * Check if a file is readable. + * + * @since 2.5.0 + * + * @param string $file Path to file. + * @return bool Whether $file is readable. + */ + function is_readable( $file ) { + return false; + } + + /** + * Check if a file or directory is writable. + * + * @since 2.5.0 + * + * @param string $path Path to file/directory. + * @return bool Whether $file is writable. + */ + function is_writable( $file ) { + return false; + } + + /** + * Gets the file's last access time. + * + * @since 2.5.0 + * + * @param string $file Path to file. + * @return int Unix timestamp representing last access time. + */ + function atime( $file ) { + return false; + } + + /** + * Gets the file modification time. + * + * @since 2.5.0 + * + * @param string $file Path to file. + * @return int Unix timestamp representing modification time. + */ + function mtime( $file ) { + return false; + } + + /** + * Gets the file size (in bytes). + * + * @since 2.5.0 + * + * @param string $file Path to file. + * @return int Size of the file in bytes. + */ + function size( $file ) { + return false; + } + + /** + * Set the access and modification times of a file. + * + * Note: If $file doesn't exist, it will be created. + * + * @since 2.5.0 + * + * @param string $file Path to file. + * @param int $time Optional. Modified time to set for file. + * Default 0. + * @param int $atime Optional. Access time to set for file. + * Default 0. + * @return bool Whether operation was successful or not. + */ + function touch( $file, $time = 0, $atime = 0 ) { + return false; + } + + /** + * Create a directory. + * + * @since 2.5.0 + * + * @param string $path Path for new directory. + * @param mixed $chmod Optional. The permissions as octal number, (or False to skip chmod) + * Default false. + * @param mixed $chown Optional. A user name or number (or False to skip chown) + * Default false. + * @param mixed $chgrp Optional. A group name or number (or False to skip chgrp). + * Default false. + * @return bool False if directory cannot be created, true otherwise. + */ + function mkdir( $path, $chmod = false, $chown = false, $chgrp = false ) { + return false; + } + + /** + * Delete a directory. + * + * @since 2.5.0 + * + * @param string $path Path to directory. + * @param bool $recursive Optional. Whether to recursively remove files/directories. + * Default false. + * @return bool Whether directory is deleted successfully or not. + */ + function rmdir( $path, $recursive = false ) { + return false; + } + + /** + * Get details for files in a directory or a specific file. + * + * @since 2.5.0 + * + * @param string $path Path to directory or file. + * @param bool $include_hidden Optional. Whether to include details of hidden ("." prefixed) files. + * Default true. + * @param bool $recursive Optional. Whether to recursively include file details in nested directories. + * Default false. + * @return array|bool { + * Array of files. False if unable to list directory contents. + * + * @type string 'name' Name of the file/directory. + * @type string 'perms' *nix representation of permissions. + * @type int 'permsn' Octal representation of permissions. + * @type string 'owner' Owner name or ID. + * @type int 'size' Size of file in bytes. + * @type int 'lastmodunix' Last modified unix timestamp. + * @type mixed 'lastmod' Last modified month (3 letter) and day (without leading 0). + * @type int 'time' Last modified time. + * @type string 'type' Type of resource. 'f' for file, 'd' for directory. + * @type mixed 'files' If a directory and $recursive is true, contains another array of files. + * } + */ + function dirlist( $path, $include_hidden = true, $recursive = false ) { + return false; + } + +} // WP_Filesystem_Base diff --git a/wp-admin/includes/class-wp-filesystem-direct.php b/wp-admin/includes/class-wp-filesystem-direct.php new file mode 100644 index 0000000..2d4e566 --- /dev/null +++ b/wp-admin/includes/class-wp-filesystem-direct.php @@ -0,0 +1,384 @@ +method = 'direct'; + $this->errors = new WP_Error(); + } + + /** + * Reads entire file into a string + * + * @param string $file Name of the file to read. + * @return string|bool The function returns the read data or false on failure. + */ + function get_contents($file) { + return @file_get_contents($file); + } + + /** + * Reads entire file into an array + * + * @param string $file Path to the file. + * @return array|bool the file contents in an array or false on failure. + */ + function get_contents_array($file) { + return @file($file); + } + + /** + * Write a string to a file + * + * @param string $file Remote path to the file where to write the data. + * @param string $contents The data to write. + * @param int $mode (optional) The file permissions as octal number, usually 0644. + * @return bool False upon failure. + */ + function put_contents( $file, $contents, $mode = false ) { + $fp = @fopen( $file, 'wb' ); + if ( ! $fp ) + return false; + + mbstring_binary_safe_encoding(); + + $data_length = strlen( $contents ); + + $bytes_written = fwrite( $fp, $contents ); + + reset_mbstring_encoding(); + + fclose( $fp ); + + if ( $data_length !== $bytes_written ) + return false; + + $this->chmod( $file, $mode ); + + return true; + } + + /** + * Gets the current working directory + * + * @return string|bool the current working directory on success, or false on failure. + */ + function cwd() { + return @getcwd(); + } + + /** + * Change directory + * + * @param string $dir The new current directory. + * @return bool Returns true on success or false on failure. + */ + function chdir($dir) { + return @chdir($dir); + } + + /** + * Changes file group + * + * @param string $file Path to the file. + * @param mixed $group A group name or number. + * @param bool $recursive (optional) If set True changes file group recursively. Defaults to False. + * @return bool Returns true on success or false on failure. + */ + function chgrp($file, $group, $recursive = false) { + if ( ! $this->exists($file) ) + return false; + if ( ! $recursive ) + return @chgrp($file, $group); + if ( ! $this->is_dir($file) ) + return @chgrp($file, $group); + // Is a directory, and we want recursive + $file = trailingslashit($file); + $filelist = $this->dirlist($file); + foreach ($filelist as $filename) + $this->chgrp($file . $filename, $group, $recursive); + + return true; + } + + /** + * Changes filesystem permissions + * + * @param string $file Path to the file. + * @param int $mode (optional) The permissions as octal number, usually 0644 for files, 0755 for dirs. + * @param bool $recursive (optional) If set True changes file group recursively. Defaults to False. + * @return bool Returns true on success or false on failure. + */ + function chmod($file, $mode = false, $recursive = false) { + if ( ! $mode ) { + if ( $this->is_file($file) ) + $mode = FS_CHMOD_FILE; + elseif ( $this->is_dir($file) ) + $mode = FS_CHMOD_DIR; + else + return false; + } + + if ( ! $recursive || ! $this->is_dir($file) ) + return @chmod($file, $mode); + // Is a directory, and we want recursive + $file = trailingslashit($file); + $filelist = $this->dirlist($file); + foreach ( (array)$filelist as $filename => $filemeta) + $this->chmod($file . $filename, $mode, $recursive); + + return true; + } + + /** + * Changes file owner + * + * @param string $file Path to the file. + * @param mixed $owner A user name or number. + * @param bool $recursive (optional) If set True changes file owner recursively. Defaults to False. + * @return bool Returns true on success or false on failure. + */ + function chown($file, $owner, $recursive = false) { + if ( ! $this->exists($file) ) + return false; + if ( ! $recursive ) + return @chown($file, $owner); + if ( ! $this->is_dir($file) ) + return @chown($file, $owner); + // Is a directory, and we want recursive + $filelist = $this->dirlist($file); + foreach ($filelist as $filename) { + $this->chown($file . '/' . $filename, $owner, $recursive); + } + return true; + } + + /** + * Gets file owner + * + * @param string $file Path to the file. + * @return string|bool Username of the user or false on error. + */ + function owner($file) { + $owneruid = @fileowner($file); + if ( ! $owneruid ) + return false; + if ( ! function_exists('posix_getpwuid') ) + return $owneruid; + $ownerarray = posix_getpwuid($owneruid); + return $ownerarray['name']; + } + + /** + * Gets file permissions + * + * FIXME does not handle errors in fileperms() + * + * @param string $file Path to the file. + * @return string Mode of the file (last 3 digits). + */ + function getchmod($file) { + return substr( decoct( @fileperms( $file ) ), -3 ); + } + + function group($file) { + $gid = @filegroup($file); + if ( ! $gid ) + return false; + if ( ! function_exists('posix_getgrgid') ) + return $gid; + $grouparray = posix_getgrgid($gid); + return $grouparray['name']; + } + + function copy($source, $destination, $overwrite = false, $mode = false) { + if ( ! $overwrite && $this->exists($destination) ) + return false; + + $rtval = copy($source, $destination); + if ( $mode ) + $this->chmod($destination, $mode); + return $rtval; + } + + function move($source, $destination, $overwrite = false) { + if ( ! $overwrite && $this->exists($destination) ) + return false; + + // try using rename first. if that fails (for example, source is read only) try copy + if ( @rename($source, $destination) ) + return true; + + if ( $this->copy($source, $destination, $overwrite) && $this->exists($destination) ) { + $this->delete($source); + return true; + } else { + return false; + } + } + + function delete($file, $recursive = false, $type = false) { + if ( empty( $file ) ) // Some filesystems report this as /, which can cause non-expected recursive deletion of all files in the filesystem. + return false; + $file = str_replace( '\\', '/', $file ); // for win32, occasional problems deleting files otherwise + + if ( 'f' == $type || $this->is_file($file) ) + return @unlink($file); + if ( ! $recursive && $this->is_dir($file) ) + return @rmdir($file); + + // At this point it's a folder, and we're in recursive mode + $file = trailingslashit($file); + $filelist = $this->dirlist($file, true); + + $retval = true; + if ( is_array( $filelist ) ) { + foreach ( $filelist as $filename => $fileinfo ) { + if ( ! $this->delete($file . $filename, $recursive, $fileinfo['type']) ) + $retval = false; + } + } + + if ( file_exists($file) && ! @rmdir($file) ) + $retval = false; + + return $retval; + } + + function exists($file) { + return @file_exists($file); + } + + function is_file($file) { + return @is_file($file); + } + + function is_dir($path) { + return @is_dir($path); + } + + function is_readable($file) { + return @is_readable($file); + } + + function is_writable($file) { + return @is_writable($file); + } + + function atime($file) { + return @fileatime($file); + } + + function mtime($file) { + return @filemtime($file); + } + + function size($file) { + return @filesize($file); + } + + function touch($file, $time = 0, $atime = 0) { + if ($time == 0) + $time = time(); + if ($atime == 0) + $atime = time(); + return @touch($file, $time, $atime); + } + + function mkdir($path, $chmod = false, $chown = false, $chgrp = false) { + // safe mode fails with a trailing slash under certain PHP versions. + $path = untrailingslashit($path); + if ( empty($path) ) + return false; + + if ( ! $chmod ) + $chmod = FS_CHMOD_DIR; + + if ( ! @mkdir($path) ) + return false; + $this->chmod($path, $chmod); + if ( $chown ) + $this->chown($path, $chown); + if ( $chgrp ) + $this->chgrp($path, $chgrp); + return true; + } + + function rmdir($path, $recursive = false) { + return $this->delete($path, $recursive); + } + + function dirlist($path, $include_hidden = true, $recursive = false) { + if ( $this->is_file($path) ) { + $limit_file = basename($path); + $path = dirname($path); + } else { + $limit_file = false; + } + + if ( ! $this->is_dir($path) ) + return false; + + $dir = @dir($path); + if ( ! $dir ) + return false; + + $ret = array(); + + while (false !== ($entry = $dir->read()) ) { + $struc = array(); + $struc['name'] = $entry; + + if ( '.' == $struc['name'] || '..' == $struc['name'] ) + continue; + + if ( ! $include_hidden && '.' == $struc['name'][0] ) + continue; + + if ( $limit_file && $struc['name'] != $limit_file) + continue; + + $struc['perms'] = $this->gethchmod($path.'/'.$entry); + $struc['permsn'] = $this->getnumchmodfromh($struc['perms']); + $struc['number'] = false; + $struc['owner'] = $this->owner($path.'/'.$entry); + $struc['group'] = $this->group($path.'/'.$entry); + $struc['size'] = $this->size($path.'/'.$entry); + $struc['lastmodunix']= $this->mtime($path.'/'.$entry); + $struc['lastmod'] = date('M j',$struc['lastmodunix']); + $struc['time'] = date('h:i:s',$struc['lastmodunix']); + $struc['type'] = $this->is_dir($path.'/'.$entry) ? 'd' : 'f'; + + if ( 'd' == $struc['type'] ) { + if ( $recursive ) + $struc['files'] = $this->dirlist($path . '/' . $struc['name'], $include_hidden, $recursive); + else + $struc['files'] = array(); + } + + $ret[ $struc['name'] ] = $struc; + } + $dir->close(); + unset($dir); + return $ret; + } +} diff --git a/wp-admin/includes/class-wp-filesystem-ftpext.php b/wp-admin/includes/class-wp-filesystem-ftpext.php new file mode 100644 index 0000000..434a1f9 --- /dev/null +++ b/wp-admin/includes/class-wp-filesystem-ftpext.php @@ -0,0 +1,415 @@ +method = 'ftpext'; + $this->errors = new WP_Error(); + + // Check if possible to use ftp functions. + if ( ! extension_loaded('ftp') ) { + $this->errors->add('no_ftp_ext', __('The ftp PHP extension is not available')); + return false; + } + + // This Class uses the timeout on a per-connection basis, Others use it on a per-action basis. + + if ( ! defined('FS_TIMEOUT') ) + define('FS_TIMEOUT', 240); + + if ( empty($opt['port']) ) + $this->options['port'] = 21; + else + $this->options['port'] = $opt['port']; + + if ( empty($opt['hostname']) ) + $this->errors->add('empty_hostname', __('FTP hostname is required')); + else + $this->options['hostname'] = $opt['hostname']; + + if ( ! empty($opt['base']) ) + $this->wp_base = $opt['base']; + + // Check if the options provided are OK. + if ( empty($opt['username']) ) + $this->errors->add('empty_username', __('FTP username is required')); + else + $this->options['username'] = $opt['username']; + + if ( empty($opt['password']) ) + $this->errors->add('empty_password', __('FTP password is required')); + else + $this->options['password'] = $opt['password']; + + $this->options['ssl'] = false; + if ( isset($opt['connection_type']) && 'ftps' == $opt['connection_type'] ) + $this->options['ssl'] = true; + } + + function connect() { + if ( isset($this->options['ssl']) && $this->options['ssl'] && function_exists('ftp_ssl_connect') ) + $this->link = @ftp_ssl_connect($this->options['hostname'], $this->options['port'], FS_CONNECT_TIMEOUT); + else + $this->link = @ftp_connect($this->options['hostname'], $this->options['port'], FS_CONNECT_TIMEOUT); + + if ( ! $this->link ) { + $this->errors->add('connect', sprintf(__('Failed to connect to FTP Server %1$s:%2$s'), $this->options['hostname'], $this->options['port'])); + return false; + } + + if ( ! @ftp_login($this->link,$this->options['username'], $this->options['password']) ) { + $this->errors->add('auth', sprintf(__('Username/Password incorrect for %s'), $this->options['username'])); + return false; + } + + // Set the Connection to use Passive FTP + @ftp_pasv( $this->link, true ); + if ( @ftp_get_option($this->link, FTP_TIMEOUT_SEC) < FS_TIMEOUT ) + @ftp_set_option($this->link, FTP_TIMEOUT_SEC, FS_TIMEOUT); + + return true; + } + + function get_contents( $file ) { + $tempfile = wp_tempnam($file); + $temp = fopen($tempfile, 'w+'); + + if ( ! $temp ) + return false; + + if ( ! @ftp_fget($this->link, $temp, $file, FTP_BINARY ) ) + return false; + + fseek( $temp, 0 ); // Skip back to the start of the file being written to + $contents = ''; + + while ( ! feof($temp) ) + $contents .= fread($temp, 8192); + + fclose($temp); + unlink($tempfile); + return $contents; + } + + function get_contents_array($file) { + return explode("\n", $this->get_contents($file)); + } + + function put_contents($file, $contents, $mode = false ) { + $tempfile = wp_tempnam($file); + $temp = fopen( $tempfile, 'wb+' ); + if ( ! $temp ) + return false; + + mbstring_binary_safe_encoding(); + + $data_length = strlen( $contents ); + $bytes_written = fwrite( $temp, $contents ); + + reset_mbstring_encoding(); + + if ( $data_length !== $bytes_written ) { + fclose( $temp ); + unlink( $tempfile ); + return false; + } + + fseek( $temp, 0 ); // Skip back to the start of the file being written to + + $ret = @ftp_fput( $this->link, $file, $temp, FTP_BINARY ); + + fclose($temp); + unlink($tempfile); + + $this->chmod($file, $mode); + + return $ret; + } + + function cwd() { + $cwd = @ftp_pwd($this->link); + if ( $cwd ) + $cwd = trailingslashit($cwd); + return $cwd; + } + + function chdir($dir) { + return @ftp_chdir($this->link, $dir); + } + + function chgrp($file, $group, $recursive = false ) { + return false; + } + + function chmod($file, $mode = false, $recursive = false) { + if ( ! $mode ) { + if ( $this->is_file($file) ) + $mode = FS_CHMOD_FILE; + elseif ( $this->is_dir($file) ) + $mode = FS_CHMOD_DIR; + else + return false; + } + + // chmod any sub-objects if recursive. + if ( $recursive && $this->is_dir($file) ) { + $filelist = $this->dirlist($file); + foreach ( (array)$filelist as $filename => $filemeta ) + $this->chmod($file . '/' . $filename, $mode, $recursive); + } + + // chmod the file or directory + if ( ! function_exists('ftp_chmod') ) + return (bool)@ftp_site($this->link, sprintf('CHMOD %o %s', $mode, $file)); + return (bool)@ftp_chmod($this->link, $mode, $file); + } + + function owner($file) { + $dir = $this->dirlist($file); + return $dir[$file]['owner']; + } + + function getchmod($file) { + $dir = $this->dirlist($file); + return $dir[$file]['permsn']; + } + + function group($file) { + $dir = $this->dirlist($file); + return $dir[$file]['group']; + } + + function copy($source, $destination, $overwrite = false, $mode = false) { + if ( ! $overwrite && $this->exists($destination) ) + return false; + $content = $this->get_contents($source); + if ( false === $content ) + return false; + return $this->put_contents($destination, $content, $mode); + } + + function move($source, $destination, $overwrite = false) { + return ftp_rename($this->link, $source, $destination); + } + + function delete($file, $recursive = false, $type = false) { + if ( empty($file) ) + return false; + if ( 'f' == $type || $this->is_file($file) ) + return @ftp_delete($this->link, $file); + if ( !$recursive ) + return @ftp_rmdir($this->link, $file); + + $filelist = $this->dirlist( trailingslashit($file) ); + if ( !empty($filelist) ) + foreach ( $filelist as $delete_file ) + $this->delete( trailingslashit($file) . $delete_file['name'], $recursive, $delete_file['type'] ); + return @ftp_rmdir($this->link, $file); + } + + function exists($file) { + $list = @ftp_nlist($this->link, $file); + return !empty($list); //empty list = no file, so invert. + } + + function is_file($file) { + return $this->exists($file) && !$this->is_dir($file); + } + + function is_dir($path) { + $cwd = $this->cwd(); + $result = @ftp_chdir($this->link, trailingslashit($path) ); + if ( $result && $path == $this->cwd() || $this->cwd() != $cwd ) { + @ftp_chdir($this->link, $cwd); + return true; + } + return false; + } + + function is_readable($file) { + return true; + } + + function is_writable($file) { + return true; + } + + function atime($file) { + return false; + } + + function mtime($file) { + return ftp_mdtm($this->link, $file); + } + + function size($file) { + return ftp_size($this->link, $file); + } + + function touch($file, $time = 0, $atime = 0) { + return false; + } + + function mkdir($path, $chmod = false, $chown = false, $chgrp = false) { + $path = untrailingslashit($path); + if ( empty($path) ) + return false; + + if ( !@ftp_mkdir($this->link, $path) ) + return false; + $this->chmod($path, $chmod); + if ( $chown ) + $this->chown($path, $chown); + if ( $chgrp ) + $this->chgrp($path, $chgrp); + return true; + } + + function rmdir($path, $recursive = false) { + return $this->delete($path, $recursive); + } + + function parselisting($line) { + static $is_windows; + if ( is_null($is_windows) ) + $is_windows = stripos( ftp_systype($this->link), 'win') !== false; + + if ( $is_windows && preg_match('/([0-9]{2})-([0-9]{2})-([0-9]{2}) +([0-9]{2}):([0-9]{2})(AM|PM) +([0-9]+|) +(.+)/', $line, $lucifer) ) { + $b = array(); + if ( $lucifer[3] < 70 ) + $lucifer[3] +=2000; + else + $lucifer[3] += 1900; // 4digit year fix + $b['isdir'] = ( $lucifer[7] == ''); + if ( $b['isdir'] ) + $b['type'] = 'd'; + else + $b['type'] = 'f'; + $b['size'] = $lucifer[7]; + $b['month'] = $lucifer[1]; + $b['day'] = $lucifer[2]; + $b['year'] = $lucifer[3]; + $b['hour'] = $lucifer[4]; + $b['minute'] = $lucifer[5]; + $b['time'] = @mktime($lucifer[4] + (strcasecmp($lucifer[6], "PM") == 0 ? 12 : 0), $lucifer[5], 0, $lucifer[1], $lucifer[2], $lucifer[3]); + $b['am/pm'] = $lucifer[6]; + $b['name'] = $lucifer[8]; + } elseif ( !$is_windows && $lucifer = preg_split('/[ ]/', $line, 9, PREG_SPLIT_NO_EMPTY)) { + //echo $line."\n"; + $lcount = count($lucifer); + if ( $lcount < 8 ) + return ''; + $b = array(); + $b['isdir'] = $lucifer[0]{0} === 'd'; + $b['islink'] = $lucifer[0]{0} === 'l'; + if ( $b['isdir'] ) + $b['type'] = 'd'; + elseif ( $b['islink'] ) + $b['type'] = 'l'; + else + $b['type'] = 'f'; + $b['perms'] = $lucifer[0]; + $b['number'] = $lucifer[1]; + $b['owner'] = $lucifer[2]; + $b['group'] = $lucifer[3]; + $b['size'] = $lucifer[4]; + if ( $lcount == 8 ) { + sscanf($lucifer[5], '%d-%d-%d', $b['year'], $b['month'], $b['day']); + sscanf($lucifer[6], '%d:%d', $b['hour'], $b['minute']); + $b['time'] = @mktime($b['hour'], $b['minute'], 0, $b['month'], $b['day'], $b['year']); + $b['name'] = $lucifer[7]; + } else { + $b['month'] = $lucifer[5]; + $b['day'] = $lucifer[6]; + if ( preg_match('/([0-9]{2}):([0-9]{2})/', $lucifer[7], $l2) ) { + $b['year'] = date("Y"); + $b['hour'] = $l2[1]; + $b['minute'] = $l2[2]; + } else { + $b['year'] = $lucifer[7]; + $b['hour'] = 0; + $b['minute'] = 0; + } + $b['time'] = strtotime( sprintf('%d %s %d %02d:%02d', $b['day'], $b['month'], $b['year'], $b['hour'], $b['minute']) ); + $b['name'] = $lucifer[8]; + } + } + + // Replace symlinks formatted as "source -> target" with just the source name + if ( $b['islink'] ) + $b['name'] = preg_replace( '/(\s*->\s*.*)$/', '', $b['name'] ); + + return $b; + } + + function dirlist($path = '.', $include_hidden = true, $recursive = false) { + if ( $this->is_file($path) ) { + $limit_file = basename($path); + $path = dirname($path) . '/'; + } else { + $limit_file = false; + } + + $pwd = @ftp_pwd($this->link); + if ( ! @ftp_chdir($this->link, $path) ) // Cant change to folder = folder doesn't exist + return false; + $list = @ftp_rawlist($this->link, '-a', false); + @ftp_chdir($this->link, $pwd); + + if ( empty($list) ) // Empty array = non-existent folder (real folder will show . at least) + return false; + + $dirlist = array(); + foreach ( $list as $k => $v ) { + $entry = $this->parselisting($v); + if ( empty($entry) ) + continue; + + if ( '.' == $entry['name'] || '..' == $entry['name'] ) + continue; + + if ( ! $include_hidden && '.' == $entry['name'][0] ) + continue; + + if ( $limit_file && $entry['name'] != $limit_file) + continue; + + $dirlist[ $entry['name'] ] = $entry; + } + + $ret = array(); + foreach ( (array)$dirlist as $struc ) { + if ( 'd' == $struc['type'] ) { + if ( $recursive ) + $struc['files'] = $this->dirlist($path . '/' . $struc['name'], $include_hidden, $recursive); + else + $struc['files'] = array(); + } + + $ret[ $struc['name'] ] = $struc; + } + return $ret; + } + + function __destruct() { + if ( $this->link ) + ftp_close($this->link); + } +} diff --git a/wp-admin/includes/class-wp-filesystem-ftpsockets.php b/wp-admin/includes/class-wp-filesystem-ftpsockets.php new file mode 100644 index 0000000..af4c531 --- /dev/null +++ b/wp-admin/includes/class-wp-filesystem-ftpsockets.php @@ -0,0 +1,351 @@ +method = 'ftpsockets'; + $this->errors = new WP_Error(); + + // Check if possible to use ftp functions. + if ( ! @include_once ABSPATH . 'wp-admin/includes/class-ftp.php' ) + return false; + $this->ftp = new ftp(); + + if ( empty($opt['port']) ) + $this->options['port'] = 21; + else + $this->options['port'] = $opt['port']; + + if ( empty($opt['hostname']) ) + $this->errors->add('empty_hostname', __('FTP hostname is required')); + else + $this->options['hostname'] = $opt['hostname']; + + if ( ! empty($opt['base']) ) + $this->wp_base = $opt['base']; + + // Check if the options provided are OK. + if ( empty ($opt['username']) ) + $this->errors->add('empty_username', __('FTP username is required')); + else + $this->options['username'] = $opt['username']; + + if ( empty ($opt['password']) ) + $this->errors->add('empty_password', __('FTP password is required')); + else + $this->options['password'] = $opt['password']; + } + + function connect() { + if ( ! $this->ftp ) + return false; + + $this->ftp->setTimeout(FS_CONNECT_TIMEOUT); + + if ( ! $this->ftp->SetServer($this->options['hostname'], $this->options['port']) ) { + $this->errors->add('connect', sprintf(__('Failed to connect to FTP Server %1$s:%2$s'), $this->options['hostname'], $this->options['port'])); + return false; + } + + if ( ! $this->ftp->connect() ) { + $this->errors->add('connect', sprintf(__('Failed to connect to FTP Server %1$s:%2$s'), $this->options['hostname'], $this->options['port'])); + return false; + } + + if ( ! $this->ftp->login($this->options['username'], $this->options['password']) ) { + $this->errors->add('auth', sprintf(__('Username/Password incorrect for %s'), $this->options['username'])); + return false; + } + + $this->ftp->SetType( FTP_BINARY ); + $this->ftp->Passive( true ); + $this->ftp->setTimeout( FS_TIMEOUT ); + return true; + } + + function get_contents( $file ) { + if ( ! $this->exists($file) ) + return false; + + $temp = wp_tempnam( $file ); + + if ( ! $temphandle = fopen($temp, 'w+') ) + return false; + + mbstring_binary_safe_encoding(); + + if ( ! $this->ftp->fget($temphandle, $file) ) { + fclose($temphandle); + unlink($temp); + + reset_mbstring_encoding(); + + return ''; // Blank document, File does exist, It's just blank. + } + + reset_mbstring_encoding(); + + fseek( $temphandle, 0 ); // Skip back to the start of the file being written to + $contents = ''; + + while ( ! feof($temphandle) ) + $contents .= fread($temphandle, 8192); + + fclose($temphandle); + unlink($temp); + return $contents; + } + + function get_contents_array($file) { + return explode("\n", $this->get_contents($file) ); + } + + function put_contents($file, $contents, $mode = false ) { + $temp = wp_tempnam( $file ); + if ( ! $temphandle = @fopen($temp, 'w+') ) { + unlink($temp); + return false; + } + + // The FTP class uses string functions internally during file download/upload + mbstring_binary_safe_encoding(); + + $bytes_written = fwrite( $temphandle, $contents ); + if ( false === $bytes_written || $bytes_written != strlen( $contents ) ) { + fclose( $temphandle ); + unlink( $temp ); + + reset_mbstring_encoding(); + + return false; + } + + fseek( $temphandle, 0 ); // Skip back to the start of the file being written to + + $ret = $this->ftp->fput($file, $temphandle); + + reset_mbstring_encoding(); + + fclose($temphandle); + unlink($temp); + + $this->chmod($file, $mode); + + return $ret; + } + + function cwd() { + $cwd = $this->ftp->pwd(); + if ( $cwd ) + $cwd = trailingslashit($cwd); + return $cwd; + } + + function chdir($file) { + return $this->ftp->chdir($file); + } + + function chgrp($file, $group, $recursive = false ) { + return false; + } + + function chmod($file, $mode = false, $recursive = false ) { + if ( ! $mode ) { + if ( $this->is_file($file) ) + $mode = FS_CHMOD_FILE; + elseif ( $this->is_dir($file) ) + $mode = FS_CHMOD_DIR; + else + return false; + } + + // chmod any sub-objects if recursive. + if ( $recursive && $this->is_dir($file) ) { + $filelist = $this->dirlist($file); + foreach ( (array)$filelist as $filename => $filemeta ) + $this->chmod($file . '/' . $filename, $mode, $recursive); + } + + // chmod the file or directory + return $this->ftp->chmod($file, $mode); + } + + function owner($file) { + $dir = $this->dirlist($file); + return $dir[$file]['owner']; + } + + function getchmod($file) { + $dir = $this->dirlist($file); + return $dir[$file]['permsn']; + } + + function group($file) { + $dir = $this->dirlist($file); + return $dir[$file]['group']; + } + + function copy($source, $destination, $overwrite = false, $mode = false) { + if ( ! $overwrite && $this->exists($destination) ) + return false; + + $content = $this->get_contents($source); + if ( false === $content ) + return false; + + return $this->put_contents($destination, $content, $mode); + } + + function move($source, $destination, $overwrite = false ) { + return $this->ftp->rename($source, $destination); + } + + function delete($file, $recursive = false, $type = false) { + if ( empty($file) ) + return false; + if ( 'f' == $type || $this->is_file($file) ) + return $this->ftp->delete($file); + if ( !$recursive ) + return $this->ftp->rmdir($file); + + return $this->ftp->mdel($file); + } + + function exists( $file ) { + $list = $this->ftp->nlist( $file ); + return !empty( $list ); //empty list = no file, so invert. + // return $this->ftp->is_exists($file); has issues with ABOR+426 responses on the ncFTPd server + } + + function is_file($file) { + if ( $this->is_dir($file) ) + return false; + if ( $this->exists($file) ) + return true; + return false; + } + + function is_dir($path) { + $cwd = $this->cwd(); + if ( $this->chdir($path) ) { + $this->chdir($cwd); + return true; + } + return false; + } + + function is_readable($file) { + return true; + } + + function is_writable($file) { + return true; + } + + function atime($file) { + return false; + } + + function mtime($file) { + return $this->ftp->mdtm($file); + } + + function size($file) { + return $this->ftp->filesize($file); + } + + function touch($file, $time = 0, $atime = 0 ) { + return false; + } + + function mkdir($path, $chmod = false, $chown = false, $chgrp = false ) { + $path = untrailingslashit($path); + if ( empty($path) ) + return false; + + if ( ! $this->ftp->mkdir($path) ) + return false; + if ( ! $chmod ) + $chmod = FS_CHMOD_DIR; + $this->chmod($path, $chmod); + if ( $chown ) + $this->chown($path, $chown); + if ( $chgrp ) + $this->chgrp($path, $chgrp); + return true; + } + + function rmdir($path, $recursive = false ) { + $this->delete($path, $recursive); + } + + function dirlist($path = '.', $include_hidden = true, $recursive = false ) { + if ( $this->is_file($path) ) { + $limit_file = basename($path); + $path = dirname($path) . '/'; + } else { + $limit_file = false; + } + + mbstring_binary_safe_encoding(); + + $list = $this->ftp->dirlist($path); + if ( empty( $list ) && ! $this->exists( $path ) ) { + + reset_mbstring_encoding(); + + return false; + } + + $ret = array(); + foreach ( $list as $struc ) { + + if ( '.' == $struc['name'] || '..' == $struc['name'] ) + continue; + + if ( ! $include_hidden && '.' == $struc['name'][0] ) + continue; + + if ( $limit_file && $struc['name'] != $limit_file ) + continue; + + if ( 'd' == $struc['type'] ) { + if ( $recursive ) + $struc['files'] = $this->dirlist($path . '/' . $struc['name'], $include_hidden, $recursive); + else + $struc['files'] = array(); + } + + // Replace symlinks formatted as "source -> target" with just the source name + if ( $struc['islink'] ) + $struc['name'] = preg_replace( '/(\s*->\s*.*)$/', '', $struc['name'] ); + + $ret[ $struc['name'] ] = $struc; + } + + reset_mbstring_encoding(); + + return $ret; + } + + function __destruct() { + $this->ftp->quit(); + } +} diff --git a/wp-admin/includes/class-wp-filesystem-ssh2.php b/wp-admin/includes/class-wp-filesystem-ssh2.php new file mode 100644 index 0000000..30a96b1 --- /dev/null +++ b/wp-admin/includes/class-wp-filesystem-ssh2.php @@ -0,0 +1,391 @@ +method = 'ssh2'; + $this->errors = new WP_Error(); + + //Check if possible to use ssh2 functions. + if ( ! extension_loaded('ssh2') ) { + $this->errors->add('no_ssh2_ext', __('The ssh2 PHP extension is not available')); + return false; + } + if ( !function_exists('stream_get_contents') ) { + $this->errors->add('ssh2_php_requirement', __('The ssh2 PHP extension is available, however, we require the PHP5 function stream_get_contents()')); + return false; + } + + // Set defaults: + if ( empty($opt['port']) ) + $this->options['port'] = 22; + else + $this->options['port'] = $opt['port']; + + if ( empty($opt['hostname']) ) + $this->errors->add('empty_hostname', __('SSH2 hostname is required')); + else + $this->options['hostname'] = $opt['hostname']; + + if ( ! empty($opt['base']) ) + $this->wp_base = $opt['base']; + + // Check if the options provided are OK. + if ( !empty ($opt['public_key']) && !empty ($opt['private_key']) ) { + $this->options['public_key'] = $opt['public_key']; + $this->options['private_key'] = $opt['private_key']; + + $this->options['hostkey'] = array('hostkey' => 'ssh-rsa'); + + $this->keys = true; + } elseif ( empty ($opt['username']) ) { + $this->errors->add('empty_username', __('SSH2 username is required')); + } + + if ( !empty($opt['username']) ) + $this->options['username'] = $opt['username']; + + if ( empty ($opt['password']) ) { + if ( !$this->keys ) //password can be blank if we are using keys + $this->errors->add('empty_password', __('SSH2 password is required')); + } else { + $this->options['password'] = $opt['password']; + } + + } + + function connect() { + if ( ! $this->keys ) { + $this->link = @ssh2_connect($this->options['hostname'], $this->options['port']); + } else { + $this->link = @ssh2_connect($this->options['hostname'], $this->options['port'], $this->options['hostkey']); + } + + if ( ! $this->link ) { + $this->errors->add('connect', sprintf(__('Failed to connect to SSH2 Server %1$s:%2$s'), $this->options['hostname'], $this->options['port'])); + return false; + } + + if ( !$this->keys ) { + if ( ! @ssh2_auth_password($this->link, $this->options['username'], $this->options['password']) ) { + $this->errors->add('auth', sprintf(__('Username/Password incorrect for %s'), $this->options['username'])); + return false; + } + } else { + if ( ! @ssh2_auth_pubkey_file($this->link, $this->options['username'], $this->options['public_key'], $this->options['private_key'], $this->options['password'] ) ) { + $this->errors->add('auth', sprintf(__('Public and Private keys incorrect for %s'), $this->options['username'])); + return false; + } + } + + $this->sftp_link = ssh2_sftp($this->link); + + return true; + } + + function run_command( $command, $returnbool = false) { + + if ( ! $this->link ) + return false; + + if ( ! ($stream = ssh2_exec($this->link, $command)) ) { + $this->errors->add('command', sprintf(__('Unable to perform command: %s'), $command)); + } else { + stream_set_blocking( $stream, true ); + stream_set_timeout( $stream, FS_TIMEOUT ); + $data = stream_get_contents( $stream ); + fclose( $stream ); + + if ( $returnbool ) + return ( $data === false ) ? false : '' != trim($data); + else + return $data; + } + return false; + } + + function get_contents( $file ) { + $file = ltrim($file, '/'); + return file_get_contents('ssh2.sftp://' . $this->sftp_link . '/' . $file); + } + + function get_contents_array($file) { + $file = ltrim($file, '/'); + return file('ssh2.sftp://' . $this->sftp_link . '/' . $file); + } + + function put_contents($file, $contents, $mode = false ) { + $ret = file_put_contents( 'ssh2.sftp://' . $this->sftp_link . '/' . ltrim( $file, '/' ), $contents ); + + if ( $ret !== strlen( $contents ) ) + return false; + + $this->chmod($file, $mode); + + return true; + } + + function cwd() { + $cwd = $this->run_command('pwd'); + if ( $cwd ) + $cwd = trailingslashit($cwd); + return $cwd; + } + + function chdir($dir) { + return $this->run_command('cd ' . $dir, true); + } + + function chgrp($file, $group, $recursive = false ) { + if ( ! $this->exists($file) ) + return false; + if ( ! $recursive || ! $this->is_dir($file) ) + return $this->run_command(sprintf('chgrp %s %s', escapeshellarg($group), escapeshellarg($file)), true); + return $this->run_command(sprintf('chgrp -R %s %s', escapeshellarg($group), escapeshellarg($file)), true); + } + + function chmod($file, $mode = false, $recursive = false) { + if ( ! $this->exists($file) ) + return false; + + if ( ! $mode ) { + if ( $this->is_file($file) ) + $mode = FS_CHMOD_FILE; + elseif ( $this->is_dir($file) ) + $mode = FS_CHMOD_DIR; + else + return false; + } + + if ( ! $recursive || ! $this->is_dir($file) ) + return $this->run_command(sprintf('chmod %o %s', $mode, escapeshellarg($file)), true); + return $this->run_command(sprintf('chmod -R %o %s', $mode, escapeshellarg($file)), true); + } + + /** + * Change the ownership of a file / folder. + * + * @since Unknown + * + * @param string $file Path to the file. + * @param mixed $owner A user name or number. + * @param bool $recursive Optional. If set True changes file owner recursivly. Defaults to False. + * @return bool Returns true on success or false on failure. + */ + function chown( $file, $owner, $recursive = false ) { + if ( ! $this->exists($file) ) + return false; + if ( ! $recursive || ! $this->is_dir($file) ) + return $this->run_command(sprintf('chown %s %s', escapeshellarg($owner), escapeshellarg($file)), true); + return $this->run_command(sprintf('chown -R %s %s', escapeshellarg($owner), escapeshellarg($file)), true); + } + + function owner($file) { + $owneruid = @fileowner('ssh2.sftp://' . $this->sftp_link . '/' . ltrim($file, '/')); + if ( ! $owneruid ) + return false; + if ( ! function_exists('posix_getpwuid') ) + return $owneruid; + $ownerarray = posix_getpwuid($owneruid); + return $ownerarray['name']; + } + + function getchmod($file) { + return substr( decoct( @fileperms( 'ssh2.sftp://' . $this->sftp_link . '/' . ltrim( $file, '/' ) ) ), -3 ); + } + + function group($file) { + $gid = @filegroup('ssh2.sftp://' . $this->sftp_link . '/' . ltrim($file, '/')); + if ( ! $gid ) + return false; + if ( ! function_exists('posix_getgrgid') ) + return $gid; + $grouparray = posix_getgrgid($gid); + return $grouparray['name']; + } + + function copy($source, $destination, $overwrite = false, $mode = false) { + if ( ! $overwrite && $this->exists($destination) ) + return false; + $content = $this->get_contents($source); + if ( false === $content) + return false; + return $this->put_contents($destination, $content, $mode); + } + + function move($source, $destination, $overwrite = false) { + return @ssh2_sftp_rename($this->link, $source, $destination); + } + + function delete($file, $recursive = false, $type = false) { + if ( 'f' == $type || $this->is_file($file) ) + return ssh2_sftp_unlink($this->sftp_link, $file); + if ( ! $recursive ) + return ssh2_sftp_rmdir($this->sftp_link, $file); + $filelist = $this->dirlist($file); + if ( is_array($filelist) ) { + foreach ( $filelist as $filename => $fileinfo) { + $this->delete($file . '/' . $filename, $recursive, $fileinfo['type']); + } + } + return ssh2_sftp_rmdir($this->sftp_link, $file); + } + + function exists($file) { + $file = ltrim($file, '/'); + return file_exists('ssh2.sftp://' . $this->sftp_link . '/' . $file); + } + + function is_file($file) { + $file = ltrim($file, '/'); + return is_file('ssh2.sftp://' . $this->sftp_link . '/' . $file); + } + + function is_dir($path) { + $path = ltrim($path, '/'); + return is_dir('ssh2.sftp://' . $this->sftp_link . '/' . $path); + } + + function is_readable($file) { + $file = ltrim($file, '/'); + return is_readable('ssh2.sftp://' . $this->sftp_link . '/' . $file); + } + + function is_writable($file) { + $file = ltrim($file, '/'); + return is_writable('ssh2.sftp://' . $this->sftp_link . '/' . $file); + } + + function atime($file) { + $file = ltrim($file, '/'); + return fileatime('ssh2.sftp://' . $this->sftp_link . '/' . $file); + } + + function mtime($file) { + $file = ltrim($file, '/'); + return filemtime('ssh2.sftp://' . $this->sftp_link . '/' . $file); + } + + function size($file) { + $file = ltrim($file, '/'); + return filesize('ssh2.sftp://' . $this->sftp_link . '/' . $file); + } + + function touch($file, $time = 0, $atime = 0) { + //Not implemented. + } + + function mkdir($path, $chmod = false, $chown = false, $chgrp = false) { + $path = untrailingslashit($path); + if ( empty($path) ) + return false; + + if ( ! $chmod ) + $chmod = FS_CHMOD_DIR; + if ( ! ssh2_sftp_mkdir($this->sftp_link, $path, $chmod, true) ) + return false; + if ( $chown ) + $this->chown($path, $chown); + if ( $chgrp ) + $this->chgrp($path, $chgrp); + return true; + } + + function rmdir($path, $recursive = false) { + return $this->delete($path, $recursive); + } + + function dirlist($path, $include_hidden = true, $recursive = false) { + if ( $this->is_file($path) ) { + $limit_file = basename($path); + $path = dirname($path); + } else { + $limit_file = false; + } + + if ( ! $this->is_dir($path) ) + return false; + + $ret = array(); + $dir = @dir('ssh2.sftp://' . $this->sftp_link .'/' . ltrim($path, '/') ); + + if ( ! $dir ) + return false; + + while (false !== ($entry = $dir->read()) ) { + $struc = array(); + $struc['name'] = $entry; + + if ( '.' == $struc['name'] || '..' == $struc['name'] ) + continue; //Do not care about these folders. + + if ( ! $include_hidden && '.' == $struc['name'][0] ) + continue; + + if ( $limit_file && $struc['name'] != $limit_file ) + continue; + + $struc['perms'] = $this->gethchmod($path.'/'.$entry); + $struc['permsn'] = $this->getnumchmodfromh($struc['perms']); + $struc['number'] = false; + $struc['owner'] = $this->owner($path.'/'.$entry); + $struc['group'] = $this->group($path.'/'.$entry); + $struc['size'] = $this->size($path.'/'.$entry); + $struc['lastmodunix']= $this->mtime($path.'/'.$entry); + $struc['lastmod'] = date('M j',$struc['lastmodunix']); + $struc['time'] = date('h:i:s',$struc['lastmodunix']); + $struc['type'] = $this->is_dir($path.'/'.$entry) ? 'd' : 'f'; + + if ( 'd' == $struc['type'] ) { + if ( $recursive ) + $struc['files'] = $this->dirlist($path . '/' . $struc['name'], $include_hidden, $recursive); + else + $struc['files'] = array(); + } + + $ret[ $struc['name'] ] = $struc; + } + $dir->close(); + unset($dir); + return $ret; + } +} diff --git a/wp-admin/includes/class-wp-importer.php b/wp-admin/includes/class-wp-importer.php new file mode 100644 index 0000000..57ff7f4 --- /dev/null +++ b/wp-admin/includes/class-wp-importer.php @@ -0,0 +1,302 @@ +prepare( "SELECT post_id, meta_value FROM $wpdb->postmeta WHERE meta_key = '%s' LIMIT %d,%d", $meta_key, $offset, $limit ); + $results = $wpdb->get_results( $sql ); + + // Increment offset + $offset = ( $limit + $offset ); + + if ( !empty( $results ) ) { + foreach ( $results as $r ) { + // Set permalinks into array + $hashtable[$r->meta_value] = intval( $r->post_id ); + } + } + } while ( count( $results ) == $limit ); + + // unset to save memory + unset( $results, $r ); + + return $hashtable; + } + + /** + * Return count of imported permalinks from WordPress database + * + * @param string $bid + * @return int + */ + function count_imported_posts( $importer_name, $bid ) { + global $wpdb; + + $count = 0; + + // Get count of permalinks + $meta_key = $importer_name . '_' . $bid . '_permalink'; + $sql = $wpdb->prepare( "SELECT COUNT( post_id ) AS cnt FROM $wpdb->postmeta WHERE meta_key = '%s'", $meta_key ); + + $result = $wpdb->get_results( $sql ); + + if ( !empty( $result ) ) + $count = intval( $result[0]->cnt ); + + // unset to save memory + unset( $results ); + + return $count; + } + + /** + * Set array with imported comments from WordPress database + * + * @param string $bid + * @return array + */ + function get_imported_comments( $bid ) { + global $wpdb; + + $hashtable = array(); + + $limit = 100; + $offset = 0; + + // Grab all comments in chunks + do { + $sql = $wpdb->prepare( "SELECT comment_ID, comment_agent FROM $wpdb->comments LIMIT %d,%d", $offset, $limit ); + $results = $wpdb->get_results( $sql ); + + // Increment offset + $offset = ( $limit + $offset ); + + if ( !empty( $results ) ) { + foreach ( $results as $r ) { + // Explode comment_agent key + list ( $ca_bid, $source_comment_id ) = explode( '-', $r->comment_agent ); + $source_comment_id = intval( $source_comment_id ); + + // Check if this comment came from this blog + if ( $bid == $ca_bid ) { + $hashtable[$source_comment_id] = intval( $r->comment_ID ); + } + } + } + } while ( count( $results ) == $limit ); + + // unset to save memory + unset( $results, $r ); + + return $hashtable; + } + + function set_blog( $blog_id ) { + if ( is_numeric( $blog_id ) ) { + $blog_id = (int) $blog_id; + } else { + $blog = 'http://' . preg_replace( '#^https?://#', '', $blog_id ); + if ( ( !$parsed = parse_url( $blog ) ) || empty( $parsed['host'] ) ) { + fwrite( STDERR, "Error: can not determine blog_id from $blog_id\n" ); + exit(); + } + if ( empty( $parsed['path'] ) ) + $parsed['path'] = '/'; + $blog = get_blog_details( array( 'domain' => $parsed['host'], 'path' => $parsed['path'] ) ); + if ( !$blog ) { + fwrite( STDERR, "Error: Could not find blog\n" ); + exit(); + } + $blog_id = (int) $blog->blog_id; + } + + if ( function_exists( 'is_multisite' ) ) { + if ( is_multisite() ) + switch_to_blog( $blog_id ); + } + + return $blog_id; + } + + function set_user( $user_id ) { + if ( is_numeric( $user_id ) ) { + $user_id = (int) $user_id; + } else { + $user_id = (int) username_exists( $user_id ); + } + + if ( !$user_id || !wp_set_current_user( $user_id ) ) { + fwrite( STDERR, "Error: can not find user\n" ); + exit(); + } + + return $user_id; + } + + /** + * Sort by strlen, longest string first + * + * @param string $a + * @param string $b + * @return int + */ + function cmpr_strlen( $a, $b ) { + return strlen( $b ) - strlen( $a ); + } + + /** + * GET URL + * + * @param string $url + * @param string $username + * @param string $password + * @param bool $head + * @return array + */ + function get_page( $url, $username = '', $password = '', $head = false ) { + // Increase the timeout + add_filter( 'http_request_timeout', array( $this, 'bump_request_timeout' ) ); + + $headers = array(); + $args = array(); + if ( true === $head ) + $args['method'] = 'HEAD'; + if ( !empty( $username ) && !empty( $password ) ) + $headers['Authorization'] = 'Basic ' . base64_encode( "$username:$password" ); + + $args['headers'] = $headers; + + return wp_safe_remote_request( $url, $args ); + } + + /** + * Bump up the request timeout for http requests + * + * @param int $val + * @return int + */ + function bump_request_timeout( $val ) { + return 60; + } + + /** + * Check if user has exceeded disk quota + * + * @return bool + */ + function is_user_over_quota() { + if ( function_exists( 'upload_is_user_over_quota' ) ) { + if ( upload_is_user_over_quota( 1 ) ) { + echo "Sorry, you have used your upload quota.\n"; + return true; + } + } + + return false; + } + + /** + * Replace newlines, tabs, and multiple spaces with a single space + * + * @param string $string + * @return string + */ + function min_whitespace( $string ) { + return preg_replace( '|[\r\n\t ]+|', ' ', $string ); + } + + /** + * Reset global variables that grow out of control during imports + * + * @return void + */ + function stop_the_insanity() { + global $wpdb, $wp_actions; + // Or define( 'WP_IMPORTING', true ); + $wpdb->queries = array(); + // Reset $wp_actions to keep it from growing out of control + $wp_actions = array(); + } +} + +/** + * Returns value of command line params. + * Exits when a required param is not set. + * + * @param string $param + * @param bool $required + * @return mixed + */ +function get_cli_args( $param, $required = false ) { + $args = $_SERVER['argv']; + + $out = array(); + + $last_arg = null; + $return = null; + + $il = sizeof( $args ); + + for ( $i = 1, $il; $i < $il; $i++ ) { + if ( (bool) preg_match( "/^--(.+)/", $args[$i], $match ) ) { + $parts = explode( "=", $match[1] ); + $key = preg_replace( "/[^a-z0-9]+/", "", $parts[0] ); + + if ( isset( $parts[1] ) ) { + $out[$key] = $parts[1]; + } else { + $out[$key] = true; + } + + $last_arg = $key; + } else if ( (bool) preg_match( "/^-([a-zA-Z0-9]+)/", $args[$i], $match ) ) { + for ( $j = 0, $jl = strlen( $match[1] ); $j < $jl; $j++ ) { + $key = $match[1]{$j}; + $out[$key] = true; + } + + $last_arg = $key; + } else if ( $last_arg !== null ) { + $out[$last_arg] = $args[$i]; + } + } + + // Check array for specified param + if ( isset( $out[$param] ) ) { + // Set return value + $return = $out[$param]; + } + + // Check for missing required param + if ( !isset( $out[$param] ) && $required ) { + // Display message and exit + echo "\"$param\" parameter is required but was not specified\n"; + exit(); + } + + return $return; +} diff --git a/wp-admin/includes/class-wp-links-list-table.php b/wp-admin/includes/class-wp-links-list-table.php new file mode 100644 index 0000000..98281b0 --- /dev/null +++ b/wp-admin/includes/class-wp-links-list-table.php @@ -0,0 +1,197 @@ + 'bookmarks', + 'screen' => isset( $args['screen'] ) ? $args['screen'] : null, + ) ); + } + + function ajax_user_can() { + return current_user_can( 'manage_links' ); + } + + function prepare_items() { + global $cat_id, $s, $orderby, $order; + + wp_reset_vars( array( 'action', 'cat_id', 'link_id', 'orderby', 'order', 's' ) ); + + $args = array( 'hide_invisible' => 0, 'hide_empty' => 0 ); + + if ( 'all' != $cat_id ) + $args['category'] = $cat_id; + if ( !empty( $s ) ) + $args['search'] = $s; + if ( !empty( $orderby ) ) + $args['orderby'] = $orderby; + if ( !empty( $order ) ) + $args['order'] = $order; + + $this->items = get_bookmarks( $args ); + } + + function no_items() { + _e( 'No links found.' ); + } + + function get_bulk_actions() { + $actions = array(); + $actions['delete'] = __( 'Delete' ); + + return $actions; + } + + function extra_tablenav( $which ) { + global $cat_id; + + if ( 'top' != $which ) + return; +?> +
+ $cat_id, + 'name' => 'cat_id', + 'taxonomy' => 'link_category', + 'show_option_all' => __( 'View all categories' ), + 'hide_empty' => true, + 'hierarchical' => 1, + 'show_count' => 0, + 'orderby' => 'name', + ); + wp_dropdown_categories( $dropdown_options ); + submit_button( __( 'Filter' ), 'button', false, false, array( 'id' => 'post-query-submit' ) ); +?> +
+ '', + 'name' => _x( 'Name', 'link name' ), + 'url' => __( 'URL' ), + 'categories' => __( 'Categories' ), + 'rel' => __( 'Relationship' ), + 'visible' => __( 'Visible' ), + 'rating' => __( 'Rating' ) + ); + } + + function get_sortable_columns() { + return array( + 'name' => 'name', + 'url' => 'url', + 'visible' => 'visible', + 'rating' => 'rating' + ); + } + + function display_rows() { + global $cat_id; + + $alt = 0; + + foreach ( $this->items as $link ) { + $link = sanitize_bookmark( $link ); + $link->link_name = esc_attr( $link->link_name ); + $link->link_category = wp_get_link_cats( $link->link_id ); + + $short_url = url_shorten( $link->link_url ); + + $visible = ( $link->link_visible == 'Y' ) ? __( 'Yes' ) : __( 'No' ); + $rating = $link->link_rating; + $style = ( $alt++ % 2 ) ? '' : ' class="alternate"'; + + $edit_link = get_edit_bookmark_link( $link ); +?> + > +get_column_info(); + + foreach ( $columns as $column_name => $column_display_name ) { + $class = "class='column-$column_name'"; + + $style = ''; + if ( in_array( $column_name, $hidden ) ) + $style = ' style="display:none;"'; + + $attributes = $class . $style; + + switch ( $column_name ) { + case 'cb': ?> + + + + + link_name ) ) . "'>$link->link_name
"; + + $actions = array(); + $actions['edit'] = '' . __( 'Edit' ) . ''; + $actions['delete'] = "link_id ) . "' onclick=\"if ( confirm( '" . esc_js( sprintf( __( "You are about to delete this link '%s'\n 'Cancel' to stop, 'OK' to delete." ), $link->link_name ) ) . "' ) ) { return true;}return false;\">" . __( 'Delete' ) . ""; + echo $this->row_actions( $actions ); + + echo ''; + break; + case 'url': + echo "link_name ) )."'>$short_url"; + break; + case 'categories': + ?>>link_category as $category ) { + $cat = get_term( $category, 'link_category', OBJECT, 'display' ); + if ( is_wp_error( $cat ) ) + echo $cat->get_error_message(); + $cat_name = $cat->name; + if ( $cat_id != $category ) + $cat_name = "$cat_name"; + $cat_names[] = $cat_name; + } + echo implode( ', ', $cat_names ); + ?>>link_rel ) ? '
' : $link->link_rel; ?>>> + >link_id ); ?> + + + '', + 'singular' => '', + 'ajax' => false, + 'screen' => null, + ) ); + + $this->screen = convert_to_screen( $args['screen'] ); + + add_filter( "manage_{$this->screen->id}_columns", array( $this, 'get_columns' ), 0 ); + + if ( !$args['plural'] ) + $args['plural'] = $this->screen->base; + + $args['plural'] = sanitize_key( $args['plural'] ); + $args['singular'] = sanitize_key( $args['singular'] ); + + $this->_args = $args; + + if ( $args['ajax'] ) { + // wp_enqueue_script( 'list-table' ); + add_action( 'admin_footer', array( $this, '_js_vars' ) ); + } + } + + /** + * Checks the current user's permissions + * @uses wp_die() + * + * @since 3.1.0 + * @access public + * @abstract + */ + function ajax_user_can() { + die( 'function WP_List_Table::ajax_user_can() must be over-ridden in a sub-class.' ); + } + + /** + * Prepares the list of items for displaying. + * @uses WP_List_Table::set_pagination_args() + * + * @since 3.1.0 + * @access public + * @abstract + */ + function prepare_items() { + die( 'function WP_List_Table::prepare_items() must be over-ridden in a sub-class.' ); + } + + /** + * An internal method that sets all the necessary pagination arguments + * + * @param array $args An associative array with information about the pagination + * @access protected + */ + function set_pagination_args( $args ) { + $args = wp_parse_args( $args, array( + 'total_items' => 0, + 'total_pages' => 0, + 'per_page' => 0, + ) ); + + if ( !$args['total_pages'] && $args['per_page'] > 0 ) + $args['total_pages'] = ceil( $args['total_items'] / $args['per_page'] ); + + // redirect if page number is invalid and headers are not already sent + if ( ! headers_sent() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) && $args['total_pages'] > 0 && $this->get_pagenum() > $args['total_pages'] ) { + wp_redirect( add_query_arg( 'paged', $args['total_pages'] ) ); + exit; + } + + $this->_pagination_args = $args; + } + + /** + * Access the pagination args + * + * @since 3.1.0 + * @access public + * + * @param string $key + * @return array + */ + function get_pagination_arg( $key ) { + if ( 'page' == $key ) + return $this->get_pagenum(); + + if ( isset( $this->_pagination_args[$key] ) ) + return $this->_pagination_args[$key]; + } + + /** + * Whether the table has items to display or not + * + * @since 3.1.0 + * @access public + * + * @return bool + */ + function has_items() { + return !empty( $this->items ); + } + + /** + * Message to be displayed when there are no items + * + * @since 3.1.0 + * @access public + */ + function no_items() { + _e( 'No items found.' ); + } + + /** + * Display the search box. + * + * @since 3.1.0 + * @access public + * + * @param string $text The search button text + * @param string $input_id The search input id + */ + function search_box( $text, $input_id ) { + if ( empty( $_REQUEST['s'] ) && !$this->has_items() ) + return; + + $input_id = $input_id . '-search-input'; + + if ( ! empty( $_REQUEST['orderby'] ) ) + echo ''; + if ( ! empty( $_REQUEST['order'] ) ) + echo ''; + if ( ! empty( $_REQUEST['post_mime_type'] ) ) + echo ''; + if ( ! empty( $_REQUEST['detached'] ) ) + echo ''; +?> + + link ) with the list + * of views available on this table. + * + * @since 3.1.0 + * @access protected + * + * @return array + */ + function get_views() { + return array(); + } + + /** + * Display the list of views available on this table. + * + * @since 3.1.0 + * @access public + */ + function views() { + $views = $this->get_views(); + /** + * Filter the list of available list table views. + * + * The dynamic portion of the hook name, $this->screen->id, refers + * to the ID of the current screen, usually a string. + * + * @since 3.5.0 + * + * @param array $views An array of available list table views. + */ + $views = apply_filters( "views_{$this->screen->id}", $views ); + + if ( empty( $views ) ) + return; + + echo "
    \n"; + foreach ( $views as $class => $view ) { + $views[ $class ] = "\t
  • $view"; + } + echo implode( " |
  • \n", $views ) . "\n"; + echo "
"; + } + + /** + * Get an associative array ( option_name => option_title ) with the list + * of bulk actions available on this table. + * + * @since 3.1.0 + * @access protected + * + * @return array + */ + function get_bulk_actions() { + return array(); + } + + /** + * Display the bulk actions dropdown. + * + * @since 3.1.0 + * @access public + */ + function bulk_actions() { + if ( is_null( $this->_actions ) ) { + $no_new_actions = $this->_actions = $this->get_bulk_actions(); + /** + * Filter the list table Bulk Actions drop-down. + * + * The dynamic portion of the hook name, $this->screen->id, refers + * to the ID of the current screen, usually a string. + * + * This filter can currently only be used to remove bulk actions. + * + * @since 3.5.0 + * + * @param array $actions An array of the available bulk actions. + */ + $this->_actions = apply_filters( "bulk_actions-{$this->screen->id}", $this->_actions ); + $this->_actions = array_intersect_assoc( $this->_actions, $no_new_actions ); + $two = ''; + } else { + $two = '2'; + } + + if ( empty( $this->_actions ) ) + return; + + echo "\n"; + + submit_button( __( 'Apply' ), 'action', false, false, array( 'id' => "doaction$two" ) ); + echo "\n"; + } + + /** + * Get the current action selected from the bulk actions dropdown. + * + * @since 3.1.0 + * @access public + * + * @return string|bool The action name or False if no action was selected + */ + function current_action() { + if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] ) + return $_REQUEST['action']; + + if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] ) + return $_REQUEST['action2']; + + return false; + } + + /** + * Generate row actions div + * + * @since 3.1.0 + * @access protected + * + * @param array $actions The list of actions + * @param bool $always_visible Whether the actions should be always visible + * @return string + */ + function row_actions( $actions, $always_visible = false ) { + $action_count = count( $actions ); + $i = 0; + + if ( !$action_count ) + return ''; + + $out = '
'; + foreach ( $actions as $action => $link ) { + ++$i; + ( $i == $action_count ) ? $sep = '' : $sep = ' | '; + $out .= "$link$sep"; + } + $out .= '
'; + + return $out; + } + + /** + * Display a monthly dropdown for filtering items + * + * @since 3.1.0 + * @access protected + */ + function months_dropdown( $post_type ) { + global $wpdb, $wp_locale; + + $months = $wpdb->get_results( $wpdb->prepare( " + SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month + FROM $wpdb->posts + WHERE post_type = %s + ORDER BY post_date DESC + ", $post_type ) ); + + /** + * Filter the 'Months' drop-down results. + * + * @since 3.7.0 + * + * @param object $months The months drop-down query results. + * @param string $post_type The post type. + */ + $months = apply_filters( 'months_dropdown_results', $months, $post_type ); + + $month_count = count( $months ); + + if ( !$month_count || ( 1 == $month_count && 0 == $months[0]->month ) ) + return; + + $m = isset( $_GET['m'] ) ? (int) $_GET['m'] : 0; +?> + + __( 'List View' ), + 'excerpt' => __( 'Excerpt View' ) + ); + +?> + +
+ $title ) { + $class = ( $current_mode == $mode ) ? 'class="current"' : ''; + echo "$title\n"; + } + ?> +
+'; + + echo "" . number_format_i18n( get_comments_number() ) . ""; + + if ( $pending_comments ) + echo ''; + } + + /** + * Get the current page number + * + * @since 3.1.0 + * @access protected + * + * @return int + */ + function get_pagenum() { + $pagenum = isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 0; + + if( isset( $this->_pagination_args['total_pages'] ) && $pagenum > $this->_pagination_args['total_pages'] ) + $pagenum = $this->_pagination_args['total_pages']; + + return max( 1, $pagenum ); + } + + /** + * Get number of items to display on a single page + * + * @since 3.1.0 + * @access protected + * + * @return int + */ + function get_items_per_page( $option, $default = 20 ) { + $per_page = (int) get_user_option( $option ); + if ( empty( $per_page ) || $per_page < 1 ) + $per_page = $default; + + /** + * Filter the number of items to be displayed on each page of the list table. + * + * The dynamic hook name, $option, refers to the per page option depending + * on the type of list table in use. Possible values may include: + * 'edit_comments_per_page', 'sites_network_per_page', 'site_themes_network_per_page', + * 'themes_netework_per_page', 'users_network_per_page', 'edit_{$post_type}', etc. + * + * @since 2.9.0 + * + * @param int $per_page Number of items to be displayed. Default 20. + */ + return (int) apply_filters( $option, $per_page ); + } + + /** + * Display the pagination. + * + * @since 3.1.0 + * @access protected + */ + function pagination( $which ) { + if ( empty( $this->_pagination_args ) ) + return; + + extract( $this->_pagination_args, EXTR_SKIP ); + + $output = '' . sprintf( _n( '1 item', '%s items', $total_items ), number_format_i18n( $total_items ) ) . ''; + + $current = $this->get_pagenum(); + + $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); + + $current_url = remove_query_arg( array( 'hotkeys_highlight_last', 'hotkeys_highlight_first' ), $current_url ); + + $page_links = array(); + + $disable_first = $disable_last = ''; + if ( $current == 1 ) + $disable_first = ' disabled'; + if ( $current == $total_pages ) + $disable_last = ' disabled'; + + $page_links[] = sprintf( "%s", + 'first-page' . $disable_first, + esc_attr__( 'Go to the first page' ), + esc_url( remove_query_arg( 'paged', $current_url ) ), + '«' + ); + + $page_links[] = sprintf( "%s", + 'prev-page' . $disable_first, + esc_attr__( 'Go to the previous page' ), + esc_url( add_query_arg( 'paged', max( 1, $current-1 ), $current_url ) ), + '‹' + ); + + if ( 'bottom' == $which ) + $html_current_page = $current; + else + $html_current_page = sprintf( "", + esc_attr__( 'Current page' ), + $current, + strlen( $total_pages ) + ); + + $html_total_pages = sprintf( "%s", number_format_i18n( $total_pages ) ); + $page_links[] = '' . sprintf( _x( '%1$s of %2$s', 'paging' ), $html_current_page, $html_total_pages ) . ''; + + $page_links[] = sprintf( "%s", + 'next-page' . $disable_last, + esc_attr__( 'Go to the next page' ), + esc_url( add_query_arg( 'paged', min( $total_pages, $current+1 ), $current_url ) ), + '›' + ); + + $page_links[] = sprintf( "%s", + 'last-page' . $disable_last, + esc_attr__( 'Go to the last page' ), + esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ), + '»' + ); + + $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' : ''; + else + $page_class = ' no-pages'; + + $this->_pagination = "
$output
"; + + echo $this->_pagination; + } + + /** + * Get a list of columns. The format is: + * 'internal-name' => 'Title' + * + * @since 3.1.0 + * @access protected + * @abstract + * + * @return array + */ + function get_columns() { + die( 'function WP_List_Table::get_columns() must be over-ridden in a sub-class.' ); + } + + /** + * Get a list of sortable columns. The format is: + * 'internal-name' => 'orderby' + * or + * 'internal-name' => array( 'orderby', true ) + * + * The second format will make the initial sorting order be descending + * + * @since 3.1.0 + * @access protected + * + * @return array + */ + function get_sortable_columns() { + return array(); + } + + /** + * Get a list of all, hidden and sortable columns, with filter applied + * + * @since 3.1.0 + * @access protected + * + * @return array + */ + function get_column_info() { + if ( isset( $this->_column_headers ) ) + return $this->_column_headers; + + $columns = get_column_headers( $this->screen ); + $hidden = get_hidden_columns( $this->screen ); + + $sortable_columns = $this->get_sortable_columns(); + /** + * Filter the list table sortable columns for a specific screen. + * + * The dynamic portion of the hook name, $this->screen->id, refers + * to the ID of the current screen, usually a string. + * + * @since 3.5.0 + * + * @param array $sortable_columns An array of sortable columns. + */ + $_sortable = apply_filters( "manage_{$this->screen->id}_sortable_columns", $sortable_columns ); + + $sortable = array(); + foreach ( $_sortable as $id => $data ) { + if ( empty( $data ) ) + continue; + + $data = (array) $data; + if ( !isset( $data[1] ) ) + $data[1] = false; + + $sortable[$id] = $data; + } + + $this->_column_headers = array( $columns, $hidden, $sortable ); + + return $this->_column_headers; + } + + /** + * Return number of visible columns + * + * @since 3.1.0 + * @access public + * + * @return int + */ + function get_column_count() { + list ( $columns, $hidden ) = $this->get_column_info(); + $hidden = array_intersect( array_keys( $columns ), array_filter( $hidden ) ); + return count( $columns ) - count( $hidden ); + } + + /** + * Print column headers, accounting for hidden and sortable columns. + * + * @since 3.1.0 + * @access protected + * + * @param bool $with_id Whether to set the id attribute or not + */ + function print_column_headers( $with_id = true ) { + list( $columns, $hidden, $sortable ) = $this->get_column_info(); + + $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); + $current_url = remove_query_arg( 'paged', $current_url ); + + if ( isset( $_GET['orderby'] ) ) + $current_orderby = $_GET['orderby']; + else + $current_orderby = ''; + + if ( isset( $_GET['order'] ) && 'desc' == $_GET['order'] ) + $current_order = 'desc'; + else + $current_order = 'asc'; + + if ( ! empty( $columns['cb'] ) ) { + static $cb_counter = 1; + $columns['cb'] = '' + . ''; + $cb_counter++; + } + + foreach ( $columns as $column_key => $column_display_name ) { + $class = array( 'manage-column', "column-$column_key" ); + + $style = ''; + if ( in_array( $column_key, $hidden ) ) + $style = 'display:none;'; + + $style = ' style="' . $style . '"'; + + if ( 'cb' == $column_key ) + $class[] = 'check-column'; + elseif ( in_array( $column_key, array( 'posts', 'comments', 'links' ) ) ) + $class[] = 'num'; + + if ( isset( $sortable[$column_key] ) ) { + list( $orderby, $desc_first ) = $sortable[$column_key]; + + if ( $current_orderby == $orderby ) { + $order = 'asc' == $current_order ? 'desc' : 'asc'; + $class[] = 'sorted'; + $class[] = $current_order; + } else { + $order = $desc_first ? 'desc' : 'asc'; + $class[] = 'sortable'; + $class[] = $desc_first ? 'asc' : 'desc'; + } + + $column_display_name = '' . $column_display_name . ''; + } + + $id = $with_id ? "id='$column_key'" : ''; + + if ( !empty( $class ) ) + $class = "class='" . join( ' ', $class ) . "'"; + + echo "$column_display_name"; + } + } + + /** + * Display the table + * + * @since 3.1.0 + * @access public + */ + function display() { + extract( $this->_args ); + + $this->display_tablenav( 'top' ); + +?> + + + + print_column_headers(); ?> + + + + + + print_column_headers( false ); ?> + + + + > + display_rows_or_placeholder(); ?> + +
+display_tablenav( 'bottom' ); + } + + /** + * Get a list of CSS classes for the tag + * + * @since 3.1.0 + * @access protected + * + * @return array + */ + function get_table_classes() { + return array( 'widefat', 'fixed', $this->_args['plural'] ); + } + + /** + * Generate the table navigation above or below the table + * + * @since 3.1.0 + * @access protected + */ + function display_tablenav( $which ) { + if ( 'top' == $which ) + wp_nonce_field( 'bulk-' . $this->_args['plural'] ); +?> +
+ +
+ bulk_actions(); ?> +
+extra_tablenav( $which ); + $this->pagination( $which ); +?> + +
+
+ part of the table + * + * @since 3.1.0 + * @access protected + */ + function display_rows_or_placeholder() { + if ( $this->has_items() ) { + $this->display_rows(); + } else { + list( $columns, $hidden ) = $this->get_column_info(); + echo ''; + } + } + + /** + * Generate the table rows + * + * @since 3.1.0 + * @access protected + */ + function display_rows() { + foreach ( $this->items as $item ) + $this->single_row( $item ); + } + + /** + * Generates content for a single row of the table + * + * @since 3.1.0 + * @access protected + * + * @param object $item The current item + */ + function single_row( $item ) { + static $row_class = ''; + $row_class = ( $row_class == '' ? ' class="alternate"' : '' ); + + echo ''; + $this->single_row_columns( $item ); + echo ''; + } + + /** + * Generates the columns for a single row of the table + * + * @since 3.1.0 + * @access protected + * + * @param object $item The current item + */ + function single_row_columns( $item ) { + list( $columns, $hidden ) = $this->get_column_info(); + + foreach ( $columns as $column_name => $column_display_name ) { + $class = "class='$column_name column-$column_name'"; + + $style = ''; + if ( in_array( $column_name, $hidden ) ) + $style = ' style="display:none;"'; + + $attributes = "$class$style"; + + if ( 'cb' == $column_name ) { + echo ''; + } + elseif ( method_exists( $this, 'column_' . $column_name ) ) { + echo ""; + } + else { + echo ""; + } + } + } + + /** + * Handle an incoming ajax request (called from admin-ajax.php) + * + * @since 3.1.0 + * @access public + */ + function ajax_response() { + $this->prepare_items(); + + extract( $this->_args ); + extract( $this->_pagination_args, EXTR_SKIP ); + + ob_start(); + if ( ! empty( $_REQUEST['no_placeholder'] ) ) + $this->display_rows(); + else + $this->display_rows_or_placeholder(); + + $rows = ob_get_clean(); + + $response = array( 'rows' => $rows ); + + if ( isset( $total_items ) ) + $response['total_items_i18n'] = sprintf( _n( '1 item', '%s items', $total_items ), number_format_i18n( $total_items ) ); + + if ( isset( $total_pages ) ) { + $response['total_pages'] = $total_pages; + $response['total_pages_i18n'] = number_format_i18n( $total_pages ); + } + + die( json_encode( $response ) ); + } + + /** + * Send required variables to JavaScript land + * + * @access private + */ + function _js_vars() { + $args = array( + 'class' => get_class( $this ), + 'screen' => array( + 'id' => $this->screen->id, + 'base' => $this->screen->base, + ) + ); + + 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 new file mode 100644 index 0000000..48e4363 --- /dev/null +++ b/wp-admin/includes/class-wp-media-list-table.php @@ -0,0 +1,478 @@ +detached = isset( $_REQUEST['detached'] ) || isset( $_REQUEST['find_detached'] ); + + parent::__construct( array( + 'plural' => 'media', + 'screen' => isset( $args['screen'] ) ? $args['screen'] : null, + ) ); + } + + function ajax_user_can() { + return current_user_can('upload_files'); + } + + function prepare_items() { + global $lost, $wpdb, $wp_query, $post_mime_types, $avail_post_mime_types; + + $q = $_REQUEST; + + if ( !empty( $lost ) ) + $q['post__in'] = implode( ',', $lost ); + + list( $post_mime_types, $avail_post_mime_types ) = wp_edit_attachments_query( $q ); + + $this->is_trash = isset( $_REQUEST['status'] ) && 'trash' == $_REQUEST['status']; + + $this->set_pagination_args( array( + 'total_items' => $wp_query->found_posts, + 'total_pages' => $wp_query->max_num_pages, + 'per_page' => $wp_query->query_vars['posts_per_page'], + ) ); + } + + function get_views() { + global $wpdb, $post_mime_types, $avail_post_mime_types; + + $type_links = array(); + $_num_posts = (array) wp_count_attachments(); + $_total_posts = array_sum($_num_posts) - $_num_posts['trash']; + $total_orphans = $wpdb->get_var( "SELECT COUNT( * ) FROM $wpdb->posts WHERE post_type = 'attachment' AND post_status != 'trash' AND post_parent < 1" ); + $matches = wp_match_mime_types(array_keys($post_mime_types), array_keys($_num_posts)); + foreach ( $matches as $type => $reals ) + foreach ( $reals as $real ) + $num_posts[$type] = ( isset( $num_posts[$type] ) ) ? $num_posts[$type] + $_num_posts[$real] : $_num_posts[$real]; + + $class = ( empty($_GET['post_mime_type']) && !$this->detached && !isset($_GET['status']) ) ? ' class="current"' : ''; + $type_links['all'] = "" . sprintf( _nx( 'All (%s)', 'All (%s)', $_total_posts, 'uploaded files' ), number_format_i18n( $_total_posts ) ) . ''; + foreach ( $post_mime_types as $mime_type => $label ) { + $class = ''; + + if ( !wp_match_mime_types($mime_type, $avail_post_mime_types) ) + continue; + + if ( !empty($_GET['post_mime_type']) && wp_match_mime_types($mime_type, $_GET['post_mime_type']) ) + $class = ' class="current"'; + if ( !empty( $num_posts[$mime_type] ) ) + $type_links[$mime_type] = "" . sprintf( translate_nooped_plural( $label[2], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . ''; + } + $type_links['detached'] = 'detached ? ' class="current"' : '' ) . '>' . sprintf( _nx( 'Unattached (%s)', 'Unattached (%s)', $total_orphans, 'detached files' ), number_format_i18n( $total_orphans ) ) . ''; + + if ( !empty($_num_posts['trash']) ) + $type_links['trash'] = '' . sprintf( _nx( 'Trash (%s)', 'Trash (%s)', $_num_posts['trash'], 'uploaded files' ), number_format_i18n( $_num_posts['trash'] ) ) . ''; + + return $type_links; + } + + function get_bulk_actions() { + $actions = array(); + $actions['delete'] = __( 'Delete Permanently' ); + if ( $this->detached ) + $actions['attach'] = __( 'Attach to a post' ); + + return $actions; + } + + function extra_tablenav( $which ) { +?> +
+detached && !$this->is_trash ) { + $this->months_dropdown( 'attachment' ); + + /** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */ + do_action( 'restrict_manage_posts' ); + submit_button( __( 'Filter' ), 'button', false, false, array( 'id' => 'post-query-submit' ) ); + } + + if ( $this->detached ) { + submit_button( __( 'Scan for lost attachments' ), 'secondary', 'find_detached', false ); + } elseif ( $this->is_trash && current_user_can( 'edit_others_posts' ) ) { + submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false ); + } ?> +
+'; + $posts_columns['icon'] = ''; + /* translators: column name */ + $posts_columns['title'] = _x( 'File', 'column name' ); + $posts_columns['author'] = __( 'Author' ); + + $taxonomies = array(); + + $taxonomies = get_taxonomies_for_attachments( 'objects' ); + $taxonomies = wp_filter_object_list( $taxonomies, array( 'show_admin_column' => true ), 'and', 'name' ); + + /** + * Filter the taxonomy columns for attachments in the Media list table. + * + * @since 3.5.0 + * + * @param array $taxonomies An array of registered taxonomies to show for attachments. + * @param string $post_type The post type. Default 'attachment'. + */ + $taxonomies = apply_filters( 'manage_taxonomies_for_attachment_columns', $taxonomies, 'attachment' ); + $taxonomies = array_filter( $taxonomies, 'taxonomy_exists' ); + + foreach ( $taxonomies as $taxonomy ) { + if ( 'category' == $taxonomy ) + $column_key = 'categories'; + elseif ( 'post_tag' == $taxonomy ) + $column_key = 'tags'; + else + $column_key = 'taxonomy-' . $taxonomy; + + $posts_columns[ $column_key ] = get_taxonomy( $taxonomy )->labels->name; + } + + /* translators: column name */ + if ( !$this->detached ) { + $posts_columns['parent'] = _x( 'Uploaded to', 'column name' ); + if ( post_type_supports( 'attachment', 'comments' ) ) + $posts_columns['comments'] = ''; + } + /* translators: column name */ + $posts_columns['date'] = _x( 'Date', 'column name' ); + /** + * Filter the Media list table columns. + * + * @since 2.5.0 + * + * @param array $posts_columns An array of columns displayed in the Media list table. + * @param bool $detached Whether the list table contains media not attached + * to any posts. Default true. + */ + $posts_columns = apply_filters( 'manage_media_columns', $posts_columns, $this->detached ); + + return $posts_columns; + } + + function get_sortable_columns() { + return array( + 'title' => 'title', + 'author' => 'author', + 'parent' => 'parent', + 'comments' => 'comment_count', + 'date' => array( 'date', true ), + ); + } + + function display_rows() { + global $post; + + add_filter( 'the_title','esc_html' ); + $alt = ''; + + while ( have_posts() ) : the_post(); + $user_can_edit = current_user_can( 'edit_post', $post->ID ); + + if ( $this->is_trash && $post->post_status != 'trash' + || !$this->is_trash && $post->post_status == 'trash' ) + continue; + + $alt = ( 'alternate' == $alt ) ? '' : 'alternate'; + $post_owner = ( get_current_user_id() == $post->post_author ) ? 'self' : 'other'; + $att_title = _draft_or_post_title(); +?> + post_status ); ?>'> +get_column_info(); +foreach ( $columns as $column_name => $column_display_name ) { + $class = "class='$column_name column-$column_name'"; + + $style = ''; + if ( in_array( $column_name, $hidden ) ) + $style = ' style="display:none;"'; + + $attributes = $class . $style; + + switch ( $column_name ) { + + case 'cb': +?> + + + + + + + + + +post_date ) { + $h_time = __( 'Unpublished' ); + } else { + $m_time = $post->post_date; + $time = get_post_time( 'G', true, $post, false ); + if ( ( abs( $t_diff = time() - $time ) ) < DAY_IN_SECONDS ) { + if ( $t_diff < 0 ) + $h_time = sprintf( __( '%s from now' ), human_time_diff( $time ) ); + else + $h_time = sprintf( __( '%s ago' ), human_time_diff( $time ) ); + } else { + $h_time = mysql2date( __( 'Y/m/d' ), $m_time ); + } + } +?> + +post_parent > 0 ) + $parent = get_post( $post->post_parent ); + else + $parent = false; + + if ( $parent ) { + $title = _draft_or_post_title( $post->post_parent ); + $parent_type = get_post_type_object( $parent->post_type ); +?> + + + + + +'; + if ( $terms = get_the_terms( $post->ID, $taxonomy ) ) { + $out = array(); + foreach ( $terms as $t ) { + $posts_in_term_qv = array(); + $posts_in_term_qv['taxonomy'] = $taxonomy; + $posts_in_term_qv['term'] = $t->slug; + + $out[] = sprintf( '%s', + esc_url( add_query_arg( $posts_in_term_qv, 'upload.php' ) ), + esc_html( sanitize_term_field( 'name', $t->name, $t->term_id, $taxonomy, 'display' ) ) + ); + } + /* translators: used between list items, there is a space after the comma */ + echo join( __( ', ' ), $out ); + } else { + echo '—'; + } + echo ''; + break; + } +?> + + + +detached ) { + if ( current_user_can( 'edit_post', $post->ID ) ) + $actions['edit'] = '' . __( 'Edit' ) . ''; + if ( current_user_can( 'delete_post', $post->ID ) ) + if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) { + $actions['trash'] = "ID ) . "'>" . __( 'Trash' ) . ""; + } else { + $delete_ays = !MEDIA_TRASH ? " onclick='return showNotice.warn();'" : ''; + $actions['delete'] = "ID ) . "'>" . __( 'Delete Permanently' ) . ""; + } + $actions['view'] = '' . __( 'View' ) . ''; + if ( current_user_can( 'edit_post', $post->ID ) ) + $actions['attach'] = ''.__( 'Attach' ).''; + } + else { + if ( current_user_can( 'edit_post', $post->ID ) && !$this->is_trash ) + $actions['edit'] = '' . __( 'Edit' ) . ''; + if ( current_user_can( 'delete_post', $post->ID ) ) { + if ( $this->is_trash ) + $actions['untrash'] = "ID ) . "'>" . __( 'Restore' ) . ""; + elseif ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) + $actions['trash'] = "ID ) . "'>" . __( 'Trash' ) . ""; + if ( $this->is_trash || !EMPTY_TRASH_DAYS || !MEDIA_TRASH ) { + $delete_ays = ( !$this->is_trash && !MEDIA_TRASH ) ? " onclick='return showNotice.warn();'" : ''; + $actions['delete'] = "ID ) . "'>" . __( 'Delete Permanently' ) . ""; + } + } + if ( !$this->is_trash ) { + $title =_draft_or_post_title( $post->post_parent ); + $actions['view'] = '' . __( 'View' ) . ''; + } + } + + /** + * Filter the action links for each attachment in the Media list table. + * + * @since 2.8.0 + * + * @param array $actions An array of action links for each attachment. + * Default 'Edit', 'Delete Permanently', 'View'. + * @param WP_Post $post WP_Post object for the current attachment. + * @param bool $detached Whether the list table contains media not attached + * to any posts. Default true. + */ + $actions = apply_filters( 'media_row_actions', $actions, $post, $this->detached ); + + 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 new file mode 100644 index 0000000..fcabfd7 --- /dev/null +++ b/wp-admin/includes/class-wp-ms-sites-list-table.php @@ -0,0 +1,388 @@ + 'sites', + 'screen' => isset( $args['screen'] ) ? $args['screen'] : null, + ) ); + } + + function ajax_user_can() { + return current_user_can( 'manage_sites' ); + } + + function prepare_items() { + global $s, $mode, $wpdb; + + $current_site = get_current_site(); + + $mode = ( empty( $_REQUEST['mode'] ) ) ? 'list' : $_REQUEST['mode']; + + $per_page = $this->get_items_per_page( 'sites_network_per_page' ); + + $pagenum = $this->get_pagenum(); + + $s = isset( $_REQUEST['s'] ) ? wp_unslash( trim( $_REQUEST[ 's' ] ) ) : ''; + $wild = ''; + if ( false !== strpos($s, '*') ) { + $wild = '%'; + $s = trim($s, '*'); + } + + $like_s = esc_sql( like_escape( $s ) ); + + // If the network is large and a search is not being performed, show only the latest blogs with no paging in order + // to avoid expensive count queries. + if ( !$s && wp_is_large_network() ) { + if ( !isset($_REQUEST['orderby']) ) + $_GET['orderby'] = $_REQUEST['orderby'] = ''; + if ( !isset($_REQUEST['order']) ) + $_GET['order'] = $_REQUEST['order'] = 'DESC'; + } + + $query = "SELECT * FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' "; + + if ( empty($s) ) { + // Nothing to do. + } elseif ( preg_match( '/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/', $s ) || + preg_match( '/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.?$/', $s ) || + preg_match( '/^[0-9]{1,3}\.[0-9]{1,3}\.?$/', $s ) || + preg_match( '/^[0-9]{1,3}\.$/', $s ) ) { + // IPv4 address + $reg_blog_ids = $wpdb->get_col( "SELECT blog_id FROM {$wpdb->registration_log} WHERE {$wpdb->registration_log}.IP LIKE ( '{$like_s}$wild' )" ); + + if ( !$reg_blog_ids ) + $reg_blog_ids = array( 0 ); + + $query = "SELECT * + FROM {$wpdb->blogs} + WHERE site_id = '{$wpdb->siteid}' + AND {$wpdb->blogs}.blog_id IN (" . implode( ', ', $reg_blog_ids ) . ")"; + } else { + if ( is_numeric($s) && empty( $wild ) ) { + $query .= " AND ( {$wpdb->blogs}.blog_id = '{$like_s}' )"; + } elseif ( is_subdomain_install() ) { + $blog_s = str_replace( '.' . $current_site->domain, '', $like_s ); + $blog_s .= $wild . '.' . $current_site->domain; + $query .= " AND ( {$wpdb->blogs}.domain LIKE '$blog_s' ) "; + } else { + if ( $like_s != trim('/', $current_site->path) ) + $blog_s = $current_site->path . $like_s . $wild . '/'; + else + $blog_s = $like_s; + $query .= " AND ( {$wpdb->blogs}.path LIKE '$blog_s' )"; + } + } + + $order_by = isset( $_REQUEST['orderby'] ) ? $_REQUEST['orderby'] : ''; + if ( $order_by == 'registered' ) { + $query .= ' ORDER BY registered '; + } elseif ( $order_by == 'lastupdated' ) { + $query .= ' ORDER BY last_updated '; + } elseif ( $order_by == 'blogname' ) { + if ( is_subdomain_install() ) + $query .= ' ORDER BY domain '; + else + $query .= ' ORDER BY path '; + } elseif ( $order_by == 'blog_id' ) { + $query .= ' ORDER BY blog_id '; + } else { + $order_by = null; + } + + if ( isset( $order_by ) ) { + $order = ( isset( $_REQUEST['order'] ) && 'DESC' == strtoupper( $_REQUEST['order'] ) ) ? "DESC" : "ASC"; + $query .= $order; + } + + // Don't do an unbounded count on large networks + if ( ! wp_is_large_network() ) + $total = $wpdb->get_var( str_replace( 'SELECT *', 'SELECT COUNT( blog_id )', $query ) ); + + $query .= " LIMIT " . intval( ( $pagenum - 1 ) * $per_page ) . ", " . intval( $per_page ); + $this->items = $wpdb->get_results( $query, ARRAY_A ); + + if ( wp_is_large_network() ) + $total = count($this->items); + + $this->set_pagination_args( array( + 'total_items' => $total, + 'per_page' => $per_page, + ) ); + } + + function no_items() { + _e( 'No sites found.' ); + } + + function get_bulk_actions() { + $actions = array(); + if ( current_user_can( 'delete_sites' ) ) + $actions['delete'] = __( 'Delete' ); + $actions['spam'] = _x( 'Mark as Spam', 'site' ); + $actions['notspam'] = _x( 'Not Spam', 'site' ); + + return $actions; + } + + function pagination( $which ) { + global $mode; + + parent::pagination( $which ); + + if ( 'top' == $which ) + $this->view_switcher( $mode ); + } + + function get_columns() { + $blogname_columns = ( is_subdomain_install() ) ? __( 'Domain' ) : __( 'Path' ); + $sites_columns = array( + 'cb' => '', + 'blogname' => $blogname_columns, + 'lastupdated' => __( 'Last Updated' ), + 'registered' => _x( 'Registered', 'site' ), + 'users' => __( 'Users' ) + ); + + if ( has_filter( 'wpmublogsaction' ) ) + $sites_columns['plugins'] = __( 'Actions' ); + + /** + * Filter the displayed site columns in Sites list table. + * + * @since MU + * + * @param array $sites_columns An array of displayed site columns. Default 'cb', + * 'blogname', 'lastupdated', 'registered', 'users'. + */ + $sites_columns = apply_filters( 'wpmu_blogs_columns', $sites_columns ); + + return $sites_columns; + } + + function get_sortable_columns() { + return array( + 'blogname' => 'blogname', + 'lastupdated' => 'lastupdated', + 'registered' => 'blog_id', + ); + } + + function display_rows() { + global $mode; + + $status_list = array( + 'archived' => array( 'site-archived', __( 'Archived' ) ), + 'spam' => array( 'site-spammed', _x( 'Spam', 'site' ) ), + 'deleted' => array( 'site-deleted', __( 'Deleted' ) ), + 'mature' => array( 'site-mature', __( 'Mature' ) ) + ); + + $class = ''; + foreach ( $this->items as $blog ) { + $class = ( 'alternate' == $class ) ? '' : 'alternate'; + reset( $status_list ); + + $blog_states = array(); + foreach ( $status_list as $status => $col ) { + if ( get_blog_status( $blog['blog_id'], $status ) == 1 ) { + $class = $col[0]; + $blog_states[] = $col[1]; + } + } + $blog_state = ''; + if ( ! empty( $blog_states ) ) { + $state_count = count( $blog_states ); + $i = 0; + $blog_state .= ' - '; + foreach ( $blog_states as $state ) { + ++$i; + ( $i == $state_count ) ? $sep = '' : $sep = ', '; + $blog_state .= "$state$sep"; + } + } + echo ""; + + $blogname = ( is_subdomain_install() ) ? str_replace( '.' . get_current_site()->domain, '', $blog['domain'] ) : $blog['path']; + + list( $columns, $hidden ) = $this->get_column_info(); + + foreach ( $columns as $column_name => $column_display_name ) { + $style = ''; + if ( in_array( $column_name, $hidden ) ) + $style = ' style="display:none;"'; + + switch ( $column_name ) { + case 'cb': ?> + + + + "; ?> + + ' . sprintf( _x( '%1$s – %2$s', '%1$s: site name. %2$s: site tagline.' ), get_option( 'blogname' ), get_option( 'blogdescription ' ) ) . '

'; + restore_current_blog(); + } + + // Preordered. + $actions = array( + 'edit' => '', 'backend' => '', + 'activate' => '', 'deactivate' => '', + 'archive' => '', 'unarchive' => '', + 'spam' => '', 'unspam' => '', + 'delete' => '', + 'visit' => '', + ); + + $actions['edit'] = '' . __( 'Edit' ) . ''; + $actions['backend'] = "" . __( 'Dashboard' ) . ''; + if ( get_current_site()->blog_id != $blog['blog_id'] ) { + if ( get_blog_status( $blog['blog_id'], 'deleted' ) == '1' ) + $actions['activate'] = '' . __( 'Activate' ) . ''; + else + $actions['deactivate'] = '' . __( 'Deactivate' ) . ''; + + if ( get_blog_status( $blog['blog_id'], 'archived' ) == '1' ) + $actions['unarchive'] = '' . __( 'Unarchive' ) . ''; + else + $actions['archive'] = '' . _x( 'Archive', 'verb; site' ) . ''; + + if ( get_blog_status( $blog['blog_id'], 'spam' ) == '1' ) + $actions['unspam'] = '' . _x( 'Not Spam', 'site' ) . ''; + else + $actions['spam'] = '' . _x( 'Spam', 'site' ) . ''; + + if ( current_user_can( 'delete_site', $blog['blog_id'] ) ) + $actions['delete'] = '' . __( 'Delete' ) . ''; + } + + $actions['visit'] = "" . __( 'Visit' ) . ''; + + /** + * Filter the action links displayed for each site in the Sites list table. + * + * The 'Edit', 'Dashboard', 'Delete', and 'Visit' links are displayed by + * default for each site. The site's status determines whether to show the + * 'Activate' or 'Deactivate' link, 'Unarchive' or 'Archive' links, and + * 'Not Spam' or 'Spam' link for each site. + * + * @since 3.1.0 + * + * @param array $actions An array of action links to be displayed. + * @param int $blog_id The site ID. + * @param string $blogname Site path, formatted depending on whether it is a sub-domain + * or subdirectory multisite install. + */ + $actions = apply_filters( 'manage_sites_action_links', array_filter( $actions ), $blog['blog_id'], $blogname ); + echo $this->row_actions( $actions ); + ?> + + "; + if ( 'list' == $mode ) + $date = 'Y/m/d'; + else + $date = 'Y/m/d \<\b\r \/\> g:i:s a'; + echo ( $blog['last_updated'] == '0000-00-00 00:00:00' ) ? __( 'Never' ) : mysql2date( $date, $blog['last_updated'] ); ?> + + "; + if ( $blog['registered'] == '0000-00-00 00:00:00' ) + echo '—'; + else + echo mysql2date( $date, $blog['registered'] ); + ?> + + "; + $blogusers = get_users( array( 'blog_id' => $blog['blog_id'], 'number' => 6) ); + if ( is_array( $blogusers ) ) { + $blogusers_warning = ''; + if ( count( $blogusers ) > 5 ) { + $blogusers = array_slice( $blogusers, 0, 5 ); + $blogusers_warning = __( 'Only showing first 5 users.' ) . ' ' . __( 'More' ) . ''; + } + foreach ( $blogusers as $user_object ) { + echo '' . esc_html( $user_object->user_login ) . ' '; + if ( 'list' != $mode ) + echo '( ' . $user_object->user_email . ' )'; + echo '
'; + } + if ( $blogusers_warning != '' ) + echo '' . $blogusers_warning . '
'; + } + ?> + + + "; + /** + * Fires inside the auxiliary 'Actions' column of the Sites list table. + * + * By default this column is hidden unless something is hooked to the action. + * + * @since MU + * + * @param int $blog_id The site ID. + */ + do_action( 'wpmublogsaction', $blog['blog_id'] ); ?> + + "; + /** + * Fires for each registered custom column in the Sites list table. + * + * @since 3.1.0 + * + * @param string $column_name The name of the column to display. + * @param int $blog_id The site ID. + */ + do_action( 'manage_sites_custom_column', $column_name, $blog['blog_id'] ); + echo ""; + break; + } + } + ?> + + 'themes', + 'screen' => isset( $args['screen'] ) ? $args['screen'] : null, + ) ); + + $status = isset( $_REQUEST['theme_status'] ) ? $_REQUEST['theme_status'] : 'all'; + if ( !in_array( $status, array( 'all', 'enabled', 'disabled', 'upgrade', 'search', 'broken' ) ) ) + $status = 'all'; + + $page = $this->get_pagenum(); + + $this->is_site_themes = ( 'site-themes-network' == $this->screen->id ) ? true : false; + + if ( $this->is_site_themes ) + $this->site_id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0; + } + + function get_table_classes() { + return array( 'widefat', 'plugins' ); // todo: remove and add CSS for .themes + } + + function ajax_user_can() { + if ( $this->is_site_themes ) + return current_user_can( 'manage_sites' ); + else + return current_user_can( 'manage_network_themes' ); + } + + function prepare_items() { + global $status, $totals, $page, $orderby, $order, $s; + + wp_reset_vars( array( 'orderby', 'order', 's' ) ); + + $themes = array( + /** + * Filter the full array of WP_Theme objects to list in the Multisite + * themes list table. + * + * @since 3.1.0 + * + * @param array $all An array of WP_Theme objects to display in the list table. + */ + 'all' => apply_filters( 'all_themes', wp_get_themes() ), + 'search' => array(), + 'enabled' => array(), + 'disabled' => array(), + 'upgrade' => array(), + 'broken' => $this->is_site_themes ? array() : wp_get_themes( array( 'errors' => true ) ), + ); + + 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'; + } + + $maybe_update = current_user_can( 'update_themes' ) && ! $this->is_site_themes && $current = get_site_transient( 'update_themes' ); + + foreach ( (array) $themes['all'] as $key => $theme ) { + if ( $this->is_site_themes && $theme->is_allowed( 'network' ) ) { + unset( $themes['all'][ $key ] ); + continue; + } + + if ( $maybe_update && isset( $current->response[ $key ] ) ) { + $themes['all'][ $key ]->update = true; + $themes['upgrade'][ $key ] = $themes['all'][ $key ]; + } + + $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( array_merge( $themes['all'], $themes['broken'] ), array( $this, '_search_callback' ) ); + } + + $totals = array(); + foreach ( $themes as $type => $list ) + $totals[ $type ] = count( $list ); + + if ( empty( $themes[ $status ] ) && !in_array( $status, array( 'all', 'search' ) ) ) + $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 ); + + 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, true ); + + $this->set_pagination_args( array( + 'total_items' => $total_this_page, + 'per_page' => $themes_per_page, + ) ); + } + + function _search_callback( $theme ) { + static $term; + if ( is_null( $term ) ) + $term = wp_unslash( $_REQUEST['s'] ); + + 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 ]; + + if ( $a == $b ) + return 0; + + if ( 'DESC' == $order ) + return ( $a < $b ) ? 1 : -1; + else + return ( $a < $b ) ? -1 : 1; + } + + function no_items() { + if ( ! $this->has_items ) + _e( 'No themes found.' ); + else + _e( 'You do not appear to have any themes available at this time.' ); + } + + function get_columns() { + global $status; + + return array( + 'cb' => '', + 'name' => __( 'Theme' ), + 'description' => __( 'Description' ), + ); + } + + function get_sortable_columns() { + return array( + 'name' => 'name', + ); + } + + function get_views() { + global $totals, $status; + + $status_links = array(); + foreach ( $totals as $type => $count ) { + if ( !$count ) + continue; + + switch ( $type ) { + case 'all': + $text = _nx( 'All (%s)', 'All (%s)', $count, 'themes' ); + break; + case 'enabled': + $text = _n( 'Enabled (%s)', 'Enabled (%s)', $count ); + break; + case 'disabled': + $text = _n( 'Disabled (%s)', 'Disabled (%s)', $count ); + break; + 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 ) + $url = 'site-themes.php?id=' . $this->site_id; + else + $url = 'themes.php'; + + if ( 'search' != $type ) { + $status_links[$type] = sprintf( "%s", + esc_url( add_query_arg('theme_status', $type, $url) ), + ( $type == $status ) ? ' class="current"' : '', + sprintf( $text, number_format_i18n( $count ) ) + ); + } + } + + return $status_links; + } + + function get_bulk_actions() { + global $status; + + $actions = array(); + if ( 'enabled' != $status ) + $actions['enable-selected'] = $this->is_site_themes ? __( 'Enable' ) : __( 'Network Enable' ); + if ( 'disabled' != $status ) + $actions['disable-selected'] = $this->is_site_themes ? __( 'Disable' ) : __( 'Network Disable' ); + if ( ! $this->is_site_themes ) { + if ( current_user_can( 'update_themes' ) ) + $actions['update-selected'] = __( 'Update' ); + if ( current_user_can( 'delete_themes' ) ) + $actions['delete-selected'] = __( 'Delete' ); + } + return $actions; + } + + function display_rows() { + foreach ( $this->items as $theme ) + $this->single_row( $theme ); + } + + function single_row( $theme ) { + global $status, $page, $s, $totals; + + $context = $status; + + if ( $this->is_site_themes ) { + $url = "site-themes.php?id={$this->site_id}&"; + $allowed = $theme->is_allowed( 'site', $this->site_id ); + } else { + $url = 'themes.php?'; + $allowed = $theme->is_allowed( 'network' ); + } + + // preorder + $actions = array( + 'enable' => '', + 'disable' => '', + 'edit' => '', + 'delete' => '' + ); + + $stylesheet = $theme->get_stylesheet(); + $theme_key = urlencode( $stylesheet ); + + 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') . ''; + + if ( ! $allowed && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $stylesheet != get_option( 'stylesheet' ) && $stylesheet != get_option( 'template' ) ) + $actions['delete'] = '' . __( 'Delete' ) . ''; + + /** + * Filter the action links displayed for each theme in the Multisite + * themes list table. + * + * The action links displayed are determined by the theme's status, and + * which Multisite themes list table is being displayed - the Network + * themes list table (themes.php), which displays all installed themes, + * or the Site themes list table (site-themes.php), which displays the + * non-network enabled themes when editing a site in the Network admin. + * + * The default action links for the Network themes list table include + * 'Network Enable', 'Network Disable', 'Edit', and 'Delete'. + * + * The default action links for the Site themes list table include + * 'Enable', 'Disable', and 'Edit'. + * + * @since 2.8.0 + * + * @param array $actions An array of action links. + * @param WP_Theme $theme The current WP_Theme object. + * @param string $context Status of the theme. + */ + $actions = apply_filters( 'theme_action_links', array_filter( $actions ), $theme, $context ); + + /** + * Filter the action links of a specific theme in the Multisite themes + * list table. + * + * The dynamic portion of the hook name, $stylesheet, refers to the + * directory name of the theme, which in most cases is synonymous + * with the template name. + * + * @since 3.1.0 + * + * @param array $actions An array of action links. + * @param WP_Theme $theme The current WP_Theme object. + * @param string $context Status of the theme. + */ + $actions = apply_filters( "theme_action_links_$stylesheet", $actions, $theme, $context ); + + $class = ! $allowed ? 'inactive' : 'active'; + $checkbox_id = "checkbox_" . md5( $theme->get('Name') ); + $checkbox = ""; + + $id = sanitize_html_class( $theme->get_stylesheet() ); + + if ( ! empty( $totals['upgrade'] ) && ! empty( $theme->update ) ) + $class .= ' update'; + + echo ""; + + list( $columns, $hidden ) = $this->get_column_info(); + + foreach ( $columns as $column_name => $column_display_name ) { + $style = ''; + if ( in_array( $column_name, $hidden ) ) + $style = ' style="display:none;"'; + + switch ( $column_name ) { + case 'cb': + echo ""; + break; + case 'name': + echo ""; + break; + case 'description': + echo ""; + break; + + default: + echo ""; + } + } + + echo ""; + + if ( $this->is_site_themes ) + remove_action( "after_theme_row_$stylesheet", 'wp_theme_update_row' ); + + /** + * Fires after each row in the Multisite themes list table. + * + * @since 3.1.0 + * + * @param string $stylesheet Directory name of the theme. + * @param WP_Theme $theme Current WP_Theme object. + * @param string $status Status of the theme. + */ + do_action( 'after_theme_row', $stylesheet, $theme, $status ); + + /** + * Fires after each specific row in the Multisite themes list table. + * + * The dynamic portion of the hook name, $stylesheet, refers to the + * directory name of the theme, most often synonymous with the template + * name of the theme. + * + * @since 3.5.0 + * + * @param string $stylesheet Directory name of the theme. + * @param WP_Theme $theme Current WP_Theme object. + * @param string $status Status of the theme. + */ + do_action( "after_theme_row_$stylesheet", $stylesheet, $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 new file mode 100644 index 0000000..df06406 --- /dev/null +++ b/wp-admin/includes/class-wp-ms-users-list-table.php @@ -0,0 +1,301 @@ +get_items_per_page( 'users_network_per_page' ); + + $role = isset( $_REQUEST['role'] ) ? $_REQUEST['role'] : ''; + + $paged = $this->get_pagenum(); + + $args = array( + 'number' => $users_per_page, + 'offset' => ( $paged-1 ) * $users_per_page, + 'search' => $usersearch, + 'blog_id' => 0, + 'fields' => 'all_with_meta' + ); + + if ( wp_is_large_network( 'users' ) ) + $args['search'] = ltrim( $args['search'], '*' ); + + if ( $role == 'super' ) { + $logins = implode( "', '", get_super_admins() ); + $args['include'] = $wpdb->get_col( "SELECT ID FROM $wpdb->users WHERE user_login IN ('$logins')" ); + } + + // If the network is large and a search is not being performed, show only the latest users with no paging in order + // to avoid expensive count queries. + if ( !$usersearch && wp_is_large_network( 'users' ) ) { + if ( !isset($_REQUEST['orderby']) ) + $_GET['orderby'] = $_REQUEST['orderby'] = 'id'; + if ( !isset($_REQUEST['order']) ) + $_GET['order'] = $_REQUEST['order'] = 'DESC'; + $args['count_total'] = false; + } + + if ( isset( $_REQUEST['orderby'] ) ) + $args['orderby'] = $_REQUEST['orderby']; + + if ( isset( $_REQUEST['order'] ) ) + $args['order'] = $_REQUEST['order']; + + $mode = empty( $_REQUEST['mode'] ) ? 'list' : $_REQUEST['mode']; + + // Query the user IDs for this page + $wp_user_search = new WP_User_Query( $args ); + + $this->items = $wp_user_search->get_results(); + + $this->set_pagination_args( array( + 'total_items' => $wp_user_search->get_total(), + 'per_page' => $users_per_page, + ) ); + } + + function get_bulk_actions() { + $actions = array(); + if ( current_user_can( 'delete_users' ) ) + $actions['delete'] = __( 'Delete' ); + $actions['spam'] = _x( 'Mark as Spam', 'user' ); + $actions['notspam'] = _x( 'Not Spam', 'user' ); + + return $actions; + } + + function no_items() { + _e( 'No users found.' ); + } + + function get_views() { + global $wp_roles, $role; + + $total_users = get_user_count(); + $super_admins = get_super_admins(); + $total_admins = count( $super_admins ); + + $current_role = false; + $class = $role != 'super' ? ' class="current"' : ''; + $role_links = array(); + $role_links['all'] = "" . sprintf( _nx( 'All (%s)', 'All (%s)', $total_users, 'users' ), number_format_i18n( $total_users ) ) . ''; + $class = $role == 'super' ? ' class="current"' : ''; + $role_links['super'] = "" . sprintf( _n( 'Super Admin (%s)', 'Super Admins (%s)', $total_admins ), number_format_i18n( $total_admins ) ) . ''; + + return $role_links; + } + + function pagination( $which ) { + global $mode; + + parent::pagination ( $which ); + + if ( 'top' == $which ) + $this->view_switcher( $mode ); + } + + function get_columns() { + $users_columns = array( + 'cb' => '', + 'username' => __( 'Username' ), + 'name' => __( 'Name' ), + 'email' => __( 'E-mail' ), + 'registered' => _x( 'Registered', 'user' ), + 'blogs' => __( 'Sites' ) + ); + /** + * Filter the columns displayed in the Network Admin Users list table. + * + * @since MU + * + * @param array $users_columns An array of user columns. Default 'cb', 'username', + * 'name', 'email', 'registered', 'blogs'. + */ + $users_columns = apply_filters( 'wpmu_users_columns', $users_columns ); + + return $users_columns; + } + + function get_sortable_columns() { + return array( + 'username' => 'login', + 'name' => 'name', + 'email' => 'email', + 'registered' => 'id', + ); + } + + function display_rows() { + global $mode; + + $alt = ''; + $super_admins = get_super_admins(); + foreach ( $this->items as $user ) { + $alt = ( 'alternate' == $alt ) ? '' : 'alternate'; + + $status_list = array( 'spam' => 'site-spammed', 'deleted' => 'site-deleted' ); + + foreach ( $status_list as $status => $col ) { + if ( $user->$status ) + $alt .= " $col"; + } + + ?> + + get_column_info(); + + foreach ( $columns as $column_name => $column_display_name ) : + $class = "class='$column_name column-$column_name'"; + + $style = ''; + if ( in_array( $column_name, $hidden ) ) + $style = ' style="display:none;"'; + + $attributes = "$class$style"; + + switch ( $column_name ) { + case 'cb': ?> + + user_email, 32 ); + $edit_link = esc_url( add_query_arg( 'wp_http_referer', urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ), get_edit_user_link( $user->ID ) ) ); + + echo " + $user->first_name $user->last_name"; + break; + + case 'email': + echo ""; + break; + + case 'registered': + if ( 'list' == $mode ) + $date = 'Y/m/d'; + else + $date = 'Y/m/d \<\b\r \/\> g:i:s a'; + + echo ""; + break; + + case 'blogs': + $blogs = get_blogs_of_user( $user->ID, true ); + echo " + "; + /** This filter is documented in wp-admin/includes/class-wp-users-list-table.php */ + echo apply_filters( 'manage_users_custom_column', '', $column_name, $user->ID ); + echo ""; + break; + } + endforeach + ?> + + get_pagenum(); + + $per_page = 30; + + // These are the tabs which are shown on the page + $tabs = array(); + $tabs['dashboard'] = __( 'Search' ); + if ( 'search' == $tab ) + $tabs['search'] = __( 'Search Results' ); + $tabs['upload'] = __( 'Upload' ); + $tabs['featured'] = _x( 'Featured', 'Plugin Installer' ); + $tabs['popular'] = _x( 'Popular', 'Plugin Installer' ); + $tabs['new'] = _x( 'Newest', 'Plugin Installer' ); + $tabs['favorites'] = _x( 'Favorites', 'Plugin Installer' ); + + $nonmenu_tabs = array( 'plugin-information' ); //Valid actions to perform which do not have a Menu item. + + /** + * Filter the tabs shown on the Plugin Install screen. + * + * @since 2.7.0 + * + * @param array $tabs The tabs shown on the Plugin Install screen. Defaults are 'dashboard', 'search', + * 'upload', 'featured', 'popular', 'new', and 'favorites'. + */ + $tabs = apply_filters( 'install_plugins_tabs', $tabs ); + + /** + * Filter tabs not associated with a menu item on the Plugin Install screen. + * + * @since 2.7.0 + * + * @param array $nonmenu_tabs The tabs that don't have a Menu item on the Plugin Install screen. + */ + $nonmenu_tabs = apply_filters( 'install_plugins_nonmenu_tabs', $nonmenu_tabs ); + + // If a non-valid menu tab has been selected, And it's not a non-menu action. + if ( empty( $tab ) || ( !isset( $tabs[ $tab ] ) && !in_array( $tab, (array) $nonmenu_tabs ) ) ) + $tab = key( $tabs ); + + $args = array( 'page' => $paged, 'per_page' => $per_page ); + + switch ( $tab ) { + case 'search': + $type = isset( $_REQUEST['type'] ) ? wp_unslash( $_REQUEST['type'] ) : 'term'; + $term = isset( $_REQUEST['s'] ) ? wp_unslash( $_REQUEST['s'] ) : ''; + + switch ( $type ) { + case 'tag': + $args['tag'] = sanitize_title_with_dashes( $term ); + break; + case 'term': + $args['search'] = $term; + break; + case 'author': + $args['author'] = $term; + break; + } + + add_action( 'install_plugins_table_header', 'install_search_form', 10, 0 ); + break; + + case 'featured': + case 'popular': + case 'new': + $args['browse'] = $tab; + break; + + case 'favorites': + $user = isset( $_GET['user'] ) ? wp_unslash( $_GET['user'] ) : get_user_option( 'wporg_favorites' ); + update_user_meta( get_current_user_id(), 'wporg_favorites', $user ); + if ( $user ) + $args['user'] = $user; + else + $args = false; + + add_action( 'install_plugins_favorites', 'install_plugins_favorites_form', 9, 0 ); + break; + + default: + $args = false; + break; + } + + /** + * Filter API request arguments for each Plugin Install screen tab. + * + * The dynamic portion of the hook name, $tab, refers to the plugin install tabs. + * Default tabs are 'dashboard', 'search', 'upload', 'featured', 'popular', 'new', + * and 'favorites'. + * + * @since 3.7.0 + * + * @param array|bool $args Plugin Install API arguments. + */ + $args = apply_filters( "install_plugins_table_api_args_$tab", $args ); + + if ( !$args ) + return; + + $api = plugins_api( 'query_plugins', $args ); + + if ( is_wp_error( $api ) ) + wp_die( $api->get_error_message() . '

' . __( 'Try again' ) . '' ); + + $this->items = $api->plugins; + + $this->set_pagination_args( array( + 'total_items' => $api->info['results'], + 'per_page' => $args['per_page'], + ) ); + } + + function no_items() { + _e( 'No plugins match your request.' ); + } + + function get_views() { + global $tabs, $tab; + + $display_tabs = array(); + foreach ( (array) $tabs as $action => $text ) { + $class = ( $action == $tab ) ? ' class="current"' : ''; + $href = self_admin_url('plugin-install.php?tab=' . $action); + $display_tabs['plugin-install-'.$action] = "$text"; + } + + return $display_tabs; + } + + function display_tablenav( $which ) { + if ( 'top' == $which ) { ?> +

+
+ +
+ pagination( $which ); ?> +
+
+ +
+ pagination( $which ); ?> +
+
+ _args ); + + return array( 'widefat', $plural ); + } + + function get_columns() { + return array( + 'name' => _x( 'Name', 'plugin name' ), + 'version' => __( 'Version' ), + 'rating' => __( 'Rating' ), + 'description' => __( 'Description' ), + ); + } + + function display_rows() { + $plugins_allowedtags = array( + 'a' => array( 'href' => array(),'title' => array(), 'target' => array() ), + 'abbr' => array( 'title' => array() ),'acronym' => array( 'title' => array() ), + 'code' => array(), 'pre' => array(), 'em' => array(),'strong' => array(), + 'ul' => array(), 'ol' => array(), 'li' => array(), 'p' => array(), 'br' => array() + ); + + list( $columns, $hidden ) = $this->get_column_info(); + + $style = array(); + foreach ( $columns as $column_name => $column_display_name ) { + $style[ $column_name ] = in_array( $column_name, $hidden ) ? 'style="display:none;"' : ''; + } + + foreach ( (array) $this->items as $plugin ) { + if ( is_object( $plugin ) ) + $plugin = (array) $plugin; + + $title = wp_kses( $plugin['name'], $plugins_allowedtags ); + //Limit description to 400char, and remove any HTML. + $description = strip_tags( $plugin['description'] ); + if ( strlen( $description ) > 400 ) + $description = mb_substr( $description, 0, 400 ) . '…'; + //remove any trailing entities + $description = preg_replace( '/&[^;\s]{0,6}$/', '', $description ); + //strip leading/trailing & multiple consecutive lines + $description = trim( $description ); + $description = preg_replace( "|(\r?\n)+|", "\n", $description ); + //\n =>
+ $description = nl2br( $description ); + $version = wp_kses( $plugin['version'], $plugins_allowedtags ); + + $name = strip_tags( $title . ' ' . $version ); + + $author = $plugin['author']; + if ( ! empty( $plugin['author'] ) ) + $author = ' ' . sprintf( __( 'By %s' ), $author ) . '.'; + + $author = wp_kses( $author, $plugins_allowedtags ); + + $action_links = array(); + $action_links[] = '' . __( 'Details' ) . ''; + + if ( current_user_can( 'install_plugins' ) || current_user_can( 'update_plugins' ) ) { + $status = install_plugin_install_status( $plugin ); + + switch ( $status['status'] ) { + case 'install': + if ( $status['url'] ) + $action_links[] = '' . __( 'Install Now' ) . ''; + break; + case 'update_available': + if ( $status['url'] ) + $action_links[] = '' . __( 'Update Now' ) . ''; + break; + case 'latest_installed': + case 'newer_installed': + $action_links[] = '' . _x( 'Installed', 'plugin' ) . ''; + break; + } + } + + /** + * Filter the install action links for a plugin. + * + * @since 2.7.0 + * + * @param array $action_links An array of plugin action hyperlinks. Defaults are links to Details and Install Now. + * @param array $plugin The plugin currently being listed. + */ + $action_links = apply_filters( 'plugin_install_action_links', $action_links, $plugin ); + ?> + + + + + + + 'plugins', + 'screen' => isset( $args['screen'] ) ? $args['screen'] : null, + ) ); + + $status = 'all'; + 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']) ) + $_SERVER['REQUEST_URI'] = add_query_arg('s', wp_unslash($_REQUEST['s']) ); + + $page = $this->get_pagenum(); + } + + function get_table_classes() { + return array( 'widefat', $this->_args['plural'] ); + } + + function ajax_user_can() { + return current_user_can('activate_plugins'); + } + + function prepare_items() { + global $status, $plugins, $totals, $page, $orderby, $order, $s; + + wp_reset_vars( array( 'orderby', 'order', 's' ) ); + + /** + * Filter the full array of plugins to list in the Plugins list table. + * + * @since 3.0.0 + * + * @see get_plugins() + * + * @param array $plugins An array of plugins to display in the list table. + */ + $plugins = array( + 'all' => apply_filters( 'all_plugins', get_plugins() ), + 'search' => array(), + 'active' => array(), + 'inactive' => array(), + 'recently_activated' => array(), + 'upgrade' => array(), + 'mustuse' => array(), + 'dropins' => array() + ); + + $screen = $this->screen; + + if ( ! is_multisite() || ( $screen->in_admin( 'network' ) && current_user_can( 'manage_network_plugins' ) ) ) { + + /** + * Filter whether to display the advanced plugins list table. + * + * There are two types of advanced plugins - must-use and drop-ins - + * which can be used in a single site or Multisite network. + * + * The $type parameter allows you to differentiate between the type of advanced + * plugins to filter the display of. Contexts include 'mustuse' and 'dropins'. + * + * @since 3.0.0 + * + * @param bool $show Whether to show the advanced plugins for the specified + * plugin type. Default true. + * @param string $type The plugin type. Accepts 'mustuse', 'dropins'. + */ + if ( apply_filters( 'show_advanced_plugins', true, 'mustuse' ) ) { + $plugins['mustuse'] = get_mu_plugins(); + } + + /** This action is documented in wp-admin/includes/class-wp-plugins-list-table.php */ + if ( apply_filters( 'show_advanced_plugins', true, 'dropins' ) ) + $plugins['dropins'] = get_dropins(); + + 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'] ), DAY_IN_SECONDS ); + + if ( ! $screen->in_admin( 'network' ) ) { + $recently_activated = get_option( 'recently_activated', array() ); + + foreach ( $recently_activated as $key => $time ) + if ( $time + WEEK_IN_SECONDS < 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() && ! $screen->in_admin( 'network' ) && is_network_only_plugin( $plugin_file ) && ! is_plugin_active( $plugin_file ) ) { + // On the non-network screen, filter out network-only plugins as long as they're not individually activated + unset( $plugins['all'][ $plugin_file ] ); + } elseif ( ! $screen->in_admin( 'network' ) && is_plugin_active_for_network( $plugin_file ) ) { + // On the non-network screen, filter out network activated plugins + unset( $plugins['all'][ $plugin_file ] ); + } elseif ( ( ! $screen->in_admin( 'network' ) && is_plugin_active( $plugin_file ) ) + || ( $screen->in_admin( 'network' ) && is_plugin_active_for_network( $plugin_file ) ) ) { + // On the non-network screen, populate the active list with plugins that are individually activated + // On the network-admin screen, populate the active list with plugins that are network activated + $plugins['active'][ $plugin_file ] = $plugin_data; + } else { + if ( ! $screen->in_admin( 'network' ) && isset( $recently_activated[ $plugin_file ] ) ) { + // On the non-network screen, populate the recently activated list with plugins that have been recently activated + $plugins['recently_activated'][ $plugin_file ] = $plugin_data; + } + // Populate the inactive list with plugins that aren't activated + $plugins['inactive'][ $plugin_file ] = $plugin_data; + } + } + + if ( $s ) { + $status = 'search'; + $plugins['search'] = array_filter( $plugins['all'], array( $this, '_search_callback' ) ); + } + + $totals = array(); + foreach ( $plugins as $type => $list ) + $totals[ $type ] = count( $list ); + + if ( empty( $plugins[ $status ] ) && !in_array( $status, array( 'all', 'search' ) ) ) + $status = 'all'; + + $this->items = array(); + foreach ( $plugins[ $status ] as $plugin_file => $plugin_data ) { + // Translate, Don't Apply Markup, Sanitize HTML + $this->items[$plugin_file] = _get_plugin_data_markup_translate( $plugin_file, $plugin_data, false, true ); + } + + $total_this_page = $totals[ $status ]; + + if ( $orderby ) { + $orderby = ucfirst( $orderby ); + $order = strtoupper( $order ); + + uasort( $this->items, array( $this, '_order_callback' ) ); + } + + $plugins_per_page = $this->get_items_per_page( str_replace( '-', '_', $screen->id . '_per_page' ), 999 ); + + $start = ( $page - 1 ) * $plugins_per_page; + + if ( $total_this_page > $plugins_per_page ) + $this->items = array_slice( $this->items, $start, $plugins_per_page ); + + $this->set_pagination_args( array( + 'total_items' => $total_this_page, + 'per_page' => $plugins_per_page, + ) ); + } + + function _search_callback( $plugin ) { + static $term; + if ( is_null( $term ) ) + $term = wp_unslash( $_REQUEST['s'] ); + + foreach ( $plugin as $value ) { + if ( false !== stripos( strip_tags( $value ), $term ) ) { + return true; + } + } + + return false; + } + + function _order_callback( $plugin_a, $plugin_b ) { + global $orderby, $order; + + $a = $plugin_a[$orderby]; + $b = $plugin_b[$orderby]; + + if ( $a == $b ) + return 0; + + if ( 'DESC' == $order ) + return ( $a < $b ) ? 1 : -1; + else + return ( $a < $b ) ? -1 : 1; + } + + function no_items() { + global $plugins; + + if ( !empty( $plugins['all'] ) ) + _e( 'No plugins found.' ); + else + _e( 'You do not appear to have any plugins available at this time.' ); + } + + function get_columns() { + global $status; + + return array( + 'cb' => !in_array( $status, array( 'mustuse', 'dropins' ) ) ? '' : '', + 'name' => __( 'Plugin' ), + 'description' => __( 'Description' ), + ); + } + + function get_sortable_columns() { + return array(); + } + + function get_views() { + global $totals, $status; + + $status_links = array(); + foreach ( $totals as $type => $count ) { + if ( !$count ) + continue; + + switch ( $type ) { + case 'all': + $text = _nx( 'All (%s)', 'All (%s)', $count, 'plugins' ); + break; + case 'active': + $text = _n( 'Active (%s)', 'Active (%s)', $count ); + break; + case 'recently_activated': + $text = _n( 'Recently Active (%s)', 'Recently Active (%s)', $count ); + break; + case 'inactive': + $text = _n( 'Inactive (%s)', 'Inactive (%s)', $count ); + break; + case 'mustuse': + $text = _n( 'Must-Use (%s)', 'Must-Use (%s)', $count ); + break; + case 'dropins': + $text = _n( 'Drop-ins (%s)', 'Drop-ins (%s)', $count ); + break; + case 'upgrade': + $text = _n( 'Update Available (%s)', 'Update Available (%s)', $count ); + break; + } + + if ( 'search' != $type ) { + $status_links[$type] = sprintf( "%s", + add_query_arg('plugin_status', $type, 'plugins.php'), + ( $type == $status ) ? ' class="current"' : '', + sprintf( $text, number_format_i18n( $count ) ) + ); + } + } + + return $status_links; + } + + function get_bulk_actions() { + global $status; + + $actions = array(); + + if ( 'active' != $status ) + $actions['activate-selected'] = $this->screen->in_admin( 'network' ) ? __( 'Network Activate' ) : __( 'Activate' ); + + if ( 'inactive' != $status && 'recent' != $status ) + $actions['deactivate-selected'] = $this->screen->in_admin( 'network' ) ? __( 'Network Deactivate' ) : __( 'Deactivate' ); + + if ( !is_multisite() || $this->screen->in_admin( 'network' ) ) { + if ( current_user_can( 'update_plugins' ) ) + $actions['update-selected'] = __( 'Update' ); + if ( current_user_can( 'delete_plugins' ) && ( 'active' != $status ) ) + $actions['delete-selected'] = __( 'Delete' ); + } + + return $actions; + } + + function bulk_actions() { + global $status; + + if ( in_array( $status, array( 'mustuse', 'dropins' ) ) ) + return; + + parent::bulk_actions(); + } + + function extra_tablenav( $which ) { + global $status; + + if ( ! in_array($status, array('recently_activated', 'mustuse', 'dropins') ) ) + return; + + echo '
'; + + if ( ! $this->screen->in_admin( 'network' ) && 'recently_activated' == $status ) + submit_button( __( 'Clear List' ), 'button', '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 ) ) . '

'; + elseif ( 'top' == $which && 'dropins' == $status ) + echo '

' . sprintf( __( 'Drop-ins are advanced plugins in the %s directory that replace WordPress functionality when present.' ), str_replace( ABSPATH, '', WP_CONTENT_DIR ) ) . '

'; + + echo '
'; + } + + function current_action() { + if ( isset($_POST['clear-recent-list']) ) + return 'clear-recent-list'; + + return parent::current_action(); + } + + function display_rows() { + global $status; + + if ( is_multisite() && ! $this->screen->in_admin( 'network' ) && in_array( $status, array( 'mustuse', 'dropins' ) ) ) + return; + + foreach ( $this->items as $plugin_file => $plugin_data ) + $this->single_row( array( $plugin_file, $plugin_data ) ); + } + + function single_row( $item ) { + global $status, $page, $s, $totals; + + list( $plugin_file, $plugin_data ) = $item; + $context = $status; + $screen = $this->screen; + + // preorder + $actions = array( + 'deactivate' => '', + 'activate' => '', + 'edit' => '', + 'delete' => '', + ); + + if ( 'mustuse' == $context ) { + $is_active = true; + } elseif ( 'dropins' == $context ) { + $dropins = _get_dropins(); + $plugin_name = $plugin_file; + if ( $plugin_file != $plugin_data['Name'] ) + $plugin_name .= '
' . $plugin_data['Name']; + if ( true === ( $dropins[ $plugin_file ][1] ) ) { // Doesn't require a constant + $is_active = true; + $description = '

' . $dropins[ $plugin_file ][0] . '

'; + } elseif ( defined( $dropins[ $plugin_file ][1] ) && constant( $dropins[ $plugin_file ][1] ) ) { // Constant is true + $is_active = true; + $description = '

' . $dropins[ $plugin_file ][0] . '

'; + } else { + $is_active = false; + $description = '

' . $dropins[ $plugin_file ][0] . ' ' . __('Inactive:') . ' ' . sprintf( __( 'Requires %s in wp-config.php.' ), "define('" . $dropins[ $plugin_file ][1] . "', true);" ) . '

'; + } + if ( $plugin_data['Description'] ) + $description .= '

' . $plugin_data['Description'] . '

'; + } else { + if ( $screen->in_admin( 'network' ) ) + $is_active = is_plugin_active_for_network( $plugin_file ); + else + $is_active = is_plugin_active( $plugin_file ); + + if ( $screen->in_admin( 'network' ) ) { + if ( $is_active ) { + if ( current_user_can( 'manage_network_plugins' ) ) + $actions['deactivate'] = '' . __('Network Deactivate') . ''; + } else { + if ( current_user_can( 'manage_network_plugins' ) ) + $actions['activate'] = '' . __('Network Activate') . ''; + if ( current_user_can( 'delete_plugins' ) && ! is_plugin_active( $plugin_file ) ) + $actions['delete'] = '' . __('Delete') . ''; + } + } else { + if ( $is_active ) { + $actions['deactivate'] = '' . __('Deactivate') . ''; + } else { + $actions['activate'] = '' . __('Activate') . ''; + + if ( ! is_multisite() && current_user_can('delete_plugins') ) + $actions['delete'] = '' . __('Delete') . ''; + } // end if $is_active + } // end if $screen->in_admin( 'network' ) + + if ( ( ! is_multisite() || $screen->in_admin( 'network' ) ) && current_user_can('edit_plugins') && is_writable(WP_PLUGIN_DIR . '/' . $plugin_file) ) + $actions['edit'] = '' . __('Edit') . ''; + } // end if $context + + $prefix = $screen->in_admin( 'network' ) ? 'network_admin_' : ''; + + /** + * Filter the action links displayed for each plugin in the Plugins list table. + * + * The dynamic portion of the hook name, $prefix, refers to the context the + * action links are displayed in. The 'network_admin_' prefix is used if the + * current screen is the Network plugins list table. The prefix is empty ('') + * if the current screen is the site plugins list table. + * + * The default action links for the Network plugins list table include + * 'Network Activate', 'Network Deactivate', 'Edit', and 'Delete'. + * + * The default action links for the site plugins list table include + * 'Activate', 'Deactivate', and 'Edit', for a network site, and + * 'Activate', 'Deactivate', 'Edit', and 'Delete' for a single site. + * + * @since 2.5.0 + * + * @param array $actions An array of plugin action links. + * @param string $plugin_file Path to the plugin file. + * @param array $plugin_data An array of plugin data. + * @param string $context The plugin context. Defaults are 'All', 'Active', + * 'Inactive', 'Recently Activated', 'Upgrade', + * 'Must-Use', 'Drop-ins', 'Search'. + */ + $actions = apply_filters( $prefix . 'plugin_action_links', array_filter( $actions ), $plugin_file, $plugin_data, $context ); + + /** + * Filter the list of action links displayed for a specific plugin. + * + * The first dynamic portion of the hook name, $prefix, refers to the context + * the action links are displayed in. The 'network_admin_' prefix is used if the + * current screen is the Network plugins list table. The prefix is empty ('') + * if the current screen is the site plugins list table. + * + * The second dynamic portion of the hook name, $plugin_file, refers to the path + * to the plugin file, relative to the plugins directory. + * + * @since 2.7.0 + * + * @param array $actions An array of plugin action links. + * @param string $plugin_file Path to the plugin file. + * @param array $plugin_data An array of plugin data. + * @param string $context The plugin context. Defaults are 'All', 'Active', + * 'Inactive', 'Recently Activated', 'Upgrade', + * 'Must-Use', 'Drop-ins', 'Search'. + */ + $actions = apply_filters( $prefix . "plugin_action_links_$plugin_file", $actions, $plugin_file, $plugin_data, $context ); + + $class = $is_active ? 'active' : 'inactive'; + $checkbox_id = "checkbox_" . md5($plugin_data['Name']); + if ( in_array( $status, array( 'mustuse', 'dropins' ) ) ) { + $checkbox = ''; + } else { + $checkbox = "" + . ""; + } + if ( 'dropins' != $context ) { + $description = '

' . ( $plugin_data['Description'] ? $plugin_data['Description'] : ' ' ) . '

'; + $plugin_name = $plugin_data['Name']; + } + + $id = sanitize_title( $plugin_name ); + if ( ! empty( $totals['upgrade'] ) && ! empty( $plugin_data['update'] ) ) + $class .= ' update'; + + echo ""; + + list( $columns, $hidden ) = $this->get_column_info(); + + foreach ( $columns as $column_name => $column_display_name ) { + $style = ''; + if ( in_array( $column_name, $hidden ) ) + $style = ' style="display:none;"'; + + switch ( $column_name ) { + case 'cb': + echo ""; + break; + case 'name': + echo ""; + break; + case 'description': + echo ""; + break; + default: + echo ""; + } + } + + echo ""; + + /** + * Fires after each row in the Plugins list table. + * + * @since 2.3.0 + * + * @param string $plugin_file Path to the plugin file, relative to the plugins directory. + * @param array $plugin_data An array of plugin data. + * @param string $status Status of the plugin. Defaults are 'All', 'Active', + * 'Inactive', 'Recently Activated', 'Upgrade', 'Must-Use', + * 'Drop-ins', 'Search'. + */ + do_action( 'after_plugin_row', $plugin_file, $plugin_data, $status ); + + /** + * Fires after each specific row in the Plugins list table. + * + * The dynamic portion of the hook name, $plugin_file, refers to the path + * to the plugin file, relative to the plugins directory. + * + * @since 2.7.0 + * + * @param string $plugin_file Path to the plugin file, relative to the plugins directory. + * @param array $plugin_data An array of plugin data. + * @param string $status Status of the plugin. Defaults are 'All', 'Active', + * 'Inactive', 'Recently Activated', 'Upgrade', 'Must-Use', + * 'Drop-ins', 'Search'. + */ + 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 new file mode 100644 index 0000000..1e763f2 --- /dev/null +++ b/wp-admin/includes/class-wp-posts-list-table.php @@ -0,0 +1,1286 @@ + 'posts', + 'screen' => isset( $args['screen'] ) ? $args['screen'] : null, + ) ); + + $post_type = $this->screen->post_type; + $post_type_object = get_post_type_object( $post_type ); + + if ( !current_user_can( $post_type_object->cap->edit_others_posts ) ) { + $exclude_states = get_post_stati( array( 'show_in_admin_all_list' => false ) ); + $this->user_posts_count = $wpdb->get_var( $wpdb->prepare( " + SELECT COUNT( 1 ) FROM $wpdb->posts + WHERE post_type = %s AND post_status NOT IN ( '" . implode( "','", $exclude_states ) . "' ) + AND post_author = %d + ", $post_type, get_current_user_id() ) ); + + if ( $this->user_posts_count && empty( $_REQUEST['post_status'] ) && empty( $_REQUEST['all_posts'] ) && empty( $_REQUEST['author'] ) && empty( $_REQUEST['show_sticky'] ) ) + $_GET['author'] = get_current_user_id(); + } + + if ( 'post' == $post_type && $sticky_posts = get_option( 'sticky_posts' ) ) { + $sticky_posts = implode( ', ', array_map( 'absint', (array) $sticky_posts ) ); + $this->sticky_posts_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT( 1 ) FROM $wpdb->posts WHERE post_type = %s AND post_status NOT IN ('trash', 'auto-draft') AND ID IN ($sticky_posts)", $post_type ) ); + } + } + + function ajax_user_can() { + return current_user_can( get_post_type_object( $this->screen->post_type )->cap->edit_posts ); + } + + function prepare_items() { + global $avail_post_stati, $wp_query, $per_page, $mode; + + $avail_post_stati = wp_edit_posts_query(); + + $this->hierarchical_display = ( is_post_type_hierarchical( $this->screen->post_type ) && 'menu_order title' == $wp_query->query['orderby'] ); + + $total_items = $this->hierarchical_display ? $wp_query->post_count : $wp_query->found_posts; + + $post_type = $this->screen->post_type; + $per_page = $this->get_items_per_page( 'edit_' . $post_type . '_per_page' ); + + /** This filter is documented in wp-admin/includes/post.php */ + $per_page = apply_filters( 'edit_posts_per_page', $per_page, $post_type ); + + if ( $this->hierarchical_display ) + $total_pages = ceil( $total_items / $per_page ); + else + $total_pages = $wp_query->max_num_pages; + + $mode = empty( $_REQUEST['mode'] ) ? 'list' : $_REQUEST['mode']; + + $this->is_trash = isset( $_REQUEST['post_status'] ) && $_REQUEST['post_status'] == 'trash'; + + $this->set_pagination_args( array( + 'total_items' => $total_items, + 'total_pages' => $total_pages, + 'per_page' => $per_page + ) ); + } + + function has_items() { + return have_posts(); + } + + function no_items() { + if ( isset( $_REQUEST['post_status'] ) && 'trash' == $_REQUEST['post_status'] ) + echo get_post_type_object( $this->screen->post_type )->labels->not_found_in_trash; + else + echo get_post_type_object( $this->screen->post_type )->labels->not_found; + } + + function get_views() { + global $locked_post_status, $avail_post_stati; + + $post_type = $this->screen->post_type; + + if ( !empty($locked_post_status) ) + return array(); + + $status_links = array(); + $num_posts = wp_count_posts( $post_type, 'readable' ); + $class = ''; + $allposts = ''; + + $current_user_id = get_current_user_id(); + + if ( $this->user_posts_count ) { + if ( isset( $_GET['author'] ) && ( $_GET['author'] == $current_user_id ) ) + $class = ' class="current"'; + $status_links['mine'] = "" . sprintf( _nx( 'Mine (%s)', 'Mine (%s)', $this->user_posts_count, 'posts' ), number_format_i18n( $this->user_posts_count ) ) . ''; + $allposts = '&all_posts=1'; + } + + $total_posts = array_sum( (array) $num_posts ); + + // Subtract post types that are not included in the admin all list. + foreach ( get_post_stati( array('show_in_admin_all_list' => false) ) as $state ) + $total_posts -= $num_posts->$state; + + $class = empty( $class ) && empty( $_REQUEST['post_status'] ) && empty( $_REQUEST['show_sticky'] ) ? ' class="current"' : ''; + $status_links['all'] = "" . sprintf( _nx( 'All (%s)', 'All (%s)', $total_posts, 'posts' ), number_format_i18n( $total_posts ) ) . ''; + + foreach ( get_post_stati(array('show_in_admin_status_list' => true), 'objects') as $status ) { + $class = ''; + + $status_name = $status->name; + + if ( !in_array( $status_name, $avail_post_stati ) ) + continue; + + if ( empty( $num_posts->$status_name ) ) + continue; + + if ( isset($_REQUEST['post_status']) && $status_name == $_REQUEST['post_status'] ) + $class = ' class="current"'; + + $status_links[$status_name] = "" . sprintf( translate_nooped_plural( $status->label_count, $num_posts->$status_name ), number_format_i18n( $num_posts->$status_name ) ) . ''; + } + + if ( ! empty( $this->sticky_posts_count ) ) { + $class = ! empty( $_REQUEST['show_sticky'] ) ? ' class="current"' : ''; + + $sticky_link = array( 'sticky' => "" . sprintf( _nx( 'Sticky (%s)', 'Sticky (%s)', $this->sticky_posts_count, 'posts' ), number_format_i18n( $this->sticky_posts_count ) ) . '' ); + + // Sticky comes after Publish, or if not listed, after All. + $split = 1 + array_search( ( isset( $status_links['publish'] ) ? 'publish' : 'all' ), array_keys( $status_links ) ); + $status_links = array_merge( array_slice( $status_links, 0, $split ), $sticky_link, array_slice( $status_links, $split ) ); + } + + return $status_links; + } + + function get_bulk_actions() { + $actions = array(); + + if ( $this->is_trash ) + $actions['untrash'] = __( 'Restore' ); + else + $actions['edit'] = __( 'Edit' ); + + if ( $this->is_trash || !EMPTY_TRASH_DAYS ) + $actions['delete'] = __( 'Delete Permanently' ); + else + $actions['trash'] = __( 'Move to Trash' ); + + return $actions; + } + + function extra_tablenav( $which ) { + global $cat; +?> +
+months_dropdown( $this->screen->post_type ); + + if ( is_object_in_taxonomy( $this->screen->post_type, 'category' ) ) { + $dropdown_options = array( + 'show_option_all' => __( 'View all categories' ), + 'hide_empty' => 0, + 'hierarchical' => 1, + 'show_count' => 0, + 'orderby' => 'name', + 'selected' => $cat + ); + wp_dropdown_categories( $dropdown_options ); + } + + /** + * Fires before the Filter button on the Posts and Pages list tables. + * + * The Filter button allows sorting by date and/or category on the + * Posts list table, and sorting by date on the Pages list table. + * + * @since 2.1.0 + */ + do_action( 'restrict_manage_posts' ); + + submit_button( __( 'Filter' ), 'button', false, false, array( 'id' => 'post-query-submit' ) ); + } + + if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->post_type )->cap->edit_others_posts ) ) { + submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false ); + } +?> +
+screen->post_type ) ) + $this->view_switcher( $mode ); + } + + function get_table_classes() { + return array( 'widefat', 'fixed', is_post_type_hierarchical( $this->screen->post_type ) ? 'pages' : 'posts' ); + } + + function get_columns() { + $post_type = $this->screen->post_type; + + $posts_columns = array(); + + $posts_columns['cb'] = ''; + + /* translators: manage posts column name */ + $posts_columns['title'] = _x( 'Title', 'column name' ); + + if ( post_type_supports( $post_type, 'author' ) ) + $posts_columns['author'] = __( 'Author' ); + + $taxonomies = array(); + + $taxonomies = get_object_taxonomies( $post_type, 'objects' ); + $taxonomies = wp_filter_object_list( $taxonomies, array( 'show_admin_column' => true ), 'and', 'name' ); + + /** + * Filter the taxonomy columns in the Posts list table. + * + * The dynamic portion of the hook name, $post_type, refers to the post + * type slug. + * + * @since 3.5.0 + * + * @param array $taxonomies Array of taxonomies to show columns for. + * @param string $post_type The post type. + */ + $taxonomies = apply_filters( "manage_taxonomies_for_{$post_type}_columns", $taxonomies, $post_type ); + $taxonomies = array_filter( $taxonomies, 'taxonomy_exists' ); + + foreach ( $taxonomies as $taxonomy ) { + if ( 'category' == $taxonomy ) + $column_key = 'categories'; + elseif ( 'post_tag' == $taxonomy ) + $column_key = 'tags'; + else + $column_key = 'taxonomy-' . $taxonomy; + + $posts_columns[ $column_key ] = get_taxonomy( $taxonomy )->labels->name; + } + + $post_status = !empty( $_REQUEST['post_status'] ) ? $_REQUEST['post_status'] : 'all'; + if ( post_type_supports( $post_type, 'comments' ) && !in_array( $post_status, array( 'pending', 'draft', 'future' ) ) ) + $posts_columns['comments'] = ''; + + $posts_columns['date'] = __( 'Date' ); + + if ( 'page' == $post_type ) { + + /** + * Filter the columns displayed in the Pages list table. + * + * @since 2.5.0 + * + * @param array $post_columns An array of column names. + */ + $posts_columns = apply_filters( 'manage_pages_columns', $posts_columns ); + } else { + + /** + * Filter the columns displayed in the Posts list table. + * + * @since 1.5.0 + * + * @param array $posts_columns An array of column names. + * @param string $post_type The post type slug. + */ + $posts_columns = apply_filters( 'manage_posts_columns', $posts_columns, $post_type ); + } + + /** + * Filter the columns displayed in the Posts list table for a specific post type. + * + * The dynamic portion of the hook name, $post_type, refers to the post type slug. + * + * @since 3.0.0 + * + * @param array $post_columns An array of column names. + */ + $posts_columns = apply_filters( "manage_{$post_type}_posts_columns", $posts_columns ); + + return $posts_columns; + } + + function get_sortable_columns() { + return array( + 'title' => 'title', + 'parent' => 'parent', + 'comments' => 'comment_count', + 'date' => array( 'date', true ) + ); + } + + function display_rows( $posts = array(), $level = 0 ) { + global $wp_query, $per_page; + + if ( empty( $posts ) ) + $posts = $wp_query->posts; + + add_filter( 'the_title', 'esc_html' ); + + if ( $this->hierarchical_display ) { + $this->_display_rows_hierarchical( $posts, $this->get_pagenum(), $per_page ); + } else { + $this->_display_rows( $posts, $level ); + } + } + + function _display_rows( $posts, $level = 0 ) { + global $mode; + + // Create array of post IDs. + $post_ids = array(); + + foreach ( $posts as $a_post ) + $post_ids[] = $a_post->ID; + + $this->comment_pending_count = get_pending_comments_num( $post_ids ); + + foreach ( $posts as $post ) + $this->single_row( $post, $level ); + } + + function _display_rows_hierarchical( $pages, $pagenum = 1, $per_page = 20 ) { + global $wpdb; + + $level = 0; + + if ( ! $pages ) { + $pages = get_pages( array( 'sort_column' => 'menu_order' ) ); + + if ( ! $pages ) + return false; + } + + /* + * Arrange pages into two parts: top level pages and children_pages + * children_pages is two dimensional array, eg. + * children_pages[10][] contains all sub-pages whose parent is 10. + * It only takes O( N ) to arrange this and it takes O( 1 ) for subsequent lookup operations + * If searching, ignore hierarchy and treat everything as top level + */ + if ( empty( $_REQUEST['s'] ) ) { + + $top_level_pages = array(); + $children_pages = array(); + + foreach ( $pages as $page ) { + + // catch and repair bad pages + if ( $page->post_parent == $page->ID ) { + $page->post_parent = 0; + $wpdb->update( $wpdb->posts, array( 'post_parent' => 0 ), array( 'ID' => $page->ID ) ); + clean_post_cache( $page ); + } + + if ( 0 == $page->post_parent ) + $top_level_pages[] = $page; + else + $children_pages[ $page->post_parent ][] = $page; + } + + $pages = &$top_level_pages; + } + + $count = 0; + $start = ( $pagenum - 1 ) * $per_page; + $end = $start + $per_page; + + foreach ( $pages as $page ) { + if ( $count >= $end ) + break; + + if ( $count >= $start ) { + echo "\t"; + $this->single_row( $page, $level ); + } + + $count++; + + if ( isset( $children_pages ) ) + $this->_page_rows( $children_pages, $count, $page->ID, $level + 1, $pagenum, $per_page ); + } + + // if it is the last pagenum and there are orphaned pages, display them with paging as well + if ( isset( $children_pages ) && $count < $end ){ + foreach ( $children_pages as $orphans ){ + foreach ( $orphans as $op ) { + if ( $count >= $end ) + break; + + if ( $count >= $start ) { + echo "\t"; + $this->single_row( $op, 0 ); + } + + $count++; + } + } + } + } + + /** + * Given a top level page ID, display the nested hierarchy of sub-pages + * together with paging support + * + * @since 3.1.0 (Standalone function exists since 2.6.0) + * + * @param array $children_pages + * @param int $count + * @param int $parent + * @param int $level + * @param int $pagenum + * @param int $per_page + */ + function _page_rows( &$children_pages, &$count, $parent, $level, $pagenum, $per_page ) { + + if ( ! isset( $children_pages[$parent] ) ) + return; + + $start = ( $pagenum - 1 ) * $per_page; + $end = $start + $per_page; + + foreach ( $children_pages[$parent] as $page ) { + + if ( $count >= $end ) + break; + + // If the page starts in a subtree, print the parents. + if ( $count == $start && $page->post_parent > 0 ) { + $my_parents = array(); + $my_parent = $page->post_parent; + while ( $my_parent ) { + $my_parent = get_post( $my_parent ); + $my_parents[] = $my_parent; + if ( !$my_parent->post_parent ) + break; + $my_parent = $my_parent->post_parent; + } + $num_parents = count( $my_parents ); + while ( $my_parent = array_pop( $my_parents ) ) { + echo "\t"; + $this->single_row( $my_parent, $level - $num_parents ); + $num_parents--; + } + } + + if ( $count >= $start ) { + echo "\t"; + $this->single_row( $page, $level ); + } + + $count++; + + $this->_page_rows( $children_pages, $count, $page->ID, $level + 1, $pagenum, $per_page ); + } + + unset( $children_pages[$parent] ); //required in order to keep track of orphans + } + + function single_row( $post, $level = 0 ) { + global $mode; + static $alternate; + + $global_post = get_post(); + $GLOBALS['post'] = $post; + setup_postdata( $post ); + + $edit_link = get_edit_post_link( $post->ID ); + $title = _draft_or_post_title(); + $post_type_object = get_post_type_object( $post->post_type ); + $can_edit_post = current_user_can( 'edit_post', $post->ID ); + + $alternate = 'alternate' == $alternate ? '' : 'alternate'; + $classes = $alternate . ' iedit author-' . ( get_current_user_id() == $post->post_author ? 'self' : 'other' ); + + $lock_holder = wp_check_post_lock( $post->ID ); + if ( $lock_holder ) { + $classes .= ' wp-locked'; + $lock_holder = get_userdata( $lock_holder ); + } + + if ( $post->post_parent ) { + $count = count( get_post_ancestors( $post->ID ) ); + $classes .= ' level-'. $count; + } else { + $classes .= ' level-0'; + } + ?> + + get_column_info(); + + foreach ( $columns as $column_name => $column_display_name ) { + $class = "class=\"$column_name column-$column_name\""; + + $style = ''; + if ( in_array( $column_name, $hidden ) ) + $style = ' style="display:none;"'; + + $attributes = "$class$style"; + + switch ( $column_name ) { + + case 'cb': + ?> + + hierarchical_display ) { + if ( 0 == $level && (int) $post->post_parent > 0 ) { + //sent level 0 by accident, by default, or because we don't know the actual level + $find_main_page = (int) $post->post_parent; + while ( $find_main_page > 0 ) { + $parent = get_post( $find_main_page ); + + if ( is_null( $parent ) ) + break; + + $level++; + $find_main_page = (int) $parent->post_parent; + + if ( !isset( $parent_name ) ) { + /** This filter is documented in wp-includes/post-template.php */ + $parent_name = apply_filters( 'the_title', $parent->post_title, $parent->ID ); + } + } + } + } + + $pad = str_repeat( '— ', $level ); + echo "'; + break; + + case 'date': + if ( '0000-00-00 00:00:00' == $post->post_date ) { + $t_time = $h_time = __( 'Unpublished' ); + $time_diff = 0; + } else { + $t_time = get_the_time( __( 'Y/m/d g:i:s A' ) ); + $m_time = $post->post_date; + $time = get_post_time( 'G', true, $post ); + + $time_diff = time() - $time; + + if ( $time_diff > 0 && $time_diff < DAY_IN_SECONDS ) + $h_time = sprintf( __( '%s ago' ), human_time_diff( $time ) ); + else + $h_time = mysql2date( __( 'Y/m/d' ), $m_time ); + } + + echo ''; + break; + + case 'comments': + ?> + + + + '; + if ( $terms = get_the_terms( $post->ID, $taxonomy ) ) { + $out = array(); + foreach ( $terms as $t ) { + $posts_in_term_qv = array(); + if ( 'post' != $post->post_type ) + $posts_in_term_qv['post_type'] = $post->post_type; + if ( $taxonomy_object->query_var ) { + $posts_in_term_qv[ $taxonomy_object->query_var ] = $t->slug; + } else { + $posts_in_term_qv['taxonomy'] = $taxonomy; + $posts_in_term_qv['term'] = $t->slug; + } + + $out[] = sprintf( '%s', + esc_url( add_query_arg( $posts_in_term_qv, 'edit.php' ) ), + esc_html( sanitize_term_field( 'name', $t->name, $t->term_id, $taxonomy, 'display' ) ) + ); + } + /* translators: used between list items, there is a space after the comma */ + echo join( __( ', ' ), $out ); + } else { + echo '—'; + } + echo ''; + break; + } + ?> + + + + screen; + + $post = get_default_post_to_edit( $screen->post_type ); + $post_type_object = get_post_type_object( $screen->post_type ); + + $taxonomy_names = get_object_taxonomies( $screen->post_type ); + $hierarchical_taxonomies = array(); + $flat_taxonomies = array(); + foreach ( $taxonomy_names as $taxonomy_name ) { + $taxonomy = get_taxonomy( $taxonomy_name ); + + if ( !$taxonomy->show_ui ) + continue; + + if ( $taxonomy->hierarchical ) + $hierarchical_taxonomies[] = $taxonomy; + else + $flat_taxonomies[] = $taxonomy; + } + + $m = ( isset( $mode ) && 'excerpt' == $mode ) ? 'excerpt' : 'list'; + $can_publish = current_user_can( $post_type_object->cap->publish_posts ); + $core_columns = array( 'cb' => true, 'date' => true, 'title' => true, 'categories' => true, 'tags' => true, 'comments' => true, 'author' => true ); + + ?> + +
'; + $this->no_items(); + echo '
'; + echo $this->column_cb( $item ); + echo '"; + echo call_user_func( array( $this, 'column_' . $column_name ), $item ); + echo ""; + echo $this->column_default( $item, $column_name ); + echo "
+ + + + + >ID, array( 80, 60 ), true ) ) { + if ( $this->is_trash || ! $user_can_edit ) { + echo $thumb; + } else { +?> + + + + + + > + is_trash || ! $user_can_edit ) { + echo $att_title; + } else { ?> + + + +

+ID ), $matches ) ) + echo esc_html( strtoupper( $matches[1] ) ); + else + echo strtoupper( str_replace( 'image/', '', get_post_mime_type() ) ); +?> +

+row_actions( $this->_get_row_actions( $post, $att_title ) ); +?> +
>%s', + esc_url( add_query_arg( array( 'author' => get_the_author_meta('ID') ), 'upload.php' ) ), + get_the_author() + ); + ?>>post_excerpt : ''; ?>>> + post_parent ) && $parent_type && $parent_type->show_ui ) { ?> + + , + + >
+ + + +
> +
+ID ); + + $this->comments_bubble( $post->ID, $pending_comments ); +?> +
+
> + + ID ); ?> +
+ + + + + + +
$checkbox" . $theme->display('Name') . ""; + echo $this->row_actions( $actions, true ); + echo ""; + if ( $theme->errors() ) { + $pre = $status == 'broken' ? __( 'Broken Theme:' ) . ' ' : ''; + echo '

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

'; + } + echo "

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

+
"; + + $theme_meta = array(); + + if ( $theme->get('Version') ) + $theme_meta[] = sprintf( __( 'Version %s' ), $theme->display('Version') ); + + $theme_meta[] = sprintf( __( 'By %s' ), $theme->display('Author') ); + + if ( $theme->get('ThemeURI') ) + $theme_meta[] = '' . __( 'Visit Theme Site' ) . ''; + + /** + * Filter the array of row meta for each theme in the Multisite themes + * list table. + * + * @since 3.1.0 + * + * @param array $theme_meta An array of the theme's metadata, + * including the version, author, and + * theme URI. + * @param string $stylesheet Directory name of the theme. + * @param WP_Theme $theme WP_Theme object. + * @param string $status Status of the theme. + */ + $theme_meta = apply_filters( 'theme_row_meta', $theme_meta, $stylesheet, $theme, $status ); + echo implode( ' | ', $theme_meta ); + + echo "
"; + + /** + * Fires inside each custom column of the Multisite themes list table. + * + * @since 3.1.0 + * + * @param string $column_name Name of the column. + * @param string $stylesheet Directory name of the theme. + * @param WP_Theme $theme Current WP_Theme object. + */ + do_action( 'manage_themes_custom_column', $column_name, $stylesheet, $theme ); + echo "
+ + + "; ?> + user_login; ?>user_login, $super_admins ) ) + echo ' - ' . __( 'Super Admin' ); + ?> +
+ ' . __( 'Edit' ) . ''; + + if ( current_user_can( 'delete_user', $user->ID ) && ! in_array( $user->user_login, $super_admins ) ) { + $actions['delete'] = '' . __( 'Delete' ) . ''; + } + + /** + * Filter the action links displayed under each user + * in the Network Admin Users list table. + * + * @since 3.2.0 + * + * @param array $actions An array of action links to be displayed. + * Default 'Edit', 'Delete'. + * @param WP_User $user WP_User object. + */ + $actions = apply_filters( 'ms_user_row_actions', $actions, $user ); + echo $this->row_actions( $actions ); + ?> +
$user->user_email" . mysql2date( $date, $user->user_registered ) . ""; + if ( is_array( $blogs ) ) { + foreach ( (array) $blogs as $key => $val ) { + if ( !can_edit_network( $val->site_id ) ) + continue; + + $path = ( $val->path == '/' ) ? '' : $val->path; + echo ''; + echo '' . str_replace( '.' . get_current_site()->domain, '', $val->domain . $path ) . ''; + echo ' '; + $actions = array(); + $actions['edit'] = '' . __( 'Edit' ) . ''; + + $class = ''; + if ( get_blog_status( $val->userblog_id, 'spam' ) == 1 ) + $class .= 'site-spammed '; + if ( get_blog_status( $val->userblog_id, 'mature' ) == 1 ) + $class .= 'site-mature '; + if ( get_blog_status( $val->userblog_id, 'deleted' ) == 1 ) + $class .= 'site-deleted '; + if ( get_blog_status( $val->userblog_id, 'archived' ) == 1 ) + $class .= 'site-archived '; + + $actions['view'] = '' . __( 'View' ) . ''; + + /** + * Filter the action links displayed next the sites a user belongs to + * in the Network Admin Users list table. + * + * @since 3.1.0 + * + * @param array $actions An array of action links to be displayed. + * Default 'Edit', 'View'. + * @param int $userblog_id The site ID. + */ + $actions = apply_filters( 'ms_user_list_site_actions', $actions, $val->userblog_id ); + + $i=0; + $action_count = count( $actions ); + foreach ( $actions as $action => $link ) { + ++$i; + ( $i == $action_count ) ? $sep = '' : $sep = ' | '; + echo "$link$sep"; + } + echo '
'; + } + } + ?> +
> + + >> + $plugin['rating'], 'type' => 'percent', 'number' => $plugin['num_ratings'] ) ); ?> + >
$checkbox$plugin_name"; + echo $this->row_actions( $actions, true ); + echo " +
$description
+
"; + + $plugin_meta = array(); + if ( !empty( $plugin_data['Version'] ) ) + $plugin_meta[] = sprintf( __( 'Version %s' ), $plugin_data['Version'] ); + if ( !empty( $plugin_data['Author'] ) ) { + $author = $plugin_data['Author']; + if ( !empty( $plugin_data['AuthorURI'] ) ) + $author = '' . $plugin_data['Author'] . ''; + $plugin_meta[] = sprintf( __( 'By %s' ), $author ); + } + if ( ! empty( $plugin_data['PluginURI'] ) ) + $plugin_meta[] = '' . __( 'Visit plugin site' ) . ''; + + /** + * Filter the array of row meta for each plugin in the Plugins list table. + * + * @since 2.8.0 + * + * @param array $plugin_meta An array of the plugin's metadata, + * including the version, author, + * author URI, and plugin URI. + * @param string $plugin_file Path to the plugin file, relative to the plugins directory. + * @param array $plugin_data An array of plugin data. + * @param string $status Status of the plugin. Defaults are 'All', 'Active', + * 'Inactive', 'Recently Activated', 'Upgrade', 'Must-Use', + * 'Drop-ins', 'Search'. + */ + $plugin_meta = apply_filters( 'plugin_row_meta', $plugin_meta, $plugin_file, $plugin_data, $status ); + echo implode( ' | ', $plugin_meta ); + + echo "
"; + + /** + * Fires inside each custom column of the Plugins list table. + * + * @since 3.1.0 + * + * @param string $column_name Name of the column. + * @param string $plugin_file Path to the plugin file. + * @param array $plugin_data An array of plugin data. + */ + do_action( 'manage_plugins_custom_column', $column_name, $plugin_file, $plugin_data ); + echo "
+ + + +
+ +
"; + + if ( $format = get_post_format( $post->ID ) ) { + $label = get_post_format_string( $format ); + + echo '' . $label . ": "; + } + + if ( $can_edit_post && $post->post_status != 'trash' ) { + echo '' . $pad . $title . ''; + } else { + echo $pad . $title; + } + _post_states( $post ); + + if ( isset( $parent_name ) ) + echo ' | ' . $post_type_object->labels->parent_item_colon . ' ' . esc_html( $parent_name ); + + echo "\n"; + + if ( $can_edit_post && $post->post_status != 'trash' ) { + if ( $lock_holder ) { + $locked_avatar = get_avatar( $lock_holder->ID, 18 ); + $locked_text = esc_html( sprintf( __( '%s is currently editing' ), $lock_holder->display_name ) ); + } else { + $locked_avatar = $locked_text = ''; + } + + echo '
' . $locked_avatar . ' ' . $locked_text . "
\n"; + } + + if ( ! $this->hierarchical_display && 'excerpt' == $mode && current_user_can( 'read_post', $post->ID ) ) + the_excerpt(); + + $actions = array(); + if ( $can_edit_post && 'trash' != $post->post_status ) { + $actions['edit'] = '' . __( 'Edit' ) . ''; + $actions['inline hide-if-no-js'] = '' . __( 'Quick Edit' ) . ''; + } + if ( current_user_can( 'delete_post', $post->ID ) ) { + if ( 'trash' == $post->post_status ) + $actions['untrash'] = "ID ) ), 'untrash-post_' . $post->ID ) . "'>" . __( 'Restore' ) . ""; + elseif ( EMPTY_TRASH_DAYS ) + $actions['trash'] = "" . __( 'Trash' ) . ""; + if ( 'trash' == $post->post_status || !EMPTY_TRASH_DAYS ) + $actions['delete'] = "" . __( 'Delete Permanently' ) . ""; + } + if ( $post_type_object->public ) { + if ( in_array( $post->post_status, array( 'pending', 'draft', 'future' ) ) ) { + if ( $can_edit_post ) { + + /** This filter is documented in wp-admin/includes/meta-boxes.php */ + $actions['view'] = '' . __( 'Preview' ) . ''; + } + } elseif ( 'trash' != $post->post_status ) { + $actions['view'] = '' . __( 'View' ) . ''; + } + } + + if ( is_post_type_hierarchical( $post->post_type ) ) { + + /** + * Filter the array of row action links on the Pages list table. + * + * The filter is evaluated only for hierarchical post types. + * + * @since 2.8.0 + * + * @param array $actions An array of row action links. Defaults are + * 'Edit', 'Quick Edit', 'Restore, 'Trash', + * 'Delete Permanently', 'Preview', and 'View'. + * @param WP_Post $post The post object. + */ + $actions = apply_filters( 'page_row_actions', $actions, $post ); + } else { + + /** + * Filter the array of row action links on the Posts list table. + * + * The filter is evaluated only for non-hierarchical post types. + * + * @since 2.8.0 + * + * @param array $actions An array of row action links. Defaults are + * 'Edit', 'Quick Edit', 'Restore, 'Trash', + * 'Delete Permanently', 'Preview', and 'View'. + * @param WP_Post $post The post object. + */ + $actions = apply_filters( 'post_row_actions', $actions, $post ); + } + + echo $this->row_actions( $actions ); + + get_inline_data( $post ); + echo '
'; + if ( 'excerpt' == $mode ) { + + /** + * Filter the published time of the post. + * + * If $mode equals 'excerpt', the published time and date are both displayed. + * If $mode equals 'list' (default), the publish date is displayed, with the + * time and date together available as an abbreviation definition. + * + * @since 2.5.1 + * + * @param array $t_time The published time. + * @param WP_Post $post Post object. + * @param string $column_name The column name. + * @param string $mode The list display mode ('excerpt' or 'list'). + */ + echo apply_filters( 'post_date_column_time', $t_time, $post, $column_name, $mode ); + } else { + + /** This filter is documented in wp-admin/includes/class-wp-posts-list-table.php */ + echo '' . apply_filters( 'post_date_column_time', $h_time, $post, $column_name, $mode ) . ''; + } + echo '
'; + if ( 'publish' == $post->post_status ) { + _e( 'Published' ); + } elseif ( 'future' == $post->post_status ) { + if ( $time_diff > 0 ) + echo '' . __( 'Missed schedule' ) . ''; + else + _e( 'Scheduled' ); + } else { + _e( 'Last Modified' ); + } + echo '
>
+ comment_pending_count[$post->ID] ) ? $this->comment_pending_count[$post->ID] : 0; + + $this->comments_bubble( $post->ID, $pending_comments ); + ?> +
>%s', + esc_url( add_query_arg( array( 'post_type' => $post->post_type, 'author' => get_the_author_meta( 'ID' ) ), 'edit.php' )), + get_the_author() + ); + ?>>post_type ) ) { + + /** + * Fires in each custom column on the Posts list table. + * + * This hook only fires if the current post type is hierarchical, + * such as pages. + * + * @since 2.5.0 + * + * @param string $column_name The name of the column to display. + * @param int $post_id The current post ID. + */ + do_action( 'manage_pages_custom_column', $column_name, $post->ID ); + } else { + + /** + * Fires in each custom column in the Posts list table. + * + * This hook only fires if the current post type is non-hierarchical, + * such as posts. + * + * @since 1.5.0 + * + * @param string $column_name The name of the column to display. + * @param int $post_id The current post ID. + */ + do_action( 'manage_posts_custom_column', $column_name, $post->ID ); + } + + /** + * Fires for each custom column of a specific post type in the Posts list table. + * + * The dynamic portion of the hook name, $post->post_type, refers to the post type. + * + * @since 3.1.0 + * + * @param string $column_name The name of the column to display. + * @param int $post_id The current post ID. + */ + do_action( "manage_{$post->post_type}_posts_custom_column", $column_name, $post->ID ); + ?>
+ + + post_type; + echo $bulk ? " bulk-edit-row bulk-edit-row-$hclass bulk-edit-{$screen->post_type}" : " quick-edit-row quick-edit-row-$hclass inline-edit-{$screen->post_type}"; + ?>" style="display: none"> + +
+ +
+

+ post_type, 'title' ) ) : + if ( $bulk ) : ?> +
+
+
+ + + + + + + + + + + +
+ +
+
+ post_type, 'author' ) ) : + $authors_dropdown = ''; + + if ( is_super_admin() || current_user_can( $post_type_object->cap->edit_others_posts ) ) : + $users_opt = array( + 'hide_if_only_one_author' => false, + 'who' => 'authors', + 'name' => 'post_author', + 'class'=> 'authors', + 'multi' => 1, + 'echo' => 0 + ); + if ( $bulk ) + $users_opt['show_option_none'] = __( '— No Change —' ); + + if ( $authors = wp_dropdown_users( $users_opt ) ) : + $authors_dropdown = ''; + endif; + endif; // authors + ?> + + + +
+ + + + + + +
+ + + +
+ + + +
+ + + + labels->name ) ?> + +
    + $taxonomy->name ) ) ?> +
+ + + +
+ + + +
+ + post_type, 'author' ) && $bulk ) + echo $authors_dropdown; + + if ( post_type_supports( $screen->post_type, 'page-attributes' ) ) : + + if ( $post_type_object->hierarchical ) : + ?> + + + + + + + post_type ) : + ?> + + + + + + + + + cap->assign_terms ) ) : ?> + + + + + + + + post_type, 'comments' ) || post_type_supports( $screen->post_type, 'trackbacks' ) ) : + if ( $bulk ) : ?> + +
+ post_type, 'comments' ) ) : ?> + + post_type, 'trackbacks' ) ) : ?> + + +
+ + + +
+ post_type, 'comments' ) ) : ?> + + post_type, 'trackbacks' ) ) : ?> + + +
+ + + +
+ + + post_type && $can_publish && current_user_can( $post_type_object->cap->edit_others_posts ) ) : ?> + + + + + + + + + + + + + +
+ + post_type, 'post-formats' ) ) { + $post_formats = get_theme_support( 'post-formats' ); + + ?> + + + +
+ + get_column_info(); + + foreach ( $columns as $column_name => $column_display_name ) { + if ( isset( $core_columns[$column_name] ) ) + continue; + + if ( $bulk ) { + + /** + * Fires once for each column in Bulk Edit mode. + * + * @since 2.7.0 + * + * @param string $column_name Name of the column to edit. + * @param WP_Post $post_type The post type slug. + */ + do_action( 'bulk_edit_custom_box', $column_name, $screen->post_type ); + } else { + + /** + * Fires once for each column in Quick Edit mode. + * + * @since 2.7.0 + * + * @param string $column_name Name of the column to edit. + * @param WP_Post $post_type The post type slug. + */ + do_action( 'quick_edit_custom_box', $column_name, $screen->post_type ); + } + + } + ?> +

+ + + + + 's' ) ); + } ?> + + + post_type, 'author' ) ) { ?> + + + +
+

+
+ 'tags', + 'singular' => 'tag', + 'screen' => isset( $args['screen'] ) ? $args['screen'] : null, + ) ); + + $action = $this->screen->action; + $post_type = $this->screen->post_type; + $taxonomy = $this->screen->taxonomy; + + if ( empty( $taxonomy ) ) + $taxonomy = 'post_tag'; + + if ( ! taxonomy_exists( $taxonomy ) ) + wp_die( __( 'Invalid taxonomy' ) ); + + $tax = get_taxonomy( $taxonomy ); + + // @todo Still needed? Maybe just the show_ui part. + if ( empty( $post_type ) || !in_array( $post_type, get_post_types( array( 'show_ui' => true ) ) ) ) + $post_type = 'post'; + + } + + function ajax_user_can() { + return current_user_can( get_taxonomy( $this->screen->taxonomy )->cap->manage_terms ); + } + + function prepare_items() { + $tags_per_page = $this->get_items_per_page( 'edit_' . $this->screen->taxonomy . '_per_page' ); + + if ( 'post_tag' == $this->screen->taxonomy ) { + /** + * Filter the number of terms displayed per page for the Tags list table. + * + * @since 2.8.0 + * + * @param int $tags_per_page Number of tags to be displayed. Default 20. + */ + $tags_per_page = apply_filters( 'edit_tags_per_page', $tags_per_page ); + + /** + * Filter the number of terms displayed per page for the Tags list table. + * + * @since 2.7.0 + * @deprecated 2.8.0 Use edit_tags_per_page instead. + * + * @param int $tags_per_page Number of tags to be displayed. Default 20. + */ + $tags_per_page = apply_filters( 'tagsperpage', $tags_per_page ); + } elseif ( 'category' == $this->screen->taxonomy ) { + /** + * Filter the number of terms displayed per page for the Categories list table. + * + * @since 2.8.0 + * + * @param int $tags_per_page Number of categories to be displayed. Default 20. + */ + $tags_per_page = apply_filters( 'edit_categories_per_page', $tags_per_page ); + } + + $search = !empty( $_REQUEST['s'] ) ? trim( wp_unslash( $_REQUEST['s'] ) ) : ''; + + $args = array( + 'search' => $search, + 'page' => $this->get_pagenum(), + 'number' => $tags_per_page, + ); + + if ( !empty( $_REQUEST['orderby'] ) ) + $args['orderby'] = trim( wp_unslash( $_REQUEST['orderby'] ) ); + + if ( !empty( $_REQUEST['order'] ) ) + $args['order'] = trim( wp_unslash( $_REQUEST['order'] ) ); + + $this->callback_args = $args; + + $this->set_pagination_args( array( + 'total_items' => wp_count_terms( $this->screen->taxonomy, compact( 'search' ) ), + 'per_page' => $tags_per_page, + ) ); + } + + function has_items() { + // todo: populate $this->items in prepare_items() + return true; + } + + function get_bulk_actions() { + $actions = array(); + $actions['delete'] = __( 'Delete' ); + + return $actions; + } + + function current_action() { + if ( isset( $_REQUEST['action'] ) && isset( $_REQUEST['delete_tags'] ) && ( 'delete' == $_REQUEST['action'] || 'delete' == $_REQUEST['action2'] ) ) + return 'bulk-delete'; + + return parent::current_action(); + } + + function get_columns() { + $columns = array( + 'cb' => '', + 'name' => _x( 'Name', 'term name' ), + 'description' => __( 'Description' ), + 'slug' => __( 'Slug' ), + ); + + if ( 'link_category' == $this->screen->taxonomy ) { + $columns['links'] = __( 'Links' ); + } else { + $post_type_object = get_post_type_object( $this->screen->post_type ); + $columns['posts'] = $post_type_object ? $post_type_object->labels->name : __( 'Posts' ); + } + + return $columns; + } + + function get_sortable_columns() { + return array( + 'name' => 'name', + 'description' => 'description', + 'slug' => 'slug', + 'posts' => 'count', + 'links' => 'count' + ); + } + + function display_rows_or_placeholder() { + $taxonomy = $this->screen->taxonomy; + + $args = wp_parse_args( $this->callback_args, array( + 'page' => 1, + 'number' => 20, + 'search' => '', + 'hide_empty' => 0 + ) ); + + extract( $args, EXTR_SKIP ); + + $args['offset'] = $offset = ( $page - 1 ) * $number; + + // convert it to table rows + $count = 0; + + $terms = array(); + + if ( is_taxonomy_hierarchical( $taxonomy ) && !isset( $orderby ) ) { + // We'll need the full set of terms then. + $args['number'] = $args['offset'] = 0; + } + $terms = get_terms( $taxonomy, $args ); + + if ( empty( $terms ) ) { + list( $columns, $hidden ) = $this->get_column_info(); + echo ''; + $this->no_items(); + echo ''; + return; + } + + if ( is_taxonomy_hierarchical( $taxonomy ) && !isset( $orderby ) ) { + if ( !empty( $search ) ) // Ignore children on searches. + $children = array(); + else + $children = _get_term_hierarchy( $taxonomy ); + + // Some funky recursion to get the job done( Paging & parents mainly ) is contained within, Skip it for non-hierarchical taxonomies for performance sake + $this->_rows( $taxonomy, $terms, $children, $offset, $number, $count ); + } else { + $terms = get_terms( $taxonomy, $args ); + foreach ( $terms as $term ) + $this->single_row( $term ); + $count = $number; // Only displaying a single page. + } + } + + function _rows( $taxonomy, $terms, &$children, $start, $per_page, &$count, $parent = 0, $level = 0 ) { + + $end = $start + $per_page; + + foreach ( $terms as $key => $term ) { + + if ( $count >= $end ) + break; + + if ( $term->parent != $parent && empty( $_REQUEST['s'] ) ) + continue; + + // If the page starts in a subtree, print the parents. + if ( $count == $start && $term->parent > 0 && empty( $_REQUEST['s'] ) ) { + $my_parents = $parent_ids = array(); + $p = $term->parent; + while ( $p ) { + $my_parent = get_term( $p, $taxonomy ); + $my_parents[] = $my_parent; + $p = $my_parent->parent; + if ( in_array( $p, $parent_ids ) ) // Prevent parent loops. + break; + $parent_ids[] = $p; + } + unset( $parent_ids ); + + $num_parents = count( $my_parents ); + while ( $my_parent = array_pop( $my_parents ) ) { + echo "\t"; + $this->single_row( $my_parent, $level - $num_parents ); + $num_parents--; + } + } + + if ( $count >= $start ) { + echo "\t"; + $this->single_row( $term, $level ); + } + + ++$count; + + unset( $terms[$key] ); + + if ( isset( $children[$term->term_id] ) && empty( $_REQUEST['s'] ) ) + $this->_rows( $taxonomy, $terms, $children, $start, $per_page, $count, $term->term_id, $level + 1 ); + } + } + + function single_row( $tag, $level = 0 ) { + static $row_class = ''; + $row_class = ( $row_class == '' ? ' class="alternate"' : '' ); + + $this->level = $level; + + echo ''; + $this->single_row_columns( $tag ); + echo ''; + } + + function column_cb( $tag ) { + $default_term = get_option( 'default_' . $this->screen->taxonomy ); + + if ( current_user_can( get_taxonomy( $this->screen->taxonomy )->cap->delete_terms ) && $tag->term_id != $default_term ) + return '' + . ''; + + return ' '; + } + + function column_name( $tag ) { + $taxonomy = $this->screen->taxonomy; + $tax = get_taxonomy( $taxonomy ); + + $default_term = get_option( 'default_' . $taxonomy ); + + $pad = str_repeat( '— ', max( 0, $this->level ) ); + + /** + * Filter display of the term name in the terms list table. + * + * The default output may include padding due to the term's + * current level in the term hierarchy. + * + * @since 2.5.0 + * + * @see WP_Terms_List_Table::column_name() + * + * @param string $pad_tag_name The term name, padded if not top-level. + * @param object $tag Term object. + */ + $name = apply_filters( 'term_name', $pad . ' ' . $tag->name, $tag ); + + $qe_data = get_term( $tag->term_id, $taxonomy, OBJECT, 'edit' ); + $edit_link = esc_url( get_edit_term_link( $tag->term_id, $taxonomy, $this->screen->post_type ) ); + + $out = '' . $name . '
'; + + $actions = array(); + if ( current_user_can( $tax->cap->edit_terms ) ) { + $actions['edit'] = '' . __( 'Edit' ) . ''; + $actions['inline hide-if-no-js'] = '' . __( 'Quick Edit' ) . ''; + } + if ( current_user_can( $tax->cap->delete_terms ) && $tag->term_id != $default_term ) + $actions['delete'] = "term_id ) . "'>" . __( 'Delete' ) . ""; + if ( $tax->public ) + $actions['view'] = '' . __( 'View' ) . ''; + + /** + * Filter the action links displayed for each term in the Tags list table. + * + * @since 2.8.0 + * @deprecated 3.0.0 Use {$taxonomy}_row_actions instead. + * + * @param array $actions An array of action links to be displayed. Default + * 'Edit', 'Quick Edit', 'Delete', and 'View'. + * @param object $tag Term object. + */ + $actions = apply_filters( 'tag_row_actions', $actions, $tag ); + + /** + * Filter the action links displayed for each term in the terms list table. + * + * The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug. + * + * @since 3.0.0 + * + * @param array $actions An array of action links to be displayed. Default + * 'Edit', 'Quick Edit', 'Delete', and 'View'. + * @param object $tag Term object. + */ + $actions = apply_filters( "{$taxonomy}_row_actions", $actions, $tag ); + + $out .= $this->row_actions( $actions ); + $out .= ''; + + return $out; + } + + function column_description( $tag ) { + return $tag->description; + } + + function column_slug( $tag ) { + /** This filter is documented in wp-admin/edit-tag-form.php */ + return apply_filters( 'editable_slug', $tag->slug ); + } + + function column_posts( $tag ) { + $count = number_format_i18n( $tag->count ); + + $tax = get_taxonomy( $this->screen->taxonomy ); + + $ptype_object = get_post_type_object( $this->screen->post_type ); + if ( ! $ptype_object->show_ui ) + return $count; + + if ( $tax->query_var ) { + $args = array( $tax->query_var => $tag->slug ); + } else { + $args = array( 'taxonomy' => $tax->name, 'term' => $tag->slug ); + } + + if ( 'post' != $this->screen->post_type ) + $args['post_type'] = $this->screen->post_type; + + if ( 'attachment' == $this->screen->post_type ) + return "$count"; + + return "$count"; + } + + function column_links( $tag ) { + $count = number_format_i18n( $tag->count ); + if ( $count ) + $count = "$count"; + return $count; + } + + function column_default( $tag, $column_name ) { + /** + * Filter the displayed columns in the terms list table. + * + * The dynamic portion of the hook name, $this->screen->taxonomy, + * refers to the slug of the current taxonomy. + * + * @since 2.8.0 + * + * @param string $string Blank string. + * @param string $column_name Name of the column. + * @param int $term_id Term ID. + */ + return apply_filters( "manage_{$this->screen->taxonomy}_custom_column", '', $column_name, $tag->term_id ); + } + + /** + * Outputs the hidden row displayed when inline editing + * + * @since 3.1.0 + */ + function inline_edit() { + $tax = get_taxonomy( $this->screen->taxonomy ); + + if ( ! current_user_can( $tax->cap->edit_terms ) ) + return; +?> + +
+ +
+ features = $_REQUEST['features']; + + $paged = $this->get_pagenum(); + + $per_page = 36; + + // These are the tabs which are shown on the page, + $tabs = array(); + $tabs['dashboard'] = __( 'Search' ); + if ( 'search' == $tab ) + $tabs['search'] = __( 'Search Results' ); + $tabs['upload'] = __( 'Upload' ); + $tabs['featured'] = _x( 'Featured','Theme Installer' ); + //$tabs['popular'] = _x( 'Popular','Theme Installer' ); + $tabs['new'] = _x( 'Newest','Theme Installer' ); + $tabs['updated'] = _x( 'Recently Updated','Theme Installer' ); + + $nonmenu_tabs = array( 'theme-information' ); // Valid actions to perform which do not have a Menu item. + + /** + * Filter the tabs shown on the Install Themes screen. + * + * @since 2.8.0 + * + * @param array $tabs The tabs shown on the Install Themes screen. Defaults are + * 'dashboard', 'search', 'upload', 'featured', 'new', and 'updated'. + */ + $tabs = apply_filters( 'install_themes_tabs', $tabs ); + + /** + * Filter tabs not associated with a menu item on the Install Themes screen. + * + * @since 2.8.0 + * + * @param array $nonmenu_tabs The tabs that don't have a menu item on + * the Install Themes screen. + */ + $nonmenu_tabs = apply_filters( 'install_themes_nonmenu_tabs', $nonmenu_tabs ); + + // If a non-valid menu tab has been selected, And it's not a non-menu action. + if ( empty( $tab ) || ( ! isset( $tabs[ $tab ] ) && ! in_array( $tab, (array) $nonmenu_tabs ) ) ) + $tab = key( $tabs ); + + $args = array( 'page' => $paged, 'per_page' => $per_page, 'fields' => $theme_field_defaults ); + + switch ( $tab ) { + case 'search': + $type = isset( $_REQUEST['type'] ) ? wp_unslash( $_REQUEST['type'] ) : 'term'; + switch ( $type ) { + case 'tag': + $args['tag'] = array_map( 'sanitize_key', $search_terms ); + break; + case 'term': + $args['search'] = $search_string; + break; + case 'author': + $args['author'] = $search_string; + break; + } + + 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', 10, 0 ); + break; + + case 'featured': + //case 'popular': + case 'new': + case 'updated': + $args['browse'] = $tab; + break; + + default: + $args = false; + break; + } + + /** + * Filter API request arguments for each Install Themes screen tab. + * + * The dynamic portion of the hook name, $tab, refers to the theme install + * tabs. Default tabs are 'dashboard', 'search', 'upload', 'featured', + * 'new', and 'updated'. + * + * @since 3.7.0 + * + * @param array $args An array of themes API arguments. + */ + $args = apply_filters( 'install_themes_table_api_args_' . $tab, $args ); + + if ( ! $args ) + return; + + $api = themes_api( 'query_themes', $args ); + + if ( is_wp_error( $api ) ) + wp_die( $api->get_error_message() . '

' . __( 'Try again' ) . '' ); + + $this->items = $api->themes; + + $this->set_pagination_args( array( + 'total_items' => $api->info['results'], + 'per_page' => $args['per_page'], + 'infinite_scroll' => true, + ) ); + } + + function no_items() { + _e( 'No themes match your request.' ); + } + + function get_views() { + global $tabs, $tab; + + $display_tabs = array(); + foreach ( (array) $tabs as $action => $text ) { + $class = ( $action == $tab ) ? ' class="current"' : ''; + $href = self_admin_url('theme-install.php?tab=' . $action); + $display_tabs['theme-install-'.$action] = "$text"; + } + + return $display_tabs; + } + + function display() { + wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' ); +?> +

+
+ +
+ pagination( 'top' ); ?> +
+
+ +
+ display_rows_or_placeholder(); ?> +
+ + items; + 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' + * public 'slug' => string 'magazine-basic' + * public 'version' => string '1.1' + * public 'author' => string 'tinkerpriest' + * public 'preview_url' => string 'http://wp-themes.com/?magazine-basic' + * public 'screenshot_url' => string 'http://wp-themes.com/wp-content/themes/magazine-basic/screenshot.png' + * public 'rating' => float 80 + * public 'num_ratings' => int 1 + * public 'homepage' => string 'http://wordpress.org/themes/magazine-basic' + * 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.' + * public 'download_link' => string 'http://wordpress.org/themes/download/magazine-basic.1.1.zip' + */ + 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, + ), self_admin_url( 'theme-install.php' ) ); + + $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' ) . ''; + + /** + * Filter the install action links for a theme in the Install Themes list table. + * + * @since 3.4.0 + * + * @param array $actions An array of theme action hyperlinks. Defaults are + * links to Install Now, Preview, and Details. + * @param WP_Theme $theme Theme object. + */ + $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 ) ): ?> + + +
+ $theme->rating, 'type' => 'percent', 'number' => $theme->num_ratings ) ); ?> +
+ + version, $themes_allowedtags ); ?> +
+
+ description, $themes_allowedtags ); ?> +
+
+ +
+ Install screen + * @uses $type Global; type of search. + */ + function _js_vars( $extra_args = array() ) { + global $tab, $type; + parent::_js_vars( compact( 'tab', 'type' ) ); + } + + /** + * Check to see if the theme is already installed. + * + * @since 3.4.0 + * @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 new file mode 100644 index 0000000..be75de0 --- /dev/null +++ b/wp-admin/includes/class-wp-themes-list-table.php @@ -0,0 +1,268 @@ + true, + 'screen' => isset( $args['screen'] ) ? $args['screen'] : null, + ) ); + } + + 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' ); + } + + function prepare_items() { + $themes = wp_get_themes( array( 'allowed' => true ) ); + + if ( ! empty( $_REQUEST['s'] ) ) + $this->search_terms = array_unique( array_filter( array_map( 'trim', explode( ',', strtolower( wp_unslash( $_REQUEST['s'] ) ) ) ) ) ); + + if ( ! empty( $_REQUEST['features'] ) ) + $this->features = $_REQUEST['features']; + + if ( $this->search_terms || $this->features ) { + foreach ( $themes as $key => $theme ) { + if ( ! $this->search_theme( $theme ) ) + unset( $themes[ $key ] ); + } + } + + unset( $themes[ get_option( 'stylesheet' ) ] ); + WP_Theme::sort_by_name( $themes ); + + $per_page = 36; + $page = $this->get_pagenum(); + + $start = ( $page - 1 ) * $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_terms || $this->features ) { + _e( 'No items found.' ); + return; + } + + if ( is_multisite() ) { + if ( current_user_can( 'install_themes' ) && current_user_can( 'manage_network_themes' ) ) { + printf( __( 'You only have one theme enabled for this site right now. Visit the Network Admin to enable or install more themes.' ), network_admin_url( 'site-themes.php?id=' . $GLOBALS['blog_id'] ), network_admin_url( 'theme-install.php' ) ); + + return; + } elseif ( current_user_can( 'manage_network_themes' ) ) { + printf( __( 'You only have one theme enabled for this site right now. Visit the Network Admin to enable more themes.' ), network_admin_url( 'site-themes.php?id=' . $GLOBALS['blog_id'] ) ); + + return; + } + // else, fallthrough. install_themes doesn't help if you can't enable it. + } else { + if ( current_user_can( 'install_themes' ) ) { + printf( __( 'You only have one theme installed right now. Live a little! You can choose from over 1,000 free themes in the WordPress.org Theme Directory at any time: just click on the Install Themes tab above.' ), admin_url( 'theme-install.php' ) ); + + return; + } + } + // Fallthrough. + printf( __( 'Only the current theme is available to you. Contact the %s administrator for information about accessing additional themes.' ), get_site_option( 'site_name' ) ); + } + + function tablenav( $which = 'top' ) { + if ( $this->get_pagination_arg( 'total_pages' ) <= 1 ) + return; + ?> +
+ pagination( $which ); ?> + +
+
+ + tablenav( 'top' ); ?> + +
+ display_rows_or_placeholder(); ?> +
+ + tablenav( 'bottom' ); ?> +has_items() ) { + $this->display_rows(); + } else { + echo '
'; + $this->no_items(); + echo '
'; + } + } + + function display_rows() { + $themes = $this->items; + + foreach ( $themes as $theme ): + ?>
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' => urlencode( $template ), 'stylesheet' => urlencode( $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' ) . ''; + + /** This filter is documented in wp-admin/includes/class-wp-ms-themes-list-table.php */ + $actions = apply_filters( 'theme_action_links', $actions, $theme ); + + /** This filter is documented in wp-admin/includes/class-wp-ms-themes-list-table.php */ + $actions = apply_filters( "theme_action_links_$stylesheet", $actions, $theme ); + $delete_action = isset( $actions['delete'] ) ? '
' . $actions['delete'] . '
' : ''; + unset( $actions['delete'] ); + + ?> + + + get_screenshot() ) : ?> + + + + + get_screenshot() ) : ?> + + + + +

+
+ + +
+

+

display('Description'); ?>

+ parent() ) { + printf( '

' . __( 'This child theme requires its parent theme, %2$s.' ) . '

', + __( 'http://codex.wordpress.org/Child_Themes' ), + $theme->parent()->display( 'Name' ) ); + } ?> +
+ +
+ features as $word ) { + if ( ! in_array( $word, $theme->get('Tags') ) ) + return false; + } + + // Match all phrases + 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( strip_tags( $theme->display( $header, false, true ) ), $word ) ) { + continue 2; + } + } + + if ( false !== stripos( $theme->get_stylesheet(), $word ) ) + continue; + + if ( false !== stripos( $theme->get_template(), $word ) ) + continue; + + return false; + } + + return true; + } + + /** + * Send required variables to JavaScript land + * + * @since 3.4.0 + * @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( wp_unslash( $_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-skins.php b/wp-admin/includes/class-wp-upgrader-skins.php new file mode 100644 index 0000000..8c48407 --- /dev/null +++ b/wp-admin/includes/class-wp-upgrader-skins.php @@ -0,0 +1,765 @@ + '', 'nonce' => '', 'title' => '', 'context' => false ); + $this->options = wp_parse_args($args, $defaults); + } + + function set_upgrader(&$upgrader) { + if ( is_object($upgrader) ) + $this->upgrader =& $upgrader; + $this->add_strings(); + } + + function add_strings() { + } + + function set_result($result) { + $this->result = $result; + } + + function request_filesystem_credentials($error = false) { + $url = $this->options['url']; + $context = $this->options['context']; + if ( !empty($this->options['nonce']) ) + $url = wp_nonce_url($url, $this->options['nonce']); + return request_filesystem_credentials($url, '', $error, $context); //Possible to bring inline, Leaving as is for now. + } + + function header() { + if ( $this->done_header ) + return; + $this->done_header = true; + echo '
'; + echo '

' . $this->options['title'] . '

'; + } + function footer() { + echo '
'; + } + + function error($errors) { + if ( ! $this->done_header ) + $this->header(); + if ( is_string($errors) ) { + $this->feedback($errors); + } elseif ( is_wp_error($errors) && $errors->get_error_code() ) { + foreach ( $errors->get_error_messages() as $message ) { + if ( $errors->get_error_data() && is_string( $errors->get_error_data() ) ) + $this->feedback($message . ' ' . esc_html( strip_tags( $errors->get_error_data() ) ) ); + else + $this->feedback($message); + } + } + } + + function feedback($string) { + if ( isset( $this->upgrader->strings[$string] ) ) + $string = $this->upgrader->strings[$string]; + + if ( strpos($string, '%') !== false ) { + $args = func_get_args(); + $args = array_splice($args, 1); + if ( $args ) { + $args = array_map( 'strip_tags', $args ); + $args = array_map( 'esc_html', $args ); + $string = vsprintf($string, $args); + } + } + if ( empty($string) ) + return; + show_message($string); + } + function before() {} + function after() {} + + /** + * Output JavaScript that calls function to decrement the update counts. + * + * @since 3.9.0 + * + * @param string $type Type of update count to decrement. Likely values include 'plugin', + * 'theme', 'translation', etc. + */ + protected function decrement_update_count( $type ) { + if ( ! $this->result || is_wp_error( $this->result ) || 'up_to_date' === $this->result ) { + return; + } + echo ''; + } +} + +/** + * Plugin Upgrader Skin for WordPress Plugin Upgrades. + * + * @package WordPress + * @subpackage Upgrader + * @since 2.8.0 + */ +class Plugin_Upgrader_Skin extends WP_Upgrader_Skin { + var $plugin = ''; + var $plugin_active = false; + var $plugin_network_active = false; + + function __construct($args = array()) { + $defaults = array( 'url' => '', 'plugin' => '', 'nonce' => '', 'title' => __('Update Plugin') ); + $args = wp_parse_args($args, $defaults); + + $this->plugin = $args['plugin']; + + $this->plugin_active = is_plugin_active( $this->plugin ); + $this->plugin_network_active = is_plugin_active_for_network( $this->plugin ); + + parent::__construct($args); + } + + function after() { + $this->plugin = $this->upgrader->plugin_info(); + if ( !empty($this->plugin) && !is_wp_error($this->result) && $this->plugin_active ){ + echo ''; + } + + $this->decrement_update_count( 'plugin' ); + + $update_actions = array( + 'activate_plugin' => '' . __('Activate Plugin') . '', + 'plugins_page' => '' . __('Return to Plugins page') . '' + ); + if ( $this->plugin_active || ! $this->result || is_wp_error( $this->result ) || ! current_user_can( 'activate_plugins' ) ) + unset( $update_actions['activate_plugin'] ); + + /** + * Filter the list of action links available following a single plugin update. + * + * @since 2.7.0 + * + * @param array $update_actions Array of plugin action links. + * @param string $plugin Path to the plugin file. + */ + $update_actions = apply_filters( 'update_plugin_complete_actions', $update_actions, $this->plugin ); + + if ( ! empty($update_actions) ) + $this->feedback(implode(' | ', (array)$update_actions)); + } +} + +/** + * Plugin Upgrader Skin for WordPress Plugin Upgrades. + * + * @package WordPress + * @subpackage Upgrader + * @since 3.0.0 + */ +class Bulk_Upgrader_Skin extends WP_Upgrader_Skin { + var $in_loop = false; + var $error = false; + + function __construct($args = array()) { + $defaults = array( 'url' => '', 'nonce' => '' ); + $args = wp_parse_args($args, $defaults); + + parent::__construct($args); + } + + function add_strings() { + $this->upgrader->strings['skin_upgrade_start'] = __('The update process is starting. This process may take a while on some hosts, so please be patient.'); + $this->upgrader->strings['skin_update_failed_error'] = __('An error occurred while updating %1$s: %2$s'); + $this->upgrader->strings['skin_update_failed'] = __('The update of %1$s failed.'); + $this->upgrader->strings['skin_update_successful'] = __('%1$s updated successfully.').' '.__('Show Details').'.'; + $this->upgrader->strings['skin_upgrade_end'] = __('All updates have been completed.'); + } + + function feedback($string) { + if ( isset( $this->upgrader->strings[$string] ) ) + $string = $this->upgrader->strings[$string]; + + if ( strpos($string, '%') !== false ) { + $args = func_get_args(); + $args = array_splice($args, 1); + if ( $args ) { + $args = array_map( 'strip_tags', $args ); + $args = array_map( 'esc_html', $args ); + $string = vsprintf($string, $args); + } + } + if ( empty($string) ) + return; + if ( $this->in_loop ) + echo "$string
\n"; + else + echo "

$string

\n"; + } + + function header() { + // Nothing, This will be displayed within a iframe. + } + + function footer() { + // Nothing, This will be displayed within a iframe. + } + function error($error) { + if ( is_string($error) && isset( $this->upgrader->strings[$error] ) ) + $this->error = $this->upgrader->strings[$error]; + + if ( is_wp_error($error) ) { + foreach ( $error->get_error_messages() as $emessage ) { + if ( $error->get_error_data() && is_string( $error->get_error_data() ) ) + $messages[] = $emessage . ' ' . esc_html( strip_tags( $error->get_error_data() ) ); + else + $messages[] = $emessage; + } + $this->error = implode(', ', $messages); + } + echo ''; + } + + function bulk_header() { + $this->feedback('skin_upgrade_start'); + } + + function bulk_footer() { + $this->feedback('skin_upgrade_end'); + } + + function before($title = '') { + $this->in_loop = true; + printf( '

' . $this->upgrader->strings['skin_before_update_header'] . '

', $title, $this->upgrader->update_current, $this->upgrader->update_count); + echo ''; + echo '

'; + $this->flush_output(); + } + + function after($title = '') { + echo '

'; + if ( $this->error || ! $this->result ) { + if ( $this->error ) + echo '

' . sprintf($this->upgrader->strings['skin_update_failed_error'], $title, $this->error) . '

'; + else + echo '

' . sprintf($this->upgrader->strings['skin_update_failed'], $title) . '

'; + + echo ''; + } + if ( $this->result && ! is_wp_error( $this->result ) ) { + if ( ! $this->error ) + echo '

' . sprintf($this->upgrader->strings['skin_update_successful'], $title, 'jQuery(\'#progress-' . esc_js($this->upgrader->update_current) . '\').toggle();jQuery(\'span\', this).toggle(); return false;') . '

'; + echo ''; + } + + $this->reset(); + $this->flush_output(); + } + + function reset() { + $this->in_loop = false; + $this->error = false; + } + + function flush_output() { + wp_ob_end_flush_all(); + flush(); + } + + /** + * Output JavaScript that sends message to parent window to decrement the update counts. + * + * @since 3.9.0 + * + * @param string $type Type of update count to decrement. Likely values include 'plugin', + * 'theme', 'translation', etc. + */ + protected function decrement_update_count( $type ) { + if ( ! $this->result || is_wp_error( $this->result ) || 'up_to_date' === $this->result ) { + return; + } + echo ''; + } +} + +class Bulk_Plugin_Upgrader_Skin extends Bulk_Upgrader_Skin { + var $plugin_info = array(); // Plugin_Upgrader::bulk() will fill this in. + + function __construct($args = array()) { + parent::__construct($args); + } + + function add_strings() { + parent::add_strings(); + $this->upgrader->strings['skin_before_update_header'] = __('Updating Plugin %1$s (%2$d/%3$d)'); + } + + function before($title = '') { + parent::before($this->plugin_info['Title']); + } + + function after($title = '') { + parent::after($this->plugin_info['Title']); + $this->decrement_update_count( 'plugin' ); + } + function bulk_footer() { + parent::bulk_footer(); + $update_actions = array( + 'plugins_page' => '' . __('Return to Plugins page') . '', + 'updates_page' => '' . __('Return to WordPress Updates') . '' + ); + if ( ! current_user_can( 'activate_plugins' ) ) + unset( $update_actions['plugins_page'] ); + + /** + * Filter the list of action links available following bulk plugin updates. + * + * @since 3.0.0 + * + * @param array $update_actions Array of plugin action links. + * @param array $plugin_info Array of information for the last-updated plugin. + */ + $update_actions = apply_filters( 'update_bulk_plugins_complete_actions', $update_actions, $this->plugin_info ); + + if ( ! empty($update_actions) ) + $this->feedback(implode(' | ', (array)$update_actions)); + } +} + +class Bulk_Theme_Upgrader_Skin extends Bulk_Upgrader_Skin { + var $theme_info = array(); // Theme_Upgrader::bulk() will fill this in. + + function __construct($args = array()) { + parent::__construct($args); + } + + function add_strings() { + parent::add_strings(); + $this->upgrader->strings['skin_before_update_header'] = __('Updating Theme %1$s (%2$d/%3$d)'); + } + + function before($title = '') { + parent::before( $this->theme_info->display('Name') ); + } + + function after($title = '') { + parent::after( $this->theme_info->display('Name') ); + $this->decrement_update_count( 'theme' ); + } + + function bulk_footer() { + parent::bulk_footer(); + $update_actions = array( + 'themes_page' => '' . __('Return to Themes page') . '', + 'updates_page' => '' . __('Return to WordPress Updates') . '' + ); + if ( ! current_user_can( 'switch_themes' ) && ! current_user_can( 'edit_theme_options' ) ) + unset( $update_actions['themes_page'] ); + + /** + * Filter the list of action links available following bulk theme updates. + * + * @since 3.0.0 + * + * @param array $update_actions Array of theme action links. + * @param array $theme_info Array of information for the last-updated theme. + */ + $update_actions = apply_filters( 'update_bulk_theme_complete_actions', $update_actions, $this->theme_info ); + + if ( ! empty($update_actions) ) + $this->feedback(implode(' | ', (array)$update_actions)); + } +} + +/** + * Plugin Installer Skin for WordPress Plugin Installer. + * + * @package WordPress + * @subpackage Upgrader + * @since 2.8.0 + */ +class Plugin_Installer_Skin extends WP_Upgrader_Skin { + var $api; + var $type; + + function __construct($args = array()) { + $defaults = array( 'type' => 'web', 'url' => '', 'plugin' => '', 'nonce' => '', 'title' => '' ); + $args = wp_parse_args($args, $defaults); + + $this->type = $args['type']; + $this->api = isset($args['api']) ? $args['api'] : array(); + + parent::__construct($args); + } + + function before() { + if ( !empty($this->api) ) + $this->upgrader->strings['process_success'] = sprintf( __('Successfully installed the plugin %s %s.'), $this->api->name, $this->api->version); + } + + function after() { + + $plugin_file = $this->upgrader->plugin_info(); + + $install_actions = array(); + + $from = isset($_GET['from']) ? wp_unslash( $_GET['from'] ) : 'plugins'; + + if ( 'import' == $from ) + $install_actions['activate_plugin'] = '' . __('Activate Plugin & Run Importer') . ''; + else + $install_actions['activate_plugin'] = '' . __('Activate Plugin') . ''; + + if ( is_multisite() && current_user_can( 'manage_network_plugins' ) ) { + $install_actions['network_activate'] = '' . __('Network Activate') . ''; + unset( $install_actions['activate_plugin'] ); + } + + if ( 'import' == $from ) + $install_actions['importers_page'] = '' . __('Return to Importers') . ''; + else if ( $this->type == 'web' ) + $install_actions['plugins_page'] = '' . __('Return to Plugin Installer') . ''; + else + $install_actions['plugins_page'] = '' . __('Return to Plugins page') . ''; + + if ( ! $this->result || is_wp_error($this->result) ) { + unset( $install_actions['activate_plugin'], $install_actions['network_activate'] ); + } elseif ( ! current_user_can( 'activate_plugins' ) ) { + unset( $install_actions['activate_plugin'] ); + } + + /** + * Filter the list of action links available following a single plugin installation. + * + * @since 2.7.0 + * + * @param array $install_actions Array of plugin action links. + * @param object $api Object containing WordPress.org API plugin data. Empty + * for non-API installs, such as when a plugin is installed + * via upload. + * @param string $plugin_file Path to the plugin file. + */ + $install_actions = apply_filters( 'install_plugin_complete_actions', $install_actions, $this->api, $plugin_file ); + + if ( ! empty($install_actions) ) + $this->feedback(implode(' | ', (array)$install_actions)); + } +} + +/** + * Theme Installer Skin for the WordPress Theme Installer. + * + * @package WordPress + * @subpackage Upgrader + * @since 2.8.0 + */ +class Theme_Installer_Skin extends WP_Upgrader_Skin { + var $api; + var $type; + + function __construct($args = array()) { + $defaults = array( 'type' => 'web', 'url' => '', 'theme' => '', 'nonce' => '', 'title' => '' ); + $args = wp_parse_args($args, $defaults); + + $this->type = $args['type']; + $this->api = isset($args['api']) ? $args['api'] : array(); + + parent::__construct($args); + } + + function before() { + if ( !empty($this->api) ) + $this->upgrader->strings['process_success'] = sprintf( $this->upgrader->strings['process_success_specific'], $this->api->name, $this->api->version); + } + + function after() { + if ( empty($this->upgrader->result['destination_name']) ) + return; + + $theme_info = $this->upgrader->theme_info(); + if ( empty( $theme_info ) ) + return; + + $name = $theme_info->display('Name'); + $stylesheet = $this->upgrader->result['destination_name']; + $template = $theme_info->get_template(); + + $preview_link = add_query_arg( array( + 'preview' => 1, + 'template' => urlencode( $template ), + 'stylesheet' => urlencode( $stylesheet ), + ), trailingslashit( home_url() ) ); + + $activate_link = add_query_arg( array( + 'action' => 'activate', + 'template' => urlencode( $template ), + 'stylesheet' => urlencode( $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' ) . ''; + + if ( $this->type == 'web' ) + $install_actions['themes_page'] = '' . __('Return to Theme Installer') . ''; + elseif ( current_user_can( 'switch_themes' ) || current_user_can( 'edit_theme_options' ) ) + $install_actions['themes_page'] = '' . __('Return to Themes page') . ''; + + if ( ! $this->result || is_wp_error($this->result) || is_network_admin() || ! current_user_can( 'switch_themes' ) ) + unset( $install_actions['activate'], $install_actions['preview'] ); + + /** + * Filter the list of action links available following a single theme installation. + * + * @since 2.8.0 + * + * @param array $install_actions Array of theme action links. + * @param object $api Object containing WordPress.org API theme data. + * @param string $stylesheet Theme directory name. + * @param WP_Theme $theme_info Theme object. + */ + $install_actions = apply_filters( 'install_theme_complete_actions', $install_actions, $this->api, $stylesheet, $theme_info ); + if ( ! empty($install_actions) ) + $this->feedback(implode(' | ', (array)$install_actions)); + } +} + +/** + * Theme Upgrader Skin for WordPress Theme Upgrades. + * + * @package WordPress + * @subpackage Upgrader + * @since 2.8.0 + */ +class Theme_Upgrader_Skin extends WP_Upgrader_Skin { + var $theme = ''; + + function __construct($args = array()) { + $defaults = array( 'url' => '', 'theme' => '', 'nonce' => '', 'title' => __('Update Theme') ); + $args = wp_parse_args($args, $defaults); + + $this->theme = $args['theme']; + + parent::__construct($args); + } + + function after() { + $this->decrement_update_count( 'theme' ); + + $update_actions = array(); + 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 = $theme_info->get_template(); + + $preview_link = add_query_arg( array( + 'preview' => 1, + 'template' => urlencode( $template ), + 'stylesheet' => urlencode( $stylesheet ), + ), trailingslashit( home_url() ) ); + + $activate_link = add_query_arg( array( + 'action' => 'activate', + 'template' => urlencode( $template ), + 'stylesheet' => urlencode( $stylesheet ), + ), admin_url('themes.php') ); + $activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet ); + + if ( get_stylesheet() == $stylesheet ) { + if ( current_user_can( 'edit_theme_options' ) ) + $update_actions['preview'] = '' . __('Customize') . ''; + } elseif ( current_user_can( 'switch_themes' ) ) { + $update_actions['preview'] = '' . __('Preview') . ''; + $update_actions['preview'] .= '' . __('Live Preview') . ''; + $update_actions['activate'] = '' . __('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') . ''; + + /** + * Filter the list of action links available following a single theme update. + * + * @since 2.8.0 + * + * @param array $update_actions Array of theme action links. + * @param string $theme Theme directory name. + */ + $update_actions = apply_filters( 'update_theme_complete_actions', $update_actions, $this->theme ); + + if ( ! empty($update_actions) ) + $this->feedback(implode(' | ', (array)$update_actions)); + } +} + +/** + * Translation Upgrader Skin for WordPress Translation Upgrades. + * + * @package WordPress + * @subpackage Upgrader + * @since 3.7.0 + */ +class Language_Pack_Upgrader_Skin extends WP_Upgrader_Skin { + var $language_update = null; + var $done_header = false; + var $display_footer_actions = true; + + function __construct( $args = array() ) { + $defaults = array( 'url' => '', 'nonce' => '', 'title' => __( 'Update Translations' ), 'skip_header_footer' => false ); + $args = wp_parse_args( $args, $defaults ); + if ( $args['skip_header_footer'] ) { + $this->done_header = true; + $this->display_footer_actions = false; + } + parent::__construct( $args ); + } + + function before() { + $name = $this->upgrader->get_name_for_update( $this->language_update ); + + echo '
'; + + printf( '

' . __( 'Updating translations for %1$s (%2$s)…' ) . '

', $name, $this->language_update->language ); + } + + function error( $error ) { + echo '
'; + parent::error( $error ); + echo '
'; + } + + function after() { + echo '
'; + } + + function bulk_footer() { + $this->decrement_update_count( 'translation' ); + $update_actions = array(); + $update_actions['updates_page'] = '' . __( 'Return to WordPress Updates' ) . ''; + + /** + * Filter the list of action links available following a translations update. + * + * @since 3.7.0 + * + * @param array $update_actions Array of translations update links. + */ + $update_actions = apply_filters( 'update_translations_complete_actions', $update_actions ); + + if ( $update_actions && $this->display_footer_actions ) + $this->feedback( implode( ' | ', $update_actions ) ); + + parent::footer(); + } +} + +/** + * Upgrader Skin for Automatic WordPress Upgrades + * + * This skin is designed to be used when no output is intended, all output + * is captured and stored for the caller to process and log/email/discard. + * + * @package WordPress + * @subpackage Upgrader + * @since 3.7.0 + */ +class Automatic_Upgrader_Skin extends WP_Upgrader_Skin { + protected $messages = array(); + + function request_filesystem_credentials( $error = false, $context = '' ) { + if ( $context ) + $this->options['context'] = $context; + // TODO: fix up request_filesystem_credentials(), or split it, to allow us to request a no-output version + // This will output a credentials form in event of failure, We don't want that, so just hide with a buffer + ob_start(); + $result = parent::request_filesystem_credentials( $error ); + ob_end_clean(); + return $result; + } + + function get_upgrade_messages() { + return $this->messages; + } + + function feedback( $data ) { + if ( is_wp_error( $data ) ) + $string = $data->get_error_message(); + else if ( is_array( $data ) ) + return; + else + $string = $data; + + if ( ! empty( $this->upgrader->strings[ $string ] ) ) + $string = $this->upgrader->strings[ $string ]; + + if ( strpos( $string, '%' ) !== false ) { + $args = func_get_args(); + $args = array_splice( $args, 1 ); + if ( ! empty( $args ) ) + $string = vsprintf( $string, $args ); + } + + $string = trim( $string ); + + // Only allow basic HTML in the messages, as it'll be used in emails/logs rather than direct browser output. + $string = wp_kses( $string, array( + 'a' => array( + 'href' => true + ), + 'br' => true, + 'em' => true, + 'strong' => true, + ) ); + + if ( empty( $string ) ) + return; + + $this->messages[] = $string; + } + + function header() { + ob_start(); + } + + function footer() { + $output = ob_get_contents(); + if ( ! empty( $output ) ) + $this->feedback( $output ); + ob_end_clean(); + } + + function bulk_header() {} + function bulk_footer() {} + function before() {} + function after() {} +} diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php new file mode 100644 index 0000000..6db2c27 --- /dev/null +++ b/wp-admin/includes/class-wp-upgrader.php @@ -0,0 +1,2602 @@ +skin = new WP_Upgrader_Skin(); + else + $this->skin = $skin; + } + + function init() { + $this->skin->set_upgrader($this); + $this->generic_strings(); + } + + function generic_strings() { + $this->strings['bad_request'] = __('Invalid Data provided.'); + $this->strings['fs_unavailable'] = __('Could not access filesystem.'); + $this->strings['fs_error'] = __('Filesystem error.'); + $this->strings['fs_no_root_dir'] = __('Unable to locate WordPress Root directory.'); + $this->strings['fs_no_content_dir'] = __('Unable to locate WordPress Content directory (wp-content).'); + $this->strings['fs_no_plugins_dir'] = __('Unable to locate WordPress Plugin directory.'); + $this->strings['fs_no_themes_dir'] = __('Unable to locate WordPress Theme directory.'); + /* translators: %s: directory name */ + $this->strings['fs_no_folder'] = __('Unable to locate needed folder (%s).'); + + $this->strings['download_failed'] = __('Download failed.'); + $this->strings['installing_package'] = __('Installing the latest version…'); + $this->strings['no_files'] = __('The package contains no files.'); + $this->strings['folder_exists'] = __('Destination folder already exists.'); + $this->strings['mkdir_failed'] = __('Could not create directory.'); + $this->strings['incompatible_archive'] = __('The package could not be installed.'); + + $this->strings['maintenance_start'] = __('Enabling Maintenance mode…'); + $this->strings['maintenance_end'] = __('Disabling Maintenance mode…'); + } + + function fs_connect( $directories = array() ) { + global $wp_filesystem; + + if ( false === ($credentials = $this->skin->request_filesystem_credentials()) ) + return false; + + if ( ! WP_Filesystem($credentials) ) { + $error = true; + if ( is_object($wp_filesystem) && $wp_filesystem->errors->get_error_code() ) + $error = $wp_filesystem->errors; + $this->skin->request_filesystem_credentials($error); //Failed to connect, Error and request again + return false; + } + + if ( ! is_object($wp_filesystem) ) + return new WP_Error('fs_unavailable', $this->strings['fs_unavailable'] ); + + if ( is_wp_error($wp_filesystem->errors) && $wp_filesystem->errors->get_error_code() ) + return new WP_Error('fs_error', $this->strings['fs_error'], $wp_filesystem->errors); + + foreach ( (array)$directories as $dir ) { + switch ( $dir ) { + case ABSPATH: + if ( ! $wp_filesystem->abspath() ) + return new WP_Error('fs_no_root_dir', $this->strings['fs_no_root_dir']); + break; + case WP_CONTENT_DIR: + if ( ! $wp_filesystem->wp_content_dir() ) + return new WP_Error('fs_no_content_dir', $this->strings['fs_no_content_dir']); + break; + case WP_PLUGIN_DIR: + if ( ! $wp_filesystem->wp_plugins_dir() ) + return new WP_Error('fs_no_plugins_dir', $this->strings['fs_no_plugins_dir']); + break; + case get_theme_root(): + if ( ! $wp_filesystem->wp_themes_dir() ) + return new WP_Error('fs_no_themes_dir', $this->strings['fs_no_themes_dir']); + break; + default: + if ( ! $wp_filesystem->find_folder($dir) ) + return new WP_Error( 'fs_no_folder', sprintf( $this->strings['fs_no_folder'], esc_html( basename( $dir ) ) ) ); + break; + } + } + return true; + } //end fs_connect(); + + function download_package($package) { + + /** + * Filter whether to return the package. + * + * @since 3.7.0 + * + * @param bool $reply Whether to bail without returning the package. + * Default false. + * @param string $package The package file name. + * @param WP_Upgrader $this The WP_Upgrader instance. + */ + $reply = apply_filters( 'upgrader_pre_download', false, $package, $this ); + if ( false !== $reply ) + return $reply; + + if ( ! preg_match('!^(http|https|ftp)://!i', $package) && file_exists($package) ) //Local file or remote? + return $package; //must be a local file.. + + if ( empty($package) ) + return new WP_Error('no_package', $this->strings['no_package']); + + $this->skin->feedback('downloading_package', $package); + + $download_file = download_url($package); + + if ( is_wp_error($download_file) ) + return new WP_Error('download_failed', $this->strings['download_failed'], $download_file->get_error_message()); + + return $download_file; + } + + function unpack_package($package, $delete_package = true) { + global $wp_filesystem; + + $this->skin->feedback('unpack_package'); + + $upgrade_folder = $wp_filesystem->wp_content_dir() . 'upgrade/'; + + //Clean up contents of upgrade directory beforehand. + $upgrade_files = $wp_filesystem->dirlist($upgrade_folder); + if ( !empty($upgrade_files) ) { + foreach ( $upgrade_files as $file ) + $wp_filesystem->delete($upgrade_folder . $file['name'], true); + } + + //We need a working directory + $working_dir = $upgrade_folder . basename($package, '.zip'); + + // Clean up working directory + if ( $wp_filesystem->is_dir($working_dir) ) + $wp_filesystem->delete($working_dir, true); + + // Unzip package to working directory + $result = unzip_file( $package, $working_dir ); + + // Once extracted, delete the package if required. + if ( $delete_package ) + unlink($package); + + if ( is_wp_error($result) ) { + $wp_filesystem->delete($working_dir, true); + if ( 'incompatible_archive' == $result->get_error_code() ) { + return new WP_Error( 'incompatible_archive', $this->strings['incompatible_archive'], $result->get_error_data() ); + } + return $result; + } + + return $working_dir; + } + + function install_package( $args = array() ) { + global $wp_filesystem, $wp_theme_directories; + + $defaults = array( + 'source' => '', // Please always pass this + 'destination' => '', // and this + 'clear_destination' => false, + 'clear_working' => false, + 'abort_if_destination_exists' => true, + 'hook_extra' => array() + ); + + $args = wp_parse_args($args, $defaults); + extract($args); + + @set_time_limit( 300 ); + + if ( empty($source) || empty($destination) ) + return new WP_Error('bad_request', $this->strings['bad_request']); + + $this->skin->feedback('installing_package'); + + /** + * Filter the install response before the installation has started. + * + * Returning a truthy value, or one that could be evaluated as a WP_Error + * will effectively short-circuit the installation, returning that value + * instead. + * + * @since 2.8.0 + * + * @param bool|WP_Error $response Response. + * @param array $hook_extra Extra arguments passed to hooked filters. + */ + $res = apply_filters( 'upgrader_pre_install', true, $hook_extra ); + if ( is_wp_error($res) ) + return $res; + + //Retain the Original source and destinations + $remote_source = $source; + $local_destination = $destination; + + $source_files = array_keys( $wp_filesystem->dirlist($remote_source) ); + $remote_destination = $wp_filesystem->find_folder($local_destination); + + //Locate which directory to copy to the new folder, This is based on the actual folder holding the files. + if ( 1 == count($source_files) && $wp_filesystem->is_dir( trailingslashit($source) . $source_files[0] . '/') ) //Only one folder? Then we want its contents. + $source = trailingslashit($source) . trailingslashit($source_files[0]); + elseif ( count($source_files) == 0 ) + return new WP_Error( 'incompatible_archive_empty', $this->strings['incompatible_archive'], $this->strings['no_files'] ); // There are no files? + else //It's only a single file, the upgrader will use the foldername of this file as the destination folder. foldername is based on zip filename. + $source = trailingslashit($source); + + /** + * Filter the source file location for the upgrade package. + * + * @since 2.8.0 + * + * @param string $source File source location. + * @param string $remote_source Remove file source location. + * @param WP_Upgrader $this WP_Upgrader instance. + */ + $source = apply_filters( 'upgrader_source_selection', $source, $remote_source, $this ); + if ( is_wp_error($source) ) + return $source; + + //Has the source location changed? If so, we need a new source_files list. + if ( $source !== $remote_source ) + $source_files = array_keys( $wp_filesystem->dirlist($source) ); + + // Protection against deleting files in any important base directories. + // Theme_Upgrader & Plugin_Upgrader also trigger this, as they pass the destination directory (WP_PLUGIN_DIR / wp-content/themes) + // intending to copy the directory into the directory, whilst they pass the source as the actual files to copy. + $protected_directories = array( ABSPATH, WP_CONTENT_DIR, WP_PLUGIN_DIR, WP_CONTENT_DIR . '/themes' ); + if ( is_array( $wp_theme_directories ) ) + $protected_directories = array_merge( $protected_directories, $wp_theme_directories ); + if ( in_array( $destination, $protected_directories ) ) { + $remote_destination = trailingslashit($remote_destination) . trailingslashit(basename($source)); + $destination = trailingslashit($destination) . trailingslashit(basename($source)); + } + + if ( $clear_destination ) { + //We're going to clear the destination if there's something there + $this->skin->feedback('remove_old'); + $removed = true; + if ( $wp_filesystem->exists($remote_destination) ) + $removed = $wp_filesystem->delete($remote_destination, true); + + /** + * Filter whether the upgrader cleared the destination. + * + * @since 2.8.0 + * + * @param bool $removed Whether the destination was cleared. + * @param string $local_destination The local package destination. + * @param string $remote_destination The remote package destination. + * @param array $hook_extra Extra arguments passed to hooked filters. + */ + $removed = apply_filters( 'upgrader_clear_destination', $removed, $local_destination, $remote_destination, $hook_extra ); + + if ( is_wp_error($removed) ) + return $removed; + else if ( ! $removed ) + return new WP_Error('remove_old_failed', $this->strings['remove_old_failed']); + } elseif ( $abort_if_destination_exists && $wp_filesystem->exists($remote_destination) ) { + //If we're not clearing the destination folder and something exists there already, Bail. + //But first check to see if there are actually any files in the folder. + $_files = $wp_filesystem->dirlist($remote_destination); + if ( ! empty($_files) ) { + $wp_filesystem->delete($remote_source, true); //Clear out the source files. + return new WP_Error('folder_exists', $this->strings['folder_exists'], $remote_destination ); + } + } + + //Create destination if needed + if ( !$wp_filesystem->exists($remote_destination) ) + if ( !$wp_filesystem->mkdir($remote_destination, FS_CHMOD_DIR) ) + return new WP_Error( 'mkdir_failed_destination', $this->strings['mkdir_failed'], $remote_destination ); + + // Copy new version of item into place. + $result = copy_dir($source, $remote_destination); + if ( is_wp_error($result) ) { + if ( $clear_working ) + $wp_filesystem->delete($remote_source, true); + return $result; + } + + //Clear the Working folder? + if ( $clear_working ) + $wp_filesystem->delete($remote_source, true); + + $destination_name = basename( str_replace($local_destination, '', $destination) ); + if ( '.' == $destination_name ) + $destination_name = ''; + + $this->result = compact('local_source', 'source', 'source_name', 'source_files', 'destination', 'destination_name', 'local_destination', 'remote_destination', 'clear_destination', 'delete_source_dir'); + + /** + * Filter the install response after the installation has finished. + * + * @since 2.8.0 + * + * @param bool $response Install response. + * @param array $hook_extra Extra arguments passed to hooked filters. + * @param array $result Installation result data. + */ + $res = apply_filters( 'upgrader_post_install', true, $hook_extra, $this->result ); + + if ( is_wp_error($res) ) { + $this->result = $res; + return $res; + } + + //Bombard the calling function will all the info which we've just used. + return $this->result; + } + + function run($options) { + + $defaults = array( + 'package' => '', // Please always pass this. + 'destination' => '', // And this + 'clear_destination' => false, + 'abort_if_destination_exists' => true, // Abort if the Destination directory exists, Pass clear_destination as false please + 'clear_working' => true, + 'is_multi' => false, + 'hook_extra' => array() // Pass any extra $hook_extra args here, this will be passed to any hooked filters. + ); + + $options = wp_parse_args($options, $defaults); + extract($options); + + if ( ! $is_multi ) // call $this->header separately if running multiple times + $this->skin->header(); + + // Connect to the Filesystem first. + $res = $this->fs_connect( array(WP_CONTENT_DIR, $destination) ); + // Mainly for non-connected filesystem. + if ( ! $res ) { + if ( ! $is_multi ) + $this->skin->footer(); + return false; + } + + $this->skin->before(); + + if ( is_wp_error($res) ) { + $this->skin->error($res); + $this->skin->after(); + if ( ! $is_multi ) + $this->skin->footer(); + return $res; + } + + //Download the package (Note, This just returns the filename of the file if the package is a local file) + $download = $this->download_package( $package ); + if ( is_wp_error($download) ) { + $this->skin->error($download); + $this->skin->after(); + if ( ! $is_multi ) + $this->skin->footer(); + return $download; + } + + $delete_package = ($download != $package); // Do not delete a "local" file + + //Unzips the file into a temporary directory + $working_dir = $this->unpack_package( $download, $delete_package ); + if ( is_wp_error($working_dir) ) { + $this->skin->error($working_dir); + $this->skin->after(); + if ( ! $is_multi ) + $this->skin->footer(); + return $working_dir; + } + + //With the given options, this installs it to the destination directory. + $result = $this->install_package( array( + 'source' => $working_dir, + 'destination' => $destination, + 'clear_destination' => $clear_destination, + 'abort_if_destination_exists' => $abort_if_destination_exists, + 'clear_working' => $clear_working, + 'hook_extra' => $hook_extra + ) ); + + $this->skin->set_result($result); + if ( is_wp_error($result) ) { + $this->skin->error($result); + $this->skin->feedback('process_failed'); + } else { + //Install Succeeded + $this->skin->feedback('process_success'); + } + + $this->skin->after(); + + if ( ! $is_multi ) { + + /** This action is documented in wp-admin/includes/class-wp-upgrader.php */ + do_action( 'upgrader_process_complete', $this, $hook_extra ); + $this->skin->footer(); + } + + return $result; + } + + function maintenance_mode($enable = false) { + global $wp_filesystem; + $file = $wp_filesystem->abspath() . '.maintenance'; + if ( $enable ) { + $this->skin->feedback('maintenance_start'); + // Create maintenance file to signal that we are upgrading + $maintenance_string = ''; + $wp_filesystem->delete($file); + $wp_filesystem->put_contents($file, $maintenance_string, FS_CHMOD_FILE); + } else if ( !$enable && $wp_filesystem->exists($file) ) { + $this->skin->feedback('maintenance_end'); + $wp_filesystem->delete($file); + } + } + +} + +/** + * Plugin Upgrader class for WordPress Plugins, It is designed to upgrade/install plugins from a local zip, remote zip URL, or uploaded zip file. + * + * @package WordPress + * @subpackage Upgrader + * @since 2.8.0 + */ +class Plugin_Upgrader extends WP_Upgrader { + + var $result; + var $bulk = false; + + function upgrade_strings() { + $this->strings['up_to_date'] = __('The plugin is at the latest version.'); + $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['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.'); + $this->strings['process_success'] = __('Plugin updated successfully.'); + } + + function install_strings() { + $this->strings['no_package'] = __('Install package not available.'); + $this->strings['downloading_package'] = __('Downloading install package from %s…'); + $this->strings['unpack_package'] = __('Unpacking the package…'); + $this->strings['installing_package'] = __('Installing the plugin…'); + $this->strings['no_files'] = __('The plugin contains no files.'); + $this->strings['process_failed'] = __('Plugin install failed.'); + $this->strings['process_success'] = __('Plugin installed successfully.'); + } + + function install( $package, $args = array() ) { + + $defaults = array( + 'clear_update_cache' => true, + ); + $parsed_args = wp_parse_args( $args, $defaults ); + + $this->init(); + $this->install_strings(); + + add_filter('upgrader_source_selection', array($this, 'check_package') ); + + $this->run( array( + 'package' => $package, + 'destination' => WP_PLUGIN_DIR, + 'clear_destination' => false, // Do not overwrite files. + 'clear_working' => true, + 'hook_extra' => array( + 'type' => 'plugin', + 'action' => 'install', + ) + ) ); + + remove_filter('upgrader_source_selection', array($this, 'check_package') ); + + if ( ! $this->result || is_wp_error($this->result) ) + return $this->result; + + // Force refresh of plugin update information + wp_clean_plugins_cache( $parsed_args['clear_update_cache'] ); + + return true; + } + + function upgrade( $plugin, $args = array() ) { + + $defaults = array( + 'clear_update_cache' => true, + ); + $parsed_args = wp_parse_args( $args, $defaults ); + + $this->init(); + $this->upgrade_strings(); + + $current = get_site_transient( 'update_plugins' ); + if ( !isset( $current->response[ $plugin ] ) ) { + $this->skin->before(); + $this->skin->set_result(false); + $this->skin->error('up_to_date'); + $this->skin->after(); + return false; + } + + // Get the URL to the zip file + $r = $current->response[ $plugin ]; + + add_filter('upgrader_pre_install', array($this, 'deactivate_plugin_before_upgrade'), 10, 2); + add_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'), 10, 4); + //'source_selection' => array($this, 'source_selection'), //there's a trac ticket to move up the directory for zip's which are made a bit differently, useful for non-.org plugins. + + $this->run( array( + 'package' => $r->package, + 'destination' => WP_PLUGIN_DIR, + 'clear_destination' => true, + 'clear_working' => true, + 'hook_extra' => array( + 'plugin' => $plugin, + 'type' => 'plugin', + 'action' => 'update', + ), + ) ); + + // Cleanup our hooks, in case something else does a upgrade on this connection. + remove_filter('upgrader_pre_install', array($this, 'deactivate_plugin_before_upgrade')); + remove_filter('upgrader_clear_destination', array($this, 'delete_old_plugin')); + + if ( ! $this->result || is_wp_error($this->result) ) + return $this->result; + + // Force refresh of plugin update information + wp_clean_plugins_cache( $parsed_args['clear_update_cache'] ); + + return true; + } + + function bulk_upgrade( $plugins, $args = array() ) { + + $defaults = array( + 'clear_update_cache' => true, + ); + $parsed_args = wp_parse_args( $args, $defaults ); + + $this->init(); + $this->bulk = true; + $this->upgrade_strings(); + + $current = get_site_transient( 'update_plugins' ); + + add_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'), 10, 4); + + $this->skin->header(); + + // Connect to the Filesystem first. + $res = $this->fs_connect( array(WP_CONTENT_DIR, WP_PLUGIN_DIR) ); + if ( ! $res ) { + $this->skin->footer(); + return false; + } + + $this->skin->bulk_header(); + + // Only start maintenance mode if: + // - running Multisite and there are one or more plugins specified, OR + // - a plugin with an update available is currently active. + // @TODO: For multisite, maintenance mode should only kick in for individual sites if at all possible. + $maintenance = ( is_multisite() && ! empty( $plugins ) ); + foreach ( $plugins as $plugin ) + $maintenance = $maintenance || ( is_plugin_active( $plugin ) && isset( $current->response[ $plugin] ) ); + if ( $maintenance ) + $this->maintenance_mode(true); + + $results = array(); + + $this->update_count = count($plugins); + $this->update_current = 0; + foreach ( $plugins as $plugin ) { + $this->update_current++; + $this->skin->plugin_info = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin, false, true); + + if ( !isset( $current->response[ $plugin ] ) ) { + $this->skin->set_result('up_to_date'); + $this->skin->before(); + $this->skin->feedback('up_to_date'); + $this->skin->after(); + $results[$plugin] = true; + continue; + } + + // Get the URL to the zip file + $r = $current->response[ $plugin ]; + + $this->skin->plugin_active = is_plugin_active($plugin); + + $result = $this->run( array( + 'package' => $r->package, + 'destination' => WP_PLUGIN_DIR, + 'clear_destination' => true, + 'clear_working' => true, + 'is_multi' => true, + 'hook_extra' => array( + 'plugin' => $plugin + ) + ) ); + + $results[$plugin] = $this->result; + + // Prevent credentials auth screen from displaying multiple times + if ( false === $result ) + break; + } //end foreach $plugins + + $this->maintenance_mode(false); + + /** + * Fires when the bulk upgrader process is complete. + * + * @since 3.6.0 + * + * @param Plugin_Upgrader $this Plugin_Upgrader instance. In other contexts, $this, might + * be a Theme_Upgrader or Core_Upgrade instance. + * @param array $data { + * Array of bulk item update data. + * + * @type string $action Type of action. Default 'update'. + * @type string $type Type of update process. Accepts 'plugin', 'theme', or 'core'. + * @type bool $bulk Whether the update process is a bulk update. Default true. + * @type array $packages Array of plugin, theme, or core packages to update. + * } + */ + do_action( 'upgrader_process_complete', $this, array( + 'action' => 'update', + 'type' => 'plugin', + 'bulk' => true, + 'plugins' => $plugins, + ) ); + + $this->skin->bulk_footer(); + + $this->skin->footer(); + + // Cleanup our hooks, in case something else does a upgrade on this connection. + remove_filter('upgrader_clear_destination', array($this, 'delete_old_plugin')); + + // Force refresh of plugin update information + wp_clean_plugins_cache( $parsed_args['clear_update_cache'] ); + + return $results; + } + + function check_package($source) { + global $wp_filesystem; + + if ( is_wp_error($source) ) + return $source; + + $working_directory = str_replace( $wp_filesystem->wp_content_dir(), trailingslashit(WP_CONTENT_DIR), $source); + if ( ! is_dir($working_directory) ) // Sanity check, if the above fails, lets not prevent installation. + return $source; + + // Check the folder contains at least 1 valid plugin. + $plugins_found = false; + foreach ( glob( $working_directory . '*.php' ) as $file ) { + $info = get_plugin_data($file, false, false); + if ( !empty( $info['Name'] ) ) { + $plugins_found = true; + break; + } + } + + if ( ! $plugins_found ) + return new WP_Error( 'incompatible_archive_no_plugins', $this->strings['incompatible_archive'], __( 'No valid plugins were found.' ) ); + + return $source; + } + + //return plugin info. + function plugin_info() { + if ( ! is_array($this->result) ) + return false; + if ( empty($this->result['destination_name']) ) + return false; + + $plugin = get_plugins('/' . $this->result['destination_name']); //Ensure to pass with leading slash + if ( empty($plugin) ) + return false; + + $pluginfiles = array_keys($plugin); //Assume the requested plugin is the first in the list + + return $this->result['destination_name'] . '/' . $pluginfiles[0]; + } + + //Hooked to pre_install + function deactivate_plugin_before_upgrade($return, $plugin) { + + if ( is_wp_error($return) ) //Bypass. + return $return; + + // When in cron (background updates) don't deactivate the plugin, as we require a browser to reactivate it + if ( defined( 'DOING_CRON' ) && DOING_CRON ) + return $return; + + $plugin = isset($plugin['plugin']) ? $plugin['plugin'] : ''; + if ( empty($plugin) ) + return new WP_Error('bad_request', $this->strings['bad_request']); + + if ( is_plugin_active($plugin) ) { + //Deactivate the plugin silently, Prevent deactivation hooks from running. + deactivate_plugins($plugin, true); + } + } + + //Hooked to upgrade_clear_destination + function delete_old_plugin($removed, $local_destination, $remote_destination, $plugin) { + global $wp_filesystem; + + if ( is_wp_error($removed) ) + return $removed; //Pass errors through. + + $plugin = isset($plugin['plugin']) ? $plugin['plugin'] : ''; + if ( empty($plugin) ) + return new WP_Error('bad_request', $this->strings['bad_request']); + + $plugins_dir = $wp_filesystem->wp_plugins_dir(); + $this_plugin_dir = trailingslashit( dirname($plugins_dir . $plugin) ); + + if ( ! $wp_filesystem->exists($this_plugin_dir) ) //If it's already vanished. + return $removed; + + // If plugin is in its own directory, recursively delete the directory. + if ( strpos($plugin, '/') && $this_plugin_dir != $plugins_dir ) //base check on if plugin includes directory separator AND that it's not the root plugin folder + $deleted = $wp_filesystem->delete($this_plugin_dir, true); + else + $deleted = $wp_filesystem->delete($plugins_dir . $plugin); + + if ( ! $deleted ) + return new WP_Error('remove_old_failed', $this->strings['remove_old_failed']); + + return true; + } +} + +/** + * Theme Upgrader class for WordPress Themes, It is designed to upgrade/install themes from a local zip, remote zip URL, or uploaded zip file. + * + * @package WordPress + * @subpackage Upgrader + * @since 2.8.0 + */ +class Theme_Upgrader extends WP_Upgrader { + + var $result; + var $bulk = false; + + function upgrade_strings() { + $this->strings['up_to_date'] = __('The theme is at the latest version.'); + $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['remove_old'] = __('Removing the old version of the theme…'); + $this->strings['remove_old_failed'] = __('Could not remove the old theme.'); + $this->strings['process_failed'] = __('Theme update failed.'); + $this->strings['process_success'] = __('Theme updated successfully.'); + } + + function install_strings() { + $this->strings['no_package'] = __('Install package not available.'); + $this->strings['downloading_package'] = __('Downloading install package from %s…'); + $this->strings['unpack_package'] = __('Unpacking the package…'); + $this->strings['installing_package'] = __('Installing the theme…'); + $this->strings['no_files'] = __('The theme contains no files.'); + $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' => get_theme_root(), + '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, $args = array() ) { + + $defaults = array( + 'clear_update_cache' => true, + ); + $parsed_args = wp_parse_args( $args, $defaults ); + + $this->init(); + $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); + + $this->run( array( + 'package' => $package, + 'destination' => get_theme_root(), + 'clear_destination' => false, //Do not overwrite files. + 'clear_working' => true, + 'hook_extra' => array( + 'type' => 'theme', + 'action' => 'install', + ), + ) ); + + remove_filter('upgrader_source_selection', array($this, 'check_package') ); + remove_filter('upgrader_post_install', array($this, 'check_parent_theme_filter')); + + if ( ! $this->result || is_wp_error($this->result) ) + return $this->result; + + // Refresh the Theme Update information + wp_clean_themes_cache( $parsed_args['clear_update_cache'] ); + + return true; + } + + function upgrade( $theme, $args = array() ) { + + $defaults = array( + 'clear_update_cache' => true, + ); + $parsed_args = wp_parse_args( $args, $defaults ); + + $this->init(); + $this->upgrade_strings(); + + // Is an update available? + $current = get_site_transient( 'update_themes' ); + if ( !isset( $current->response[ $theme ] ) ) { + $this->skin->before(); + $this->skin->set_result(false); + $this->skin->error( 'up_to_date' ); + $this->skin->after(); + return false; + } + + $r = $current->response[ $theme ]; + + add_filter('upgrader_pre_install', array($this, 'current_before'), 10, 2); + add_filter('upgrader_post_install', array($this, 'current_after'), 10, 2); + add_filter('upgrader_clear_destination', array($this, 'delete_old_theme'), 10, 4); + + $this->run( array( + 'package' => $r['package'], + 'destination' => get_theme_root( $theme ), + 'clear_destination' => true, + 'clear_working' => true, + 'hook_extra' => array( + 'theme' => $theme, + 'type' => 'theme', + 'action' => 'update', + ), + ) ); + + remove_filter('upgrader_pre_install', array($this, 'current_before')); + remove_filter('upgrader_post_install', array($this, 'current_after')); + remove_filter('upgrader_clear_destination', array($this, 'delete_old_theme')); + + if ( ! $this->result || is_wp_error($this->result) ) + return $this->result; + + wp_clean_themes_cache( $parsed_args['clear_update_cache'] ); + + return true; + } + + function bulk_upgrade( $themes, $args = array() ) { + + $defaults = array( + 'clear_update_cache' => true, + ); + $parsed_args = wp_parse_args( $args, $defaults ); + + $this->init(); + $this->bulk = true; + $this->upgrade_strings(); + + $current = get_site_transient( 'update_themes' ); + + add_filter('upgrader_pre_install', array($this, 'current_before'), 10, 2); + add_filter('upgrader_post_install', array($this, 'current_after'), 10, 2); + add_filter('upgrader_clear_destination', array($this, 'delete_old_theme'), 10, 4); + + $this->skin->header(); + + // Connect to the Filesystem first. + $res = $this->fs_connect( array(WP_CONTENT_DIR) ); + if ( ! $res ) { + $this->skin->footer(); + return false; + } + + $this->skin->bulk_header(); + + // Only start maintenance mode if: + // - running Multisite and there are one or more themes specified, OR + // - a theme with an update available is currently in use. + // @TODO: For multisite, maintenance mode should only kick in for individual sites if at all possible. + $maintenance = ( is_multisite() && ! empty( $themes ) ); + foreach ( $themes as $theme ) + $maintenance = $maintenance || $theme == get_stylesheet() || $theme == get_template(); + if ( $maintenance ) + $this->maintenance_mode(true); + + $results = array(); + + $this->update_count = count($themes); + $this->update_current = 0; + foreach ( $themes as $theme ) { + $this->update_current++; + + $this->skin->theme_info = $this->theme_info($theme); + + if ( !isset( $current->response[ $theme ] ) ) { + $this->skin->set_result(true); + $this->skin->before(); + $this->skin->feedback( 'up_to_date' ); + $this->skin->after(); + $results[$theme] = true; + continue; + } + + // Get the URL to the zip file + $r = $current->response[ $theme ]; + + $result = $this->run( array( + 'package' => $r['package'], + 'destination' => get_theme_root( $theme ), + 'clear_destination' => true, + 'clear_working' => true, + 'hook_extra' => array( + 'theme' => $theme + ), + ) ); + + $results[$theme] = $this->result; + + // Prevent credentials auth screen from displaying multiple times + if ( false === $result ) + break; + } //end foreach $plugins + + $this->maintenance_mode(false); + + /** This action is documented in wp-admin/includes/class-wp-upgrader.php */ + do_action( 'upgrader_process_complete', $this, array( + 'action' => 'update', + 'type' => 'theme', + 'bulk' => true, + 'themes' => $themes, + ) ); + + $this->skin->bulk_footer(); + + $this->skin->footer(); + + // Cleanup our hooks, in case something else does a upgrade on this connection. + remove_filter('upgrader_pre_install', array($this, 'current_before')); + remove_filter('upgrader_post_install', array($this, 'current_after')); + remove_filter('upgrader_clear_destination', array($this, 'delete_old_theme')); + + // Refresh the Theme Update information + wp_clean_themes_cache( $parsed_args['clear_update_cache'] ); + + return $results; + } + + function check_package($source) { + global $wp_filesystem; + + if ( is_wp_error($source) ) + return $source; + + // Check the folder contains a valid theme + $working_directory = str_replace( $wp_filesystem->wp_content_dir(), trailingslashit(WP_CONTENT_DIR), $source); + if ( ! is_dir($working_directory) ) // Sanity check, if the above fails, lets not prevent installation. + return $source; + + // 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_theme_no_style', $this->strings['incompatible_archive'], __( 'The theme is missing the style.css stylesheet.' ) ); + + $info = get_file_data( $working_directory . 'style.css', array( 'Name' => 'Theme Name', 'Template' => 'Template' ) ); + + if ( empty( $info['Name'] ) ) + return new WP_Error( 'incompatible_archive_theme_no_name', $this->strings['incompatible_archive'], __( "The style.css stylesheet doesn't contain a valid theme header." ) ); + + // 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_theme_no_index', $this->strings['incompatible_archive'], __( 'The theme is missing the index.php file.' ) ); + + return $source; + } + + function current_before($return, $theme) { + + if ( is_wp_error($return) ) + return $return; + + $theme = isset($theme['theme']) ? $theme['theme'] : ''; + + if ( $theme != get_stylesheet() ) //If not current + return $return; + //Change to maintenance mode now. + if ( ! $this->bulk ) + $this->maintenance_mode(true); + + return $return; + } + + function current_after($return, $theme) { + if ( is_wp_error($return) ) + return $return; + + $theme = isset($theme['theme']) ? $theme['theme'] : ''; + + if ( $theme != get_stylesheet() ) // If not current + return $return; + + // Ensure stylesheet name hasn't changed after the upgrade: + if ( $theme == get_stylesheet() && $theme != $this->result['destination_name'] ) { + wp_clean_themes_cache(); + $stylesheet = $this->result['destination_name']; + switch_theme( $stylesheet ); + } + + //Time to remove maintenance mode + if ( ! $this->bulk ) + $this->maintenance_mode(false); + return $return; + } + + function delete_old_theme( $removed, $local_destination, $remote_destination, $theme ) { + global $wp_filesystem; + + if ( is_wp_error( $removed ) ) + return $removed; // Pass errors through. + + if ( ! isset( $theme['theme'] ) ) + return $removed; + + $theme = $theme['theme']; + $themes_dir = trailingslashit( $wp_filesystem->wp_themes_dir( $theme ) ); + if ( $wp_filesystem->exists( $themes_dir . $theme ) ) { + if ( ! $wp_filesystem->delete( $themes_dir . $theme, true ) ) + return false; + } + + return true; + } + + function theme_info($theme = null) { + + if ( empty($theme) ) { + if ( !empty($this->result['destination_name']) ) + $theme = $this->result['destination_name']; + else + return false; + } + return wp_get_theme( $theme ); + } + +} + +add_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 ); + +/** + * Language pack upgrader, for updating translations of plugins, themes, and core. + * + * @package WordPress + * @subpackage Upgrader + * @since 3.7.0 + */ +class Language_Pack_Upgrader extends WP_Upgrader { + + var $result; + var $bulk = true; + + static function async_upgrade( $upgrader = false ) { + // Avoid recursion. + if ( $upgrader && $upgrader instanceof Language_Pack_Upgrader ) + return; + + // Nothing to do? + $language_updates = wp_get_translation_updates(); + if ( ! $language_updates ) + return; + + $skin = new Language_Pack_Upgrader_Skin( array( + 'skip_header_footer' => true, + ) ); + + $lp_upgrader = new Language_Pack_Upgrader( $skin ); + $lp_upgrader->upgrade(); + } + + function upgrade_strings() { + $this->strings['starting_upgrade'] = __( 'Some of your translations need updating. Sit tight for a few more seconds while we update them as well.' ); + $this->strings['up_to_date'] = __( 'The translation is up to date.' ); // We need to silently skip this case + $this->strings['no_package'] = __( 'Update package not available.' ); + $this->strings['downloading_package'] = __( 'Downloading translation from %s…' ); + $this->strings['unpack_package'] = __( 'Unpacking the update…' ); + $this->strings['process_failed'] = __( 'Translation update failed.' ); + $this->strings['process_success'] = __( 'Translation updated successfully.' ); + } + + function upgrade( $update = false, $args = array() ) { + if ( $update ) + $update = array( $update ); + $results = $this->bulk_upgrade( $update, $args ); + return $results[0]; + } + + function bulk_upgrade( $language_updates = array(), $args = array() ) { + global $wp_filesystem; + + $defaults = array( + 'clear_update_cache' => true, + ); + $parsed_args = wp_parse_args( $args, $defaults ); + + $this->init(); + $this->upgrade_strings(); + + if ( ! $language_updates ) + $language_updates = wp_get_translation_updates(); + + if ( empty( $language_updates ) ) { + $this->skin->header(); + $this->skin->before(); + $this->skin->set_result( true ); + $this->skin->feedback( 'up_to_date' ); + $this->skin->after(); + $this->skin->bulk_footer(); + $this->skin->footer(); + return true; + } + + if ( 'upgrader_process_complete' == current_filter() ) + $this->skin->feedback( 'starting_upgrade' ); + + add_filter( 'upgrader_source_selection', array( &$this, 'check_package' ), 10, 3 ); + + $this->skin->header(); + + // Connect to the Filesystem first. + $res = $this->fs_connect( array( WP_CONTENT_DIR, WP_LANG_DIR ) ); + if ( ! $res ) { + $this->skin->footer(); + return false; + } + + $results = array(); + + $this->update_count = count( $language_updates ); + $this->update_current = 0; + + // The filesystem's mkdir() is not recursive. Make sure WP_LANG_DIR exists, + // as we then may need to create a /plugins or /themes directory inside of it. + $remote_destination = $wp_filesystem->find_folder( WP_LANG_DIR ); + if ( ! $wp_filesystem->exists( $remote_destination ) ) + if ( ! $wp_filesystem->mkdir( $remote_destination, FS_CHMOD_DIR ) ) + return new WP_Error( 'mkdir_failed_lang_dir', $this->strings['mkdir_failed'], $remote_destination ); + + foreach ( $language_updates as $language_update ) { + + $this->skin->language_update = $language_update; + + $destination = WP_LANG_DIR; + if ( 'plugin' == $language_update->type ) + $destination .= '/plugins'; + elseif ( 'theme' == $language_update->type ) + $destination .= '/themes'; + + $this->update_current++; + + $options = array( + 'package' => $language_update->package, + 'destination' => $destination, + 'clear_destination' => false, + 'abort_if_destination_exists' => false, // We expect the destination to exist. + 'clear_working' => true, + 'is_multi' => true, + 'hook_extra' => array( + 'language_update_type' => $language_update->type, + 'language_update' => $language_update, + ) + ); + + $result = $this->run( $options ); + + $results[] = $this->result; + + // Prevent credentials auth screen from displaying multiple times. + if ( false === $result ) + break; + } + + $this->skin->bulk_footer(); + + $this->skin->footer(); + + // Clean up our hooks, in case something else does an upgrade on this connection. + remove_filter( 'upgrader_source_selection', array( &$this, 'check_package' ), 10, 2 ); + + if ( $parsed_args['clear_update_cache'] ) { + wp_clean_themes_cache( true ); + wp_clean_plugins_cache( true ); + delete_site_transient( 'update_core' ); + } + + return $results; + } + + function check_package( $source, $remote_source ) { + global $wp_filesystem; + + if ( is_wp_error( $source ) ) + return $source; + + // Check that the folder contains a valid language. + $files = $wp_filesystem->dirlist( $remote_source ); + + // Check to see if a .po and .mo exist in the folder. + $po = $mo = false; + foreach ( (array) $files as $file => $filedata ) { + if ( '.po' == substr( $file, -3 ) ) + $po = true; + elseif ( '.mo' == substr( $file, -3 ) ) + $mo = true; + } + + if ( ! $mo || ! $po ) + return new WP_Error( 'incompatible_archive_pomo', $this->strings['incompatible_archive'], + __( 'The language pack is missing either the .po or .mo files.' ) ); + + return $source; + } + + function get_name_for_update( $update ) { + switch ( $update->type ) { + case 'core': + return 'WordPress'; // Not translated + break; + case 'theme': + $theme = wp_get_theme( $update->slug ); + if ( $theme->exists() ) + return $theme->Get( 'Name' ); + break; + case 'plugin': + $plugin_data = get_plugins( '/' . $update->slug ); + $plugin_data = array_shift( $plugin_data ); + if ( $plugin_data ) + return $plugin_data['Name']; + break; + } + return ''; + } + +} + +/** + * Core Upgrader class for WordPress. It allows for WordPress to upgrade itself in combination with the wp-admin/includes/update-core.php file + * + * @package WordPress + * @subpackage Upgrader + * @since 2.8.0 + */ +class Core_Upgrader extends WP_Upgrader { + + function upgrade_strings() { + $this->strings['up_to_date'] = __('WordPress is at the latest version.'); + $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['copy_failed'] = __('Could not copy files.'); + $this->strings['copy_failed_space'] = __('Could not copy files. You may have run out of disk space.' ); + $this->strings['start_rollback'] = __( 'Attempting to roll back to previous version.' ); + $this->strings['rollback_was_required'] = __( 'Due to an error during updating, WordPress has rolled back to your previous version.' ); + } + + function upgrade( $current, $args = array() ) { + global $wp_filesystem; + + include ABSPATH . WPINC . '/version.php'; // $wp_version; + + $start_time = time(); + + $defaults = array( + 'pre_check_md5' => true, + 'attempt_rollback' => false, + 'do_rollback' => false, + ); + $parsed_args = wp_parse_args( $args, $defaults ); + + $this->init(); + $this->upgrade_strings(); + + // Is an update available? + if ( !isset( $current->response ) || $current->response == 'latest' ) + return new WP_Error('up_to_date', $this->strings['up_to_date']); + + $res = $this->fs_connect( array(ABSPATH, WP_CONTENT_DIR) ); + if ( ! $res || is_wp_error( $res ) ) { + return $res; + } + + $wp_dir = trailingslashit($wp_filesystem->abspath()); + + $partial = true; + if ( $parsed_args['do_rollback'] ) + $partial = false; + elseif ( $parsed_args['pre_check_md5'] && ! $this->check_files() ) + $partial = false; + + /* + * If partial update is returned from the API, use that, unless we're doing + * a reinstall. If we cross the new_bundled version number, then use + * the new_bundled zip. Don't though if the constant is set to skip bundled items. + * If the API returns a no_content zip, go with it. Finally, default to the full zip. + */ + if ( $parsed_args['do_rollback'] && $current->packages->rollback ) + $to_download = 'rollback'; + elseif ( $current->packages->partial && 'reinstall' != $current->response && $wp_version == $current->partial_version && $partial ) + $to_download = 'partial'; + elseif ( $current->packages->new_bundled && version_compare( $wp_version, $current->new_bundled, '<' ) + && ( ! defined( 'CORE_UPGRADE_SKIP_NEW_BUNDLED' ) || ! CORE_UPGRADE_SKIP_NEW_BUNDLED ) ) + $to_download = 'new_bundled'; + elseif ( $current->packages->no_content ) + $to_download = 'no_content'; + else + $to_download = 'full'; + + $download = $this->download_package( $current->packages->$to_download ); + if ( is_wp_error($download) ) + return $download; + + $working_dir = $this->unpack_package( $download ); + if ( is_wp_error($working_dir) ) + return $working_dir; + + // Copy update-core.php from the new version into place. + if ( !$wp_filesystem->copy($working_dir . '/wordpress/wp-admin/includes/update-core.php', $wp_dir . 'wp-admin/includes/update-core.php', true) ) { + $wp_filesystem->delete($working_dir, true); + return new WP_Error( 'copy_failed_for_update_core_file', __( 'The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.' ), 'wp-admin/includes/update-core.php' ); + } + $wp_filesystem->chmod($wp_dir . 'wp-admin/includes/update-core.php', FS_CHMOD_FILE); + + require_once( ABSPATH . 'wp-admin/includes/update-core.php' ); + + if ( ! function_exists( 'update_core' ) ) + return new WP_Error( 'copy_failed_space', $this->strings['copy_failed_space'] ); + + $result = update_core( $working_dir, $wp_dir ); + + // In the event of an issue, we may be able to roll back. + if ( $parsed_args['attempt_rollback'] && $current->packages->rollback && ! $parsed_args['do_rollback'] ) { + $try_rollback = false; + if ( is_wp_error( $result ) ) { + $error_code = $result->get_error_code(); + // Not all errors are equal. These codes are critical: copy_failed__copy_dir, + // mkdir_failed__copy_dir, copy_failed__copy_dir_retry, and disk_full. + // do_rollback allows for update_core() to trigger a rollback if needed. + if ( false !== strpos( $error_code, 'do_rollback' ) ) + $try_rollback = true; + elseif ( false !== strpos( $error_code, '__copy_dir' ) ) + $try_rollback = true; + elseif ( 'disk_full' === $error_code ) + $try_rollback = true; + } + + if ( $try_rollback ) { + /** This filter is documented in wp-admin/includes/update-core.php */ + apply_filters( 'update_feedback', $result ); + + /** This filter is documented in wp-admin/includes/update-core.php */ + apply_filters( 'update_feedback', $this->strings['start_rollback'] ); + + $rollback_result = $this->upgrade( $current, array_merge( $parsed_args, array( 'do_rollback' => true ) ) ); + + $original_result = $result; + $result = new WP_Error( 'rollback_was_required', $this->strings['rollback_was_required'], (object) array( 'update' => $original_result, 'rollback' => $rollback_result ) ); + } + } + + /** This action is documented in wp-admin/includes/class-wp-upgrader.php */ + do_action( 'upgrader_process_complete', $this, array( 'action' => 'update', 'type' => 'core' ) ); + + // Clear the current updates + delete_site_transient( 'update_core' ); + + if ( ! $parsed_args['do_rollback'] ) { + $stats = array( + 'update_type' => $current->response, + 'success' => true, + 'fs_method' => $wp_filesystem->method, + 'fs_method_forced' => defined( 'FS_METHOD' ) || has_filter( 'filesystem_method' ), + 'time_taken' => time() - $start_time, + 'reported' => $wp_version, + 'attempted' => $current->version, + ); + + if ( is_wp_error( $result ) ) { + $stats['success'] = false; + // Did a rollback occur? + if ( ! empty( $try_rollback ) ) { + $stats['error_code'] = $original_result->get_error_code(); + $stats['error_data'] = $original_result->get_error_data(); + // Was the rollback successful? If not, collect its error too. + $stats['rollback'] = ! is_wp_error( $rollback_result ); + if ( is_wp_error( $rollback_result ) ) { + $stats['rollback_code'] = $rollback_result->get_error_code(); + $stats['rollback_data'] = $rollback_result->get_error_data(); + } + } else { + $stats['error_code'] = $result->get_error_code(); + $stats['error_data'] = $result->get_error_data(); + } + } + + wp_version_check( $stats ); + } + + return $result; + } + + // Determines if this WordPress Core version should update to $offered_ver or not + static function should_update_to_version( $offered_ver /* x.y.z */ ) { + include ABSPATH . WPINC . '/version.php'; // $wp_version; // x.y.z + + $current_branch = implode( '.', array_slice( preg_split( '/[.-]/', $wp_version ), 0, 2 ) ); // x.y + $new_branch = implode( '.', array_slice( preg_split( '/[.-]/', $offered_ver ), 0, 2 ) ); // x.y + $current_is_development_version = (bool) strpos( $wp_version, '-' ); + + // Defaults: + $upgrade_dev = true; + $upgrade_minor = true; + $upgrade_major = false; + + // WP_AUTO_UPDATE_CORE = true (all), 'minor', false. + if ( defined( 'WP_AUTO_UPDATE_CORE' ) ) { + if ( false === WP_AUTO_UPDATE_CORE ) { + // Defaults to turned off, unless a filter allows it + $upgrade_dev = $upgrade_minor = $upgrade_major = false; + } elseif ( true === WP_AUTO_UPDATE_CORE ) { + // ALL updates for core + $upgrade_dev = $upgrade_minor = $upgrade_major = true; + } elseif ( 'minor' === WP_AUTO_UPDATE_CORE ) { + // Only minor updates for core + $upgrade_dev = $upgrade_major = false; + $upgrade_minor = true; + } + } + + // 1: If we're already on that version, not much point in updating? + if ( $offered_ver == $wp_version ) + return false; + + // 2: If we're running a newer version, that's a nope + if ( version_compare( $wp_version, $offered_ver, '>' ) ) + return false; + + $failure_data = get_site_option( 'auto_core_update_failed' ); + if ( $failure_data ) { + // If this was a critical update failure, cannot update. + if ( ! empty( $failure_data['critical'] ) ) + return false; + + // Don't claim we can update on update-core.php if we have a non-critical failure logged. + if ( $wp_version == $failure_data['current'] && false !== strpos( $offered_ver, '.1.next.minor' ) ) + return false; + + // Cannot update if we're retrying the same A to B update that caused a non-critical failure. + // Some non-critical failures do allow retries, like download_failed. + // 3.7.1 => 3.7.2 resulted in files_not_writable, if we are still on 3.7.1 and still trying to update to 3.7.2. + if ( empty( $failure_data['retry'] ) && $wp_version == $failure_data['current'] && $offered_ver == $failure_data['attempted'] ) + return false; + } + + // 3: 3.7-alpha-25000 -> 3.7-alpha-25678 -> 3.7-beta1 -> 3.7-beta2 + if ( $current_is_development_version ) { + + /** + * Filter whether to enable automatic core updates for development versions. + * + * @since 3.7.0 + * + * @param bool $upgrade_dev Whether to enable automatic updates for + * development versions. + */ + if ( ! apply_filters( 'allow_dev_auto_core_updates', $upgrade_dev ) ) + return false; + // else fall through to minor + major branches below + } + + // 4: Minor In-branch updates (3.7.0 -> 3.7.1 -> 3.7.2 -> 3.7.4) + if ( $current_branch == $new_branch ) { + + /** + * Filter whether to enable minor automatic core updates. + * + * @since 3.7.0 + * + * @param bool $upgrade_minor Whether to enable minor automatic core updates. + */ + return apply_filters( 'allow_minor_auto_core_updates', $upgrade_minor ); + } + + // 5: Major version updates (3.7.0 -> 3.8.0 -> 3.9.1) + if ( version_compare( $new_branch, $current_branch, '>' ) ) { + + /** + * Filter whether to enable major automatic core updates. + * + * @since 3.7.0 + * + * @param bool $upgrade_major Whether to enable major automatic core updates. + */ + return apply_filters( 'allow_major_auto_core_updates', $upgrade_major ); + } + + // If we're not sure, we don't want it + return false; + } + + function check_files() { + global $wp_version, $wp_local_package; + + $checksums = get_core_checksums( $wp_version, isset( $wp_local_package ) ? $wp_local_package : 'en_US' ); + + if ( ! is_array( $checksums ) ) + return false; + + foreach ( $checksums as $file => $checksum ) { + // Skip files which get updated + if ( 'wp-content' == substr( $file, 0, 10 ) ) + continue; + if ( ! file_exists( ABSPATH . $file ) || md5_file( ABSPATH . $file ) !== $checksum ) + return false; + } + + return true; + } +} + +/** + * Upgrade Skin helper for File uploads. This class handles the upload process and passes it as if it's a local file to the Upgrade/Installer functions. + * + * @package WordPress + * @subpackage Upgrader + * @since 2.8.0 + */ +class File_Upload_Upgrader { + var $package; + var $filename; + var $id = 0; + + function __construct($form, $urlholder) { + + if ( empty($_FILES[$form]['name']) && empty($_GET[$urlholder]) ) + wp_die(__('Please select a file')); + + //Handle a newly uploaded file, Else assume it's already been uploaded + if ( ! empty($_FILES) ) { + $overrides = array( 'test_form' => false, 'test_type' => false ); + $file = wp_handle_upload( $_FILES[$form], $overrides ); + + if ( isset( $file['error'] ) ) + wp_die( $file['error'] ); + + $this->filename = $_FILES[$form]['name']; + $this->package = $file['file']; + + // Construct the object array + $object = array( + 'post_title' => $this->filename, + 'post_content' => $file['url'], + 'post_mime_type' => $file['type'], + 'guid' => $file['url'], + 'context' => 'upgrader', + 'post_status' => 'private' + ); + + // Save the data + $this->id = wp_insert_attachment( $object, $file['file'] ); + + // schedule a cleanup for 2 hours from now in case of failed install + wp_schedule_single_event( time() + 7200, 'upgrader_scheduled_cleanup', array( $this->id ) ); + + } elseif ( is_numeric( $_GET[$urlholder] ) ) { + // Numeric Package = previously uploaded file, see above. + $this->id = (int) $_GET[$urlholder]; + $attachment = get_post( $this->id ); + if ( empty($attachment) ) + wp_die(__('Please select a file')); + + $this->filename = $attachment->post_title; + $this->package = get_attached_file( $attachment->ID ); + } else { + // Else, It's set to something, Back compat for plugins using the old (pre-3.3) File_Uploader handler. + if ( ! ( ( $uploads = wp_upload_dir() ) && false === $uploads['error'] ) ) + wp_die( $uploads['error'] ); + + $this->filename = $_GET[$urlholder]; + $this->package = $uploads['basedir'] . '/' . $this->filename; + } + } + + function cleanup() { + if ( $this->id ) + wp_delete_attachment( $this->id ); + + elseif ( file_exists( $this->package ) ) + return @unlink( $this->package ); + + return true; + } +} + +/** + * The WordPress automatic background updater. + * + * @package WordPress + * @subpackage Upgrader + * @since 3.7.0 + */ +class WP_Automatic_Updater { + + /** + * Tracks update results during processing. + * + * @var array + */ + protected $update_results = array(); + + /** + * Whether the entire automatic updater is disabled. + * + * @since 3.7.0 + */ + public function is_disabled() { + // Background updates are disabled if you don't want file changes. + if ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS ) + return true; + + if ( defined( 'WP_INSTALLING' ) ) + return true; + + // More fine grained control can be done through the WP_AUTO_UPDATE_CORE constant and filters. + $disabled = defined( 'AUTOMATIC_UPDATER_DISABLED' ) && AUTOMATIC_UPDATER_DISABLED; + + /** + * Filter whether to entirely disable background updates. + * + * There are more fine-grained filters and controls for selective disabling. + * This filter parallels the AUTOMATIC_UPDATER_DISABLED constant in name. + * + * This also disables update notification emails. That may change in the future. + * + * @since 3.7.0 + * + * @param bool $disabled Whether the updater should be disabled. + */ + return apply_filters( 'automatic_updater_disabled', $disabled ); + } + + /** + * Check for version control checkouts. + * + * Checks for Subversion, Git, Mercurial, and Bazaar. It recursively looks up the + * filesystem to the top of the drive, erring on the side of detecting a VCS + * checkout somewhere. + * + * ABSPATH is always checked in addition to whatever $context is (which may be the + * wp-content directory, for example). The underlying assumption is that if you are + * using version control *anywhere*, then you should be making decisions for + * how things get updated. + * + * @since 3.7.0 + * + * @param string $context The filesystem path to check, in addition to ABSPATH. + */ + public function is_vcs_checkout( $context ) { + $context_dirs = array( untrailingslashit( $context ) ); + if ( $context !== ABSPATH ) + $context_dirs[] = untrailingslashit( ABSPATH ); + + $vcs_dirs = array( '.svn', '.git', '.hg', '.bzr' ); + $check_dirs = array(); + + foreach ( $context_dirs as $context_dir ) { + // Walk up from $context_dir to the root. + do { + $check_dirs[] = $context_dir; + + // Once we've hit '/' or 'C:\', we need to stop. dirname will keep returning the input here. + if ( $context_dir == dirname( $context_dir ) ) + break; + + // Continue one level at a time. + } while ( $context_dir = dirname( $context_dir ) ); + } + + $check_dirs = array_unique( $check_dirs ); + + // Search all directories we've found for evidence of version control. + foreach ( $vcs_dirs as $vcs_dir ) { + foreach ( $check_dirs as $check_dir ) { + if ( $checkout = @is_dir( rtrim( $check_dir, '\\/' ) . "/$vcs_dir" ) ) + break 2; + } + } + + /** + * Filter whether the automatic updater should consider a filesystem + * location to be potentially managed by a version control system. + * + * @since 3.7.0 + * + * @param bool $checkout Whether a VCS checkout was discovered at $context + * or ABSPATH, or anywhere higher. + * @param string $context The filesystem context (a path) against which + * filesystem status should be checked. + */ + return apply_filters( 'automatic_updates_is_vcs_checkout', $checkout, $context ); + } + + /** + * Tests to see if we can and should update a specific item. + * + * @since 3.7.0 + * + * @param string $type The type of update being checked: 'core', 'theme', + * 'plugin', 'translation'. + * @param object $item The update offer. + * @param string $context The filesystem context (a path) against which filesystem + * access and status should be checked. + */ + public function should_update( $type, $item, $context ) { + // Used to see if WP_Filesystem is set up to allow unattended updates. + $skin = new Automatic_Upgrader_Skin; + + if ( $this->is_disabled() ) + return false; + + // If we can't do an auto core update, we may still be able to email the user. + if ( ! $skin->request_filesystem_credentials( false, $context ) || $this->is_vcs_checkout( $context ) ) { + if ( 'core' == $type ) + $this->send_core_update_notification_email( $item ); + return false; + } + + // Next up, is this an item we can update? + if ( 'core' == $type ) + $update = Core_Upgrader::should_update_to_version( $item->current ); + else + $update = ! empty( $item->autoupdate ); + + /** + * Filter whether to automatically update core, a plugin, a theme, or a language. + * + * The dynamic portion of the hook name, $type, refers to the type of update + * being checked. Can be 'core', 'theme', 'plugin', or 'translation'. + * + * Generally speaking, plugins, themes, and major core versions are not updated + * by default, while translations and minor and development versions for core + * are updated by default. + * + * See the allow_dev_auto_core_updates, allow_minor_auto_core_updates, and + * allow_major_auto_core_updates filters for a more straightforward way to + * adjust core updates. + * + * @since 3.7.0 + * + * @param bool $update Whether to update. + * @param object $item The update offer. + */ + $update = apply_filters( 'auto_update_' . $type, $update, $item ); + + if ( ! $update ) { + if ( 'core' == $type ) + $this->send_core_update_notification_email( $item ); + return false; + } + + // If it's a core update, are we actually compatible with its requirements? + if ( 'core' == $type ) { + global $wpdb; + + $php_compat = version_compare( phpversion(), $item->php_version, '>=' ); + if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) ) + $mysql_compat = true; + else + $mysql_compat = version_compare( $wpdb->db_version(), $item->mysql_version, '>=' ); + + if ( ! $php_compat || ! $mysql_compat ) + return false; + } + + return true; + } + + /** + * Notifies an administrator of a core update. + * + * @since 3.7.0 + * + * @param object $item The update offer. + */ + protected function send_core_update_notification_email( $item ) { + $notify = true; + $notified = get_site_option( 'auto_core_update_notified' ); + + // Don't notify if we've already notified the same email address of the same version. + if ( $notified && $notified['email'] == get_site_option( 'admin_email' ) && $notified['version'] == $item->current ) + return false; + + // See if we need to notify users of a core update. + $notify = ! empty( $item->notify_email ); + + /** + * Filter whether to notify the site administrator of a new core update. + * + * By default, administrators are notified when the update offer received + * from WordPress.org sets a particular flag. This allows some discretion + * in if and when to notify. + * + * This filter is only evaluated once per release. If the same email address + * was already notified of the same new version, WordPress won't repeatedly + * email the administrator. + * + * This filter is also used on about.php to check if a plugin has disabled + * these notifications. + * + * @since 3.7.0 + * + * @param bool $notify Whether the site administrator is notified. + * @param object $item The update offer. + */ + if ( ! apply_filters( 'send_core_update_notification_email', $notify, $item ) ) + return false; + + $this->send_email( 'manual', $item ); + return true; + } + + /** + * Update an item, if appropriate. + * + * @since 3.7.0 + * + * @param string $type The type of update being checked: 'core', 'theme', 'plugin', 'translation'. + * @param object $item The update offer. + */ + public function update( $type, $item ) { + $skin = new Automatic_Upgrader_Skin; + + switch ( $type ) { + case 'core': + // The Core upgrader doesn't use the Upgrader's skin during the actual main part of the upgrade, instead, firing a filter. + add_filter( 'update_feedback', array( $skin, 'feedback' ) ); + $upgrader = new Core_Upgrader( $skin ); + $context = ABSPATH; + break; + case 'plugin': + $upgrader = new Plugin_Upgrader( $skin ); + $context = WP_PLUGIN_DIR; // We don't support custom Plugin directories, or updates for WPMU_PLUGIN_DIR + break; + case 'theme': + $upgrader = new Theme_Upgrader( $skin ); + $context = get_theme_root( $item->theme ); + break; + case 'translation': + $upgrader = new Language_Pack_Upgrader( $skin ); + $context = WP_CONTENT_DIR; // WP_LANG_DIR; + break; + } + + // Determine whether we can and should perform this update. + if ( ! $this->should_update( $type, $item, $context ) ) + return false; + + $upgrader_item = $item; + switch ( $type ) { + case 'core': + $skin->feedback( __( 'Updating to WordPress %s' ), $item->version ); + $item_name = sprintf( __( 'WordPress %s' ), $item->version ); + break; + case 'theme': + $upgrader_item = $item->theme; + $theme = wp_get_theme( $upgrader_item ); + $item_name = $theme->Get( 'Name' ); + $skin->feedback( __( 'Updating theme: %s' ), $item_name ); + break; + case 'plugin': + $upgrader_item = $item->plugin; + $plugin_data = get_plugin_data( $context . '/' . $upgrader_item ); + $item_name = $plugin_data['Name']; + $skin->feedback( __( 'Updating plugin: %s' ), $item_name ); + break; + case 'translation': + $language_item_name = $upgrader->get_name_for_update( $item ); + $item_name = sprintf( __( 'Translations for %s' ), $language_item_name ); + $skin->feedback( sprintf( __( 'Updating translations for %1$s (%2$s)…' ), $language_item_name, $item->language ) ); + break; + } + + // Boom, This sites about to get a whole new splash of paint! + $upgrade_result = $upgrader->upgrade( $upgrader_item, array( + 'clear_update_cache' => false, + 'pre_check_md5' => false, /* always use partial builds if possible for core updates */ + 'attempt_rollback' => true, /* only available for core updates */ + ) ); + + // if the filesystem is unavailable, false is returned. + if ( false === $upgrade_result ) { + $upgrade_result = new WP_Error( 'fs_unavailable', __( 'Could not access filesystem.' ) ); + } + + // Core doesn't output this, so lets append it so we don't get confused + if ( 'core' == $type ) { + if ( is_wp_error( $upgrade_result ) ) { + $skin->error( __( 'Installation Failed' ), $upgrade_result ); + } else { + $skin->feedback( __( 'WordPress updated successfully' ) ); + } + } + + $this->update_results[ $type ][] = (object) array( + 'item' => $item, + 'result' => $upgrade_result, + 'name' => $item_name, + 'messages' => $skin->get_upgrade_messages() + ); + + return $upgrade_result; + } + + /** + * Kicks off the background update process, looping through all pending updates. + * + * @since 3.7.0 + */ + public function run() { + global $wpdb, $wp_version; + + if ( $this->is_disabled() ) + return; + + if ( ! is_main_network() || ! is_main_site() ) + return; + + $lock_name = 'auto_updater.lock'; + + // Try to lock + $lock_result = $wpdb->query( $wpdb->prepare( "INSERT IGNORE INTO `$wpdb->options` ( `option_name`, `option_value`, `autoload` ) VALUES (%s, %s, 'no') /* LOCK */", $lock_name, time() ) ); + + if ( ! $lock_result ) { + $lock_result = get_option( $lock_name ); + + // If we couldn't create a lock, and there isn't a lock, bail + if ( ! $lock_result ) + return; + + // Check to see if the lock is still valid + if ( $lock_result > ( time() - HOUR_IN_SECONDS ) ) + return; + } + + // Update the lock, as by this point we've definately got a lock, just need to fire the actions + update_option( $lock_name, time() ); + + // Don't automatically run these thins, as we'll handle it ourselves + remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 ); + remove_action( 'upgrader_process_complete', 'wp_version_check' ); + remove_action( 'upgrader_process_complete', 'wp_update_plugins' ); + remove_action( 'upgrader_process_complete', 'wp_update_themes' ); + + // Next, Plugins + wp_update_plugins(); // Check for Plugin updates + $plugin_updates = get_site_transient( 'update_plugins' ); + if ( $plugin_updates && !empty( $plugin_updates->response ) ) { + foreach ( $plugin_updates->response as $plugin ) { + $this->update( 'plugin', $plugin ); + } + // Force refresh of plugin update information + wp_clean_plugins_cache(); + } + + // Next, those themes we all love + wp_update_themes(); // Check for Theme updates + $theme_updates = get_site_transient( 'update_themes' ); + if ( $theme_updates && !empty( $theme_updates->response ) ) { + foreach ( $theme_updates->response as $theme ) { + $this->update( 'theme', (object) $theme ); + } + // Force refresh of theme update information + wp_clean_themes_cache(); + } + + // Next, Process any core update + wp_version_check(); // Check for Core updates + $core_update = find_core_auto_update(); + + if ( $core_update ) + $this->update( 'core', $core_update ); + + // Clean up, and check for any pending translations + // (Core_Upgrader checks for core updates) + $theme_stats = array(); + if ( isset( $this->update_results['theme'] ) ) { + foreach ( $this->update_results['theme'] as $upgrade ) { + $theme_stats[ $upgrade->item->theme ] = ( true === $upgrade->result ); + } + } + wp_update_themes( $theme_stats ); // Check for Theme updates + + $plugin_stats = array(); + if ( isset( $this->update_results['plugin'] ) ) { + foreach ( $this->update_results['plugin'] as $upgrade ) { + $plugin_stats[ $upgrade->item->plugin ] = ( true === $upgrade->result ); + } + } + wp_update_plugins( $plugin_stats ); // Check for Plugin updates + + // Finally, Process any new translations + $language_updates = wp_get_translation_updates(); + if ( $language_updates ) { + foreach ( $language_updates as $update ) { + $this->update( 'translation', $update ); + } + + // Clear existing caches + wp_clean_plugins_cache(); + wp_clean_themes_cache(); + delete_site_transient( 'update_core' ); + + wp_version_check(); // check for Core updates + wp_update_themes(); // Check for Theme updates + wp_update_plugins(); // Check for Plugin updates + } + + // Send debugging email to all development installs. + if ( ! empty( $this->update_results ) ) { + $development_version = false !== strpos( $wp_version, '-' ); + + /** + * Filter whether to send a debugging email for each automatic background update. + * + * @since 3.7.0 + * + * @param bool $development_version By default, emails are sent if the + * install is a development version. + * Return false to avoid the email. + */ + if ( apply_filters( 'automatic_updates_send_debug_email', $development_version ) ) + $this->send_debug_email(); + + if ( ! empty( $this->update_results['core'] ) ) + $this->after_core_update( $this->update_results['core'][0] ); + + /** + * Fires after all automatic updates have run. + * + * @since 3.8.0 + * + * @param array $update_results The results of all attempted updates. + */ + do_action( 'automatic_updates_complete', $this->update_results ); + } + + // Clear the lock + delete_option( $lock_name ); + } + + /** + * If we tried to perform a core update, check if we should send an email, + * and if we need to avoid processing future updates. + * + * @param object $update_result The result of the core update. Includes the update offer and result. + */ + protected function after_core_update( $update_result ) { + global $wp_version; + + $core_update = $update_result->item; + $result = $update_result->result; + + if ( ! is_wp_error( $result ) ) { + $this->send_email( 'success', $core_update ); + return; + } + + $error_code = $result->get_error_code(); + + // Any of these WP_Error codes are critical failures, as in they occurred after we started to copy core files. + // We should not try to perform a background update again until there is a successful one-click update performed by the user. + $critical = false; + if ( $error_code === 'disk_full' || false !== strpos( $error_code, '__copy_dir' ) ) { + $critical = true; + } elseif ( $error_code === 'rollback_was_required' && is_wp_error( $result->get_error_data()->rollback ) ) { + // A rollback is only critical if it failed too. + $critical = true; + $rollback_result = $result->get_error_data()->rollback; + } elseif ( false !== strpos( $error_code, 'do_rollback' ) ) { + $critical = true; + } + + if ( $critical ) { + $critical_data = array( + 'attempted' => $core_update->current, + 'current' => $wp_version, + 'error_code' => $error_code, + 'error_data' => $result->get_error_data(), + 'timestamp' => time(), + 'critical' => true, + ); + if ( isset( $rollback_result ) ) { + $critical_data['rollback_code'] = $rollback_result->get_error_code(); + $critical_data['rollback_data'] = $rollback_result->get_error_data(); + } + update_site_option( 'auto_core_update_failed', $critical_data ); + $this->send_email( 'critical', $core_update, $result ); + return; + } + + /* + * Any other WP_Error code (like download_failed or files_not_writable) occurs before + * we tried to copy over core files. Thus, the failures are early and graceful. + * + * We should avoid trying to perform a background update again for the same version. + * But we can try again if another version is released. + * + * For certain 'transient' failures, like download_failed, we should allow retries. + * In fact, let's schedule a special update for an hour from now. (It's possible + * the issue could actually be on WordPress.org's side.) If that one fails, then email. + */ + $send = true; + $transient_failures = array( 'incompatible_archive', 'download_failed', 'insane_distro' ); + if ( in_array( $error_code, $transient_failures ) && ! get_site_option( 'auto_core_update_failed' ) ) { + wp_schedule_single_event( time() + HOUR_IN_SECONDS, 'wp_maybe_auto_update' ); + $send = false; + } + + $n = get_site_option( 'auto_core_update_notified' ); + // Don't notify if we've already notified the same email address of the same version of the same notification type. + if ( $n && 'fail' == $n['type'] && $n['email'] == get_site_option( 'admin_email' ) && $n['version'] == $core_update->current ) + $send = false; + + update_site_option( 'auto_core_update_failed', array( + 'attempted' => $core_update->current, + 'current' => $wp_version, + 'error_code' => $error_code, + 'error_data' => $result->get_error_data(), + 'timestamp' => time(), + 'retry' => in_array( $error_code, $transient_failures ), + ) ); + + if ( $send ) + $this->send_email( 'fail', $core_update, $result ); + } + + /** + * Sends an email upon the completion or failure of a background core update. + * + * @since 3.7.0 + * + * @param string $type The type of email to send. Can be one of 'success', 'fail', 'manual', 'critical'. + * @param object $core_update The update offer that was attempted. + * @param mixed $result Optional. The result for the core update. Can be WP_Error. + */ + protected function send_email( $type, $core_update, $result = null ) { + update_site_option( 'auto_core_update_notified', array( + 'type' => $type, + 'email' => get_site_option( 'admin_email' ), + 'version' => $core_update->current, + 'timestamp' => time(), + ) ); + + $next_user_core_update = get_preferred_from_update_core(); + // If the update transient is empty, use the update we just performed + if ( ! $next_user_core_update ) + $next_user_core_update = $core_update; + $newer_version_available = ( 'upgrade' == $next_user_core_update->response && version_compare( $next_user_core_update->version, $core_update->version, '>' ) ); + + /** + * Filter whether to send an email following an automatic background core update. + * + * @since 3.7.0 + * + * @param bool $send Whether to send the email. Default true. + * @param string $type The type of email to send. Can be one of + * 'success', 'fail', 'critical'. + * @param object $core_update The update offer that was attempted. + * @param mixed $result The result for the core update. Can be WP_Error. + */ + if ( 'manual' !== $type && ! apply_filters( 'auto_core_update_send_email', true, $type, $core_update, $result ) ) + return; + + switch ( $type ) { + case 'success' : // We updated. + /* translators: 1: Site name, 2: WordPress version number. */ + $subject = __( '[%1$s] Your site has updated to WordPress %2$s' ); + break; + + case 'fail' : // We tried to update but couldn't. + case 'manual' : // We can't update (and made no attempt). + /* translators: 1: Site name, 2: WordPress version number. */ + $subject = __( '[%1$s] WordPress %2$s is available. Please update!' ); + break; + + case 'critical' : // We tried to update, started to copy files, then things went wrong. + /* translators: 1: Site name. */ + $subject = __( '[%1$s] URGENT: Your site may be down due to a failed update' ); + break; + + default : + return; + } + + // If the auto update is not to the latest version, say that the current version of WP is available instead. + $version = 'success' === $type ? $core_update->current : $next_user_core_update->current; + $subject = sprintf( $subject, wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ), $version ); + + $body = ''; + + switch ( $type ) { + case 'success' : + $body .= sprintf( __( 'Howdy! Your site at %1$s has been updated automatically to WordPress %2$s.' ), home_url(), $core_update->current ); + $body .= "\n\n"; + if ( ! $newer_version_available ) + $body .= __( 'No further action is needed on your part.' ) . ' '; + + // Can only reference the About screen if their update was successful. + list( $about_version ) = explode( '-', $core_update->current, 2 ); + $body .= sprintf( __( "For more on version %s, see the About WordPress screen:" ), $about_version ); + $body .= "\n" . admin_url( 'about.php' ); + + if ( $newer_version_available ) { + $body .= "\n\n" . sprintf( __( 'WordPress %s is also now available.' ), $next_user_core_update->current ) . ' '; + $body .= __( 'Updating is easy and only takes a few moments:' ); + $body .= "\n" . network_admin_url( 'update-core.php' ); + } + + break; + + case 'fail' : + case 'manual' : + $body .= sprintf( __( 'Please update your site at %1$s to WordPress %2$s.' ), home_url(), $next_user_core_update->current ); + + $body .= "\n\n"; + + // Don't show this message if there is a newer version available. + // Potential for confusion, and also not useful for them to know at this point. + if ( 'fail' == $type && ! $newer_version_available ) + $body .= __( 'We tried but were unable to update your site automatically.' ) . ' '; + + $body .= __( 'Updating is easy and only takes a few moments:' ); + $body .= "\n" . network_admin_url( 'update-core.php' ); + break; + + case 'critical' : + if ( $newer_version_available ) + $body .= sprintf( __( 'Your site at %1$s experienced a critical failure while trying to update WordPress to version %2$s.' ), home_url(), $core_update->current ); + else + $body .= sprintf( __( 'Your site at %1$s experienced a critical failure while trying to update to the latest version of WordPress, %2$s.' ), home_url(), $core_update->current ); + + $body .= "\n\n" . __( "This means your site may be offline or broken. Don't panic; this can be fixed." ); + + $body .= "\n\n" . __( "Please check out your site now. It's possible that everything is working. If it says you need to update, you should do so:" ); + $body .= "\n" . network_admin_url( 'update-core.php' ); + break; + } + + $critical_support = 'critical' === $type && ! empty( $core_update->support_email ); + if ( $critical_support ) { + // Support offer if available. + $body .= "\n\n" . sprintf( __( "The WordPress team is willing to help you. Forward this email to %s and the team will work with you to make sure your site is working." ), $core_update->support_email ); + } else { + // Add a note about the support forums. + $body .= "\n\n" . __( 'If you experience any issues or need support, the volunteers in the WordPress.org support forums may be able to help.' ); + $body .= "\n" . __( 'https://wordpress.org/support/' ); + } + + // Updates are important! + if ( $type != 'success' || $newer_version_available ) { + $body .= "\n\n" . __( 'Keeping your site updated is important for security. It also makes the internet a safer place for you and your readers.' ); + } + + if ( $critical_support ) { + $body .= " " . __( "If you reach out to us, we'll also ensure you'll never have this problem again." ); + } + + // If things are successful and we're now on the latest, mention plugins and themes if any are out of date. + if ( $type == 'success' && ! $newer_version_available && ( get_plugin_updates() || get_theme_updates() ) ) { + $body .= "\n\n" . __( 'You also have some plugins or themes with updates available. Update them now:' ); + $body .= "\n" . network_admin_url(); + } + + $body .= "\n\n" . __( 'The WordPress Team' ) . "\n"; + + if ( 'critical' == $type && is_wp_error( $result ) ) { + $body .= "\n***\n\n"; + $body .= sprintf( __( 'Your site was running version %s.' ), $GLOBALS['wp_version'] ); + $body .= ' ' . __( 'We have some data that describes the error your site encountered.' ); + $body .= ' ' . __( 'Your hosting company, support forum volunteers, or a friendly developer may be able to use this information to help you:' ); + + // If we had a rollback and we're still critical, then the rollback failed too. + // Loop through all errors (the main WP_Error, the update result, the rollback result) for code, data, etc. + if ( 'rollback_was_required' == $result->get_error_code() ) + $errors = array( $result, $result->get_error_data()->update, $result->get_error_data()->rollback ); + else + $errors = array( $result ); + + foreach ( $errors as $error ) { + if ( ! is_wp_error( $error ) ) + continue; + $error_code = $error->get_error_code(); + $body .= "\n\n" . sprintf( __( "Error code: %s" ), $error_code ); + if ( 'rollback_was_required' == $error_code ) + continue; + if ( $error->get_error_message() ) + $body .= "\n" . $error->get_error_message(); + $error_data = $error->get_error_data(); + if ( $error_data ) + $body .= "\n" . implode( ', ', (array) $error_data ); + } + $body .= "\n"; + } + + $to = get_site_option( 'admin_email' ); + $headers = ''; + + $email = compact( 'to', 'subject', 'body', 'headers' ); + + /** + * Filter the email sent following an automatic background core update. + * + * @since 3.7.0 + * + * @param array $email { + * Array of email arguments that will be passed to wp_mail(). + * + * @type string $to The email recipient. An array of emails + * can be returned, as handled by wp_mail(). + * @type string $subject The email's subject. + * @type string $body The email message body. + * @type string $headers Any email headers, defaults to no headers. + * } + * @param string $type The type of email being sent. Can be one of + * 'success', 'fail', 'manual', 'critical'. + * @param object $core_update The update offer that was attempted. + * @param mixed $result The result for the core update. Can be WP_Error. + */ + $email = apply_filters( 'auto_core_update_email', $email, $type, $core_update, $result ); + + wp_mail( $email['to'], wp_specialchars_decode( $email['subject'] ), $email['body'], $email['headers'] ); + } + + /** + * Prepares and sends an email of a full log of background update results, useful for debugging and geekery. + * + * @since 3.7.0 + */ + protected function send_debug_email() { + $update_count = 0; + foreach ( $this->update_results as $type => $updates ) + $update_count += count( $updates ); + + $body = array(); + $failures = 0; + + $body[] = sprintf( __( 'WordPress site: %s' ), network_home_url( '/' ) ); + + // Core + if ( isset( $this->update_results['core'] ) ) { + $result = $this->update_results['core'][0]; + if ( $result->result && ! is_wp_error( $result->result ) ) { + $body[] = sprintf( __( 'SUCCESS: WordPress was successfully updated to %s' ), $result->name ); + } else { + $body[] = sprintf( __( 'FAILED: WordPress failed to update to %s' ), $result->name ); + $failures++; + } + $body[] = ''; + } + + // Plugins, Themes, Translations + foreach ( array( 'plugin', 'theme', 'translation' ) as $type ) { + if ( ! isset( $this->update_results[ $type ] ) ) + continue; + $success_items = wp_list_filter( $this->update_results[ $type ], array( 'result' => true ) ); + if ( $success_items ) { + $messages = array( + 'plugin' => __( 'The following plugins were successfully updated:' ), + 'theme' => __( 'The following themes were successfully updated:' ), + 'translation' => __( 'The following translations were successfully updated:' ), + ); + + $body[] = $messages[ $type ]; + foreach ( wp_list_pluck( $success_items, 'name' ) as $name ) { + $body[] = ' * ' . sprintf( __( 'SUCCESS: %s' ), $name ); + } + } + if ( $success_items != $this->update_results[ $type ] ) { + // Failed updates + $messages = array( + 'plugin' => __( 'The following plugins failed to update:' ), + 'theme' => __( 'The following themes failed to update:' ), + 'translation' => __( 'The following translations failed to update:' ), + ); + + $body[] = $messages[ $type ]; + foreach ( $this->update_results[ $type ] as $item ) { + if ( ! $item->result || is_wp_error( $item->result ) ) { + $body[] = ' * ' . sprintf( __( 'FAILED: %s' ), $item->name ); + $failures++; + } + } + } + $body[] = ''; + } + + $site_title = wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ); + if ( $failures ) { + $body[] = __( " +BETA TESTING? +============= + +This debugging email is sent when you are using a development version of WordPress. + +If you think these failures might be due to a bug in WordPress, could you report it? + * Open a thread in the support forums: https://wordpress.org/support/forum/alphabeta + * Or, if you're comfortable writing a bug report: http://core.trac.wordpress.org/ + +Thanks! -- The WordPress Team" ); + + $subject = sprintf( __( '[%s] There were failures during background updates' ), $site_title ); + } else { + $subject = sprintf( __( '[%s] Background updates have finished' ), $site_title ); + } + + $title = __( 'UPDATE LOG' ); + $body[] = $title; + $body[] = str_repeat( '=', strlen( $title ) ); + $body[] = ''; + + foreach ( array( 'core', 'plugin', 'theme', 'translation' ) as $type ) { + if ( ! isset( $this->update_results[ $type ] ) ) + continue; + foreach ( $this->update_results[ $type ] as $update ) { + $body[] = $update->name; + $body[] = str_repeat( '-', strlen( $update->name ) ); + foreach ( $update->messages as $message ) + $body[] = " " . html_entity_decode( str_replace( '…', '...', $message ) ); + if ( is_wp_error( $update->result ) ) { + $results = array( 'update' => $update->result ); + // If we rolled back, we want to know an error that occurred then too. + if ( 'rollback_was_required' === $update->result->get_error_code() ) + $results = (array) $update->result->get_error_data(); + foreach ( $results as $result_type => $result ) { + if ( ! is_wp_error( $result ) ) + continue; + + if ( 'rollback' === $result_type ) { + /* translators: 1: Error code, 2: Error message. */ + $body[] = ' ' . sprintf( __( 'Rollback Error: [%1$s] %2$s' ), $result->get_error_code(), $result->get_error_message() ); + } else { + /* translators: 1: Error code, 2: Error message. */ + $body[] = ' ' . sprintf( __( 'Error: [%1$s] %2$s' ), $result->get_error_code(), $result->get_error_message() ); + } + + if ( $result->get_error_data() ) + $body[] = ' ' . implode( ', ', (array) $result->get_error_data() ); + } + } + $body[] = ''; + } + } + + $email = array( + 'to' => get_site_option( 'admin_email' ), + 'subject' => $subject, + 'body' => implode( "\n", $body ), + 'headers' => '' + ); + + /** + * Filter the debug email that can be sent following an automatic + * background core update. + * + * @since 3.8.0 + * + * @param array $email { + * Array of email arguments that will be passed to wp_mail(). + * + * @type string $to The email recipient. An array of emails + * can be returned, as handled by wp_mail(). + * @type string $subject Email subject. + * @type string $body Email message body. + * @type string $headers Any email headers. Default empty. + * } + * @param int $failures The number of failures encountered while upgrading. + * @param mixed $results The results of all attempted updates. + */ + $email = apply_filters( 'automatic_updates_debug_email', $email, $failures, $this->update_results ); + + wp_mail( $email['to'], wp_specialchars_decode( $email['subject'] ), $email['body'], $email['headers'] ); + } +} diff --git a/wp-admin/includes/class-wp-users-list-table.php b/wp-admin/includes/class-wp-users-list-table.php new file mode 100644 index 0000000..dcce6d5 --- /dev/null +++ b/wp-admin/includes/class-wp-users-list-table.php @@ -0,0 +1,457 @@ + 'user', + 'plural' => 'users', + 'screen' => isset( $args['screen'] ) ? $args['screen'] : null, + ) ); + + $this->is_site_users = 'site-users-network' == $this->screen->id; + + if ( $this->is_site_users ) + $this->site_id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0; + } + + /** + * Check the current user's permissions. + * + * @since 3.1.0 + * @access public + */ + function ajax_user_can() { + if ( $this->is_site_users ) + return current_user_can( 'manage_sites' ); + else + return current_user_can( 'list_users' ); + } + + /** + * Prepare the users list for display. + * + * @since 3.1.0 + * @access public + */ + function prepare_items() { + global $role, $usersearch; + + $usersearch = isset( $_REQUEST['s'] ) ? wp_unslash( trim( $_REQUEST['s'] ) ) : ''; + + $role = isset( $_REQUEST['role'] ) ? $_REQUEST['role'] : ''; + + $per_page = ( $this->is_site_users ) ? 'site_users_network_per_page' : 'users_per_page'; + $users_per_page = $this->get_items_per_page( $per_page ); + + $paged = $this->get_pagenum(); + + $args = array( + 'number' => $users_per_page, + 'offset' => ( $paged-1 ) * $users_per_page, + 'role' => $role, + 'search' => $usersearch, + 'fields' => 'all_with_meta' + ); + + if ( '' !== $args['search'] ) + $args['search'] = '*' . $args['search'] . '*'; + + if ( $this->is_site_users ) + $args['blog_id'] = $this->site_id; + + if ( isset( $_REQUEST['orderby'] ) ) + $args['orderby'] = $_REQUEST['orderby']; + + if ( isset( $_REQUEST['order'] ) ) + $args['order'] = $_REQUEST['order']; + + // Query the user IDs for this page + $wp_user_search = new WP_User_Query( $args ); + + $this->items = $wp_user_search->get_results(); + + $this->set_pagination_args( array( + 'total_items' => $wp_user_search->get_total(), + 'per_page' => $users_per_page, + ) ); + } + + /** + * Output 'no users' message. + * + * @since 3.1.0 + * @access public + */ + function no_items() { + _e( 'No matching users were found.' ); + } + + /** + * Return an associative array listing all the views that can be used + * with this table. + * + * Provides a list of roles and user count for that role for easy + * filtering of the user table. + * + * @since 3.1.0 + * @access public + * + * @return array An array of HTML links, one for each view. + */ + function get_views() { + global $wp_roles, $role; + + if ( $this->is_site_users ) { + $url = 'site-users.php?id=' . $this->site_id; + switch_to_blog( $this->site_id ); + $users_of_blog = count_users(); + restore_current_blog(); + } else { + $url = 'users.php'; + $users_of_blog = count_users(); + } + $total_users = $users_of_blog['total_users']; + $avail_roles =& $users_of_blog['avail_roles']; + unset($users_of_blog); + + $current_role = false; + $class = empty($role) ? ' class="current"' : ''; + $role_links = array(); + $role_links['all'] = "" . sprintf( _nx( 'All (%s)', 'All (%s)', $total_users, 'users' ), number_format_i18n( $total_users ) ) . ''; + foreach ( $wp_roles->get_names() as $this_role => $name ) { + if ( !isset($avail_roles[$this_role]) ) + continue; + + $class = ''; + + if ( $this_role == $role ) { + $current_role = $role; + $class = ' class="current"'; + } + + $name = translate_user_role( $name ); + /* translators: User role name with count */ + $name = sprintf( __('%1$s (%2$s)'), $name, number_format_i18n( $avail_roles[$this_role] ) ); + $role_links[$this_role] = "$name"; + } + + return $role_links; + } + + /** + * Retrieve an associative array of bulk actions available on this table. + * + * @since 3.1.0 + * @access public + * + * @return array Array of bulk actions. + */ + function get_bulk_actions() { + $actions = array(); + + if ( is_multisite() ) { + if ( current_user_can( 'remove_users' ) ) + $actions['remove'] = __( 'Remove' ); + } else { + if ( current_user_can( 'delete_users' ) ) + $actions['delete'] = __( 'Delete' ); + } + + return $actions; + } + + /** + * Output the controls to allow user roles to be changed in bulk. + * + * @since 3.1.0 + * @access public + * + * @param string $which Whether this is being invoked above ("top") + * or below the table ("bottom"). + */ + function extra_tablenav( $which ) { + if ( 'top' != $which ) + return; + ?> +
+ + + + '; + } + + /** + * Capture the bulk action required, and return it. + * + * Overridden from the base class implementation to capture + * the role change drop-down. + * + * @since 3.1.0 + * @access public + * + * @return string The bulk action required. + */ + function current_action() { + if ( isset($_REQUEST['changeit']) && !empty($_REQUEST['new_role']) ) + return 'promote'; + + return parent::current_action(); + } + + /** + * Get a list of columns for the list table. + * + * @since 3.1.0 + * @access public + * + * @return array Array in which the key is the ID of the column, + * and the value is the description. + */ + function get_columns() { + $c = array( + 'cb' => '', + 'username' => __( 'Username' ), + 'name' => __( 'Name' ), + 'email' => __( 'E-mail' ), + 'role' => __( 'Role' ), + 'posts' => __( 'Posts' ) + ); + + if ( $this->is_site_users ) + unset( $c['posts'] ); + + return $c; + } + + /** + * Get a list of sortable columns for the list table. + * + * @since 3.1.0 + * @access public + * + * @return array Array of sortable columns. + */ + function get_sortable_columns() { + $c = array( + 'username' => 'login', + 'name' => 'name', + 'email' => 'email', + ); + + if ( $this->is_site_users ) + unset( $c['posts'] ); + + return $c; + } + + /** + * Generate the list table rows. + * + * @since 3.1.0 + * @access public + */ + function display_rows() { + // Query the post counts for this page + if ( ! $this->is_site_users ) + $post_counts = count_many_users_posts( array_keys( $this->items ) ); + + $editable_roles = array_keys( get_editable_roles() ); + + $style = ''; + foreach ( $this->items as $userid => $user_object ) { + if ( count( $user_object->roles ) <= 1 ) { + $role = reset( $user_object->roles ); + } elseif ( $roles = array_intersect( array_values( $user_object->roles ), $editable_roles ) ) { + $role = reset( $roles ); + } else { + $role = reset( $user_object->roles ); + } + + if ( is_multisite() && empty( $user_object->allcaps ) ) + continue; + + $style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"'; + echo "\n\t" . $this->single_row( $user_object, $style, $role, isset( $post_counts ) ? $post_counts[ $userid ] : 0 ); + } + } + + /** + * Generate HTML for a single row on the users.php admin panel. + * + * @since 3.1.0 + * @access public + * + * @param object $user_object The current user object. + * @param string $style Optional. Style attributes added to the element. + * Must be sanitized. Default empty. + * @param string $role Optional. Key for the $wp_roles array. Default empty. + * @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 Output for a single row. + */ + function single_row( $user_object, $style = '', $role = '', $numposts = 0 ) { + global $wp_roles; + + if ( !( is_object( $user_object ) && is_a( $user_object, 'WP_User' ) ) ) + $user_object = get_userdata( (int) $user_object ); + $user_object->filter = 'display'; + $email = $user_object->user_email; + + if ( $this->is_site_users ) + $url = "site-users.php?id={$this->site_id}&"; + else + $url = 'users.php?'; + + $checkbox = ''; + // Check if the user for this row is editable + if ( current_user_can( 'list_users' ) ) { + // Set up the user editing link + $edit_link = esc_url( add_query_arg( 'wp_http_referer', urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ), get_edit_user_link( $user_object->ID ) ) ); + + // Set up the hover actions for this user + $actions = array(); + + if ( current_user_can( 'edit_user', $user_object->ID ) ) { + $edit = "$user_object->user_login
"; + $actions['edit'] = '' . __( 'Edit' ) . ''; + } else { + $edit = "$user_object->user_login
"; + } + + if ( !is_multisite() && get_current_user_id() != $user_object->ID && current_user_can( 'delete_user', $user_object->ID ) ) + $actions['delete'] = "" . __( 'Delete' ) . ""; + if ( is_multisite() && get_current_user_id() != $user_object->ID && current_user_can( 'remove_user', $user_object->ID ) ) + $actions['remove'] = "" . __( 'Remove' ) . ""; + + /** + * Filter the action links displayed under each user in the Users list table. + * + * @since 2.8.0 + * + * @param array $actions An array of action links to be displayed. + * Default 'Edit', 'Delete' for single site, and + * 'Edit', 'Remove' for Multisite. + * @param WP_User $user_object WP_User object for the currently-listed user. + */ + $actions = apply_filters( 'user_row_actions', $actions, $user_object ); + $edit .= $this->row_actions( $actions ); + + // Set up the checkbox ( because the user is editable, otherwise it's empty ) + $checkbox = '' + . ""; + + } else { + $edit = '' . $user_object->user_login . ''; + } + $role_name = isset( $wp_roles->role_names[$role] ) ? translate_user_role( $wp_roles->role_names[$role] ) : __( 'None' ); + $avatar = get_avatar( $user_object->ID, 32 ); + + $r = ""; + + list( $columns, $hidden ) = $this->get_column_info(); + + foreach ( $columns as $column_name => $column_display_name ) { + $class = "class=\"$column_name column-$column_name\""; + + $style = ''; + if ( in_array( $column_name, $hidden ) ) + $style = ' style="display:none;"'; + + $attributes = "$class$style"; + + switch ( $column_name ) { + case 'cb': + $r .= "$checkbox"; + break; + case 'username': + $r .= "$avatar $edit"; + break; + case 'name': + $r .= "$user_object->first_name $user_object->last_name"; + break; + case 'email': + $r .= "$email"; + break; + case 'role': + $r .= "$role_name"; + break; + case 'posts': + $attributes = 'class="posts column-posts num"' . $style; + $r .= ""; + if ( $numposts > 0 ) { + $r .= ""; + $r .= $numposts; + $r .= ''; + } else { + $r .= 0; + } + $r .= ""; + break; + default: + $r .= ""; + + /** + * Filter the display output of custom columns in the Users list table. + * + * @since 2.8.0 + * + * @param string $output Custom column output. Default empty. + * @param string $column_name Column name. + * @param int $user_id ID of the currently-listed user. + */ + $r .= apply_filters( 'manage_users_custom_column', '', $column_name, $user_object->ID ); + $r .= ""; + } + } + $r .= ''; + + return $r; + } +} diff --git a/wp-admin/includes/comment.php b/wp-admin/includes/comment.php new file mode 100644 index 0000000..a74eeaa --- /dev/null +++ b/wp-admin/includes/comment.php @@ -0,0 +1,171 @@ +get_var( $wpdb->prepare("SELECT comment_post_ID FROM $wpdb->comments + WHERE comment_author = %s AND comment_date = %s", $comment_author, $comment_date) ); +} + +/** + * Update a comment with values provided in $_POST. + * + * @since 2.0.0 + */ +function edit_comment() { + + if ( ! current_user_can( 'edit_comment', (int) $_POST['comment_ID'] ) ) + wp_die ( __( 'You are not allowed to edit comments on this post.' ) ); + + if ( isset( $_POST['newcomment_author'] ) ) + $_POST['comment_author'] = $_POST['newcomment_author']; + if ( isset( $_POST['newcomment_author_email'] ) ) + $_POST['comment_author_email'] = $_POST['newcomment_author_email']; + if ( isset( $_POST['newcomment_author_url'] ) ) + $_POST['comment_author_url'] = $_POST['newcomment_author_url']; + if ( isset( $_POST['comment_status'] ) ) + $_POST['comment_approved'] = $_POST['comment_status']; + if ( isset( $_POST['content'] ) ) + $_POST['comment_content'] = $_POST['content']; + if ( isset( $_POST['comment_ID'] ) ) + $_POST['comment_ID'] = (int) $_POST['comment_ID']; + + foreach ( array ('aa', 'mm', 'jj', 'hh', 'mn') as $timeunit ) { + if ( !empty( $_POST['hidden_' . $timeunit] ) && $_POST['hidden_' . $timeunit] != $_POST[$timeunit] ) { + $_POST['edit_date'] = '1'; + break; + } + } + + if ( !empty ( $_POST['edit_date'] ) ) { + $aa = $_POST['aa']; + $mm = $_POST['mm']; + $jj = $_POST['jj']; + $hh = $_POST['hh']; + $mn = $_POST['mn']; + $ss = $_POST['ss']; + $jj = ($jj > 31 ) ? 31 : $jj; + $hh = ($hh > 23 ) ? $hh -24 : $hh; + $mn = ($mn > 59 ) ? $mn -60 : $mn; + $ss = ($ss > 59 ) ? $ss -60 : $ss; + $_POST['comment_date'] = "$aa-$mm-$jj $hh:$mn:$ss"; + } + + wp_update_comment( $_POST ); +} + +/** + * Returns a comment object based on comment ID. + * + * @since 2.0.0 + * + * @param int $id ID of comment to retrieve. + * @return bool|object Comment if found. False on failure. + */ +function get_comment_to_edit( $id ) { + if ( !$comment = get_comment($id) ) + return false; + + $comment->comment_ID = (int) $comment->comment_ID; + $comment->comment_post_ID = (int) $comment->comment_post_ID; + + $comment->comment_content = format_to_edit( $comment->comment_content ); + /** + * Filter the comment content before editing. + * + * @since 2.0.0 + * + * @param string $comment->comment_content Comment content. + */ + $comment->comment_content = apply_filters( 'comment_edit_pre', $comment->comment_content ); + + $comment->comment_author = format_to_edit( $comment->comment_author ); + $comment->comment_author_email = format_to_edit( $comment->comment_author_email ); + $comment->comment_author_url = format_to_edit( $comment->comment_author_url ); + $comment->comment_author_url = esc_url($comment->comment_author_url); + + return $comment; +} + +/** + * Get the number of pending comments on a post or posts + * + * @since 2.3.0 + * @uses $wpdb + * + * @param int|array $post_id Either a single Post ID or an array of Post IDs + * @return int|array Either a single Posts pending comments as an int or an array of ints keyed on the Post IDs + */ +function get_pending_comments_num( $post_id ) { + global $wpdb; + + $single = false; + if ( !is_array($post_id) ) { + $post_id_array = (array) $post_id; + $single = true; + } else { + $post_id_array = $post_id; + } + $post_id_array = array_map('intval', $post_id_array); + $post_id_in = "'" . implode("', '", $post_id_array) . "'"; + + $pending = $wpdb->get_results( "SELECT comment_post_ID, COUNT(comment_ID) as num_comments FROM $wpdb->comments WHERE comment_post_ID IN ( $post_id_in ) AND comment_approved = '0' GROUP BY comment_post_ID", ARRAY_A ); + + if ( $single ) { + if ( empty($pending) ) + return 0; + else + return absint($pending[0]['num_comments']); + } + + $pending_keyed = array(); + + // Default to zero pending for all posts in request + foreach ( $post_id_array as $id ) + $pending_keyed[$id] = 0; + + if ( !empty($pending) ) + foreach ( $pending as $pend ) + $pending_keyed[$pend['comment_post_ID']] = absint($pend['num_comments']); + + return $pending_keyed; +} + +/** + * Add avatars to relevant places in admin, or try to. + * + * @since 2.5.0 + * @uses $comment + * + * @param string $name User name. + * @return string Avatar with Admin name. + */ +function floated_admin_avatar( $name ) { + global $comment; + $avatar = get_avatar( $comment, 32, 'mystery' ); + return "$avatar $name"; +} + +function enqueue_comment_hotkeys_js() { + if ( 'true' == get_user_option( 'comment_shortcuts' ) ) + wp_enqueue_script( 'jquery-table-hotkeys' ); +} diff --git a/wp-admin/includes/continents-cities.php b/wp-admin/includes/continents-cities.php new file mode 100644 index 0000000..0ebc4f3 --- /dev/null +++ b/wp-admin/includes/continents-cities.php @@ -0,0 +1,493 @@ +%1$s %2$s', __( 'Quick Draft' ), __( 'Drafts' ) ); + wp_add_dashboard_widget( 'dashboard_quick_press', $quick_draft_title, 'wp_dashboard_quick_press' ); + } + + // WordPress News + wp_add_dashboard_widget( 'dashboard_primary', __( 'WordPress News' ), 'wp_dashboard_primary' ); + + if ( is_network_admin() ) { + + /** + * Fires after core widgets for the Network Admin dashboard have been registered. + * + * @since 3.1.0 + */ + do_action( 'wp_network_dashboard_setup' ); + + /** + * Filter the list of widgets to load for the Network Admin dashboard. + * + * @since 3.1.0 + * + * @param array $dashboard_widgets An array of dashboard widgets. + */ + $dashboard_widgets = apply_filters( 'wp_network_dashboard_widgets', array() ); + } elseif ( is_user_admin() ) { + + /** + * Fires after core widgets for the User Admin dashboard have been registered. + * + * @since 3.1.0 + */ + do_action( 'wp_user_dashboard_setup' ); + + /** + * Filter the list of widgets to load for the User Admin dashboard. + * + * @since 3.1.0 + * + * @param array $dashboard_widgets An array of dashboard widgets. + */ + $dashboard_widgets = apply_filters( 'wp_user_dashboard_widgets', array() ); + } else { + + /** + * Fires after core widgets for the admin dashboard have been registered. + * + * @since 2.5.0 + */ + do_action( 'wp_dashboard_setup' ); + + /** + * Filter the list of widgets to load for the admin dashboard. + * + * @since 2.5.0 + * + * @param array $dashboard_widgets An array of dashboard widgets. + */ + $dashboard_widgets = apply_filters( 'wp_dashboard_widgets', array() ); + } + + foreach ( $dashboard_widgets as $widget_id ) { + $name = empty( $wp_registered_widgets[$widget_id]['all_link'] ) ? $wp_registered_widgets[$widget_id]['name'] : $wp_registered_widgets[$widget_id]['name'] . " " . __('View all') . ''; + wp_add_dashboard_widget( $widget_id, $name, $wp_registered_widgets[$widget_id]['callback'], $wp_registered_widget_controls[$widget_id]['callback'] ); + } + + if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset($_POST['widget_id']) ) { + check_admin_referer( 'edit-dashboard-widget_' . $_POST['widget_id'], 'dashboard-widget-nonce' ); + ob_start(); // hack - but the same hack wp-admin/widgets.php uses + wp_dashboard_trigger_widget_control( $_POST['widget_id'] ); + ob_end_clean(); + wp_redirect( remove_query_arg( 'edit' ) ); + exit; + } + + if ( $update ) + update_option( 'dashboard_widget_options', $widget_options ); + + /** This action is documented in wp-admin/edit-form-advanced.php */ + do_action( 'do_meta_boxes', $screen->id, 'normal', '' ); + + /** This action is documented in wp-admin/edit-form-advanced.php */ + do_action( 'do_meta_boxes', $screen->id, 'side', '' ); +} + +function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_callback = null, $callback_args = null ) { + $screen = get_current_screen(); + global $wp_dashboard_control_callbacks; + + if ( $control_callback && current_user_can( 'edit_dashboard' ) && is_callable( $control_callback ) ) { + $wp_dashboard_control_callbacks[$widget_id] = $control_callback; + if ( isset( $_GET['edit'] ) && $widget_id == $_GET['edit'] ) { + list($url) = explode( '#', add_query_arg( 'edit', false ), 2 ); + $widget_name .= ' ' . __( 'Cancel' ) . ''; + $callback = '_wp_dashboard_control_callback'; + } else { + list($url) = explode( '#', add_query_arg( 'edit', $widget_id ), 2 ); + $widget_name .= ' ' . __( 'Configure' ) . ''; + } + } + + $side_widgets = array( 'dashboard_quick_press', 'dashboard_primary' ); + + $location = 'normal'; + if ( in_array($widget_id, $side_widgets) ) + $location = 'side'; + + $priority = 'core'; + if ( 'dashboard_browser_nag' === $widget_id ) + $priority = 'high'; + + add_meta_box( $widget_id, $widget_name, $callback, $screen, $location, $priority, $callback_args ); +} + +function _wp_dashboard_control_callback( $dashboard, $meta_box ) { + echo '
'; + wp_dashboard_trigger_widget_control( $meta_box['id'] ); + wp_nonce_field( 'edit-dashboard-widget_' . $meta_box['id'], 'dashboard-widget-nonce' ); + echo ''; + submit_button( __('Submit') ); + echo '
'; +} + +/** + * Displays the dashboard. + * + * @since 2.5.0 + */ +function wp_dashboard() { + $screen = get_current_screen(); + $columns = absint( $screen->get_columns() ); + $columns_css = ''; + if ( $columns ) { + $columns_css = " columns-$columns"; + } + +?> +
+
+ id, 'normal', '' ); ?> +
+
+ id, 'side', '' ); ?> +
+
+ id, 'column3', '' ); ?> +
+
+ id, 'column4', '' ); ?> +
+
+ +%1$s', $theme->display('Name') ); + else + $theme_name = $theme->display('Name'); +?> +
+
    + publish ) { + if ( 'post' == $post_type ) { + $text = _n( '%s Post', '%s Posts', $num_posts->publish ); + } else { + $text = _n( '%s Page', '%s Pages', $num_posts->publish ); + } + $text = sprintf( $text, number_format_i18n( $num_posts->publish ) ); + $post_type_object = get_post_type_object( $post_type ); + if ( $post_type_object && current_user_can( $post_type_object->cap->edit_posts ) ) { + printf( '
  • %2$s
  • ', $post_type, $text ); + } else { + printf( '
  • %2$s
  • ', $post_type, $text ); + } + + } + } + // Comments + $num_comm = wp_count_comments(); + if ( $num_comm && $num_comm->total_comments ) { + $text = sprintf( _n( '%s Comment', '%s Comments', $num_comm->total_comments ), number_format_i18n( $num_comm->total_comments ) ); + ?> +
  • + moderated ) { + /* translators: Number of comments in moderation */ + $text = sprintf( _nx( '%s in moderation', '%s in moderation', $num_comm->moderated, 'comments' ), number_format_i18n( $num_comm->moderated ) ); + ?> +
  • + ' . implode( "\n
  • ", $elements ) . "
  • \n"; + } + + ?> +
+ $content

"; + } + ?> +
+ +
+ +
+ ' . __( 'Create a New Site' ) . ''; + if ( current_user_can('create_users') ) + $actions['create-user'] = '' . __( 'Create a New User' ) . ''; + + $c_users = get_user_count(); + $c_blogs = get_blog_count(); + + $user_text = sprintf( _n( '%s user', '%s users', $c_users ), number_format_i18n( $c_users ) ); + $blog_text = sprintf( _n( '%s site', '%s sites', $c_blogs ), number_format_i18n( $c_blogs ) ); + + $sentence = sprintf( __( 'You have %1$s and %2$s.' ), $blog_text, $user_text ); + + if ( $actions ) { + echo '
    '; + foreach ( $actions as $class => $action ) { + $actions[ $class ] = "\t
  • $action"; + } + echo implode( " |
  • \n", $actions ) . "\n"; + echo '
'; + } +?> +
+ +

+ + + + +
+

+ + 'submit_users' ) ); ?> +

+
+ +
+

+ + 'submit_sites' ) ); ?> +

+
+post_status != 'auto-draft' ) { // auto-draft doesn't exists anymore + $post = get_default_post_to_edit( 'post', true ); + update_user_option( get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID ); // Save post_ID + } else { + $post->post_title = ''; // Remove the auto draft title + } + } else { + $post = get_default_post_to_edit( 'post' , true); + $user_id = get_current_user_id(); + // Don't create an option if this is a super admin who does not belong to this site. + if ( ! ( is_super_admin( $user_id ) && ! in_array( get_current_blog_id(), array_keys( get_blogs_of_user( $user_id ) ) ) ) ) + update_user_option( $user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID ); // Save post_ID + } + + $post_ID = (int) $post->ID; +?> + +
+ + +
+ + +
+ + +
+ +
+ + +
+ +

+ + + + + 'save-post' ) ); ?> +
+

+ +
+ 'post', + 'post_status' => 'draft', + 'author' => get_current_user_id(), + 'posts_per_page' => 4, + 'orderby' => 'modified', + 'order' => 'DESC' + ); + $drafts = get_posts( $query_args ); + if ( ! $drafts ) { + return; + } + } + + echo '
'; + if ( count( $drafts ) > 3 ) { + echo '

' . _x( 'View all', 'drafts' ) . "

\n"; + } + echo '

' . __( 'Drafts' ) . "

\n
    "; + + $drafts = array_slice( $drafts, 0, 3 ); + foreach ( $drafts as $draft ) { + $url = get_edit_post_link( $draft->ID ); + $title = _draft_or_post_title( $draft->ID ); + echo "
  • \n"; + echo '
    ' . esc_html( $title ) . ''; + echo '
    '; + if ( $the_content = wp_trim_words( $draft->post_content, 10 ) ) { + echo '

    ' . $the_content . '

    '; + } + echo "
  • \n"; + } + echo "
\n
"; +} + +function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) { + $GLOBALS['comment'] =& $comment; + + $comment_post_title = strip_tags(get_the_title( $comment->comment_post_ID )); + + if ( current_user_can( 'edit_post', $comment->comment_post_ID ) ) { + $comment_post_url = get_edit_post_link( $comment->comment_post_ID ); + $comment_post_link = "$comment_post_title"; + } else { + $comment_post_link = $comment_post_title; + } + + $comment_link = '#'; + + $actions_string = ''; + if ( current_user_can( 'edit_comment', $comment->comment_ID ) ) { + // preorder it: Approve | Reply | Edit | Spam | Trash + $actions = array( + 'approve' => '', 'unapprove' => '', + 'reply' => '', + 'edit' => '', + 'spam' => '', + 'trash' => '', 'delete' => '' + ); + + $del_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "delete-comment_$comment->comment_ID" ) ); + $approve_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "approve-comment_$comment->comment_ID" ) ); + + $approve_url = esc_url( "comment.php?action=approvecomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$approve_nonce" ); + $unapprove_url = esc_url( "comment.php?action=unapprovecomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$approve_nonce" ); + $spam_url = esc_url( "comment.php?action=spamcomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); + $trash_url = esc_url( "comment.php?action=trashcomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); + $delete_url = esc_url( "comment.php?action=deletecomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); + + $actions['approve'] = "" . __( 'Approve' ) . ''; + $actions['unapprove'] = "" . __( 'Unapprove' ) . ''; + $actions['edit'] = "". __('Edit') . ''; + $actions['reply'] = '' . __('Reply') . ''; + $actions['spam'] = "" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . ''; + if ( !EMPTY_TRASH_DAYS ) + $actions['delete'] = "" . __('Delete Permanently') . ''; + else + $actions['trash'] = "" . _x('Trash', 'verb') . ''; + + /** + * Filter the action links displayed for each comment in the 'Recent Comments' + * dashboard widget. + * + * @since 2.6.0 + * + * @param array $actions An array of comment actions. Default actions include: + * 'Approve', 'Unapprove', 'Edit', 'Reply', 'Spam', + * 'Delete', and 'Trash'. + * @param object $comment The comment object. + */ + $actions = apply_filters( 'comment_row_actions', array_filter($actions), $comment ); + + $i = 0; + foreach ( $actions as $action => $link ) { + ++$i; + ( ( ('approve' == $action || 'unapprove' == $action) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' | '; + + // Reply and quickedit need a hide-if-no-js span + if ( 'reply' == $action || 'quickedit' == $action ) + $action .= ' hide-if-no-js'; + + $actions_string .= "$sep$link"; + } + } + +?> + +
comment_ID) ) ); ?>> + + + + comment_type || 'comment' == $comment->comment_type ) : ?> + +
+

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

+ + comment_type ) : + case 'pingback' : + $type = __( 'Pingback' ); + break; + case 'trackback' : + $type = __( 'Trackback' ); + break; + default : + $type = ucwords( $comment->comment_type ); + endswitch; + $type = esc_html( $type ); + ?> +
+ +

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

+

+ + +

+

+
+
+'; + + $future_posts = wp_dashboard_recent_posts( array( + 'max' => 5, + 'status' => 'future', + 'order' => 'ASC', + 'title' => __( 'Publishing Soon' ), + 'id' => 'future-posts', + ) ); + $recent_posts = wp_dashboard_recent_posts( array( + 'max' => 5, + 'status' => 'publish', + 'order' => 'DESC', + 'title' => __( 'Recently Published' ), + 'id' => 'published-posts', + ) ); + + $recent_comments = wp_dashboard_recent_comments(); + + if ( !$future_posts && !$recent_posts && !$recent_comments ) { + echo '
'; + echo '

'; + echo '

' . __( 'No activity yet!' ) . '

'; + echo '
'; + } + + echo '
'; +} + +/** + * Generates Publishing Soon and Recently Published sections. + * + * @since 3.8.0 + * + * @param array $args { + * An array of query and display arguments. + * + * @type int $max Number of posts to display. + * @type string $status Post status. + * @type string $order Designates ascending ('ASC') or descending ('DESC') order. + * @type string $title Section title. + * @type string $id The container id. + * } + * @return bool False if no posts were found. True otherwise. + */ +function wp_dashboard_recent_posts( $args ) { + $query_args = array( + 'post_type' => 'post', + 'post_status' => $args['status'], + 'orderby' => 'date', + 'order' => $args['order'], + 'posts_per_page' => intval( $args['max'] ), + 'no_found_rows' => true, + 'cache_results' => false, + 'perm' => ( 'future' === $args['status'] ) ? 'editable' : 'readable', + ); + $posts = new WP_Query( $query_args ); + + if ( $posts->have_posts() ) { + + echo '
'; + + echo '

' . $args['title'] . '

'; + + echo '
    '; + + $i = 0; + $today = date( 'Y-m-d', current_time( 'timestamp' ) ); + $tomorrow = date( 'Y-m-d', strtotime( '+1 day', current_time( 'timestamp' ) ) ); + + while ( $posts->have_posts() ) { + $posts->the_post(); + + $time = get_the_time( 'U' ); + if ( date( 'Y-m-d', $time ) == $today ) { + $relative = __( 'Today' ); + } elseif ( date( 'Y-m-d', $time ) == $tomorrow ) { + $relative = __( 'Tomorrow' ); + } else { + /* translators: date and time format for recent posts on the dashboard, see http://php.net/date */ + $relative = date_i18n( __( 'M jS' ), $time ); + } + + if ( current_user_can( 'edit_post', get_the_ID() ) ) { + /* translators: 1: relative date, 2: time, 3: post edit link, 4: post title */ + $format = __( '%1$s, %2$s %4$s' ); + printf( "
  • $format
  • ", $relative, get_the_time(), get_edit_post_link(), _draft_or_post_title() ); + } else { + /* translators: 1: relative date, 2: time, 3: post title */ + $format = __( '%1$s, %2$s %3$s' ); + printf( "
  • $format
  • ", $relative, get_the_time(), _draft_or_post_title() ); + } + } + + echo '
'; + echo '
'; + + } else { + return false; + } + + wp_reset_postdata(); + + return true; +} + +/** + * Show Comments section. + * + * @since 3.8.0 + * + * @param int $total_items Optional. Number of comments to query. Default 5. + * @return bool False if no comments were found. True otherwise. + */ +function wp_dashboard_recent_comments( $total_items = 5 ) { + global $wpdb; + + // Select all comment types and filter out spam later for better query performance. + $comments = array(); + $start = 0; + + $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 ( ! current_user_can( 'read_post', $comment->comment_post_ID ) ) + continue; + $comments[] = $comment; + if ( count( $comments ) == $total_items ) + break 2; + } + $comments_query['offset'] += $comments_query['number']; + $comments_query['number'] = $total_items * 10; + } + + + + if ( $comments ) { + echo '
'; + echo '

' . __( 'Comments' ) . '

'; + + echo '
'; + foreach ( $comments as $comment ) + _wp_dashboard_recent_comments_row( $comment ); + echo '
'; + + if ( current_user_can('edit_posts') ) + _get_list_table('WP_Comments_List_Table')->views(); + + wp_comment_reply( -1, false, 'dashboard', false ); + wp_comment_trashnotice(); + + echo '
'; + } else { + return false; + } + return true; +} + +/** + * Display generic dashboard RSS widget feed. + * + * @since 2.5.0 + * + * @param string $widget_id + */ +function wp_dashboard_rss_output( $widget_id ) { + $widgets = get_option( 'dashboard_widget_options' ); + echo '
'; + wp_widget_rss_output( $widgets[ $widget_id ] ); + echo "
"; +} + +/** + * Checks to see if all of the feed url in $check_urls are cached. + * + * If $check_urls is empty, look for the rss feed url found in the dashboard + * widget options of $widget_id. If cached, call $callback, a function that + * echoes out output for this widget. If not cache, echo a "Loading..." stub + * which is later replaced by AJAX call (see top of /wp-admin/index.php) + * + * @since 2.5.0 + * + * @param string $widget_id + * @param callback $callback + * @param array $check_urls RSS feeds + * @return bool False on failure. True on success. + */ +function wp_dashboard_cached_rss_widget( $widget_id, $callback, $check_urls = array() ) { + $loading = '

' . __( 'Loading…' ) . '

' . __( 'This widget requires JavaScript.' ) . '

'; + $doing_ajax = ( defined('DOING_AJAX') && DOING_AJAX ); + + if ( empty($check_urls) ) { + $widgets = get_option( 'dashboard_widget_options' ); + if ( empty($widgets[$widget_id]['url']) && ! $doing_ajax ) { + echo $loading; + return false; + } + $check_urls = array( $widgets[$widget_id]['url'] ); + } + + $cache_key = 'dash_' . md5( $widget_id ); + if ( false !== ( $output = get_transient( $cache_key ) ) ) { + echo $output; + return true; + } + + if ( ! $doing_ajax ) { + echo $loading; + return false; + } + + if ( $callback && is_callable( $callback ) ) { + $args = array_slice( func_get_args(), 2 ); + array_unshift( $args, $widget_id ); + ob_start(); + call_user_func_array( $callback, $args ); + set_transient( $cache_key, ob_get_flush(), 12 * HOUR_IN_SECONDS ); // Default lifetime in cache of 12 hours (same as the feeds) + } + + return true; +} + +/* Dashboard Widgets Controls */ + +// Calls widget_control callback +/** + * Calls widget control callback. + * + * @since 2.5.0 + * + * @param int $widget_control_id Registered Widget ID. + */ +function wp_dashboard_trigger_widget_control( $widget_control_id = false ) { + global $wp_dashboard_control_callbacks; + + if ( is_scalar($widget_control_id) && $widget_control_id && isset($wp_dashboard_control_callbacks[$widget_control_id]) && is_callable($wp_dashboard_control_callbacks[$widget_control_id]) ) { + call_user_func( $wp_dashboard_control_callbacks[$widget_control_id], '', array( 'id' => $widget_control_id, 'callback' => $wp_dashboard_control_callbacks[$widget_control_id] ) ); + } +} + +/** + * The RSS dashboard widget control. + * + * Sets up $args to be used as input to wp_widget_rss_form(). Handles POST data + * from RSS-type widgets. + * + * @since 2.5.0 + * + * @param string $widget_id + * @param array $form_inputs + */ +function wp_dashboard_rss_control( $widget_id, $form_inputs = array() ) { + if ( !$widget_options = get_option( 'dashboard_widget_options' ) ) + $widget_options = array(); + + if ( !isset($widget_options[$widget_id]) ) + $widget_options[$widget_id] = array(); + + $number = 1; // Hack to use wp_widget_rss_form() + $widget_options[$widget_id]['number'] = $number; + + if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset($_POST['widget-rss'][$number]) ) { + $_POST['widget-rss'][$number] = wp_unslash( $_POST['widget-rss'][$number] ); + $widget_options[$widget_id] = wp_widget_rss_process( $_POST['widget-rss'][$number] ); + $widget_options[$widget_id]['number'] = $number; + // title is optional. If black, fill it if possible + if ( !$widget_options[$widget_id]['title'] && isset($_POST['widget-rss'][$number]['title']) ) { + $rss = fetch_feed($widget_options[$widget_id]['url']); + if ( is_wp_error($rss) ) { + $widget_options[$widget_id]['title'] = htmlentities(__('Unknown Feed')); + } else { + $widget_options[$widget_id]['title'] = htmlentities(strip_tags($rss->get_title())); + $rss->__destruct(); + unset($rss); + } + } + update_option( 'dashboard_widget_options', $widget_options ); + $cache_key = 'dash_' . md5( $widget_id ); + delete_transient( $cache_key ); + } + + wp_widget_rss_form( $widget_options[$widget_id], $form_inputs ); +} + +/** + * WordPress News dashboard widget. + * + * @since 2.7.0 + */ +function wp_dashboard_primary() { + $feeds = array( + 'news' => array( + + /** + * Filter the primary link URL for the 'WordPress News' dashboard widget. + * + * @since 2.5.0 + * + * @param string $link The widget's primary link URL. + */ + 'link' => apply_filters( 'dashboard_primary_link', __( 'http://wordpress.org/news/' ) ), + + /** + * Filter the primary feed URL for the 'WordPress News' dashboard widget. + * + * @since 2.3.0 + * + * @param string $url The widget's primary feed URL. + */ + 'url' => apply_filters( 'dashboard_primary_feed', __( 'http://wordpress.org/news/feed/' ) ), + + /** + * Filter the primary link title for the 'WordPress News' dashboard widget. + * + * @since 2.3.0 + * + * @param string $title Title attribute for the widget's primary link. + */ + 'title' => apply_filters( 'dashboard_primary_title', __( 'WordPress Blog' ) ), + 'items' => 1, + 'show_summary' => 1, + 'show_author' => 0, + 'show_date' => 1, + ), + 'planet' => array( + + /** + * Filter the secondary link URL for the 'WordPress News' dashboard widget. + * + * @since 2.3.0 + * + * @param string $link The widget's secondary link URL. + */ + 'link' => apply_filters( 'dashboard_secondary_link', __( 'http://planet.wordpress.org/' ) ), + + /** + * Filter the secondary feed URL for the 'WordPress News' dashboard widget. + * + * @since 2.3.0 + * + * @param string $url The widget's secondary feed URL. + */ + 'url' => apply_filters( 'dashboard_secondary_feed', __( 'http://planet.wordpress.org/feed/' ) ), + + /** + * Filter the secondary link title for the 'WordPress News' dashboard widget. + * + * @since 2.3.0 + * + * @param string $title Title attribute for the widget's secondary link. + */ + 'title' => apply_filters( 'dashboard_secondary_title', __( 'Other WordPress News' ) ), + 'items' => 3, + 'show_summary' => 0, + 'show_author' => 0, + 'show_date' => 0, + ) + ); + + if ( ( ! is_multisite() && is_blog_admin() && current_user_can( 'install_plugins' ) ) || ( is_network_admin() && current_user_can( 'manage_network_plugins' ) && current_user_can( 'install_plugins' ) ) ) { + $feeds['plugins'] = array( + 'link' => '', + 'url' => array( + 'popular' => 'http://wordpress.org/plugins/rss/browse/popular/', + ), + 'title' => '', + 'items' => 1, + 'show_summary' => 0, + 'show_author' => 0, + 'show_date' => 0, + ); + } + + wp_dashboard_cached_rss_widget( 'dashboard_primary', 'wp_dashboard_primary_output', $feeds ); +} + +/** + * Display the WordPress news feeds. + * + * @since 3.8.0 + * + * @param string $widget_id Widget ID. + * @param array $feeds Array of RSS feeds. + */ +function wp_dashboard_primary_output( $widget_id, $feeds ) { + foreach( $feeds as $type => $args ) { + $args['type'] = $type; + echo '
'; + if ( $type === 'plugins' ) { + wp_dashboard_plugins_output( $args['url'], $args ); + } else { + wp_widget_rss_output( $args['url'], $args ); + } + echo "
"; + } +} + +/** + * Display plugins text for the WordPress news widget. + * + * @since 2.5.0 + */ +function wp_dashboard_plugins_output( $rss, $args = array() ) { + // Plugin feeds plus link to install them + $popular = fetch_feed( $args['url']['popular'] ); + + if ( false === $plugin_slugs = get_transient( 'plugin_slugs' ) ) { + $plugin_slugs = array_keys( get_plugins() ); + set_transient( 'plugin_slugs', $plugin_slugs, DAY_IN_SECONDS ); + } + + echo '
    '; + + foreach ( array( + 'popular' => __( 'Popular Plugin' ) + ) as $feed => $label ) { + if ( is_wp_error($$feed) || !$$feed->get_item_quantity() ) + continue; + + $items = $$feed->get_items(0, 5); + + // Pick a random, non-installed plugin + while ( true ) { + // Abort this foreach loop iteration if there's no plugins left of this type + if ( 0 == count($items) ) + continue 2; + + $item_key = array_rand($items); + $item = $items[$item_key]; + + list($link, $frag) = explode( '#', $item->get_link() ); + + $link = esc_url($link); + if ( preg_match( '|/([^/]+?)/?$|', $link, $matches ) ) + $slug = $matches[1]; + else { + unset( $items[$item_key] ); + continue; + } + + // Is this random plugin's slug already installed? If so, try again. + reset( $plugin_slugs ); + foreach ( $plugin_slugs as $plugin_slug ) { + if ( $slug == substr( $plugin_slug, 0, strlen( $slug ) ) ) { + unset( $items[$item_key] ); + continue 2; + } + } + + // If we get to this point, then the random plugin isn't installed and we can stop the while(). + break; + } + + // Eliminate some common badly formed plugin descriptions + while ( ( null !== $item_key = array_rand($items) ) && false !== strpos( $items[$item_key]->get_description(), 'Plugin Name:' ) ) + unset($items[$item_key]); + + if ( !isset($items[$item_key]) ) + continue; + + $title = esc_html( $item->get_title() ); + + $description = esc_html( strip_tags( @html_entity_decode( $item->get_description(), ENT_QUOTES, get_option( 'blog_charset' ) ) ) ); + + $ilink = wp_nonce_url('plugin-install.php?tab=plugin-information&plugin=' . $slug, 'install-plugin_' . $slug) . '&TB_iframe=true&width=600&height=800'; + + echo "
  • $label: $title (" . __( 'Install' ) . ")
  • "; + + $$feed->__destruct(); + unset( $$feed ); + } + + echo '
'; +} + +/** + * Display file upload quota on dashboard. + * + * Runs on the activity_box_end hook in wp_dashboard_right_now(). + * + * @since 3.0.0 + * + * @return bool True if not multisite, user can't upload files, or the space check option is disabled. +*/ +function wp_dashboard_quota() { + if ( !is_multisite() || !current_user_can( 'upload_files' ) || get_site_option( 'upload_space_check_disabled' ) ) + return true; + + $quota = get_space_allowed(); + $used = get_space_used(); + + if ( $used > $quota ) + $percentused = '100'; + else + $percentused = ( $used / $quota ) * 100; + $used_class = ( $percentused >= 70 ) ? ' warning' : ''; + $used = round( $used, 2 ); + $percentused = number_format( $percentused ); + + ?> +

+
+
    +
  • + %3$s', + esc_url( admin_url( 'upload.php' ) ), + __( 'Manage Uploads' ), + $text + ); ?> +
  • + %3$s', + esc_url( admin_url( 'upload.php' ) ), + __( 'Manage Uploads' ), + $text + ); ?> +
  • +
+
+ %s. Using an outdated browser makes your computer unsafe. For the best WordPress experience, please update your browser." ), esc_attr( $response['update_url'] ), esc_html( $response['name'] ) ); + } else { + $msg = sprintf( __( "It looks like you're using an old version of %s. For the best WordPress experience, please update your browser." ), esc_attr( $response['update_url'] ), esc_html( $response['name'] ) ); + } + + $browser_nag_class = ''; + if ( !empty( $response['img_src'] ) ) { + $img_src = ( is_ssl() && ! empty( $response['img_src_ssl'] ) )? $response['img_src_ssl'] : $response['img_src']; + + $notice .= '
'; + $browser_nag_class = ' has-browser-icon'; + } + $notice .= "

{$msg}

"; + + $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 .= '
'; + } + + /** + * Filter the notice output for the 'Browse Happy' nag meta box. + * + * @since 3.2.0 + * + * @param string $notice The notice content. + * @param array $response An array containing web browser information. + */ + echo apply_filters( 'browse-happy-notice', $notice, $response ); +} + +function dashboard_browser_nag_class( $classes ) { + $response = wp_check_browser_version(); + + if ( $response && $response['insecure'] ) + $classes[] = 'browser-insecure'; + + return $classes; +} + +/** + * Check if the user needs a browser update + * + * @since 3.2.0 + * + * @return array|bool False on failure, array of browser data on success. + */ +function wp_check_browser_version() { + if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) + return false; + + $key = md5( $_SERVER['HTTP_USER_AGENT'] ); + + if ( false === ($response = get_site_transient('browser_' . $key) ) ) { + global $wp_version; + + $options = array( + 'body' => array( 'useragent' => $_SERVER['HTTP_USER_AGENT'] ), + 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url() + ); + + $response = wp_remote_post( 'http://api.wordpress.org/core/browse-happy/1.1/', $options ); + + if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) + return false; + + /** + * Response should be an array with: + * 'name' - string - A user friendly browser name + * 'version' - string - The most recent version of the browser + * 'current_version' - string - The version of the browser the user is using + * 'upgrade' - boolean - Whether the browser needs an upgrade + * 'insecure' - boolean - Whether the browser is deemed insecure + * 'upgrade_url' - string - The url to visit to upgrade + * 'img_src' - string - An image representing the browser + * 'img_src_ssl' - string - An image (over SSL) representing the browser + */ + $response = json_decode( wp_remote_retrieve_body( $response ), true ); + + if ( ! is_array( $response ) ) + return false; + + set_site_transient( 'browser_' . $key, $response, WEEK_IN_SECONDS ); + } + + return $response; +} + +/** + * Empty function usable by plugins to output empty dashboard widget (to be populated later by JS). + */ +function wp_dashboard_empty() {} + +/** + * Displays a welcome panel to introduce users to WordPress. + * + * @since 3.3.0 + */ +function wp_welcome_panel() { + ?> +
+

+

+
+
+

+ + + true ) ) ) > 1 ) ) : ?> +

change your theme completely' ), admin_url( 'themes.php' ) ); ?>

+ +
+
+

+
    + +
  • ' . __( 'Edit your front page' ) . '', get_edit_post_link( get_option( 'page_on_front' ) ) ); ?>
  • +
  • ' . __( 'Add additional pages' ) . '', admin_url( 'post-new.php?post_type=page' ) ); ?>
  • + +
  • ' . __( 'Edit your front page' ) . '', get_edit_post_link( get_option( 'page_on_front' ) ) ); ?>
  • +
  • ' . __( 'Add additional pages' ) . '', admin_url( 'post-new.php?post_type=page' ) ); ?>
  • +
  • ' . __( 'Add a blog post' ) . '', admin_url( 'post-new.php' ) ); ?>
  • + +
  • ' . __( 'Write your first blog post' ) . '', admin_url( 'post-new.php' ) ); ?>
  • +
  • ' . __( 'Add an About page' ) . '', admin_url( 'post-new.php?post_type=page' ) ); ?>
  • + +
  • ' . __( 'View your site' ) . '', home_url( '/' ) ); ?>
  • +
+
+
+

+
    + +
  • widgets or menus' ), + admin_url( 'widgets.php' ), admin_url( 'nav-menus.php' ) ); + } elseif ( current_theme_supports( 'widgets' ) ) { + echo '' . __( 'Manage widgets' ) . ''; + } else { + echo '' . __( 'Manage menus' ) . ''; + } + ?>
  • + + +
  • ' . __( 'Turn comments on or off' ) . '', admin_url( 'options-discussion.php' ) ); ?>
  • + +
  • ' . __( 'Learn more about getting started' ) . '', __( 'http://codex.wordpress.org/First_Steps_With_WordPress' ) ); ?>
  • +
+
+
+
+ 0) ); + + if ( $categories ) { + foreach ( $categories as $category ) { + if ( $currentcat != $category->term_id && $parent == $category->parent) { + $pad = str_repeat( '– ', $level ); + $category->name = esc_html( $category->name ); + echo "\n\t"; + wp_dropdown_cats( $currentcat, $currentparent, $category->term_id, $level +1, $categories ); + } + } + } else { + return false; + } +} + +/** + * Register a setting and its sanitization callback + * + * @since 2.7.0 + * @deprecated 3.0.0 + * @deprecated Use register_setting() + * @see register_setting() + * + * @param string $option_group A settings group name. Should correspond to a whitelisted option key name. + * Default whitelisted option key names include "general," "discussion," and "reading," among others. + * @param string $option_name The name of an option to sanitize and save. + * @param unknown_type $sanitize_callback A callback function that sanitizes the option's value. + * @return unknown + */ +function add_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) { + _deprecated_function( __FUNCTION__, '3.0', 'register_setting()' ); + return register_setting( $option_group, $option_name, $sanitize_callback ); +} + +/** + * Unregister a setting + * + * @since 2.7.0 + * @deprecated 3.0.0 + * @deprecated Use unregister_setting() + * @see unregister_setting() + * + * @param unknown_type $option_group + * @param unknown_type $option_name + * @param unknown_type $sanitize_callback + * @return unknown + */ +function remove_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) { + _deprecated_function( __FUNCTION__, '3.0', 'unregister_setting()' ); + return unregister_setting( $option_group, $option_name, $sanitize_callback ); +} + +/** + * Determines the language to use for CodePress syntax highlighting. + * + * @since 2.8.0 + * @deprecated 3.0.0 + * + * @param string $filename +**/ +function codepress_get_lang( $filename ) { + _deprecated_function( __FUNCTION__, '3.0' ); + return; +} + +/** + * Adds Javascript required to make CodePress work on the theme/plugin editors. + * + * @since 2.8.0 + * @deprecated 3.0.0 +**/ +function codepress_footer_js() { + _deprecated_function( __FUNCTION__, '3.0' ); + return; +} + +/** + * Determine whether to use CodePress. + * + * @since 2.8.0 + * @deprecated 3.0.0 +**/ +function use_codepress() { + _deprecated_function( __FUNCTION__, '3.0' ); + return; +} + +/** + * @deprecated 3.1.0 + * + * @return array List of user IDs. + */ +function get_author_user_ids() { + _deprecated_function( __FUNCTION__, '3.1', 'get_users()' ); + + global $wpdb; + if ( !is_multisite() ) + $level_key = $wpdb->get_blog_prefix() . 'user_level'; + else + $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // wpmu site admins don't have user_levels + + return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value != '0'", $level_key) ); +} + +/** + * @deprecated 3.1.0 + * + * @param int $user_id User ID. + * @return array|bool List of editable authors. False if no editable users. + */ +function get_editable_authors( $user_id ) { + _deprecated_function( __FUNCTION__, '3.1', 'get_users()' ); + + global $wpdb; + + $editable = get_editable_user_ids( $user_id ); + + if ( !$editable ) { + return false; + } else { + $editable = join(',', $editable); + $authors = $wpdb->get_results( "SELECT * FROM $wpdb->users WHERE ID IN ($editable) ORDER BY display_name" ); + } + + return apply_filters('get_editable_authors', $authors); +} + +/** + * @deprecated 3.1.0 + * + * @param int $user_id User ID. + * @param bool $exclude_zeros Optional, default is true. Whether to exclude zeros. + * @return unknown + */ +function get_editable_user_ids( $user_id, $exclude_zeros = true, $post_type = 'post' ) { + _deprecated_function( __FUNCTION__, '3.1', 'get_users()' ); + + global $wpdb; + + if ( ! $user = get_userdata( $user_id ) ) + return array(); + $post_type_obj = get_post_type_object($post_type); + + if ( ! $user->has_cap($post_type_obj->cap->edit_others_posts) ) { + if ( $user->has_cap($post_type_obj->cap->edit_posts) || ! $exclude_zeros ) + return array($user->ID); + else + return array(); + } + + if ( !is_multisite() ) + $level_key = $wpdb->get_blog_prefix() . 'user_level'; + else + $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // wpmu site admins don't have user_levels + + $query = $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s", $level_key); + if ( $exclude_zeros ) + $query .= " AND meta_value != '0'"; + + return $wpdb->get_col( $query ); +} + +/** + * @deprecated 3.1.0 + */ +function get_nonauthor_user_ids() { + _deprecated_function( __FUNCTION__, '3.1', 'get_users()' ); + + global $wpdb; + + if ( !is_multisite() ) + $level_key = $wpdb->get_blog_prefix() . 'user_level'; + else + $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // wpmu site admins don't have user_levels + + return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value = '0'", $level_key) ); +} + +if ( !class_exists('WP_User_Search') ) : +/** + * WordPress User Search class. + * + * @since 2.1.0 + * @deprecated 3.1.0 + */ +class WP_User_Search { + + /** + * {@internal Missing Description}} + * + * @since 2.1.0 + * @access private + * @var unknown_type + */ + var $results; + + /** + * {@internal Missing Description}} + * + * @since 2.1.0 + * @access private + * @var unknown_type + */ + var $search_term; + + /** + * Page number. + * + * @since 2.1.0 + * @access private + * @var int + */ + var $page; + + /** + * Role name that users have. + * + * @since 2.5.0 + * @access private + * @var string + */ + var $role; + + /** + * Raw page number. + * + * @since 2.1.0 + * @access private + * @var int|bool + */ + var $raw_page; + + /** + * Amount of users to display per page. + * + * @since 2.1.0 + * @access public + * @var int + */ + var $users_per_page = 50; + + /** + * {@internal Missing Description}} + * + * @since 2.1.0 + * @access private + * @var unknown_type + */ + var $first_user; + + /** + * {@internal Missing Description}} + * + * @since 2.1.0 + * @access private + * @var int + */ + var $last_user; + + /** + * {@internal Missing Description}} + * + * @since 2.1.0 + * @access private + * @var string + */ + var $query_limit; + + /** + * {@internal Missing Description}} + * + * @since 3.0.0 + * @access private + * @var string + */ + var $query_orderby; + + /** + * {@internal Missing Description}} + * + * @since 3.0.0 + * @access private + * @var string + */ + var $query_from; + + /** + * {@internal Missing Description}} + * + * @since 3.0.0 + * @access private + * @var string + */ + var $query_where; + + /** + * {@internal Missing Description}} + * + * @since 2.1.0 + * @access private + * @var int + */ + var $total_users_for_query = 0; + + /** + * {@internal Missing Description}} + * + * @since 2.1.0 + * @access private + * @var bool + */ + var $too_many_total_users = false; + + /** + * {@internal Missing Description}} + * + * @since 2.1.0 + * @access private + * @var unknown_type + */ + var $search_errors; + + /** + * {@internal Missing Description}} + * + * @since 2.7.0 + * @access private + * @var unknown_type + */ + var $paging_text; + + /** + * PHP4 Constructor - Sets up the object properties. + * + * @since 2.1.0 + * + * @param string $search_term Search terms string. + * @param int $page Optional. Page ID. + * @param string $role Role name. + * @return WP_User_Search + */ + function WP_User_Search ($search_term = '', $page = '', $role = '') { + _deprecated_function( __FUNCTION__, '3.1', 'WP_User_Query' ); + + $this->search_term = wp_unslash( $search_term ); + $this->raw_page = ( '' == $page ) ? false : (int) $page; + $this->page = (int) ( '' == $page ) ? 1 : $page; + $this->role = $role; + + $this->prepare_query(); + $this->query(); + $this->do_paging(); + } + + /** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since 2.1.0 + * @access public + */ + function prepare_query() { + global $wpdb; + $this->first_user = ($this->page - 1) * $this->users_per_page; + + $this->query_limit = $wpdb->prepare(" LIMIT %d, %d", $this->first_user, $this->users_per_page); + $this->query_orderby = ' ORDER BY user_login'; + + $search_sql = ''; + if ( $this->search_term ) { + $searches = array(); + $search_sql = 'AND ('; + foreach ( array('user_login', 'user_nicename', 'user_email', 'user_url', 'display_name') as $col ) + $searches[] = $wpdb->prepare( $col . ' LIKE %s', '%' . like_escape($this->search_term) . '%' ); + $search_sql .= implode(' OR ', $searches); + $search_sql .= ')'; + } + + $this->query_from = " FROM $wpdb->users"; + $this->query_where = " WHERE 1=1 $search_sql"; + + if ( $this->role ) { + $this->query_from .= " INNER JOIN $wpdb->usermeta ON $wpdb->users.ID = $wpdb->usermeta.user_id"; + $this->query_where .= $wpdb->prepare(" AND $wpdb->usermeta.meta_key = '{$wpdb->prefix}capabilities' AND $wpdb->usermeta.meta_value LIKE %s", '%' . $this->role . '%'); + } elseif ( is_multisite() ) { + $level_key = $wpdb->prefix . 'capabilities'; // wpmu site admins don't have user_levels + $this->query_from .= ", $wpdb->usermeta"; + $this->query_where .= " AND $wpdb->users.ID = $wpdb->usermeta.user_id AND meta_key = '{$level_key}'"; + } + + do_action_ref_array( 'pre_user_search', array( &$this ) ); + } + + /** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since 2.1.0 + * @access public + */ + function query() { + global $wpdb; + + $this->results = $wpdb->get_col("SELECT DISTINCT($wpdb->users.ID)" . $this->query_from . $this->query_where . $this->query_orderby . $this->query_limit); + + if ( $this->results ) + $this->total_users_for_query = $wpdb->get_var("SELECT COUNT(DISTINCT($wpdb->users.ID))" . $this->query_from . $this->query_where); // no limit + else + $this->search_errors = new WP_Error('no_matching_users_found', __('No matching users were found!')); + } + + /** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since 2.1.0 + * @access public + */ + function prepare_vars_for_template_usage() {} + + /** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since 2.1.0 + * @access public + */ + function do_paging() { + if ( $this->total_users_for_query > $this->users_per_page ) { // have to page the results + $args = array(); + if( ! empty($this->search_term) ) + $args['usersearch'] = urlencode($this->search_term); + if( ! empty($this->role) ) + $args['role'] = urlencode($this->role); + + $this->paging_text = paginate_links( array( + 'total' => ceil($this->total_users_for_query / $this->users_per_page), + 'current' => $this->page, + 'base' => 'users.php?%_%', + 'format' => 'userspage=%#%', + 'add_args' => $args + ) ); + if ( $this->paging_text ) { + $this->paging_text = sprintf( '' . __( 'Displaying %s–%s of %s' ) . '%s', + number_format_i18n( ( $this->page - 1 ) * $this->users_per_page + 1 ), + number_format_i18n( min( $this->page * $this->users_per_page, $this->total_users_for_query ) ), + number_format_i18n( $this->total_users_for_query ), + $this->paging_text + ); + } + } + } + + /** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since 2.1.0 + * @access public + * + * @return unknown + */ + function get_results() { + return (array) $this->results; + } + + /** + * Displaying paging text. + * + * @see do_paging() Builds paging text. + * + * @since 2.1.0 + * @access public + */ + function page_links() { + echo $this->paging_text; + } + + /** + * Whether paging is enabled. + * + * @see do_paging() Builds paging text. + * + * @since 2.1.0 + * @access public + * + * @return bool + */ + function results_are_paged() { + if ( $this->paging_text ) + return true; + return false; + } + + /** + * Whether there are search terms. + * + * @since 2.1.0 + * @access public + * + * @return bool + */ + function is_search() { + if ( $this->search_term ) + return true; + return false; + } +} +endif; + +/** + * Retrieve editable posts from other users. + * + * @deprecated 3.1.0 + * + * @param int $user_id User ID to not retrieve posts from. + * @param string $type Optional, defaults to 'any'. Post type to retrieve, can be 'draft' or 'pending'. + * @return array List of posts from others. + */ +function get_others_unpublished_posts($user_id, $type='any') { + _deprecated_function( __FUNCTION__, '3.1' ); + + global $wpdb; + + $editable = get_editable_user_ids( $user_id ); + + if ( in_array($type, array('draft', 'pending')) ) + $type_sql = " post_status = '$type' "; + else + $type_sql = " ( post_status = 'draft' OR post_status = 'pending' ) "; + + $dir = ( 'pending' == $type ) ? 'ASC' : 'DESC'; + + if ( !$editable ) { + $other_unpubs = ''; + } else { + $editable = join(',', $editable); + $other_unpubs = $wpdb->get_results( $wpdb->prepare("SELECT ID, post_title, post_author FROM $wpdb->posts WHERE post_type = 'post' AND $type_sql AND post_author IN ($editable) AND post_author != %d ORDER BY post_modified $dir", $user_id) ); + } + + return apply_filters('get_others_drafts', $other_unpubs); +} + +/** + * Retrieve drafts from other users. + * + * @deprecated 3.1.0 + * + * @param int $user_id User ID. + * @return array List of drafts from other users. + */ +function get_others_drafts($user_id) { + _deprecated_function( __FUNCTION__, '3.1' ); + + return get_others_unpublished_posts($user_id, 'draft'); +} + +/** + * Retrieve pending review posts from other users. + * + * @deprecated 3.1.0 + * + * @param int $user_id User ID. + * @return array List of posts with pending review post type from other users. + */ +function get_others_pending($user_id) { + _deprecated_function( __FUNCTION__, '3.1' ); + + return get_others_unpublished_posts($user_id, 'pending'); +} + +/** + * Output the QuickPress dashboard widget. + * + * @since 3.0.0 + * @deprecated 3.2.0 + * @deprecated Use wp_dashboard_quick_press() + * @see wp_dashboard_quick_press() + */ +function wp_dashboard_quick_press_output() { + _deprecated_function( __FUNCTION__, '3.2', 'wp_dashboard_quick_press()' ); + wp_dashboard_quick_press(); +} + +/** + * @since 2.7.0 + * @deprecated 3.3.0 + * @deprecated Use wp_editor() + * @see wp_editor() + */ +function wp_tiny_mce( $teeny = false, $settings = false ) { + _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' ); + + static $num = 1; + + if ( ! class_exists('_WP_Editors' ) ) + require_once( ABSPATH . WPINC . '/class-wp-editor.php' ); + + $editor_id = 'content' . $num++; + + $set = array( + 'teeny' => $teeny, + 'tinymce' => $settings ? $settings : true, + 'quicktags' => false + ); + + $set = _WP_Editors::parse_settings($editor_id, $set); + _WP_Editors::editor_settings($editor_id, $set); +} + +/** + * @deprecated 3.3.0 + * @deprecated Use wp_editor() + * @see wp_editor() + */ +function wp_preload_dialogs() { + _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' ); +} + +/** + * @deprecated 3.3.0 + * @deprecated Use wp_editor() + * @see wp_editor() + */ +function wp_print_editor_js() { + _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' ); +} + +/** + * @deprecated 3.3.0 + * @deprecated Use wp_editor() + * @see wp_editor() + */ +function wp_quicktags() { + _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' ); +} + +/** + * Returns the screen layout options. + * + * @since 2.8.0 + * @deprecated 3.3.0 + * @deprecated Use $current_screen->render_screen_layout() + * @see WP_Screen::render_screen_layout() + */ +function screen_layout( $screen ) { + _deprecated_function( __FUNCTION__, '3.3', '$current_screen->render_screen_layout()' ); + + $current_screen = get_current_screen(); + + if ( ! $current_screen ) + return ''; + + ob_start(); + $current_screen->render_screen_layout(); + return ob_get_clean(); +} + +/** + * Returns the screen's per-page options. + * + * @since 2.8.0 + * @deprecated 3.3.0 + * @deprecated Use $current_screen->render_per_page_options() + * @see WP_Screen::render_per_page_options() + */ +function screen_options( $screen ) { + _deprecated_function( __FUNCTION__, '3.3', '$current_screen->render_per_page_options()' ); + + $current_screen = get_current_screen(); + + if ( ! $current_screen ) + return ''; + + ob_start(); + $current_screen->render_per_page_options(); + return ob_get_clean(); +} + +/** + * Renders the screen's help. + * + * @since 2.7.0 + * @deprecated 3.3.0 + * @deprecated Use $current_screen->render_screen_meta() + * @see WP_Screen::render_screen_meta() + */ +function screen_meta( $screen ) { + $current_screen = get_current_screen(); + $current_screen->render_screen_meta(); +} + +/** + * Favorite actions were deprecated in version 3.2. Use the admin bar instead. + * + * @since 2.7.0 + * @deprecated 3.2.0 + */ +function favorite_actions() { + _deprecated_function( __FUNCTION__, '3.2', 'WP_Admin_Bar' ); +} + +function media_upload_image() { + __deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' ); + return wp_media_upload_handler(); +} + +function media_upload_audio() { + __deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' ); + return wp_media_upload_handler(); +} + +function media_upload_video() { + __deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' ); + return wp_media_upload_handler(); +} + +function media_upload_file() { + __deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' ); + return wp_media_upload_handler(); +} + +function type_url_form_image() { + __deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('image')" ); + return wp_media_insert_url_form( 'image' ); +} + +function type_url_form_audio() { + __deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('audio')" ); + return wp_media_insert_url_form( 'audio' ); +} + +function type_url_form_video() { + __deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('video')" ); + return wp_media_insert_url_form( 'video' ); +} + +function type_url_form_file() { + __deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('file')" ); + return wp_media_insert_url_form( 'file' ); +} + +/** + * Add contextual help text for a page. + * + * Creates an 'Overview' help tab. + * + * @since 2.7.0 + * @deprecated 3.3.0 + * @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 $help The content of an 'Overview' help tab. + */ +function add_contextual_help( $screen, $help ) { + _deprecated_function( __FUNCTION__, '3.3', 'get_current_screen()->add_help_tab()' ); + + if ( is_string( $screen ) ) + $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 + * @deprecated 3.4.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 + * @deprecated 3.4.0 + * + * @return unknown + */ +function current_theme_info() { + _deprecated_function( __FUNCTION__, '3.4', 'wp_get_theme()' ); + + return wp_get_theme(); +} + +/** + * This was once used to display an 'Insert into Post' button. Now it is deprecated and stubbed. + * + * @deprecated 3.5.0 + */ +function _insert_into_post_button( $type ) { + _deprecated_function( __FUNCTION__, '3.5' ); +} + +/** + * This was once used to display a media button. Now it is deprecated and stubbed. + * + * @deprecated 3.5.0 + */ +function _media_button($title, $icon, $type, $id) { + _deprecated_function( __FUNCTION__, '3.5' ); +} + +/** + * Get an existing post and format it for editing. + * + * @since 2.0.0 + * @deprecated 3.5.0 + * + * @param int $id + * @return object + */ +function get_post_to_edit( $id ) { + _deprecated_function( __FUNCTION__, '3.5', 'get_post()' ); + + return get_post( $id, OBJECT, 'edit' ); +} + +/** + * Get the default page information to use. + * + * @since 2.5.0 + * @deprecated 3.5.0 + * @deprecated Use get_default_post_to_edit() + * + * @return WP_Post Post object containing all the default post data as attributes + */ +function get_default_page_to_edit() { + _deprecated_function( __FUNCTION__, '3.5', "get_default_post_to_edit( 'page' )" ); + + $page = get_default_post_to_edit(); + $page->post_type = 'page'; + return $page; +} + +/** + * This was once used to create a thumbnail from an Image given a maximum side size. + * + * @since 1.2.0 + * @deprecated 3.5.0 + * @deprecated Use image_resize() + * @see image_resize() + * + * @param mixed $file Filename of the original image, Or attachment id. + * @param int $max_side Maximum length of a single side for the thumbnail. + * @param mixed $deprecated Never used. + * @return string Thumbnail path on success, Error string on failure. + */ +function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) { + _deprecated_function( __FUNCTION__, '3.5', 'image_resize()' ); + return apply_filters( 'wp_create_thumbnail', image_resize( $file, $max_side, $max_side ) ); +} + +/** + * This was once used to display a metabox for the nav menu theme locations. + * + * Deprecated in favor of a 'Manage Locations' tab added to nav menus management screen. + * + * @since 3.0.0 + * @deprecated 3.6.0 + */ +function wp_nav_menu_locations_meta_box() { + _deprecated_function( __FUNCTION__, '3.6' ); +} + +/** + * This was once used to kick-off the Core Updater. + * + * Deprecated in favor of instantating a Core_Upgrader instance directly, + * and calling the 'upgrade' method. + * + * @since 2.7.0 + * @deprecated 3.7.0 + * @see Core_Upgrader + */ +function wp_update_core($current, $feedback = '') { + _deprecated_function( __FUNCTION__, '3.7', 'new Core_Upgrader();' ); + + if ( !empty($feedback) ) + add_filter('update_feedback', $feedback); + + include ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; + $upgrader = new Core_Upgrader(); + return $upgrader->upgrade($current); + +} + +/** + * This was once used to kick-off the Plugin Updater. + * + * Deprecated in favor of instantating a Plugin_Upgrader instance directly, + * and calling the 'upgrade' method. + * Unused since 2.8.0. + * + * @since 2.5.0 + * @deprecated 3.7.0 + * @see Plugin_Upgrader + */ +function wp_update_plugin($plugin, $feedback = '') { + _deprecated_function( __FUNCTION__, '3.7', 'new Plugin_Upgrader();' ); + + if ( !empty($feedback) ) + add_filter('update_feedback', $feedback); + + include ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; + $upgrader = new Plugin_Upgrader(); + return $upgrader->upgrade($plugin); +} + +/** + * This was once used to kick-off the Theme Updater. + * + * Deprecated in favor of instantating a Theme_Upgrader instance directly, + * and calling the 'upgrade' method. + * Unused since 2.8.0. + * + * @since 2.7.0 + * @deprecated 3.7.0 + * @see Theme_Upgrader + */ +function wp_update_theme($theme, $feedback = '') { + _deprecated_function( __FUNCTION__, '3.7', 'new Theme_Upgrader();' ); + + if ( !empty($feedback) ) + add_filter('update_feedback', $feedback); + + include ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; + $upgrader = new Theme_Upgrader(); + return $upgrader->upgrade($theme); +} + +/** + * This was once used to display attachment links. Now it is deprecated and stubbed. + * + * {@internal Missing Short Description}} + * + * @since 2.0.0 + * @deprecated 3.7.0 + * + * @param unknown_type $id + * @return unknown + */ +function the_attachment_links( $id = false ) { + _deprecated_function( __FUNCTION__, '3.7' ); +} + +/**#@+ + * Displays a screen icon. + * + * @since 2.7.0 + * @since 3.8.0 Screen icons are no longer used in WordPress. This function no longer produces output. + * @deprecated 3.8.0 + */ +function screen_icon() { + echo get_screen_icon(); +} +function get_screen_icon() { + return ''; +} +/**#@-*/ + +/**#@+ + * Deprecated dashboard widget controls. + * + * @since 2.5.0 + * @deprecated 3.8.0 + */ +function wp_dashboard_incoming_links_output() {} +function wp_dashboard_secondary_output() {} +/**#@-*/ + +/**#@+ + * Deprecated dashboard widget controls. + * + * @since 2.7.0 + * @deprecated 3.8.0 + */ +function wp_dashboard_incoming_links() {} +function wp_dashboard_incoming_links_control() {} +function wp_dashboard_plugins() {} +function wp_dashboard_primary_control() {} +function wp_dashboard_recent_comments_control() {} +function wp_dashboard_secondary() {} +function wp_dashboard_secondary_control() {} +/**#@-*/ + +/** + * This was once used to move child posts to a new parent. + * + * @since 2.3.0 + * @deprecated 3.9.0 + * @access private + * + * @param int $old_ID + * @param int $new_ID + */ +function _relocate_children( $old_ID, $new_ID ) { + _deprecated_function( __FUNCTION__, '3.9' ); +} diff --git a/wp-admin/includes/export.php b/wp-admin/includes/export.php new file mode 100644 index 0000000..162e007 --- /dev/null +++ b/wp-admin/includes/export.php @@ -0,0 +1,477 @@ + 'all', 'author' => false, 'category' => false, + 'start_date' => false, 'end_date' => false, 'status' => false, + ); + $args = wp_parse_args( $args, $defaults ); + + /** + * Fires at the beginning of an export, before any headers are sent. + * + * @since 2.3.0 + * + * @param array $args An array of export arguments. + */ + do_action( 'export_wp', $args ); + + $sitename = sanitize_key( get_bloginfo( 'name' ) ); + if ( ! empty($sitename) ) $sitename .= '.'; + $filename = $sitename . 'wordpress.' . date( 'Y-m-d' ) . '.xml'; + + header( 'Content-Description: File Transfer' ); + header( 'Content-Disposition: attachment; filename=' . $filename ); + header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true ); + + if ( 'all' != $args['content'] && post_type_exists( $args['content'] ) ) { + $ptype = get_post_type_object( $args['content'] ); + if ( ! $ptype->can_export ) + $args['content'] = 'post'; + + $where = $wpdb->prepare( "{$wpdb->posts}.post_type = %s", $args['content'] ); + } else { + $post_types = get_post_types( array( 'can_export' => true ) ); + $esses = array_fill( 0, count($post_types), '%s' ); + $where = $wpdb->prepare( "{$wpdb->posts}.post_type IN (" . implode( ',', $esses ) . ')', $post_types ); + } + + if ( $args['status'] && ( 'post' == $args['content'] || 'page' == $args['content'] ) ) + $where .= $wpdb->prepare( " AND {$wpdb->posts}.post_status = %s", $args['status'] ); + else + $where .= " AND {$wpdb->posts}.post_status != 'auto-draft'"; + + $join = ''; + if ( $args['category'] && 'post' == $args['content'] ) { + if ( $term = term_exists( $args['category'], 'category' ) ) { + $join = "INNER JOIN {$wpdb->term_relationships} ON ({$wpdb->posts}.ID = {$wpdb->term_relationships}.object_id)"; + $where .= $wpdb->prepare( " AND {$wpdb->term_relationships}.term_taxonomy_id = %d", $term['term_taxonomy_id'] ); + } + } + + if ( 'post' == $args['content'] || 'page' == $args['content'] ) { + if ( $args['author'] ) + $where .= $wpdb->prepare( " AND {$wpdb->posts}.post_author = %d", $args['author'] ); + + if ( $args['start_date'] ) + $where .= $wpdb->prepare( " AND {$wpdb->posts}.post_date >= %s", date( 'Y-m-d', strtotime($args['start_date']) ) ); + + if ( $args['end_date'] ) + $where .= $wpdb->prepare( " AND {$wpdb->posts}.post_date < %s", date( 'Y-m-d', strtotime('+1 month', strtotime($args['end_date'])) ) ); + } + + // grab a snapshot of post IDs, just in case it changes during the export + $post_ids = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} $join WHERE $where" ); + + // get the requested terms ready, empty unless posts filtered by category or all content + $cats = $tags = $terms = array(); + if ( isset( $term ) && $term ) { + $cat = get_term( $term['term_id'], 'category' ); + $cats = array( $cat->term_id => $cat ); + unset( $term, $cat ); + } else if ( 'all' == $args['content'] ) { + $categories = (array) get_categories( array( 'get' => 'all' ) ); + $tags = (array) get_tags( array( 'get' => 'all' ) ); + + $custom_taxonomies = get_taxonomies( array( '_builtin' => false ) ); + $custom_terms = (array) get_terms( $custom_taxonomies, array( 'get' => 'all' ) ); + + // put categories in order with no child going before its parent + while ( $cat = array_shift( $categories ) ) { + if ( $cat->parent == 0 || isset( $cats[$cat->parent] ) ) + $cats[$cat->term_id] = $cat; + else + $categories[] = $cat; + } + + // put terms in order with no child going before its parent + while ( $t = array_shift( $custom_terms ) ) { + if ( $t->parent == 0 || isset( $terms[$t->parent] ) ) + $terms[$t->term_id] = $t; + else + $custom_terms[] = $t; + } + + unset( $categories, $custom_taxonomies, $custom_terms ); + } + + /** + * Wrap given string in XML CDATA tag. + * + * @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 ) . ']]>'; + + return $str; + } + + /** + * Return the URL of the site + * + * @since 2.5.0 + * + * @return string Site URL. + */ + function wxr_site_url() { + // ms: the base url + if ( is_multisite() ) + return network_home_url(); + // wp: the blog url + else + return get_bloginfo_rss( 'url' ); + } + + /** + * Output a cat_name XML tag from a given category object + * + * @since 2.1.0 + * + * @param object $category Category Object + */ + function wxr_cat_name( $category ) { + if ( empty( $category->name ) ) + return; + + echo '' . wxr_cdata( $category->name ) . ''; + } + + /** + * Output a category_description XML tag from a given category object + * + * @since 2.1.0 + * + * @param object $category Category Object + */ + function wxr_category_description( $category ) { + if ( empty( $category->description ) ) + return; + + echo '' . wxr_cdata( $category->description ) . ''; + } + + /** + * Output a tag_name XML tag from a given tag object + * + * @since 2.3.0 + * + * @param object $tag Tag Object + */ + function wxr_tag_name( $tag ) { + if ( empty( $tag->name ) ) + return; + + echo '' . wxr_cdata( $tag->name ) . ''; + } + + /** + * Output a tag_description XML tag from a given tag object + * + * @since 2.3.0 + * + * @param object $tag Tag Object + */ + function wxr_tag_description( $tag ) { + if ( empty( $tag->description ) ) + return; + + echo '' . wxr_cdata( $tag->description ) . ''; + } + + /** + * Output a term_name XML tag from a given term object + * + * @since 2.9.0 + * + * @param object $term Term Object + */ + function wxr_term_name( $term ) { + if ( empty( $term->name ) ) + return; + + echo '' . wxr_cdata( $term->name ) . ''; + } + + /** + * Output a term_description XML tag from a given term object + * + * @since 2.9.0 + * + * @param object $term Term Object + */ + function wxr_term_description( $term ) { + if ( empty( $term->description ) ) + return; + + echo '' . wxr_cdata( $term->description ) . ''; + } + + /** + * Output list of authors with posts + * + * @since 3.1.0 + */ + function wxr_authors_list() { + global $wpdb; + + $authors = array(); + $results = $wpdb->get_results( "SELECT DISTINCT post_author FROM $wpdb->posts WHERE post_status != 'auto-draft'" ); + foreach ( (array) $results as $result ) + $authors[] = get_userdata( $result->post_author ); + + $authors = array_filter( $authors ); + + foreach ( $authors as $author ) { + echo "\t"; + echo '' . $author->ID . ''; + echo '' . $author->user_login . ''; + echo '' . $author->user_email . ''; + echo '' . wxr_cdata( $author->display_name ) . ''; + echo '' . wxr_cdata( $author->user_firstname ) . ''; + echo '' . wxr_cdata( $author->user_lastname ) . ''; + echo "\n"; + } + } + + /** + * Ouput all navigation menu terms + * + * @since 3.1.0 + */ + function wxr_nav_menu_terms() { + $nav_menus = wp_get_nav_menus(); + if ( empty( $nav_menus ) || ! is_array( $nav_menus ) ) + return; + + foreach ( $nav_menus as $menu ) { + echo "\t{$menu->term_id}nav_menu{$menu->slug}"; + wxr_term_name( $menu ); + echo "\n"; + } + } + + /** + * Output list of taxonomy terms, in XML tag format, associated with a post + * + * @since 2.3.0 + */ + function wxr_post_taxonomy() { + $post = get_post(); + + $taxonomies = get_object_taxonomies( $post->post_type ); + if ( empty( $taxonomies ) ) + return; + $terms = wp_get_object_terms( $post->ID, $taxonomies ); + + foreach ( (array) $terms as $term ) { + echo "\t\ttaxonomy}\" nicename=\"{$term->slug}\">" . wxr_cdata( $term->name ) . "\n"; + } + } + + function wxr_filter_postmeta( $return_me, $meta_key ) { + if ( '_edit_lock' == $meta_key ) + $return_me = true; + return $return_me; + } + add_filter( 'wxr_export_skip_postmeta', 'wxr_filter_postmeta', 10, 2 ); + + echo '\n"; + + ?> + + + + + + + + + + + + + + + + + + + + + + <?php bloginfo_rss( 'name' ); ?> + + + + + + + + + + + + term_id ?>slug; ?>parent ? $cats[$c->parent]->slug : ''; ?> + + + term_id ?>slug; ?> + + + term_id ?>taxonomy; ?>slug; ?>parent ? $terms[$t->parent]->slug : ''; ?> + + + + + +in_the_loop = true; // Fake being in the loop. + + // fetch 20 posts at a time rather than loading the entire table into memory + while ( $next_posts = array_splice( $post_ids, 0, 20 ) ) { + $where = 'WHERE ID IN (' . join( ',', $next_posts ) . ')'; + $posts = $wpdb->get_results( "SELECT * FROM {$wpdb->posts} $where" ); + + // Begin Loop + foreach ( $posts as $post ) { + setup_postdata( $post ); + $is_sticky = is_sticky( $post->ID ) ? 1 : 0; +?> + + + <?php echo apply_filters( 'the_title_rss', $post->post_title ); ?> + + + + + + post_content ) ); + ?> + post_excerpt ) ); + ?> + ID; ?> + post_date; ?> + post_date_gmt; ?> + comment_status; ?> + ping_status; ?> + post_name; ?> + post_status; ?> + post_parent; ?> + menu_order; ?> + post_type; ?> + post_password; ?> + +post_type == 'attachment' ) : ?> + ID ); ?> + + +get_results( $wpdb->prepare( "SELECT * FROM $wpdb->postmeta WHERE post_id = %d", $post->ID ) ); + foreach ( $postmeta as $meta ) : + /** + * Filter whether to selectively skip post meta used for WXR exports. + * + * Returning a truthy value to the filter will skip the current meta + * object from being exported. + * + * @since 3.3.0 + * + * @param bool $skip Whether to skip the current post meta. Default false. + * @param string $meta_key Current meta key. + * @param object $meta Current meta object. + */ + if ( apply_filters( 'wxr_export_skip_postmeta', false, $meta->meta_key, $meta ) ) + continue; + ?> + + meta_key; ?> + meta_value ); ?> + + +get_results( $wpdb->prepare( "SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved <> 'spam'", $post->ID ) ); + foreach ( $comments as $c ) : ?> + + comment_ID; ?> + comment_author ); ?> + comment_author_email; ?> + comment_author_url ); ?> + comment_author_IP; ?> + comment_date; ?> + comment_date_gmt; ?> + comment_content ) ?> + comment_approved; ?> + comment_type; ?> + comment_parent; ?> + user_id; ?> +get_results( $wpdb->prepare( "SELECT * FROM $wpdb->commentmeta WHERE comment_id = %d", $c->comment_ID ) ); + foreach ( $c_meta as $meta ) : ?> + + meta_key; ?> + meta_value ); ?> + + + + + + + + + __( 'Main Index Template' ), + 'style.css' => __( 'Stylesheet' ), + 'editor-style.css' => __( 'Visual Editor Stylesheet' ), + 'editor-style-rtl.css' => __( 'Visual Editor RTL Stylesheet' ), + 'rtl.css' => __( 'RTL Stylesheet' ), + 'comments.php' => __( 'Comments' ), + 'comments-popup.php' => __( 'Popup Comments' ), + 'footer.php' => __( 'Footer' ), + 'header.php' => __( 'Header' ), + 'sidebar.php' => __( 'Sidebar' ), + 'archive.php' => __( 'Archives' ), + 'author.php' => __( 'Author Template' ), + 'tag.php' => __( 'Tag Template' ), + 'category.php' => __( 'Category Template' ), + 'page.php' => __( 'Page Template' ), + 'search.php' => __( 'Search Results' ), + 'searchform.php' => __( 'Search Form' ), + 'single.php' => __( 'Single Post' ), + '404.php' => __( '404 Template' ), + 'link.php' => __( 'Links Template' ), + 'functions.php' => __( 'Theme Functions' ), + 'attachment.php' => __( 'Attachment Template' ), + 'image.php' => __('Image Attachment Template'), + 'video.php' => __('Video Attachment Template'), + 'audio.php' => __('Audio Attachment Template'), + 'application.php' => __('Application Attachment Template'), + 'my-hacks.php' => __( 'my-hacks.php (legacy hacks support)' ), + '.htaccess' => __( '.htaccess (for rewrite rules )' ), + // Deprecated files + 'wp-layout.css' => __( 'Stylesheet' ), + 'wp-comments.php' => __( 'Comments Template' ), + 'wp-comments-popup.php' => __( 'Popup Comments Template' ), +); + +/** + * Get the description for standard WordPress theme files and other various standard + * WordPress files + * + * @since 1.5.0 + * + * @uses _cleanup_header_comment + * @uses $wp_file_descriptions + * @param string $file Filesystem path or filename + * @return string Description of file from $wp_file_descriptions or basename of $file if description doesn't exist + */ +function get_file_description( $file ) { + global $wp_file_descriptions; + + if ( isset( $wp_file_descriptions[basename( $file )] ) ) { + return $wp_file_descriptions[basename( $file )]; + } + elseif ( file_exists( $file ) && is_file( $file ) ) { + $template_data = implode( '', file( $file ) ); + if ( preg_match( '|Template Name:(.*)$|mi', $template_data, $name )) + return sprintf( __( '%s Page Template' ), _cleanup_header_comment($name[1]) ); + } + + return trim( basename( $file ) ); +} + +/** + * Get the absolute filesystem path to the root of the WordPress installation + * + * @since 1.5.0 + * + * @uses get_option + * @return string Full filesystem path to the root of the WordPress installation + */ +function get_home_path() { + $home = get_option( 'home' ); + $siteurl = get_option( 'siteurl' ); + if ( ! empty( $home ) && 0 !== strcasecmp( $home, $siteurl ) ) { + $wp_path_rel_to_home = str_ireplace( $home, '', $siteurl ); /* $siteurl - $home */ + $pos = strripos( str_replace( '\\', '/', $_SERVER['SCRIPT_FILENAME'] ), trailingslashit( $wp_path_rel_to_home ) ); + $home_path = substr( $_SERVER['SCRIPT_FILENAME'], 0, $pos ); + $home_path = trailingslashit( $home_path ); + } else { + $home_path = ABSPATH; + } + + return str_replace( '\\', '/', $home_path ); +} + +/** + * Returns a listing of all files in the specified folder and all subdirectories up to 100 levels deep. + * The depth of the recursiveness can be controlled by the $levels param. + * + * @since 2.6.0 + * + * @param string $folder Full path to folder + * @param int $levels (optional) Levels of folders to follow, Default: 100 (PHP Loop limit). + * @return bool|array False on failure, Else array of files + */ +function list_files( $folder = '', $levels = 100 ) { + if ( empty($folder) ) + return false; + + if ( ! $levels ) + return false; + + $files = array(); + if ( $dir = @opendir( $folder ) ) { + while (($file = readdir( $dir ) ) !== false ) { + if ( in_array($file, array('.', '..') ) ) + continue; + if ( is_dir( $folder . '/' . $file ) ) { + $files2 = list_files( $folder . '/' . $file, $levels - 1); + if ( $files2 ) + $files = array_merge($files, $files2 ); + else + $files[] = $folder . '/' . $file . '/'; + } else { + $files[] = $folder . '/' . $file; + } + } + } + @closedir( $dir ); + return $files; +} + +/** + * Returns a filename of a Temporary unique file. + * 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. + * + * @since 2.6.0 + * + * @param string $filename (optional) Filename to base the Unique file off + * @param string $dir (optional) Directory to store the file in + * @return string a writable filename + */ +function wp_tempnam($filename = '', $dir = '') { + if ( empty($dir) ) + $dir = get_temp_dir(); + $filename = basename($filename); + if ( empty($filename) ) + $filename = time(); + + $filename = preg_replace('|\..*$|', '.tmp', $filename); + $filename = $dir . wp_unique_filename($dir, $filename); + touch($filename); + return $filename; +} + +/** + * Make sure that the file that was requested to edit, is allowed to be edited + * + * Function will die if if you are not allowed to edit the file + * + * @since 1.5.0 + * + * @uses wp_die + * @uses validate_file + * @param string $file file the users is attempting to edit + * @param array $allowed_files Array of allowed files to edit, $file must match an entry exactly + * @return null + */ +function validate_file_to_edit( $file, $allowed_files = '' ) { + $code = validate_file( $file, $allowed_files ); + + if (!$code ) + return $file; + + switch ( $code ) { + case 1 : + wp_die( __( 'Sorry, that file cannot be edited.' ) ); + + //case 2 : + // wp_die( __('Sorry, can’t call files with their real path.' )); + + case 3 : + wp_die( __( 'Sorry, that file cannot be edited.' ) ); + } +} + +/** + * Handle PHP uploads in WordPress, sanitizing file names, checking extensions for mime type, + * and moving the file to the appropriate directory within the uploads directory. + * + * @since 2.0.0 + * + * @uses wp_handle_upload_error + * @uses is_multisite + * @uses wp_check_filetype_and_ext + * @uses current_user_can + * @uses wp_upload_dir + * @uses wp_unique_filename + * @uses delete_transient + * @param array $file Reference to a single element of $_FILES. Call the function once for each uploaded file. + * @param array $overrides Optional. An associative array of names=>values to override default variables with extract( $overrides, EXTR_OVERWRITE ). + * @param string $time Optional. Time formatted in 'yyyy/mm'. + * @return array On success, returns an associative array of file attributes. On failure, returns $overrides['upload_error_handler'](&$file, $message ) or array( 'error'=>$message ). + */ +function wp_handle_upload( &$file, $overrides = false, $time = null ) { + // The default error handler. + if ( ! function_exists( 'wp_handle_upload_error' ) ) { + function wp_handle_upload_error( &$file, $message ) { + return array( 'error'=>$message ); + } + } + + /** + * Filter data for the current file to upload. + * + * @since 2.9.0 + * + * @param array $file An array of data for a single file. + */ + $file = apply_filters( 'wp_handle_upload_prefilter', $file ); + + // You may define your own function and pass the name in $overrides['upload_error_handler'] + $upload_error_handler = 'wp_handle_upload_error'; + + // You may have had one or more 'wp_handle_upload_prefilter' functions error out the file. Handle that gracefully. + if ( isset( $file['error'] ) && !is_numeric( $file['error'] ) && $file['error'] ) + return $upload_error_handler( $file, $file['error'] ); + + // You may define your own function and pass the name in $overrides['unique_filename_callback'] + $unique_filename_callback = null; + + // $_POST['action'] must be set and its value must equal $overrides['action'] or this: + $action = 'wp_handle_upload'; + + // Courtesy of php.net, the strings that describe the error indicated in $_FILES[{form field}]['error']. + $upload_error_strings = array( false, + __( "The uploaded file exceeds the upload_max_filesize directive in php.ini." ), + __( "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form." ), + __( "The uploaded file was only partially uploaded." ), + __( "No file was uploaded." ), + '', + __( "Missing a temporary folder." ), + __( "Failed to write file to disk." ), + __( "File upload stopped by extension." )); + + // All tests are on by default. Most can be turned off by $overrides[{test_name}] = false; + $test_form = true; + $test_size = true; + $test_upload = true; + + // If you override this, you must provide $ext and $type!!!! + $test_type = true; + $mimes = false; + + // Install user overrides. Did we mention that this voids your warranty? + if ( is_array( $overrides ) ) + extract( $overrides, EXTR_OVERWRITE ); + + // A correct form post will pass this test. + if ( $test_form && (!isset( $_POST['action'] ) || ($_POST['action'] != $action ) ) ) + return call_user_func($upload_error_handler, $file, __( 'Invalid form submission.' )); + + // A successful upload will pass this test. It makes no sense to override this one. + if ( isset( $file['error'] ) && $file['error'] > 0 ) { + return call_user_func( $upload_error_handler, $file, $upload_error_strings[ $file['error'] ] ); + } + + // A non-empty file will pass this test. + if ( $test_size && !($file['size'] > 0 ) ) { + if ( is_multisite() ) + $error_msg = __( 'File is empty. Please upload something more substantial.' ); + else + $error_msg = __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.' ); + return call_user_func($upload_error_handler, $file, $error_msg); + } + + // A properly uploaded file will pass this test. There should be no reason to override this one. + if ( $test_upload && ! @ is_uploaded_file( $file['tmp_name'] ) ) + return call_user_func($upload_error_handler, $file, __( 'Specified file failed upload test.' )); + + // A correct MIME type will pass this test. Override $mimes or use the upload_mimes filter. + if ( $test_type ) { + $wp_filetype = wp_check_filetype_and_ext( $file['tmp_name'], $file['name'], $mimes ); + + extract( $wp_filetype ); + + // Check to see if wp_check_filetype_and_ext() determined the filename was incorrect + if ( $proper_filename ) + $file['name'] = $proper_filename; + + if ( ( !$type || !$ext ) && !current_user_can( 'unfiltered_upload' ) ) + return call_user_func($upload_error_handler, $file, __( 'Sorry, this file type is not permitted for security reasons.' )); + + if ( !$ext ) + $ext = ltrim(strrchr($file['name'], '.'), '.'); + + if ( !$type ) + $type = $file['type']; + } else { + $type = ''; + } + + // A writable uploads dir will pass this test. Again, there's no point overriding this one. + if ( ! ( ( $uploads = wp_upload_dir($time) ) && false === $uploads['error'] ) ) + return call_user_func($upload_error_handler, $file, $uploads['error'] ); + + $filename = wp_unique_filename( $uploads['path'], $file['name'], $unique_filename_callback ); + + // Move the file to the uploads dir + $new_file = $uploads['path'] . "/$filename"; + if ( false === @ move_uploaded_file( $file['tmp_name'], $new_file ) ) { + if ( 0 === strpos( $uploads['basedir'], ABSPATH ) ) + $error_path = str_replace( ABSPATH, '', $uploads['basedir'] ) . $uploads['subdir']; + else + $error_path = basename( $uploads['basedir'] ) . $uploads['subdir']; + + return $upload_error_handler( $file, sprintf( __('The uploaded file could not be moved to %s.' ), $error_path ) ); + } + + // Set correct file permissions + $stat = stat( dirname( $new_file )); + $perms = $stat['mode'] & 0000666; + @ chmod( $new_file, $perms ); + + // Compute the URL + $url = $uploads['url'] . "/$filename"; + + if ( is_multisite() ) + delete_transient( 'dirsize_cache' ); + + /** + * Filter the data array for the uploaded file. + * + * @since 2.1.0 + * + * @param array $upload { + * Array of upload data. + * + * @type string $file Filename of the newly-uploaded file. + * @type string $url URL of the uploaded file. + * @type string $type File type. + * } + * @param string $context The type of upload action. Accepts 'upload' or 'sideload'. + */ + return apply_filters( 'wp_handle_upload', array( 'file' => $new_file, 'url' => $url, 'type' => $type ), 'upload' ); +} + +/** + * 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 + * for mime type, and moving the file to the appropriate directory within the uploads directory. + * + * @since 2.6.0 + * + * @uses wp_handle_upload_error + * @uses wp_check_filetype_and_ext + * @uses current_user_can + * @uses wp_upload_dir + * @uses wp_unique_filename + * @param array $file an array similar to that of a PHP $_FILES POST array + * @param array $overrides Optional. An associative array of names=>values to override default variables with extract( $overrides, EXTR_OVERWRITE ). + * @param string $time Optional. Time formatted in 'yyyy/mm'. + * @return array On success, returns an associative array of file attributes. On failure, returns $overrides['upload_error_handler'](&$file, $message ) or array( 'error'=>$message ). + */ +function wp_handle_sideload( &$file, $overrides = false, $time = null ) { + // The default error handler. + if (! function_exists( 'wp_handle_upload_error' ) ) { + function wp_handle_upload_error( &$file, $message ) { + return array( 'error'=>$message ); + } + } + + // You may define your own function and pass the name in $overrides['upload_error_handler'] + $upload_error_handler = 'wp_handle_upload_error'; + + // You may define your own function and pass the name in $overrides['unique_filename_callback'] + $unique_filename_callback = null; + + // $_POST['action'] must be set and its value must equal $overrides['action'] or this: + $action = 'wp_handle_sideload'; + + // Courtesy of php.net, the strings that describe the error indicated in $_FILES[{form field}]['error']. + $upload_error_strings = array( false, + __( "The uploaded file exceeds the upload_max_filesize directive in php.ini." ), + __( "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form." ), + __( "The uploaded file was only partially uploaded." ), + __( "No file was uploaded." ), + '', + __( "Missing a temporary folder." ), + __( "Failed to write file to disk." ), + __( "File upload stopped by extension." )); + + // All tests are on by default. Most can be turned off by $overrides[{test_name}] = false; + $test_form = true; + $test_size = true; + + // If you override this, you must provide $ext and $type!!!! + $test_type = true; + $mimes = false; + + // Install user overrides. Did we mention that this voids your warranty? + if ( is_array( $overrides ) ) + extract( $overrides, EXTR_OVERWRITE ); + + // A correct form post will pass this test. + if ( $test_form && (!isset( $_POST['action'] ) || ($_POST['action'] != $action ) ) ) + return $upload_error_handler( $file, __( 'Invalid form submission.' )); + + // A successful upload will pass this test. It makes no sense to override this one. + if ( ! empty( $file['error'] ) ) + return $upload_error_handler( $file, $upload_error_strings[$file['error']] ); + + // A non-empty file will pass this test. + if ( $test_size && !(filesize($file['tmp_name']) > 0 ) ) + return $upload_error_handler( $file, __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini.' )); + + // A properly uploaded file will pass this test. There should be no reason to override this one. + if (! @ is_file( $file['tmp_name'] ) ) + return $upload_error_handler( $file, __( 'Specified file does not exist.' )); + + // A correct MIME type will pass this test. Override $mimes or use the upload_mimes filter. + if ( $test_type ) { + $wp_filetype = wp_check_filetype_and_ext( $file['tmp_name'], $file['name'], $mimes ); + + extract( $wp_filetype ); + + // Check to see if wp_check_filetype_and_ext() determined the filename was incorrect + if ( $proper_filename ) + $file['name'] = $proper_filename; + + if ( ( !$type || !$ext ) && !current_user_can( 'unfiltered_upload' ) ) + return $upload_error_handler( $file, __( 'Sorry, this file type is not permitted for security reasons.' )); + + if ( !$ext ) + $ext = ltrim(strrchr($file['name'], '.'), '.'); + + if ( !$type ) + $type = $file['type']; + } + + // A writable uploads dir will pass this test. Again, there's no point overriding this one. + if ( ! ( ( $uploads = wp_upload_dir( $time ) ) && false === $uploads['error'] ) ) + return $upload_error_handler( $file, $uploads['error'] ); + + $filename = wp_unique_filename( $uploads['path'], $file['name'], $unique_filename_callback ); + + // Strip the query strings. + $filename = str_replace('?','-', $filename); + $filename = str_replace('&','-', $filename); + + // Move the file to the uploads dir + $new_file = $uploads['path'] . "/$filename"; + if ( false === @ rename( $file['tmp_name'], $new_file ) ) { + if ( 0 === strpos( $uploads['basedir'], ABSPATH ) ) + $error_path = str_replace( ABSPATH, '', $uploads['basedir'] ) . $uploads['subdir']; + else + $error_path = basename( $uploads['basedir'] ) . $uploads['subdir']; + return $upload_error_handler( $file, sprintf( __('The uploaded file could not be moved to %s.' ), $error_path ) ); + } + + // Set correct file permissions + $stat = stat( dirname( $new_file )); + $perms = $stat['mode'] & 0000666; + @ chmod( $new_file, $perms ); + + // Compute the URL + $url = $uploads['url'] . "/$filename"; + + /** This filter is documented in wp-admin/includes/file.php */ + $return = apply_filters( 'wp_handle_upload', array( 'file' => $new_file, 'url' => $url, 'type' => $type ), 'sideload' ); + + return $return; +} + +/** + * Downloads a url to a local temporary file using the WordPress HTTP Class. + * Please note, That the calling function must unlink() the file. + * + * @since 2.5.0 + * + * @param string $url the URL of the file to download + * @param int $timeout The timeout for the request to download the file default 300 seconds + * @return mixed WP_Error on failure, string Filename on success. + */ +function download_url( $url, $timeout = 300 ) { + //WARNING: The file is not automatically deleted, The script must unlink() the file. + if ( ! $url ) + return new WP_Error('http_no_url', __('Invalid URL Provided.')); + + $tmpfname = wp_tempnam($url); + if ( ! $tmpfname ) + return new WP_Error('http_no_file', __('Could not create Temporary file.')); + + $response = wp_safe_remote_get( $url, array( 'timeout' => $timeout, 'stream' => true, 'filename' => $tmpfname ) ); + + if ( is_wp_error( $response ) ) { + unlink( $tmpfname ); + return $response; + } + + if ( 200 != wp_remote_retrieve_response_code( $response ) ){ + unlink( $tmpfname ); + return new WP_Error( 'http_404', trim( wp_remote_retrieve_response_message( $response ) ) ); + } + + $content_md5 = wp_remote_retrieve_header( $response, 'content-md5' ); + if ( $content_md5 ) { + $md5_check = verify_file_md5( $tmpfname, $content_md5 ); + if ( is_wp_error( $md5_check ) ) { + unlink( $tmpfname ); + return $md5_check; + } + } + + return $tmpfname; +} + +/** + * Calculates and compares the MD5 of a file to its expected value. + * + * @since 3.7.0 + * + * @param string $filename The filename to check the MD5 of. + * @param string $expected_md5 The expected MD5 of the file, either a base64 encoded raw md5, or a hex-encoded md5 + * @return bool|object WP_Error on failure, true on success, false when the MD5 format is unknown/unexpected + */ +function verify_file_md5( $filename, $expected_md5 ) { + if ( 32 == strlen( $expected_md5 ) ) + $expected_raw_md5 = pack( 'H*', $expected_md5 ); + elseif ( 24 == strlen( $expected_md5 ) ) + $expected_raw_md5 = base64_decode( $expected_md5 ); + else + return false; // unknown format + + $file_md5 = md5_file( $filename, true ); + + if ( $file_md5 === $expected_raw_md5 ) + return true; + + return new WP_Error( 'md5_mismatch', sprintf( __( 'The checksum of the file (%1$s) does not match the expected checksum value (%2$s).' ), bin2hex( $file_md5 ), bin2hex( $expected_raw_md5 ) ) ); +} + +/** + * Unzips a specified ZIP file to a location on the Filesystem via the WordPress Filesystem Abstraction. + * Assumes that WP_Filesystem() has already been called and set up. Does not extract a root-level __MACOSX directory, if present. + * + * Attempts to increase the PHP Memory limit to 256M before uncompressing, + * However, The most memory required shouldn't be much larger than the Archive itself. + * + * @since 2.5.0 + * + * @param string $file Full path and filename of zip archive + * @param string $to Full path on the filesystem to extract archive to + * @return mixed WP_Error on failure, True on success + */ +function unzip_file($file, $to) { + global $wp_filesystem; + + if ( ! $wp_filesystem || !is_object($wp_filesystem) ) + return new WP_Error('fs_unavailable', __('Could not access filesystem.')); + + // Unzip can use a lot of memory, but not this much hopefully + /** This filter is documented in wp-admin/admin.php */ + @ini_set( 'memory_limit', apply_filters( 'admin_memory_limit', WP_MAX_MEMORY_LIMIT ) ); + + $needed_dirs = array(); + $to = trailingslashit($to); + + // Determine any parent dir's needed (of the upgrade directory) + if ( ! $wp_filesystem->is_dir($to) ) { //Only do parents if no children exist + $path = preg_split('![/\\\]!', untrailingslashit($to)); + for ( $i = count($path); $i >= 0; $i-- ) { + if ( empty($path[$i]) ) + continue; + + $dir = implode('/', array_slice($path, 0, $i+1) ); + if ( preg_match('!^[a-z]:$!i', $dir) ) // Skip it if it looks like a Windows Drive letter. + continue; + + if ( ! $wp_filesystem->is_dir($dir) ) + $needed_dirs[] = $dir; + else + break; // A folder exists, therefor, we dont need the check the levels below this + } + } + + /** + * Filter whether to use ZipArchive to unzip archives. + * + * @since 3.0.0 + * + * @param bool $ziparchive Whether to use ZipArchive. Default true. + */ + if ( class_exists( 'ZipArchive' ) && apply_filters( 'unzip_file_use_ziparchive', true ) ) { + $result = _unzip_file_ziparchive($file, $to, $needed_dirs); + if ( true === $result ) { + return $result; + } elseif ( is_wp_error($result) ) { + if ( 'incompatible_archive' != $result->get_error_code() ) + return $result; + } + } + // Fall through to PclZip if ZipArchive is not available, or encountered an error opening the file. + return _unzip_file_pclzip($file, $to, $needed_dirs); +} + +/** + * This function should not be called directly, use unzip_file instead. Attempts to unzip an archive using the ZipArchive class. + * Assumes that WP_Filesystem() has already been called and set up. + * + * @since 3.0.0 + * @see unzip_file + * @access private + * + * @param string $file Full path and filename of zip archive + * @param string $to Full path on the filesystem to extract archive to + * @param array $needed_dirs A partial list of required folders needed to be created. + * @return mixed WP_Error on failure, True on success + */ +function _unzip_file_ziparchive($file, $to, $needed_dirs = array() ) { + global $wp_filesystem; + + $z = new ZipArchive(); + + $zopen = $z->open( $file, ZIPARCHIVE::CHECKCONS ); + if ( true !== $zopen ) + return new WP_Error( 'incompatible_archive', __( 'Incompatible Archive.' ), array( 'ziparchive_error' => $zopen ) ); + + $uncompressed_size = 0; + + for ( $i = 0; $i < $z->numFiles; $i++ ) { + if ( ! $info = $z->statIndex($i) ) + return new WP_Error( 'stat_failed_ziparchive', __( 'Could not retrieve file from archive.' ) ); + + if ( '__MACOSX/' === substr($info['name'], 0, 9) ) // Skip the OS X-created __MACOSX directory + continue; + + $uncompressed_size += $info['size']; + + if ( '/' == substr($info['name'], -1) ) // directory + $needed_dirs[] = $to . untrailingslashit($info['name']); + else + $needed_dirs[] = $to . untrailingslashit(dirname($info['name'])); + } + + /* + * disk_free_space() could return false. Assume that any falsey value is an error. + * A disk that has zero free bytes has bigger problems. + * Require we have enough space to unzip the file and copy its contents, with a 10% buffer. + */ + if ( defined( 'DOING_CRON' ) && DOING_CRON ) { + $available_space = @disk_free_space( WP_CONTENT_DIR ); + if ( $available_space && ( $uncompressed_size * 2.1 ) > $available_space ) + return new WP_Error( 'disk_full_unzip_file', __( 'Could not copy files. You may have run out of disk space.' ), compact( 'uncompressed_size', 'available_space' ) ); + } + + $needed_dirs = array_unique($needed_dirs); + foreach ( $needed_dirs as $dir ) { + // Check the parent folders of the folders all exist within the creation array. + if ( untrailingslashit($to) == $dir ) // Skip over the working directory, We know this exists (or will exist) + continue; + if ( strpos($dir, $to) === false ) // If the directory is not within the working directory, Skip it + continue; + + $parent_folder = dirname($dir); + while ( !empty($parent_folder) && untrailingslashit($to) != $parent_folder && !in_array($parent_folder, $needed_dirs) ) { + $needed_dirs[] = $parent_folder; + $parent_folder = dirname($parent_folder); + } + } + asort($needed_dirs); + + // Create those directories if need be: + foreach ( $needed_dirs as $_dir ) { + if ( ! $wp_filesystem->mkdir($_dir, FS_CHMOD_DIR) && ! $wp_filesystem->is_dir($_dir) ) // Only check to see if the Dir exists upon creation failure. Less I/O this way. + return new WP_Error( 'mkdir_failed_ziparchive', __( 'Could not create directory.' ), substr( $_dir, strlen( $to ) ) ); + } + unset($needed_dirs); + + for ( $i = 0; $i < $z->numFiles; $i++ ) { + if ( ! $info = $z->statIndex($i) ) + return new WP_Error( 'stat_failed_ziparchive', __( 'Could not retrieve file from archive.' ) ); + + if ( '/' == substr($info['name'], -1) ) // directory + continue; + + if ( '__MACOSX/' === substr($info['name'], 0, 9) ) // Don't extract the OS X-created __MACOSX directory files + continue; + + $contents = $z->getFromIndex($i); + if ( false === $contents ) + return new WP_Error( 'extract_failed_ziparchive', __( '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_ziparchive', __( 'Could not copy file.' ), $info['name'] ); + } + + $z->close(); + + return true; +} + +/** + * This function should not be called directly, use unzip_file instead. Attempts to unzip an archive using the PclZip library. + * Assumes that WP_Filesystem() has already been called and set up. + * + * @since 3.0.0 + * @see unzip_file + * @access private + * + * @param string $file Full path and filename of zip archive + * @param string $to Full path on the filesystem to extract archive to + * @param array $needed_dirs A partial list of required folders needed to be created. + * @return mixed WP_Error on failure, True on success + */ +function _unzip_file_pclzip($file, $to, $needed_dirs = array()) { + global $wp_filesystem; + + mbstring_binary_safe_encoding(); + + require_once(ABSPATH . 'wp-admin/includes/class-pclzip.php'); + + $archive = new PclZip($file); + + $archive_files = $archive->extract(PCLZIP_OPT_EXTRACT_AS_STRING); + + reset_mbstring_encoding(); + + // Is the archive valid? + if ( !is_array($archive_files) ) + return new WP_Error('incompatible_archive', __('Incompatible Archive.'), $archive->errorInfo(true)); + + if ( 0 == count($archive_files) ) + return new WP_Error( 'empty_archive_pclzip', __( 'Empty archive.' ) ); + + $uncompressed_size = 0; + + // Determine any children directories needed (From within the archive) + foreach ( $archive_files as $file ) { + if ( '__MACOSX/' === substr($file['filename'], 0, 9) ) // Skip the OS X-created __MACOSX directory + continue; + + $uncompressed_size += $file['size']; + + $needed_dirs[] = $to . untrailingslashit( $file['folder'] ? $file['filename'] : dirname($file['filename']) ); + } + + /* + * disk_free_space() could return false. Assume that any falsey value is an error. + * A disk that has zero free bytes has bigger problems. + * Require we have enough space to unzip the file and copy its contents, with a 10% buffer. + */ + if ( defined( 'DOING_CRON' ) && DOING_CRON ) { + $available_space = @disk_free_space( WP_CONTENT_DIR ); + if ( $available_space && ( $uncompressed_size * 2.1 ) > $available_space ) + return new WP_Error( 'disk_full_unzip_file', __( 'Could not copy files. You may have run out of disk space.' ), compact( 'uncompressed_size', 'available_space' ) ); + } + + $needed_dirs = array_unique($needed_dirs); + foreach ( $needed_dirs as $dir ) { + // Check the parent folders of the folders all exist within the creation array. + if ( untrailingslashit($to) == $dir ) // Skip over the working directory, We know this exists (or will exist) + continue; + if ( strpos($dir, $to) === false ) // If the directory is not within the working directory, Skip it + continue; + + $parent_folder = dirname($dir); + while ( !empty($parent_folder) && untrailingslashit($to) != $parent_folder && !in_array($parent_folder, $needed_dirs) ) { + $needed_dirs[] = $parent_folder; + $parent_folder = dirname($parent_folder); + } + } + asort($needed_dirs); + + // Create those directories if need be: + foreach ( $needed_dirs as $_dir ) { + // Only check to see if the dir exists upon creation failure. Less I/O this way. + if ( ! $wp_filesystem->mkdir( $_dir, FS_CHMOD_DIR ) && ! $wp_filesystem->is_dir( $_dir ) ) + return new WP_Error( 'mkdir_failed_pclzip', __( 'Could not create directory.' ), substr( $_dir, strlen( $to ) ) ); + } + unset($needed_dirs); + + // Extract the files from the zip + foreach ( $archive_files as $file ) { + if ( $file['folder'] ) + continue; + + if ( '__MACOSX/' === substr($file['filename'], 0, 9) ) // Don't extract the OS X-created __MACOSX directory files + continue; + + if ( ! $wp_filesystem->put_contents( $to . $file['filename'], $file['content'], FS_CHMOD_FILE) ) + return new WP_Error( 'copy_failed_pclzip', __( 'Could not copy file.' ), $file['filename'] ); + } + return true; +} + +/** + * Copies a directory from one location to another via the WordPress Filesystem Abstraction. + * Assumes that WP_Filesystem() has already been called and setup. + * + * @since 2.5.0 + * + * @param string $from source directory + * @param string $to destination directory + * @param array $skip_list a list of files/folders to skip copying + * @return mixed WP_Error on failure, True on success. + */ +function copy_dir($from, $to, $skip_list = array() ) { + global $wp_filesystem; + + $dirlist = $wp_filesystem->dirlist($from); + + $from = trailingslashit($from); + $to = trailingslashit($to); + + foreach ( (array) $dirlist as $filename => $fileinfo ) { + if ( in_array( $filename, $skip_list ) ) + continue; + + if ( 'f' == $fileinfo['type'] ) { + if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true, FS_CHMOD_FILE) ) { + // If copy failed, chmod file to 0644 and try again. + $wp_filesystem->chmod( $to . $filename, FS_CHMOD_FILE ); + if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true, FS_CHMOD_FILE) ) + return new WP_Error( 'copy_failed_copy_dir', __( 'Could not copy file.' ), $to . $filename ); + } + } elseif ( 'd' == $fileinfo['type'] ) { + if ( !$wp_filesystem->is_dir($to . $filename) ) { + if ( !$wp_filesystem->mkdir($to . $filename, FS_CHMOD_DIR) ) + return new WP_Error( 'mkdir_failed_copy_dir', __( 'Could not create directory.' ), $to . $filename ); + } + + // generate the $sub_skip_list for the subdirectory as a sub-set of the existing $skip_list + $sub_skip_list = array(); + foreach ( $skip_list as $skip_item ) { + if ( 0 === strpos( $skip_item, $filename . '/' ) ) + $sub_skip_list[] = preg_replace( '!^' . preg_quote( $filename, '!' ) . '/!i', '', $skip_item ); + } + + $result = copy_dir($from . $filename, $to . $filename, $sub_skip_list); + if ( is_wp_error($result) ) + return $result; + } + } + return true; +} + +/** + * Initialises and connects the WordPress Filesystem Abstraction classes. + * This function will include the chosen transport and attempt connecting. + * + * Plugins may add extra transports, And force WordPress to use them by returning the filename via the 'filesystem_method_file' filter. + * + * @since 2.5.0 + * + * @param array $args (optional) Connection args, These are passed directly to the WP_Filesystem_*() classes. + * @param string $context (optional) Context for get_filesystem_method(), See function declaration for more information. + * @return boolean false on failure, true on success + */ +function WP_Filesystem( $args = false, $context = false ) { + global $wp_filesystem; + + require_once(ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php'); + + $method = get_filesystem_method($args, $context); + + if ( ! $method ) + return false; + + if ( ! class_exists("WP_Filesystem_$method") ) { + + /** + * Filter the path for a specific filesystem method class file. + * + * @since 2.6.0 + * + * @see get_filesystem_method() + * + * @param string $path Path to the specific filesystem method class file. + * @param string $method The filesystem method to use. + */ + $abstraction_file = apply_filters( 'filesystem_method_file', ABSPATH . 'wp-admin/includes/class-wp-filesystem-' . $method . '.php', $method ); + + if ( ! file_exists($abstraction_file) ) + return; + + require_once($abstraction_file); + } + $method = "WP_Filesystem_$method"; + + $wp_filesystem = new $method($args); + + //Define the timeouts for the connections. Only available after the construct is called to allow for per-transport overriding of the default. + if ( ! defined('FS_CONNECT_TIMEOUT') ) + define('FS_CONNECT_TIMEOUT', 30); + if ( ! defined('FS_TIMEOUT') ) + define('FS_TIMEOUT', 30); + + if ( is_wp_error($wp_filesystem->errors) && $wp_filesystem->errors->get_error_code() ) + return false; + + if ( !$wp_filesystem->connect() ) + return false; //There was an error connecting to the server. + + // Set the permission constants if not already set. + if ( ! defined('FS_CHMOD_DIR') ) + define('FS_CHMOD_DIR', ( fileperms( ABSPATH ) & 0777 | 0755 ) ); + if ( ! defined('FS_CHMOD_FILE') ) + define('FS_CHMOD_FILE', ( fileperms( ABSPATH . 'index.php' ) & 0777 | 0644 ) ); + + return true; +} + +/** + * Determines which Filesystem Method to use. + * The priority of the Transports are: Direct, SSH2, FTP PHP Extension, FTP Sockets (Via Sockets class, or fsockopen()) + * + * Note that the return value of this function can be overridden in 2 ways + * - By defining FS_METHOD in your wp-config.php file + * - By using the filesystem_method filter + * Valid values for these are: 'direct', 'ssh2', 'ftpext' or 'ftpsockets' + * Plugins may also define a custom transport handler, See the WP_Filesystem function for more information. + * + * @since 2.5.0 + * + * @param array $args Connection details. + * @param string $context Full path to the directory that is tested for being writable. + * @return string The transport to use, see description for valid return values. + */ +function get_filesystem_method($args = array(), $context = false) { + $method = defined('FS_METHOD') ? FS_METHOD : false; // Please ensure that this is either 'direct', 'ssh2', 'ftpext' or 'ftpsockets' + + if ( ! $method && function_exists('getmyuid') && function_exists('fileowner') ){ + if ( !$context ) + $context = WP_CONTENT_DIR; + + // If the directory doesn't exist (wp-content/languages) then use the parent directory as we'll create it. + if ( WP_LANG_DIR == $context && ! is_dir( $context ) ) + $context = dirname( $context ); + + $context = trailingslashit($context); + $temp_file_name = $context . 'temp-write-test-' . time(); + $temp_handle = @fopen($temp_file_name, 'w'); + if ( $temp_handle ) { + if ( getmyuid() == @fileowner($temp_file_name) ) + $method = 'direct'; + @fclose($temp_handle); + @unlink($temp_file_name); + } + } + + if ( ! $method && isset($args['connection_type']) && 'ssh' == $args['connection_type'] && extension_loaded('ssh2') && function_exists('stream_get_contents') ) $method = 'ssh2'; + if ( ! $method && extension_loaded('ftp') ) $method = 'ftpext'; + if ( ! $method && ( extension_loaded('sockets') || function_exists('fsockopen') ) ) $method = 'ftpsockets'; //Sockets: Socket extension; PHP Mode: FSockopen / fwrite / fread + + /** + * Filter the filesystem method to use. + * + * @since 2.6.0 + * + * @param string $method Filesystem method to return. + * @param array $args An array of connection details for the method. + */ + return apply_filters( 'filesystem_method', $method, $args ); +} + +/** + * 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. + * + * Plugins may override this form by returning true|false via the request_filesystem_credentials filter. + * + * @since 2.5.0 + * + * @param string $form_post the URL to post the form to + * @param string $type the chosen Filesystem method in use + * @param boolean $error if the current request has failed to connect + * @param string $context The directory which is needed access to, The write-test will be performed on this directory by get_filesystem_method() + * @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. + */ +function request_filesystem_credentials($form_post, $type = '', $error = false, $context = false, $extra_fields = null) { + + /** + * Filter the filesystem credentials form output. + * + * Returning anything other than an empty string will effectively short-circuit + * output of the filesystem credentials form, returning that value instead. + * + * @since 2.5.0 + * + * @param mixed $output Form output to return instead. Default empty. + * @param string $form_post URL to POST the form to. + * @param string $type Chosen type of filesystem. + * @param bool $error Whether the current request has failed to connect. + * Default false. + * @param string $context Full path to the directory that is tested for + * being writable. + * @param array $extra_fields Extra POST fields. + */ + $req_cred = apply_filters( 'request_filesystem_credentials', '', $form_post, $type, $error, $context, $extra_fields ); + if ( '' !== $req_cred ) + return $req_cred; + + if ( empty($type) ) + $type = get_filesystem_method(array(), $context); + + if ( 'direct' == $type ) + return true; + + if ( is_null( $extra_fields ) ) + $extra_fields = array( 'version', 'locale' ); + + $credentials = get_option('ftp_credentials', array( 'hostname' => '', 'username' => '')); + + // If defined, set it to that, Else, If POST'd, set it to that, If not, Set it to whatever it previously was(saved details in option) + $credentials['hostname'] = defined('FTP_HOST') ? FTP_HOST : (!empty($_POST['hostname']) ? wp_unslash( $_POST['hostname'] ) : $credentials['hostname']); + $credentials['username'] = defined('FTP_USER') ? FTP_USER : (!empty($_POST['username']) ? wp_unslash( $_POST['username'] ) : $credentials['username']); + $credentials['password'] = defined('FTP_PASS') ? FTP_PASS : (!empty($_POST['password']) ? wp_unslash( $_POST['password'] ) : ''); + + // Check to see if we are setting the public/private keys for ssh + $credentials['public_key'] = defined('FTP_PUBKEY') ? FTP_PUBKEY : (!empty($_POST['public_key']) ? wp_unslash( $_POST['public_key'] ) : ''); + $credentials['private_key'] = defined('FTP_PRIKEY') ? FTP_PRIKEY : (!empty($_POST['private_key']) ? wp_unslash( $_POST['private_key'] ) : ''); + + //sanitize the hostname, Some people might pass in odd-data: + $credentials['hostname'] = preg_replace('|\w+://|', '', $credentials['hostname']); //Strip any schemes off + + if ( strpos($credentials['hostname'], ':') ) { + list( $credentials['hostname'], $credentials['port'] ) = explode(':', $credentials['hostname'], 2); + if ( ! is_numeric($credentials['port']) ) + unset($credentials['port']); + } else { + unset($credentials['port']); + } + + if ( ( defined('FTP_SSH') && FTP_SSH ) || ( defined('FS_METHOD') && 'ssh2' == FS_METHOD ) ) + $credentials['connection_type'] = 'ssh'; + else if ( (defined('FTP_SSL') && FTP_SSL) && 'ftpext' == $type ) //Only the FTP Extension understands SSL + $credentials['connection_type'] = 'ftps'; + else if ( !empty($_POST['connection_type']) ) + $credentials['connection_type'] = wp_unslash( $_POST['connection_type'] ); + else if ( !isset($credentials['connection_type']) ) //All else fails (And it's not defaulted to something else saved), Default to FTP + $credentials['connection_type'] = 'ftp'; + + if ( ! $error && + ( + ( !empty($credentials['password']) && !empty($credentials['username']) && !empty($credentials['hostname']) ) || + ( 'ssh' == $credentials['connection_type'] && !empty($credentials['public_key']) && !empty($credentials['private_key']) ) + ) ) { + $stored_credentials = $credentials; + if ( !empty($stored_credentials['port']) ) //save port as part of hostname to simplify above code. + $stored_credentials['hostname'] .= ':' . $stored_credentials['port']; + + unset($stored_credentials['password'], $stored_credentials['port'], $stored_credentials['private_key'], $stored_credentials['public_key']); + update_option('ftp_credentials', $stored_credentials); + return $credentials; + } + $hostname = ''; + $username = ''; + $password = ''; + $connection_type = ''; + if ( !empty($credentials) ) + extract($credentials, EXTR_OVERWRITE); + if ( $error ) { + $error_string = __('ERROR: There was an error connecting to the server, Please verify the settings are correct.'); + if ( is_wp_error($error) ) + $error_string = esc_html( $error->get_error_message() ); + echo '

' . $error_string . '

'; + } + + $types = array(); + if ( extension_loaded('ftp') || extension_loaded('sockets') || function_exists('fsockopen') ) + $types[ 'ftp' ] = __('FTP'); + if ( extension_loaded('ftp') ) //Only this supports FTPS + $types[ 'ftps' ] = __('FTPS (SSL)'); + if ( extension_loaded('ssh2') && function_exists('stream_get_contents') ) + $types[ 'ssh' ] = __('SSH2'); + + /** + * Filter the connection types to output to the filesystem credentials form. + * + * @since 2.9.0 + * + * @param array $types Types of connections. + * @param array $credentials Credentials to connect with. + * @param string $type Chosen filesystem method. + * @param object $error Error object. + * @param string $context Full path to the directory that is tested + * for being writable. + */ + $types = apply_filters( 'fs_ftp_connection_types', $types, $credentials, $type, $error, $context ); + +?> + +
+
+

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
" size="40" />
size="40" />
size="40" />
+
+
+
+ +

size="40" />
size="40" /> +
+
+ $text ) : ?> + + +
+
+ +'; +} +submit_button( __( 'Proceed' ), 'button', 'upgrade' ); +?> +
+
+ 400 ? 400 / $big : 1; + + $backup_sizes = get_post_meta( $post_id, '_wp_attachment_backup_sizes', true ); + $can_restore = false; + if ( ! empty( $backup_sizes ) && isset( $backup_sizes['full-orig'], $meta['file'] ) ) + $can_restore = $backup_sizes['full-orig']['file'] != basename( $meta['file'] ); + + if ( $msg ) { + if ( isset($msg->error) ) + $note = "

$msg->error

"; + elseif ( isset($msg->msg) ) + $note = "

$msg->msg

"; + } + + ?> +
+
+ +
+
+
+

+
+

+
+ +

+ +
+ × + ! + , 'scale')" class="button button-primary" value="" /> +
+
+
+ + + +
+
+

+
+

+
+ , 'restore')" class="button button-primary" value="" /> +
+
+
+
+ + + +
+
+

+ +
+

+ +


+

+ +


+

+
+
+ +

+ + + + : + + +

+ +

+ + + + × + + +

+
+ + + +
+
+

+

+
+ +

+ +
+

+ +

+
+ + + + + + +

+
+ + + +
+ +
+ +
+
, this)" class="imgedit-crop disabled" title="">
get_post_mime_type( $post_id ), 'methods' => array( 'rotate' ) ) ) ) { ?> +
, this)" title="">
+
, this)" title="">
+ +
+
+ + +
, this)" class="imgedit-flipv" title="">
+
, this)" class="imgedit-fliph" title="">
+ +
, this)" class="imgedit-undo disabled" title="">
+
, this)" class="imgedit-redo disabled" title="">
+
+
+ + + + + + + + + +
+ +
+ +
+ + )" disabled="disabled" class="button button-primary imgedit-submit-btn" value="" /> +
+
+ +
+
+ + +
+stream( $mime_type ) ) ) + return false; + + return true; + } else { + _deprecated_argument( __FUNCTION__, '3.5', __( '$image needs to be an WP_Image_Editor object' ) ); + + /** + * Filter the GD image resource to be streamed to the browser. + * + * @since 2.9.0 + * @deprecated 3.5.0 Use image_editor_save_pre instead. + * + * @param resource $image Image resource to be streamed. + * @param int $post_id Post ID. + */ + $image = apply_filters( 'image_save_pre', $image, $post_id ); + + switch ( $mime_type ) { + case 'image/jpeg': + header( 'Content-Type: image/jpeg' ); + return imagejpeg( $image, null, 90 ); + case 'image/png': + header( 'Content-Type: image/png' ); + return imagepng( $image ); + case 'image/gif': + header( 'Content-Type: image/gif' ); + return imagegif( $image ); + default: + return false; + } + } +} + +/** + * Saves Image to File + * + * @param string $filename + * @param WP_Image_Editor $image + * @param string $mime_type + * @param int $post_id + * @return boolean + */ +function wp_save_image_file( $filename, $image, $mime_type, $post_id ) { + if ( $image instanceof WP_Image_Editor ) { + + /** This filter is documented in wp-admin/includes/image-edit.php */ + $image = apply_filters( 'image_editor_save_pre', $image, $post_id ); + + /** + * Filter whether to skip saving the image file. + * + * Returning a non-null value will short-circuit the save method, + * returning that value instead. + * + * @since 3.5.0 + * + * @param mixed $override Value to return instead of saving. Default null. + * @param string $filename Name of the file to be saved. + * @param WP_Image_Editor $image WP_Image_Editor instance. + * @param string $mime_type Image mime type. + * @param int $post_id Post ID. + */ + $saved = apply_filters( 'wp_save_image_editor_file', null, $filename, $image, $mime_type, $post_id ); + + if ( null !== $saved ) + return $saved; + + return $image->save( $filename, $mime_type ); + } else { + _deprecated_argument( __FUNCTION__, '3.5', __( '$image needs to be an WP_Image_Editor object' ) ); + + /** This filter is documented in wp-admin/includes/image-edit.php */ + $image = apply_filters( 'image_save_pre', $image, $post_id ); + + /** + * Filter whether to skip saving the image file. + * + * Returning a non-null value will short-circuit the save method, + * returning that value instead. + * + * @since 2.9.0 + * @deprecated 3.5.0 Use wp_save_image_editor_file instead. + * + * @param mixed $override Value to return instead of saving. Default null. + * @param string $filename Name of the file to be saved. + * @param WP_Image_Editor $image WP_Image_Editor instance. + * @param string $mime_type Image mime type. + * @param int $post_id Post ID. + */ + $saved = apply_filters( 'wp_save_image_file', null, $filename, $image, $mime_type, $post_id ); + + if ( null !== $saved ) + return $saved; + + switch ( $mime_type ) { + case 'image/jpeg': + + /** This filter is documented in wp-includes/class-wp-image-editor.php */ + return imagejpeg( $image, $filename, apply_filters( 'jpeg_quality', 90, 'edit_image' ) ); + case 'image/png': + return imagepng( $image, $filename ); + case 'image/gif': + return imagegif( $image, $filename ); + default: + return false; + } + } +} + +function _image_get_preview_ratio($w, $h) { + $max = max($w, $h); + return $max > 400 ? (400 / $max) : 1; +} + +// @TODO: Returns GD resource, but is NOT public +function _rotate_image_resource($img, $angle) { + _deprecated_function( __FUNCTION__, '3.5', __( 'Use WP_Image_Editor::rotate' ) ); + if ( function_exists('imagerotate') ) { + $rotated = imagerotate($img, $angle, 0); + if ( is_resource($rotated) ) { + imagedestroy($img); + $img = $rotated; + } + } + return $img; +} + +/** + * @TODO: Only used within image_edit_apply_changes + * and receives/returns GD Resource. + * Consider removal. + * + * @param GD_Resource $img + * @param boolean $horz + * @param boolean $vert + * @return GD_Resource + */ +function _flip_image_resource($img, $horz, $vert) { + _deprecated_function( __FUNCTION__, '3.5', __( 'Use WP_Image_Editor::flip' ) ); + $w = imagesx($img); + $h = imagesy($img); + $dst = wp_imagecreatetruecolor($w, $h); + if ( is_resource($dst) ) { + $sx = $vert ? ($w - 1) : 0; + $sy = $horz ? ($h - 1) : 0; + $sw = $vert ? -$w : $w; + $sh = $horz ? -$h : $h; + + if ( imagecopyresampled($dst, $img, 0, 0, $sx, $sy, $w, $h, $sw, $sh) ) { + imagedestroy($img); + $img = $dst; + } + } + return $img; +} + +/** + * @TODO: Only used within image_edit_apply_changes + * and receives/returns GD Resource. + * Consider removal. + * + * @param GD_Resource $img + * @param float $x + * @param float $y + * @param float $w + * @param float $h + * @return GD_Resource + */ +function _crop_image_resource($img, $x, $y, $w, $h) { + $dst = wp_imagecreatetruecolor($w, $h); + if ( is_resource($dst) ) { + if ( imagecopy($dst, $img, 0, 0, $x, $y, $w, $h) ) { + imagedestroy($img); + $img = $dst; + } + } + return $img; +} + +/** + * Performs group of changes on Editor specified. + * + * @param WP_Image_Editor $image + * @param type $changes + * @return WP_Image_Editor + */ +function image_edit_apply_changes( $image, $changes ) { + if ( is_resource( $image ) ) + _deprecated_argument( __FUNCTION__, '3.5', __( '$image needs to be an WP_Image_Editor object' ) ); + + if ( !is_array($changes) ) + return $image; + + // expand change operations + foreach ( $changes as $key => $obj ) { + if ( isset($obj->r) ) { + $obj->type = 'rotate'; + $obj->angle = $obj->r; + unset($obj->r); + } elseif ( isset($obj->f) ) { + $obj->type = 'flip'; + $obj->axis = $obj->f; + unset($obj->f); + } elseif ( isset($obj->c) ) { + $obj->type = 'crop'; + $obj->sel = $obj->c; + unset($obj->c); + } + $changes[$key] = $obj; + } + + // combine operations + if ( count($changes) > 1 ) { + $filtered = array($changes[0]); + for ( $i = 0, $j = 1; $j < count($changes); $j++ ) { + $combined = false; + if ( $filtered[$i]->type == $changes[$j]->type ) { + switch ( $filtered[$i]->type ) { + case 'rotate': + $filtered[$i]->angle += $changes[$j]->angle; + $combined = true; + break; + case 'flip': + $filtered[$i]->axis ^= $changes[$j]->axis; + $combined = true; + break; + } + } + if ( !$combined ) + $filtered[++$i] = $changes[$j]; + } + $changes = $filtered; + unset($filtered); + } + + // image resource before applying the changes + if ( $image instanceof WP_Image_Editor ) { + + /** + * Filter the WP_Image_Editor instance before applying changes to the image. + * + * @since 3.5.0 + * + * @param WP_Image_Editor $image WP_Image_Editor instance. + * @param array $changes Array of change operations. + */ + $image = apply_filters( 'wp_image_editor_before_change', $image, $changes ); + } elseif ( is_resource( $image ) ) { + + /** + * Filter the GD image resource before applying changes to the image. + * + * @since 2.9.0 + * @deprecated 3.5.0 Use wp_image_editor_before_change instead. + * + * @param resource $image GD image resource. + * @param array $changes Array of change operations. + */ + $image = apply_filters( 'image_edit_before_change', $image, $changes ); + } + + foreach ( $changes as $operation ) { + switch ( $operation->type ) { + case 'rotate': + if ( $operation->angle != 0 ) { + if ( $image instanceof WP_Image_Editor ) + $image->rotate( $operation->angle ); + else + $image = _rotate_image_resource( $image, $operation->angle ); + } + break; + case 'flip': + if ( $operation->axis != 0 ) + if ( $image instanceof WP_Image_Editor ) + $image->flip( ($operation->axis & 1) != 0, ($operation->axis & 2) != 0 ); + else + $image = _flip_image_resource( $image, ( $operation->axis & 1 ) != 0, ( $operation->axis & 2 ) != 0 ); + break; + case 'crop': + $sel = $operation->sel; + + if ( $image instanceof WP_Image_Editor ) { + $size = $image->get_size(); + $w = $size['width']; + $h = $size['height']; + + $scale = 1 / _image_get_preview_ratio( $w, $h ); // discard preview scaling + $image->crop( $sel->x * $scale, $sel->y * $scale, $sel->w * $scale, $sel->h * $scale ); + } else { + $scale = 1 / _image_get_preview_ratio( imagesx( $image ), imagesy( $image ) ); // discard preview scaling + $image = _crop_image_resource( $image, $sel->x * $scale, $sel->y * $scale, $sel->w * $scale, $sel->h * $scale ); + } + break; + } + } + + return $image; +} + + +/** + * Streams image in post to browser, along with enqueued changes + * in $_REQUEST['history'] + * + * @param int $post_id + * @return boolean + */ +function stream_preview_image( $post_id ) { + $post = get_post( $post_id ); + + /** This filter is documented in wp-admin/admin.php */ + @ini_set( 'memory_limit', apply_filters( 'admin_memory_limit', WP_MAX_MEMORY_LIMIT ) ); + + $img = wp_get_image_editor( _load_image_to_edit_path( $post_id ) ); + + if ( is_wp_error( $img ) ) + return false; + + $changes = !empty($_REQUEST['history']) ? json_decode( wp_unslash($_REQUEST['history']) ) : null; + if ( $changes ) + $img = image_edit_apply_changes( $img, $changes ); + + // scale the image + $size = $img->get_size(); + $w = $size['width']; + $h = $size['height']; + + $ratio = _image_get_preview_ratio( $w, $h ); + $w2 = max ( 1, $w * $ratio ); + $h2 = max ( 1, $h * $ratio ); + + if ( is_wp_error( $img->resize( $w2, $h2 ) ) ) + return false; + + return wp_stream_image( $img, $post->post_mime_type, $post_id ); +} + +function wp_restore_image($post_id) { + $meta = wp_get_attachment_metadata($post_id); + $file = get_attached_file($post_id); + $backup_sizes = get_post_meta( $post_id, '_wp_attachment_backup_sizes', true ); + $restored = false; + $msg = new stdClass; + + if ( !is_array($backup_sizes) ) { + $msg->error = __('Cannot load image metadata.'); + return $msg; + } + + $parts = pathinfo($file); + $suffix = time() . rand(100, 999); + $default_sizes = get_intermediate_image_sizes(); + + if ( isset($backup_sizes['full-orig']) && is_array($backup_sizes['full-orig']) ) { + $data = $backup_sizes['full-orig']; + + if ( $parts['basename'] != $data['file'] ) { + if ( defined('IMAGE_EDIT_OVERWRITE') && IMAGE_EDIT_OVERWRITE ) { + // delete only if it's edited image + if ( preg_match('/-e[0-9]{13}\./', $parts['basename']) ) { + + /** This filter is documented in wp-admin/custom-header.php */ + $delpath = apply_filters( 'wp_delete_file', $file ); + @unlink($delpath); + } + } elseif ( isset( $meta['width'], $meta['height'] ) ) { + $backup_sizes["full-$suffix"] = array('width' => $meta['width'], 'height' => $meta['height'], 'file' => $parts['basename']); + } + } + + $restored_file = path_join($parts['dirname'], $data['file']); + $restored = update_attached_file($post_id, $restored_file); + + $meta['file'] = _wp_relative_upload_path( $restored_file ); + $meta['width'] = $data['width']; + $meta['height'] = $data['height']; + } + + foreach ( $default_sizes as $default_size ) { + if ( isset($backup_sizes["$default_size-orig"]) ) { + $data = $backup_sizes["$default_size-orig"]; + if ( isset($meta['sizes'][$default_size]) && $meta['sizes'][$default_size]['file'] != $data['file'] ) { + if ( defined('IMAGE_EDIT_OVERWRITE') && IMAGE_EDIT_OVERWRITE ) { + // delete only if it's edited image + if ( preg_match('/-e[0-9]{13}-/', $meta['sizes'][$default_size]['file']) ) { + /** This filter is documented in wp-admin/custom-header.php */ + $delpath = apply_filters( 'wp_delete_file', path_join($parts['dirname'], $meta['sizes'][$default_size]['file']) ); + @unlink($delpath); + } + } else { + $backup_sizes["$default_size-{$suffix}"] = $meta['sizes'][$default_size]; + } + } + + $meta['sizes'][$default_size] = $data; + } else { + unset($meta['sizes'][$default_size]); + } + } + + if ( !wp_update_attachment_metadata($post_id, $meta) || !update_post_meta( $post_id, '_wp_attachment_backup_sizes', $backup_sizes) ) { + $msg->error = __('Cannot save image metadata.'); + return $msg; + } + + if ( !$restored ) + $msg->error = __('Image metadata is inconsistent.'); + else + $msg->msg = __('Image restored successfully.'); + + return $msg; +} + +/** + * Saves image to post along with enqueued changes + * in $_REQUEST['history'] + * + * @param int $post_id + * @return \stdClass + */ +function wp_save_image( $post_id ) { + global $_wp_additional_image_sizes; + + $return = new stdClass; + $success = $delete = $scaled = $nocrop = false; + $post = get_post( $post_id ); + + $img = wp_get_image_editor( _load_image_to_edit_path( $post_id, 'full' ) ); + if ( is_wp_error( $img ) ) { + $return->error = esc_js( __('Unable to create new image.') ); + return $return; + } + + $fwidth = !empty($_REQUEST['fwidth']) ? intval($_REQUEST['fwidth']) : 0; + $fheight = !empty($_REQUEST['fheight']) ? intval($_REQUEST['fheight']) : 0; + $target = !empty($_REQUEST['target']) ? preg_replace('/[^a-z0-9_-]+/i', '', $_REQUEST['target']) : ''; + $scale = !empty($_REQUEST['do']) && 'scale' == $_REQUEST['do']; + + if ( $scale && $fwidth > 0 && $fheight > 0 ) { + $size = $img->get_size(); + $sX = $size['width']; + $sY = $size['height']; + + // check if it has roughly the same w / h ratio + $diff = round($sX / $sY, 2) - round($fwidth / $fheight, 2); + if ( -0.1 < $diff && $diff < 0.1 ) { + // scale the full size image + if ( $img->resize( $fwidth, $fheight ) ) + $scaled = true; + } + + if ( !$scaled ) { + $return->error = esc_js( __('Error while saving the scaled image. Please reload the page and try again.') ); + return $return; + } + } elseif ( !empty($_REQUEST['history']) ) { + $changes = json_decode( wp_unslash($_REQUEST['history']) ); + if ( $changes ) + $img = image_edit_apply_changes($img, $changes); + } else { + $return->error = esc_js( __('Nothing to save, the image has not changed.') ); + return $return; + } + + $meta = wp_get_attachment_metadata($post_id); + $backup_sizes = get_post_meta( $post->ID, '_wp_attachment_backup_sizes', true ); + + if ( !is_array($meta) ) { + $return->error = esc_js( __('Image data does not exist. Please re-upload the image.') ); + return $return; + } + + if ( !is_array($backup_sizes) ) + $backup_sizes = array(); + + // generate new filename + $path = get_attached_file($post_id); + $path_parts = pathinfo( $path ); + $filename = $path_parts['filename']; + $suffix = time() . rand(100, 999); + + if ( defined('IMAGE_EDIT_OVERWRITE') && IMAGE_EDIT_OVERWRITE && + isset($backup_sizes['full-orig']) && $backup_sizes['full-orig']['file'] != $path_parts['basename'] ) { + + if ( 'thumbnail' == $target ) + $new_path = "{$path_parts['dirname']}/{$filename}-temp.{$path_parts['extension']}"; + else + $new_path = $path; + } else { + while( true ) { + $filename = preg_replace( '/-e([0-9]+)$/', '', $filename ); + $filename .= "-e{$suffix}"; + $new_filename = "{$filename}.{$path_parts['extension']}"; + $new_path = "{$path_parts['dirname']}/$new_filename"; + if ( file_exists($new_path) ) + $suffix++; + else + break; + } + } + + // save the full-size file, also needed to create sub-sizes + if ( !wp_save_image_file($new_path, $img, $post->post_mime_type, $post_id) ) { + $return->error = esc_js( __('Unable to save the image.') ); + return $return; + } + + if ( 'nothumb' == $target || 'all' == $target || 'full' == $target || $scaled ) { + $tag = false; + if ( isset($backup_sizes['full-orig']) ) { + if ( ( !defined('IMAGE_EDIT_OVERWRITE') || !IMAGE_EDIT_OVERWRITE ) && $backup_sizes['full-orig']['file'] != $path_parts['basename'] ) + $tag = "full-$suffix"; + } else { + $tag = 'full-orig'; + } + + if ( $tag ) + $backup_sizes[$tag] = array('width' => $meta['width'], 'height' => $meta['height'], 'file' => $path_parts['basename']); + + $success = update_attached_file( $post_id, $new_path ); + + $meta['file'] = _wp_relative_upload_path( $new_path ); + + $size = $img->get_size(); + $meta['width'] = $size['width']; + $meta['height'] = $size['height']; + + if ( $success && ('nothumb' == $target || 'all' == $target) ) { + $sizes = get_intermediate_image_sizes(); + if ( 'nothumb' == $target ) + $sizes = array_diff( $sizes, array('thumbnail') ); + } + + $return->fw = $meta['width']; + $return->fh = $meta['height']; + } elseif ( 'thumbnail' == $target ) { + $sizes = array( 'thumbnail' ); + $success = $delete = $nocrop = true; + } + + if ( isset( $sizes ) ) { + $_sizes = array(); + + foreach ( $sizes as $size ) { + $tag = false; + if ( isset( $meta['sizes'][$size] ) ) { + if ( isset($backup_sizes["$size-orig"]) ) { + if ( ( !defined('IMAGE_EDIT_OVERWRITE') || !IMAGE_EDIT_OVERWRITE ) && $backup_sizes["$size-orig"]['file'] != $meta['sizes'][$size]['file'] ) + $tag = "$size-$suffix"; + } else { + $tag = "$size-orig"; + } + + if ( $tag ) + $backup_sizes[$tag] = $meta['sizes'][$size]; + } + + if ( isset( $_wp_additional_image_sizes[ $size ] ) ) { + $width = intval( $_wp_additional_image_sizes[ $size ]['width'] ); + $height = intval( $_wp_additional_image_sizes[ $size ]['height'] ); + $crop = ( $nocrop ) ? false : $_wp_additional_image_sizes[ $size ]['crop']; + } else { + $height = get_option( "{$size}_size_h" ); + $width = get_option( "{$size}_size_w" ); + $crop = ( $nocrop ) ? false : get_option( "{$size}_crop" ); + } + + $_sizes[ $size ] = array( 'width' => $width, 'height' => $height, 'crop' => $crop ); + } + + $meta['sizes'] = array_merge( $meta['sizes'], $img->multi_resize( $_sizes ) ); + } + + unset( $img ); + + if ( $success ) { + wp_update_attachment_metadata( $post_id, $meta ); + update_post_meta( $post_id, '_wp_attachment_backup_sizes', $backup_sizes); + + if ( $target == 'thumbnail' || $target == 'all' || $target == 'full' ) { + // Check if it's an image edit from attachment edit screen + if ( ! empty( $_REQUEST['context'] ) && 'edit-attachment' == $_REQUEST['context'] ) { + $thumb_url = wp_get_attachment_image_src( $post_id, array( 900, 600 ), true ); + $return->thumbnail = $thumb_url[0]; + } else { + $file_url = wp_get_attachment_url($post_id); + if ( $thumb = $meta['sizes']['thumbnail'] ) + $return->thumbnail = path_join( dirname($file_url), $thumb['file'] ); + else + $return->thumbnail = "$file_url?w=128&h=128"; + } + } + } else { + $delete = true; + } + + if ( $delete ) { + + /** This filter is documented in wp-admin/custom-header.php */ + $delpath = apply_filters( 'wp_delete_file', $new_path ); + @unlink( $delpath ); + } + + $return->msg = esc_js( __('Image saved') ); + return $return; +} diff --git a/wp-admin/includes/image.php b/wp-admin/includes/image.php new file mode 100644 index 0000000..5799d28 --- /dev/null +++ b/wp-admin/includes/image.php @@ -0,0 +1,558 @@ +crop( $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_h, $src_abs ); + if ( is_wp_error( $src ) ) + return $src; + + if ( ! $dst_file ) + $dst_file = str_replace( basename( $src_file ), 'cropped-' . basename( $src_file ), $src_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 ) ); + + $result = $editor->save( $dst_file ); + if ( is_wp_error( $result ) ) + return $result; + + return $dst_file; +} + +/** + * Generate post thumbnail attachment meta data. + * + * @since 2.1.0 + * + * @param int $attachment_id Attachment Id to process. + * @param string $file Filepath of the Attached image. + * @return mixed Metadata for attachment. + */ +function wp_generate_attachment_metadata( $attachment_id, $file ) { + $attachment = get_post( $attachment_id ); + + $metadata = array(); + $support = false; + if ( preg_match('!^image/!', get_post_mime_type( $attachment )) && file_is_displayable_image($file) ) { + $imagesize = getimagesize( $file ); + $metadata['width'] = $imagesize[0]; + $metadata['height'] = $imagesize[1]; + + // Make the file path relative to the upload dir + $metadata['file'] = _wp_relative_upload_path($file); + + // make thumbnails and other intermediate sizes + global $_wp_additional_image_sizes; + + $sizes = array(); + foreach ( get_intermediate_image_sizes() as $s ) { + $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 + $sizes[$s]['width'] = get_option( "{$s}_size_w" ); // For default sizes set in options + if ( isset( $_wp_additional_image_sizes[$s]['height'] ) ) + $sizes[$s]['height'] = intval( $_wp_additional_image_sizes[$s]['height'] ); // For theme-added sizes + else + $sizes[$s]['height'] = get_option( "{$s}_size_h" ); // For default sizes set in options + if ( isset( $_wp_additional_image_sizes[$s]['crop'] ) ) + $sizes[$s]['crop'] = $_wp_additional_image_sizes[$s]['crop']; // For theme-added sizes + else + $sizes[$s]['crop'] = get_option( "{$s}_crop" ); // For default sizes set in options + } + + /** + * Filter the image sizes automatically generated when uploading an image. + * + * @since 2.9.0 + * + * @param array $sizes An associative array of image sizes. + */ + $sizes = apply_filters( 'intermediate_image_sizes_advanced', $sizes ); + + if ( $sizes ) { + $editor = wp_get_image_editor( $file ); + + if ( ! is_wp_error( $editor ) ) + $metadata['sizes'] = $editor->multi_resize( $sizes ); + } else { + $metadata['sizes'] = array(); + } + + // fetch additional metadata from exif/iptc + $image_meta = wp_read_image_metadata( $file ); + if ( $image_meta ) + $metadata['image_meta'] = $image_meta; + + } elseif ( preg_match( '#^video/#', get_post_mime_type( $attachment ) ) ) { + $metadata = wp_read_video_metadata( $file ); + $support = current_theme_supports( 'post-thumbnails', 'attachment:video' ) || post_type_supports( 'attachment:video', 'thumbnail' ); + } elseif ( preg_match( '#^audio/#', get_post_mime_type( $attachment ) ) ) { + $metadata = wp_read_audio_metadata( $file ); + $support = current_theme_supports( 'post-thumbnails', 'attachment:audio' ) || post_type_supports( 'attachment:audio', 'thumbnail' ); + } + + if ( $support && ! empty( $metadata['image']['data'] ) ) { + // check for existing cover + $hash = md5( $metadata['image']['data'] ); + $posts = get_posts( array( + 'fields' => 'ids', + 'post_type' => 'attachment', + 'post_mime_type' => $metadata['image']['mime'], + 'post_status' => 'inherit', + 'posts_per_page' => 1, + 'meta_key' => '_cover_hash', + 'meta_value' => $hash + ) ); + $exists = reset( $posts ); + + if ( ! empty( $exists ) ) { + update_post_meta( $attachment_id, '_thumbnail_id', $exists ); + } else { + $ext = '.jpg'; + switch ( $metadata['image']['mime'] ) { + case 'image/gif': + $ext = '.gif'; + break; + case 'image/png': + $ext = '.png'; + break; + } + $basename = str_replace( '.', '-', basename( $file ) ) . '-image' . $ext; + $uploaded = wp_upload_bits( $basename, '', $metadata['image']['data'] ); + if ( false === $uploaded['error'] ) { + $image_attachment = array( + 'post_mime_type' => $metadata['image']['mime'], + 'post_type' => 'attachment', + 'post_content' => '', + ); + /** + * Filter the parameters for the attachment thumbnail creation. + * + * @since 3.9.0 + * + * @param array $image_attachment An array of parameters to create the thumbnail. + * @param array $metadata Current attachment metadata. + * @param array $uploaded An array containing the thumbnail path and url. + */ + $image_attachment = apply_filters( 'attachment_thumbnail_args', $image_attachment, $metadata, $uploaded ); + + $sub_attachment_id = wp_insert_attachment( $image_attachment, $uploaded['file'] ); + add_post_meta( $sub_attachment_id, '_cover_hash', $hash ); + $attach_data = wp_generate_attachment_metadata( $sub_attachment_id, $uploaded['file'] ); + wp_update_attachment_metadata( $sub_attachment_id, $attach_data ); + update_post_meta( $attachment_id, '_thumbnail_id', $sub_attachment_id ); + } + } + } + + // remove the blob of binary data from the array + if ( isset( $metadata['image']['data'] ) ) + unset( $metadata['image']['data'] ); + + /** + * Filter the generated attachment meta data. + * + * @since 2.1.0 + * + * @param array $metadata An array of attachment meta data. + * @param int $attachment_id Current attachment ID. + */ + return apply_filters( 'wp_generate_attachment_metadata', $metadata, $attachment_id ); +} + +/** + * Convert a fraction string to a decimal. + * + * @since 2.5.0 + * + * @param string $str + * @return int|float + */ +function wp_exif_frac2dec($str) { + @list( $n, $d ) = explode( '/', $str ); + if ( !empty($d) ) + return $n / $d; + return $str; +} + +/** + * Convert the exif date format to a unix timestamp. + * + * @since 2.5.0 + * + * @param string $str + * @return int + */ +function wp_exif_date2ts($str) { + @list( $date, $time ) = explode( ' ', trim($str) ); + @list( $y, $m, $d ) = explode( ':', $date ); + + return strtotime( "{$y}-{$m}-{$d} {$time}" ); +} + +/** + * Get extended image metadata, exif or iptc as available. + * + * Retrieves the EXIF metadata aperture, credit, camera, caption, copyright, iso + * created_timestamp, focal_length, shutter_speed, and title. + * + * The IPTC metadata that is retrieved is APP13, credit, byline, created date + * and time, caption, copyright, and title. Also includes FNumber, Model, + * DateTimeDigitized, FocalLength, ISOSpeedRatings, and ExposureTime. + * + * @todo Try other exif libraries if available. + * @since 2.5.0 + * + * @param string $file + * @return bool|array False on failure. Image metadata array on success. + */ +function wp_read_image_metadata( $file ) { + if ( ! file_exists( $file ) ) + return false; + + list( , , $sourceImageType ) = getimagesize( $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 + // floats, dates to unix timestamps, and everything else to strings. + $meta = array( + 'aperture' => 0, + 'credit' => '', + 'camera' => '', + 'caption' => '', + 'created_timestamp' => 0, + 'copyright' => '', + 'focal_length' => 0, + 'iso' => 0, + 'shutter_speed' => 0, + 'title' => '', + ); + + // read iptc first, since it might contain data not available in exif such + // as caption, description etc + if ( is_callable( 'iptcparse' ) ) { + getimagesize( $file, $info ); + + if ( ! empty( $info['APP13'] ) ) { + $iptc = iptcparse( $info['APP13'] ); + + // headline, "A brief synopsis of the caption." + if ( ! empty( $iptc['2#105'][0] ) ) + $meta['title'] = trim( $iptc['2#105'][0] ); + // title, "Many use the Title field to store the filename of the image, though the field may be used in many ways." + elseif ( ! empty( $iptc['2#005'][0] ) ) + $meta['title'] = trim( $iptc['2#005'][0] ); + + if ( ! empty( $iptc['2#120'][0] ) ) { // description / legacy caption + $caption = trim( $iptc['2#120'][0] ); + if ( empty( $meta['title'] ) ) { + // Assume the title is stored in 2:120 if it's short. + if ( strlen( $caption ) < 80 ) + $meta['title'] = $caption; + else + $meta['caption'] = $caption; + } elseif ( $caption != $meta['title'] ) { + $meta['caption'] = $caption; + } + } + + if ( ! empty( $iptc['2#110'][0] ) ) // credit + $meta['credit'] = trim( $iptc['2#110'][0] ); + elseif ( ! empty( $iptc['2#080'][0] ) ) // creator / legacy byline + $meta['credit'] = trim( $iptc['2#080'][0] ); + + if ( ! empty( $iptc['2#055'][0] ) and ! empty( $iptc['2#060'][0] ) ) // created date and time + $meta['created_timestamp'] = strtotime( $iptc['2#055'][0] . ' ' . $iptc['2#060'][0] ); + + if ( ! empty( $iptc['2#116'][0] ) ) // copyright + $meta['copyright'] = trim( $iptc['2#116'][0] ); + } + } + + /** + * Filter the image types to check for exif data. + * + * @since 2.5.0 + * + * @param array $image_types Image types to check for exif data. + */ + if ( is_callable( 'exif_read_data' ) && in_array( $sourceImageType, apply_filters( 'wp_read_image_metadata_types', array( IMAGETYPE_JPEG, IMAGETYPE_TIFF_II, IMAGETYPE_TIFF_MM ) ) ) ) { + $exif = @exif_read_data( $file ); + + if ( !empty( $exif['Title'] ) ) + $meta['title'] = trim( $exif['Title'] ); + + if ( ! empty( $exif['ImageDescription'] ) ) { + if ( empty( $meta['title'] ) && strlen( $exif['ImageDescription'] ) < 80 ) { + // Assume the title is stored in ImageDescription + $meta['title'] = trim( $exif['ImageDescription'] ); + if ( ! empty( $exif['COMPUTED']['UserComment'] ) && trim( $exif['COMPUTED']['UserComment'] ) != $meta['title'] ) + $meta['caption'] = trim( $exif['COMPUTED']['UserComment'] ); + } elseif ( trim( $exif['ImageDescription'] ) != $meta['title'] ) { + $meta['caption'] = trim( $exif['ImageDescription'] ); + } + } elseif ( ! empty( $exif['Comments'] ) && trim( $exif['Comments'] ) != $meta['title'] ) { + $meta['caption'] = trim( $exif['Comments'] ); + } + + if ( ! empty( $exif['Artist'] ) ) + $meta['credit'] = trim( $exif['Artist'] ); + elseif ( ! empty($exif['Author'] ) ) + $meta['credit'] = trim( $exif['Author'] ); + + if ( ! empty( $exif['Copyright'] ) ) + $meta['copyright'] = trim( $exif['Copyright'] ); + if ( ! empty($exif['FNumber'] ) ) + $meta['aperture'] = round( wp_exif_frac2dec( $exif['FNumber'] ), 2 ); + if ( ! empty($exif['Model'] ) ) + $meta['camera'] = trim( $exif['Model'] ); + if ( ! empty($exif['DateTimeDigitized'] ) ) + $meta['created_timestamp'] = wp_exif_date2ts($exif['DateTimeDigitized'] ); + if ( ! empty($exif['FocalLength'] ) ) + $meta['focal_length'] = (string) wp_exif_frac2dec( $exif['FocalLength'] ); + if ( ! empty($exif['ISOSpeedRatings'] ) ) { + $meta['iso'] = is_array( $exif['ISOSpeedRatings'] ) ? reset( $exif['ISOSpeedRatings'] ) : $exif['ISOSpeedRatings']; + $meta['iso'] = trim( $meta['iso'] ); + } + if ( ! empty($exif['ExposureTime'] ) ) + $meta['shutter_speed'] = (string) wp_exif_frac2dec( $exif['ExposureTime'] ); + } + + foreach ( array( 'title', 'caption', 'credit', 'copyright', 'camera', 'iso' ) as $key ) { + if ( $meta[ $key ] && ! seems_utf8( $meta[ $key ] ) ) + $meta[ $key ] = utf8_encode( $meta[ $key ] ); + } + + /** + * Filter the array of meta data read from an image's exif data. + * + * @since 2.5.0 + * + * @param array $meta Image meta data. + * @param string $file Path to image file. + * @param int $sourceImageType Type of image. + */ + return apply_filters( 'wp_read_image_metadata', $meta, $file, $sourceImageType ); + +} + +/** + * Validate that file is an image. + * + * @since 2.5.0 + * + * @param string $path File path to test if valid image. + * @return bool True if valid image, false if not valid image. + */ +function file_is_valid_image($path) { + $size = @getimagesize($path); + return !empty($size); +} + +/** + * Validate that file is suitable for displaying within a web page. + * + * @since 2.5.0 + * + * @param string $path File path to test. + * @return bool True if suitable, false if not suitable. + */ +function file_is_displayable_image($path) { + $info = @getimagesize($path); + if ( empty($info) ) + $result = false; + elseif ( !in_array($info[2], array(IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG)) ) // only gif, jpeg and png images can reliably be displayed + $result = false; + else + $result = true; + + /** + * Filter whether the current image is displayable in the browser. + * + * @since 2.5.0 + * + * @param bool $result Whether the image can be displayed. Default true. + * @param string $path Path to the image. + */ + 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) ) { + /** + * Filter the current image being loaded for editing. + * + * @since 2.9.0 + * + * @param resource $image Current image. + * @param string $attachment_id Attachment ID. + * @param string $size Image size. + */ + $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 ) ) ) { + /** + * Filter the path to the current image. + * + * The filter is evaluated for all image sizes except 'full'. + * + * @since 3.1.0 + * + * @param string $path Path to the current image. + * @param string $attachment_id Attachment ID. + * @param string $size Size of the image. + */ + $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' ) ) { + /** + * Filter the image URL if not in the local filesystem. + * + * The filter is only evaluated if fopen is enabled on the server. + * + * @since 3.1.0 + * + * @param string $image_url Current image URL. + * @param string $attachment_id Attachment ID. + * @param string $size Size of the image. + */ + $filepath = apply_filters( 'load_image_to_edit_attachmenturl', wp_get_attachment_url( $attachment_id ), $attachment_id, $size ); + } + + /** + * Filter the returned path or URL of the current image. + * + * @since 2.9.0 + * + * @param string|bool $filepath File path or URL to current image, or false. + * @param string $attachment_id Attachment ID. + * @param string $size Size of the image. + */ + 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 new file mode 100644 index 0000000..f01eb87 --- /dev/null +++ b/wp-admin/includes/import.php @@ -0,0 +1,203 @@ + false, 'test_type' => false ); + $_FILES['import']['name'] .= '.txt'; + $file = wp_handle_upload( $_FILES['import'], $overrides ); + + if ( isset( $file['error'] ) ) + return $file; + + $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' => 'import', + 'post_status' => 'private' + ); + + // Save the data + $id = wp_insert_attachment( $object, $file ); + + // schedule a cleanup for one day from now in case of failed import or missing wp_import_cleanup() call + wp_schedule_single_event( time() + DAY_IN_SECONDS, 'importer_scheduled_cleanup', array( $id ) ); + + return array( 'file' => $file, 'id' => $id ); +} + +/** + * Returns a list from WordPress.org of popular importer plugins. + * + * @since 3.5.0 + * + * @return array Importers with metadata for each. + */ +function wp_get_popular_importers() { + include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version + + $locale = get_locale(); + $popular_importers = get_site_transient( 'popular_importers_' . $locale ); + + if ( ! $popular_importers ) { + $url = add_query_arg( 'locale', get_locale(), 'http://api.wordpress.org/core/importers/1.1/' ); + $options = array( 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url() ); + $response = wp_remote_get( $url, $options ); + $popular_importers = json_decode( wp_remote_retrieve_body( $response ), true ); + + if ( is_array( $popular_importers ) ) + set_site_transient( 'popular_importers_' . $locale, $popular_importers, 2 * DAY_IN_SECONDS ); + else + $popular_importers = false; + } + + if ( is_array( $popular_importers ) ) { + // If the data was received as translated, return it as-is. + if ( $popular_importers['translated'] ) + return $popular_importers['importers']; + + foreach ( $popular_importers['importers'] as &$importer ) { + $importer['description'] = translate( $importer['description'] ); + if ( $importer['name'] != 'WordPress' ) + $importer['name'] = translate( $importer['name'] ); + } + return $popular_importers['importers']; + } + + return array( + // slug => name, description, plugin slug, and register_importer() slug + 'blogger' => array( + 'name' => __( 'Blogger' ), + 'description' => __( 'Install the Blogger importer to import posts, comments, and users from a Blogger blog.' ), + 'plugin-slug' => 'blogger-importer', + 'importer-id' => 'blogger', + ), + 'wpcat2tag' => array( + 'name' => __( 'Categories and Tags Converter' ), + 'description' => __( 'Install the category/tag converter to convert existing categories to tags or tags to categories, selectively.' ), + 'plugin-slug' => 'wpcat2tag-importer', + 'importer-id' => 'wp-cat2tag', + ), + 'livejournal' => array( + 'name' => __( 'LiveJournal' ), + 'description' => __( 'Install the LiveJournal importer to import posts from LiveJournal using their API.' ), + 'plugin-slug' => 'livejournal-importer', + 'importer-id' => 'livejournal', + ), + 'movabletype' => array( + 'name' => __( 'Movable Type and TypePad' ), + 'description' => __( 'Install the Movable Type importer to import posts and comments from a Movable Type or TypePad blog.' ), + 'plugin-slug' => 'movabletype-importer', + 'importer-id' => 'mt', + ), + 'opml' => array( + 'name' => __( 'Blogroll' ), + 'description' => __( 'Install the blogroll importer to import links in OPML format.' ), + 'plugin-slug' => 'opml-importer', + 'importer-id' => 'opml', + ), + 'rss' => array( + 'name' => __( 'RSS' ), + 'description' => __( 'Install the RSS importer to import posts from an RSS feed.' ), + 'plugin-slug' => 'rss-importer', + 'importer-id' => 'rss', + ), + 'tumblr' => array( + 'name' => __( 'Tumblr' ), + 'description' => __( 'Install the Tumblr importer to import posts & media from Tumblr using their API.' ), + 'plugin-slug' => 'tumblr-importer', + 'importer-id' => 'tumblr', + ), + 'wordpress' => array( + 'name' => 'WordPress', + 'description' => __( 'Install the WordPress importer to import posts, pages, comments, custom fields, categories, and tags from a WordPress export file.' ), + 'plugin-slug' => 'wordpress-importer', + 'importer-id' => 'wordpress', + ), + ); +} diff --git a/wp-admin/includes/list-table.php b/wp-admin/includes/list-table.php new file mode 100644 index 0000000..2403ec8 --- /dev/null +++ b/wp-admin/includes/list-table.php @@ -0,0 +1,113 @@ + 'posts', + 'WP_Media_List_Table' => 'media', + 'WP_Terms_List_Table' => 'terms', + 'WP_Users_List_Table' => 'users', + 'WP_Comments_List_Table' => 'comments', + 'WP_Post_Comments_List_Table' => 'comments', + 'WP_Links_List_Table' => 'links', + 'WP_Plugin_Install_List_Table' => 'plugin-install', + 'WP_Themes_List_Table' => 'themes', + 'WP_Theme_Install_List_Table' => array( 'themes', 'theme-install' ), + 'WP_Plugins_List_Table' => 'plugins', + // Network Admin + 'WP_MS_Sites_List_Table' => 'ms-sites', + 'WP_MS_Users_List_Table' => 'ms-users', + 'WP_MS_Themes_List_Table' => 'ms-themes', + ); + + if ( isset( $core_classes[ $class ] ) ) { + foreach ( (array) $core_classes[ $class ] as $required ) + require_once( ABSPATH . 'wp-admin/includes/class-wp-' . $required . '-list-table.php' ); + + if ( isset( $args['screen'] ) ) + $args['screen'] = convert_to_screen( $args['screen'] ); + elseif ( isset( $GLOBALS['hook_suffix'] ) ) + $args['screen'] = get_current_screen(); + else + $args['screen'] = null; + + return new $class( $args ); + } + + return false; +} + +/** + * Register column headers for a particular screen. + * + * @since 2.7.0 + * + * @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 array $columns An array of columns with column IDs as the keys and translated column names as the values + * @see get_column_headers(), print_column_headers(), get_hidden_columns() + */ +function register_column_headers($screen, $columns) { + $wp_list_table = new _WP_List_Table_Compat($screen, $columns); +} + +/** + * Prints column headers for a particular screen. + * + * @since 2.7.0 + */ +function print_column_headers($screen, $id = true) { + $wp_list_table = new _WP_List_Table_Compat($screen); + + $wp_list_table->print_column_headers($id); +} + +/** + * Helper class to be used only by back compat functions + * + * @since 3.1.0 + */ +class _WP_List_Table_Compat extends WP_List_Table { + var $_screen; + var $_columns; + + function _WP_List_Table_Compat( $screen, $columns = array() ) { + if ( is_string( $screen ) ) + $screen = convert_to_screen( $screen ); + + $this->_screen = $screen; + + if ( !empty( $columns ) ) { + $this->_columns = $columns; + add_filter( 'manage_' . $screen->id . '_columns', array( $this, 'get_columns' ), 0 ); + } + } + + function get_column_info() { + $columns = get_column_headers( $this->_screen ); + $hidden = get_hidden_columns( $this->_screen ); + $sortable = array(); + + return array( $columns, $hidden, $sortable ); + } + + function get_columns() { + return $this->_columns; + } +} diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php new file mode 100644 index 0000000..06cd1c1 --- /dev/null +++ b/wp-admin/includes/media.php @@ -0,0 +1,2986 @@ + __('From Computer'), // handler action suffix => tab text + 'type_url' => __('From URL'), + 'gallery' => __('Gallery'), + 'library' => __('Media Library') + ); + + /** + * Filter the available tabs in the legacy (pre-3.5.0) media popup. + * + * @since 2.5.0 + * + * @param array $_default_tabs An array of media tabs. + */ + return apply_filters( 'media_upload_tabs', $_default_tabs ); +} + +/** + * Adds the gallery tab back to the tabs array if post has image attachments + * + * @since 2.5.0 + * + * @param array $tabs + * @return array $tabs with gallery if post has image attachment + */ +function update_gallery_tab($tabs) { + global $wpdb; + + if ( !isset($_REQUEST['post_id']) ) { + unset($tabs['gallery']); + return $tabs; + } + + $post_id = intval($_REQUEST['post_id']); + + if ( $post_id ) + $attachments = intval( $wpdb->get_var( $wpdb->prepare( "SELECT count(*) FROM $wpdb->posts WHERE post_type = 'attachment' AND post_status != 'trash' AND post_parent = %d", $post_id ) ) ); + + if ( empty($attachments) ) { + unset($tabs['gallery']); + return $tabs; + } + + $tabs['gallery'] = sprintf(__('Gallery (%s)'), "$attachments"); + + return $tabs; +} +add_filter('media_upload_tabs', 'update_gallery_tab'); + +/** + * {@internal Missing Short Description}} + * + * @since 2.5.0 + */ +function the_media_upload_tabs() { + global $redir_tab; + $tabs = media_upload_tabs(); + $default = 'type'; + + if ( !empty($tabs) ) { + echo "
    \n"; + if ( isset($redir_tab) && array_key_exists($redir_tab, $tabs) ) { + $current = $redir_tab; + } elseif ( isset($_GET['tab']) && array_key_exists($_GET['tab'], $tabs) ) { + $current = $_GET['tab']; + } else { + /** This filter is documented in wp-admin/media-upload.php */ + $current = apply_filters( 'media_upload_default_tab', $default ); + } + + foreach ( $tabs as $callback => $text ) { + $class = ''; + + if ( $current == $callback ) + $class = " class='current'"; + + $href = add_query_arg(array('tab' => $callback, 's' => false, 'paged' => false, 'post_mime_type' => false, 'm' => false)); + $link = "$text"; + echo "\t
  • $link
  • \n"; + } + echo "
\n"; + } +} + +/** + * {@internal Missing Short Description}} + * + * @since 2.5.0 + * + * @param integer $id image attachment id + * @param string $caption image caption + * @param string $alt image alt attribute + * @param string $title image title attribute + * @param string $align image css alignment property + * @param string $url image src url + * @param string|bool $rel image rel attribute + * @param string $size image size (thumbnail, medium, large, full or added with add_image_size() ) + * @return string the html to insert into editor + */ +function get_image_send_to_editor($id, $caption, $title, $align, $url='', $rel = false, $size='medium', $alt = '') { + + $html = get_image_tag($id, $alt, '', $align, $size); + + $rel = $rel ? ' rel="attachment wp-att-' . esc_attr($id).'"' : ''; + + if ( $url ) + $html = '$html"; + + /** + * Filter the image HTML markup to send to the editor. + * + * @since 2.5.0 + * + * @param string $html The image HTML markup to send. + * @param int $id The attachment id. + * @param string $caption The image caption. + * @param string $title The image title. + * @param string $align The image alignment. + * @param string $url The image source URL. + * @param string $size The image size. + * @param string $alt The image alternative, or alt, text. + */ + $html = apply_filters( 'image_send_to_editor', $html, $id, $caption, $title, $align, $url, $size, $alt ); + + return $html; +} + +/** + * Adds image shortcode with caption to editor + * + * @since 2.6.0 + * + * @param string $html + * @param integer $id + * @param string $caption image caption + * @param string $alt image alt attribute + * @param string $title image title attribute + * @param string $align image css alignment property + * @param string $url image src url + * @param string $size image size (thumbnail, medium, large, full or added with add_image_size() ) + * @return string + */ +function image_add_caption( $html, $id, $caption, $title, $align, $url, $size, $alt = '' ) { + + /** + * Filter whether to disable captions. + * + * Prevents image captions from being appended to image HTML when inserted into the editor. + * + * @since 2.6.0 + * + * @param bool $bool Whether to disable appending captions. Returning true to the filter + * will disable captions. Default empty string. + */ + if ( empty($caption) || apply_filters( 'disable_captions', '' ) ) + return $html; + + $id = ( 0 < (int) $id ) ? 'attachment_' . $id : ''; + + if ( ! preg_match( '/width=["\']([0-9]+)/', $html, $matches ) ) + return $html; + + $width = $matches[1]; + + $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 . '"]' . $html . ' ' . $caption . '[/caption]'; + + /** + * Filter the image HTML markup including the caption shortcode. + * + * @since 2.6.0 + * + * @param string $shcode The image HTML markup with caption shortcode. + * @param string $html The image HTML markup. + */ + 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] ); +} + +/** + * Adds image html to editor + * + * @since 2.5.0 + * + * @param string $html + */ +function media_send_to_editor($html) { +?> + + false )) { + + $time = current_time('mysql'); + if ( $post = get_post($post_id) ) { + if ( substr( $post->post_date, 0, 4 ) > 0 ) + $time = $post->post_date; + } + + $name = $_FILES[$file_id]['name']; + $file = wp_handle_upload($_FILES[$file_id], $overrides, $time); + + if ( isset($file['error']) ) + return new WP_Error( 'upload_error', $file['error'] ); + + $name_parts = pathinfo($name); + $name = trim( substr( $name, 0, -(1 + strlen($name_parts['extension'])) ) ); + + $url = $file['url']; + $type = $file['type']; + $file = $file['file']; + $title = $name; + $content = ''; + + if ( preg_match( '#^audio#', $type ) ) { + $meta = wp_read_audio_metadata( $file ); + + if ( ! empty( $meta['title'] ) ) + $title = $meta['title']; + + $content = ''; + + if ( ! empty( $title ) ) { + + if ( ! empty( $meta['album'] ) && ! empty( $meta['artist'] ) ) { + /* translators: 1: audio track title, 2: album title, 3: artist name */ + $content .= sprintf( __( '"%1$s" from %2$s by %3$s.' ), $title, $meta['album'], $meta['artist'] ); + } else if ( ! empty( $meta['album'] ) ) { + /* translators: 1: audio track title, 2: album title */ + $content .= sprintf( __( '"%1$s" from %2$s.' ), $title, $meta['album'] ); + } else if ( ! empty( $meta['artist'] ) ) { + /* translators: 1: audio track title, 2: artist name */ + $content .= sprintf( __( '"%1$s" by %2$s.' ), $title, $meta['artist'] ); + } else { + $content .= sprintf( __( '"%s".' ), $title ); + } + + } else if ( ! empty( $meta['album'] ) ) { + + if ( ! empty( $meta['artist'] ) ) { + /* translators: 1: audio album title, 2: artist name */ + $content .= sprintf( __( '%1$s by %2$s.' ), $meta['album'], $meta['artist'] ); + } else { + $content .= $meta['album'] . '.'; + } + + } else if ( ! empty( $meta['artist'] ) ) { + + $content .= $meta['artist'] . '.'; + + } + + if ( ! empty( $meta['year'] ) ) + $content .= ' ' . sprintf( __( 'Released: %d.' ), $meta['year'] ); + + if ( ! empty( $meta['track_number'] ) ) { + $track_number = explode( '/', $meta['track_number'] ); + if ( isset( $track_number[1] ) ) + $content .= ' ' . sprintf( __( 'Track %1$s of %2$s.' ), number_format_i18n( $track_number[0] ), number_format_i18n( $track_number[1] ) ); + else + $content .= ' ' . sprintf( __( 'Track %1$s.' ), number_format_i18n( $track_number[0] ) ); + } + + if ( ! empty( $meta['genre'] ) ) + $content .= ' ' . sprintf( __( 'Genre: %s.' ), $meta['genre'] ); + + // use image exif/iptc data for title and caption defaults if possible + } elseif ( $image_meta = @wp_read_image_metadata( $file ) ) { + if ( trim( $image_meta['title'] ) && ! is_numeric( sanitize_title( $image_meta['title'] ) ) ) + $title = $image_meta['title']; + if ( trim( $image_meta['caption'] ) ) + $content = $image_meta['caption']; + } + + // Construct the attachment array + $attachment = array_merge( array( + 'post_mime_type' => $type, + 'guid' => $url, + 'post_parent' => $post_id, + 'post_title' => $title, + 'post_content' => $content, + ), $post_data ); + + // This should never be set as it would then overwrite an existing attachment. + if ( isset( $attachment['ID'] ) ) + unset( $attachment['ID'] ); + + // Save the data + $id = wp_insert_attachment($attachment, $file, $post_id); + if ( !is_wp_error($id) ) { + wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) ); + } + + return $id; + +} + +/** + * This handles a sideloaded file in the same way as an uploaded file is handled by {@link media_handle_upload()} + * + * @since 2.6.0 + * + * @param array $file_array Array similar to a {@link $_FILES} upload array + * @param int $post_id The post ID the media is associated with + * @param string $desc Description of the sideloaded file + * @param array $post_data allows you to overwrite some of the attachment + * @return int|object The ID of the attachment or a WP_Error on failure + */ +function media_handle_sideload($file_array, $post_id, $desc = null, $post_data = array()) { + $overrides = array('test_form'=>false); + + $time = current_time( 'mysql' ); + if ( $post = get_post( $post_id ) ) { + if ( substr( $post->post_date, 0, 4 ) > 0 ) + $time = $post->post_date; + } + + $file = wp_handle_sideload( $file_array, $overrides, $time ); + if ( isset($file['error']) ) + return new WP_Error( 'upload_error', $file['error'] ); + + $url = $file['url']; + $type = $file['type']; + $file = $file['file']; + $title = preg_replace('/\.[^.]+$/', '', basename($file)); + $content = ''; + + // use image exif/iptc data for title and caption defaults if possible + if ( $image_meta = @wp_read_image_metadata($file) ) { + if ( trim( $image_meta['title'] ) && ! is_numeric( sanitize_title( $image_meta['title'] ) ) ) + $title = $image_meta['title']; + if ( trim( $image_meta['caption'] ) ) + $content = $image_meta['caption']; + } + + if ( isset( $desc ) ) + $title = $desc; + + // Construct the attachment array + $attachment = array_merge( array( + 'post_mime_type' => $type, + 'guid' => $url, + 'post_parent' => $post_id, + 'post_title' => $title, + 'post_content' => $content, + ), $post_data ); + + // This should never be set as it would then overwrite an existing attachment. + if ( isset( $attachment['ID'] ) ) + unset( $attachment['ID'] ); + + // Save the attachment metadata + $id = wp_insert_attachment($attachment, $file, $post_id); + if ( !is_wp_error($id) ) + wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) ); + + return $id; +} + +/** + * Adds the iframe to display content for the media upload page + * + * @since 2.5.0 + * + * @param array $content_func + */ +function wp_iframe($content_func /* ... */) { + _wp_admin_html_begin(); +?> +<?php bloginfo('name') ?> › <?php _e('Uploads'); ?> — <?php _e('WordPress'); ?> + + + + + class="wp-core-ui no-js"> + + + + + + $post + ) ); + + $img = ' '; + + echo '' . $img . __( 'Add Media' ) . ''; + + /** + * Filter the legacy (pre-3.5.0) media buttons. + * + * @since 2.5.0 + * @deprecated 3.5.0 Use 'media_buttons' action instead. + * + * @param string $string Media buttons context. Default empty. + */ + $legacy_filter = apply_filters( 'media_buttons_context', '' ); + + if ( $legacy_filter ) { + // #WP22559. Close if a plugin started by closing to open their own tag. + if ( 0 === stripos( trim( $legacy_filter ), '' ) ) + $legacy_filter .= ''; + echo $legacy_filter; + } +} +add_action( 'media_buttons', 'media_buttons' ); + +function get_upload_iframe_src( $type = null, $post_id = null, $tab = null ) { + global $post_ID; + + 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); + + /** + * Filter the upload iframe source URL for a specific media type. + * + * The dynamic portion of the hook name, $type, refers to the type + * of media uploaded. + * + * @since 3.0.0 + * + * @param string $upload_iframe_src The upload iframe source URL by type. + */ + $upload_iframe_src = apply_filters( $type . '_upload_iframe_src', $upload_iframe_src ); + + return add_query_arg('TB_iframe', true, $upload_iframe_src); +} + +/** + * {@internal Missing Short Description}} + * + * @since 2.5.0 + * + * @return mixed void|object WP_Error on failure + */ +function media_upload_form_handler() { + check_admin_referer('media-form'); + + $errors = null; + + if ( isset($_POST['send']) ) { + $keys = array_keys($_POST['send']); + $send_id = (int) array_shift($keys); + } + + if ( !empty($_POST['attachments']) ) foreach ( $_POST['attachments'] as $attachment_id => $attachment ) { + $post = $_post = get_post($attachment_id, ARRAY_A); + + if ( !current_user_can( 'edit_post', $attachment_id ) ) + continue; + + if ( isset($attachment['post_content']) ) + $post['post_content'] = $attachment['post_content']; + if ( isset($attachment['post_title']) ) + $post['post_title'] = $attachment['post_title']; + if ( isset($attachment['post_excerpt']) ) + $post['post_excerpt'] = $attachment['post_excerpt']; + if ( isset($attachment['menu_order']) ) + $post['menu_order'] = $attachment['menu_order']; + + if ( isset($send_id) && $attachment_id == $send_id ) { + if ( isset($attachment['post_parent']) ) + $post['post_parent'] = $attachment['post_parent']; + } + + /** + * Filter the attachment fields to be saved. + * + * @since 2.5.0 + * + * @see wp_get_attachment_metadata() + * + * @param WP_Post $post The WP_Post object. + * @param array $attachment An array of attachment metadata. + */ + $post = apply_filters( 'attachment_fields_to_save', $post, $attachment ); + + if ( isset($attachment['image_alt']) ) { + $image_alt = wp_unslash( $attachment['image_alt'] ); + if ( $image_alt != get_post_meta($attachment_id, '_wp_attachment_image_alt', true) ) { + $image_alt = wp_strip_all_tags( $image_alt, true ); + // update_meta expects slashed + update_post_meta( $attachment_id, '_wp_attachment_image_alt', wp_slash( $image_alt ) ); + } + } + + if ( isset($post['errors']) ) { + $errors[$attachment_id] = $post['errors']; + unset($post['errors']); + } + + if ( $post != $_post ) + wp_update_post($post); + + foreach ( get_attachment_taxonomies($post) as $t ) { + if ( isset($attachment[$t]) ) + wp_set_object_terms($attachment_id, array_map('trim', preg_split('/,+/', $attachment[$t])), $t, false); + } + } + + if ( isset($_POST['insert-gallery']) || isset($_POST['update-gallery']) ) { ?> + + $html"; + } + + /** + * Filter the HTML markup for a media item sent to the editor. + * + * @since 2.5.0 + * + * @see wp_get_attachment_metadata() + * + * @param string $html HTML markup for a media item sent to the editor. + * @param int $send_id The first key from the $_POST['send'] data. + * @param array $attachment Array of attachment metadata. + */ + $html = apply_filters( 'media_send_to_editor', $html, $send_id, $attachment ); + return media_send_to_editor($html); + } + + return $errors; +} + +/** + * {@internal Missing Short Description}} + * + * @since 2.5.0 + * + * @return mixed + */ +function wp_media_upload_handler() { + $errors = array(); + $id = 0; + + if ( isset($_POST['html-upload']) && !empty($_FILES) ) { + check_admin_referer('media-form'); + // Upload File button was clicked + $id = media_handle_upload('async-upload', $_REQUEST['post_id']); + unset($_FILES); + if ( is_wp_error($id) ) { + $errors['upload_error'] = $id; + $id = false; + } + } + + if ( !empty($_POST['insertonlybutton']) ) { + $src = $_POST['src']; + if ( !empty($src) && !strpos($src, '://') ) + $src = "http://$src"; + + if ( isset( $_POST['media_type'] ) && 'image' != $_POST['media_type'] ) { + $title = esc_html( wp_unslash( $_POST['title'] ) ); + if ( empty( $title ) ) + $title = esc_html( basename( $src ) ); + + if ( $title && $src ) + $html = "$title"; + + $type = 'file'; + if ( ( $ext = preg_replace( '/^.+?\.([^.]+)$/', '$1', $src ) ) && ( $ext_type = wp_ext2type( $ext ) ) + && ( 'audio' == $ext_type || 'video' == $ext_type ) ) + $type = $ext_type; + + /** + * Filter the URL sent to the editor for a specific media type. + * + * The dynamic portion of the hook name, $type, refers to the type + * of media being sent. + * + * @since 3.3.0 + * + * @param string $html HTML markup sent to the editor. + * @param string $src Media source URL. + * @param string $title Media title. + */ + $html = apply_filters( $type . '_send_to_editor_url', $html, esc_url_raw( $src ), $title ); + } else { + $align = ''; + $alt = esc_attr( wp_unslash( $_POST['alt'] ) ); + if ( isset($_POST['align']) ) { + $align = esc_attr( wp_unslash( $_POST['align'] ) ); + $class = " class='align$align'"; + } + if ( !empty($src) ) + $html = "$alt"; + + /** + * Filter the image URL sent to the editor. + * + * @since 2.8.0 + * + * @param string $html HTML markup sent to the editor for an image. + * @param string $src Image source URL. + * @param string $alt Image alternate, or alt, text. + * @param string $align The image alignment. Default 'alignnone'. Possible values include + * 'alignleft', 'aligncenter', 'alignright', 'alignnone'. + */ + $html = apply_filters( 'image_send_to_editor_url', $html, esc_url_raw( $src ), $alt, $align ); + } + + return media_send_to_editor($html); + } + + if ( !empty($_POST) ) { + $return = media_upload_form_handler(); + + if ( is_string($return) ) + return $return; + if ( is_array($return) ) + $errors = $return; + } + + if ( isset($_POST['save']) ) { + $errors['upload_notice'] = __('Saved.'); + return media_upload_gallery(); + } + + if ( isset($_GET['tab']) && $_GET['tab'] == 'type_url' ) { + $type = 'image'; + if ( isset( $_GET['type'] ) && in_array( $_GET['type'], array( 'video', 'audio', 'file' ) ) ) + $type = $_GET['type']; + return wp_iframe( 'media_upload_type_url_form', $type, $errors, $id ); + } + + return wp_iframe( 'media_upload_type_form', 'image', $errors, $id ); +} + +/** + * Download an image from the specified URL and attach it to a post. + * + * @since 2.6.0 + * + * @param string $file The URL of the image to download + * @param int $post_id The post ID the media is to be associated with + * @param string $desc Optional. Description of the image + * @return string|WP_Error Populated HTML img tag on success + */ +function media_sideload_image($file, $post_id, $desc = null) { + if ( ! empty($file) ) { + // Download file to temp location + $tmp = download_url( $file ); + + // Set variables for storage + // fix file filename for query strings + preg_match( '/[^\?]+\.(jpe?g|jpe|gif|png)\b/i', $file, $matches ); + $file_array['name'] = basename($matches[0]); + $file_array['tmp_name'] = $tmp; + + // If error storing temporarily, unlink + if ( is_wp_error( $tmp ) ) { + @unlink($file_array['tmp_name']); + $file_array['tmp_name'] = ''; + } + + // do the validation and storage stuff + $id = media_handle_sideload( $file_array, $post_id, $desc ); + // If error storing permanently, unlink + if ( is_wp_error($id) ) { + @unlink($file_array['tmp_name']); + return $id; + } + + $src = wp_get_attachment_url( $id ); + } + + // Finally check to make sure the file has been saved, then return the html + if ( ! empty($src) ) { + $alt = isset($desc) ? esc_attr($desc) : ''; + $html = "$alt"; + return $html; + } +} + +/** + * {@internal Missing Short Description}} + * + * @since 2.5.0 + * + * @return unknown + */ +function media_upload_gallery() { + $errors = array(); + + if ( !empty($_POST) ) { + $return = media_upload_form_handler(); + + if ( is_string($return) ) + return $return; + if ( is_array($return) ) + $errors = $return; + } + + wp_enqueue_script('admin-gallery'); + return wp_iframe( 'media_upload_gallery_form', $errors ); +} + +/** + * {@internal Missing Short Description}} + * + * @since 2.5.0 + * + * @return unknown + */ +function media_upload_library() { + $errors = array(); + if ( !empty($_POST) ) { + $return = media_upload_form_handler(); + + if ( is_string($return) ) + return $return; + if ( is_array($return) ) + $errors = $return; + } + + return wp_iframe( 'media_upload_library_form', $errors ); +} + +/** + * Retrieve HTML for the image alignment radio buttons with the specified one checked. + * + * @since 2.7.0 + * + * @param object $post + * @param string $checked + * @return string + */ +function image_align_input_fields( $post, $checked = '' ) { + + if ( empty($checked) ) + $checked = get_user_setting('align', 'none'); + + $alignments = array('none' => __('None'), 'left' => __('Left'), 'center' => __('Center'), 'right' => __('Right')); + if ( !array_key_exists( (string) $checked, $alignments ) ) + $checked = 'none'; + + $out = array(); + foreach ( $alignments as $name => $label ) { + $name = esc_attr($name); + $out[] = ""; + } + return join("\n", $out); +} + +/** + * Retrieve HTML for the size radio buttons with the specified one checked. + * + * @since 2.7.0 + * + * @param object $post + * @param bool|string $check + * @return array + */ +function image_size_input_fields( $post, $check = '' ) { + + /** + * Filter the names and labels of the default image sizes. + * + * @since 3.3.0 + * + * @param array $size_names Array of image sizes and their names. Default values + * include 'Thumbnail', 'Medium', 'Large', 'Full Size'. + */ + $size_names = apply_filters( 'image_size_names_choose', array( + 'thumbnail' => __( 'Thumbnail' ), + 'medium' => __( 'Medium' ), + 'large' => __( 'Large' ), + 'full' => __( 'Full Size' ) + ) ); + + if ( empty($check) ) + $check = get_user_setting('imgsize', 'medium'); + + foreach ( $size_names as $size => $label ) { + $downsize = image_downsize($post->ID, $size); + $checked = ''; + + // is this size selectable? + $enabled = ( $downsize[3] || 'full' == $size ); + $css_id = "image-size-{$size}-{$post->ID}"; + // if this size is the default but that's not available, don't select it + if ( $size == $check ) { + if ( $enabled ) + $checked = " checked='checked'"; + else + $check = ''; + } elseif ( !$check && $enabled && 'thumbnail' != $size ) { + // if $check is not enabled, default to the first available size that's bigger than a thumbnail + $check = $size; + $checked = " checked='checked'"; + } + + $html = "
"; + + $html .= ""; + // only show the dimensions if that choice is available + if ( $enabled ) + $html .= " "; + + $html .= '
'; + + $out[] = $html; + } + + return array( + 'label' => __('Size'), + 'input' => 'html', + 'html' => join("\n", $out), + ); +} + +/** + * Retrieve HTML for the Link URL buttons with the default link type as specified. + * + * @since 2.7.0 + * + * @param object $post + * @param string $url_type + * @return string + */ +function image_link_input_fields($post, $url_type = '') { + + $file = wp_get_attachment_url($post->ID); + $link = get_attachment_link($post->ID); + + if ( empty($url_type) ) + $url_type = get_user_setting('urlbutton', 'post'); + + $url = ''; + if ( $url_type == 'file' ) + $url = $file; + elseif ( $url_type == 'post' ) + $url = $link; + + return " +
+ + + +"; +} + +function wp_caption_input_textarea($edit_post) { + // post data is already escaped + $name = "attachments[{$edit_post->ID}][post_excerpt]"; + + return ''; +} + +/** + * {@internal Missing Short Description}} + * + * @since 2.5.0 + * + * @param array $form_fields + * @param object $post + * @return array + */ +function image_attachment_fields_to_edit($form_fields, $post) { + return $form_fields; +} + +/** + * {@internal Missing Short Description}} + * + * @since 2.5.0 + * + * @param array $form_fields + * @param object $post {@internal $post not used}} + * @return array + */ +function media_single_attachment_fields_to_edit( $form_fields, $post ) { + unset($form_fields['url'], $form_fields['align'], $form_fields['image-size']); + return $form_fields; +} + +/** + * {@internal Missing Short Description}} + * + * @since 2.8.0 + * + * @param array $form_fields + * @param object $post {@internal $post not used}} + * @return array + */ +function media_post_single_attachment_fields_to_edit( $form_fields, $post ) { + unset($form_fields['image_url']); + return $form_fields; +} + +/** + * Filters input from media_upload_form_handler() and assigns a default + * post_title from the file name if none supplied. + * + * Illustrates the use of the attachment_fields_to_save filter + * which can be used to add default values to any field before saving to DB. + * + * @since 2.5.0 + * + * @param object $post + * @param array $attachment {@internal $attachment not used}} + * @return array + */ +function image_attachment_fields_to_save( $post, $attachment ) { + if ( substr( $post['post_mime_type'], 0, 5 ) == 'image' ) { + if ( strlen( trim( $post['post_title'] ) ) == 0 ) { + $attachment_url = ( isset( $post['attachment_url'] ) ) ? $post['attachment_url'] : $post['guid']; + $post['post_title'] = preg_replace( '/\.\w+$/', '', wp_basename( $attachment_url ) ); + $post['errors']['post_title']['errors'][] = __( 'Empty Title filled from filename.' ); + } + } + + return $post; +} + +add_filter( 'attachment_fields_to_save', 'image_attachment_fields_to_save', 10, 2 ); + +/** + * {@internal Missing Short Description}} + * + * @since 2.5.0 + * + * @param string $html + * @param integer $attachment_id + * @param array $attachment + * @return array + */ +function image_media_send_to_editor($html, $attachment_id, $attachment) { + $post = get_post($attachment_id); + if ( substr($post->post_mime_type, 0, 5) == 'image' ) { + $url = $attachment['url']; + $align = !empty($attachment['align']) ? $attachment['align'] : 'none'; + $size = !empty($attachment['image-size']) ? $attachment['image-size'] : 'medium'; + $alt = !empty($attachment['image_alt']) ? $attachment['image_alt'] : ''; + $rel = ( $url == get_attachment_link($attachment_id) ); + + return get_image_send_to_editor($attachment_id, $attachment['post_excerpt'], $attachment['post_title'], $align, $url, $rel, $size, $alt); + } + + return $html; +} + +add_filter('media_send_to_editor', 'image_media_send_to_editor', 10, 3); + +/** + * {@internal Missing Short Description}} + * + * @since 2.5.0 + * + * @param object $post + * @param array $errors + * @return array + */ +function get_attachment_fields_to_edit($post, $errors = null) { + if ( is_int($post) ) + $post = get_post($post); + if ( is_array($post) ) + $post = new WP_Post( (object) $post ); + + $image_url = wp_get_attachment_url($post->ID); + + $edit_post = sanitize_post($post, 'edit'); + + $form_fields = array( + 'post_title' => array( + 'label' => __('Title'), + 'value' => $edit_post->post_title + ), + 'image_alt' => array(), + 'post_excerpt' => array( + 'label' => __('Caption'), + 'input' => 'html', + 'html' => wp_caption_input_textarea($edit_post) + ), + 'post_content' => array( + 'label' => __('Description'), + 'value' => $edit_post->post_content, + 'input' => 'textarea' + ), + 'url' => array( + 'label' => __('Link URL'), + 'input' => 'html', + 'html' => image_link_input_fields($post, get_option('image_default_link_type')), + 'helps' => __('Enter a link URL or click above for presets.') + ), + 'menu_order' => array( + 'label' => __('Order'), + 'value' => $edit_post->menu_order + ), + 'image_url' => array( + 'label' => __('File URL'), + 'input' => 'html', + 'html' => "
", + 'value' => wp_get_attachment_url($post->ID), + 'helps' => __('Location of the uploaded file.') + ) + ); + + foreach ( get_attachment_taxonomies($post) as $taxonomy ) { + $t = (array) get_taxonomy($taxonomy); + if ( ! $t['public'] || ! $t['show_ui'] ) + continue; + if ( empty($t['label']) ) + $t['label'] = $taxonomy; + if ( empty($t['args']) ) + $t['args'] = array(); + + $terms = get_object_term_cache($post->ID, $taxonomy); + if ( false === $terms ) + $terms = wp_get_object_terms($post->ID, $taxonomy, $t['args']); + + $values = array(); + + foreach ( $terms as $term ) + $values[] = $term->slug; + $t['value'] = join(', ', $values); + + $form_fields[$taxonomy] = $t; + } + + // Merge default fields with their errors, so any key passed with the error (e.g. 'error', 'helps', 'value') will replace the default + // The recursive merge is easily traversed with array casting: foreach( (array) $things as $thing ) + $form_fields = array_merge_recursive($form_fields, (array) $errors); + + // This was formerly in image_attachment_fields_to_edit(). + if ( substr($post->post_mime_type, 0, 5) == 'image' ) { + $alt = get_post_meta($post->ID, '_wp_attachment_image_alt', true); + if ( empty($alt) ) + $alt = ''; + + $form_fields['post_title']['required'] = true; + + $form_fields['image_alt'] = array( + 'value' => $alt, + 'label' => __('Alternative Text'), + 'helps' => __('Alt text for the image, e.g. “The Mona Lisa”') + ); + + $form_fields['align'] = array( + 'label' => __('Alignment'), + 'input' => 'html', + 'html' => image_align_input_fields($post, get_option('image_default_align')), + ); + + $form_fields['image-size'] = image_size_input_fields( $post, get_option('image_default_size', 'medium') ); + + } else { + unset( $form_fields['image_alt'] ); + } + + /** + * Filter the attachment fields to edit. + * + * @since 2.5.0 + * + * @param array $form_fields An array of attachment form fields. + * @param WP_Post $post The WP_Post attachment object. + */ + $form_fields = apply_filters( 'attachment_fields_to_edit', $form_fields, $post ); + + return $form_fields; +} + +/** + * Retrieve HTML for media items of post gallery. + * + * The HTML markup retrieved will be created for the progress of SWF Upload + * component. Will also create link for showing and hiding the form to modify + * the image attachment. + * + * @since 2.5.0 + * + * @param int $post_id Optional. Post ID. + * @param array $errors Errors for attachment, if any. + * @return string + */ +function get_media_items( $post_id, $errors ) { + $attachments = array(); + if ( $post_id ) { + $post = get_post($post_id); + if ( $post && $post->post_type == 'attachment' ) + $attachments = array($post->ID => $post); + else + $attachments = get_children( array( 'post_parent' => $post_id, 'post_type' => 'attachment', 'orderby' => 'menu_order ASC, ID', 'order' => 'DESC') ); + } else { + if ( is_array($GLOBALS['wp_the_query']->posts) ) + foreach ( $GLOBALS['wp_the_query']->posts as $attachment ) + $attachments[$attachment->ID] = $attachment; + } + + $output = ''; + foreach ( (array) $attachments as $id => $attachment ) { + if ( $attachment->post_status == 'trash' ) + continue; + if ( $item = get_media_item( $id, array( 'errors' => isset($errors[$id]) ? $errors[$id] : null) ) ) + $output .= "\n
$item\n
"; + } + + return $output; +} + +/** + * Retrieve HTML form for modifying the image attachment. + * + * @since 2.5.0 + * + * @param int $attachment_id Attachment ID for modification. + * @param string|array $args Optional. Override defaults. + * @return string HTML form for attachment. + */ +function get_media_item( $attachment_id, $args = null ) { + global $redir_tab; + + if ( ( $attachment_id = intval( $attachment_id ) ) && $thumb_url = wp_get_attachment_image_src( $attachment_id, 'thumbnail', true ) ) + $thumb_url = $thumb_url[0]; + else + $thumb_url = false; + + $post = get_post( $attachment_id ); + $current_post_id = !empty( $_GET['post_id'] ) ? (int) $_GET['post_id'] : 0; + + $default_args = array( 'errors' => null, 'send' => $current_post_id ? post_type_supports( get_post_type( $current_post_id ), 'editor' ) : true, 'delete' => true, 'toggle' => true, 'show_title' => true ); + $args = wp_parse_args( $args, $default_args ); + + /** + * Filter the arguments used to retrieve an image for the edit image form. + * + * @since 3.1.0 + * + * @see get_media_item + * + * @param array $args An array of arguments. + */ + $args = apply_filters( 'get_media_item_args', $args ); + extract( $args, EXTR_SKIP ); + + $toggle_on = __( 'Show' ); + $toggle_off = __( 'Hide' ); + + $filename = esc_html( wp_basename( $post->guid ) ); + $title = esc_attr( $post->post_title ); + + if ( $_tags = get_the_tags( $attachment_id ) ) { + foreach ( $_tags as $tag ) + $tags[] = $tag->name; + $tags = esc_attr( join( ', ', $tags ) ); + } + + $post_mime_types = get_post_mime_types(); + $keys = array_keys( wp_match_mime_types( array_keys( $post_mime_types ), $post->post_mime_type ) ); + $type = array_shift( $keys ); + $type_html = ""; + + $form_fields = get_attachment_fields_to_edit( $post, $errors ); + + if ( $toggle ) { + $class = empty( $errors ) ? 'startclosed' : 'startopen'; + $toggle_links = " + $toggle_on + $toggle_off"; + } else { + $class = ''; + $toggle_links = ''; + } + + $display_title = ( !empty( $title ) ) ? $title : $filename; // $title shouldn't ever be empty, but just in case + $display_title = $show_title ? "
" . wp_html_excerpt( $display_title, 60, '…' ) . "
" : ''; + + $gallery = ( ( isset( $_REQUEST['tab'] ) && 'gallery' == $_REQUEST['tab'] ) || ( isset( $redir_tab ) && 'gallery' == $redir_tab ) ); + $order = ''; + + foreach ( $form_fields as $key => $val ) { + if ( 'menu_order' == $key ) { + if ( $gallery ) + $order = ""; + else + $order = ""; + + unset( $form_fields['menu_order'] ); + break; + } + } + + $media_dims = ''; + $meta = wp_get_attachment_metadata( $post->ID ); + if ( isset( $meta['width'], $meta['height'] ) ) + $media_dims .= "{$meta['width']} × {$meta['height']} "; + + /** + * Filter the media metadata. + * + * @since 2.5.0 + * + * @param string $media_dims The HTML markup containing the media dimensions. + * @param WP_Post $post The WP_Post attachment object. + */ + $media_dims = apply_filters( 'media_meta', $media_dims, $post ); + + $image_edit_button = ''; + if ( wp_attachment_is_image( $post->ID ) && wp_image_editor_supports( array( 'mime_type' => $post->post_mime_type ) ) ) { + $nonce = wp_create_nonce( "image_editor-$post->ID" ); + $image_edit_button = " "; + } + + $attachment_url = get_permalink( $attachment_id ); + + $item = " + $type_html + $toggle_links + $order + $display_title + + + + + \n"; + + $item .= " + + + + \n"; + + $defaults = array( + 'input' => 'text', + 'required' => false, + 'value' => '', + 'extra_rows' => array(), + ); + + if ( $send ) + $send = get_submit_button( __( 'Insert into Post' ), 'button', "send[$attachment_id]", false ); + if ( $delete && current_user_can( 'delete_post', $attachment_id ) ) { + if ( !EMPTY_TRASH_DAYS ) { + $delete = "" . __( 'Delete Permanently' ) . ''; + } elseif ( !MEDIA_TRASH ) { + $delete = "" . __( 'Delete' ) . " + "; + } else { + $delete = "" . __( 'Move to Trash' ) . " + "; + } + } else { + $delete = ''; + } + + $thumbnail = ''; + $calling_post_id = 0; + if ( isset( $_GET['post_id'] ) ) + $calling_post_id = absint( $_GET['post_id'] ); + elseif ( isset( $_POST ) && count( $_POST ) ) // Like for async-upload where $_GET['post_id'] isn't set + $calling_post_id = $post->post_parent; + if ( 'image' == $type && $calling_post_id && current_theme_supports( 'post-thumbnails', get_post_type( $calling_post_id ) ) + && post_type_supports( get_post_type( $calling_post_id ), 'thumbnail' ) && get_post_thumbnail_id( $calling_post_id ) != $attachment_id ) { + $ajax_nonce = wp_create_nonce( "set_post_thumbnail-$calling_post_id" ); + $thumbnail = "" . esc_html__( "Use as featured image" ) . ""; + } + + if ( ( $send || $thumbnail || $delete ) && !isset( $form_fields['buttons'] ) ) + $form_fields['buttons'] = array( 'tr' => "\t\t\n" ); + + $hidden_fields = array(); + + foreach ( $form_fields as $id => $field ) { + if ( $id[0] == '_' ) + continue; + + if ( !empty( $field['tr'] ) ) { + $item .= $field['tr']; + continue; + } + + $field = array_merge( $defaults, $field ); + $name = "attachments[$attachment_id][$id]"; + + if ( $field['input'] == 'hidden' ) { + $hidden_fields[$name] = $field['value']; + continue; + } + + $required = $field['required'] ? '*' : ''; + $aria_required = $field['required'] ? " aria-required='true' " : ''; + $class = $id; + $class .= $field['required'] ? ' form-required' : ''; + + $item .= "\t\t\n\t\t\t\n\t\t\t\n\t\t\n"; + + $extra_rows = array(); + + if ( !empty( $field['errors'] ) ) + foreach ( array_unique( (array) $field['errors'] ) as $error ) + $extra_rows['error'][] = $error; + + if ( !empty( $field['extra_rows'] ) ) + foreach ( $field['extra_rows'] as $class => $rows ) + foreach ( (array) $rows as $html ) + $extra_rows[$class][] = $html; + + foreach ( $extra_rows as $class => $rows ) + foreach ( $rows as $html ) + $item .= "\t\t\n"; + } + + if ( !empty( $form_fields['_final'] ) ) + $item .= "\t\t\n"; + $item .= "\t\n"; + $item .= "\t
+

+

$image_edit_button

+
+

" . __('File name:') . " $filename

+

" . __('File type:') . " $post->post_mime_type

+

" . __('Upload date:') . " " . mysql2date( get_option('date_format'), $post->post_date ). '

'; + if ( !empty( $media_dims ) ) + $item .= "

" . __('Dimensions:') . " $media_dims

\n"; + + $item .= "
$send $thumbnail $delete
"; + if ( !empty( $field[ $field['input'] ] ) ) + $item .= $field[ $field['input'] ]; + elseif ( $field['input'] == 'textarea' ) { + if ( 'post_content' == $id && user_can_richedit() ) { + // sanitize_post() skips the post_content when user_can_richedit + $field['value'] = htmlspecialchars( $field['value'], ENT_QUOTES ); + } + // post_excerpt is already escaped by sanitize_post() in get_attachment_fields_to_edit() + $item .= "'; + } else { + $item .= ""; + } + if ( !empty( $field['helps'] ) ) + $item .= "

" . join( "

\n

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

'; + $item .= "
$html
{$form_fields['_final']}
\n"; + + foreach ( $hidden_fields as $name => $value ) + $item .= "\t\n"; + + if ( $post->post_parent < 1 && isset( $_REQUEST['post_id'] ) ) { + $parent = (int) $_REQUEST['post_id']; + $parent_name = "attachments[$attachment_id][post_parent]"; + $item .= "\t\n"; + } + + return $item; +} + +function get_compat_media_markup( $attachment_id, $args = null ) { + $post = get_post( $attachment_id ); + + $default_args = array( + 'errors' => null, + 'in_modal' => false, + ); + + $user_can_edit = current_user_can( 'edit_post', $attachment_id ); + + $args = wp_parse_args( $args, $default_args ); + + /** This filter is documented in wp-admin/includes/media.php */ + $args = apply_filters( 'get_media_item_args', $args ); + + $form_fields = array(); + + if ( $args['in_modal'] ) { + foreach ( get_attachment_taxonomies($post) as $taxonomy ) { + $t = (array) get_taxonomy($taxonomy); + if ( ! $t['public'] || ! $t['show_ui'] ) + continue; + if ( empty($t['label']) ) + $t['label'] = $taxonomy; + if ( empty($t['args']) ) + $t['args'] = array(); + + $terms = get_object_term_cache($post->ID, $taxonomy); + if ( false === $terms ) + $terms = wp_get_object_terms($post->ID, $taxonomy, $t['args']); + + $values = array(); + + foreach ( $terms as $term ) + $values[] = $term->slug; + $t['value'] = join(', ', $values); + $t['taxonomy'] = true; + + $form_fields[$taxonomy] = $t; + } + } + + // Merge default fields with their errors, so any key passed with the error (e.g. 'error', 'helps', 'value') will replace the default + // The recursive merge is easily traversed with array casting: foreach( (array) $things as $thing ) + $form_fields = array_merge_recursive($form_fields, (array) $args['errors'] ); + + /** This filter is documented in wp-admin/includes/media.php */ + $form_fields = apply_filters( 'attachment_fields_to_edit', $form_fields, $post ); + + unset( $form_fields['image-size'], $form_fields['align'], $form_fields['image_alt'], + $form_fields['post_title'], $form_fields['post_excerpt'], $form_fields['post_content'], + $form_fields['url'], $form_fields['menu_order'], $form_fields['image_url'] ); + + /** This filter is documented in wp-admin/includes/media.php */ + $media_meta = apply_filters( 'media_meta', '', $post ); + + $defaults = array( + 'input' => 'text', + 'required' => false, + 'value' => '', + 'extra_rows' => array(), + 'show_in_edit' => true, + 'show_in_modal' => true, + ); + + $hidden_fields = array(); + + $item = ''; + foreach ( $form_fields as $id => $field ) { + if ( $id[0] == '_' ) + continue; + + $name = "attachments[$attachment_id][$id]"; + $id_attr = "attachments-$attachment_id-$id"; + + if ( !empty( $field['tr'] ) ) { + $item .= $field['tr']; + continue; + } + + $field = array_merge( $defaults, $field ); + + if ( ( ! $field['show_in_edit'] && ! $args['in_modal'] ) || ( ! $field['show_in_modal'] && $args['in_modal'] ) ) + continue; + + if ( $field['input'] == 'hidden' ) { + $hidden_fields[$name] = $field['value']; + continue; + } + + $readonly = ! $user_can_edit && ! empty( $field['taxonomy'] ) ? " readonly='readonly' " : ''; + $required = $field['required'] ? '*' : ''; + $aria_required = $field['required'] ? " aria-required='true' " : ''; + $class = 'compat-field-' . $id; + $class .= $field['required'] ? ' form-required' : ''; + + $item .= "\t\t"; + $item .= "\t\t\t"; + $item .= "\n\t\t\t"; + + if ( !empty( $field[ $field['input'] ] ) ) + $item .= $field[ $field['input'] ]; + elseif ( $field['input'] == 'textarea' ) { + if ( 'post_content' == $id && user_can_richedit() ) { + // sanitize_post() skips the post_content when user_can_richedit + $field['value'] = htmlspecialchars( $field['value'], ENT_QUOTES ); + } + $item .= "'; + } else { + $item .= ""; + } + if ( !empty( $field['helps'] ) ) + $item .= "

" . join( "

\n

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

'; + $item .= "\n\t\t\n"; + + $extra_rows = array(); + + if ( !empty( $field['errors'] ) ) + foreach ( array_unique( (array) $field['errors'] ) as $error ) + $extra_rows['error'][] = $error; + + if ( !empty( $field['extra_rows'] ) ) + foreach ( $field['extra_rows'] as $class => $rows ) + foreach ( (array) $rows as $html ) + $extra_rows[$class][] = $html; + + foreach ( $extra_rows as $class => $rows ) + foreach ( $rows as $html ) + $item .= "\t\t$html\n"; + } + + if ( !empty( $form_fields['_final'] ) ) + $item .= "\t\t{$form_fields['_final']}\n"; + if ( $item ) + $item = '' . $item . '
'; + + foreach ( $hidden_fields as $hidden_field => $value ) { + $item .= '' . "\n"; + } + + if ( $item ) + $item = '' . $item; + + return array( + 'item' => $item, + 'meta' => $media_meta, + ); +} + +/** + * {@internal Missing Short Description}} + * + * @since 2.5.0 + */ +function media_upload_header() { + $post_id = isset( $_REQUEST['post_id'] ) ? intval( $_REQUEST['post_id'] ) : 0; + echo '\n"; + if ( empty( $_GET['chromeless'] ) ) { + echo '
'; + the_media_upload_tabs(); + echo '
'; + } +} + +/** + * {@internal Missing Short Description}} + * + * @since 2.5.0 + * + * @param unknown_type $errors + */ +function media_upload_form( $errors = null ) { + global $type, $tab, $is_IE, $is_opera; + + if ( ! _device_can_upload() ) { + echo '

' . sprintf( __('The web browser on your device cannot be used to upload files. You may be able to use the native app for your device instead.'), 'https://wordpress.org/mobile/' ) . '

'; + return; + } + + $upload_action_url = admin_url('async-upload.php'); + $post_id = isset($_REQUEST['post_id']) ? intval($_REQUEST['post_id']) : 0; + $_type = isset($type) ? $type : ''; + $_tab = isset($tab) ? $tab : ''; + + $upload_size_unit = $max_upload_size = wp_max_upload_size(); + $sizes = array( 'KB', 'MB', 'GB' ); + + for ( $u = -1; $upload_size_unit > 1024 && $u < count( $sizes ) - 1; $u++ ) { + $upload_size_unit /= 1024; + } + + if ( $u < 0 ) { + $upload_size_unit = 0; + $u = 0; + } else { + $upload_size_unit = (int) $upload_size_unit; + } +?> + +
+
get_error_message(); + +?>
+ $post_id, + "_wpnonce" => wp_create_nonce('media-form'), + "type" => $_type, + "tab" => $_tab, + "short" => "1", +); + +/** + * Filter the media upload post parameters. + * + * @since 3.1.0 As 'swfupload_post_params' + * @since 3.3.0 + * + * @param array $post_params An array of media upload parameters used by Plupload. + */ +$post_params = apply_filters( 'upload_post_params', $post_params ); + +$plupload_init = array( + 'runtimes' => 'html5,flash,silverlight,html4', + 'browse_button' => 'plupload-browse-button', + 'container' => 'plupload-upload-ui', + 'drop_element' => 'drag-drop-area', + 'file_data_name' => 'async-upload', + 'url' => $upload_action_url, + 'flash_swf_url' => includes_url( 'js/plupload/plupload.flash.swf' ), + 'silverlight_xap_url' => includes_url( 'js/plupload/plupload.silverlight.xap' ), + 'filters' => array( + 'max_file_size' => $max_upload_size . 'b', + ), + 'multipart_params' => $post_params, +); + +// Multi-file uploading doesn't currently work in iOS Safari, +// single-file allows the built-in camera to be used as source for images +if ( wp_is_mobile() ) + $plupload_init['multi_selection'] = false; + +/** + * Filter the default Plupload settings. + * + * @since 3.3.0 + * + * @param array $plupload_init An array of default settings used by Plupload. + */ +$plupload_init = apply_filters( 'plupload_init', $plupload_init ); + +?> + + + +
+ +
+
+

+

+

+
+
+ +
+ +
+ +

+ + + + +

+
+ +
+ + + + +
+ + + + +

+ + + + +
'.esc_html($id->get_error_message()).'
'; + exit; + } +} +?>
+ +

+ +

+ + + +
+ + + +

+ + + +
+
+ +
+
+
+ + + +
+ + + + + + + | + | + +
+ + + +
+ + + + + + + + +
    + $reals ) + foreach ( $reals as $real ) + if ( isset($num_posts[$_type]) ) + $num_posts[$_type] += $_num_posts[$real]; + else + $num_posts[$_type] = $_num_posts[$real]; +// If available type specified by media button clicked, filter by that type +if ( empty($_GET['post_mime_type']) && !empty($num_posts[$type]) ) { + $_GET['post_mime_type'] = $type; + list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query(); +} +if ( empty($_GET['post_mime_type']) || $_GET['post_mime_type'] == 'all' ) + $class = ' class="current"'; +else + $class = ''; +$type_links[] = "
  • 'all', 'paged'=>false, 'm'=>false))) . "'$class>".__('All Types').""; +foreach ( $post_mime_types as $mime_type => $label ) { + $class = ''; + + if ( !wp_match_mime_types($mime_type, $avail_post_mime_types) ) + continue; + + if ( isset($_GET['post_mime_type']) && wp_match_mime_types($mime_type, $_GET['post_mime_type']) ) + $class = ' class="current"'; + + $type_links[] = "
  • $mime_type, 'paged'=>false))) . "'$class>" . sprintf( translate_nooped_plural( $label[2], $num_posts[$mime_type] ), "" . number_format_i18n( $num_posts[$mime_type] ) . '') . ''; +} +/** + * Filter the media upload mime type list items. + * + * Returned values should begin with an
  • tag. + * + * @since 3.1.0 + * + * @param array $type_links An array of list items containing mime type link HTML. + */ +echo implode(' |
  • ', apply_filters( 'media_upload_mime_type_links', $type_links ) ) . ''; +unset($type_links); +?> +
+ +
+ + add_query_arg( 'paged', '%#%' ), + 'format' => '', + 'prev_text' => __('«'), + 'next_text' => __('»'), + 'total' => ceil($wp_query->found_posts / 10), + 'current' => $q['paged'], +)); + +if ( $page_links ) + echo "
$page_links
"; +?> + +
+posts WHERE post_type = 'attachment' ORDER BY post_date DESC"; + +$arc_result = $wpdb->get_results( $arc_query ); + +$month_count = count($arc_result); +$selected_month = isset( $_GET['m'] ) ? $_GET['m'] : 0; + +if ( $month_count && !( 1 == $month_count && 0 == $arc_result[0]->mmonth ) ) { ?> + + + + + +
+ +
+
+
+ +
+ + + + + + +
+ + +
+

+ + +

+
+ + + + + + +'; + } else { + $caption = ''; + } + + $default_align = get_option('image_default_align'); + if ( empty($default_align) ) + $default_align = 'none'; + + if ( 'image' == $default_view ) { + $view = 'image-only'; + $table_class = ''; + } else { + $view = $table_class = 'not-image'; + } + + return ' +

   

+ + + + + + + + + + + + + + + + + + ' . $caption . ' + + + + + + + + + + + + + + + + + +
+ + * +
+ + * +

' . __('Link text, e.g. “Ransom Demands (PDF)”') . '

+ + +

' . __('Alt text for the image, e.g. “The Mona Lisa”') . '

+ + + + + + + + +
+ +
+ + + +

' . __('Enter a link URL or click above for presets.') . '

+ +
+ ' . get_submit_button( __( 'Insert into Post' ), 'button', 'insertonlybutton', false ) . ' +
+'; + +} + +/** + * Displays the multi-file uploader message. + * + * @since 2.6.0 + */ +function media_upload_flash_bypass() { + $browser_uploader = admin_url( 'media-new.php?browser-uploader' ); + + if ( $post = get_post() ) + $browser_uploader .= '&post_id=' . intval( $post->ID ); + elseif ( ! empty( $GLOBALS['post_ID'] ) ) + $browser_uploader .= '&post_id=' . intval( $GLOBALS['post_ID'] ); + + ?> +

+ browser uploader instead.' ), $browser_uploader, '_blank' ); ?> +

+ +

+ Switch to the multi-file uploader.'); ?> +

+ '; + $end = ''; + } +?> +

+' . sprintf( __( 'Sorry, you have used all of your storage quota of %s MB.' ), get_space_allowed() ) . '

'; +} + +/** + * Displays the image and editor in the post editor + * + * @since 3.5.0 + */ +function edit_form_image_editor( $post ) { + $open = isset( $_GET['image-editor'] ); + if ( $open ) + require_once ABSPATH . 'wp-admin/includes/image-edit.php'; + + $thumb_url = false; + if ( $attachment_id = intval( $post->ID ) ) + $thumb_url = wp_get_attachment_image_src( $attachment_id, array( 900, 450 ), true ); + + $filename = esc_html( basename( $post->guid ) ); + $title = esc_attr( $post->post_title ); + $alt_text = get_post_meta( $post->ID, '_wp_attachment_image_alt', true ); + + $att_url = wp_get_attachment_url( $post->ID ); ?> +
+ ID ) ) : + $image_edit_button = ''; + if ( wp_image_editor_supports( array( 'mime_type' => $post->post_mime_type ) ) ) { + $nonce = wp_create_nonce( "image_editor-$post->ID" ); + $image_edit_button = " "; + } + ?> + +
+ + class="wp_attachment_image" id="media-head-"> +

+

+
+ class="image-editor" id="image-editor-"> + +
+ post_mime_type, 'audio/' ) ): + + wp_maybe_generate_attachment_metadata( $post ); + + echo wp_audio_shortcode( array( 'src' => $att_url ) ); + + elseif ( $attachment_id && 0 === strpos( $post->post_mime_type, 'video/' ) ): + + wp_maybe_generate_attachment_metadata( $post ); + + $meta = wp_get_attachment_metadata( $attachment_id ); + $w = ! empty( $meta['width'] ) ? min( $meta['width'], 640 ) : 0; + $h = ! empty( $meta['height'] ) ? $meta['height'] : 0; + if ( $h && $w < $meta['width'] ) { + $h = round( ( $meta['height'] * $w ) / $meta['width'] ); + } + + $attr = array( 'src' => $att_url ); + if ( ! empty( $w ) && ! empty( $h ) ) { + $attr['width'] = $w; + $attr['height'] = $h; + } + + echo wp_video_shortcode( $attr ); + + endif; ?> + +
+

+
+ +

+ + + post_mime_type, 0, 5 ) ) : ?> +

+
+ +

+ + + 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' ); + $editor_args = array( + 'textarea_name' => 'content', + 'textarea_rows' => 5, + 'media_buttons' => false, + 'tinymce' => false, + 'quicktags' => $quicktags_settings, + ); + ?> + + + post_content, 'attachment_content', $editor_args ); ?> + +
+ ID ); + echo $extras['item']; + echo '' . "\n"; +} + +/** + * Displays non-editable attachment metadata in the publish metabox + * + * @since 3.5.0 + */ +function attachment_submitbox_metadata() { + $post = get_post(); + + $filename = esc_html( wp_basename( $post->guid ) ); + + $media_dims = ''; + $meta = wp_get_attachment_metadata( $post->ID ); + if ( isset( $meta['width'], $meta['height'] ) ) + $media_dims .= "{$meta['width']} × {$meta['height']} "; + /** This filter is documented in wp-admin/includes/media.php */ + $media_dims = apply_filters( 'media_meta', $media_dims, $post ); + + $att_url = wp_get_attachment_url( $post->ID ); +?> +
+ + +
+
+ +
+
+ ID ), $matches ) ) { + echo esc_html( strtoupper( $matches[1] ) ); + list( $mime_type ) = explode( '/', $post->post_mime_type ); + if ( $mime_type !== 'image' && ! empty( $meta['mime_type'] ) ) { + if ( $meta['mime_type'] !== "$mime_type/" . strtolower( $matches[1] ) ) { + echo ' (' . $meta['mime_type'] . ')'; + } + } + } else { + echo strtoupper( str_replace( 'image/', '', $post->post_mime_type ) ); + } + ?> +
+ + ID ); + $file_size = false; + + if ( isset( $meta['filesize'] ) ) + $file_size = $meta['filesize']; + elseif ( file_exists( $file ) ) + $file_size = filesize( $file ); + + if ( ! empty( $file_size ) ) : ?> +
+ +
+ post_mime_type ) ) { + + /** + * Filter the audio and video metadata fields to be shown in the publish meta box. + * + * The key for each item in the array should correspond to an attachment + * metadata key, and the value should be the desired label. + * + * @since 3.7.0 + * + * @param array $fields An array of the attachment metadata keys and labels. + */ + $fields = apply_filters( 'media_submitbox_misc_sections', array( + 'length_formatted' => __( 'Length:' ), + 'bitrate' => __( 'Bitrate:' ), + ) ); + + foreach ( $fields as $key => $label ) { + if ( empty( $meta[ $key ] ) ) { + continue; + } + ?> +
+ +
+ __( 'Audio Format:' ), + 'codec' => __( 'Audio Codec:' ) + ) ); + + foreach ( $audio_fields as $key => $label ) { + if ( empty( $meta['audio'][ $key ] ) ) { + continue; + } + ?> +
+ +
+ +
+ +
+ $list ) { + if ( ! empty( $list ) ) { + $metadata[$key] = reset( $list ); + // fix bug in byte stream analysis + if ( 'terms_of_use' === $key && 0 === strpos( $metadata[$key], 'yright notice.' ) ) + $metadata[$key] = 'Cop' . $metadata[$key]; + } + } + break; + } + } + + if ( ! empty( $data['id3v2']['APIC'] ) ) { + $image = reset( $data['id3v2']['APIC']); + if ( ! empty( $image['data'] ) ) { + $metadata['image'] = array( + 'data' => $image['data'], + 'mime' => $image['image_mime'], + 'width' => $image['image_width'], + 'height' => $image['image_height'] + ); + } + } elseif ( ! empty( $data['comments']['picture'] ) ) { + $image = reset( $data['comments']['picture'] ); + if ( ! empty( $image['data'] ) ) { + $metadata['image'] = array( + 'data' => $image['data'], + 'mime' => $image['image_mime'] + ); + } + } +} + +/** + * Retrieve metadata from a video file's ID3 tags + * + * @since 3.6.0 + * + * @param string $file Path to file. + * @return array|boolean Returns array of metadata, if found. + */ +function wp_read_video_metadata( $file ) { + if ( ! file_exists( $file ) ) + return false; + + $metadata = array(); + + if ( ! class_exists( 'getID3' ) ) + require( ABSPATH . WPINC . '/ID3/getid3.php' ); + $id3 = new getID3(); + $data = $id3->analyze( $file ); + + if ( isset( $data['video']['lossless'] ) ) + $metadata['lossless'] = $data['video']['lossless']; + if ( ! empty( $data['video']['bitrate'] ) ) + $metadata['bitrate'] = (int) $data['video']['bitrate']; + if ( ! empty( $data['video']['bitrate_mode'] ) ) + $metadata['bitrate_mode'] = $data['video']['bitrate_mode']; + if ( ! empty( $data['filesize'] ) ) + $metadata['filesize'] = (int) $data['filesize']; + if ( ! empty( $data['mime_type'] ) ) + $metadata['mime_type'] = $data['mime_type']; + if ( ! empty( $data['playtime_seconds'] ) ) + $metadata['length'] = (int) ceil( $data['playtime_seconds'] ); + if ( ! empty( $data['playtime_string'] ) ) + $metadata['length_formatted'] = $data['playtime_string']; + if ( ! empty( $data['video']['resolution_x'] ) ) + $metadata['width'] = (int) $data['video']['resolution_x']; + if ( ! empty( $data['video']['resolution_y'] ) ) + $metadata['height'] = (int) $data['video']['resolution_y']; + if ( ! empty( $data['fileformat'] ) ) + $metadata['fileformat'] = $data['fileformat']; + if ( ! empty( $data['video']['dataformat'] ) ) + $metadata['dataformat'] = $data['video']['dataformat']; + if ( ! empty( $data['video']['encoder'] ) ) + $metadata['encoder'] = $data['video']['encoder']; + if ( ! empty( $data['video']['codec'] ) ) + $metadata['codec'] = $data['video']['codec']; + + if ( ! empty( $data['audio'] ) ) { + unset( $data['audio']['streams'] ); + $metadata['audio'] = $data['audio']; + } + + wp_add_id3_tag_data( $metadata, $data ); + + return $metadata; +} + +/** + * Retrieve metadata from a audio file's ID3 tags + * + * @since 3.6.0 + * + * @param string $file Path to file. + * @return array|boolean Returns array of metadata, if found. + */ +function wp_read_audio_metadata( $file ) { + if ( ! file_exists( $file ) ) + return false; + $metadata = array(); + + if ( ! class_exists( 'getID3' ) ) + require( ABSPATH . WPINC . '/ID3/getid3.php' ); + $id3 = new getID3(); + $data = $id3->analyze( $file ); + + if ( ! empty( $data['audio'] ) ) { + unset( $data['audio']['streams'] ); + $metadata = $data['audio']; + } + + if ( ! empty( $data['fileformat'] ) ) + $metadata['fileformat'] = $data['fileformat']; + if ( ! empty( $data['filesize'] ) ) + $metadata['filesize'] = (int) $data['filesize']; + if ( ! empty( $data['mime_type'] ) ) + $metadata['mime_type'] = $data['mime_type']; + if ( ! empty( $data['playtime_seconds'] ) ) + $metadata['length'] = (int) ceil( $data['playtime_seconds'] ); + if ( ! empty( $data['playtime_string'] ) ) + $metadata['length_formatted'] = $data['playtime_string']; + + wp_add_id3_tag_data( $metadata, $data ); + + return $metadata; +} diff --git a/wp-admin/includes/menu.php b/wp-admin/includes/menu.php new file mode 100644 index 0000000..6835091 --- /dev/null +++ b/wp-admin/includes/menu.php @@ -0,0 +1,323 @@ + $sub) { + foreach ($sub as $index => $data) { + if ( ! current_user_can($data[1]) ) { + unset(${$sub_loop}[$parent][$index]); + $_wp_submenu_nopriv[$parent][$data[2]] = true; + } + } + unset($index, $data); + + if ( empty(${$sub_loop}[$parent]) ) + unset(${$sub_loop}[$parent]); + } + unset($sub, $parent); +} +unset($sub_loop); + +/* + * Loop over the top-level menu. + * Menus for which the original parent is not accessible due to lack of privileges + * will have the next submenu in line be assigned as the new menu parent. + */ +foreach ( $menu as $id => $data ) { + if ( empty($submenu[$data[2]]) ) + continue; + $subs = $submenu[$data[2]]; + $first_sub = array_shift($subs); + $old_parent = $data[2]; + $new_parent = $first_sub[2]; + // If the first submenu is not the same as the assigned parent, + // make the first submenu the new parent. + if ( $new_parent != $old_parent ) { + $_wp_real_parent_file[$old_parent] = $new_parent; + $menu[$id][2] = $new_parent; + + foreach ($submenu[$old_parent] as $index => $data) { + $submenu[$new_parent][$index] = $submenu[$old_parent][$index]; + unset($submenu[$old_parent][$index]); + } + unset($submenu[$old_parent], $index); + + if ( isset($_wp_submenu_nopriv[$old_parent]) ) + $_wp_submenu_nopriv[$new_parent] = $_wp_submenu_nopriv[$old_parent]; + } +} +unset($id, $data, $subs, $first_sub, $old_parent, $new_parent); + +if ( is_network_admin() ) { + + /** + * Fires before the administration menu loads in the Network Admin. + * + * @since 3.1.0 + * + * @param string $context Empty context. + */ + do_action( 'network_admin_menu', '' ); +} elseif ( is_user_admin() ) { + + /** + * Fires before the administration menu loads in the User Admin. + * + * @since 3.1.0 + * + * @param string $context Empty context. + */ + do_action( 'user_admin_menu', '' ); +} else { + + /** + * Fires before the administration menu loads in the admin. + * + * @since 1.5.0 + * + * @param string $context Empty context. + */ + do_action( 'admin_menu', '' ); +} + +/* + * Remove menus that have no accessible submenus and require privileges + * that the user does not have. Run re-parent loop again. + */ +foreach ( $menu as $id => $data ) { + if ( ! current_user_can($data[1]) ) + $_wp_menu_nopriv[$data[2]] = true; + + /* + * If there is only one submenu and it is has same destination as the parent, + * remove the submenu. + */ + if ( ! empty( $submenu[$data[2]] ) && 1 == count ( $submenu[$data[2]] ) ) { + $subs = $submenu[$data[2]]; + $first_sub = array_shift($subs); + if ( $data[2] == $first_sub[2] ) + unset( $submenu[$data[2]] ); + } + + // If submenu is empty... + if ( empty($submenu[$data[2]]) ) { + // And user doesn't have privs, remove menu. + if ( isset( $_wp_menu_nopriv[$data[2]] ) ) { + unset($menu[$id]); + } + } +} +unset($id, $data, $subs, $first_sub); + +// Remove any duplicated separators +$separator_found = false; +foreach ( $menu as $id => $data ) { + if ( 0 == strcmp('wp-menu-separator', $data[4] ) ) { + if (false == $separator_found) { + $separator_found = true; + } else { + unset($menu[$id]); + $separator_found = false; + } + } else { + $separator_found = false; + } +} +unset($id, $data); + +function add_cssclass($add, $class) { + $class = empty($class) ? $add : $class .= ' ' . $add; + return $class; +} + +function add_menu_classes($menu) { + + $first = $lastorder = false; + $i = 0; + $mc = count($menu); + foreach ( $menu as $order => $top ) { + $i++; + + if ( 0 == $order ) { // dashboard is always shown/single + $menu[0][4] = add_cssclass('menu-top-first', $top[4]); + $lastorder = 0; + continue; + } + + if ( 0 === strpos($top[2], 'separator') && false !== $lastorder ) { // if separator + $first = true; + $c = $menu[$lastorder][4]; + $menu[$lastorder][4] = add_cssclass('menu-top-last', $c); + continue; + } + + if ( $first ) { + $c = $menu[$order][4]; + $menu[$order][4] = add_cssclass('menu-top-first', $c); + $first = false; + } + + if ( $mc == $i ) { // last item + $c = $menu[$order][4]; + $menu[$order][4] = add_cssclass('menu-top-last', $c); + } + + $lastorder = $order; + } + + /** + * Filter administration menus array with classes added for top-level items. + * + * @since 2.7.0 + * + * @param array $menu Associative array of administration menu items. + */ + return apply_filters( 'add_menu_classes', $menu ); +} + +uksort($menu, "strnatcasecmp"); // make it all pretty + +/** + * Filter whether to enable custom ordering of the administration menu. + * + * See the 'menu_order' filter for reordering menu items. + * + * @since 2.8.0 + * + * @param bool $custom Whether custom ordering is enabled. Default false. + */ +if ( apply_filters( 'custom_menu_order', false ) ) { + $menu_order = array(); + foreach ( $menu as $menu_item ) { + $menu_order[] = $menu_item[2]; + } + unset($menu_item); + $default_menu_order = $menu_order; + + /** + * Filter the order of administration menu items. + * + * A truthy value must first be passed to the 'custom_menu_order' filter + * for this filter to work. Use the following to enable custom menu ordering: + * + * add_filter( 'custom_menu_order', '__return_true' ); + * + * @since 2.8.0 + * + * @param array $menu_order An ordered array of menu items. + */ + $menu_order = apply_filters( 'menu_order', $menu_order ); + $menu_order = array_flip($menu_order); + $default_menu_order = array_flip($default_menu_order); + + function sort_menu($a, $b) { + global $menu_order, $default_menu_order; + $a = $a[2]; + $b = $b[2]; + if ( isset($menu_order[$a]) && !isset($menu_order[$b]) ) { + return -1; + } elseif ( !isset($menu_order[$a]) && isset($menu_order[$b]) ) { + return 1; + } elseif ( isset($menu_order[$a]) && isset($menu_order[$b]) ) { + if ( $menu_order[$a] == $menu_order[$b] ) + return 0; + return ($menu_order[$a] < $menu_order[$b]) ? -1 : 1; + } else { + return ($default_menu_order[$a] <= $default_menu_order[$b]) ? -1 : 1; + } + } + + usort($menu, 'sort_menu'); + unset($menu_order, $default_menu_order); +} + +// Remove the last menu item if it is a separator. +$last_menu_key = array_keys( $menu ); +$last_menu_key = array_pop( $last_menu_key ); +if ( !empty( $menu ) && 'wp-menu-separator' == $menu[ $last_menu_key ][ 4 ] ) + unset( $menu[ $last_menu_key ] ); +unset( $last_menu_key ); + +if ( !user_can_access_admin_page() ) { + + /** + * Fires when access to an admin page is denied. + * + * @since 2.5.0 + */ + do_action( 'admin_page_access_denied' ); + + wp_die( __('You do not have sufficient permissions to access this page.') ); +} + +$menu = add_menu_classes($menu); diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php new file mode 100644 index 0000000..9f7f469 --- /dev/null +++ b/wp-admin/includes/meta-boxes.php @@ -0,0 +1,1085 @@ +post_type; + $post_type_object = get_post_type_object($post_type); + $can_publish = current_user_can($post_type_object->cap->publish_posts); +?> +
+ +
+ + +
+ +
+ +
+
+post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?> +post_status ) { ?>style="display:none" type="submit" name="save" id="save-post" value="" class="button" /> +post_status && $can_publish ) { ?> + + + +
+public ) : ?> +
+post_status ) { + $preview_link = esc_url( get_permalink( $post->ID ) ); + $preview_button = __( 'Preview Changes' ); +} else { + $preview_link = set_url_scheme( get_permalink( $post->ID ) ); + /** + * Filter the URI of a post preview in the post submit box. + * + * @since 2.0.5 + * + * @param string $preview_link URI the user will be directed to for a post preview. + */ + $preview_link = esc_url( apply_filters( 'preview_post_link', add_query_arg( 'preview', 'true', $preview_link ) ) ); + $preview_button = __( 'Preview' ); +} +?> + + +
+ +
+
+ +
+ +
+ +post_status ) { + case 'private': + _e('Privately Published'); + break; + case 'publish': + _e('Published'); + break; + case 'future': + _e('Scheduled'); + break; + case 'pending': + _e('Pending Review'); + break; + case 'draft': + case 'auto-draft': + _e('Draft'); + break; +} +?> + +post_status || 'private' == $post->post_status || $can_publish ) { ?> +post_status ) { ?>style="display:none;" class="edit-post-status hide-if-no-js"> + +
+ + + + +
+ + +
+ +
+ post_status ) { + $post->post_password = ''; + $visibility = 'private'; + $visibility_trans = __('Private'); +} elseif ( !empty( $post->post_password ) ) { + $visibility = 'password'; + $visibility_trans = __('Password protected'); +} elseif ( $post_type == 'post' && is_sticky( $post->ID ) ) { + $visibility = 'public'; + $visibility_trans = __('Public, Sticky'); +} else { + $visibility = 'public'; + $visibility_trans = __('Public'); +} + +echo esc_html( $visibility_trans ); ?> + + + +
+ + +ID)); ?> /> + + + />
+ +ID ) ); ?> />
+ + />
+
+ />
+ +

+ + +

+
+ + +
+ +ID ) { + if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date + $stamp = __('Scheduled for: %1$s'); + } else if ( 'publish' == $post->post_status || 'private' == $post->post_status ) { // already published + $stamp = __('Published on: %1$s'); + } else if ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified + $stamp = __('Publish immediately'); + } else if ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // draft, 1 or more saves, future date specified + $stamp = __('Schedule for: %1$s'); + } else { // draft, 1 or more saves, date specified + $stamp = __('Publish on: %1$s'); + } + $date = date_i18n( $datef, strtotime( $post->post_date ) ); +} else { // draft (no saves, and thus no date specified) + $stamp = __('Publish immediately'); + $date = date_i18n( $datef, strtotime( current_time('mysql') ) ); +} + +if ( ! empty( $args['args']['revisions_count'] ) ) : + $revisions_to_keep = wp_revisions_to_keep( $post ); +?> +
+ 0 && $revisions_to_keep <= $args['args']['revisions_count'] ) { + echo ''; + printf( __( 'Revisions: %s' ), '' . number_format_i18n( $args['args']['revisions_count'] ) . '+' ); + echo ''; + } else { + printf( __( 'Revisions: %s' ), '' . number_format_i18n( $args['args']['revisions_count'] ) . '' ); + } +?> + +
+ +
+ + + +
+
+ + + +
+
+
+ +
+ +
+ID ) ) { + if ( !EMPTY_TRASH_DAYS ) + $delete_text = __('Delete Permanently'); + else + $delete_text = __('Move to Trash'); + ?> + +
+ +
+ +post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) { + if ( $can_publish ) : + if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?> + + 'p' ) ); ?> + + + 'p' ) ); ?> + + + 'p' ) ); ?> + + + + +
+
+
+
+ +post_type; + $post_type_object = get_post_type_object($post_type); + $can_publish = current_user_can($post_type_object->cap->publish_posts); +?> +
+ +
+ + +
+ +
+ + +
+ %1$s'); + $date = date_i18n( $datef, strtotime( $post->post_date ) ); + ?> +
+ +
+ + +
+
+
+ +
+
+ ID ) ) + if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) { + echo "" . __( 'Trash' ) . ""; + } else { + $delete_ays = ! MEDIA_TRASH ? " onclick='return showNotice.warn();'" : ''; + echo "" . __( 'Delete Permanently' ) . ""; + } + ?> +
+ +
+ + + +
+
+
+ +
+ +post_type, 'post-formats' ) ) : + $post_formats = get_theme_support( 'post-formats' ); + + if ( is_array( $post_formats[0] ) ) : + $post_format = get_post_format( $post->ID ); + if ( !$post_format ) + $post_format = '0'; + // Add in the current one if it isn't there yet, in case the current theme doesn't support it + if ( $post_format && !in_array( $post_format, $post_formats[0] ) ) + $post_formats[0][] = $post_format; + ?> +
+ /> + +
/> +
+
+ 'post_tag'); + if ( !isset($box['args']) || !is_array($box['args']) ) + $args = array(); + else + $args = $box['args']; + extract( wp_parse_args($args, $defaults), EXTR_SKIP ); + $tax_name = esc_attr($taxonomy); + $taxonomy = get_taxonomy($taxonomy); + $user_can_assign_terms = current_user_can( $taxonomy->cap->assign_terms ); + $comma = _x( ',', 'tag delimiter' ); +?> +
+
+
+

labels->add_or_remove_items; ?>

+
+ +
+ +
labels->add_new_item; ?>
+

+

+
+

labels->separate_items_with_commas; ?>

+ +
+
+
+ +

labels->choose_from_most_used; ?>

+ + 'category'); + if ( !isset($box['args']) || !is_array($box['args']) ) + $args = array(); + else + $args = $box['args']; + extract( wp_parse_args($args, $defaults), EXTR_SKIP ); + $tax = get_taxonomy($taxonomy); + + ?> +
+ + + + +
+ "; // Allows for an empty term set to be sent. 0 is an invalid Term ID and will be ignored by empty() checks. + ?> +
    + ID, array( 'taxonomy' => $taxonomy, 'popular_cats' => $popular_ids ) ) ?> +
+
+ cap->edit_terms) ) : ?> +
+

+ + labels->add_new_item ); + ?> + +

+

+ + + + $taxonomy, 'hide_empty' => 0, 'name' => 'new'.$taxonomy.'_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => '— ' . $tax->labels->parent_item . ' —' ) ); ?> + + + +

+
+ +
+ + +

Learn more about manual excerpts.'); ?>

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

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

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


()

+

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

+ +
+
+ID); +foreach ( $metadata as $key => $value ) { + if ( is_protected_meta( $metadata[ $key ][ 'meta_key' ], 'post' ) || ! current_user_can( 'edit_post_meta', $post->ID, $metadata[ $key ][ 'meta_key' ] ) ) + unset( $metadata[ $key ] ); +} +list_meta( $metadata ); +meta_form( $post ); ?> +
+

use in your theme.'); ?>

+ + +

+
+ + +

+ +

+ $post->ID, 'number' => 1, 'count' => true ) ); + $wp_list_table = _get_list_table('WP_Post_Comments_List_Table'); + $wp_list_table->display( true ); + + if ( 1 > $total ) { + echo '

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

'; + } else { + $hidden = get_hidden_meta_boxes( get_current_screen() ); + if ( ! in_array('commentsdiv', $hidden) ) { + ?> + + +

+ + + + + 'authors', + 'name' => 'post_author_override', + 'selected' => empty($post->ID) ? $user_ID : $post->post_author, + 'include_selected' => true + ) ); +} + +/** + * Display list of revisions. + * + * @since 2.6.0 + * + * @param object $post + */ +function post_revisions_meta_box( $post ) { + wp_list_post_revisions( $post ); +} + +// -- Page related Meta Boxes + +/** + * Display page attributes form fields. + * + * @since 2.7.0 + * + * @param object $post + */ +function page_attributes_meta_box($post) { + $post_type_object = get_post_type_object($post->post_type); + if ( $post_type_object->hierarchical ) { + $dropdown_args = array( + 'post_type' => $post->post_type, + 'exclude_tree' => $post->ID, + 'selected' => $post->post_parent, + 'name' => 'parent_id', + 'show_option_none' => __('(no parent)'), + 'sort_column' => 'menu_order, post_title', + 'echo' => 0, + ); + + /** + * Filter the arguments used to generate a Pages drop-down element. + * + * @since 3.3.0 + * + * @see wp_dropdown_pages() + * + * @param array $dropdown_args Array of arguments used to generate the pages drop-down. + * @param WP_Post $post The current WP_Post object. + */ + $dropdown_args = apply_filters( 'page_attributes_dropdown_pages_args', $dropdown_args, $post ); + $pages = wp_dropdown_pages( $dropdown_args ); + if ( ! empty($pages) ) { +?> +

+ + +post_type && 0 != count( get_page_templates( $post ) ) ) { + $template = !empty($post->page_template) ? $post->page_template : false; + ?> +

+ + +

+

+

post_type ) _e( 'Need help? Use the Help tab in the upper right of your screen.' ); ?>

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

+ +
+
+ +
+

+

+

+
+

+link_rel ) ? $link->link_rel : ''; // In PHP 5.3: $link_rel = $link->link_rel ?: ''; + $rels = preg_split('/\s+/', $link_rel); + + if ('' != $value && in_array($value, $rels) ) { + echo ' checked="checked"'; + } + + if ('' == $value) { + if ('family' == $class && strpos($link_rel, 'child') === false && strpos($link_rel, 'parent') === false && strpos($link_rel, 'sibling') === false && strpos($link_rel, 'spouse') === false && strpos($link_rel, 'kin') === false) echo ' checked="checked"'; + if ('friendship' == $class && strpos($link_rel, 'friend') === false && strpos($link_rel, 'acquaintance') === false && strpos($link_rel, 'contact') === false) echo ' checked="checked"'; + if ('geographical' == $class && strpos($link_rel, 'co-resident') === false && strpos($link_rel, 'neighbor') === false) echo ' checked="checked"'; + if ('identity' == $class && in_array('me', $rels) ) echo ' checked="checked"'; + } +} + +/** + * Display xfn form fields. + * + * @since 2.6.0 + * + * @param object $link + */ +function link_xfn_meta_box($link) { +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

XFN.'); ?>

+ + + + + + + + + + + + + + + + + + + +ID, '_thumbnail_id', true ); + echo _wp_post_thumbnail_html( $thumbnail_id, $post->ID ); +} + +/** + * Display fields for ID3 data + * + * @since 3.9.0 + * + * @param WP_Post $post + */ +function attachment_id3_data_meta_box( $post ) { + $meta = array(); + if ( ! empty( $post->ID ) ) { + $meta = wp_get_attachment_metadata( $post->ID ); + } + + foreach ( wp_get_attachment_id3_keys( $post, 'edit' ) as $key => $label ) : ?> +

+
+ +

+ $markerline ) { + if (strpos($markerline, '# BEGIN ' . $marker) !== false) + $state = false; + if ( $state ) { + if ( $n + 1 < count( $markerdata ) ) + fwrite( $f, "{$markerline}\n" ); + else + fwrite( $f, "{$markerline}" ); + } + if (strpos($markerline, '# END ' . $marker) !== false) { + fwrite( $f, "# BEGIN {$marker}\n" ); + if ( is_array( $insertion )) + foreach ( $insertion as $insertline ) + fwrite( $f, "{$insertline}\n" ); + fwrite( $f, "# END {$marker}\n" ); + $state = true; + $foundit = true; + } + } + } + if (!$foundit) { + fwrite( $f, "\n# BEGIN {$marker}\n" ); + foreach ( $insertion as $insertline ) + fwrite( $f, "{$insertline}\n" ); + fwrite( $f, "# END {$marker}\n" ); + } + fclose( $f ); + return true; + } else { + return false; + } +} + +/** + * Updates the htaccess file with the current rules if it is writable. + * + * Always writes to the file if it exists and is writable to ensure that we + * blank out old rules. + * + * @since 1.5.0 + */ +function save_mod_rewrite_rules() { + if ( is_multisite() ) + return; + + global $wp_rewrite; + + $home_path = get_home_path(); + $htaccess_file = $home_path.'.htaccess'; + + // If the file doesn't already exist check for write access to the directory and whether we have some rules. + // else check for write access to the file. + if ((!file_exists($htaccess_file) && is_writable($home_path) && $wp_rewrite->using_mod_rewrite_permalinks()) || is_writable($htaccess_file)) { + if ( got_mod_rewrite() ) { + $rules = explode( "\n", $wp_rewrite->mod_rewrite_rules() ); + return insert_with_markers( $htaccess_file, 'WordPress', $rules ); + } + } + + return false; +} + +/** + * Updates the IIS web.config file with the current rules if it is writable. + * If the permalinks do not require rewrite rules then the rules are deleted from the web.config file. + * + * @since 2.8.0 + * + * @return bool True if web.config was updated successfully + */ +function iis7_save_url_rewrite_rules(){ + if ( is_multisite() ) + return; + + global $wp_rewrite; + + $home_path = get_home_path(); + $web_config_file = $home_path . 'web.config'; + + // Using win_is_writable() instead of is_writable() because of a bug in Windows PHP + if ( iis7_supports_permalinks() && ( ( ! file_exists($web_config_file) && win_is_writable($home_path) && $wp_rewrite->using_mod_rewrite_permalinks() ) || win_is_writable($web_config_file) ) ) { + $rule = $wp_rewrite->iis7_url_rewrite_rules(false, '', ''); + if ( ! empty($rule) ) { + return iis7_add_rewrite_rule($web_config_file, $rule); + } else { + return iis7_delete_rewrite_rule($web_config_file); + } + } + return false; +} + +/** + * {@internal Missing Short Description}} + * + * @since 1.5.0 + * + * @param unknown_type $file + */ +function update_recently_edited( $file ) { + $oldfiles = (array ) get_option( 'recently_edited' ); + if ( $oldfiles ) { + $oldfiles = array_reverse( $oldfiles ); + $oldfiles[] = $file; + $oldfiles = array_reverse( $oldfiles ); + $oldfiles = array_unique( $oldfiles ); + if ( 5 < count( $oldfiles )) + array_pop( $oldfiles ); + } else { + $oldfiles[] = $file; + } + update_option( 'recently_edited', $oldfiles ); +} + +/** + * If siteurl, home or page_on_front changed, flush rewrite rules. + * + * @since 2.1.0 + * + * @param string $old_value + * @param string $value + */ +function update_home_siteurl( $old_value, $value ) { + if ( defined( "WP_INSTALLING" ) ) + return; + + // If home changed, write rewrite rules to new location. + flush_rewrite_rules(); +} + +add_action( 'update_option_home', 'update_home_siteurl', 10, 2 ); +add_action( 'update_option_siteurl', 'update_home_siteurl', 10, 2 ); +add_action( 'update_option_page_on_front', 'update_home_siteurl', 10, 2 ); + +/** + * Shorten an URL, to be used as link text + * + * @since 1.2.0 + * + * @param string $url + * @return string + */ +function url_shorten( $url ) { + $short_url = str_replace( array( 'http://', 'www.' ), '', $url ); + $short_url = untrailingslashit( $short_url ); + if ( strlen( $short_url ) > 35 ) + $short_url = substr( $short_url, 0, 32 ) . '…'; + return $short_url; +} + +/** + * Resets global variables based on $_GET and $_POST + * + * This function resets global variables based on the names passed + * in the $vars array to the value of $_POST[$var] or $_GET[$var] or '' + * if neither is defined. + * + * @since 2.0.0 + * + * @param array $vars An array of globals to reset. + */ +function wp_reset_vars( $vars ) { + for ( $i=0; $iget_error_data() && is_string( $message->get_error_data() ) ) + $message = $message->get_error_message() . ': ' . $message->get_error_data(); + else + $message = $message->get_error_message(); + } + echo "

$message

\n"; + wp_ob_end_flush_all(); + flush(); +} + +function wp_doc_link_parse( $content ) { + if ( !is_string( $content ) || empty( $content ) ) + return array(); + + if ( !function_exists('token_get_all') ) + return array(); + + $tokens = token_get_all( $content ); + $count = count( $tokens ); + $functions = array(); + $ignore_functions = array(); + for ( $t = 0; $t < $count - 2; $t++ ) { + if ( ! is_array( $tokens[ $t ] ) ) { + continue; + } + + if ( T_STRING == $tokens[ $t ][0] && ( '(' == $tokens[ $t + 1 ] || '(' == $tokens[ $t + 2 ] ) ) { + // If it's a function or class defined locally, there's not going to be any docs available + if ( ( isset( $tokens[ $t - 2 ][1] ) && in_array( $tokens[ $t - 2 ][1], array( 'function', 'class' ) ) ) || ( isset( $tokens[ $t - 2 ][0] ) && T_OBJECT_OPERATOR == $tokens[ $t - 1 ][0] ) ) { + $ignore_functions[] = $tokens[$t][1]; + } + // Add this to our stack of unique references + $functions[] = $tokens[$t][1]; + } + } + + $functions = array_unique( $functions ); + sort( $functions ); + + /** + * Filter the list of functions/classes to be ignored from the documentation lookup. + * + * @since 2.8.0 + * + * @param array $ignore_functions Functions/Classes to be ignored. + */ + $ignore_functions = apply_filters( 'documentation_ignore_functions', $ignore_functions ); + + $ignore_functions = array_unique( $ignore_functions ); + + $out = array(); + foreach ( $functions as $function ) { + if ( in_array( $function, $ignore_functions ) ) + continue; + $out[] = $function; + } + + return $out; +} + +/** + * Saves option for number of rows when listing posts, pages, comments, etc. + * + * @since 2.8.0 + */ +function set_screen_options() { + + if ( isset($_POST['wp_screen_options']) && is_array($_POST['wp_screen_options']) ) { + check_admin_referer( 'screen-options-nonce', 'screenoptionnonce' ); + + if ( !$user = wp_get_current_user() ) + return; + $option = $_POST['wp_screen_options']['option']; + $value = $_POST['wp_screen_options']['value']; + + if ( $option != sanitize_key( $option ) ) + return; + + $map_option = $option; + $type = str_replace('edit_', '', $map_option); + $type = str_replace('_per_page', '', $type); + if ( in_array( $type, get_taxonomies() ) ) + $map_option = 'edit_tags_per_page'; + elseif ( in_array( $type, get_post_types() ) ) + $map_option = 'edit_per_page'; + else + $option = str_replace('-', '_', $option); + + switch ( $map_option ) { + case 'edit_per_page': + case 'users_per_page': + case 'edit_comments_per_page': + case 'upload_per_page': + case 'edit_tags_per_page': + case 'plugins_per_page': + // Network admin + case 'sites_network_per_page': + case 'users_network_per_page': + case 'site_users_network_per_page': + case 'plugins_network_per_page': + case 'themes_network_per_page': + case 'site_themes_network_per_page': + $value = (int) $value; + if ( $value < 1 || $value > 999 ) + return; + break; + default: + + /** + * Filter a screen option value before it is set. + * + * The filter can also be used to modify non-standard [items]_per_page + * settings. See the parent function for a full list of standard options. + * + * Returning false to the filter will skip saving the current option. + * + * @since 2.8.0 + * + * @see set_screen_options() + * + * @param bool|int $value Screen option value. Default false to skip. + * @param string $option The option name. + * @param int $value The number of rows to use. + */ + $value = apply_filters( 'set-screen-option', false, $option, $value ); + + if ( false === $value ) + return; + break; + } + + update_user_meta($user->ID, $option, $value); + wp_safe_redirect( remove_query_arg( array('pagenum', 'apage', 'paged'), wp_get_referer() ) ); + exit; + } +} + +/** + * Check if rewrite rule for WordPress already exists in the IIS 7+ configuration file + * + * @since 2.8.0 + * + * @return bool + * @param string $filename The file path to the configuration file + */ +function iis7_rewrite_rule_exists($filename) { + if ( ! file_exists($filename) ) + return false; + if ( ! class_exists('DOMDocument') ) + return false; + + $doc = new DOMDocument(); + if ( $doc->load($filename) === false ) + return false; + $xpath = new DOMXPath($doc); + $rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')]'); + if ( $rules->length == 0 ) + return false; + else + return true; +} + +/** + * Delete WordPress rewrite rule from web.config file if it exists there + * + * @since 2.8.0 + * + * @param string $filename Name of the configuration file + * @return bool + */ +function iis7_delete_rewrite_rule($filename) { + // If configuration file does not exist then rules also do not exist so there is nothing to delete + if ( ! file_exists($filename) ) + return true; + + if ( ! class_exists('DOMDocument') ) + return false; + + $doc = new DOMDocument(); + $doc->preserveWhiteSpace = false; + + if ( $doc -> load($filename) === false ) + return false; + $xpath = new DOMXPath($doc); + $rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')]'); + if ( $rules->length > 0 ) { + $child = $rules->item(0); + $parent = $child->parentNode; + $parent->removeChild($child); + $doc->formatOutput = true; + saveDomDocument($doc, $filename); + } + return true; +} + +/** + * Add WordPress rewrite rule to the IIS 7+ configuration file. + * + * @since 2.8.0 + * + * @param string $filename The file path to the configuration file + * @param string $rewrite_rule The XML fragment with URL Rewrite rule + * @return bool + */ +function iis7_add_rewrite_rule($filename, $rewrite_rule) { + if ( ! class_exists('DOMDocument') ) + return false; + + // If configuration file does not exist then we create one. + if ( ! file_exists($filename) ) { + $fp = fopen( $filename, 'w'); + fwrite($fp, ''); + fclose($fp); + } + + $doc = new DOMDocument(); + $doc->preserveWhiteSpace = false; + + if ( $doc->load($filename) === false ) + return false; + + $xpath = new DOMXPath($doc); + + // First check if the rule already exists as in that case there is no need to re-add it + $wordpress_rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')]'); + if ( $wordpress_rules->length > 0 ) + return true; + + // Check the XPath to the rewrite rule and create XML nodes if they do not exist + $xmlnodes = $xpath->query('/configuration/system.webServer/rewrite/rules'); + if ( $xmlnodes->length > 0 ) { + $rules_node = $xmlnodes->item(0); + } else { + $rules_node = $doc->createElement('rules'); + + $xmlnodes = $xpath->query('/configuration/system.webServer/rewrite'); + if ( $xmlnodes->length > 0 ) { + $rewrite_node = $xmlnodes->item(0); + $rewrite_node->appendChild($rules_node); + } else { + $rewrite_node = $doc->createElement('rewrite'); + $rewrite_node->appendChild($rules_node); + + $xmlnodes = $xpath->query('/configuration/system.webServer'); + if ( $xmlnodes->length > 0 ) { + $system_webServer_node = $xmlnodes->item(0); + $system_webServer_node->appendChild($rewrite_node); + } else { + $system_webServer_node = $doc->createElement('system.webServer'); + $system_webServer_node->appendChild($rewrite_node); + + $xmlnodes = $xpath->query('/configuration'); + if ( $xmlnodes->length > 0 ) { + $config_node = $xmlnodes->item(0); + $config_node->appendChild($system_webServer_node); + } else { + $config_node = $doc->createElement('configuration'); + $doc->appendChild($config_node); + $config_node->appendChild($system_webServer_node); + } + } + } + } + + $rule_fragment = $doc->createDocumentFragment(); + $rule_fragment->appendXML($rewrite_rule); + $rules_node->appendChild($rule_fragment); + + $doc->encoding = "UTF-8"; + $doc->formatOutput = true; + saveDomDocument($doc, $filename); + + return true; +} + +/** + * Saves the XML document into a file + * + * @since 2.8.0 + * + * @param DOMDocument $doc + * @param string $filename + */ +function saveDomDocument($doc, $filename) { + $config = $doc->saveXML(); + $config = preg_replace("/([^\r])\n/", "$1\r\n", $config); + $fp = fopen($filename, 'w'); + fwrite($fp, $config); + fclose($fp); +} + +/** + * Display the default admin color scheme picker (Used in user-edit.php) + * + * @since 3.0.0 + */ +function admin_color_scheme_picker( $user_id ) { + global $_wp_admin_css_colors; + + ksort( $_wp_admin_css_colors ); + + if ( isset( $_wp_admin_css_colors['fresh'] ) ) { + // Set Default ('fresh') and Light should go first. + $_wp_admin_css_colors = array_filter( array_merge( array( 'fresh' => '', 'light' => '' ), $_wp_admin_css_colors ) ); + } + + $current_color = get_user_option( 'admin_color', $user_id ); + + if ( empty( $current_color ) || ! isset( $_wp_admin_css_colors[ $current_color ] ) ) { + $current_color = 'fresh'; + } + + ?> +
+ + $color_info ) : + + ?> +
+ /> + + + + + + colors as $html_color ) { + ?> + + + +
 
+
+ +
+ icon_colors ) ) { + $icon_colors = $_wp_admin_css_colors[ $color_scheme ]->icon_colors; + } elseif ( ! empty( $_wp_admin_css_colors['fresh']->icon_colors ) ) { + $icon_colors = $_wp_admin_css_colors['fresh']->icon_colors; + } else { + // Fall back to the default set of icon colors if the default scheme is missing. + $icon_colors = array( 'base' => '#999', 'focus' => '#2ea2cc', 'current' => '#fff' ); + } + + echo '\n"; +} +add_action( 'admin_head', 'wp_color_scheme_settings' ); + +function _ipad_meta() { + if ( wp_is_mobile() ) { + ?> + + sprintf( __( '%s is currently editing' ), $user->display_name ) ); + + if ( ( $avatar = get_avatar( $user->ID, 18 ) ) && preg_match( "|src='([^']+)'|", $avatar, $matches ) ) + $send['avatar_src'] = $matches[1]; + + $checked[$key] = $send; + } + } + } + + if ( ! empty( $checked ) ) + $response['wp-check-locked-posts'] = $checked; + + return $response; +} +add_filter( 'heartbeat_received', 'wp_check_locked_posts', 10, 3 ); + +/** + * Check lock status on the New/Edit Post screen and refresh the lock + * + * @since 3.6.0 + */ +function wp_refresh_post_lock( $response, $data, $screen_id ) { + if ( array_key_exists( 'wp-refresh-post-lock', $data ) ) { + $received = $data['wp-refresh-post-lock']; + $send = array(); + + if ( ! $post_id = absint( $received['post_id'] ) ) + return $response; + + if ( ! current_user_can('edit_post', $post_id) ) + return $response; + + if ( ( $user_id = wp_check_post_lock( $post_id ) ) && ( $user = get_userdata( $user_id ) ) ) { + $error = array( + 'text' => sprintf( __( '%s has taken over and is currently editing.' ), $user->display_name ) + ); + + if ( $avatar = get_avatar( $user->ID, 64 ) ) { + if ( preg_match( "|src='([^']+)'|", $avatar, $matches ) ) + $error['avatar_src'] = $matches[1]; + } + + $send['lock_error'] = $error; + } else { + if ( $new_lock = wp_set_post_lock( $post_id ) ) + $send['new_lock'] = implode( ':', $new_lock ); + } + + $response['wp-refresh-post-lock'] = $send; + } + + return $response; +} +add_filter( 'heartbeat_received', 'wp_refresh_post_lock', 10, 3 ); + +/** + * Check nonce expiration on the New/Edit Post screen and refresh if needed + * + * @since 3.6.0 + */ +function wp_refresh_post_nonces( $response, $data, $screen_id ) { + if ( array_key_exists( 'wp-refresh-post-nonces', $data ) ) { + $received = $data['wp-refresh-post-nonces']; + $response['wp-refresh-post-nonces'] = array( 'check' => 1 ); + + if ( ! $post_id = absint( $received['post_id'] ) ) + return $response; + + if ( ! current_user_can( 'edit_post', $post_id ) || empty( $received['post_nonce'] ) ) + return $response; + + if ( 2 === wp_verify_nonce( $received['post_nonce'], 'update-post_' . $post_id ) ) { + $response['wp-refresh-post-nonces'] = array( + 'replace' => array( + 'getpermalinknonce' => wp_create_nonce('getpermalink'), + 'samplepermalinknonce' => wp_create_nonce('samplepermalink'), + 'closedpostboxesnonce' => wp_create_nonce('closedpostboxes'), + '_ajax_linking_nonce' => wp_create_nonce( 'internal-linking' ), + '_wpnonce' => wp_create_nonce( 'update-post_' . $post_id ), + ), + 'heartbeatNonce' => wp_create_nonce( 'heartbeat-nonce' ), + ); + } + } + + return $response; +} +add_filter( 'heartbeat_received', 'wp_refresh_post_nonces', 10, 3 ); + +/** + * Disable suspension of Heartbeat on the Add/Edit Post screens. + * + * @since 3.8.0 + * + * @param array $settings An array of Heartbeat settings. + * @return array Filtered Heartbeat settings. + */ +function wp_heartbeat_set_suspension( $settings ) { + global $pagenow; + + if ( 'post.php' === $pagenow || 'post-new.php' === $pagenow ) { + $settings['suspension'] = 'disable'; + } + + return $settings; +} +add_filter( 'heartbeat_settings', 'wp_heartbeat_set_suspension' ); + +/** + * Autosave with heartbeat + * + * @since 3.9 + */ +function heartbeat_autosave( $response, $data ) { + if ( ! empty( $data['wp_autosave'] ) ) { + $saved = wp_autosave( $data['wp_autosave'] ); + + if ( is_wp_error( $saved ) ) { + $response['wp_autosave'] = array( 'success' => false, 'message' => $saved->get_error_message() ); + } elseif ( empty( $saved ) ) { + $response['wp_autosave'] = array( 'success' => false, 'message' => __( 'Error while saving.' ) ); + } else { + /* translators: draft saved date format, see http://php.net/date */ + $draft_saved_date_format = __( 'g:i:s a' ); + /* translators: %s: date and time */ + $response['wp_autosave'] = array( 'success' => true, 'message' => sprintf( __( 'Draft saved at %s.' ), date_i18n( $draft_saved_date_format ) ) ); + } + } + + return $response; +} +// Run later as we have to set DOING_AUTOSAVE for back-compat +add_filter( 'heartbeat_received', 'heartbeat_autosave', 500, 2 ); diff --git a/wp-admin/includes/ms-deprecated.php b/wp-admin/includes/ms-deprecated.php new file mode 100644 index 0000000..702e3e1 --- /dev/null +++ b/wp-admin/includes/ms-deprecated.php @@ -0,0 +1,78 @@ + ( 1024 * get_site_option( 'fileupload_maxk', 1500 ) ) ) + $file['error'] = sprintf(__('This file is too big. Files must be less than %1$s KB in size.'), get_site_option( 'fileupload_maxk', 1500 ) ); + if ( upload_is_user_over_quota( false ) ) { + $file['error'] = __( 'You have used your space quota. Please delete files before uploading.' ); + } + if ( $file['error'] != '0' && !isset($_POST['html-upload']) ) + wp_die( $file['error'] . ' ' . __( 'Back' ) . '' ); + + return $file; +} +add_filter( 'wp_handle_upload_prefilter', 'check_upload_size' ); + +/** + * Delete a blog + * + * @since 3.0.0 + * + * @param int $blog_id Blog ID + * @param bool $drop True if blog's table should be dropped. Default is false. + * @return void + */ +function wpmu_delete_blog( $blog_id, $drop = false ) { + global $wpdb; + + $switch = false; + if ( get_current_blog_id() != $blog_id ) { + $switch = true; + switch_to_blog( $blog_id ); + } + + $blog = get_blog_details( $blog_id ); + /** + * Fires before a blog is deleted. + * + * @since MU + * + * @param int $blog_id The blog ID. + * @param bool $drop True if blog's table should be dropped. Default is false. + */ + do_action( 'delete_blog', $blog_id, $drop ); + + $users = get_users( array( 'blog_id' => $blog_id, 'fields' => 'ids' ) ); + + // Remove users from this blog. + if ( ! empty( $users ) ) { + foreach ( $users as $user_id ) { + remove_user_from_blog( $user_id, $blog_id ); + } + } + + update_blog_status( $blog_id, 'deleted', 1 ); + + $current_site = get_current_site(); + + // Don't destroy the initial, main, or root blog. + if ( $drop && ( 1 == $blog_id || is_main_site( $blog_id ) || ( $blog->path == $current_site->path && $blog->domain == $current_site->domain ) ) ) + $drop = false; + + if ( $drop ) { + $tables = $wpdb->tables( 'blog' ); + /** + * Filter the tables to drop when the blog is deleted. + * + * @since MU + * + * @param array $tables The blog tables to be dropped. + * @param int $blog_id The ID of the blog to drop tables for. + */ + $drop_tables = apply_filters( 'wpmu_drop_tables', $tables, $blog_id ); + + foreach ( (array) $drop_tables as $table ) { + $wpdb->query( "DROP TABLE IF EXISTS `$table`" ); + } + + $wpdb->delete( $wpdb->blogs, array( 'blog_id' => $blog_id ) ); + + $uploads = wp_upload_dir(); + /** + * Filter the upload base directory to delete when the blog is deleted. + * + * @since MU + * + * @param string $uploads['basedir'] Uploads path without subdirectory. @see wp_upload_dir() + * @param int $blog_id The blog ID. + */ + $dir = apply_filters( 'wpmu_delete_blog_upload_dir', $uploads['basedir'], $blog_id ); + $dir = rtrim( $dir, DIRECTORY_SEPARATOR ); + $top_dir = $dir; + $stack = array($dir); + $index = 0; + + while ( $index < count( $stack ) ) { + # Get indexed directory from stack + $dir = $stack[$index]; + + $dh = @opendir( $dir ); + if ( $dh ) { + while ( ( $file = @readdir( $dh ) ) !== false ) { + if ( $file == '.' || $file == '..' ) + continue; + + if ( @is_dir( $dir . DIRECTORY_SEPARATOR . $file ) ) + $stack[] = $dir . DIRECTORY_SEPARATOR . $file; + else if ( @is_file( $dir . DIRECTORY_SEPARATOR . $file ) ) + @unlink( $dir . DIRECTORY_SEPARATOR . $file ); + } + @closedir( $dh ); + } + $index++; + } + + $stack = array_reverse( $stack ); // Last added dirs are deepest + foreach( (array) $stack as $dir ) { + if ( $dir != $top_dir) + @rmdir( $dir ); + } + + clean_blog_cache( $blog ); + } + + if ( $switch ) + restore_current_blog(); +} + +// @todo Merge with wp_delete_user() ? +function wpmu_delete_user( $id ) { + global $wpdb; + + $id = (int) $id; + $user = new WP_User( $id ); + + if ( !$user->exists() ) + return false; + /** + * Fires before a user is deleted from the network. + * + * @since MU + * + * @param int $id ID of the user about to be deleted from the network. + */ + do_action( 'wpmu_delete_user', $id ); + + $blogs = get_blogs_of_user( $id ); + + if ( ! empty( $blogs ) ) { + foreach ( $blogs as $blog ) { + switch_to_blog( $blog->userblog_id ); + remove_user_from_blog( $id, $blog->userblog_id ); + + $post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_author = %d", $id ) ); + foreach ( (array) $post_ids as $post_id ) { + wp_delete_post( $post_id ); + } + + // Clean links + $link_ids = $wpdb->get_col( $wpdb->prepare( "SELECT link_id FROM $wpdb->links WHERE link_owner = %d", $id ) ); + + if ( $link_ids ) { + foreach ( $link_ids as $link_id ) + wp_delete_link( $link_id ); + } + + restore_current_blog(); + } + } + + $meta = $wpdb->get_col( $wpdb->prepare( "SELECT umeta_id FROM $wpdb->usermeta WHERE user_id = %d", $id ) ); + foreach ( $meta as $mid ) + delete_metadata_by_mid( 'user', $mid ); + + $wpdb->delete( $wpdb->users, array( 'ID' => $id ) ); + + clean_user_cache( $user ); + + /** This action is documented in wp-admin/includes/user.php */ + do_action( 'deleted_user', $id ); + + return true; +} + +function update_option_new_admin_email( $old_value, $value ) { + $email = get_option( 'admin_email' ); + if ( $value == get_option( 'admin_email' ) || !is_email( $value ) ) + return; + + $hash = md5( $value. time() .mt_rand() ); + $new_admin_email = array( + 'hash' => $hash, + 'newemail' => $value + ); + update_option( 'adminhash', $new_admin_email ); + + $email_text = __( 'Dear user, + +You recently requested to have the administration email address on +your site changed. +If this is correct, please click on the following link to change it: +###ADMIN_URL### + +You can safely ignore and delete this email if you do not want to +take this action. + +This email has been sent to ###EMAIL### + +Regards, +All at ###SITENAME### +###SITEURL###' ); + + /** + * Filter the email text sent when the site admin email is changed. + * + * The following strings have a special meaning and will get replaced dynamically: + * ###ADMIN_URL### The link to click on to confirm the email change. Required otherwise this functunalty is will break. + * ###EMAIL### The new email. + * ###SITENAME### The name of the site. + * ###SITEURL### The URL to the site. + * + * @since MU + * + * @param string $email_text Text in the email. + * @param string $new_admin_email New admin email that the current administration email was changed to. + */ + $content = apply_filters( 'new_admin_email_content', $email_text, $new_admin_email ); + + $content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'options.php?adminhash='.$hash ) ), $content ); + $content = str_replace( '###EMAIL###', $value, $content ); + $content = str_replace( '###SITENAME###', get_site_option( 'site_name' ), $content ); + $content = str_replace( '###SITEURL###', network_home_url(), $content ); + + wp_mail( $value, sprintf( __( '[%s] New Admin Email Address' ), wp_specialchars_decode( get_option( 'blogname' ) ) ), $content ); +} +add_action( 'update_option_new_admin_email', 'update_option_new_admin_email', 10, 2 ); +add_action( 'add_option_new_admin_email', 'update_option_new_admin_email', 10, 2 ); + +function send_confirmation_on_profile_email() { + global $errors, $wpdb; + $current_user = wp_get_current_user(); + if ( ! is_object($errors) ) + $errors = new WP_Error(); + + if ( $current_user->ID != $_POST['user_id'] ) + return false; + + if ( $current_user->user_email != $_POST['email'] ) { + if ( !is_email( $_POST['email'] ) ) { + $errors->add( 'user_email', __( "ERROR: The email address isn’t correct." ), array( 'form-field' => 'email' ) ); + return; + } + + if ( $wpdb->get_var( $wpdb->prepare( "SELECT user_email FROM {$wpdb->users} WHERE user_email=%s", $_POST['email'] ) ) ) { + $errors->add( 'user_email', __( "ERROR: The email address is already used." ), array( 'form-field' => 'email' ) ); + delete_option( $current_user->ID . '_new_email' ); + return; + } + + $hash = md5( $_POST['email'] . time() . mt_rand() ); + $new_user_email = array( + 'hash' => $hash, + 'newemail' => $_POST['email'] + ); + update_option( $current_user->ID . '_new_email', $new_user_email ); + + $email_text = __( 'Dear user, + +You recently requested to have the email address on your account changed. +If this is correct, please click on the following link to change it: +###ADMIN_URL### + +You can safely ignore and delete this email if you do not want to +take this action. + +This email has been sent to ###EMAIL### + +Regards, +All at ###SITENAME### +###SITEURL###' ); + + /** + * Filter the email text sent when a user changes emails. + * + * The following strings have a special meaning and will get replaced dynamically: + * ###ADMIN_URL### The link to click on to confirm the email change. Required otherwise this functunalty is will break. + * ###EMAIL### The new email. + * ###SITENAME### The name of the site. + * ###SITEURL### The URL to the site. + * + * @since MU + * + * @param string $email_text Text in the email. + * @param string $new_user_email New user email that the current user has changed to. + */ + $content = apply_filters( 'new_user_email_content', $email_text, $new_user_email ); + + $content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'profile.php?newuseremail='.$hash ) ), $content ); + $content = str_replace( '###EMAIL###', $_POST['email'], $content); + $content = str_replace( '###SITENAME###', get_site_option( 'site_name' ), $content ); + $content = str_replace( '###SITEURL###', network_home_url(), $content ); + + wp_mail( $_POST['email'], sprintf( __( '[%s] New Email Address' ), wp_specialchars_decode( get_option( 'blogname' ) ) ), $content ); + $_POST['email'] = $current_user->user_email; + } +} +add_action( 'personal_options_update', 'send_confirmation_on_profile_email' ); + +function new_user_email_admin_notice() { + if ( strpos( $_SERVER['PHP_SELF'], 'profile.php' ) && isset( $_GET['updated'] ) && $email = get_option( get_current_user_id() . '_new_email' ) ) + echo "
" . sprintf( __( "Your email address has not been updated yet. Please check your inbox at %s for a confirmation email." ), $email['newemail'] ) . "
"; +} +add_action( 'admin_notices', 'new_user_email_admin_notice' ); + +/** + * Check whether a blog has used its allotted upload space. + * + * @since MU + * + * @param bool $echo Optional. If $echo is set and the quota is exceeded, a warning message is echoed. Default is true. + * @return int + */ +function upload_is_user_over_quota( $echo = true ) { + if ( get_site_option( 'upload_space_check_disabled' ) ) + return false; + + $space_allowed = get_space_allowed(); + if ( empty( $space_allowed ) || !is_numeric( $space_allowed ) ) + $space_allowed = 10; // Default space allowed is 10 MB + + $space_used = get_space_used(); + + if ( ( $space_allowed - $space_used ) < 0 ) { + if ( $echo ) + _e( 'Sorry, you have used your space allocation. Please delete some files to upload more files.' ); + return true; + } else { + return false; + } +} + +/** + * Displays the amount of disk space used by the current blog. Not used in core. + * + * @since MU + */ +function display_space_usage() { + $space_allowed = get_space_allowed(); + $space_used = get_space_used(); + + $percent_used = ( $space_used / $space_allowed ) * 100; + + if ( $space_allowed > 1000 ) { + $space = number_format( $space_allowed / 1024 ); + /* translators: Gigabytes */ + $space .= __( 'GB' ); + } else { + $space = number_format( $space_allowed ); + /* translators: Megabytes */ + $space .= __( 'MB' ); + } + ?> + + + + + + + update( $wpdb->users, array( sanitize_key( $pref ) => $value ), array( 'ID' => $id ) ); + + $user = new WP_User( $id ); + clean_user_cache( $user ); + + if ( $pref == 'spam' ) { + if ( $value == 1 ) { + /** + * Fires after the user is marked as a SPAM user. + * + * @since 3.0.0 + * + * @param int $id ID of the user marked as SPAM. + */ + do_action( 'make_spam_user', $id ); + } else { + /** + * Fires after the user is marked as a HAM user. Opposite of SPAM. + * + * @since 3.0.0 + * + * @param int $id ID of the user marked as HAM. + */ + do_action( 'make_ham_user', $id ); + } + } + + return $value; +} + +function refresh_user_details( $id ) { + $id = (int) $id; + + if ( !$user = get_userdata( $id ) ) + return false; + + clean_user_cache( $user ); + + return $id; +} + +function format_code_lang( $code = '' ) { + $code = strtolower( substr( $code, 0, 2 ) ); + $lang_codes = array( + 'aa' => 'Afar', 'ab' => 'Abkhazian', 'af' => 'Afrikaans', 'ak' => 'Akan', 'sq' => 'Albanian', 'am' => 'Amharic', 'ar' => 'Arabic', 'an' => 'Aragonese', 'hy' => 'Armenian', 'as' => 'Assamese', 'av' => 'Avaric', 'ae' => 'Avestan', 'ay' => 'Aymara', 'az' => 'Azerbaijani', 'ba' => 'Bashkir', 'bm' => 'Bambara', 'eu' => 'Basque', 'be' => 'Belarusian', 'bn' => 'Bengali', + 'bh' => 'Bihari', 'bi' => 'Bislama', 'bs' => 'Bosnian', 'br' => 'Breton', 'bg' => 'Bulgarian', 'my' => 'Burmese', 'ca' => 'Catalan; Valencian', 'ch' => 'Chamorro', 'ce' => 'Chechen', 'zh' => 'Chinese', 'cu' => 'Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic', 'cv' => 'Chuvash', 'kw' => 'Cornish', 'co' => 'Corsican', 'cr' => 'Cree', + 'cs' => 'Czech', 'da' => 'Danish', 'dv' => 'Divehi; Dhivehi; Maldivian', 'nl' => 'Dutch; Flemish', 'dz' => 'Dzongkha', 'en' => 'English', 'eo' => 'Esperanto', 'et' => 'Estonian', 'ee' => 'Ewe', 'fo' => 'Faroese', 'fj' => 'Fijjian', 'fi' => 'Finnish', 'fr' => 'French', 'fy' => 'Western Frisian', 'ff' => 'Fulah', 'ka' => 'Georgian', 'de' => 'German', 'gd' => 'Gaelic; Scottish Gaelic', + 'ga' => 'Irish', 'gl' => 'Galician', 'gv' => 'Manx', 'el' => 'Greek, Modern', 'gn' => 'Guarani', 'gu' => 'Gujarati', 'ht' => 'Haitian; Haitian Creole', 'ha' => 'Hausa', 'he' => 'Hebrew', 'hz' => 'Herero', 'hi' => 'Hindi', 'ho' => 'Hiri Motu', 'hu' => 'Hungarian', 'ig' => 'Igbo', 'is' => 'Icelandic', 'io' => 'Ido', 'ii' => 'Sichuan Yi', 'iu' => 'Inuktitut', 'ie' => 'Interlingue', + 'ia' => 'Interlingua (International Auxiliary Language Association)', 'id' => 'Indonesian', 'ik' => 'Inupiaq', 'it' => 'Italian', 'jv' => 'Javanese', 'ja' => 'Japanese', 'kl' => 'Kalaallisut; Greenlandic', 'kn' => 'Kannada', 'ks' => 'Kashmiri', 'kr' => 'Kanuri', 'kk' => 'Kazakh', 'km' => 'Central Khmer', 'ki' => 'Kikuyu; Gikuyu', 'rw' => 'Kinyarwanda', 'ky' => 'Kirghiz; Kyrgyz', + 'kv' => 'Komi', 'kg' => 'Kongo', 'ko' => 'Korean', 'kj' => 'Kuanyama; Kwanyama', 'ku' => 'Kurdish', 'lo' => 'Lao', 'la' => 'Latin', 'lv' => 'Latvian', 'li' => 'Limburgan; Limburger; Limburgish', 'ln' => 'Lingala', 'lt' => 'Lithuanian', 'lb' => 'Luxembourgish; Letzeburgesch', 'lu' => 'Luba-Katanga', 'lg' => 'Ganda', 'mk' => 'Macedonian', 'mh' => 'Marshallese', 'ml' => 'Malayalam', + 'mi' => 'Maori', 'mr' => 'Marathi', 'ms' => 'Malay', 'mg' => 'Malagasy', 'mt' => 'Maltese', 'mo' => 'Moldavian', 'mn' => 'Mongolian', 'na' => 'Nauru', 'nv' => 'Navajo; Navaho', 'nr' => 'Ndebele, South; South Ndebele', 'nd' => 'Ndebele, North; North Ndebele', 'ng' => 'Ndonga', 'ne' => 'Nepali', 'nn' => 'Norwegian Nynorsk; Nynorsk, Norwegian', 'nb' => 'Bokmål, Norwegian, Norwegian Bokmål', + 'no' => 'Norwegian', 'ny' => 'Chichewa; Chewa; Nyanja', 'oc' => 'Occitan, Provençal', 'oj' => 'Ojibwa', 'or' => 'Oriya', 'om' => 'Oromo', 'os' => 'Ossetian; Ossetic', 'pa' => 'Panjabi; Punjabi', 'fa' => 'Persian', 'pi' => 'Pali', 'pl' => 'Polish', 'pt' => 'Portuguese', 'ps' => 'Pushto', 'qu' => 'Quechua', 'rm' => 'Romansh', 'ro' => 'Romanian', 'rn' => 'Rundi', 'ru' => 'Russian', + 'sg' => 'Sango', 'sa' => 'Sanskrit', 'sr' => 'Serbian', 'hr' => 'Croatian', 'si' => 'Sinhala; Sinhalese', 'sk' => 'Slovak', 'sl' => 'Slovenian', 'se' => 'Northern Sami', 'sm' => 'Samoan', 'sn' => 'Shona', 'sd' => 'Sindhi', 'so' => 'Somali', 'st' => 'Sotho, Southern', 'es' => 'Spanish; Castilian', 'sc' => 'Sardinian', 'ss' => 'Swati', 'su' => 'Sundanese', 'sw' => 'Swahili', + 'sv' => 'Swedish', 'ty' => 'Tahitian', 'ta' => 'Tamil', 'tt' => 'Tatar', 'te' => 'Telugu', 'tg' => 'Tajik', 'tl' => 'Tagalog', 'th' => 'Thai', 'bo' => 'Tibetan', 'ti' => 'Tigrinya', 'to' => 'Tonga (Tonga Islands)', 'tn' => 'Tswana', 'ts' => 'Tsonga', 'tk' => 'Turkmen', 'tr' => 'Turkish', 'tw' => 'Twi', 'ug' => 'Uighur; Uyghur', 'uk' => 'Ukrainian', 'ur' => 'Urdu', 'uz' => 'Uzbek', + 've' => 'Venda', 'vi' => 'Vietnamese', 'vo' => 'Volapük', 'cy' => 'Welsh','wa' => 'Walloon','wo' => 'Wolof', 'xh' => 'Xhosa', 'yi' => 'Yiddish', 'yo' => 'Yoruba', 'za' => 'Zhuang; Chuang', 'zu' => 'Zulu' ); + + /** + * Filter the language codes. + * + * @since MU + * + * @param array $lang_codes Key/value pair of language codes where key is the short version. + * @param string $code A two-letter designation of the language. + */ + $lang_codes = apply_filters( 'lang_codes', $lang_codes, $code ); + return strtr( $code, $lang_codes ); +} + +function sync_category_tag_slugs( $term, $taxonomy ) { + if ( global_terms_enabled() && ( $taxonomy == 'category' || $taxonomy == 'post_tag' ) ) { + if ( is_object( $term ) ) { + $term->slug = sanitize_title( $term->name ); + } else { + $term['slug'] = sanitize_title( $term['name'] ); + } + } + return $term; +} +add_filter( 'get_term', 'sync_category_tag_slugs', 10, 2 ); + +function _access_denied_splash() { + if ( ! is_user_logged_in() || is_network_admin() ) + return; + + $blogs = get_blogs_of_user( get_current_user_id() ); + + if ( wp_list_filter( $blogs, array( 'userblog_id' => get_current_blog_id() ) ) ) + return; + + $blog_name = get_bloginfo( 'name' ); + + if ( empty( $blogs ) ) + wp_die( sprintf( __( 'You attempted to access the "%1$s" dashboard, but you do not currently have privileges on this site. If you believe you should be able to access the "%1$s" dashboard, please contact your network administrator.' ), $blog_name ) ); + + $output = '

' . sprintf( __( 'You attempted to access the "%1$s" dashboard, but you do not currently have privileges on this site. If you believe you should be able to access the "%1$s" dashboard, please contact your network administrator.' ), $blog_name ) . '

'; + $output .= '

' . __( 'If you reached this screen by accident and meant to visit one of your own sites, here are some shortcuts to help you find your way.' ) . '

'; + + $output .= '

' . __('Your Sites') . '

'; + $output .= ''; + + foreach ( $blogs as $blog ) { + $output .= ''; + $output .= ""; + $output .= ''; + $output .= ''; + } + + $output .= '
{$blog->blogname}' . __( 'Visit Dashboard' ) . ' | ' . + '' . __( 'View Site' ) . '
'; + + wp_die( $output ); +} +add_action( 'admin_page_access_denied', '_access_denied_splash', 99 ); + +function check_import_new_users( $permission ) { + if ( !is_super_admin() ) + return false; + return true; +} +add_filter( 'import_allow_create_users', 'check_import_new_users' ); +// See "import_allow_fetch_attachments" and "import_attachment_size_limit" filters too. + +function mu_dropdown_languages( $lang_files = array(), $current = '' ) { + $flag = false; + $output = array(); + + foreach ( (array) $lang_files as $val ) { + $code_lang = basename( $val, '.mo' ); + + if ( $code_lang == 'en_US' ) { // American English + $flag = true; + $ae = __( 'American English' ); + $output[$ae] = ''; + } elseif ( $code_lang == 'en_GB' ) { // British English + $flag = true; + $be = __( 'British English' ); + $output[$be] = ''; + } else { + $translated = format_code_lang( $code_lang ); + $output[$translated] = ''; + } + + } + + if ( $flag === false ) // WordPress english + $output[] = '"; + + // Order by name + uksort( $output, 'strnatcasecmp' ); + /** + * Filter the languages available in the dropdown. + * + * @since MU + * + * @param array $output HTML output of the dropdown. + * @param array $lang_files Available language files. + * @param string $current The current language code. + */ + $output = apply_filters( 'mu_dropdown_languages', $output, $lang_files, $current ); + echo implode( "\n\t", $output ); +} + +function site_admin_notice() { + global $wp_db_version; + if ( !is_super_admin() ) + return false; + if ( get_site_option( 'wpmu_upgrade_site' ) != $wp_db_version ) + echo "
" . sprintf( __( 'Thank you for Updating! Please visit the Upgrade Network page to update all your sites.' ), esc_url( network_admin_url( 'upgrade.php' ) ) ) . "
"; +} +add_action( 'admin_notices', 'site_admin_notice' ); +add_action( 'network_admin_notices', 'site_admin_notice' ); + +function avoid_blog_page_permalink_collision( $data, $postarr ) { + if ( is_subdomain_install() ) + return $data; + if ( $data['post_type'] != 'page' ) + return $data; + if ( !isset( $data['post_name'] ) || $data['post_name'] == '' ) + return $data; + if ( !is_main_site() ) + return $data; + + $post_name = $data['post_name']; + $c = 0; + while( $c < 10 && get_id_from_blogname( $post_name ) ) { + $post_name .= mt_rand( 1, 10 ); + $c ++; + } + if ( $post_name != $data['post_name'] ) { + $data['post_name'] = $post_name; + } + return $data; +} +add_filter( 'wp_insert_post_data', 'avoid_blog_page_permalink_collision', 10, 2 ); + +function choose_primary_blog() { + ?> + + + + + + + + + + + +
+ 1 ) { + $found = false; + ?> + + userblog_id ); + } + } elseif ( count( $all_blogs ) == 1 ) { + $blog = array_shift( $all_blogs ); + echo $blog->domain; + if ( $primary_blog != $blog->userblog_id ) // Set the primary blog again if it's out of sync with blog list. + update_user_meta( get_current_user_id(), 'primary_blog', $blog->userblog_id ); + } else { + echo "N/A"; + } + ?> +
+ + +
+ user_login, $super_admins ) ) { + $super_admins[] = $user->user_login; + update_site_option( 'site_admins' , $super_admins ); + + /** + * Fires after the user is granted Super Admin privileges. + * + * @since 3.0.0 + * + * @param int $user_id ID of the user that was granted Super Admin privileges. + */ + do_action( 'granted_super_admin', $user_id ); + return true; + } + return false; +} + +/** + * Revokes Super Admin privileges. + * + * @since 3.0.0 + * @param int $user_id ID of the user Super Admin privileges to be revoked from. + * @return bool True on success, false on failure. This can fail when the user's email + * is the network admin email or when the $super_admins global is defined. + */ +function revoke_super_admin( $user_id ) { + // If global super_admins override is defined, there is nothing to do here. + if ( isset( $GLOBALS['super_admins'] ) ) { + return false; + } + + /** + * Fires before the user's Super Admin privileges are revoked. + * + * @since 3.0.0 + * + * @param int $user_id ID of the user Super Admin privileges are being revoked from. + */ + do_action( 'revoke_super_admin', $user_id ); + + // Directly fetch site_admins instead of using get_super_admins() + $super_admins = get_site_option( 'site_admins', array( 'admin' ) ); + + $user = get_userdata( $user_id ); + if ( $user && 0 !== strcasecmp( $user->user_email, get_site_option( 'admin_email' ) ) ) { + if ( false !== ( $key = array_search( $user->user_login, $super_admins ) ) ) { + unset( $super_admins[$key] ); + update_site_option( 'site_admins', $super_admins ); + + /** + * Fires after the user's Super Admin privileges are revoked. + * + * @since 3.0.0 + * + * @param int $user_id ID of the user Super Admin privileges were revoked from. + */ + do_action( 'revoked_super_admin', $user_id ); + return true; + } + } + return false; +} + +/** + * Whether or not we can edit this network from this page + * + * By default editing of network is restricted to the Network Admin for that site_id this allows for this to be overridden + * + * @since 3.1.0 + * @param integer $site_id The network/site ID to check. + */ +function can_edit_network( $site_id ) { + global $wpdb; + + if ( $site_id == $wpdb->siteid ) + $result = true; + else + $result = false; + + /** + * Filter whether this network can be edited from this page. + * + * @since 3.1.0 + * + * @param bool $result Whether the network can be edited from this page. + * @param int $site_id The network/site ID to check. + */ + return apply_filters( 'can_edit_network', $result, $site_id ); +} + +/** + * Thickbox image paths for Network Admin. + * + * @since 3.1.0 + * @access private + */ +function _thickbox_path_admin_subfolder() { +?> + + $_wp_nav_menu_max_depth ? $depth : $_wp_nav_menu_max_depth; + + ob_start(); + $item_id = esc_attr( $item->ID ); + $removed_args = array( + 'action', + 'customlink-tab', + 'edit-menu-item', + 'menu-item', + 'page-tab', + '_wpnonce', + ); + + $original_title = ''; + if ( 'taxonomy' == $item->type ) { + $original_title = get_term_field( 'name', $item->object_id, $item->object, 'raw' ); + if ( is_wp_error( $original_title ) ) + $original_title = false; + } elseif ( 'post_type' == $item->type ) { + $original_object = get_post( $item->object_id ); + $original_title = get_the_title( $original_object->ID ); + } + + $classes = array( + 'menu-item menu-item-depth-' . $depth, + 'menu-item-' . esc_attr( $item->object ), + 'menu-item-edit-' . ( ( isset( $_GET['edit-menu-item'] ) && $item_id == $_GET['edit-menu-item'] ) ? 'active' : 'inactive'), + ); + + $title = $item->title; + + if ( ! empty( $item->_invalid ) ) { + $classes[] = 'menu-item-invalid'; + /* translators: %s: title of menu item which is invalid */ + $title = sprintf( __( '%s (Invalid)' ), $item->title ); + } elseif ( isset( $item->post_status ) && 'draft' == $item->post_status ) { + $classes[] = 'pending'; + /* translators: %s: title of menu item in draft status */ + $title = sprintf( __('%s (Pending)'), $item->title ); + } + + $title = ( ! isset( $item->label ) || '' == $item->label ) ? $title : $item->label; + + $submenu_text = ''; + if ( 0 == $depth ) + $submenu_text = 'style="display: none;"'; + + ?> +
  • '; + $output .= ''; + + // Menu item hidden fields + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + } + +} // Walker_Nav_Menu_Checklist + +/** + * Prints the appropriate response to a menu quick search. + * + * @since 3.0.0 + * + * @param array $request The unsanitized request values. + */ +function _wp_ajax_menu_quick_search( $request = array() ) { + $args = array(); + $type = isset( $request['type'] ) ? $request['type'] : ''; + $object_type = isset( $request['object_type'] ) ? $request['object_type'] : ''; + $query = isset( $request['q'] ) ? $request['q'] : ''; + $response_format = isset( $request['response-format'] ) && in_array( $request['response-format'], array( 'json', 'markup' ) ) ? $request['response-format'] : 'json'; + + if ( 'markup' == $response_format ) { + $args['walker'] = new Walker_Nav_Menu_Checklist; + } + + if ( 'get-post-item' == $type ) { + if ( post_type_exists( $object_type ) ) { + if ( isset( $request['ID'] ) ) { + $object_id = (int) $request['ID']; + if ( 'markup' == $response_format ) { + echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', array( get_post( $object_id ) ) ), 0, (object) $args ); + } elseif ( 'json' == $response_format ) { + $post_obj = get_post( $object_id ); + echo json_encode( + array( + 'ID' => $object_id, + 'post_title' => get_the_title( $object_id ), + 'post_type' => get_post_type( $object_id ), + ) + ); + echo "\n"; + } + } + } elseif ( taxonomy_exists( $object_type ) ) { + if ( isset( $request['ID'] ) ) { + $object_id = (int) $request['ID']; + if ( 'markup' == $response_format ) { + echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', array( get_term( $object_id, $object_type ) ) ), 0, (object) $args ); + } elseif ( 'json' == $response_format ) { + $post_obj = get_term( $object_id, $object_type ); + echo json_encode( + array( + 'ID' => $object_id, + 'post_title' => $post_obj->name, + 'post_type' => $object_type, + ) + ); + echo "\n"; + } + } + + } + + } elseif ( preg_match('/quick-search-(posttype|taxonomy)-([a-zA-Z_-]*\b)/', $type, $matches) ) { + if ( 'posttype' == $matches[1] && get_post_type_object( $matches[2] ) ) { + query_posts(array( + 'posts_per_page' => 10, + 'post_type' => $matches[2], + 's' => $query, + )); + if ( ! have_posts() ) + return; + while ( have_posts() ) { + the_post(); + if ( 'markup' == $response_format ) { + $var_by_ref = get_the_ID(); + echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', array( get_post( $var_by_ref ) ) ), 0, (object) $args ); + } elseif ( 'json' == $response_format ) { + echo json_encode( + array( + 'ID' => get_the_ID(), + 'post_title' => get_the_title(), + 'post_type' => get_post_type(), + ) + ); + echo "\n"; + } + } + } elseif ( 'taxonomy' == $matches[1] ) { + $terms = get_terms( $matches[2], array( + 'name__like' => $query, + 'number' => 10, + )); + if ( empty( $terms ) || is_wp_error( $terms ) ) + return; + foreach( (array) $terms as $term ) { + if ( 'markup' == $response_format ) { + echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', array( $term ) ), 0, (object) $args ); + } elseif ( 'json' == $response_format ) { + echo json_encode( + array( + 'ID' => $term->term_id, + 'post_title' => $term->name, + 'post_type' => $matches[2], + ) + ); + echo "\n"; + } + } + } + } +} + +/** + * Register nav menu metaboxes and advanced menu items + * + * @since 3.0.0 + **/ +function wp_nav_menu_setup() { + // Register meta boxes + wp_nav_menu_post_type_meta_boxes(); + add_meta_box( 'add-custom-links', __( 'Links' ), 'wp_nav_menu_item_link_meta_box', 'nav-menus', 'side', 'default' ); + wp_nav_menu_taxonomy_meta_boxes(); + + // Register advanced menu items (columns) + add_filter( 'manage_nav-menus_columns', 'wp_nav_menu_manage_columns' ); + + // If first time editing, disable advanced items by default. + if( false === get_user_option( 'managenav-menuscolumnshidden' ) ) { + $user = wp_get_current_user(); + update_user_option($user->ID, 'managenav-menuscolumnshidden', + array( 0 => 'link-target', 1 => 'css-classes', 2 => 'xfn', 3 => 'description', ), + true); + } +} + +/** + * Limit the amount of meta boxes to just links, pages and cats for first time users. + * + * @since 3.0.0 + **/ +function wp_initial_nav_menu_meta_boxes() { + global $wp_meta_boxes; + + if ( get_user_option( 'metaboxhidden_nav-menus' ) !== false || ! is_array($wp_meta_boxes) ) + return; + + $initial_meta_boxes = array( 'nav-menu-theme-locations', 'add-page', 'add-custom-links', 'add-category' ); + $hidden_meta_boxes = array(); + + foreach ( array_keys($wp_meta_boxes['nav-menus']) as $context ) { + foreach ( array_keys($wp_meta_boxes['nav-menus'][$context]) as $priority ) { + foreach ( $wp_meta_boxes['nav-menus'][$context][$priority] as $box ) { + if ( in_array( $box['id'], $initial_meta_boxes ) ) { + unset( $box['id'] ); + } else { + $hidden_meta_boxes[] = $box['id']; + } + } + } + } + + $user = wp_get_current_user(); + update_user_option( $user->ID, 'metaboxhidden_nav-menus', $hidden_meta_boxes, true ); +} + +/** + * Creates metaboxes for any post type menu item. + * + * @since 3.0.0 + */ +function wp_nav_menu_post_type_meta_boxes() { + $post_types = get_post_types( array( 'show_in_nav_menus' => true ), 'object' ); + + if ( ! $post_types ) + return; + + foreach ( $post_types as $post_type ) { + /** + * Filter whether a menu items meta box will be added for the current post type. + * + * If a falsey value is returned instead of a post type object, + * the post type menu items meta box will not be added. + * + * @since 3.0.0 + * + * @param object $post_type The post type object to be used as a meta box. + */ + $post_type = apply_filters( 'nav_menu_meta_box_object', $post_type ); + if ( $post_type ) { + $id = $post_type->name; + // give pages a higher priority + $priority = ( 'page' == $post_type->name ? 'core' : 'default' ); + add_meta_box( "add-{$id}", $post_type->labels->name, 'wp_nav_menu_item_post_type_meta_box', 'nav-menus', 'side', $priority, $post_type ); + } + } +} + +/** + * Creates metaboxes for any taxonomy menu item. + * + * @since 3.0.0 + */ +function wp_nav_menu_taxonomy_meta_boxes() { + $taxonomies = get_taxonomies( array( 'show_in_nav_menus' => true ), 'object' ); + + if ( !$taxonomies ) + return; + + foreach ( $taxonomies as $tax ) { + /** + * Filter whether a menu items meta box will be added for the current taxonomy. + * + * If a falsey value is returned instead of a taxonomy object, + * the taxonomy menu items meta box will not be added. + * + * @since 3.0.0 + * + * @param object $tax The taxonomy object to be used as a meta box. + */ + $tax = apply_filters( 'nav_menu_meta_box_object', $tax ); + if ( $tax ) { + $id = $tax->name; + add_meta_box( "add-{$id}", $tax->labels->name, 'wp_nav_menu_item_taxonomy_meta_box', 'nav-menus', 'side', 'default', $tax ); + } + } +} + +/** + * Check whether to disable the Menu Locations meta box submit button + * + * @since 3.6.0 + * + * @uses global $one_theme_location_no_menus to determine if no menus exist + * @uses disabled() to output the disabled attribute in $other_attributes param in submit_button() + * + * @param int|string $nav_menu_selected_id (id, name or slug) of the currently-selected menu + * @return string Disabled attribute if at least one menu exists, false if not +*/ +function wp_nav_menu_disabled_check( $nav_menu_selected_id ) { + global $one_theme_location_no_menus; + + if ( $one_theme_location_no_menus ) + return false; + + return disabled( $nav_menu_selected_id, 0 ); +} + +/** + * Displays a metabox for the custom links menu item. + * + * @since 3.0.0 + */ +function wp_nav_menu_item_link_meta_box() { + global $_nav_menu_placeholder, $nav_menu_selected_id; + + $_nav_menu_placeholder = 0 > $_nav_menu_placeholder ? $_nav_menu_placeholder - 1 : -1; + + ?> +
    + + + + + +

    + + class="button-secondary submit-add-to-menu right" value="" name="add-custom-menu-item" id="submit-customlinkdiv" /> + + +

    + +
    + name; + + // paginate browsing for large numbers of post objects + $per_page = 50; + $pagenum = isset( $_REQUEST[$post_type_name . '-tab'] ) && isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 1; + $offset = 0 < $pagenum ? $per_page * ( $pagenum - 1 ) : 0; + + $args = array( + 'offset' => $offset, + 'order' => 'ASC', + 'orderby' => 'title', + 'posts_per_page' => $per_page, + 'post_type' => $post_type_name, + 'suppress_filters' => true, + 'update_post_term_cache' => false, + 'update_post_meta_cache' => false + ); + + if ( isset( $post_type['args']->_default_query ) ) + $args = array_merge($args, (array) $post_type['args']->_default_query ); + + // @todo transient caching of these results with proper invalidation on updating of a post of this type + $get_posts = new WP_Query; + $posts = $get_posts->query( $args ); + if ( ! $get_posts->post_count ) { + echo '

    ' . __( 'No items.' ) . '

    '; + return; + } + + $post_type_object = get_post_type_object($post_type_name); + + $num_pages = $get_posts->max_num_pages; + + $page_links = paginate_links( array( + 'base' => add_query_arg( + array( + $post_type_name . '-tab' => 'all', + 'paged' => '%#%', + 'item-type' => 'post_type', + 'item-object' => $post_type_name, + ) + ), + 'format' => '', + 'prev_text' => __('«'), + 'next_text' => __('»'), + 'total' => $num_pages, + 'current' => $pagenum + )); + + if ( !$posts ) + $error = '
  • '. $post_type['args']->labels->not_found .'
  • '; + + $db_fields = false; + if ( is_post_type_hierarchical( $post_type_name ) ) { + $db_fields = array( 'parent' => 'post_parent', 'id' => 'ID' ); + } + + $walker = new Walker_Nav_Menu_Checklist( $db_fields ); + + $current_tab = 'most-recent'; + if ( isset( $_REQUEST[$post_type_name . '-tab'] ) && in_array( $_REQUEST[$post_type_name . '-tab'], array('all', 'search') ) ) { + $current_tab = $_REQUEST[$post_type_name . '-tab']; + } + + if ( ! empty( $_REQUEST['quick-search-posttype-' . $post_type_name] ) ) { + $current_tab = 'search'; + } + + $removed_args = array( + 'action', + 'customlink-tab', + 'edit-menu-item', + 'menu-item', + 'page-tab', + '_wpnonce', + ); + + ?> +
    + + +
    +
      + 'post_date', 'order' => 'DESC', 'posts_per_page' => 15 ) ); + $most_recent = $get_posts->query( $recent_args ); + $args['walker'] = $walker; + echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $most_recent), 0, (object) $args ); + ?> +
    +
    + + + +
    + + + +
      + front_or_home = true; + array_unshift( $posts, $front_page_obj ); + } else { + $_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? intval($_nav_menu_placeholder) - 1 : -1; + array_unshift( $posts, (object) array( + 'front_or_home' => true, + 'ID' => 0, + 'object_id' => $_nav_menu_placeholder, + 'post_content' => '', + 'post_excerpt' => '', + 'post_parent' => '', + 'post_title' => _x('Home', 'nav menu home label'), + 'post_type' => 'nav_menu_item', + 'type' => 'custom', + 'url' => home_url('/'), + ) ); + } + } + + /** + * Filter the posts displayed in the 'View All' tab of the current + * post type's menu items meta box. + * + * The dynamic portion of the hook name, $post_type_name, + * refers to the slug of the current post type. + * + * @since 3.2.0 + * + * @see WP_Query::query() + * + * @param array $posts The posts for the current post type. + * @param array $args An array of WP_Query arguments. + * @param object $post_type The current post type object for this menu item meta box. + */ + $posts = apply_filters( "nav_menu_items_{$post_type_name}", $posts, $args, $post_type ); + $checkbox_items = walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $posts), 0, (object) $args ); + + if ( 'all' == $current_tab && ! empty( $_REQUEST['selectall'] ) ) { + $checkbox_items = preg_replace('/(type=(.)checkbox(\2))/', '$1 checked=$2checked$2', $checkbox_items); + + } + + echo $checkbox_items; + ?> +
    + + + +
    + +

    + + + + + + class="button-secondary submit-add-to-menu right" value="" name="add-post-type-menu-item" id="" /> + + +

    + +
    + name; + + // paginate browsing for large numbers of objects + $per_page = 50; + $pagenum = isset( $_REQUEST[$taxonomy_name . '-tab'] ) && isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 1; + $offset = 0 < $pagenum ? $per_page * ( $pagenum - 1 ) : 0; + + $args = array( + 'child_of' => 0, + 'exclude' => '', + 'hide_empty' => false, + 'hierarchical' => 1, + 'include' => '', + 'number' => $per_page, + 'offset' => $offset, + 'order' => 'ASC', + 'orderby' => 'name', + 'pad_counts' => false, + ); + + $terms = get_terms( $taxonomy_name, $args ); + + if ( ! $terms || is_wp_error($terms) ) { + echo '

    ' . __( 'No items.' ) . '

    '; + return; + } + + $num_pages = ceil( wp_count_terms( $taxonomy_name , array_merge( $args, array('number' => '', 'offset' => '') ) ) / $per_page ); + + $page_links = paginate_links( array( + 'base' => add_query_arg( + array( + $taxonomy_name . '-tab' => 'all', + 'paged' => '%#%', + 'item-type' => 'taxonomy', + 'item-object' => $taxonomy_name, + ) + ), + 'format' => '', + 'prev_text' => __('«'), + 'next_text' => __('»'), + 'total' => $num_pages, + 'current' => $pagenum + )); + + $db_fields = false; + if ( is_taxonomy_hierarchical( $taxonomy_name ) ) { + $db_fields = array( 'parent' => 'parent', 'id' => 'term_id' ); + } + + $walker = new Walker_Nav_Menu_Checklist( $db_fields ); + + $current_tab = 'most-used'; + if ( isset( $_REQUEST[$taxonomy_name . '-tab'] ) && in_array( $_REQUEST[$taxonomy_name . '-tab'], array('all', 'most-used', 'search') ) ) { + $current_tab = $_REQUEST[$taxonomy_name . '-tab']; + } + + if ( ! empty( $_REQUEST['quick-search-taxonomy-' . $taxonomy_name] ) ) { + $current_tab = 'search'; + } + + $removed_args = array( + 'action', + 'customlink-tab', + 'edit-menu-item', + 'menu-item', + 'page-tab', + '_wpnonce', + ); + + ?> +
    + + +
    +
      + 'count', 'order' => 'DESC', 'number' => 10, 'hierarchical' => false ) ); + $args['walker'] = $walker; + echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $popular_terms), 0, (object) $args ); + ?> +
    +
    + +
    + + + +
      + +
    + + + +
    + +
    + $searched, 'fields' => 'all', 'orderby' => 'count', 'order' => 'DESC', 'hierarchical' => false ) ); + } else { + $searched = ''; + $search_results = array(); + } + ?> +

    + + + 'submit-quick-search-taxonomy-' . $taxonomy_name ) ); ?> +

    + +
      + + + +
    • get_error_message(); ?>
    • + +
    • + +
    +
    + +

    + + + + + + class="button-secondary submit-add-to-menu right" value="" name="add-taxonomy-menu-item" id="" /> + + +

    + +
    + $_item_object_data ) { + if ( + empty( $_item_object_data['menu-item-object-id'] ) && // checkbox is not checked + ( + ! isset( $_item_object_data['menu-item-type'] ) || // and item type either isn't set + in_array( $_item_object_data['menu-item-url'], array( 'http://', '' ) ) || // or URL is the default + ! ( 'custom' == $_item_object_data['menu-item-type'] && ! isset( $_item_object_data['menu-item-db-id'] ) ) || // or it's not a custom menu item (but not the custom home page) + ! empty( $_item_object_data['menu-item-db-id'] ) // or it *is* a custom menu item that already exists + ) + ) { + continue; // then this potential menu item is not getting added to this menu + } + + // if this possible menu item doesn't actually have a menu database ID yet + if ( + empty( $_item_object_data['menu-item-db-id'] ) || + ( 0 > $_possible_db_id ) || + $_possible_db_id != $_item_object_data['menu-item-db-id'] + ) { + $_actual_db_id = 0; + } else { + $_actual_db_id = (int) $_item_object_data['menu-item-db-id']; + } + + $args = array( + 'menu-item-db-id' => ( isset( $_item_object_data['menu-item-db-id'] ) ? $_item_object_data['menu-item-db-id'] : '' ), + 'menu-item-object-id' => ( isset( $_item_object_data['menu-item-object-id'] ) ? $_item_object_data['menu-item-object-id'] : '' ), + 'menu-item-object' => ( isset( $_item_object_data['menu-item-object'] ) ? $_item_object_data['menu-item-object'] : '' ), + 'menu-item-parent-id' => ( isset( $_item_object_data['menu-item-parent-id'] ) ? $_item_object_data['menu-item-parent-id'] : '' ), + 'menu-item-position' => ( isset( $_item_object_data['menu-item-position'] ) ? $_item_object_data['menu-item-position'] : '' ), + 'menu-item-type' => ( isset( $_item_object_data['menu-item-type'] ) ? $_item_object_data['menu-item-type'] : '' ), + 'menu-item-title' => ( isset( $_item_object_data['menu-item-title'] ) ? $_item_object_data['menu-item-title'] : '' ), + 'menu-item-url' => ( isset( $_item_object_data['menu-item-url'] ) ? $_item_object_data['menu-item-url'] : '' ), + 'menu-item-description' => ( isset( $_item_object_data['menu-item-description'] ) ? $_item_object_data['menu-item-description'] : '' ), + 'menu-item-attr-title' => ( isset( $_item_object_data['menu-item-attr-title'] ) ? $_item_object_data['menu-item-attr-title'] : '' ), + 'menu-item-target' => ( isset( $_item_object_data['menu-item-target'] ) ? $_item_object_data['menu-item-target'] : '' ), + 'menu-item-classes' => ( isset( $_item_object_data['menu-item-classes'] ) ? $_item_object_data['menu-item-classes'] : '' ), + 'menu-item-xfn' => ( isset( $_item_object_data['menu-item-xfn'] ) ? $_item_object_data['menu-item-xfn'] : '' ), + ); + + $items_saved[] = wp_update_nav_menu_item( $menu_id, $_actual_db_id, $args ); + + } + } + return $items_saved; +} + +/** + * Adds custom arguments to some of the meta box object types. + * + * @since 3.0.0 + * + * @access private + * + * @param object $object The post type or taxonomy meta-object. + * @return object The post type of taxonomy object. + */ +function _wp_nav_menu_meta_box_object( $object = null ) { + if ( isset( $object->name ) ) { + + if ( 'page' == $object->name ) { + $object->_default_query = array( + 'orderby' => 'menu_order title', + 'post_status' => 'publish', + ); + + // posts should show only published items + } elseif ( 'post' == $object->name ) { + $object->_default_query = array( + 'post_status' => 'publish', + ); + + // cats should be in reverse chronological order + } elseif ( 'category' == $object->name ) { + $object->_default_query = array( + 'orderby' => 'id', + 'order' => 'DESC', + ); + + // custom post types should show only published items + } else { + $object->_default_query = array( + 'post_status' => 'publish', + ); + } + } + + return $object; +} + +/** + * Returns the menu formatted to edit. + * + * @since 3.0.0 + * + * @param string $menu_id The ID of the menu to format. + * @return string|WP_Error $output The menu formatted to edit or error object on failure. + */ +function wp_get_nav_menu_to_edit( $menu_id = 0 ) { + $menu = wp_get_nav_menu_object( $menu_id ); + + // If the menu exists, get its items. + if ( is_nav_menu( $menu ) ) { + $menu_items = wp_get_nav_menu_items( $menu->term_id, array('post_status' => 'any') ); + $result = '
    ' : '">'; + $result .= '

    ' . __( 'Add menu items from the column on the left.' ) . '

    '; + $result .= '
    '; + + if( empty($menu_items) ) + return $result . ' '; + + /** + * Filter the Walker class used to render a menu formatted for editing. + * + * @since 3.0.0 + * + * @param string $walker_class_name The Walker class used to render a menu formatted for editing. + * @param int $menu_id The ID of the menu being rendered. + */ + $walker_class_name = apply_filters( 'wp_edit_nav_menu_walker', 'Walker_Nav_Menu_Edit', $menu_id ); + + if ( class_exists( $walker_class_name ) ) + $walker = new $walker_class_name; + else + return new WP_Error( 'menu_walker_not_exist', sprintf( __('The Walker class named %s does not exist.'), $walker_class_name ) ); + + $some_pending_menu_items = $some_invalid_menu_items = false; + foreach( (array) $menu_items as $menu_item ) { + if ( isset( $menu_item->post_status ) && 'draft' == $menu_item->post_status ) + $some_pending_menu_items = true; + if ( ! empty( $menu_item->_invalid ) ) + $some_invalid_menu_items = true; + } + + if ( $some_pending_menu_items ) + $result .= '

    ' . __('Click Save Menu to make pending menu items public.') . '

    '; + + if ( $some_invalid_menu_items ) + $result .= '

    ' . __('There are some invalid menu items. Please check or delete them.') . '

    '; + + $result .= ' '; + return $result; + } elseif ( is_wp_error( $menu ) ) { + return $menu; + } + +} + +/** + * Returns the columns for the nav menus page. + * + * @since 3.0.0 + * + * @return string|WP_Error $output The menu formatted to edit or error object on failure. + */ +function wp_nav_menu_manage_columns() { + return array( + '_title' => __('Show advanced menu properties'), + 'cb' => '', + 'link-target' => __('Link Target'), + 'css-classes' => __('CSS Classes'), + 'xfn' => __('Link Relationship (XFN)'), + 'description' => __('Description'), + ); +} + +/** + * Deletes orphaned draft menu items + * + * @access private + * @since 3.0.0 + * + */ +function _wp_delete_orphaned_draft_menu_items() { + global $wpdb; + $delete_timestamp = time() - ( DAY_IN_SECONDS * EMPTY_TRASH_DAYS ); + + // delete orphaned draft menu items + $menu_items_to_delete = $wpdb->get_col($wpdb->prepare("SELECT ID FROM $wpdb->posts AS p LEFT JOIN $wpdb->postmeta AS m ON p.ID = m.post_id WHERE post_type = 'nav_menu_item' AND post_status = 'draft' AND meta_key = '_menu_item_orphaned' AND meta_value < '%d'", $delete_timestamp ) ); + + foreach( (array) $menu_items_to_delete as $menu_item_id ) + wp_delete_post( $menu_item_id, true ); +} +add_action('admin_head-nav-menus.php', '_wp_delete_orphaned_draft_menu_items'); + +/** + * Saves nav menu items + * + * @since 3.6.0 + * + * @uses wp_get_nav_menu_items() to retrieve the nav menu's menu items + * @uses wp_defer_term_counter() to enable then disable term counting + * + * @param int|string $nav_menu_selected_id (id, slug, or name ) of the currently-selected menu + * @param string $nav_menu_selected_title Title of the currently-selected menu + * @return array $messages The menu updated message + */ +function wp_nav_menu_update_menu_items ( $nav_menu_selected_id, $nav_menu_selected_title ) { + $unsorted_menu_items = wp_get_nav_menu_items( $nav_menu_selected_id, array( 'orderby' => 'ID', 'output' => ARRAY_A, 'output_key' => 'ID', 'post_status' => 'draft,publish' ) ); + + $menu_items = array(); + // Index menu items by db ID + foreach ( $unsorted_menu_items as $_item ) + $menu_items[$_item->db_id] = $_item; + + $post_fields = array( + 'menu-item-db-id', 'menu-item-object-id', 'menu-item-object', + 'menu-item-parent-id', 'menu-item-position', 'menu-item-type', + 'menu-item-title', 'menu-item-url', 'menu-item-description', + 'menu-item-attr-title', 'menu-item-target', 'menu-item-classes', 'menu-item-xfn' + ); + + wp_defer_term_counting( true ); + // Loop through all the menu items' POST variables + if ( ! empty( $_POST['menu-item-db-id'] ) ) { + foreach( (array) $_POST['menu-item-db-id'] as $_key => $k ) { + + // Menu item title can't be blank + if ( ! isset( $_POST['menu-item-title'][ $_key ] ) || '' == $_POST['menu-item-title'][ $_key ] ) + continue; + + $args = array(); + foreach ( $post_fields as $field ) + $args[$field] = isset( $_POST[$field][$_key] ) ? $_POST[$field][$_key] : ''; + + $menu_item_db_id = wp_update_nav_menu_item( $nav_menu_selected_id, ( $_POST['menu-item-db-id'][$_key] != $_key ? 0 : $_key ), $args ); + + if ( is_wp_error( $menu_item_db_id ) ) + $messages[] = '

    ' . $menu_item_db_id->get_error_message() . '

    '; + elseif ( isset( $menu_items[$menu_item_db_id] ) ) + unset( $menu_items[$menu_item_db_id] ); + } + } + + // Remove menu items from the menu that weren't in $_POST + if ( ! empty( $menu_items ) ) { + foreach ( array_keys( $menu_items ) as $menu_item_id ) { + if ( is_nav_menu_item( $menu_item_id ) ) { + wp_delete_post( $menu_item_id ); + } + } + } + + // Store 'auto-add' pages. + $auto_add = ! empty( $_POST['auto-add-pages'] ); + $nav_menu_option = (array) get_option( 'nav_menu_options' ); + if ( ! isset( $nav_menu_option['auto_add'] ) ) + $nav_menu_option['auto_add'] = array(); + if ( $auto_add ) { + if ( ! in_array( $nav_menu_selected_id, $nav_menu_option['auto_add'] ) ) + $nav_menu_option['auto_add'][] = $nav_menu_selected_id; + } else { + if ( false !== ( $key = array_search( $nav_menu_selected_id, $nav_menu_option['auto_add'] ) ) ) + unset( $nav_menu_option['auto_add'][$key] ); + } + // Remove nonexistent/deleted menus + $nav_menu_option['auto_add'] = array_intersect( $nav_menu_option['auto_add'], wp_get_nav_menus( array( 'fields' => 'ids' ) ) ); + update_option( 'nav_menu_options', $nav_menu_option ); + + wp_defer_term_counting( false ); + + /** This action is documented in wp-includes/nav-menu.php */ + do_action( 'wp_update_nav_menu', $nav_menu_selected_id ); + + $messages[] = '

    ' . sprintf( __( '%1$s has been updated.' ), $nav_menu_selected_title ) . '

    '; + unset( $menu_items, $unsorted_menu_items ); + + return $messages; +} diff --git a/wp-admin/includes/plugin-install.php b/wp-admin/includes/plugin-install.php new file mode 100644 index 0000000..44a6a1b --- /dev/null +++ b/wp-admin/includes/plugin-install.php @@ -0,0 +1,457 @@ +per_page) ) + $args->per_page = 24; + + /** + * Override the Plugin Install API arguments. + * + * Please ensure that an object is returned. + * + * @since 2.7.0 + * + * @param object $args Plugin API arguments. + * @param string $action The type of information being requested from the Plugin Install API. + */ + $args = apply_filters( 'plugins_api_args', $args, $action ); + + /** + * Allows a plugin to override the WordPress.org Plugin Install API entirely. + * + * Please ensure that an object is returned. + * + * @since 2.7.0 + * + * @param bool|object $result The result object. Default false. + * @param string $action The type of information being requested from the Plugin Install API. + * @param object $args Plugin API arguments. + */ + $res = apply_filters( 'plugins_api', false, $action, $args ); + + if ( false === $res ) { + $url = $http_url = 'http://api.wordpress.org/plugins/info/1.0/'; + if ( $ssl = wp_http_supports( array( 'ssl' ) ) ) + $url = set_url_scheme( $url, 'https' ); + + $args = array( + 'timeout' => 15, + 'body' => array( + 'action' => $action, + 'request' => serialize( $args ) + ) + ); + $request = wp_remote_post( $url, $args ); + + if ( $ssl && is_wp_error( $request ) ) { + trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE ); + $request = wp_remote_post( $http_url, $args ); + } + + if ( is_wp_error($request) ) { + $res = new WP_Error('plugins_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ), $request->get_error_message() ); + } else { + $res = maybe_unserialize( wp_remote_retrieve_body( $request ) ); + if ( ! is_object( $res ) && ! is_array( $res ) ) + $res = new WP_Error('plugins_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ), wp_remote_retrieve_body( $request ) ); + } + } elseif ( !is_wp_error($res) ) { + $res->external = true; + } + + /** + * Filter the Plugin Install API response results. + * + * @since 2.7.0 + * + * @param object|WP_Error $res Response object or WP_Error. + * @param string $action The type of information being requested from the Plugin Install API. + * @param object $args Plugin API arguments. + */ + return apply_filters( 'plugins_api_result', $res, $action, $args ); +} + +/** + * Retrieve popular WordPress plugin tags. + * + * @since 2.7.0 + * + * @param array $args + * @return array + */ +function install_popular_tags( $args = array() ) { + $key = md5(serialize($args)); + if ( false !== ($tags = get_site_transient('poptags_' . $key) ) ) + return $tags; + + $tags = plugins_api('hot_tags', $args); + + if ( is_wp_error($tags) ) + return $tags; + + set_site_transient( 'poptags_' . $key, $tags, 3 * HOUR_IN_SECONDS ); + + return $tags; +} + +function install_dashboard() { + ?> +

    WordPress Plugin Directory or upload a plugin in .zip format via this page.' ), 'https://wordpress.org/plugins/', self_admin_url( 'plugin-install.php?tab=upload' ) ); ?>

    + +

    + + +

    +

    + '; + if ( is_wp_error($api_tags) ) { + echo $api_tags->get_error_message(); + } else { + //Set up the tags in a way which can be interpreted by wp_generate_tag_cloud() + $tags = array(); + foreach ( (array)$api_tags as $tag ) + $tags[ $tag['name'] ] = (object) array( + 'link' => esc_url( self_admin_url('plugin-install.php?tab=search&type=tag&s=' . urlencode($tag['name'])) ), + 'name' => $tag['name'], + 'id' => sanitize_title_with_dashes($tag['name']), + 'count' => $tag['count'] ); + echo wp_generate_tag_cloud($tags, array( 'single_text' => __('%s plugin'), 'multiple_text' => __('%s plugins') ) ); + } + echo '


    '; +} +add_action('install_plugins_dashboard', 'install_dashboard'); + +/** + * Display search form for searching plugins. + * + * @since 2.7.0 + */ +function install_search_form( $type_selector = true ) { + $type = isset($_REQUEST['type']) ? wp_unslash( $_REQUEST['type'] ) : 'term'; + $term = isset($_REQUEST['s']) ? wp_unslash( $_REQUEST['s'] ) : ''; + + ?>
    + + + + + + + +
    +

    +

    +
    + + + + +
    + +

    +
    + +

    + + + +

    +
    + display(); +} +add_action( 'install_plugins_search', 'display_plugins_table' ); +add_action( 'install_plugins_featured', 'display_plugins_table' ); +add_action( 'install_plugins_popular', 'display_plugins_table' ); +add_action( 'install_plugins_new', 'display_plugins_table' ); +add_action( 'install_plugins_favorites', 'display_plugins_table' ); + +/** + * Determine the status we can perform on a plugin. + * + * @since 3.0.0 + */ +function install_plugin_install_status($api, $loop = false) { + // this function is called recursively, $loop prevents further loops. + if ( is_array($api) ) + $api = (object) $api; + + //Default to a "new" plugin + $status = 'install'; + $url = false; + + //Check to see if this plugin is known to be installed, and has an update awaiting it. + $update_plugins = get_site_transient('update_plugins'); + if ( isset( $update_plugins->response ) ) { + foreach ( (array)$update_plugins->response as $file => $plugin ) { + if ( $plugin->slug === $api->slug ) { + $status = 'update_available'; + $update_file = $file; + $version = $plugin->new_version; + if ( current_user_can('update_plugins') ) + $url = wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=' . $update_file), 'upgrade-plugin_' . $update_file); + break; + } + } + } + + if ( 'install' == $status ) { + if ( is_dir( WP_PLUGIN_DIR . '/' . $api->slug ) ) { + $installed_plugin = get_plugins('/' . $api->slug); + if ( empty($installed_plugin) ) { + if ( current_user_can('install_plugins') ) + $url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $api->slug), 'install-plugin_' . $api->slug); + } else { + $key = array_keys( $installed_plugin ); + $key = array_shift( $key ); //Use the first plugin regardless of the name, Could have issues for multiple-plugins in one directory if they share different version numbers + if ( version_compare($api->version, $installed_plugin[ $key ]['Version'], '=') ){ + $status = 'latest_installed'; + } elseif ( version_compare($api->version, $installed_plugin[ $key ]['Version'], '<') ) { + $status = 'newer_installed'; + $version = $installed_plugin[ $key ]['Version']; + } else { + //If the above update check failed, Then that probably means that the update checker has out-of-date information, force a refresh + if ( ! $loop ) { + delete_site_transient('update_plugins'); + wp_update_plugins(); + return install_plugin_install_status($api, true); + } + } + } + } else { + // "install" & no directory with that slug + if ( current_user_can('install_plugins') ) + $url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $api->slug), 'install-plugin_' . $api->slug); + } + } + if ( isset($_GET['from']) ) + $url .= '&from=' . urlencode( wp_unslash( $_GET['from'] ) ); + + return compact('status', 'url', 'version'); +} + +/** + * Display plugin information in dialog box form. + * + * @since 2.7.0 + */ +function install_plugin_information() { + global $tab; + + $api = plugins_api( 'plugin_information', array( 'slug' => wp_unslash( $_REQUEST['plugin'] ), 'is_ssl' => is_ssl() ) ); + + if ( is_wp_error( $api ) ) + wp_die( $api ); + + $plugins_allowedtags = array( + 'a' => array( 'href' => array(), 'title' => array(), 'target' => array() ), + 'abbr' => array( 'title' => array() ), 'acronym' => array( 'title' => array() ), + 'code' => array(), 'pre' => array(), 'em' => array(), 'strong' => array(), + 'div' => array(), 'p' => array(), 'ul' => array(), 'ol' => array(), 'li' => array(), + 'h1' => array(), 'h2' => array(), 'h3' => array(), 'h4' => array(), 'h5' => array(), 'h6' => array(), + 'img' => array( 'src' => array(), 'class' => array(), 'alt' => array() ) + ); + + $plugins_section_titles = array( + 'description' => _x('Description', 'Plugin installer section title'), + 'installation' => _x('Installation', 'Plugin installer section title'), + 'faq' => _x('FAQ', 'Plugin installer section title'), + 'screenshots' => _x('Screenshots', 'Plugin installer section title'), + 'changelog' => _x('Changelog', 'Plugin installer section title'), + 'other_notes' => _x('Other Notes', 'Plugin installer section title') + ); + + //Sanitize HTML + foreach ( (array)$api->sections as $section_name => $content ) { + $api->sections[$section_name] = wp_kses($content, $plugins_allowedtags); + } + + foreach ( array( 'version', 'author', 'requires', 'tested', 'homepage', 'downloaded', 'slug' ) as $key ) { + if ( isset( $api->$key ) ) + $api->$key = wp_kses( $api->$key, $plugins_allowedtags ); + } + + $_tab = esc_attr( $tab ); + + $section = isset( $_REQUEST['section'] ) ? wp_unslash( $_REQUEST['section'] ) : 'description'; //Default to the Description tab, Do not translate, API returns English. + if ( empty( $section ) || ! isset( $api->sections[ $section ] ) ) { + $section_titles = array_keys( (array) $api->sections ); + $section = array_shift( $section_titles ); + } + + iframe_header( __('Plugin Install') ); + + echo "
    {$api->name}
    "; + echo "
    \n"; + + foreach ( (array)$api->sections as $section_name => $content ) { + + if ( isset( $plugins_section_titles[ $section_name ] ) ) + $title = $plugins_section_titles[ $section_name ]; + else + $title = ucwords( str_replace( '_', ' ', $section_name ) ); + + $class = ( $section_name == $section ) ? ' class="current"' : ''; + $href = add_query_arg( array('tab' => $tab, 'section' => $section_name) ); + $href = esc_url( $href ); + $san_section = esc_attr( $section_name ); + echo "\t$title\n"; + } + + echo "
    \n"; + + ?> +
    +
    +
      +version ) ) : ?> +
    • version ?>
    • +author ) ) : ?> +
    • author, '_blank') ?>
    • +last_updated ) ) : ?> +
    • last_updated)) ) ?>
    • +requires ) ) : ?> +
    • requires) ?>
    • +tested ) ) : ?> +
    • tested ?>
    • +downloaded ) ) : ?> +
    • downloaded), number_format_i18n($api->downloaded)) ?>
    • +slug ) && empty( $api->external ) ) : ?> +
    • +homepage ) ) : ?> +
    • + +
    + rating ) ) : ?> +

    + $api->rating, 'type' => 'percent', 'number' => $api->num_ratings ) ); ?> + num_ratings), number_format_i18n($api->num_ratings) ); ?> + +
    +
    + tested ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->tested ) ), $api->tested, '>' ) ) + echo '

    ' . __('Warning: This plugin has not been tested with your current version of WordPress.') . '

    '; + + else if ( ! empty( $api->requires ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->requires ) ), $api->requires, '<' ) ) + echo '

    ' . __('Warning: This plugin has not been marked as compatible with your version of WordPress.') . '

    '; + + foreach ( (array)$api->sections as $section_name => $content ) { + + if ( isset( $plugins_section_titles[ $section_name ] ) ) + $title = $plugins_section_titles[ $section_name ]; + else + $title = ucwords( str_replace( '_', ' ', $section_name ) ); + + $content = links_add_base_url( $content, 'https://wordpress.org/plugins/' . $api->slug . '/' ); + $content = links_add_target( $content, '_blank' ); + + $san_section = esc_attr( $section_name ); + + $display = ( $section_name == $section ) ? 'block' : 'none'; + + echo "\t
    \n"; + echo $content; + echo "\t
    \n"; + } + echo "
    \n"; + echo "
    \n"; + echo "\n"; + + iframe_footer(); + exit; +} +add_action('install_plugins_pre_plugin-information', 'install_plugin_information'); diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php new file mode 100644 index 0000000..08adef8 --- /dev/null +++ b/wp-admin/includes/plugin.php @@ -0,0 +1,1872 @@ + + * /* + * Plugin Name: Name of Plugin + * Plugin URI: Link to plugin information + * Description: Plugin Description + * Author: Plugin author's name + * Author URI: Link to the author's web site + * Version: Must be set in the plugin for WordPress 2.3+ + * Text Domain: Optional. Unique identifier, should be same as the one used in + * plugin_text_domain() + * Domain Path: Optional. Only useful if the translations are located in a + * folder above the plugin's base path. For example, if .mo files are + * located in the locale folder then Domain Path will be "/locale/" and + * must have the first slash. Defaults to the base folder the plugin is + * located in. + * Network: Optional. Specify "Network: true" to require that a plugin is activated + * across all sites in an installation. This will prevent a plugin from being + * activated on a single site when Multisite is enabled. + * * / # Remove the space to close comment + * + * + * Plugin data returned array contains the following: + * 'Name' - Name of the plugin, must be unique. + * 'Title' - Title of the plugin and the link to the plugin's web site. + * 'Description' - Description of what the plugin does and/or notes + * from the author. + * 'Author' - The author's name + * 'AuthorURI' - The authors web site address. + * 'Version' - The plugin version number. + * 'PluginURI' - Plugin web site address. + * 'TextDomain' - Plugin's text domain for localization. + * 'DomainPath' - Plugin's relative directory path to .mo files. + * 'Network' - Boolean. Whether the plugin can only be activated network wide. + * + * Some users have issues with opening large files and manipulating the contents + * for want is usually the first 1kiB or 2kiB. This function stops pulling in + * the plugin contents when it has all of the required plugin data. + * + * The first 8kiB of the file will be pulled in and if the plugin data is not + * within that first 8kiB, then the plugin author should correct their plugin + * and move the plugin data headers to the top. + * + * The plugin file is assumed to have permissions to allow for scripts to read + * the file. This is not checked however and the file is only opened for + * reading. + * + * @link http://trac.wordpress.org/ticket/5651 Previous Optimizations. + * @link http://trac.wordpress.org/ticket/7372 Further and better Optimizations. + * @since 1.5.0 + * + * @param string $plugin_file Path to the plugin file + * @param bool $markup Optional. If the returned data should have HTML markup applied. Defaults to true. + * @param bool $translate Optional. If the returned data should be translated. Defaults to true. + * @return array See above for description. + */ +function get_plugin_data( $plugin_file, $markup = true, $translate = true ) { + + $default_headers = array( + 'Name' => 'Plugin Name', + 'PluginURI' => 'Plugin URI', + 'Version' => 'Version', + 'Description' => 'Description', + 'Author' => 'Author', + 'AuthorURI' => 'Author URI', + 'TextDomain' => 'Text Domain', + 'DomainPath' => 'Domain Path', + 'Network' => 'Network', + // Site Wide Only is deprecated in favor of Network. + '_sitewide' => 'Site Wide Only', + ); + + $plugin_data = get_file_data( $plugin_file, $default_headers, 'plugin' ); + + // Site Wide Only is the old header for Network + if ( ! $plugin_data['Network'] && $plugin_data['_sitewide'] ) { + _deprecated_argument( __FUNCTION__, '3.0', sprintf( __( 'The %1$s plugin header is deprecated. Use %2$s instead.' ), 'Site Wide Only: true', 'Network: true' ) ); + $plugin_data['Network'] = $plugin_data['_sitewide']; + } + $plugin_data['Network'] = ( 'true' == strtolower( $plugin_data['Network'] ) ); + unset( $plugin_data['_sitewide'] ); + + if ( $markup || $translate ) { + $plugin_data = _get_plugin_data_markup_translate( $plugin_file, $plugin_data, $markup, $translate ); + } else { + $plugin_data['Title'] = $plugin_data['Name']; + $plugin_data['AuthorName'] = $plugin_data['Author']; + } + + return $plugin_data; +} + +/** + * Sanitizes plugin data, optionally adds markup, optionally translates. + * + * @since 2.7.0 + * @access private + * @see get_plugin_data() + */ +function _get_plugin_data_markup_translate( $plugin_file, $plugin_data, $markup = true, $translate = true ) { + + // Sanitize the plugin filename to a WP_PLUGIN_DIR relative path + $plugin_file = plugin_basename( $plugin_file ); + + // Translate fields + if ( $translate ) { + if ( $textdomain = $plugin_data['TextDomain'] ) { + if ( $plugin_data['DomainPath'] ) + load_plugin_textdomain( $textdomain, false, dirname( $plugin_file ) . $plugin_data['DomainPath'] ); + else + load_plugin_textdomain( $textdomain, false, dirname( $plugin_file ) ); + } elseif ( in_array( basename( $plugin_file ), array( 'hello.php', 'akismet.php' ) ) ) { + $textdomain = 'default'; + } + if ( $textdomain ) { + foreach ( array( 'Name', 'PluginURI', 'Description', 'Author', 'AuthorURI', 'Version' ) as $field ) + $plugin_data[ $field ] = translate( $plugin_data[ $field ], $textdomain ); + } + } + + // Sanitize fields + $allowed_tags = $allowed_tags_in_links = array( + 'abbr' => array( 'title' => true ), + 'acronym' => array( 'title' => true ), + 'code' => true, + 'em' => true, + 'strong' => true, + ); + $allowed_tags['a'] = array( 'href' => true, 'title' => true ); + + // Name is marked up inside tags. Don't allow these. + // Author is too, but some plugins have used here (omitting Author URI). + $plugin_data['Name'] = wp_kses( $plugin_data['Name'], $allowed_tags_in_links ); + $plugin_data['Author'] = wp_kses( $plugin_data['Author'], $allowed_tags ); + + $plugin_data['Description'] = wp_kses( $plugin_data['Description'], $allowed_tags ); + $plugin_data['Version'] = wp_kses( $plugin_data['Version'], $allowed_tags ); + + $plugin_data['PluginURI'] = esc_url( $plugin_data['PluginURI'] ); + $plugin_data['AuthorURI'] = esc_url( $plugin_data['AuthorURI'] ); + + $plugin_data['Title'] = $plugin_data['Name']; + $plugin_data['AuthorName'] = $plugin_data['Author']; + + // Apply markup + if ( $markup ) { + if ( $plugin_data['PluginURI'] && $plugin_data['Name'] ) + $plugin_data['Title'] = '' . $plugin_data['Name'] . ''; + + if ( $plugin_data['AuthorURI'] && $plugin_data['Author'] ) + $plugin_data['Author'] = '' . $plugin_data['Author'] . ''; + + $plugin_data['Description'] = wptexturize( $plugin_data['Description'] ); + + if ( $plugin_data['Author'] ) + $plugin_data['Description'] .= ' ' . sprintf( __('By %s.'), $plugin_data['Author'] ) . ''; + } + + return $plugin_data; +} + +/** + * Get a list of a plugin's files. + * + * @since 2.8.0 + * + * @param string $plugin Plugin ID + * @return array List of files relative to the plugin root. + */ +function get_plugin_files($plugin) { + $plugin_file = WP_PLUGIN_DIR . '/' . $plugin; + $dir = dirname($plugin_file); + $plugin_files = array($plugin); + if ( is_dir($dir) && $dir != WP_PLUGIN_DIR ) { + $plugins_dir = @ opendir( $dir ); + if ( $plugins_dir ) { + while (($file = readdir( $plugins_dir ) ) !== false ) { + if ( substr($file, 0, 1) == '.' ) + continue; + if ( is_dir( $dir . '/' . $file ) ) { + $plugins_subdir = @ opendir( $dir . '/' . $file ); + if ( $plugins_subdir ) { + while (($subfile = readdir( $plugins_subdir ) ) !== false ) { + if ( substr($subfile, 0, 1) == '.' ) + continue; + $plugin_files[] = plugin_basename("$dir/$file/$subfile"); + } + @closedir( $plugins_subdir ); + } + } else { + if ( plugin_basename("$dir/$file") != $plugin ) + $plugin_files[] = plugin_basename("$dir/$file"); + } + } + @closedir( $plugins_dir ); + } + } + + return $plugin_files; +} + +/** + * Check the plugins directory and retrieve all plugin files with plugin data. + * + * WordPress only supports plugin files in the base plugins directory + * (wp-content/plugins) and in one directory above the plugins directory + * (wp-content/plugins/my-plugin). The file it looks for has the plugin data and + * must be found in those two locations. It is recommended that do keep your + * plugin files in directories. + * + * The file with the plugin data is the file that will be included and therefore + * needs to have the main execution for the plugin. This does not mean + * everything must be contained in the file and it is recommended that the file + * be split for maintainability. Keep everything in one file for extreme + * optimization purposes. + * + * @since 1.5.0 + * + * @param string $plugin_folder Optional. Relative path to single plugin folder. + * @return array Key is the plugin file path and the value is an array of the plugin data. + */ +function get_plugins($plugin_folder = '') { + + if ( ! $cache_plugins = wp_cache_get('plugins', 'plugins') ) + $cache_plugins = array(); + + if ( isset($cache_plugins[ $plugin_folder ]) ) + return $cache_plugins[ $plugin_folder ]; + + $wp_plugins = array (); + $plugin_root = WP_PLUGIN_DIR; + if ( !empty($plugin_folder) ) + $plugin_root .= $plugin_folder; + + // Files in wp-content/plugins directory + $plugins_dir = @ opendir( $plugin_root); + $plugin_files = array(); + if ( $plugins_dir ) { + while (($file = readdir( $plugins_dir ) ) !== false ) { + if ( substr($file, 0, 1) == '.' ) + continue; + if ( is_dir( $plugin_root.'/'.$file ) ) { + $plugins_subdir = @ opendir( $plugin_root.'/'.$file ); + if ( $plugins_subdir ) { + while (($subfile = readdir( $plugins_subdir ) ) !== false ) { + if ( substr($subfile, 0, 1) == '.' ) + continue; + if ( substr($subfile, -4) == '.php' ) + $plugin_files[] = "$file/$subfile"; + } + closedir( $plugins_subdir ); + } + } else { + if ( substr($file, -4) == '.php' ) + $plugin_files[] = $file; + } + } + closedir( $plugins_dir ); + } + + if ( empty($plugin_files) ) + return $wp_plugins; + + foreach ( $plugin_files as $plugin_file ) { + if ( !is_readable( "$plugin_root/$plugin_file" ) ) + continue; + + $plugin_data = get_plugin_data( "$plugin_root/$plugin_file", false, false ); //Do not apply markup/translate as it'll be cached. + + if ( empty ( $plugin_data['Name'] ) ) + continue; + + $wp_plugins[plugin_basename( $plugin_file )] = $plugin_data; + } + + uasort( $wp_plugins, '_sort_uname_callback' ); + + $cache_plugins[ $plugin_folder ] = $wp_plugins; + wp_cache_set('plugins', $cache_plugins, 'plugins'); + + return $wp_plugins; +} + +/** + * Check the mu-plugins directory and retrieve all mu-plugin files with any plugin data. + * + * WordPress only includes mu-plugin files in the base mu-plugins directory (wp-content/mu-plugins). + * + * @since 3.0.0 + * @return array Key is the mu-plugin file path and the value is an array of the mu-plugin data. + */ +function get_mu_plugins() { + $wp_plugins = array(); + // Files in wp-content/mu-plugins directory + $plugin_files = array(); + + if ( ! is_dir( WPMU_PLUGIN_DIR ) ) + return $wp_plugins; + if ( $plugins_dir = @ opendir( WPMU_PLUGIN_DIR ) ) { + while ( ( $file = readdir( $plugins_dir ) ) !== false ) { + if ( substr( $file, -4 ) == '.php' ) + $plugin_files[] = $file; + } + } else { + return $wp_plugins; + } + + @closedir( $plugins_dir ); + + if ( empty($plugin_files) ) + return $wp_plugins; + + foreach ( $plugin_files as $plugin_file ) { + if ( !is_readable( WPMU_PLUGIN_DIR . "/$plugin_file" ) ) + continue; + + $plugin_data = get_plugin_data( WPMU_PLUGIN_DIR . "/$plugin_file", false, false ); //Do not apply markup/translate as it'll be cached. + + if ( empty ( $plugin_data['Name'] ) ) + $plugin_data['Name'] = $plugin_file; + + $wp_plugins[ $plugin_file ] = $plugin_data; + } + + if ( isset( $wp_plugins['index.php'] ) && filesize( WPMU_PLUGIN_DIR . '/index.php') <= 30 ) // silence is golden + unset( $wp_plugins['index.php'] ); + + uasort( $wp_plugins, '_sort_uname_callback' ); + + return $wp_plugins; +} + +/** + * Callback to sort array by a 'Name' key. + * + * @since 3.1.0 + * @access private + */ +function _sort_uname_callback( $a, $b ) { + return strnatcasecmp( $a['Name'], $b['Name'] ); +} + +/** + * Check the wp-content directory and retrieve all drop-ins with any plugin data. + * + * @since 3.0.0 + * @return array Key is the file path and the value is an array of the plugin data. + */ +function get_dropins() { + $dropins = array(); + $plugin_files = array(); + + $_dropins = _get_dropins(); + + // These exist in the wp-content directory + if ( $plugins_dir = @ opendir( WP_CONTENT_DIR ) ) { + while ( ( $file = readdir( $plugins_dir ) ) !== false ) { + if ( isset( $_dropins[ $file ] ) ) + $plugin_files[] = $file; + } + } else { + return $dropins; + } + + @closedir( $plugins_dir ); + + if ( empty($plugin_files) ) + return $dropins; + + foreach ( $plugin_files as $plugin_file ) { + if ( !is_readable( WP_CONTENT_DIR . "/$plugin_file" ) ) + continue; + $plugin_data = get_plugin_data( WP_CONTENT_DIR . "/$plugin_file", false, false ); //Do not apply markup/translate as it'll be cached. + if ( empty( $plugin_data['Name'] ) ) + $plugin_data['Name'] = $plugin_file; + $dropins[ $plugin_file ] = $plugin_data; + } + + uksort( $dropins, 'strnatcasecmp' ); + + return $dropins; +} + +/** + * Returns drop-ins that WordPress uses. + * + * Includes Multisite drop-ins only when is_multisite() + * + * @since 3.0.0 + * @return array Key is file name. The value is an array, with the first value the + * purpose of the drop-in and the second value the name of the constant that must be + * true for the drop-in to be used, or true if no constant is required. + */ +function _get_dropins() { + $dropins = array( + 'advanced-cache.php' => array( __( 'Advanced caching plugin.' ), 'WP_CACHE' ), // WP_CACHE + 'db.php' => array( __( 'Custom database class.' ), true ), // auto on load + 'db-error.php' => array( __( 'Custom database error message.' ), true ), // auto on error + 'install.php' => array( __( 'Custom install script.' ), true ), // auto on install + 'maintenance.php' => array( __( 'Custom maintenance message.' ), true ), // auto on maintenance + 'object-cache.php' => array( __( 'External object cache.' ), true ), // auto on load + ); + + if ( is_multisite() ) { + $dropins['sunrise.php' ] = array( __( 'Executed before Multisite is loaded.' ), 'SUNRISE' ); // SUNRISE + $dropins['blog-deleted.php' ] = array( __( 'Custom site deleted message.' ), true ); // auto on deleted blog + $dropins['blog-inactive.php' ] = array( __( 'Custom site inactive message.' ), true ); // auto on inactive blog + $dropins['blog-suspended.php'] = array( __( 'Custom site suspended message.' ), true ); // auto on archived or spammed blog + } + + return $dropins; +} + +/** + * Check whether the plugin is active by checking the active_plugins list. + * + * @since 2.5.0 + * + * @param string $plugin Base plugin path from plugins directory. + * @return bool True, if in the active plugins list. False, not in the list. + */ +function is_plugin_active( $plugin ) { + return in_array( $plugin, (array) get_option( 'active_plugins', array() ) ) || is_plugin_active_for_network( $plugin ); +} + +/** + * Check whether the plugin is inactive. + * + * Reverse of is_plugin_active(). Used as a callback. + * + * @since 3.1.0 + * @see is_plugin_active() + * + * @param string $plugin Base plugin path from plugins directory. + * @return bool True if inactive. False if active. + */ +function is_plugin_inactive( $plugin ) { + return ! is_plugin_active( $plugin ); +} + +/** + * Check whether the plugin is active for the entire network. + * + * @since 3.0.0 + * + * @param string $plugin Base plugin path from plugins directory. + * @return bool True, if active for the network, otherwise false. + */ +function is_plugin_active_for_network( $plugin ) { + if ( !is_multisite() ) + return false; + + $plugins = get_site_option( 'active_sitewide_plugins'); + if ( isset($plugins[$plugin]) ) + return true; + + return false; +} + +/** + * Checks for "Network: true" in the plugin header to see if this should + * be activated only as a network wide plugin. The plugin would also work + * when Multisite is not enabled. + * + * Checks for "Site Wide Only: true" for backwards compatibility. + * + * @since 3.0.0 + * + * @param string $plugin Plugin to check + * @return bool True if plugin is network only, false otherwise. + */ +function is_network_only_plugin( $plugin ) { + $plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin ); + if ( $plugin_data ) + return $plugin_data['Network']; + return false; +} + +/** + * Attempts activation of plugin in a "sandbox" and redirects on success. + * + * A plugin that is already activated will not attempt to be activated again. + * + * The way it works is by setting the redirection to the error before trying to + * include the plugin file. If the plugin fails, then the redirection will not + * be overwritten with the success message. Also, the options will not be + * updated and the activation hook will not be called on plugin error. + * + * It should be noted that in no way the below code will actually prevent errors + * within the file. The code should not be used elsewhere to replicate the + * "sandbox", which uses redirection to work. + * {@source 13 1} + * + * If any errors are found or text is outputted, then it will be captured to + * ensure that the success redirection will update the error redirection. + * + * @since 2.5.0 + * + * @param string $plugin Plugin path to main plugin file with plugin data. + * @param string $redirect Optional. URL to redirect to. + * @param bool $network_wide Whether to enable the plugin for all sites in the + * network or just the current site. Multisite only. Default is false. + * @param bool $silent Prevent calling activation hooks. Optional, default is false. + * @return WP_Error|null WP_Error on invalid file or null on success. + */ +function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silent = false ) { + $plugin = plugin_basename( trim( $plugin ) ); + + if ( is_multisite() && ( $network_wide || is_network_only_plugin($plugin) ) ) { + $network_wide = true; + $current = get_site_option( 'active_sitewide_plugins', array() ); + $_GET['networkwide'] = 1; // Back compat for plugins looking for this value. + } else { + $current = get_option( 'active_plugins', array() ); + } + + $valid = validate_plugin($plugin); + if ( is_wp_error($valid) ) + return $valid; + + if ( !in_array($plugin, $current) ) { + if ( !empty($redirect) ) + wp_redirect(add_query_arg('_error_nonce', wp_create_nonce('plugin-activation-error_' . $plugin), $redirect)); // we'll override this later if the plugin can be included without fatal error + ob_start(); + wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin ); + include_once( WP_PLUGIN_DIR . '/' . $plugin ); + + if ( ! $silent ) { + /** + * Fires before a plugin is activated. + * + * If a plugin is silently activated (such as during an update), + * this hook does not fire. + * + * @since 2.9.0 + * + * @param string $plugin Plugin path to main plugin file with plugin data. + * @param bool $network_wide Whether to enable the plugin for all sites in the network + * or just the current site. Multisite only. Default is false. + */ + do_action( 'activate_plugin', $plugin, $network_wide ); + + /** + * Fires as a specific plugin is being deactivated. + * + * This hook is the "deactivation" hook used internally by + * register_deactivation_hook(). The dynamic portion of the + * hook name, $plugin. refers to the plugin basename. + * + * If a plugin is silently activated (such as during an update), + * this hook does not fire. + * + * @since 2.0.0 + * + * @param bool $network_wide Whether to enable the plugin for all sites in the network + * or just the current site. Multisite only. Default is false. + */ + do_action( 'activate_' . $plugin, $network_wide ); + } + + if ( $network_wide ) { + $current[$plugin] = time(); + update_site_option( 'active_sitewide_plugins', $current ); + } else { + $current[] = $plugin; + sort($current); + update_option('active_plugins', $current); + } + + if ( ! $silent ) { + /** + * Fires after a plugin has been activated. + * + * If a plugin is silently activated (such as during an update), + * this hook does not fire. + * + * @since 2.9.0 + * + * @param string $plugin Plugin path to main plugin file with plugin data. + * @param bool $network_wide Whether to enable the plugin for all sites in the network + * or just the current site. Multisite only. Default is false. + */ + do_action( 'activated_plugin', $plugin, $network_wide ); + } + + if ( ob_get_length() > 0 ) { + $output = ob_get_clean(); + return new WP_Error('unexpected_output', __('The plugin generated unexpected output.'), $output); + } + ob_end_clean(); + } + + return null; +} + +/** + * Deactivate a single plugin or multiple plugins. + * + * The deactivation hook is disabled by the plugin upgrader by using the $silent + * parameter. + * + * @since 2.5.0 + * + * @param string|array $plugins Single plugin or list of plugins to deactivate. + * @param bool $silent Prevent calling deactivation hooks. Default is false. + * @param mixed $network_wide Whether to deactivate the plugin for all sites in the network. + * A value of null (the default) will deactivate plugins for both the site and the network. + */ +function deactivate_plugins( $plugins, $silent = false, $network_wide = null ) { + if ( is_multisite() ) + $network_current = get_site_option( 'active_sitewide_plugins', array() ); + $current = get_option( 'active_plugins', array() ); + $do_blog = $do_network = false; + + foreach ( (array) $plugins as $plugin ) { + $plugin = plugin_basename( trim( $plugin ) ); + if ( ! is_plugin_active($plugin) ) + continue; + + $network_deactivating = false !== $network_wide && is_plugin_active_for_network( $plugin ); + + if ( ! $silent ) { + /** + * Fires before a plugin is deactivated. + * + * If a plugin is silently deactivated (such as during an update), + * this hook does not fire. + * + * @since 2.9.0 + * + * @param string $plugin Plugin path to main plugin file with plugin data. + * @param bool $network_deactivating Whether the plugin is deactivated for all sites in the network + * or just the current site. Multisite only. Default is false. + */ + do_action( 'deactivate_plugin', $plugin, $network_deactivating ); + } + + if ( false !== $network_wide ) { + if ( is_plugin_active_for_network( $plugin ) ) { + $do_network = true; + unset( $network_current[ $plugin ] ); + } elseif ( $network_wide ) { + continue; + } + } + + if ( true !== $network_wide ) { + $key = array_search( $plugin, $current ); + if ( false !== $key ) { + $do_blog = true; + unset( $current[ $key ] ); + } + } + + if ( ! $silent ) { + /** + * Fires as a specific plugin is being deactivated. + * + * This hook is the "deactivation" hook used internally by + * register_deactivation_hook(). The dynamic portion of the + * hook name, $plugin. refers to the plugin basename. + * + * If a plugin is silently deactivated (such as during an update), + * this hook does not fire. + * + * @since 2.0.0 + * + * @param bool $network_deactivating Whether the plugin is deactivated for all sites in the network + * or just the current site. Multisite only. Default is false. + */ + do_action( 'deactivate_' . $plugin, $network_deactivating ); + + /** + * Fires after a plugin is deactivated. + * + * If a plugin is silently deactivated (such as during an update), + * this hook does not fire. + * + * @since 2.9.0 + * + * @param string $plugin Plugin basename. + * @param bool $network_deactivating Whether the plugin is deactivated for all sites in the network + * or just the current site. Multisite only. Default false. + */ + do_action( 'deactivated_plugin', $plugin, $network_deactivating ); + } + } + + if ( $do_blog ) + update_option('active_plugins', $current); + if ( $do_network ) + update_site_option( 'active_sitewide_plugins', $network_current ); +} + +/** + * Activate multiple plugins. + * + * When WP_Error is returned, it does not mean that one of the plugins had + * errors. It means that one or more of the plugins file path was invalid. + * + * The execution will be halted as soon as one of the plugins has an error. + * + * @since 2.6.0 + * + * @param string|array $plugins + * @param string $redirect Redirect to page after successful activation. + * @param bool $network_wide Whether to enable the plugin for all sites in the network. + * @param bool $silent Prevent calling activation hooks. Default is false. + * @return bool|WP_Error True when finished or WP_Error if there were errors during a plugin activation. + */ +function activate_plugins( $plugins, $redirect = '', $network_wide = false, $silent = false ) { + if ( !is_array($plugins) ) + $plugins = array($plugins); + + $errors = array(); + foreach ( $plugins as $plugin ) { + if ( !empty($redirect) ) + $redirect = add_query_arg('plugin', $plugin, $redirect); + $result = activate_plugin($plugin, $redirect, $network_wide, $silent); + if ( is_wp_error($result) ) + $errors[$plugin] = $result; + } + + if ( !empty($errors) ) + return new WP_Error('plugins_invalid', __('One of the plugins is invalid.'), $errors); + + return true; +} + +/** + * Remove directory and files of a plugin for a single or list of plugin(s). + * + * If the plugins parameter list is empty, false will be returned. True when + * completed. + * + * @since 2.6.0 + * + * @param array $plugins List of plugin + * @param string $redirect Redirect to page when complete. + * @return mixed + */ +function delete_plugins($plugins, $redirect = '' ) { + global $wp_filesystem; + + if ( empty($plugins) ) + return false; + + $checked = array(); + foreach( $plugins as $plugin ) + $checked[] = 'checked[]=' . $plugin; + + ob_start(); + $url = wp_nonce_url('plugins.php?action=delete-selected&verify-delete=1&' . implode('&', $checked), 'bulk-plugins'); + if ( false === ($credentials = request_filesystem_credentials($url)) ) { + $data = ob_get_contents(); + ob_end_clean(); + if ( ! empty($data) ){ + include_once( ABSPATH . 'wp-admin/admin-header.php'); + echo $data; + include( ABSPATH . 'wp-admin/admin-footer.php'); + exit; + } + return; + } + + if ( ! WP_Filesystem($credentials) ) { + request_filesystem_credentials($url, '', true); //Failed to connect, Error and request again + $data = ob_get_contents(); + ob_end_clean(); + if ( ! empty($data) ){ + include_once( ABSPATH . 'wp-admin/admin-header.php'); + echo $data; + include( ABSPATH . 'wp-admin/admin-footer.php'); + exit; + } + return; + } + + if ( ! is_object($wp_filesystem) ) + return new WP_Error('fs_unavailable', __('Could not access filesystem.')); + + if ( is_wp_error($wp_filesystem->errors) && $wp_filesystem->errors->get_error_code() ) + return new WP_Error('fs_error', __('Filesystem error.'), $wp_filesystem->errors); + + //Get the base plugin folder + $plugins_dir = $wp_filesystem->wp_plugins_dir(); + if ( empty($plugins_dir) ) + return new WP_Error('fs_no_plugins_dir', __('Unable to locate WordPress Plugin directory.')); + + $plugins_dir = trailingslashit( $plugins_dir ); + + $errors = array(); + + foreach( $plugins as $plugin_file ) { + // Run Uninstall hook + if ( is_uninstallable_plugin( $plugin_file ) ) + uninstall_plugin($plugin_file); + + $this_plugin_dir = trailingslashit( dirname($plugins_dir . $plugin_file) ); + // If plugin is in its own directory, recursively delete the directory. + if ( strpos($plugin_file, '/') && $this_plugin_dir != $plugins_dir ) //base check on if plugin includes directory separator AND that it's not the root plugin folder + $deleted = $wp_filesystem->delete($this_plugin_dir, true); + else + $deleted = $wp_filesystem->delete($plugins_dir . $plugin_file); + + if ( ! $deleted ) + $errors[] = $plugin_file; + } + + // Remove deleted plugins from the plugin updates list. + if ( $current = get_site_transient('update_plugins') ) { + // Don't remove the plugins that weren't deleted. + $deleted = array_diff( $plugins, $errors ); + + foreach ( $deleted as $plugin_file ) { + unset( $current->response[ $plugin_file ] ); + } + + set_site_transient( 'update_plugins', $current ); + } + + if ( ! empty($errors) ) + return new WP_Error('could_not_remove_plugin', sprintf(__('Could not fully remove the plugin(s) %s.'), implode(', ', $errors)) ); + + return true; +} + +/** + * Validate active plugins + * + * Validate all active plugins, deactivates invalid and + * returns an array of deactivated ones. + * + * @since 2.5.0 + * @return array invalid plugins, plugin as key, error as value + */ +function validate_active_plugins() { + $plugins = get_option( 'active_plugins', array() ); + // validate vartype: array + if ( ! is_array( $plugins ) ) { + update_option( 'active_plugins', array() ); + $plugins = array(); + } + + if ( is_multisite() && current_user_can( 'manage_network_plugins' ) ) { + $network_plugins = (array) get_site_option( 'active_sitewide_plugins', array() ); + $plugins = array_merge( $plugins, array_keys( $network_plugins ) ); + } + + if ( empty( $plugins ) ) + return; + + $invalid = array(); + + // invalid plugins get deactivated + foreach ( $plugins as $plugin ) { + $result = validate_plugin( $plugin ); + if ( is_wp_error( $result ) ) { + $invalid[$plugin] = $result; + deactivate_plugins( $plugin, true ); + } + } + return $invalid; +} + +/** + * Validate the plugin path. + * + * Checks that the file exists and {@link validate_file() is valid file}. + * + * @since 2.5.0 + * + * @param string $plugin Plugin Path + * @return WP_Error|int 0 on success, WP_Error on failure. + */ +function validate_plugin($plugin) { + if ( validate_file($plugin) ) + return new WP_Error('plugin_invalid', __('Invalid plugin path.')); + if ( ! file_exists(WP_PLUGIN_DIR . '/' . $plugin) ) + return new WP_Error('plugin_not_found', __('Plugin file does not exist.')); + + $installed_plugins = get_plugins(); + if ( ! isset($installed_plugins[$plugin]) ) + return new WP_Error('no_plugin_header', __('The plugin does not have a valid header.')); + return 0; +} + +/** + * Whether the plugin can be uninstalled. + * + * @since 2.7.0 + * + * @param string $plugin Plugin path to check. + * @return bool Whether plugin can be uninstalled. + */ +function is_uninstallable_plugin($plugin) { + $file = plugin_basename($plugin); + + $uninstallable_plugins = (array) get_option('uninstall_plugins'); + if ( isset( $uninstallable_plugins[$file] ) || file_exists( WP_PLUGIN_DIR . '/' . dirname($file) . '/uninstall.php' ) ) + return true; + + return false; +} + +/** + * Uninstall a single plugin. + * + * Calls the uninstall hook, if it is available. + * + * @since 2.7.0 + * + * @param string $plugin Relative plugin path from Plugin Directory. + */ +function uninstall_plugin($plugin) { + $file = plugin_basename($plugin); + + $uninstallable_plugins = (array) get_option('uninstall_plugins'); + if ( file_exists( WP_PLUGIN_DIR . '/' . dirname($file) . '/uninstall.php' ) ) { + if ( isset( $uninstallable_plugins[$file] ) ) { + unset($uninstallable_plugins[$file]); + update_option('uninstall_plugins', $uninstallable_plugins); + } + unset($uninstallable_plugins); + + define('WP_UNINSTALL_PLUGIN', $file); + wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . dirname( $file ) ); + include WP_PLUGIN_DIR . '/' . dirname($file) . '/uninstall.php'; + + return true; + } + + if ( isset( $uninstallable_plugins[$file] ) ) { + $callable = $uninstallable_plugins[$file]; + unset($uninstallable_plugins[$file]); + update_option('uninstall_plugins', $uninstallable_plugins); + unset($uninstallable_plugins); + + wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $file ); + include WP_PLUGIN_DIR . '/' . $file; + + add_action( 'uninstall_' . $file, $callable ); + + /** + * Fires in uninstall_plugin() once the plugin has been uninstalled. + * + * The action concatenates the 'uninstall_' prefix with the basename of the + * plugin passed to {@see uninstall_plugin()} to create a dynamically-named action. + * + * @since 2.7.0 + */ + do_action( 'uninstall_' . $file ); + } +} + +// +// Menu +// + +/** + * Add a top level menu page + * + * This function takes a capability which will be used to determine whether + * or not a page is included in the menu. + * + * The function which is hooked in to handle the output of the page must check + * that the user has the required capability as well. + * + * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected + * @param string $menu_title The text to be used for the menu + * @param string $capability The capability required for this menu to be displayed to the user. + * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) + * @param callback $function The function to be called to output the content for this page. + * @param string $icon_url The url to the icon to be used for this menu. + * * Pass a base64-encoded SVG using a data URI, which will be colored to match the color scheme. + * This should begin with 'data:image/svg+xml;base64,'. + * * Pass the name of a Dashicons helper class to use a font icon, e.g. 'dashicons-chart-pie'. + * * Pass 'none' to leave div.wp-menu-image empty so an icon can be added via CSS. + * @param int $position The position in the menu order this one should appear + * + * @return string The resulting page's hook_suffix + */ +function add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '', $position = null ) { + global $menu, $admin_page_hooks, $_registered_pages, $_parent_pages; + + $menu_slug = plugin_basename( $menu_slug ); + + $admin_page_hooks[$menu_slug] = sanitize_title( $menu_title ); + + $hookname = get_plugin_page_hookname( $menu_slug, '' ); + + if ( !empty( $function ) && !empty( $hookname ) && current_user_can( $capability ) ) + add_action( $hookname, $function ); + + if ( empty($icon_url) ) { + $icon_url = 'dashicons-admin-generic'; + $icon_class = 'menu-icon-generic '; + } else { + $icon_url = set_url_scheme( $icon_url ); + $icon_class = ''; + } + + $new_menu = array( $menu_title, $capability, $menu_slug, $page_title, 'menu-top ' . $icon_class . $hookname, $hookname, $icon_url ); + + if ( null === $position ) + $menu[] = $new_menu; + else + $menu[$position] = $new_menu; + + $_registered_pages[$hookname] = true; + + // No parent as top level + $_parent_pages[$menu_slug] = false; + + return $hookname; +} + +/** + * Add a top level menu page in the 'objects' section + * + * This function takes a capability which will be used to determine whether + * or not a page is included in the menu. + * + * The function which is hooked in to handle the output of the page must check + * that the user has the required capability as well. + * + * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected + * @param string $menu_title The text to be used for the menu + * @param string $capability The capability required for this menu to be displayed to the user. + * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) + * @param callback $function The function to be called to output the content for this page. + * @param string $icon_url The url to the icon to be used for this menu + * + * @return string The resulting page's hook_suffix + */ +function add_object_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '') { + global $_wp_last_object_menu; + + $_wp_last_object_menu++; + + return add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $_wp_last_object_menu); +} + +/** + * Add a top level menu page in the 'utility' section + * + * This function takes a capability which will be used to determine whether + * or not a page is included in the menu. + * + * The function which is hooked in to handle the output of the page must check + * that the user has the required capability as well. + * + * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected + * @param string $menu_title The text to be used for the menu + * @param string $capability The capability required for this menu to be displayed to the user. + * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) + * @param callback $function The function to be called to output the content for this page. + * @param string $icon_url The url to the icon to be used for this menu + * + * @return string The resulting page's hook_suffix + */ +function add_utility_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '') { + global $_wp_last_utility_menu; + + $_wp_last_utility_menu++; + + return add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $_wp_last_utility_menu); +} + +/** + * Add a sub menu page + * + * This function takes a capability which will be used to determine whether + * or not a page is included in the menu. + * + * The function which is hooked in to handle the output of the page must check + * that the user has the required capability as well. + * + * @param string $parent_slug The slug name for the parent menu (or the file name of a standard WordPress admin page) + * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected + * @param string $menu_title The text to be used for the menu + * @param string $capability The capability required for this menu to be displayed to the user. + * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) + * @param callback $function The function to be called to output the content for this page. + * + * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required. + */ +function add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { + global $submenu; + global $menu; + global $_wp_real_parent_file; + global $_wp_submenu_nopriv; + global $_registered_pages; + global $_parent_pages; + + $menu_slug = plugin_basename( $menu_slug ); + $parent_slug = plugin_basename( $parent_slug); + + if ( isset( $_wp_real_parent_file[$parent_slug] ) ) + $parent_slug = $_wp_real_parent_file[$parent_slug]; + + if ( !current_user_can( $capability ) ) { + $_wp_submenu_nopriv[$parent_slug][$menu_slug] = true; + return false; + } + + // If the parent doesn't already have a submenu, add a link to the parent + // as the first item in the submenu. If the submenu file is the same as the + // parent file someone is trying to link back to the parent manually. In + // this case, don't automatically add a link back to avoid duplication. + if (!isset( $submenu[$parent_slug] ) && $menu_slug != $parent_slug ) { + foreach ( (array)$menu as $parent_menu ) { + if ( $parent_menu[2] == $parent_slug && current_user_can( $parent_menu[1] ) ) + $submenu[$parent_slug][] = $parent_menu; + } + } + + $submenu[$parent_slug][] = array ( $menu_title, $capability, $menu_slug, $page_title ); + + $hookname = get_plugin_page_hookname( $menu_slug, $parent_slug); + if (!empty ( $function ) && !empty ( $hookname )) + add_action( $hookname, $function ); + + $_registered_pages[$hookname] = true; + // backwards-compatibility for plugins using add_management page. See wp-admin/admin.php for redirect from edit.php to tools.php + if ( 'tools.php' == $parent_slug ) + $_registered_pages[get_plugin_page_hookname( $menu_slug, 'edit.php')] = true; + + // No parent as top level + $_parent_pages[$menu_slug] = $parent_slug; + + return $hookname; +} + +/** + * Add sub menu page to the tools main menu. + * + * This function takes a capability which will be used to determine whether + * or not a page is included in the menu. + * + * The function which is hooked in to handle the output of the page must check + * that the user has the required capability as well. + * + * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected + * @param string $menu_title The text to be used for the menu + * @param string $capability The capability required for this menu to be displayed to the user. + * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) + * @param callback $function The function to be called to output the content for this page. + * + * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required. + */ +function add_management_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { + return add_submenu_page( 'tools.php', $page_title, $menu_title, $capability, $menu_slug, $function ); +} + +/** + * Add sub menu page to the options main menu. + * + * This function takes a capability which will be used to determine whether + * or not a page is included in the menu. + * + * The function which is hooked in to handle the output of the page must check + * that the user has the required capability as well. + * + * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected + * @param string $menu_title The text to be used for the menu + * @param string $capability The capability required for this menu to be displayed to the user. + * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) + * @param callback $function The function to be called to output the content for this page. + * + * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required. + */ +function add_options_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { + return add_submenu_page( 'options-general.php', $page_title, $menu_title, $capability, $menu_slug, $function ); +} + +/** + * Add sub menu page to the themes main menu. + * + * This function takes a capability which will be used to determine whether + * or not a page is included in the menu. + * + * The function which is hooked in to handle the output of the page must check + * that the user has the required capability as well. + * + * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected + * @param string $menu_title The text to be used for the menu + * @param string $capability The capability required for this menu to be displayed to the user. + * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) + * @param callback $function The function to be called to output the content for this page. + * + * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required. + */ +function add_theme_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { + return add_submenu_page( 'themes.php', $page_title, $menu_title, $capability, $menu_slug, $function ); +} + +/** + * Add sub menu page to the plugins main menu. + * + * This function takes a capability which will be used to determine whether + * or not a page is included in the menu. + * + * The function which is hooked in to handle the output of the page must check + * that the user has the required capability as well. + * + * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected + * @param string $menu_title The text to be used for the menu + * @param string $capability The capability required for this menu to be displayed to the user. + * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) + * @param callback $function The function to be called to output the content for this page. + * + * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required. + */ +function add_plugins_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { + return add_submenu_page( 'plugins.php', $page_title, $menu_title, $capability, $menu_slug, $function ); +} + +/** + * Add sub menu page to the Users/Profile main menu. + * + * This function takes a capability which will be used to determine whether + * or not a page is included in the menu. + * + * The function which is hooked in to handle the output of the page must check + * that the user has the required capability as well. + * + * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected + * @param string $menu_title The text to be used for the menu + * @param string $capability The capability required for this menu to be displayed to the user. + * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) + * @param callback $function The function to be called to output the content for this page. + * + * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required. + */ +function add_users_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { + if ( current_user_can('edit_users') ) + $parent = 'users.php'; + else + $parent = 'profile.php'; + return add_submenu_page( $parent, $page_title, $menu_title, $capability, $menu_slug, $function ); +} +/** + * Add sub menu page to the Dashboard main menu. + * + * This function takes a capability which will be used to determine whether + * or not a page is included in the menu. + * + * The function which is hooked in to handle the output of the page must check + * that the user has the required capability as well. + * + * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected + * @param string $menu_title The text to be used for the menu + * @param string $capability The capability required for this menu to be displayed to the user. + * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) + * @param callback $function The function to be called to output the content for this page. + * + * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required. + */ +function add_dashboard_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { + return add_submenu_page( 'index.php', $page_title, $menu_title, $capability, $menu_slug, $function ); +} + +/** + * Add sub menu page to the posts main menu. + * + * This function takes a capability which will be used to determine whether + * or not a page is included in the menu. + * + * The function which is hooked in to handle the output of the page must check + * that the user has the required capability as well. + * + * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected + * @param string $menu_title The text to be used for the menu + * @param string $capability The capability required for this menu to be displayed to the user. + * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) + * @param callback $function The function to be called to output the content for this page. + * + * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required. + */ +function add_posts_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { + return add_submenu_page( 'edit.php', $page_title, $menu_title, $capability, $menu_slug, $function ); +} + +/** + * Add sub menu page to the media main menu. + * + * This function takes a capability which will be used to determine whether + * or not a page is included in the menu. + * + * The function which is hooked in to handle the output of the page must check + * that the user has the required capability as well. + * + * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected + * @param string $menu_title The text to be used for the menu + * @param string $capability The capability required for this menu to be displayed to the user. + * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) + * @param callback $function The function to be called to output the content for this page. + * + * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required. + */ +function add_media_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { + return add_submenu_page( 'upload.php', $page_title, $menu_title, $capability, $menu_slug, $function ); +} + +/** + * Add sub menu page to the links main menu. + * + * This function takes a capability which will be used to determine whether + * or not a page is included in the menu. + * + * The function which is hooked in to handle the output of the page must check + * that the user has the required capability as well. + * + * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected + * @param string $menu_title The text to be used for the menu + * @param string $capability The capability required for this menu to be displayed to the user. + * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) + * @param callback $function The function to be called to output the content for this page. + * + * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required. + */ +function add_links_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { + return add_submenu_page( 'link-manager.php', $page_title, $menu_title, $capability, $menu_slug, $function ); +} + +/** + * Add sub menu page to the pages main menu. + * + * This function takes a capability which will be used to determine whether + * or not a page is included in the menu. + * + * The function which is hooked in to handle the output of the page must check + * that the user has the required capability as well. + * + * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected + * @param string $menu_title The text to be used for the menu + * @param string $capability The capability required for this menu to be displayed to the user. + * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) + * @param callback $function The function to be called to output the content for this page. + * + * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required. +*/ +function add_pages_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { + return add_submenu_page( 'edit.php?post_type=page', $page_title, $menu_title, $capability, $menu_slug, $function ); +} + +/** + * Add sub menu page to the comments main menu. + * + * This function takes a capability which will be used to determine whether + * or not a page is included in the menu. + * + * The function which is hooked in to handle the output of the page must check + * that the user has the required capability as well. + * + * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected + * @param string $menu_title The text to be used for the menu + * @param string $capability The capability required for this menu to be displayed to the user. + * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) + * @param callback $function The function to be called to output the content for this page. + * + * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required. +*/ +function add_comments_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { + return add_submenu_page( 'edit-comments.php', $page_title, $menu_title, $capability, $menu_slug, $function ); +} + +/** + * Remove a top level admin menu + * + * @since 3.1.0 + * + * @param string $menu_slug The slug of the menu + * @return array|bool The removed menu on success, False if not found + */ +function remove_menu_page( $menu_slug ) { + global $menu; + + foreach ( $menu as $i => $item ) { + if ( $menu_slug == $item[2] ) { + unset( $menu[$i] ); + return $item; + } + } + + return false; +} + +/** + * Remove an admin submenu + * + * @since 3.1.0 + * + * @param string $menu_slug The slug for the parent menu + * @param string $submenu_slug The slug of the submenu + * @return array|bool The removed submenu on success, False if not found + */ +function remove_submenu_page( $menu_slug, $submenu_slug ) { + global $submenu; + + if ( !isset( $submenu[$menu_slug] ) ) + return false; + + foreach ( $submenu[$menu_slug] as $i => $item ) { + if ( $submenu_slug == $item[2] ) { + unset( $submenu[$menu_slug][$i] ); + return $item; + } + } + + return false; +} + +/** + * Get the url to access a particular menu page based on the slug it was registered with. + * + * If the slug hasn't been registered properly no url will be returned + * + * @since 3.0.0 + * + * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) + * @param bool $echo Whether or not to echo the url - default is true + * @return string the url + */ +function menu_page_url($menu_slug, $echo = true) { + global $_parent_pages; + + if ( isset( $_parent_pages[$menu_slug] ) ) { + $parent_slug = $_parent_pages[$menu_slug]; + if ( $parent_slug && ! isset( $_parent_pages[$parent_slug] ) ) { + $url = admin_url( add_query_arg( 'page', $menu_slug, $parent_slug ) ); + } else { + $url = admin_url( 'admin.php?page=' . $menu_slug ); + } + } else { + $url = ''; + } + + $url = esc_url($url); + + if ( $echo ) + echo $url; + + return $url; +} + +// +// Pluggable Menu Support -- Private +// + +function get_admin_page_parent( $parent = '' ) { + global $parent_file; + global $menu; + global $submenu; + global $pagenow; + global $typenow; + global $plugin_page; + global $_wp_real_parent_file; + global $_wp_menu_nopriv; + global $_wp_submenu_nopriv; + + if ( !empty ( $parent ) && 'admin.php' != $parent ) { + if ( isset( $_wp_real_parent_file[$parent] ) ) + $parent = $_wp_real_parent_file[$parent]; + return $parent; + } + + if ( $pagenow == 'admin.php' && isset( $plugin_page ) ) { + foreach ( (array)$menu as $parent_menu ) { + if ( $parent_menu[2] == $plugin_page ) { + $parent_file = $plugin_page; + if ( isset( $_wp_real_parent_file[$parent_file] ) ) + $parent_file = $_wp_real_parent_file[$parent_file]; + return $parent_file; + } + } + if ( isset( $_wp_menu_nopriv[$plugin_page] ) ) { + $parent_file = $plugin_page; + if ( isset( $_wp_real_parent_file[$parent_file] ) ) + $parent_file = $_wp_real_parent_file[$parent_file]; + return $parent_file; + } + } + + if ( isset( $plugin_page ) && isset( $_wp_submenu_nopriv[$pagenow][$plugin_page] ) ) { + $parent_file = $pagenow; + if ( isset( $_wp_real_parent_file[$parent_file] ) ) + $parent_file = $_wp_real_parent_file[$parent_file]; + return $parent_file; + } + + foreach (array_keys( (array)$submenu ) as $parent) { + foreach ( $submenu[$parent] as $submenu_array ) { + if ( isset( $_wp_real_parent_file[$parent] ) ) + $parent = $_wp_real_parent_file[$parent]; + if ( !empty($typenow) && ($submenu_array[2] == "$pagenow?post_type=$typenow") ) { + $parent_file = $parent; + return $parent; + } elseif ( $submenu_array[2] == $pagenow && empty($typenow) && ( empty($parent_file) || false === strpos($parent_file, '?') ) ) { + $parent_file = $parent; + return $parent; + } else + if ( isset( $plugin_page ) && ($plugin_page == $submenu_array[2] ) ) { + $parent_file = $parent; + return $parent; + } + } + } + + if ( empty($parent_file) ) + $parent_file = ''; + return ''; +} + +function get_admin_page_title() { + global $title; + global $menu; + global $submenu; + global $pagenow; + global $plugin_page; + global $typenow; + + if ( ! empty ( $title ) ) + return $title; + + $hook = get_plugin_page_hook( $plugin_page, $pagenow ); + + $parent = $parent1 = get_admin_page_parent(); + + if ( empty ( $parent) ) { + foreach ( (array)$menu as $menu_array ) { + if ( isset( $menu_array[3] ) ) { + if ( $menu_array[2] == $pagenow ) { + $title = $menu_array[3]; + return $menu_array[3]; + } else + if ( isset( $plugin_page ) && ($plugin_page == $menu_array[2] ) && ($hook == $menu_array[3] ) ) { + $title = $menu_array[3]; + return $menu_array[3]; + } + } else { + $title = $menu_array[0]; + return $title; + } + } + } else { + foreach ( array_keys( $submenu ) as $parent ) { + foreach ( $submenu[$parent] as $submenu_array ) { + if ( isset( $plugin_page ) && + ( $plugin_page == $submenu_array[2] ) && + ( + ( $parent == $pagenow ) || + ( $parent == $plugin_page ) || + ( $plugin_page == $hook ) || + ( $pagenow == 'admin.php' && $parent1 != $submenu_array[2] ) || + ( !empty($typenow) && $parent == $pagenow . '?post_type=' . $typenow) + ) + ) { + $title = $submenu_array[3]; + return $submenu_array[3]; + } + + if ( $submenu_array[2] != $pagenow || isset( $_GET['page'] ) ) // not the current page + continue; + + if ( isset( $submenu_array[3] ) ) { + $title = $submenu_array[3]; + return $submenu_array[3]; + } else { + $title = $submenu_array[0]; + return $title; + } + } + } + if ( empty ( $title ) ) { + foreach ( $menu as $menu_array ) { + if ( isset( $plugin_page ) && + ( $plugin_page == $menu_array[2] ) && + ( $pagenow == 'admin.php' ) && + ( $parent1 == $menu_array[2] ) ) + { + $title = $menu_array[3]; + return $menu_array[3]; + } + } + } + } + + return $title; +} + +function get_plugin_page_hook( $plugin_page, $parent_page ) { + $hook = get_plugin_page_hookname( $plugin_page, $parent_page ); + if ( has_action($hook) ) + return $hook; + else + return null; +} + +function get_plugin_page_hookname( $plugin_page, $parent_page ) { + global $admin_page_hooks; + + $parent = get_admin_page_parent( $parent_page ); + + $page_type = 'admin'; + if ( empty ( $parent_page ) || 'admin.php' == $parent_page || isset( $admin_page_hooks[$plugin_page] ) ) { + if ( isset( $admin_page_hooks[$plugin_page] ) ) + $page_type = 'toplevel'; + else + if ( isset( $admin_page_hooks[$parent] )) + $page_type = $admin_page_hooks[$parent]; + } else if ( isset( $admin_page_hooks[$parent] ) ) { + $page_type = $admin_page_hooks[$parent]; + } + + $plugin_name = preg_replace( '!\.php!', '', $plugin_page ); + + return $page_type . '_page_' . $plugin_name; +} + +function user_can_access_admin_page() { + global $pagenow; + global $menu; + global $submenu; + global $_wp_menu_nopriv; + global $_wp_submenu_nopriv; + global $plugin_page; + global $_registered_pages; + + $parent = get_admin_page_parent(); + + if ( !isset( $plugin_page ) && isset( $_wp_submenu_nopriv[$parent][$pagenow] ) ) + return false; + + if ( isset( $plugin_page ) ) { + if ( isset( $_wp_submenu_nopriv[$parent][$plugin_page] ) ) + return false; + + $hookname = get_plugin_page_hookname($plugin_page, $parent); + + if ( !isset($_registered_pages[$hookname]) ) + return false; + } + + if ( empty( $parent) ) { + if ( isset( $_wp_menu_nopriv[$pagenow] ) ) + return false; + if ( isset( $_wp_submenu_nopriv[$pagenow][$pagenow] ) ) + return false; + if ( isset( $plugin_page ) && isset( $_wp_submenu_nopriv[$pagenow][$plugin_page] ) ) + return false; + if ( isset( $plugin_page ) && isset( $_wp_menu_nopriv[$plugin_page] ) ) + return false; + foreach (array_keys( $_wp_submenu_nopriv ) as $key ) { + if ( isset( $_wp_submenu_nopriv[$key][$pagenow] ) ) + return false; + if ( isset( $plugin_page ) && isset( $_wp_submenu_nopriv[$key][$plugin_page] ) ) + return false; + } + return true; + } + + if ( isset( $plugin_page ) && ( $plugin_page == $parent ) && isset( $_wp_menu_nopriv[$plugin_page] ) ) + return false; + + if ( isset( $submenu[$parent] ) ) { + foreach ( $submenu[$parent] as $submenu_array ) { + if ( isset( $plugin_page ) && ( $submenu_array[2] == $plugin_page ) ) { + if ( current_user_can( $submenu_array[1] )) + return true; + else + return false; + } else if ( $submenu_array[2] == $pagenow ) { + if ( current_user_can( $submenu_array[1] )) + return true; + else + return false; + } + } + } + + foreach ( $menu as $menu_array ) { + if ( $menu_array[2] == $parent) { + if ( current_user_can( $menu_array[1] )) + return true; + else + return false; + } + } + + return true; +} + +/* Whitelist functions */ + +/** + * Register a setting and its sanitization callback + * + * @since 2.7.0 + * + * @param string $option_group A settings group name. Should correspond to a whitelisted option key name. + * Default whitelisted option key names include "general," "discussion," and "reading," among others. + * @param string $option_name The name of an option to sanitize and save. + * @param unknown_type $sanitize_callback A callback function that sanitizes the option's value. + * @return unknown + */ +function register_setting( $option_group, $option_name, $sanitize_callback = '' ) { + global $new_whitelist_options; + + if ( 'misc' == $option_group ) { + _deprecated_argument( __FUNCTION__, '3.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'misc' ) ); + $option_group = 'general'; + } + + if ( 'privacy' == $option_group ) { + _deprecated_argument( __FUNCTION__, '3.5', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) ); + $option_group = 'reading'; + } + + $new_whitelist_options[ $option_group ][] = $option_name; + if ( $sanitize_callback != '' ) + add_filter( "sanitize_option_{$option_name}", $sanitize_callback ); +} + +/** + * Unregister a setting + * + * @since 2.7.0 + * + * @param unknown_type $option_group + * @param unknown_type $option_name + * @param unknown_type $sanitize_callback + * @return unknown + */ +function unregister_setting( $option_group, $option_name, $sanitize_callback = '' ) { + global $new_whitelist_options; + + if ( 'misc' == $option_group ) { + _deprecated_argument( __FUNCTION__, '3.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'misc' ) ); + $option_group = 'general'; + } + + if ( 'privacy' == $option_group ) { + _deprecated_argument( __FUNCTION__, '3.5', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) ); + $option_group = 'reading'; + } + + $pos = array_search( $option_name, (array) $new_whitelist_options ); + if ( $pos !== false ) + unset( $new_whitelist_options[ $option_group ][ $pos ] ); + if ( $sanitize_callback != '' ) + remove_filter( "sanitize_option_{$option_name}", $sanitize_callback ); +} + +/** + * {@internal Missing Short Description}} + * + * @since 2.7.0 + * + * @param unknown_type $options + * @return unknown + */ +function option_update_filter( $options ) { + global $new_whitelist_options; + + if ( is_array( $new_whitelist_options ) ) + $options = add_option_whitelist( $new_whitelist_options, $options ); + + return $options; +} +add_filter( 'whitelist_options', 'option_update_filter' ); + +/** + * {@internal Missing Short Description}} + * + * @since 2.7.0 + * + * @param unknown_type $new_options + * @param unknown_type $options + * @return unknown + */ +function add_option_whitelist( $new_options, $options = '' ) { + if ( $options == '' ) + global $whitelist_options; + else + $whitelist_options = $options; + + foreach ( $new_options as $page => $keys ) { + foreach ( $keys as $key ) { + if ( !isset($whitelist_options[ $page ]) || !is_array($whitelist_options[ $page ]) ) { + $whitelist_options[ $page ] = array(); + $whitelist_options[ $page ][] = $key; + } else { + $pos = array_search( $key, $whitelist_options[ $page ] ); + if ( $pos === false ) + $whitelist_options[ $page ][] = $key; + } + } + } + + return $whitelist_options; +} + +/** + * {@internal Missing Short Description}} + * + * @since 2.7.0 + * + * @param unknown_type $del_options + * @param unknown_type $options + * @return unknown + */ +function remove_option_whitelist( $del_options, $options = '' ) { + if ( $options == '' ) + global $whitelist_options; + else + $whitelist_options = $options; + + foreach ( $del_options as $page => $keys ) { + foreach ( $keys as $key ) { + if ( isset($whitelist_options[ $page ]) && is_array($whitelist_options[ $page ]) ) { + $pos = array_search( $key, $whitelist_options[ $page ] ); + if ( $pos !== false ) + unset( $whitelist_options[ $page ][ $pos ] ); + } + } + } + + return $whitelist_options; +} + +/** + * Output nonce, action, and option_page fields for a settings page. + * + * @since 2.7.0 + * + * @param string $option_group A settings group name. This should match the group name used in register_setting(). + */ +function settings_fields($option_group) { + echo ""; + echo ''; + wp_nonce_field("$option_group-options"); +} + +/** + * Clears the Plugins cache used by get_plugins() and by default, the Plugin Update cache. + * + * @since 3.7.0 + * + * @param bool $clear_update_cache Whether to clear the Plugin updates cache + */ +function wp_clean_plugins_cache( $clear_update_cache = true ) { + if ( $clear_update_cache ) + delete_site_transient( 'update_plugins' ); + wp_cache_delete( 'plugins', 'plugins' ); +} diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php new file mode 100644 index 0000000..64b63d6 --- /dev/null +++ b/wp-admin/includes/post.php @@ -0,0 +1,1659 @@ +cap->create_posts ) ) { + if ( 'page' == $post_data['post_type'] ) + return new WP_Error( 'edit_others_pages', __( 'You are not allowed to create pages as this user.' ) ); + else + return new WP_Error( 'edit_others_posts', __( 'You are not allowed to create posts as this user.' ) ); + } + + if ( isset( $post_data['content'] ) ) + $post_data['post_content'] = $post_data['content']; + + if ( isset( $post_data['excerpt'] ) ) + $post_data['post_excerpt'] = $post_data['excerpt']; + + if ( isset( $post_data['parent_id'] ) ) + $post_data['post_parent'] = (int) $post_data['parent_id']; + + if ( isset($post_data['trackback_url']) ) + $post_data['to_ping'] = $post_data['trackback_url']; + + $post_data['user_ID'] = get_current_user_id(); + + if (!empty ( $post_data['post_author_override'] ) ) { + $post_data['post_author'] = (int) $post_data['post_author_override']; + } else { + if (!empty ( $post_data['post_author'] ) ) { + $post_data['post_author'] = (int) $post_data['post_author']; + } else { + $post_data['post_author'] = (int) $post_data['user_ID']; + } + } + + if ( isset( $post_data['user_ID'] ) && ( $post_data['post_author'] != $post_data['user_ID'] ) + && ! current_user_can( $ptype->cap->edit_others_posts ) ) { + if ( $update ) { + if ( 'page' == $post_data['post_type'] ) + return new WP_Error( 'edit_others_pages', __( 'You are not allowed to edit pages as this user.' ) ); + else + return new WP_Error( 'edit_others_posts', __( 'You are not allowed to edit posts as this user.' ) ); + } else { + if ( 'page' == $post_data['post_type'] ) + return new WP_Error( 'edit_others_pages', __( 'You are not allowed to create pages as this user.' ) ); + else + return new WP_Error( 'edit_others_posts', __( 'You are not allowed to create posts as this user.' ) ); + } + } + + if ( ! empty( $post_data['post_status'] ) ) { + $post_data['post_status'] = sanitize_key( $post_data['post_status'] ); + + // No longer an auto-draft + if ( 'auto-draft' === $post_data['post_status'] ) { + $post_data['post_status'] = 'draft'; + } + + if ( ! get_post_status_object( $post_data['post_status'] ) ) { + unset( $post_data['post_status'] ); + } + } + + // What to do based on which button they pressed + if ( isset($post_data['saveasdraft']) && '' != $post_data['saveasdraft'] ) + $post_data['post_status'] = 'draft'; + if ( isset($post_data['saveasprivate']) && '' != $post_data['saveasprivate'] ) + $post_data['post_status'] = 'private'; + if ( isset($post_data['publish']) && ( '' != $post_data['publish'] ) && ( !isset($post_data['post_status']) || $post_data['post_status'] != 'private' ) ) + $post_data['post_status'] = 'publish'; + if ( isset($post_data['advanced']) && '' != $post_data['advanced'] ) + $post_data['post_status'] = 'draft'; + if ( isset($post_data['pending']) && '' != $post_data['pending'] ) + $post_data['post_status'] = 'pending'; + + if ( isset( $post_data['ID'] ) ) + $post_id = $post_data['ID']; + else + $post_id = false; + $previous_status = $post_id ? get_post_field( 'post_status', $post_id ) : false; + + if ( isset( $post_data['post_status'] ) && 'private' == $post_data['post_status'] && ! current_user_can( $ptype->cap->publish_posts ) ) { + $post_data['post_status'] = $previous_status ? $previous_status : 'pending'; + } + + $published_statuses = array( 'publish', 'future' ); + + // Posts 'submitted for approval' present are submitted to $_POST the same as if they were being published. + // Change status from 'publish' to 'pending' if user lacks permissions to publish or to resave published posts. + if ( isset($post_data['post_status']) && (in_array( $post_data['post_status'], $published_statuses ) && !current_user_can( $ptype->cap->publish_posts )) ) + if ( ! in_array( $previous_status, $published_statuses ) || !current_user_can( 'edit_post', $post_id ) ) + $post_data['post_status'] = 'pending'; + + if ( ! isset( $post_data['post_status'] ) ) { + $post_data['post_status'] = 'auto-draft' === $previous_status ? 'draft' : $previous_status; + } + + if ( isset( $post_data['post_password'] ) && ! current_user_can( $ptype->cap->publish_posts ) ) { + unset( $post_data['post_password'] ); + } + + if (!isset( $post_data['comment_status'] )) + $post_data['comment_status'] = 'closed'; + + if (!isset( $post_data['ping_status'] )) + $post_data['ping_status'] = 'closed'; + + foreach ( array('aa', 'mm', 'jj', 'hh', 'mn') as $timeunit ) { + if ( !empty( $post_data['hidden_' . $timeunit] ) && $post_data['hidden_' . $timeunit] != $post_data[$timeunit] ) { + $post_data['edit_date'] = '1'; + break; + } + } + + if ( !empty( $post_data['edit_date'] ) ) { + $aa = $post_data['aa']; + $mm = $post_data['mm']; + $jj = $post_data['jj']; + $hh = $post_data['hh']; + $mn = $post_data['mn']; + $ss = $post_data['ss']; + $aa = ($aa <= 0 ) ? date('Y') : $aa; + $mm = ($mm <= 0 ) ? date('n') : $mm; + $jj = ($jj > 31 ) ? 31 : $jj; + $jj = ($jj <= 0 ) ? date('j') : $jj; + $hh = ($hh > 23 ) ? $hh -24 : $hh; + $mn = ($mn > 59 ) ? $mn -60 : $mn; + $ss = ($ss > 59 ) ? $ss -60 : $ss; + $post_data['post_date'] = sprintf( "%04d-%02d-%02d %02d:%02d:%02d", $aa, $mm, $jj, $hh, $mn, $ss ); + $valid_date = wp_checkdate( $mm, $jj, $aa, $post_data['post_date'] ); + if ( !$valid_date ) { + return new WP_Error( 'invalid_date', __( 'Whoops, the provided date is invalid.' ) ); + } + $post_data['post_date_gmt'] = get_gmt_from_date( $post_data['post_date'] ); + } + + return $post_data; +} + +/** + * Update an existing post with values provided in $_POST. + * + * @since 1.5.0 + * + * @param array $post_data Optional. + * @return int Post ID. + */ +function edit_post( $post_data = null ) { + + if ( empty($post_data) ) + $post_data = &$_POST; + + // Clear out any data in internal vars. + unset( $post_data['filter'] ); + + $post_ID = (int) $post_data['post_ID']; + $post = get_post( $post_ID ); + $post_data['post_type'] = $post->post_type; + $post_data['post_mime_type'] = $post->post_mime_type; + + if ( ! empty( $post_data['post_status'] ) ) { + $post_data['post_status'] = sanitize_key( $post_data['post_status'] ); + + if ( 'inherit' == $post_data['post_status'] ) { + unset( $post_data['post_status'] ); + } + } + + $ptype = get_post_type_object($post_data['post_type']); + if ( !current_user_can( 'edit_post', $post_ID ) ) { + if ( 'page' == $post_data['post_type'] ) + wp_die( __('You are not allowed to edit this page.' )); + else + wp_die( __('You are not allowed to edit this post.' )); + } + + if ( post_type_supports( $ptype->name, 'revisions' ) ) { + $revisions = wp_get_post_revisions( $post_ID, array( 'order' => 'ASC', 'posts_per_page' => 1 ) ); + $revision = current( $revisions ); + + // Check if the revisions have been upgraded + if ( $revisions && _wp_get_post_revision_version( $revision ) < 1 ) + _wp_upgrade_revisions_of_post( $post, wp_get_post_revisions( $post_ID ) ); + } + + if ( isset($post_data['visibility']) ) { + switch ( $post_data['visibility'] ) { + case 'public' : + $post_data['post_password'] = ''; + break; + case 'password' : + unset( $post_data['sticky'] ); + break; + case 'private' : + $post_data['post_status'] = 'private'; + $post_data['post_password'] = ''; + unset( $post_data['sticky'] ); + break; + } + } + + $post_data = _wp_translate_postdata( true, $post_data ); + if ( is_wp_error($post_data) ) + wp_die( $post_data->get_error_message() ); + + // Post Formats + if ( isset( $post_data['post_format'] ) ) + set_post_format( $post_ID, $post_data['post_format'] ); + + $format_meta_urls = array( 'url', 'link_url', 'quote_source_url' ); + foreach ( $format_meta_urls as $format_meta_url ) { + $keyed = '_format_' . $format_meta_url; + if ( isset( $post_data[ $keyed ] ) ) + update_post_meta( $post_ID, $keyed, wp_slash( esc_url_raw( wp_unslash( $post_data[ $keyed ] ) ) ) ); + } + + $format_keys = array( 'quote', 'quote_source_name', 'image', 'gallery', 'audio_embed', 'video_embed' ); + + foreach ( $format_keys as $key ) { + $keyed = '_format_' . $key; + if ( isset( $post_data[ $keyed ] ) ) { + if ( current_user_can( 'unfiltered_html' ) ) + update_post_meta( $post_ID, $keyed, $post_data[ $keyed ] ); + else + update_post_meta( $post_ID, $keyed, wp_filter_post_kses( $post_data[ $keyed ] ) ); + } + } + + if ( 'attachment' === $post_data['post_type'] && preg_match( '#^(audio|video)/#', $post_data['post_mime_type'] ) ) { + $id3data = wp_get_attachment_metadata( $post_ID ); + if ( ! is_array( $id3data ) ) { + $id3data = array(); + } + + foreach ( wp_get_attachment_id3_keys( $post, 'edit' ) as $key => $label ) { + if ( isset( $post_data[ 'id3_' . $key ] ) ) { + $id3data[ $key ] = sanitize_text_field( wp_unslash( $post_data[ 'id3_' . $key ] ) ); + } + } + wp_update_attachment_metadata( $post_ID, $id3data ); + } + + // Meta Stuff + if ( isset($post_data['meta']) && $post_data['meta'] ) { + foreach ( $post_data['meta'] as $key => $value ) { + if ( !$meta = get_post_meta_by_id( $key ) ) + continue; + if ( $meta->post_id != $post_ID ) + continue; + if ( is_protected_meta( $value['key'], 'post' ) || ! current_user_can( 'edit_post_meta', $post_ID, $value['key'] ) ) + continue; + update_meta( $key, $value['key'], $value['value'] ); + } + } + + if ( isset($post_data['deletemeta']) && $post_data['deletemeta'] ) { + foreach ( $post_data['deletemeta'] as $key => $value ) { + if ( !$meta = get_post_meta_by_id( $key ) ) + continue; + if ( $meta->post_id != $post_ID ) + continue; + if ( is_protected_meta( $meta->meta_key, 'post' ) || ! current_user_can( 'delete_post_meta', $post_ID, $meta->meta_key ) ) + continue; + delete_meta( $key ); + } + } + + // Attachment stuff + if ( 'attachment' == $post_data['post_type'] ) { + if ( isset( $post_data[ '_wp_attachment_image_alt' ] ) ) { + $image_alt = wp_unslash( $post_data['_wp_attachment_image_alt'] ); + if ( $image_alt != get_post_meta( $post_ID, '_wp_attachment_image_alt', true ) ) { + $image_alt = wp_strip_all_tags( $image_alt, true ); + // update_meta expects slashed + update_post_meta( $post_ID, '_wp_attachment_image_alt', wp_slash( $image_alt ) ); + } + } + + $attachment_data = isset( $post_data['attachments'][ $post_ID ] ) ? $post_data['attachments'][ $post_ID ] : array(); + + /** This filter is documented in wp-admin/includes/media.php */ + $post_data = apply_filters( 'attachment_fields_to_save', $post_data, $attachment_data ); + } + + add_meta( $post_ID ); + + update_post_meta( $post_ID, '_edit_last', get_current_user_id() ); + + wp_update_post( $post_data ); + + // Now that we have an ID we can fix any attachment anchor hrefs + _fix_attachment_links( $post_ID ); + + wp_set_post_lock( $post_ID ); + + if ( current_user_can( $ptype->cap->edit_others_posts ) ) { + if ( ! empty( $post_data['sticky'] ) ) + stick_post( $post_ID ); + else + unstick_post( $post_ID ); + } + + return $post_ID; +} + +/** + * Process the post data for the bulk editing of posts. + * + * Updates all bulk edited posts/pages, adding (but not removing) tags and + * categories. Skips pages when they would be their own parent or child. + * + * @since 2.7.0 + * + * @param array $post_data Optional, the array of post data to process if not provided will use $_POST superglobal. + * @return array + */ +function bulk_edit_posts( $post_data = null ) { + global $wpdb; + + if ( empty($post_data) ) + $post_data = &$_POST; + + if ( isset($post_data['post_type']) ) + $ptype = get_post_type_object($post_data['post_type']); + else + $ptype = get_post_type_object('post'); + + if ( !current_user_can( $ptype->cap->edit_posts ) ) { + if ( 'page' == $ptype->name ) + wp_die( __('You are not allowed to edit pages.')); + else + wp_die( __('You are not allowed to edit posts.')); + } + + if ( -1 == $post_data['_status'] ) { + $post_data['post_status'] = null; + unset($post_data['post_status']); + } else { + $post_data['post_status'] = $post_data['_status']; + } + unset($post_data['_status']); + + if ( ! empty( $post_data['post_status'] ) ) { + $post_data['post_status'] = sanitize_key( $post_data['post_status'] ); + + if ( 'inherit' == $post_data['post_status'] ) { + unset( $post_data['post_status'] ); + } + } + + $post_IDs = array_map( 'intval', (array) $post_data['post'] ); + + $reset = array( + 'post_author', 'post_status', 'post_password', + 'post_parent', 'page_template', 'comment_status', + 'ping_status', 'keep_private', 'tax_input', + 'post_category', 'sticky', 'post_format', + ); + + foreach ( $reset as $field ) { + if ( isset($post_data[$field]) && ( '' == $post_data[$field] || -1 == $post_data[$field] ) ) + unset($post_data[$field]); + } + + if ( isset($post_data['post_category']) ) { + if ( is_array($post_data['post_category']) && ! empty($post_data['post_category']) ) + $new_cats = array_map( 'absint', $post_data['post_category'] ); + else + unset($post_data['post_category']); + } + + $tax_input = array(); + if ( isset($post_data['tax_input'])) { + foreach ( $post_data['tax_input'] as $tax_name => $terms ) { + if ( empty($terms) ) + continue; + if ( is_taxonomy_hierarchical( $tax_name ) ) { + $tax_input[ $tax_name ] = array_map( 'absint', $terms ); + } else { + $comma = _x( ',', 'tag delimiter' ); + if ( ',' !== $comma ) + $terms = str_replace( $comma, ',', $terms ); + $tax_input[ $tax_name ] = explode( ',', trim( $terms, " \n\t\r\0\x0B," ) ); + } + } + } + + if ( isset($post_data['post_parent']) && ($parent = (int) $post_data['post_parent']) ) { + $pages = $wpdb->get_results("SELECT ID, post_parent FROM $wpdb->posts WHERE post_type = 'page'"); + $children = array(); + + for ( $i = 0; $i < 50 && $parent > 0; $i++ ) { + $children[] = $parent; + + foreach ( $pages as $page ) { + if ( $page->ID == $parent ) { + $parent = $page->post_parent; + break; + } + } + } + } + + $updated = $skipped = $locked = array(); + $shared_post_data = $post_data; + + foreach ( $post_IDs as $post_ID ) { + // Start with fresh post data with each iteration. + $post_data = $shared_post_data; + + $post_type_object = get_post_type_object( get_post_type( $post_ID ) ); + + if ( !isset( $post_type_object ) || ( isset($children) && in_array($post_ID, $children) ) || !current_user_can( 'edit_post', $post_ID ) ) { + $skipped[] = $post_ID; + continue; + } + + if ( wp_check_post_lock( $post_ID ) ) { + $locked[] = $post_ID; + continue; + } + + $post = get_post( $post_ID ); + $tax_names = get_object_taxonomies( $post ); + foreach ( $tax_names as $tax_name ) { + $taxonomy_obj = get_taxonomy($tax_name); + if ( isset( $tax_input[$tax_name]) && current_user_can( $taxonomy_obj->cap->assign_terms ) ) + $new_terms = $tax_input[$tax_name]; + else + $new_terms = array(); + + if ( $taxonomy_obj->hierarchical ) + $current_terms = (array) wp_get_object_terms( $post_ID, $tax_name, array('fields' => 'ids') ); + else + $current_terms = (array) wp_get_object_terms( $post_ID, $tax_name, array('fields' => 'names') ); + + $post_data['tax_input'][$tax_name] = array_merge( $current_terms, $new_terms ); + } + + if ( isset($new_cats) && in_array( 'category', $tax_names ) ) { + $cats = (array) wp_get_post_categories($post_ID); + $post_data['post_category'] = array_unique( array_merge($cats, $new_cats) ); + unset( $post_data['tax_input']['category'] ); + } + + $post_data['post_type'] = $post->post_type; + $post_data['post_mime_type'] = $post->post_mime_type; + $post_data['guid'] = $post->guid; + + foreach ( array( 'comment_status', 'ping_status', 'post_author' ) as $field ) { + if ( ! isset( $post_data[ $field ] ) ) { + $post_data[ $field ] = $post->$field; + } + } + + $post_data['ID'] = $post_ID; + $post_data['post_ID'] = $post_ID; + + $post_data = _wp_translate_postdata( true, $post_data ); + if ( is_wp_error( $post_data ) ) { + $skipped[] = $post_ID; + continue; + } + + $updated[] = wp_update_post( $post_data ); + + if ( isset( $post_data['sticky'] ) && current_user_can( $ptype->cap->edit_others_posts ) ) { + if ( 'sticky' == $post_data['sticky'] ) + stick_post( $post_ID ); + else + unstick_post( $post_ID ); + } + + if ( isset( $post_data['post_format'] ) ) + set_post_format( $post_ID, $post_data['post_format'] ); + } + + return array( 'updated' => $updated, 'skipped' => $skipped, 'locked' => $locked ); +} + +/** + * Default post information to use when populating the "Write Post" form. + * + * @since 2.0.0 + * + * @param string $post_type A post type string, defaults to 'post'. + * @return WP_Post Post object containing all the default post data as attributes + */ +function get_default_post_to_edit( $post_type = 'post', $create_in_db = false ) { + global $wpdb; + + $post_title = ''; + if ( !empty( $_REQUEST['post_title'] ) ) + $post_title = esc_html( wp_unslash( $_REQUEST['post_title'] )); + + $post_content = ''; + if ( !empty( $_REQUEST['content'] ) ) + $post_content = esc_html( wp_unslash( $_REQUEST['content'] )); + + $post_excerpt = ''; + if ( !empty( $_REQUEST['excerpt'] ) ) + $post_excerpt = esc_html( wp_unslash( $_REQUEST['excerpt'] )); + + if ( $create_in_db ) { + $post_id = wp_insert_post( array( 'post_title' => __( 'Auto Draft' ), 'post_type' => $post_type, 'post_status' => 'auto-draft' ) ); + $post = get_post( $post_id ); + if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post->post_type, 'post-formats' ) && get_option( 'default_post_format' ) ) + set_post_format( $post, get_option( 'default_post_format' ) ); + } else { + $post = new stdClass; + $post->ID = 0; + $post->post_author = ''; + $post->post_date = ''; + $post->post_date_gmt = ''; + $post->post_password = ''; + $post->post_type = $post_type; + $post->post_status = 'draft'; + $post->to_ping = ''; + $post->pinged = ''; + $post->comment_status = get_option( 'default_comment_status' ); + $post->ping_status = get_option( 'default_ping_status' ); + $post->post_pingback = get_option( 'default_pingback_flag' ); + $post->post_category = get_option( 'default_category' ); + $post->page_template = 'default'; + $post->post_parent = 0; + $post->menu_order = 0; + $post = new WP_Post( $post ); + } + + /** + * Filter the default post content initially used in the "Write Post" form. + * + * @since 1.5.0 + * + * @param string $post_content Default post content. + * @param WP_Post $post Post object. + */ + $post->post_content = apply_filters( 'default_content', $post_content, $post ); + + /** + * Filter the default post title initially used in the "Write Post" form. + * + * @since 1.5.0 + * + * @param string $post_title Default post title. + * @param WP_Post $post Post object. + */ + $post->post_title = apply_filters( 'default_title', $post_title, $post ); + + /** + * Filter the default post excerpt initially used in the "Write Post" form. + * + * @since 1.5.0 + * + * @param string $post_excerpt Default post excerpt. + * @param WP_Post $post Post object. + */ + $post->post_excerpt = apply_filters( 'default_excerpt', $post_excerpt, $post ); + $post->post_name = ''; + + return $post; +} + +/** + * Determine if a post exists based on title, content, and date + * + * @since 2.0.0 + * + * @param string $title Post title + * @param string $content Optional post content + * @param string $date Optional post date + * @return int Post ID if post exists, 0 otherwise. + */ +function post_exists($title, $content = '', $date = '') { + global $wpdb; + + $post_title = wp_unslash( sanitize_post_field( 'post_title', $title, 0, 'db' ) ); + $post_content = wp_unslash( sanitize_post_field( 'post_content', $content, 0, 'db' ) ); + $post_date = wp_unslash( sanitize_post_field( 'post_date', $date, 0, 'db' ) ); + + $query = "SELECT ID FROM $wpdb->posts WHERE 1=1"; + $args = array(); + + if ( !empty ( $date ) ) { + $query .= ' AND post_date = %s'; + $args[] = $post_date; + } + + if ( !empty ( $title ) ) { + $query .= ' AND post_title = %s'; + $args[] = $post_title; + } + + if ( !empty ( $content ) ) { + $query .= 'AND post_content = %s'; + $args[] = $post_content; + } + + if ( !empty ( $args ) ) + return (int) $wpdb->get_var( $wpdb->prepare($query, $args) ); + + return 0; +} + +/** + * Creates a new post from the "Write Post" form using $_POST information. + * + * @since 2.1.0 + * + * @return unknown + */ +function wp_write_post() { + if ( isset($_POST['post_type']) ) + $ptype = get_post_type_object($_POST['post_type']); + else + $ptype = get_post_type_object('post'); + + if ( !current_user_can( $ptype->cap->edit_posts ) ) { + if ( 'page' == $ptype->name ) + return new WP_Error( 'edit_pages', __( 'You are not allowed to create pages on this site.' ) ); + else + return new WP_Error( 'edit_posts', __( 'You are not allowed to create posts or drafts on this site.' ) ); + } + + $_POST['post_mime_type'] = ''; + + // Clear out any data in internal vars. + unset( $_POST['filter'] ); + + // Edit don't write if we have a post id. + if ( isset( $_POST['post_ID'] ) ) + return edit_post(); + + if ( isset($_POST['visibility']) ) { + switch ( $_POST['visibility'] ) { + case 'public' : + $_POST['post_password'] = ''; + break; + case 'password' : + unset( $_POST['sticky'] ); + break; + case 'private' : + $_POST['post_status'] = 'private'; + $_POST['post_password'] = ''; + unset( $_POST['sticky'] ); + break; + } + } + + $translated = _wp_translate_postdata( false ); + if ( is_wp_error($translated) ) + return $translated; + + // Create the post. + $post_ID = wp_insert_post( $_POST ); + if ( is_wp_error( $post_ID ) ) + return $post_ID; + + if ( empty($post_ID) ) + return 0; + + add_meta( $post_ID ); + + add_post_meta( $post_ID, '_edit_last', $GLOBALS['current_user']->ID ); + + // Now that we have an ID we can fix any attachment anchor hrefs + _fix_attachment_links( $post_ID ); + + wp_set_post_lock( $post_ID ); + + return $post_ID; +} + +/** + * Calls wp_write_post() and handles the errors. + * + * @since 2.0.0 + + * @uses wp_write_post() + * @uses is_wp_error() + * @uses wp_die() + * @return unknown + */ +function write_post() { + $result = wp_write_post(); + if ( is_wp_error( $result ) ) + wp_die( $result->get_error_message() ); + else + return $result; +} + +// +// Post Meta +// + +/** + * {@internal Missing Short Description}} + * + * @since 1.2.0 + * + * @param unknown_type $post_ID + * @return unknown + */ +function add_meta( $post_ID ) { + global $wpdb; + $post_ID = (int) $post_ID; + + $metakeyselect = isset($_POST['metakeyselect']) ? wp_unslash( trim( $_POST['metakeyselect'] ) ) : ''; + $metakeyinput = isset($_POST['metakeyinput']) ? wp_unslash( trim( $_POST['metakeyinput'] ) ) : ''; + $metavalue = isset($_POST['metavalue']) ? $_POST['metavalue'] : ''; + if ( is_string( $metavalue ) ) + $metavalue = trim( $metavalue ); + + if ( ('0' === $metavalue || ! empty ( $metavalue ) ) && ( ( ( '#NONE#' != $metakeyselect ) && !empty ( $metakeyselect) ) || !empty ( $metakeyinput ) ) ) { + // We have a key/value pair. If both the select and the + // input for the key have data, the input takes precedence: + + if ( '#NONE#' != $metakeyselect ) + $metakey = $metakeyselect; + + if ( $metakeyinput ) + $metakey = $metakeyinput; // default + + if ( is_protected_meta( $metakey, 'post' ) || ! current_user_can( 'add_post_meta', $post_ID, $metakey ) ) + return false; + + $metakey = wp_slash( $metakey ); + + return add_post_meta( $post_ID, $metakey, $metavalue ); + } + + return false; +} // add_meta + +/** + * {@internal Missing Short Description}} + * + * @since 1.2.0 + * + * @param unknown_type $mid + * @return unknown + */ +function delete_meta( $mid ) { + return delete_metadata_by_mid( 'post' , $mid ); +} + +/** + * Get a list of previously defined keys. + * + * @since 1.2.0 + * + * @return unknown + */ +function get_meta_keys() { + global $wpdb; + + $keys = $wpdb->get_col( " + SELECT meta_key + FROM $wpdb->postmeta + GROUP BY meta_key + ORDER BY meta_key" ); + + return $keys; +} + +/** + * {@internal Missing Short Description}} + * + * @since 2.1.0 + * + * @param unknown_type $mid + * @return unknown + */ +function get_post_meta_by_id( $mid ) { + return get_metadata_by_mid( 'post', $mid ); +} + +/** + * {@internal Missing Short Description}} + * + * Some postmeta stuff. + * + * @since 1.2.0 + * + * @param unknown_type $postid + * @return unknown + */ +function has_meta( $postid ) { + global $wpdb; + + return $wpdb->get_results( $wpdb->prepare("SELECT meta_key, meta_value, meta_id, post_id + FROM $wpdb->postmeta WHERE post_id = %d + ORDER BY meta_key,meta_id", $postid), ARRAY_A ); +} + +/** + * {@internal Missing Short Description}} + * + * @since 1.2.0 + * + * @param unknown_type $meta_id + * @param unknown_type $meta_key Expect Slashed + * @param unknown_type $meta_value Expect Slashed + * @return unknown + */ +function update_meta( $meta_id, $meta_key, $meta_value ) { + $meta_key = wp_unslash( $meta_key ); + $meta_value = wp_unslash( $meta_value ); + + return update_metadata_by_mid( 'post', $meta_id, $meta_value, $meta_key ); +} + +// +// Private +// + +/** + * Replace hrefs of attachment anchors with up-to-date permalinks. + * + * @since 2.3.0 + * @access private + * + * @param int|object $post Post ID or post object. + * @return void|int|WP_Error Void if nothing fixed. 0 or WP_Error on update failure. The post ID on update success. + */ +function _fix_attachment_links( $post ) { + $post = get_post( $post, ARRAY_A ); + $content = $post['post_content']; + + // Don't run if no pretty permalinks or post is not published, scheduled, or privately published. + if ( ! get_option( 'permalink_structure' ) || ! in_array( $post['post_status'], array( 'publish', 'future', 'private' ) ) ) + return; + + // Short if there aren't any links or no '?attachment_id=' strings (strpos cannot be zero) + if ( !strpos($content, '?attachment_id=') || !preg_match_all( '/]+)>[\s\S]+?<\/a>/', $content, $link_matches ) ) + return; + + $site_url = get_bloginfo('url'); + $site_url = substr( $site_url, (int) strpos($site_url, '://') ); // remove the http(s) + $replace = ''; + + foreach ( $link_matches[1] as $key => $value ) { + if ( !strpos($value, '?attachment_id=') || !strpos($value, 'wp-att-') + || !preg_match( '/href=(["\'])[^"\']*\?attachment_id=(\d+)[^"\']*\\1/', $value, $url_match ) + || !preg_match( '/rel=["\'][^"\']*wp-att-(\d+)/', $value, $rel_match ) ) + continue; + + $quote = $url_match[1]; // the quote (single or double) + $url_id = (int) $url_match[2]; + $rel_id = (int) $rel_match[1]; + + if ( !$url_id || !$rel_id || $url_id != $rel_id || strpos($url_match[0], $site_url) === false ) + continue; + + $link = $link_matches[0][$key]; + $replace = str_replace( $url_match[0], 'href=' . $quote . get_attachment_link( $url_id ) . $quote, $link ); + + $content = str_replace( $link, $replace, $content ); + } + + if ( $replace ) { + $post['post_content'] = $content; + // Escape data pulled from DB. + $post = add_magic_quotes($post); + + return wp_update_post($post); + } +} + +/** + * Get all the possible statuses for a post_type + * + * @since 2.5.0 + * + * @param string $type The post_type you want the statuses for + * @return array As array of all the statuses for the supplied post type + */ +function get_available_post_statuses($type = 'post') { + $stati = wp_count_posts($type); + + return array_keys(get_object_vars($stati)); +} + +/** + * Run the wp query to fetch the posts for listing on the edit posts page + * + * @since 2.5.0 + * + * @param array|bool $q Array of query variables to use to build the query or false to use $_GET superglobal. + * @return array + */ +function wp_edit_posts_query( $q = false ) { + if ( false === $q ) + $q = $_GET; + $q['m'] = isset($q['m']) ? (int) $q['m'] : 0; + $q['cat'] = isset($q['cat']) ? (int) $q['cat'] : 0; + $post_stati = get_post_stati(); + + if ( isset($q['post_type']) && in_array( $q['post_type'], get_post_types() ) ) + $post_type = $q['post_type']; + else + $post_type = 'post'; + + $avail_post_stati = get_available_post_statuses($post_type); + + if ( isset($q['post_status']) && in_array( $q['post_status'], $post_stati ) ) { + $post_status = $q['post_status']; + $perm = 'readable'; + } + + if ( isset($q['orderby']) ) + $orderby = $q['orderby']; + elseif ( isset($q['post_status']) && in_array($q['post_status'], array('pending', 'draft')) ) + $orderby = 'modified'; + + if ( isset($q['order']) ) + $order = $q['order']; + elseif ( isset($q['post_status']) && 'pending' == $q['post_status'] ) + $order = 'ASC'; + + $per_page = 'edit_' . $post_type . '_per_page'; + $posts_per_page = (int) get_user_option( $per_page ); + if ( empty( $posts_per_page ) || $posts_per_page < 1 ) + $posts_per_page = 20; + + /** + * Filter the number of items per page to show for a specific 'per_page' type. + * + * The dynamic hook name, $per_page, refers to a hook name comprised of the post type, + * preceded by 'edit_', and succeeded by '_per_page', e.g. 'edit_$post_type_per_page'. + * + * Some examples of filter hooks generated here include: 'edit_attachment_per_page', + * 'edit_post_per_page', 'edit_page_per_page', etc. + * + * @since 3.0.0 + * + * @param int $posts_per_page Number of posts to display per page for the given 'per_page' + * type. Default 20. + */ + $posts_per_page = apply_filters( $per_page, $posts_per_page ); + + /** + * Filter the number of posts displayed per page when specifically listing "posts". + * + * @since 2.8.0 + * + * @param int $per_page Number of posts to be displayed. Default 20. + * @param string $post_type The post type. + */ + $posts_per_page = apply_filters( 'edit_posts_per_page', $posts_per_page, $post_type ); + + $query = compact('post_type', 'post_status', 'perm', 'order', 'orderby', 'posts_per_page'); + + // Hierarchical types require special args. + if ( is_post_type_hierarchical( $post_type ) && !isset($orderby) ) { + $query['orderby'] = 'menu_order title'; + $query['order'] = 'asc'; + $query['posts_per_page'] = -1; + $query['posts_per_archive_page'] = -1; + } + + if ( ! empty( $q['show_sticky'] ) ) + $query['post__in'] = (array) get_option( 'sticky_posts' ); + + wp( $query ); + + return $avail_post_stati; +} + +/** + * {@internal Missing Short Description}} + * + * @since 2.5.0 + * + * @param unknown_type $type + * @return unknown + */ +function get_available_post_mime_types($type = 'attachment') { + global $wpdb; + + $types = $wpdb->get_col($wpdb->prepare("SELECT DISTINCT post_mime_type FROM $wpdb->posts WHERE post_type = %s", $type)); + return $types; +} + +/** + * Executes a query for attachments. An array of WP_Query arguments + * can be passed in, which will override the arguments set by this function. + * + * @since 2.5.0 + * + * @param array|bool $q Array of query variables to use to build the query or false to use $_GET superglobal. + * @return array + */ +function wp_edit_attachments_query( $q = false ) { + if ( false === $q ) + $q = $_GET; + + $q['m'] = isset( $q['m'] ) ? (int) $q['m'] : 0; + $q['cat'] = isset( $q['cat'] ) ? (int) $q['cat'] : 0; + $q['post_type'] = 'attachment'; + $post_type = get_post_type_object( 'attachment' ); + $states = 'inherit'; + if ( current_user_can( $post_type->cap->read_private_posts ) ) + $states .= ',private'; + + $q['post_status'] = isset( $q['status'] ) && 'trash' == $q['status'] ? 'trash' : $states; + $media_per_page = (int) get_user_option( 'upload_per_page' ); + if ( empty( $media_per_page ) || $media_per_page < 1 ) + $media_per_page = 20; + + /** + * Filter the number of items to list per page when listing media items. + * + * @since 2.9.0 + * + * @param int $media_per_page Number of media to list. Default 20. + */ + $q['posts_per_page'] = apply_filters( 'upload_per_page', $media_per_page ); + + $post_mime_types = get_post_mime_types(); + $avail_post_mime_types = get_available_post_mime_types('attachment'); + + if ( isset($q['post_mime_type']) && !array_intersect( (array) $q['post_mime_type'], array_keys($post_mime_types) ) ) + unset($q['post_mime_type']); + + if ( isset($q['detached']) ) + $q['post_parent'] = 0; + + wp( $q ); + + return array($post_mime_types, $avail_post_mime_types); +} + +/** + * Returns the list of classes to be used by a metabox + * + * @uses get_user_option() + * @since 2.5.0 + * + * @param unknown_type $id + * @param unknown_type $page + * @return unknown + */ +function postbox_classes( $id, $page ) { + if ( isset( $_GET['edit'] ) && $_GET['edit'] == $id ) { + $classes = array( '' ); + } elseif ( $closed = get_user_option('closedpostboxes_'.$page ) ) { + if ( !is_array( $closed ) ) { + $classes = array( '' ); + } else { + $classes = in_array( $id, $closed ) ? array( 'closed' ) : array( '' ); + } + } else { + $classes = array( '' ); + } + + /** + * Filter the postbox classes for a specific screen and screen ID combo. + * + * The dynamic portions of the hook name, $page, and $id, refer to + * the screen, and screen ID, respectively. + * + * @since 3.2.0 + * + * @param array $classes An array of postbox classes. + */ + $classes = apply_filters( "postbox_classes_{$page}_{$id}", $classes ); + return implode( ' ', $classes ); +} + +/** + * {@internal Missing Short Description}} + * + * @since 2.5.0 + * + * @param int|object $id Post ID or post object. + * @param string $title (optional) Title + * @param string $name (optional) Name + * @return array With two entries of type string + */ +function get_sample_permalink($id, $title = null, $name = null) { + $post = get_post( $id ); + if ( ! $post ) + return array( '', '' ); + + $ptype = get_post_type_object($post->post_type); + + $original_status = $post->post_status; + $original_date = $post->post_date; + $original_name = $post->post_name; + + // Hack: get_permalink() would return ugly permalink for drafts, so we will fake that our post is published. + if ( in_array( $post->post_status, array( 'draft', 'pending' ) ) ) { + $post->post_status = 'publish'; + $post->post_name = sanitize_title($post->post_name ? $post->post_name : $post->post_title, $post->ID); + } + + // If the user wants to set a new name -- override the current one + // Note: if empty name is supplied -- use the title instead, see #6072 + if ( !is_null($name) ) + $post->post_name = sanitize_title($name ? $name : $title, $post->ID); + + $post->post_name = wp_unique_post_slug($post->post_name, $post->ID, $post->post_status, $post->post_type, $post->post_parent); + + $post->filter = 'sample'; + + $permalink = get_permalink($post, true); + + // Replace custom post_type Token with generic pagename token for ease of use. + $permalink = str_replace("%$post->post_type%", '%pagename%', $permalink); + + // Handle page hierarchy + if ( $ptype->hierarchical ) { + $uri = get_page_uri($post); + $uri = untrailingslashit($uri); + $uri = strrev( stristr( strrev( $uri ), '/' ) ); + $uri = untrailingslashit($uri); + + /** This filter is documented in wp-admin/edit-tag-form.php */ + $uri = apply_filters( 'editable_slug', $uri ); + if ( !empty($uri) ) + $uri .= '/'; + $permalink = str_replace('%pagename%', "{$uri}%pagename%", $permalink); + } + + /** This filter is documented in wp-admin/edit-tag-form.php */ + $permalink = array( $permalink, apply_filters( 'editable_slug', $post->post_name ) ); + $post->post_status = $original_status; + $post->post_date = $original_date; + $post->post_name = $original_name; + unset($post->filter); + + return $permalink; +} + +/** + * Returns the HTML of the sample permalink slug editor. + * + * @since 2.5.0 + * + * @param int|object $id Post ID or post object. + * @param string $new_title Optional. New title. + * @param string $new_slug Optional. New slug. + * @return string The HTML of the sample permalink slug editor. + */ +function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) { + $post = get_post( $id ); + if ( ! $post ) + return ''; + + list($permalink, $post_name) = get_sample_permalink($post->ID, $new_title, $new_slug); + + if ( current_user_can( 'read_post', $post->ID ) ) { + $ptype = get_post_type_object( $post->post_type ); + $view_post = $ptype->labels->view_item; + } + + if ( 'publish' == get_post_status( $post ) ) { + $title = __('Click to edit this part of the permalink'); + } else { + $title = __('Temporary permalink. Click to edit this part.'); + } + + if ( false === strpos($permalink, '%postname%') && false === strpos($permalink, '%pagename%') ) { + $return = '' . __('Permalink:') . "\n" . '' . $permalink . "\n"; + if ( '' == get_option( 'permalink_structure' ) && current_user_can( 'manage_options' ) && !( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') ) ) + $return .= '' . __('Change Permalinks') . "\n"; + if ( isset( $view_post ) ) + $return .= "$view_post\n"; + + /** + * Filter the sample permalink HTML markup. + * + * @since 2.9.0 + * + * @param string $return Sample permalink HTML markup. + * @param int|WP_Post $id Post object or ID. + * @param string $new_title New sample permalink title. + * @param string $new_slug New sample permalink slug. + */ + $return = apply_filters( 'get_sample_permalink_html', $return, $id, $new_title, $new_slug ); + + return $return; + } + + if ( function_exists('mb_strlen') ) { + if ( mb_strlen($post_name) > 30 ) { + $post_name_abridged = mb_substr($post_name, 0, 14). '…' . mb_substr($post_name, -14); + } else { + $post_name_abridged = $post_name; + } + } else { + if ( strlen($post_name) > 30 ) { + $post_name_abridged = substr($post_name, 0, 14). '…' . substr($post_name, -14); + } else { + $post_name_abridged = $post_name; + } + } + + $post_name_html = '' . $post_name_abridged . ''; + $display_link = str_replace(array('%pagename%','%postname%'), $post_name_html, $permalink); + $view_link = str_replace(array('%pagename%','%postname%'), $post_name, $permalink); + $return = '' . __('Permalink:') . "\n"; + $return .= '' . $display_link . "\n"; + $return .= '‎'; // Fix bi-directional text display defect in RTL languages. + $return .= '' . __('Edit') . "\n"; + $return .= '' . $post_name . "\n"; + + if ( isset( $view_post ) ) { + $return .= "$view_post\n"; + } + + /** This filter is documented in wp-admin/includes/post.php */ + $return = apply_filters( 'get_sample_permalink_html', $return, $id, $new_title, $new_slug ); + + return $return; +} + +/** + * Output HTML for the post thumbnail meta-box. + * + * @since 2.9.0 + * + * @param int $thumbnail_id ID of the attachment used for thumbnail + * @param mixed $post The post ID or object associated with the thumbnail, defaults to global $post. + * @return string html + */ +function _wp_post_thumbnail_html( $thumbnail_id = null, $post = null ) { + global $content_width, $_wp_additional_image_sizes; + + $post = get_post( $post ); + + $upload_iframe_src = esc_url( get_upload_iframe_src('image', $post->ID ) ); + $set_thumbnail_link = '

    %s

    '; + $content = sprintf( $set_thumbnail_link, $upload_iframe_src, esc_html__( 'Set featured image' ) ); + + if ( $thumbnail_id && get_post( $thumbnail_id ) ) { + $old_content_width = $content_width; + $content_width = 266; + if ( !isset( $_wp_additional_image_sizes['post-thumbnail'] ) ) + $thumbnail_html = wp_get_attachment_image( $thumbnail_id, array( $content_width, $content_width ) ); + else + $thumbnail_html = wp_get_attachment_image( $thumbnail_id, 'post-thumbnail' ); + if ( !empty( $thumbnail_html ) ) { + $ajax_nonce = wp_create_nonce( 'set_post_thumbnail-' . $post->ID ); + $content = sprintf( $set_thumbnail_link, $upload_iframe_src, $thumbnail_html ); + $content .= '

    ' . esc_html__( 'Remove featured image' ) . '

    '; + } + $content_width = $old_content_width; + } + + /** + * Filter the admin post thumbnail HTML markup to return. + * + * @since 2.9.0 + * + * @param string $content Admin post thumbnail HTML markup. + * @param int $post_id Post ID. + */ + return apply_filters( 'admin_post_thumbnail_html', $content, $post->ID ); +} + +/** + * Check to see if the post is currently being edited by another user. + * + * @since 2.5.0 + * + * @param int $post_id ID of the post to check for editing + * @return bool|int False: not locked or locked by current user. Int: user ID of user with lock. + */ +function wp_check_post_lock( $post_id ) { + if ( !$post = get_post( $post_id ) ) + return false; + + if ( !$lock = get_post_meta( $post->ID, '_edit_lock', true ) ) + return false; + + $lock = explode( ':', $lock ); + $time = $lock[0]; + $user = isset( $lock[1] ) ? $lock[1] : get_post_meta( $post->ID, '_edit_last', true ); + + /** This filter is documented in wp-admin/includes/ajax-actions.php */ + $time_window = apply_filters( 'wp_check_post_lock_window', 150 ); + + if ( $time && $time > time() - $time_window && $user != get_current_user_id() ) + return $user; + return false; +} + +/** + * Mark the post as currently being edited by the current user + * + * @since 2.5.0 + * + * @param int $post_id ID of the post to being edited + * @return bool|array Returns false if the post doesn't exist of there is no current user, or + * an array of the lock time and the user ID. + */ +function wp_set_post_lock( $post_id ) { + if ( !$post = get_post( $post_id ) ) + return false; + if ( 0 == ($user_id = get_current_user_id()) ) + return false; + + $now = time(); + $lock = "$now:$user_id"; + + update_post_meta( $post->ID, '_edit_lock', $lock ); + return array( $now, $user_id ); +} + +/** + * Outputs the HTML for the notice to say that someone else is editing or has taken over editing of this post. + * + * @since 2.8.5 + * @return none + */ +function _admin_notice_post_locked() { + if ( ! $post = get_post() ) + return; + + $user = null; + if ( $user_id = wp_check_post_lock( $post->ID ) ) + $user = get_userdata( $user_id ); + + if ( $user ) { + + /** + * Filter whether to show the post locked dialog. + * + * Returning a falsey value to the filter will short-circuit displaying the dialog. + * + * @since 3.6.0 + * + * @param bool $display Whether to display the dialog. Default true. + * @param WP_User|bool $user WP_User object on success, false otherwise. + */ + if ( ! apply_filters( 'show_post_locked_dialog', true, $post, $user ) ) + return; + + $locked = true; + } else { + $locked = false; + } + + if ( $locked && ( $sendback = wp_get_referer() ) && + false === strpos( $sendback, 'post.php' ) && false === strpos( $sendback, 'post-new.php' ) ) { + + $sendback_text = __('Go back'); + } else { + $sendback = admin_url( 'edit.php' ); + + if ( 'post' != $post->post_type ) + $sendback = add_query_arg( 'post_type', $post->post_type, $sendback ); + + $sendback_text = get_post_type_object( $post->post_type )->labels->all_items; + } + + $hidden = $locked ? '' : ' hidden'; + + ?> +
    +
    +
    + post_type )->public ) { + $preview_link = set_url_scheme( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ); + + if ( 'publish' == $post->post_status || $user->ID != $post->post_author ) { + // Latest content is in autosave + $nonce = wp_create_nonce( 'post_preview_' . $post->ID ); + $preview_link = add_query_arg( array( 'preview_id' => $post->ID, 'preview_nonce' => $nonce ), $preview_link ); + } + } else { + $preview_link = ''; + } + + /** This filter is documented in wp-admin/includes/meta-boxes.php */ + $preview_link = apply_filters( 'preview_post_link', $preview_link ); + + /** + * Filter whether to allow the post lock to be overridden. + * + * Returning a falsey value to the filter will disable the ability + * to override the post lock. + * + * @since 3.6.0 + * + * @param bool $override Whether to allow overriding post locks. Default true. + * @param WP_Post $post Post object. + * @param WP_User $user User object. + */ + $override = apply_filters( 'override_post_lock', true, $post, $user ); + $tab_last = $override ? '' : ' wp-tab-last'; + + ?> +
    +
    ID, 64 ); ?>
    +

    + display_name ) ); + ?> +

    + +

    + + + + + + +

    +
    + +
    +
    +

    +
    + + +

    + +

    +
    + +
    +
    + ID; + $new_autosave['post_author'] = $post_author; + + // If the new autosave has the same content as the post, delete the autosave. + $post = get_post( $post_id ); + $autosave_is_different = false; + foreach ( array_intersect( array_keys( $new_autosave ), array_keys( _wp_post_revision_fields() ) ) as $field ) { + if ( normalize_whitespace( $new_autosave[ $field ] ) != normalize_whitespace( $post->$field ) ) { + $autosave_is_different = true; + break; + } + } + + if ( ! $autosave_is_different ) { + wp_delete_post_revision( $old_autosave->ID ); + return 0; + } + + return wp_update_post( $new_autosave ); + } + + // _wp_put_post_revision() expects unescaped. + $post_data = wp_unslash( $post_data ); + + // Otherwise create the new autosave as a special post revision + return _wp_put_post_revision( $post_data, true ); +} + +/** + * Save draft or manually autosave for showing preview. + * + * @package WordPress + * @since 2.7.0 + * + * @uses get_post_status() + * @uses edit_post() + * @uses get_post() + * @uses current_user_can() + * @uses wp_die() + * @uses wp_create_post_autosave() + * @uses add_query_arg() + * @uses wp_create_nonce() + * + * @return str URL to redirect to show the preview + */ +function post_preview() { + + $post_ID = (int) $_POST['post_ID']; + $_POST['ID'] = $post_ID; + + if ( ! $post = get_post( $post_ID ) ) { + wp_die( __( 'You are not allowed to edit this post.' ) ); + } + + if ( ! current_user_can( 'edit_post', $post->ID ) ) { + wp_die( __( 'You are not allowed to edit this post.' ) ); + } + + $is_autosave = false; + + if ( ! wp_check_post_lock( $post->ID ) && get_current_user_id() == $post->post_author && ( 'draft' == $post->post_status || 'auto-draft' == $post->post_status ) ) { + $saved_post_id = edit_post(); + } else { + $is_autosave = true; + + if ( 'auto-draft' == $_POST['post_status'] ) + $_POST['post_status'] = 'draft'; + + $saved_post_id = wp_create_post_autosave( $post->ID ); + } + + if ( is_wp_error( $saved_post_id ) ) + wp_die( $saved_post_id->get_error_message() ); + + $query_args = array( 'preview' => 'true' ); + + if ( $is_autosave && $saved_post_id ) { + $query_args['preview_id'] = $post->ID; + $query_args['preview_nonce'] = wp_create_nonce( 'post_preview_' . $post->ID ); + + if ( isset( $_POST['post_format'] ) ) + $query_args['post_format'] = empty( $_POST['post_format'] ) ? 'standard' : sanitize_key( $_POST['post_format'] ); + } + + $url = add_query_arg( $query_args, get_permalink( $post->ID ) ); + + /** This filter is documented in wp-admin/includes/meta-boxes.php */ + return apply_filters( 'preview_post_link', $url ); +} + +/** + * Save a post submitted with XHR + * + * Intended for use with heartbeat and autosave.js + * + * @since 3.9 + * + * @param $post_data Associative array of the submitted post data. + * @return mixed The value 0 or WP_Error on failure. The saved post ID on success. + * Te ID can be the draft post_id or the autosave revision post_id. + */ +function wp_autosave( $post_data ) { + // Back-compat + if ( ! defined( 'DOING_AUTOSAVE' ) ) + define( 'DOING_AUTOSAVE', true ); + + $post_id = (int) $post_data['post_id']; + $post_data['ID'] = $post_data['post_ID'] = $post_id; + + if ( false === wp_verify_nonce( $post_data['_wpnonce'], 'update-post_' . $post_id ) ) { + return new WP_Error( 'invalid_nonce', __( 'Error while saving.' ) ); + } + + $post = get_post( $post_id ); + + if ( ! current_user_can( 'edit_post', $post->ID ) ) { + return new WP_Error( 'edit_posts', __( 'You are not allowed to edit this item.' ) ); + } + + if ( 'auto-draft' == $post->post_status ) + $post_data['post_status'] = 'draft'; + + if ( $post_data['post_type'] != 'page' && ! empty( $post_data['catslist'] ) ) + $post_data['post_category'] = explode( ',', $post_data['catslist'] ); + + if ( ! wp_check_post_lock( $post->ID ) && get_current_user_id() == $post->post_author && ( 'auto-draft' == $post->post_status || 'draft' == $post->post_status ) ) { + // Drafts and auto-drafts are just overwritten by autosave for the same user if the post is not locked + return edit_post( wp_slash( $post_data ) ); + } else { + // Non drafts or other users drafts are not overwritten. The autosave is stored in a special post revision for each user. + return wp_create_post_autosave( wp_slash( $post_data ) ); + } +} diff --git a/wp-admin/includes/revision.php b/wp-admin/includes/revision.php new file mode 100644 index 0000000..737c3b1 --- /dev/null +++ b/wp-admin/includes/revision.php @@ -0,0 +1,224 @@ +post_parent !== $post->ID && $compare_from->ID !== $post->ID ) + return false; + if ( $compare_to->post_parent !== $post->ID && $compare_to->ID !== $post->ID ) + return false; + + if ( $compare_from && strtotime( $compare_from->post_date_gmt ) > strtotime( $compare_to->post_date_gmt ) ) { + $temp = $compare_from; + $compare_from = $compare_to; + $compare_to = $temp; + } + + // Add default title if title field is empty + if ( $compare_from && empty( $compare_from->post_title ) ) + $compare_from->post_title = __( '(no title)' ); + if ( empty( $compare_to->post_title ) ) + $compare_to->post_title = __( '(no title)' ); + + $return = array(); + + foreach ( _wp_post_revision_fields() as $field => $name ) { + /** + * Contextually filter a post revision field. + * + * The dynamic portion of the hook name, $field, corresponds to each of the post + * fields of the revision object being iterated over in a foreach statement. + * + * @since 3.6.0 + * + * @param string $compare_from->$field The current revision field to compare to or from. + * @param string $field The current revision field. + * @param WP_Post $compare_from The revision post object to compare to or from. + * @param string null The context of whether the current revision is the old or the new one. Values are 'to' or 'from'. + */ + $content_from = $compare_from ? apply_filters( "_wp_post_revision_field_$field", $compare_from->$field, $field, $compare_from, 'from' ) : ''; + + /** This filter is documented in wp-admin/includes/revision.php */ + $content_to = apply_filters( "_wp_post_revision_field_$field", $compare_to->$field, $field, $compare_to, 'to' ); + + $diff = wp_text_diff( $content_from, $content_to, array( 'show_split_view' => true ) ); + + if ( ! $diff && 'post_title' === $field ) { + // It's a better user experience to still show the Title, even if it didn't change. + // No, you didn't see this. + $diff = ''; + $diff .= ''; + $diff .= ''; + $diff .= '
    ' . esc_html( $compare_from->post_title ) . '' . esc_html( $compare_to->post_title ) . '
    '; + } + + if ( $diff ) { + $return[] = array( + 'id' => $field, + 'name' => $name, + 'diff' => $diff, + ); + } + } + return $return; +} + +/** + * Prepare revisions for JavaScript. + * + * @since 3.6.0 + * + * @param object|int $post The post object. Also accepts a post ID. + * @param int $selected_revision_id The selected revision ID. + * @param int $from Optional. The revision ID to compare from. + * + * @return array An associative array of revision data and related settings. + */ +function wp_prepare_revisions_for_js( $post, $selected_revision_id, $from = null ) { + $post = get_post( $post ); + $revisions = $authors = array(); + $now_gmt = time(); + + $revisions = wp_get_post_revisions( $post->ID, array( 'order' => 'ASC', 'check_enabled' => false ) ); + // If revisions are disabled, we only want autosaves and the current post. + if ( ! wp_revisions_enabled( $post ) ) { + foreach ( $revisions as $revision_id => $revision ) { + if ( ! wp_is_post_autosave( $revision ) ) + unset( $revisions[ $revision_id ] ); + } + $revisions = array( $post->ID => $post ) + $revisions; + } + + $show_avatars = get_option( 'show_avatars' ); + + cache_users( wp_list_pluck( $revisions, 'post_author' ) ); + + $can_restore = current_user_can( 'edit_post', $post->ID ); + + foreach ( $revisions as $revision ) { + $modified = strtotime( $revision->post_modified ); + $modified_gmt = strtotime( $revision->post_modified_gmt ); + if ( $can_restore ) { + $restore_link = str_replace( '&', '&', wp_nonce_url( + add_query_arg( + array( 'revision' => $revision->ID, + 'action' => 'restore' ), + admin_url( 'revision.php' ) + ), + "restore-post_{$revision->ID}" + ) ); + } + + if ( ! isset( $authors[ $revision->post_author ] ) ) { + $authors[ $revision->post_author ] = array( + 'id' => (int) $revision->post_author, + 'avatar' => $show_avatars ? get_avatar( $revision->post_author, 32 ) : '', + 'name' => get_the_author_meta( 'display_name', $revision->post_author ), + ); + } + + $autosave = (bool) wp_is_post_autosave( $revision ); + $current = ! $autosave && $revision->post_modified_gmt === $post->post_modified_gmt; + if ( $current && ! empty( $current_id ) ) { + // If multiple revisions have the same post_modified_gmt, highest ID is current. + if ( $current_id < $revision->ID ) { + $revisions[ $current_id ]['current'] = false; + $current_id = $revision->ID; + } else { + $current = false; + } + } elseif ( $current ) { + $current_id = $revision->ID; + } + + $revisions[ $revision->ID ] = array( + 'id' => $revision->ID, + 'title' => get_the_title( $post->ID ), + 'author' => $authors[ $revision->post_author ], + 'date' => date_i18n( __( 'M j, Y @ G:i' ), $modified ), + 'dateShort' => date_i18n( _x( 'j M @ G:i', 'revision date short format' ), $modified ), + 'timeAgo' => sprintf( __( '%s ago' ), human_time_diff( $modified_gmt, $now_gmt ) ), + 'autosave' => $autosave, + 'current' => $current, + 'restoreUrl' => $can_restore ? $restore_link : false, + ); + } + + // If a post has been saved since the last revision (no revisioned fields were changed) + // we may not have a "current" revision. Mark the latest revision as "current". + if ( empty( $current_id ) ) { + if ( $revisions[ $revision->ID ]['autosave'] ) { + $revision = end( $revisions ); + while ( $revision['autosave'] ) { + $revision = prev( $revisions ); + } + $current_id = $revision['id']; + } else { + $current_id = $revision->ID; + } + $revisions[ $current_id ]['current'] = true; + } + + // Now, grab the initial diff + $compare_two_mode = is_numeric( $from ); + if ( ! $compare_two_mode ) { + $found = array_search( $selected_revision_id, array_keys( $revisions ) ); + if ( $found ) { + $from = array_keys( array_slice( $revisions, $found - 1, 1, true ) ); + $from = reset( $from ); + } else { + $from = 0; + } + } + + $from = absint( $from ); + + $diffs = array( array( + 'id' => $from . ':' . $selected_revision_id, + 'fields' => wp_get_revision_ui_diff( $post->ID, $from, $selected_revision_id ), + )); + + return array( + 'postId' => $post->ID, + 'nonce' => wp_create_nonce( 'revisions-ajax-nonce' ), + 'revisionData' => array_values( $revisions ), + 'to' => $selected_revision_id, + 'from' => $from, + 'diffData' => $diffs, + 'baseUrl' => parse_url( admin_url( 'revision.php' ), PHP_URL_PATH ), + 'compareTwoMode' => absint( $compare_two_mode ), // Apparently booleans are not allowed + 'revisionIds' => array_keys( $revisions ), + ); +} diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php new file mode 100644 index 0000000..0c7a53c --- /dev/null +++ b/wp-admin/includes/schema.php @@ -0,0 +1,1012 @@ +get_charset_collate(); + +/** + * Retrieve the SQL for creating database tables. + * + * @since 3.3.0 + * + * @param string $scope Optional. The tables for which to retrieve SQL. Can be all, global, ms_global, or blog tables. Defaults to all. + * @param int $blog_id Optional. The blog ID for which to retrieve SQL. Default is the current blog ID. + * @return string The SQL needed to create the requested tables. + */ +function wp_get_db_schema( $scope = 'all', $blog_id = null ) { + global $wpdb; + + $charset_collate = ''; + + if ( ! empty($wpdb->charset) ) + $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset"; + if ( ! empty($wpdb->collate) ) + $charset_collate .= " COLLATE $wpdb->collate"; + + if ( $blog_id && $blog_id != $wpdb->blogid ) + $old_blog_id = $wpdb->set_blog_id( $blog_id ); + + // Engage multisite if in the middle of turning it on from network.php. + $is_multisite = is_multisite() || ( defined( 'WP_INSTALLING_NETWORK' ) && WP_INSTALLING_NETWORK ); + + // Blog specific tables. + $blog_tables = "CREATE TABLE $wpdb->terms ( + term_id bigint(20) unsigned NOT NULL auto_increment, + name varchar(200) NOT NULL default '', + slug varchar(200) NOT NULL default '', + term_group bigint(10) NOT NULL default 0, + PRIMARY KEY (term_id), + UNIQUE KEY slug (slug), + KEY name (name) +) $charset_collate; +CREATE TABLE $wpdb->term_taxonomy ( + term_taxonomy_id bigint(20) unsigned NOT NULL auto_increment, + term_id bigint(20) unsigned NOT NULL default 0, + taxonomy varchar(32) NOT NULL default '', + description longtext NOT NULL, + parent bigint(20) unsigned NOT NULL default 0, + count bigint(20) NOT NULL default 0, + PRIMARY KEY (term_taxonomy_id), + UNIQUE KEY term_id_taxonomy (term_id,taxonomy), + KEY taxonomy (taxonomy) +) $charset_collate; +CREATE TABLE $wpdb->term_relationships ( + object_id bigint(20) unsigned NOT NULL default 0, + term_taxonomy_id bigint(20) unsigned NOT NULL default 0, + term_order int(11) NOT NULL default 0, + PRIMARY KEY (object_id,term_taxonomy_id), + KEY term_taxonomy_id (term_taxonomy_id) +) $charset_collate; +CREATE TABLE $wpdb->commentmeta ( + meta_id bigint(20) unsigned NOT NULL auto_increment, + comment_id bigint(20) unsigned NOT NULL default '0', + meta_key varchar(255) default NULL, + meta_value longtext, + PRIMARY KEY (meta_id), + KEY comment_id (comment_id), + KEY meta_key (meta_key) +) $charset_collate; +CREATE TABLE $wpdb->comments ( + comment_ID bigint(20) unsigned NOT NULL auto_increment, + comment_post_ID bigint(20) unsigned NOT NULL default '0', + comment_author tinytext NOT NULL, + comment_author_email varchar(100) NOT NULL default '', + comment_author_url varchar(200) NOT NULL default '', + comment_author_IP varchar(100) NOT NULL default '', + comment_date datetime NOT NULL default '0000-00-00 00:00:00', + comment_date_gmt datetime NOT NULL default '0000-00-00 00:00:00', + comment_content text NOT NULL, + comment_karma int(11) NOT NULL default '0', + comment_approved varchar(20) NOT NULL default '1', + comment_agent varchar(255) NOT NULL default '', + comment_type varchar(20) NOT NULL default '', + comment_parent bigint(20) unsigned NOT NULL default '0', + user_id bigint(20) unsigned NOT NULL default '0', + PRIMARY KEY (comment_ID), + KEY comment_post_ID (comment_post_ID), + KEY comment_approved_date_gmt (comment_approved,comment_date_gmt), + KEY comment_date_gmt (comment_date_gmt), + KEY comment_parent (comment_parent) +) $charset_collate; +CREATE TABLE $wpdb->links ( + link_id bigint(20) unsigned NOT NULL auto_increment, + link_url varchar(255) NOT NULL default '', + link_name varchar(255) NOT NULL default '', + link_image varchar(255) NOT NULL default '', + link_target varchar(25) NOT NULL default '', + link_description varchar(255) NOT NULL default '', + link_visible varchar(20) NOT NULL default 'Y', + link_owner bigint(20) unsigned NOT NULL default '1', + link_rating int(11) NOT NULL default '0', + link_updated datetime NOT NULL default '0000-00-00 00:00:00', + link_rel varchar(255) NOT NULL default '', + link_notes mediumtext NOT NULL, + link_rss varchar(255) NOT NULL default '', + PRIMARY KEY (link_id), + KEY link_visible (link_visible) +) $charset_collate; +CREATE TABLE $wpdb->options ( + option_id bigint(20) unsigned NOT NULL auto_increment, + option_name varchar(64) NOT NULL default '', + option_value longtext NOT NULL, + autoload varchar(20) NOT NULL default 'yes', + PRIMARY KEY (option_id), + UNIQUE KEY option_name (option_name) +) $charset_collate; +CREATE TABLE $wpdb->postmeta ( + meta_id bigint(20) unsigned NOT NULL auto_increment, + post_id bigint(20) unsigned NOT NULL default '0', + meta_key varchar(255) default NULL, + meta_value longtext, + PRIMARY KEY (meta_id), + KEY post_id (post_id), + KEY meta_key (meta_key) +) $charset_collate; +CREATE TABLE $wpdb->posts ( + ID bigint(20) unsigned NOT NULL auto_increment, + post_author bigint(20) unsigned NOT NULL default '0', + post_date datetime NOT NULL default '0000-00-00 00:00:00', + post_date_gmt datetime NOT NULL default '0000-00-00 00:00:00', + post_content longtext NOT NULL, + post_title text NOT NULL, + post_excerpt text NOT NULL, + post_status varchar(20) NOT NULL default 'publish', + comment_status varchar(20) NOT NULL default 'open', + ping_status varchar(20) NOT NULL default 'open', + post_password varchar(20) NOT NULL default '', + post_name varchar(200) NOT NULL default '', + to_ping text NOT NULL, + pinged text NOT NULL, + post_modified datetime NOT NULL default '0000-00-00 00:00:00', + post_modified_gmt datetime NOT NULL default '0000-00-00 00:00:00', + post_content_filtered longtext NOT NULL, + post_parent bigint(20) unsigned NOT NULL default '0', + guid varchar(255) NOT NULL default '', + menu_order int(11) NOT NULL default '0', + post_type varchar(20) NOT NULL default 'post', + post_mime_type varchar(100) NOT NULL default '', + comment_count bigint(20) NOT NULL default '0', + PRIMARY KEY (ID), + KEY post_name (post_name), + KEY type_status_date (post_type,post_status,post_date,ID), + KEY post_parent (post_parent), + KEY post_author (post_author) +) $charset_collate;\n"; + + // Single site users table. The multisite flavor of the users table is handled below. + $users_single_table = "CREATE TABLE $wpdb->users ( + ID bigint(20) unsigned NOT NULL auto_increment, + user_login varchar(60) NOT NULL default '', + user_pass varchar(64) NOT NULL default '', + user_nicename varchar(50) NOT NULL default '', + user_email varchar(100) NOT NULL default '', + user_url varchar(100) NOT NULL default '', + user_registered datetime NOT NULL default '0000-00-00 00:00:00', + user_activation_key varchar(60) NOT NULL default '', + user_status int(11) NOT NULL default '0', + display_name varchar(250) NOT NULL default '', + PRIMARY KEY (ID), + KEY user_login_key (user_login), + KEY user_nicename (user_nicename) +) $charset_collate;\n"; + + // Multisite users table + $users_multi_table = "CREATE TABLE $wpdb->users ( + ID bigint(20) unsigned NOT NULL auto_increment, + user_login varchar(60) NOT NULL default '', + user_pass varchar(64) NOT NULL default '', + user_nicename varchar(50) NOT NULL default '', + user_email varchar(100) NOT NULL default '', + user_url varchar(100) NOT NULL default '', + user_registered datetime NOT NULL default '0000-00-00 00:00:00', + user_activation_key varchar(60) NOT NULL default '', + user_status int(11) NOT NULL default '0', + display_name varchar(250) NOT NULL default '', + spam tinyint(2) NOT NULL default '0', + deleted tinyint(2) NOT NULL default '0', + PRIMARY KEY (ID), + KEY user_login_key (user_login), + KEY user_nicename (user_nicename) +) $charset_collate;\n"; + + // usermeta + $usermeta_table = "CREATE TABLE $wpdb->usermeta ( + umeta_id bigint(20) unsigned NOT NULL auto_increment, + user_id bigint(20) unsigned NOT NULL default '0', + meta_key varchar(255) default NULL, + meta_value longtext, + PRIMARY KEY (umeta_id), + KEY user_id (user_id), + KEY meta_key (meta_key) +) $charset_collate;\n"; + + // Global tables + if ( $is_multisite ) + $global_tables = $users_multi_table . $usermeta_table; + else + $global_tables = $users_single_table . $usermeta_table; + + // Multisite global tables. + $ms_global_tables = "CREATE TABLE $wpdb->blogs ( + blog_id bigint(20) NOT NULL auto_increment, + site_id bigint(20) NOT NULL default '0', + domain varchar(200) NOT NULL default '', + path varchar(100) NOT NULL default '', + registered datetime NOT NULL default '0000-00-00 00:00:00', + last_updated datetime NOT NULL default '0000-00-00 00:00:00', + public tinyint(2) NOT NULL default '1', + archived tinyint(2) NOT NULL default '0', + mature tinyint(2) NOT NULL default '0', + spam tinyint(2) NOT NULL default '0', + deleted tinyint(2) NOT NULL default '0', + lang_id int(11) NOT NULL default '0', + PRIMARY KEY (blog_id), + KEY domain (domain(50),path(5)), + KEY lang_id (lang_id) +) $charset_collate; +CREATE TABLE $wpdb->blog_versions ( + blog_id bigint(20) NOT NULL default '0', + db_version varchar(20) NOT NULL default '', + last_updated datetime NOT NULL default '0000-00-00 00:00:00', + PRIMARY KEY (blog_id), + KEY db_version (db_version) +) $charset_collate; +CREATE TABLE $wpdb->registration_log ( + ID bigint(20) NOT NULL auto_increment, + email varchar(255) NOT NULL default '', + IP varchar(30) NOT NULL default '', + blog_id bigint(20) NOT NULL default '0', + date_registered datetime NOT NULL default '0000-00-00 00:00:00', + PRIMARY KEY (ID), + KEY IP (IP) +) $charset_collate; +CREATE TABLE $wpdb->site ( + id bigint(20) NOT NULL auto_increment, + domain varchar(200) NOT NULL default '', + path varchar(100) NOT NULL default '', + PRIMARY KEY (id), + KEY domain (domain,path) +) $charset_collate; +CREATE TABLE $wpdb->sitemeta ( + meta_id bigint(20) NOT NULL auto_increment, + site_id bigint(20) NOT NULL default '0', + meta_key varchar(255) default NULL, + meta_value longtext, + PRIMARY KEY (meta_id), + KEY meta_key (meta_key), + KEY site_id (site_id) +) $charset_collate; +CREATE TABLE $wpdb->signups ( + signup_id bigint(20) NOT NULL auto_increment, + domain varchar(200) NOT NULL default '', + path varchar(100) NOT NULL default '', + title longtext NOT NULL, + user_login varchar(60) NOT NULL default '', + user_email varchar(100) NOT NULL default '', + registered datetime NOT NULL default '0000-00-00 00:00:00', + activated datetime NOT NULL default '0000-00-00 00:00:00', + active tinyint(1) NOT NULL default '0', + activation_key varchar(50) NOT NULL default '', + meta longtext, + PRIMARY KEY (signup_id), + KEY activation_key (activation_key), + KEY user_email (user_email), + KEY user_login_email (user_login,user_email), + KEY domain_path (domain,path) +) $charset_collate;"; + + switch ( $scope ) { + case 'blog' : + $queries = $blog_tables; + break; + case 'global' : + $queries = $global_tables; + if ( $is_multisite ) + $queries .= $ms_global_tables; + break; + case 'ms_global' : + $queries = $ms_global_tables; + break; + default: + case 'all' : + $queries = $global_tables . $blog_tables; + if ( $is_multisite ) + $queries .= $ms_global_tables; + break; + } + + if ( isset( $old_blog_id ) ) + $wpdb->set_blog_id( $old_blog_id ); + + return $queries; +} + +// Populate for back compat. +$wp_queries = wp_get_db_schema( 'all' ); + +/** + * Create WordPress options and set the default values. + * + * @since 1.5.0 + * @uses $wpdb + * @uses $wp_db_version + */ +function populate_options() { + global $wpdb, $wp_db_version, $wp_current_db_version; + + $guessurl = wp_guess_url(); + /** + * Fires before creating WordPress options and populating their default values. + * + * @since 2.6.0 + */ + do_action( 'populate_options' ); + + if ( ini_get('safe_mode') ) { + // Safe mode can break mkdir() so use a flat structure by default. + $uploads_use_yearmonth_folders = 0; + } else { + $uploads_use_yearmonth_folders = 1; + } + + $template = WP_DEFAULT_THEME; + // If default theme is a child theme, we need to get its template + $theme = wp_get_theme( $template ); + if ( ! $theme->errors() ) + $template = $theme->get_template(); + + $timezone_string = ''; + $gmt_offset = 0; + /* translators: default GMT offset or timezone string. Must be either a valid offset (-12 to 14) + or a valid timezone string (America/New_York). See http://us3.php.net/manual/en/timezones.php + for all timezone strings supported by PHP. + */ + $offset_or_tz = _x( '0', 'default GMT offset or timezone string' ); + if ( is_numeric( $offset_or_tz ) ) + $gmt_offset = $offset_or_tz; + elseif ( $offset_or_tz && in_array( $offset_or_tz, timezone_identifiers_list() ) ) + $timezone_string = $offset_or_tz; + + $options = array( + 'siteurl' => $guessurl, + 'blogname' => __('My Site'), + /* translators: blog tagline */ + 'blogdescription' => __('Just another WordPress site'), + 'users_can_register' => 0, + 'admin_email' => 'you@example.com', + /* translators: default start of the week. 0 = Sunday, 1 = Monday */ + 'start_of_week' => _x( '1', 'start of week' ), + 'use_balanceTags' => 0, + 'use_smilies' => 1, + 'require_name_email' => 1, + 'comments_notify' => 1, + 'posts_per_rss' => 10, + 'rss_use_excerpt' => 0, + 'mailserver_url' => 'mail.example.com', + 'mailserver_login' => 'login@example.com', + 'mailserver_pass' => 'password', + 'mailserver_port' => 110, + 'default_category' => 1, + 'default_comment_status' => 'open', + 'default_ping_status' => 'open', + 'default_pingback_flag' => 1, + 'posts_per_page' => 10, + /* translators: default date format, see http://php.net/date */ + 'date_format' => __('F j, Y'), + /* translators: default time format, see http://php.net/date */ + 'time_format' => __('g:i a'), + /* translators: links last updated date format, see http://php.net/date */ + 'links_updated_date_format' => __('F j, Y g:i a'), + 'comment_moderation' => 0, + 'moderation_notify' => 1, + 'permalink_structure' => '', + 'gzipcompression' => 0, + 'hack_file' => 0, + 'blog_charset' => 'UTF-8', + 'moderation_keys' => '', + 'active_plugins' => array(), + 'home' => $guessurl, + 'category_base' => '', + 'ping_sites' => 'http://rpc.pingomatic.com/', + 'advanced_edit' => 0, + 'comment_max_links' => 2, + 'gmt_offset' => $gmt_offset, + + // 1.5 + 'default_email_category' => 1, + 'recently_edited' => '', + 'template' => $template, + 'stylesheet' => WP_DEFAULT_THEME, + 'comment_whitelist' => 1, + 'blacklist_keys' => '', + 'comment_registration' => 0, + 'html_type' => 'text/html', + + // 1.5.1 + 'use_trackback' => 0, + + // 2.0 + 'default_role' => 'subscriber', + 'db_version' => $wp_db_version, + + // 2.0.1 + 'uploads_use_yearmonth_folders' => $uploads_use_yearmonth_folders, + 'upload_path' => '', + + // 2.1 + 'blog_public' => '1', + 'default_link_category' => 2, + 'show_on_front' => 'posts', + + // 2.2 + 'tag_base' => '', + + // 2.5 + 'show_avatars' => '1', + 'avatar_rating' => 'G', + 'upload_url_path' => '', + 'thumbnail_size_w' => 150, + 'thumbnail_size_h' => 150, + 'thumbnail_crop' => 1, + 'medium_size_w' => 300, + 'medium_size_h' => 300, + + // 2.6 + 'avatar_default' => 'mystery', + + // 2.7 + 'large_size_w' => 1024, + 'large_size_h' => 1024, + 'image_default_link_type' => 'file', + 'image_default_size' => '', + 'image_default_align' => '', + 'close_comments_for_old_posts' => 0, + 'close_comments_days_old' => 14, + 'thread_comments' => 1, + 'thread_comments_depth' => 5, + 'page_comments' => 0, + 'comments_per_page' => 50, + 'default_comments_page' => 'newest', + 'comment_order' => 'asc', + 'sticky_posts' => array(), + 'widget_categories' => array(), + 'widget_text' => array(), + 'widget_rss' => array(), + 'uninstall_plugins' => array(), + + // 2.8 + 'timezone_string' => $timezone_string, + + // 3.0 + 'page_for_posts' => 0, + 'page_on_front' => 0, + + // 3.1 + 'default_post_format' => 0, + + // 3.5 + 'link_manager_enabled' => 0, + ); + + // 3.3 + if ( ! is_multisite() ) { + $options['initial_db_version'] = ! empty( $wp_current_db_version ) && $wp_current_db_version < $wp_db_version + ? $wp_current_db_version : $wp_db_version; + } + + // 3.0 multisite + if ( is_multisite() ) { + /* translators: blog tagline */ + $options[ 'blogdescription' ] = sprintf(__('Just another %s site'), get_current_site()->site_name ); + $options[ 'permalink_structure' ] = '/%year%/%monthnum%/%day%/%postname%/'; + } + + // Set autoload to no for these options + $fat_options = array( 'moderation_keys', 'recently_edited', 'blacklist_keys', 'uninstall_plugins' ); + + $keys = "'" . implode( "', '", array_keys( $options ) ) . "'"; + $existing_options = $wpdb->get_col( "SELECT option_name FROM $wpdb->options WHERE option_name in ( $keys )" ); + + $insert = ''; + foreach ( $options as $option => $value ) { + if ( in_array($option, $existing_options) ) + continue; + if ( in_array($option, $fat_options) ) + $autoload = 'no'; + else + $autoload = 'yes'; + + if ( is_array($value) ) + $value = serialize($value); + if ( !empty($insert) ) + $insert .= ', '; + $insert .= $wpdb->prepare( "(%s, %s, %s)", $option, $value, $autoload ); + } + + if ( !empty($insert) ) + $wpdb->query("INSERT INTO $wpdb->options (option_name, option_value, autoload) VALUES " . $insert); + + // in case it is set, but blank, update "home" + if ( !__get_option('home') ) update_option('home', $guessurl); + + // Delete unused options + $unusedoptions = array( + 'blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory', + 'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping', + 'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'fileupload_allowedusers', + 'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference', + 'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char', + 'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1', + 'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5', + 'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9', + 'links_recently_updated_time', 'links_recently_updated_prepend', 'links_recently_updated_append', + 'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls', 'default_geourl_lat', + 'default_geourl_lon', 'use_default_geourl', 'weblogs_xml_url', 'new_users_can_blog', '_wpnonce', + '_wp_http_referer', 'Update', 'action', 'rich_editing', 'autosave_interval', 'deactivated_plugins', + 'can_compress_scripts', 'page_uris', 'update_core', 'update_plugins', 'update_themes', 'doing_cron', + 'random_seed', 'rss_excerpt_length', 'secret', 'use_linksupdate', 'default_comment_status_page', + 'wporg_popular_tags', 'what_to_show', 'rss_language', 'language', 'enable_xmlrpc', 'enable_app', + 'embed_autourls', 'default_post_edit_rows', + ); + foreach ( $unusedoptions as $option ) + delete_option($option); + + // delete obsolete magpie stuff + $wpdb->query("DELETE FROM $wpdb->options WHERE option_name REGEXP '^rss_[0-9a-f]{32}(_ts)?$'"); + + // Deletes all expired transients. + // The multi-table delete syntax is used to delete the transient record from table a, + // and the corresponding transient_timeout record from table b. + $time = time(); + $wpdb->query("DELETE a, b FROM $wpdb->options a, $wpdb->options b WHERE + a.option_name LIKE '\_transient\_%' AND + a.option_name NOT LIKE '\_transient\_timeout\_%' AND + b.option_name = CONCAT( '_transient_timeout_', SUBSTRING( a.option_name, 12 ) ) + AND b.option_value < $time"); + + if ( is_main_site() && is_main_network() ) { + $wpdb->query("DELETE a, b FROM $wpdb->options a, $wpdb->options b WHERE + a.option_name LIKE '\_site\_transient\_%' AND + a.option_name NOT LIKE '\_site\_transient\_timeout\_%' AND + b.option_name = CONCAT( '_site_transient_timeout_', SUBSTRING( a.option_name, 17 ) ) + AND b.option_value < $time"); + } +} + +/** + * Execute WordPress role creation for the various WordPress versions. + * + * @since 2.0.0 + */ +function populate_roles() { + populate_roles_160(); + populate_roles_210(); + populate_roles_230(); + populate_roles_250(); + populate_roles_260(); + populate_roles_270(); + populate_roles_280(); + populate_roles_300(); +} + +/** + * Create the roles for WordPress 2.0 + * + * @since 2.0.0 + */ +function populate_roles_160() { + // Add roles + + // Dummy gettext calls to get strings in the catalog. + /* translators: user role */ + _x('Administrator', 'User role'); + /* translators: user role */ + _x('Editor', 'User role'); + /* translators: user role */ + _x('Author', 'User role'); + /* translators: user role */ + _x('Contributor', 'User role'); + /* translators: user role */ + _x('Subscriber', 'User role'); + + add_role('administrator', 'Administrator'); + add_role('editor', 'Editor'); + add_role('author', 'Author'); + add_role('contributor', 'Contributor'); + add_role('subscriber', 'Subscriber'); + + // Add caps for Administrator role + $role = get_role('administrator'); + $role->add_cap('switch_themes'); + $role->add_cap('edit_themes'); + $role->add_cap('activate_plugins'); + $role->add_cap('edit_plugins'); + $role->add_cap('edit_users'); + $role->add_cap('edit_files'); + $role->add_cap('manage_options'); + $role->add_cap('moderate_comments'); + $role->add_cap('manage_categories'); + $role->add_cap('manage_links'); + $role->add_cap('upload_files'); + $role->add_cap('import'); + $role->add_cap('unfiltered_html'); + $role->add_cap('edit_posts'); + $role->add_cap('edit_others_posts'); + $role->add_cap('edit_published_posts'); + $role->add_cap('publish_posts'); + $role->add_cap('edit_pages'); + $role->add_cap('read'); + $role->add_cap('level_10'); + $role->add_cap('level_9'); + $role->add_cap('level_8'); + $role->add_cap('level_7'); + $role->add_cap('level_6'); + $role->add_cap('level_5'); + $role->add_cap('level_4'); + $role->add_cap('level_3'); + $role->add_cap('level_2'); + $role->add_cap('level_1'); + $role->add_cap('level_0'); + + // Add caps for Editor role + $role = get_role('editor'); + $role->add_cap('moderate_comments'); + $role->add_cap('manage_categories'); + $role->add_cap('manage_links'); + $role->add_cap('upload_files'); + $role->add_cap('unfiltered_html'); + $role->add_cap('edit_posts'); + $role->add_cap('edit_others_posts'); + $role->add_cap('edit_published_posts'); + $role->add_cap('publish_posts'); + $role->add_cap('edit_pages'); + $role->add_cap('read'); + $role->add_cap('level_7'); + $role->add_cap('level_6'); + $role->add_cap('level_5'); + $role->add_cap('level_4'); + $role->add_cap('level_3'); + $role->add_cap('level_2'); + $role->add_cap('level_1'); + $role->add_cap('level_0'); + + // Add caps for Author role + $role = get_role('author'); + $role->add_cap('upload_files'); + $role->add_cap('edit_posts'); + $role->add_cap('edit_published_posts'); + $role->add_cap('publish_posts'); + $role->add_cap('read'); + $role->add_cap('level_2'); + $role->add_cap('level_1'); + $role->add_cap('level_0'); + + // Add caps for Contributor role + $role = get_role('contributor'); + $role->add_cap('edit_posts'); + $role->add_cap('read'); + $role->add_cap('level_1'); + $role->add_cap('level_0'); + + // Add caps for Subscriber role + $role = get_role('subscriber'); + $role->add_cap('read'); + $role->add_cap('level_0'); +} + +/** + * Create and modify WordPress roles for WordPress 2.1. + * + * @since 2.1.0 + */ +function populate_roles_210() { + $roles = array('administrator', 'editor'); + foreach ($roles as $role) { + $role = get_role($role); + if ( empty($role) ) + continue; + + $role->add_cap('edit_others_pages'); + $role->add_cap('edit_published_pages'); + $role->add_cap('publish_pages'); + $role->add_cap('delete_pages'); + $role->add_cap('delete_others_pages'); + $role->add_cap('delete_published_pages'); + $role->add_cap('delete_posts'); + $role->add_cap('delete_others_posts'); + $role->add_cap('delete_published_posts'); + $role->add_cap('delete_private_posts'); + $role->add_cap('edit_private_posts'); + $role->add_cap('read_private_posts'); + $role->add_cap('delete_private_pages'); + $role->add_cap('edit_private_pages'); + $role->add_cap('read_private_pages'); + } + + $role = get_role('administrator'); + if ( ! empty($role) ) { + $role->add_cap('delete_users'); + $role->add_cap('create_users'); + } + + $role = get_role('author'); + if ( ! empty($role) ) { + $role->add_cap('delete_posts'); + $role->add_cap('delete_published_posts'); + } + + $role = get_role('contributor'); + if ( ! empty($role) ) { + $role->add_cap('delete_posts'); + } +} + +/** + * Create and modify WordPress roles for WordPress 2.3. + * + * @since 2.3.0 + */ +function populate_roles_230() { + $role = get_role( 'administrator' ); + + if ( !empty( $role ) ) { + $role->add_cap( 'unfiltered_upload' ); + } +} + +/** + * Create and modify WordPress roles for WordPress 2.5. + * + * @since 2.5.0 + */ +function populate_roles_250() { + $role = get_role( 'administrator' ); + + if ( !empty( $role ) ) { + $role->add_cap( 'edit_dashboard' ); + } +} + +/** + * Create and modify WordPress roles for WordPress 2.6. + * + * @since 2.6.0 + */ +function populate_roles_260() { + $role = get_role( 'administrator' ); + + if ( !empty( $role ) ) { + $role->add_cap( 'update_plugins' ); + $role->add_cap( 'delete_plugins' ); + } +} + +/** + * Create and modify WordPress roles for WordPress 2.7. + * + * @since 2.7.0 + */ +function populate_roles_270() { + $role = get_role( 'administrator' ); + + if ( !empty( $role ) ) { + $role->add_cap( 'install_plugins' ); + $role->add_cap( 'update_themes' ); + } +} + +/** + * Create and modify WordPress roles for WordPress 2.8. + * + * @since 2.8.0 + */ +function populate_roles_280() { + $role = get_role( 'administrator' ); + + if ( !empty( $role ) ) { + $role->add_cap( 'install_themes' ); + } +} + +/** + * Create and modify WordPress roles for WordPress 3.0. + * + * @since 3.0.0 + */ +function populate_roles_300() { + $role = get_role( 'administrator' ); + + if ( !empty( $role ) ) { + $role->add_cap( 'update_core' ); + $role->add_cap( 'list_users' ); + $role->add_cap( 'remove_users' ); + + // Never used, will be removed. create_users or + // promote_users is the capability you're looking for. + $role->add_cap( 'add_users' ); + + $role->add_cap( 'promote_users' ); + $role->add_cap( 'edit_theme_options' ); + $role->add_cap( 'delete_themes' ); + $role->add_cap( 'export' ); + } +} + +/** + * Install Network. + * + * @since 3.0.0 + * + */ +if ( !function_exists( 'install_network' ) ) : +function install_network() { + if ( ! defined( 'WP_INSTALLING_NETWORK' ) ) + define( 'WP_INSTALLING_NETWORK', true ); + + dbDelta( wp_get_db_schema( 'global' ) ); +} +endif; + +/** + * Populate network settings. + * + * @since 3.0.0 + * + * @param int $network_id ID of network to populate. + * @return bool|WP_Error True on success, or WP_Error on warning (with the install otherwise successful, + * so the error code must be checked) or failure. + */ +function populate_network( $network_id = 1, $domain = '', $email = '', $site_name = '', $path = '/', $subdomain_install = false ) { + global $wpdb, $current_site, $wp_db_version, $wp_rewrite; + + $errors = new WP_Error(); + if ( '' == $domain ) + $errors->add( 'empty_domain', __( 'You must provide a domain name.' ) ); + if ( '' == $site_name ) + $errors->add( 'empty_sitename', __( 'You must provide a name for your network of sites.' ) ); + + // check for network collision + if ( $network_id == $wpdb->get_var( $wpdb->prepare( "SELECT id FROM $wpdb->site WHERE id = %d", $network_id ) ) ) + $errors->add( 'siteid_exists', __( 'The network already exists.' ) ); + + $site_user = get_user_by( 'email', $email ); + if ( ! is_email( $email ) ) + $errors->add( 'invalid_email', __( 'You must provide a valid e-mail address.' ) ); + + if ( $errors->get_error_code() ) + return $errors; + + // set up site tables + $template = get_option( 'template' ); + $stylesheet = get_option( 'stylesheet' ); + $allowed_themes = array( $stylesheet => true ); + if ( $template != $stylesheet ) + $allowed_themes[ $template ] = true; + if ( WP_DEFAULT_THEME != $stylesheet && WP_DEFAULT_THEME != $template ) + $allowed_themes[ WP_DEFAULT_THEME ] = true; + + if ( 1 == $network_id ) { + $wpdb->insert( $wpdb->site, array( 'domain' => $domain, 'path' => $path ) ); + $network_id = $wpdb->insert_id; + } else { + $wpdb->insert( $wpdb->site, array( 'domain' => $domain, 'path' => $path, 'id' => $network_id ) ); + } + + wp_cache_delete( 'networks_have_paths', 'site-options' ); + + if ( !is_multisite() ) { + $site_admins = array( $site_user->user_login ); + $users = get_users( array( 'fields' => array( 'ID', 'user_login' ) ) ); + if ( $users ) { + foreach ( $users as $user ) { + if ( is_super_admin( $user->ID ) && !in_array( $user->user_login, $site_admins ) ) + $site_admins[] = $user->user_login; + } + } + } else { + $site_admins = get_site_option( 'site_admins' ); + } + + $welcome_email = __( 'Dear User, + +Your new SITE_NAME site has been successfully set up at: +BLOG_URL + +You can log in to the administrator account with the following information: +Username: USERNAME +Password: PASSWORD +Log in here: BLOG_URLwp-login.php + +We hope you enjoy your new site. Thanks! + +--The Team @ SITE_NAME' ); + + $sitemeta = array( + 'site_name' => $site_name, + 'admin_email' => $site_user->user_email, + 'admin_user_id' => $site_user->ID, + 'registration' => 'none', + 'upload_filetypes' => 'jpg jpeg png gif mp3 mov avi wmv midi mid pdf', + 'blog_upload_space' => 100, + 'fileupload_maxk' => 1500, + 'site_admins' => $site_admins, + 'allowedthemes' => $allowed_themes, + 'illegal_names' => array( 'www', 'web', 'root', 'admin', 'main', 'invite', 'administrator', 'files' ), + 'wpmu_upgrade_site' => $wp_db_version, + 'welcome_email' => $welcome_email, + 'first_post' => __( 'Welcome to SITE_NAME. This is your first post. Edit or delete it, then start blogging!' ), + // @todo - network admins should have a method of editing the network siteurl (used for cookie hash) + 'siteurl' => get_option( 'siteurl' ) . '/', + 'add_new_users' => '0', + 'upload_space_check_disabled' => is_multisite() ? get_site_option( 'upload_space_check_disabled' ) : '1', + 'subdomain_install' => intval( $subdomain_install ), + 'global_terms_enabled' => global_terms_enabled() ? '1' : '0', + 'ms_files_rewriting' => is_multisite() ? get_site_option( 'ms_files_rewriting' ) : '0', + 'initial_db_version' => get_option( 'initial_db_version' ), + 'active_sitewide_plugins' => array(), + 'WPLANG' => get_locale(), + ); + if ( ! $subdomain_install ) + $sitemeta['illegal_names'][] = 'blog'; + + /** + * Filter meta for a network on creation. + * + * @since 3.7.0 + * + * @param array $sitemeta Associative array of network meta keys and values to be inserted. + * @param int $network_id ID of network to populate. + */ + $sitemeta = apply_filters( 'populate_network_meta', $sitemeta, $network_id ); + + $insert = ''; + foreach ( $sitemeta as $meta_key => $meta_value ) { + if ( is_array( $meta_value ) ) + $meta_value = serialize( $meta_value ); + if ( !empty( $insert ) ) + $insert .= ', '; + $insert .= $wpdb->prepare( "( %d, %s, %s)", $network_id, $meta_key, $meta_value ); + } + $wpdb->query( "INSERT INTO $wpdb->sitemeta ( site_id, meta_key, meta_value ) VALUES " . $insert ); + + // When upgrading from single to multisite, assume the current site will become the main site of the network. + // When using populate_network() to create another network in an existing multisite environment, + // skip these steps since the main site of the new network has not yet been created. + if ( ! is_multisite() ) { + $current_site = new stdClass; + $current_site->domain = $domain; + $current_site->path = $path; + $current_site->site_name = ucfirst( $domain ); + $wpdb->insert( $wpdb->blogs, array( 'site_id' => $network_id, 'blog_id' => 1, 'domain' => $domain, 'path' => $path, 'registered' => current_time( 'mysql' ) ) ); + $current_site->blog_id = $blog_id = $wpdb->insert_id; + update_user_meta( $site_user->ID, 'source_domain', $domain ); + update_user_meta( $site_user->ID, 'primary_blog', $blog_id ); + + if ( $subdomain_install ) + $wp_rewrite->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' ); + else + $wp_rewrite->set_permalink_structure( '/blog/%year%/%monthnum%/%day%/%postname%/' ); + + flush_rewrite_rules(); + + if ( ! $subdomain_install ) + return true; + + $vhost_ok = false; + $errstr = ''; + $hostname = substr( md5( time() ), 0, 6 ) . '.' . $domain; // Very random hostname! + $page = wp_remote_get( 'http://' . $hostname, array( 'timeout' => 5, 'httpversion' => '1.1' ) ); + if ( is_wp_error( $page ) ) + $errstr = $page->get_error_message(); + elseif ( 200 == wp_remote_retrieve_response_code( $page ) ) + $vhost_ok = true; + + if ( ! $vhost_ok ) { + $msg = '

    ' . __( 'Warning! Wildcard DNS may not be configured correctly!' ) . '

    '; + $msg .= '

    ' . sprintf( __( 'The installer attempted to contact a random hostname (%1$s) on your domain.' ), $hostname ); + if ( ! empty ( $errstr ) ) + $msg .= ' ' . sprintf( __( 'This resulted in an error message: %s' ), '' . $errstr . '' ); + $msg .= '

    '; + $msg .= '

    ' . __( 'To use a subdomain configuration, you must have a wildcard entry in your DNS. This usually means adding a * hostname record pointing at your web server in your DNS configuration tool.' ) . '

    '; + $msg .= '

    ' . __( 'You can still use your site but any subdomain you create may not be accessible. If you know your DNS is correct, ignore this message.' ) . '

    '; + return new WP_Error( 'no_wildcard_dns', $msg ); + } + } + + return true; +} diff --git a/wp-admin/includes/screen.php b/wp-admin/includes/screen.php new file mode 100644 index 0000000..7d4ec88 --- /dev/null +++ b/wp-admin/includes/screen.php @@ -0,0 +1,1174 @@ + UI String + */ +function get_column_headers( $screen ) { + if ( is_string( $screen ) ) + $screen = convert_to_screen( $screen ); + + static $column_headers = array(); + + if ( ! isset( $column_headers[ $screen->id ] ) ) { + + /** + * Filter the column headers for a list table on a specific screen. + * + * The dynamic portion of the hook name, $screen->id, refers to the + * ID of a specific screen. For example, the screen ID for the Posts + * list table is edit-post, so the filter for that screen would be + * manage_edit-post_columns. + * + * @since 3.0.0 + * + * @param array $columns An array of column headers. Default empty. + */ + $column_headers[ $screen->id ] = apply_filters( 'manage_' . $screen->id . '_columns', array() ); + } + + return $column_headers[ $screen->id ]; +} + +/** + * Get a list of hidden columns. + * + * @since 2.7.0 + * + * @param string|WP_Screen $screen The screen you want the hidden columns for + * @return array + */ +function get_hidden_columns( $screen ) { + if ( is_string( $screen ) ) + $screen = convert_to_screen( $screen ); + + return (array) get_user_option( 'manage' . $screen->id . 'columnshidden' ); +} + +/** + * Prints the meta box preferences for screen meta. + * + * @since 2.7.0 + * + * @param string|WP_Screen $screen + */ +function meta_box_prefs( $screen ) { + global $wp_meta_boxes; + + if ( is_string( $screen ) ) + $screen = convert_to_screen( $screen ); + + if ( empty($wp_meta_boxes[$screen->id]) ) + return; + + $hidden = get_hidden_meta_boxes($screen); + + foreach ( array_keys($wp_meta_boxes[$screen->id]) as $context ) { + foreach ( array_keys($wp_meta_boxes[$screen->id][$context]) as $priority ) { + foreach ( $wp_meta_boxes[$screen->id][$context][$priority] as $box ) { + if ( false == $box || ! $box['title'] ) + continue; + // Submit box cannot be hidden + if ( 'submitdiv' == $box['id'] || 'linksubmitdiv' == $box['id'] ) + continue; + $box_id = $box['id']; + echo '\n"; + } + } + } +} + +/** + * Get Hidden Meta Boxes + * + * @since 2.7.0 + * + * @param string|WP_Screen $screen Screen identifier + * @return array Hidden Meta Boxes + */ +function get_hidden_meta_boxes( $screen ) { + if ( is_string( $screen ) ) + $screen = convert_to_screen( $screen ); + + $hidden = get_user_option( "metaboxhidden_{$screen->id}" ); + + $use_defaults = ! is_array( $hidden ); + + // Hide slug boxes by default + if ( $use_defaults ) { + $hidden = array(); + if ( 'post' == $screen->base ) { + if ( 'post' == $screen->post_type || 'page' == $screen->post_type || 'attachment' == $screen->post_type ) + $hidden = array('slugdiv', 'trackbacksdiv', 'postcustom', 'postexcerpt', 'commentstatusdiv', 'commentsdiv', 'authordiv', 'revisionsdiv'); + else + $hidden = array( 'slugdiv' ); + } + + /** + * Filter the default list of hidden meta boxes. + * + * @since 3.1.0 + * + * @param array $hidden An array of meta boxes hidden by default. + * @param WP_Screen $screen WP_Screen object of the current screen. + */ + $hidden = apply_filters( 'default_hidden_meta_boxes', $hidden, $screen ); + } + + /** + * Filter the list of hidden meta boxes. + * + * @since 3.3.0 + * + * @param array $hidden An array of hidden meta boxes. + * @param WP_Screen $screen WP_Screen object of the current screen. + * @param bool $use_defaults Whether to show the default meta boxes. + * Default true. + */ + return apply_filters( 'hidden_meta_boxes', $hidden, $screen, $use_defaults ); +} + +/** + * Register and configure an admin screen option + * + * @since 3.1.0 + * + * @param string $option An option name. + * @param mixed $args Option-dependent arguments. + */ +function add_screen_option( $option, $args = array() ) { + $current_screen = get_current_screen(); + + if ( ! $current_screen ) + return; + + $current_screen->add_option( $option, $args ); +} + +/** + * Get the current screen object + * + * @since 3.1.0 + * + * @return WP_Screen Current screen object + */ +function get_current_screen() { + global $current_screen; + + if ( ! isset( $current_screen ) ) + return null; + + return $current_screen; +} + +/** + * Set the current screen object + * + * @since 3.0.0 + * @uses $current_screen + * + * @param mixed $hook_name Optional. The hook name (also known as the hook suffix) used to determine the screen, + * or an existing screen object. + */ +function set_current_screen( $hook_name = '' ) { + WP_Screen::get( $hook_name )->set_current_screen(); +} + +/** + * A class representing the admin screen. + * + * @since 3.3.0 + * @access public + */ +final class WP_Screen { + /** + * Any action associated with the screen. 'add' for *-add.php and *-new.php screens. Empty otherwise. + * + * @since 3.3.0 + * @var string + * @access public + */ + public $action; + + /** + * The base type of the screen. This is typically the same as $id but with any post types and taxonomies stripped. + * For example, for an $id of 'edit-post' the base is 'edit'. + * + * @since 3.3.0 + * @var string + * @access public + */ + public $base; + + /** + * The number of columns to display. Access with get_columns(). + * + * @since 3.4.0 + * @var int + * @access private + */ + private $columns = 0; + + /** + * The unique ID of the screen. + * + * @since 3.3.0 + * @var string + * @access public + */ + public $id; + + /** + * Which admin the screen is in. network | user | site | false + * + * @since 3.5.0 + * @var string + * @access protected + */ + protected $in_admin; + + /** + * Whether the screen is in the network admin. + * + * Deprecated. Use in_admin() instead. + * + * @since 3.3.0 + * @deprecated 3.5.0 + * @var bool + * @access public + */ + public $is_network; + + /** + * Whether the screen is in the user admin. + * + * Deprecated. Use in_admin() instead. + * + * @since 3.3.0 + * @deprecated 3.5.0 + * @var bool + * @access public + */ + public $is_user; + + /** + * The base menu parent. + * This is derived from $parent_file by removing the query string and any .php extension. + * $parent_file values of 'edit.php?post_type=page' and 'edit.php?post_type=post' have a $parent_base of 'edit'. + * + * @since 3.3.0 + * @var string + * @access public + */ + public $parent_base; + + /** + * The parent_file for the screen per the admin menu system. + * Some $parent_file values are 'edit.php?post_type=page', 'edit.php', and 'options-general.php'. + * + * @since 3.3.0 + * @var string + * @access public + */ + public $parent_file; + + /** + * The post type associated with the screen, if any. + * The 'edit.php?post_type=page' screen has a post type of 'page'. + * The 'edit-tags.php?taxonomy=$taxonomy&post_type=page' screen has a post type of 'page'. + * + * @since 3.3.0 + * @var string + * @access public + */ + public $post_type; + + /** + * The taxonomy associated with the screen, if any. + * The 'edit-tags.php?taxonomy=category' screen has a taxonomy of 'category'. + * @since 3.3.0 + * @var string + * @access public + */ + public $taxonomy; + + /** + * The help tab data associated with the screen, if any. + * + * @since 3.3.0 + * @var array + * @access private + */ + private $_help_tabs = array(); + + /** + * The help sidebar data associated with screen, if any. + * + * @since 3.3.0 + * @var string + * @access private + */ + private $_help_sidebar = ''; + + /** + * Stores old string-based help. + */ + private static $_old_compat_help = array(); + + /** + * The screen options associated with screen, if any. + * + * @since 3.3.0 + * @var array + * @access private + */ + private $_options = array(); + + /** + * The screen object registry. + * + * @since 3.3.0 + * @var array + * @access private + */ + private static $_registry = array(); + + /** + * Stores the result of the public show_screen_options function. + * + * @since 3.3.0 + * @var bool + * @access private + */ + private $_show_screen_options; + + /** + * Stores the 'screen_settings' section of screen options. + * + * @since 3.3.0 + * @var string + * @access private + */ + private $_screen_settings; + + /** + * Fetches a screen object. + * + * @since 3.3.0 + * @access public + * + * @param string $hook_name Optional. The hook name (also known as the hook suffix) used to determine the screen. + * Defaults to the current $hook_suffix global. + * @return WP_Screen Screen object. + */ + public static function get( $hook_name = '' ) { + + if ( is_a( $hook_name, 'WP_Screen' ) ) + return $hook_name; + + $post_type = $taxonomy = null; + $in_admin = false; + $action = ''; + + if ( $hook_name ) + $id = $hook_name; + else + $id = $GLOBALS['hook_suffix']; + + // For those pesky meta boxes. + if ( $hook_name && post_type_exists( $hook_name ) ) { + $post_type = $id; + $id = 'post'; // changes later. ends up being $base. + } else { + if ( '.php' == substr( $id, -4 ) ) + $id = substr( $id, 0, -4 ); + + if ( 'post-new' == $id || 'link-add' == $id || 'media-new' == $id || 'user-new' == $id ) { + $id = substr( $id, 0, -4 ); + $action = 'add'; + } + } + + if ( ! $post_type && $hook_name ) { + if ( '-network' == substr( $id, -8 ) ) { + $id = substr( $id, 0, -8 ); + $in_admin = 'network'; + } elseif ( '-user' == substr( $id, -5 ) ) { + $id = substr( $id, 0, -5 ); + $in_admin = 'user'; + } + + $id = sanitize_key( $id ); + if ( 'edit-comments' != $id && 'edit-tags' != $id && 'edit-' == substr( $id, 0, 5 ) ) { + $maybe = substr( $id, 5 ); + if ( taxonomy_exists( $maybe ) ) { + $id = 'edit-tags'; + $taxonomy = $maybe; + } elseif ( post_type_exists( $maybe ) ) { + $id = 'edit'; + $post_type = $maybe; + } + } + + if ( ! $in_admin ) + $in_admin = 'site'; + } else { + if ( defined( 'WP_NETWORK_ADMIN' ) && WP_NETWORK_ADMIN ) + $in_admin = 'network'; + elseif ( defined( 'WP_USER_ADMIN' ) && WP_USER_ADMIN ) + $in_admin = 'user'; + else + $in_admin = 'site'; + } + + if ( 'index' == $id ) + $id = 'dashboard'; + elseif ( 'front' == $id ) + $in_admin = false; + + $base = $id; + + // If this is the current screen, see if we can be more accurate for post types and taxonomies. + if ( ! $hook_name ) { + if ( isset( $_REQUEST['post_type'] ) ) + $post_type = post_type_exists( $_REQUEST['post_type'] ) ? $_REQUEST['post_type'] : false; + if ( isset( $_REQUEST['taxonomy'] ) ) + $taxonomy = taxonomy_exists( $_REQUEST['taxonomy'] ) ? $_REQUEST['taxonomy'] : false; + + switch ( $base ) { + case 'post' : + if ( isset( $_GET['post'] ) ) + $post_id = (int) $_GET['post']; + elseif ( isset( $_POST['post_ID'] ) ) + $post_id = (int) $_POST['post_ID']; + else + $post_id = 0; + + if ( $post_id ) { + $post = get_post( $post_id ); + if ( $post ) + $post_type = $post->post_type; + } + break; + case 'edit-tags' : + if ( null === $post_type && is_object_in_taxonomy( 'post', $taxonomy ? $taxonomy : 'post_tag' ) ) + $post_type = 'post'; + break; + } + } + + switch ( $base ) { + case 'post' : + if ( null === $post_type ) + $post_type = 'post'; + $id = $post_type; + break; + case 'edit' : + if ( null === $post_type ) + $post_type = 'post'; + $id .= '-' . $post_type; + break; + case 'edit-tags' : + if ( null === $taxonomy ) + $taxonomy = 'post_tag'; + // The edit-tags ID does not contain the post type. Look for it in the request. + if ( null === $post_type ) { + $post_type = 'post'; + if ( isset( $_REQUEST['post_type'] ) && post_type_exists( $_REQUEST['post_type'] ) ) + $post_type = $_REQUEST['post_type']; + } + + $id = 'edit-' . $taxonomy; + break; + } + + if ( 'network' == $in_admin ) { + $id .= '-network'; + $base .= '-network'; + } elseif ( 'user' == $in_admin ) { + $id .= '-user'; + $base .= '-user'; + } + + if ( isset( self::$_registry[ $id ] ) ) { + $screen = self::$_registry[ $id ]; + if ( $screen === get_current_screen() ) + return $screen; + } else { + $screen = new WP_Screen(); + $screen->id = $id; + } + + $screen->base = $base; + $screen->action = $action; + $screen->post_type = (string) $post_type; + $screen->taxonomy = (string) $taxonomy; + $screen->is_user = ( 'user' == $in_admin ); + $screen->is_network = ( 'network' == $in_admin ); + $screen->in_admin = $in_admin; + + self::$_registry[ $id ] = $screen; + + return $screen; + } + + /** + * Makes the screen object the current screen. + * + * @see set_current_screen() + * @since 3.3.0 + */ + function set_current_screen() { + global $current_screen, $taxnow, $typenow; + $current_screen = $this; + $taxnow = $this->taxonomy; + $typenow = $this->post_type; + + /** + * Fires after the current screen has been set. + * + * @since 3.0.0 + * + * @param WP_Screen $current_screen Current WP_Screen object. + */ + do_action( 'current_screen', $current_screen ); + } + + /** + * Constructor + * + * @since 3.3.0 + * @access private + */ + private function __construct() {} + + /** + * Indicates whether the screen is in a particular admin + * + * @since 3.5.0 + * + * @param string $admin The admin to check against (network | user | site). + * If empty any of the three admins will result in true. + * @return boolean True if the screen is in the indicated admin, false otherwise. + * + */ + public function in_admin( $admin = null ) { + if ( empty( $admin ) ) + return (bool) $this->in_admin; + + return ( $admin == $this->in_admin ); + } + + /** + * Sets the old string-based contextual help for the screen. + * + * For backwards compatibility. + * + * @since 3.3.0 + * + * @param WP_Screen $screen A screen object. + * @param string $help Help text. + */ + static function add_old_compat_help( $screen, $help ) { + self::$_old_compat_help[ $screen->id ] = $help; + } + + /** + * Set the parent information for the screen. + * This is called in admin-header.php after the menu parent for the screen has been determined. + * + * @since 3.3.0 + * + * @param string $parent_file The parent file of the screen. Typically the $parent_file global. + */ + function set_parentage( $parent_file ) { + $this->parent_file = $parent_file; + list( $this->parent_base ) = explode( '?', $parent_file ); + $this->parent_base = str_replace( '.php', '', $this->parent_base ); + } + + /** + * Adds an option for the screen. + * Call this in template files after admin.php is loaded and before admin-header.php is loaded to add screen options. + * + * @since 3.3.0 + * + * @param string $option Option ID + * @param mixed $args Option-dependent arguments. + */ + public function add_option( $option, $args = array() ) { + $this->_options[ $option ] = $args; + } + + /** + * Remove an option from the screen. + * + * @since 3.8.0 + * + * @param string $option Option ID. + */ + public function remove_option( $option ) { + unset( $this->_options[ $option ] ); + } + + /** + * Remove all options from the screen. + * + * @since 3.8.0 + */ + public function remove_options() { + $this->_options = array(); + } + + /** + * Get the options registered for the screen. + * + * @since 3.8.0 + * + * @return array Options with arguments. + */ + public function get_options() { + return $this->_options; + } + + /** + * Gets the arguments for an option for the screen. + * + * @since 3.3.0 + * + * @param string $option Option ID. + * @param mixed $key Optional. Specific array key for when the option is an array. + */ + public function get_option( $option, $key = false ) { + if ( ! isset( $this->_options[ $option ] ) ) + return null; + if ( $key ) { + if ( isset( $this->_options[ $option ][ $key ] ) ) + return $this->_options[ $option ][ $key ]; + return null; + } + return $this->_options[ $option ]; + } + + /** + * Gets the help tabs registered for the screen. + * + * @since 3.4.0 + * + * @return array Help tabs with arguments. + */ + public function get_help_tabs() { + return $this->_help_tabs; + } + + /** + * Gets the arguments for a help tab. + * + * @since 3.4.0 + * + * @param string $id Help Tab ID. + * @return array Help tab arguments. + */ + public function get_help_tab( $id ) { + if ( ! isset( $this->_help_tabs[ $id ] ) ) + return null; + return $this->_help_tabs[ $id ]; + } + + /** + * Add a help tab to the contextual help for the screen. + * Call this on the load-$pagenow hook for the relevant screen. + * + * @since 3.3.0 + * + * @param array $args + * - string - title - Title for the tab. + * - string - id - Tab ID. Must be HTML-safe. + * - string - content - Help tab content in plain text or HTML. Optional. + * - callback - callback - A callback to generate the tab content. Optional. + * + */ + public function add_help_tab( $args ) { + $defaults = array( + 'title' => false, + 'id' => false, + 'content' => '', + 'callback' => false, + ); + $args = wp_parse_args( $args, $defaults ); + + $args['id'] = sanitize_html_class( $args['id'] ); + + // Ensure we have an ID and title. + if ( ! $args['id'] || ! $args['title'] ) + return; + + // Allows for overriding an existing tab with that ID. + $this->_help_tabs[ $args['id'] ] = $args; + } + + /** + * Removes a help tab from the contextual help for the screen. + * + * @since 3.3.0 + * + * @param string $id The help tab ID. + */ + public function remove_help_tab( $id ) { + unset( $this->_help_tabs[ $id ] ); + } + + /** + * Removes all help tabs from the contextual help for the screen. + * + * @since 3.3.0 + */ + public function remove_help_tabs() { + $this->_help_tabs = array(); + } + + /** + * Gets the content from a contextual help sidebar. + * + * @since 3.4.0 + * + * @return string Contents of the help sidebar. + */ + public function get_help_sidebar() { + return $this->_help_sidebar; + } + + /** + * Add a sidebar to the contextual help for the screen. + * Call this in template files after admin.php is loaded and before admin-header.php is loaded to add a sidebar to the contextual help. + * + * @since 3.3.0 + * + * @param string $content Sidebar content in plain text or HTML. + */ + public function set_help_sidebar( $content ) { + $this->_help_sidebar = $content; + } + + /** + * Gets the number of layout columns the user has selected. + * + * The layout_columns option controls the max number and default number of + * columns. This method returns the number of columns within that range selected + * by the user via Screen Options. If no selection has been made, the default + * provisioned in layout_columns is returned. If the screen does not support + * selecting the number of layout columns, 0 is returned. + * + * @since 3.4.0 + * + * @return int Number of columns to display. + */ + public function get_columns() { + return $this->columns; + } + + /** + * Render the screen's help section. + * + * This will trigger the deprecated filters for backwards compatibility. + * + * @since 3.3.0 + */ + public function render_screen_meta() { + + /** + * Filter the legacy contextual help list. + * + * @since 2.7.0 + * @deprecated 3.3.0 Use get_current_screen()->add_help_tab() or + * get_current_screen()->remove_help_tab() instead. + * + * @param array $old_compat_help Old contextual help. + * @param WP_Screen $this Current WP_Screen instance. + */ + self::$_old_compat_help = apply_filters( 'contextual_help_list', self::$_old_compat_help, $this ); + + $old_help = isset( self::$_old_compat_help[ $this->id ] ) ? self::$_old_compat_help[ $this->id ] : ''; + + /** + * Filter the legacy contextual help text. + * + * @since 2.7.0 + * @deprecated 3.3.0 Use get_current_screen()->add_help_tab() or + * get_current_screen()->remove_help_tab() instead. + * + * @param string $old_help Help text that appears on the screen. + * @param string $screen_id Screen ID. + * @param WP_Screen $this Current WP_Screen instance. + * + */ + $old_help = apply_filters( 'contextual_help', $old_help, $this->id, $this ); + + // Default help only if there is no old-style block of text and no new-style help tabs. + if ( empty( $old_help ) && ! $this->get_help_tabs() ) { + + /** + * Filter the default legacy contextual help text. + * + * @since 2.8.0 + * @deprecated 3.3.0 Use get_current_screen()->add_help_tab() or + * get_current_screen()->remove_help_tab() instead. + * + * @param string $old_help_default Default contextual help text. + */ + $default_help = apply_filters( 'default_contextual_help', '' ); + if ( $default_help ) + $old_help = '

    ' . $default_help . '

    '; + } + + if ( $old_help ) { + $this->add_help_tab( array( + 'id' => 'old-contextual-help', + 'title' => __('Overview'), + 'content' => $old_help, + ) ); + } + + $help_sidebar = $this->get_help_sidebar(); + + $help_class = 'hidden'; + if ( ! $help_sidebar ) + $help_class .= ' no-sidebar'; + + // Time to render! + ?> +
    + +
    +
    +
    +
    +
      + get_help_tabs() as $tab ) : + $link_id = "tab-link-{$tab['id']}"; + $panel_id = "tab-panel-{$tab['id']}"; + ?> + + + +
    +
    + + +
    + +
    + + +
    + get_help_tabs() as $tab ): + $panel_id = "tab-panel-{$tab['id']}"; + ?> + +
    + +
    + +
    +
    +
    + id, $this ); + + if ( ! empty( $columns ) && isset( $columns[ $this->id ] ) ) + $this->add_option( 'layout_columns', array('max' => $columns[ $this->id ] ) ); + + if ( $this->get_option( 'layout_columns' ) ) { + $this->columns = (int) get_user_option("screen_layout_$this->id"); + + if ( ! $this->columns && $this->get_option( 'layout_columns', 'default' ) ) + $this->columns = $this->get_option( 'layout_columns', 'default' ); + } + $GLOBALS[ 'screen_layout_columns' ] = $this->columns; // Set the global for back-compat. + + // Add screen options + if ( $this->show_screen_options() ) + $this->render_screen_options(); + ?> +
    + get_help_tabs() && ! $this->show_screen_options() ) + return; + ?> + + _show_screen_options ) ) + return $this->_show_screen_options; + + $columns = get_column_headers( $this ); + + $show_screen = ! empty( $wp_meta_boxes[ $this->id ] ) || $columns || $this->get_option( 'per_page' ); + + switch ( $this->id ) { + case 'widgets': + $this->_screen_settings = '

    ' . __('Enable accessibility mode') . '' . __('Disable accessibility mode') . "

    \n"; + break; + default: + $this->_screen_settings = ''; + break; + } + + /** + * Filter the screen settings text displayed in the Screen Options tab. + * + * This filter is currently only used on the Widgets screen to enable + * accessibility mode. + * + * @since 3.0.0 + * + * @param string $screen_settings Screen settings. + * @param WP_Screen $this WP_Screen object. + */ + $this->_screen_settings = apply_filters( 'screen_settings', $this->_screen_settings, $this ); + + if ( $this->_screen_settings || $this->_options ) + $show_screen = true; + + /** + * Filter whether to show the Screen Options tab. + * + * @since 3.2.0 + * + * @param bool $show_screen Whether to show Screen Options tab. + * Default true. + * @param WP_Screen $this Current WP_Screen instance. + */ + $this->_show_screen_options = apply_filters( 'screen_options_show_screen', $show_screen, $this ); + return $this->_show_screen_options; + } + + /** + * Render the screen options tab. + * + * @since 3.3.0 + */ + public function render_screen_options() { + global $wp_meta_boxes, $wp_list_table; + + $columns = get_column_headers( $this ); + $hidden = get_hidden_columns( $this ); + $post = get_post(); + + ?> + + get_option('layout_columns') ) + return; + + $screen_layout_columns = $this->get_columns(); + $num = $this->get_option( 'layout_columns', 'max' ); + + ?> +
    +
    + + +
    + get_option( 'per_page' ) ) + return; + + $per_page_label = $this->get_option( 'per_page', 'label' ); + + $option = $this->get_option( 'per_page', 'option' ); + if ( ! $option ) + $option = str_replace( '-', '_', "{$this->id}_per_page" ); + + $per_page = (int) get_user_option( $option ); + if ( empty( $per_page ) || $per_page < 1 ) { + $per_page = $this->get_option( 'per_page', 'default' ); + if ( ! $per_page ) + $per_page = 20; + } + + if ( 'edit_comments_per_page' == $option ) { + $comment_status = isset( $_REQUEST['comment_status'] ) ? $_REQUEST['comment_status'] : 'all'; + + /** This filter is documented in wp-admin/includes/class-wp-comments-list-table.php */ + $per_page = apply_filters( 'comments_per_page', $per_page, $comment_status ); + } elseif ( 'categories_per_page' == $option ) { + /** This filter is documented in wp-admin/includes/class-wp-terms-list-table.php */ + $per_page = apply_filters( 'edit_categories_per_page', $per_page ); + } else { + /** This filter is documented in wp-admin/includes/class-wp-list-table.php */ + $per_page = apply_filters( $option, $per_page ); + } + + // Back compat + if ( isset( $this->post_type ) ) { + /** This filter is documented in wp-admin/includes/class-wp-posts-list-table.php */ + $per_page = apply_filters( 'edit_posts_per_page', $per_page, $this->post_type ); + } + + ?> +
    + + + + + +
    + $cat_name, 'category_parent' => $parent) ); +} + +/** + * {@internal Missing Short Description}} + * + * @since 2.0.0 + * + * @param unknown_type $categories + * @param unknown_type $post_id + * @return unknown + */ +function wp_create_categories($categories, $post_id = '') { + $cat_ids = array (); + foreach ($categories as $category) { + if ($id = category_exists($category)) + $cat_ids[] = $id; + else + if ($id = wp_create_category($category)) + $cat_ids[] = $id; + } + + if ( $post_id ) + wp_set_post_categories($post_id, $cat_ids); + + return $cat_ids; +} + +/** + * Updates an existing Category or creates a new Category. + * + * @since 2.0.0 + * + * @param mixed $catarr See defaults below. Set 'cat_ID' to a non-zero value to update an existing category. The 'taxonomy' key was added in 3.0.0. + * @param bool $wp_error Optional, since 2.5.0. Set this to true if the caller handles WP_Error return values. + * @return int|object The ID number of the new or updated Category on success. Zero or a WP_Error on failure, depending on param $wp_error. + */ +function wp_insert_category($catarr, $wp_error = false) { + $cat_defaults = array('cat_ID' => 0, 'taxonomy' => 'category', 'cat_name' => '', 'category_description' => '', 'category_nicename' => '', 'category_parent' => ''); + $catarr = wp_parse_args($catarr, $cat_defaults); + extract($catarr, EXTR_SKIP); + + if ( trim( $cat_name ) == '' ) { + if ( ! $wp_error ) + return 0; + else + return new WP_Error( 'cat_name', __('You did not enter a category name.') ); + } + + $cat_ID = (int) $cat_ID; + + // Are we updating or creating? + if ( !empty ($cat_ID) ) + $update = true; + else + $update = false; + + $name = $cat_name; + $description = $category_description; + $slug = $category_nicename; + $parent = $category_parent; + + $parent = (int) $parent; + if ( $parent < 0 ) + $parent = 0; + + if ( empty( $parent ) || ! term_exists( $parent, $taxonomy ) || ( $cat_ID && term_is_ancestor_of( $cat_ID, $parent, $taxonomy ) ) ) + $parent = 0; + + $args = compact('name', 'slug', 'parent', 'description'); + + if ( $update ) + $cat_ID = wp_update_term($cat_ID, $taxonomy, $args); + else + $cat_ID = wp_insert_term($cat_name, $taxonomy, $args); + + if ( is_wp_error($cat_ID) ) { + if ( $wp_error ) + return $cat_ID; + else + return 0; + } + + return $cat_ID['term_id']; +} + +/** + * Aliases wp_insert_category() with minimal args. + * + * If you want to update only some fields of an existing category, call this + * function with only the new values set inside $catarr. + * + * @since 2.0.0 + * + * @param array $catarr The 'cat_ID' value is required. All other keys are optional. + * @return int|bool The ID number of the new or updated Category on success. Zero or FALSE on failure. + */ +function wp_update_category($catarr) { + $cat_ID = (int) $catarr['cat_ID']; + + if ( isset($catarr['category_parent']) && ($cat_ID == $catarr['category_parent']) ) + return false; + + // First, get all of the original fields + $category = get_term( $cat_ID, 'category', ARRAY_A ); + _make_cat_compat( $category ); + + // Escape data pulled from DB. + $category = wp_slash($category); + + // Merge old and new fields with new fields overwriting old ones. + $catarr = array_merge($category, $catarr); + + return wp_insert_category($catarr); +} + +// +// Tags +// + +/** + * {@internal Missing Short Description}} + * + * @since 2.3.0 + * + * @param unknown_type $tag_name + * @return unknown + */ +function tag_exists($tag_name) { + return term_exists($tag_name, 'post_tag'); +} + +/** + * {@internal Missing Short Description}} + * + * @since 2.3.0 + * + * @param unknown_type $tag_name + * @return unknown + */ +function wp_create_tag($tag_name) { + return wp_create_term( $tag_name, 'post_tag'); +} + +/** + * {@internal Missing Short Description}} + * + * @since 2.3.0 + * + * @param unknown_type $post_id + * @return unknown + */ +function get_tags_to_edit( $post_id, $taxonomy = 'post_tag' ) { + return get_terms_to_edit( $post_id, $taxonomy); +} + +/** + * {@internal Missing Short Description}} + * + * @since 2.8.0 + * + * @param unknown_type $post_id + * @return unknown + */ +function get_terms_to_edit( $post_id, $taxonomy = 'post_tag' ) { + $post_id = (int) $post_id; + if ( !$post_id ) + return false; + + $tags = wp_get_post_terms($post_id, $taxonomy, array()); + + if ( !$tags ) + return false; + + if ( is_wp_error($tags) ) + return $tags; + + foreach ( $tags as $tag ) + $tag_names[] = $tag->name; + $tags_to_edit = join( ',', $tag_names ); + $tags_to_edit = esc_attr( $tags_to_edit ); + + /** + * Filter the comma-separated list of terms available to edit. + * + * @since 2.8.0 + * + * @see get_terms_to_edit() + * + * @param array $tags_to_edit An array of terms. + * @param string $taxonomy The taxonomy for which to retrieve terms. Default 'post_tag'. + */ + $tags_to_edit = apply_filters( 'terms_to_edit', $tags_to_edit, $taxonomy ); + + return $tags_to_edit; +} + +/** + * {@internal Missing Short Description}} + * + * @since 2.8.0 + * + * @param unknown_type $tag_name + * @return unknown + */ +function wp_create_term($tag_name, $taxonomy = 'post_tag') { + if ( $id = term_exists($tag_name, $taxonomy) ) + return $id; + + return wp_insert_term($tag_name, $taxonomy); +} diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php new file mode 100644 index 0000000..fb58144 --- /dev/null +++ b/wp-admin/includes/template.php @@ -0,0 +1,2102 @@ + elements. + * + * @see Walker + * @see wp_category_checklist() + * @see wp_terms_checklist() + * @since 2.5.1 + */ +class Walker_Category_Checklist extends Walker { + var $tree_type = 'category'; + var $db_fields = array ('parent' => 'parent', 'id' => 'term_id'); //TODO: decouple this + + /** + * Starts the list before the elements are added. + * + * @see Walker:start_lvl() + * + * @since 2.5.1 + * + * @param string $output Passed by reference. Used to append additional content. + * @param int $depth Depth of category. Used for tab indentation. + * @param array $args An array of arguments. @see wp_terms_checklist() + */ + function start_lvl( &$output, $depth = 0, $args = array() ) { + $indent = str_repeat("\t", $depth); + $output .= "$indent
      \n"; + } + + /** + * Ends the list of after the elements are added. + * + * @see Walker::end_lvl() + * + * @since 2.5.1 + * + * @param string $output Passed by reference. Used to append additional content. + * @param int $depth Depth of category. Used for tab indentation. + * @param array $args An array of arguments. @see wp_terms_checklist() + */ + function end_lvl( &$output, $depth = 0, $args = array() ) { + $indent = str_repeat("\t", $depth); + $output .= "$indent
    \n"; + } + + /** + * Start the element output. + * + * @see Walker::start_el() + * + * @since 2.5.1 + * + * @param string $output Passed by reference. Used to append additional content. + * @param object $category The current term object. + * @param int $depth Depth of the term in reference to parents. Default 0. + * @param array $args An array of arguments. @see wp_terms_checklist() + * @param int $id ID of the current term. + */ + function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) { + extract($args); + if ( empty($taxonomy) ) + $taxonomy = 'category'; + + if ( $taxonomy == 'category' ) + $name = 'post_category'; + else + $name = 'tax_input['.$taxonomy.']'; + + $class = in_array( $category->term_id, $popular_cats ) ? ' class="popular-category"' : ''; + + /** This filter is documented in wp-includes/category-template.php */ + $output .= "\n
  • " . ''; + } + + /** + * Ends the element output, if needed. + * + * @see Walker::end_el() + * + * @since 2.5.1 + * + * @param string $output Passed by reference. Used to append additional content. + * @param object $category The current term object. + * @param int $depth Depth of the term in reference to parents. Default 0. + * @param array $args An array of arguments. @see wp_terms_checklist() + */ + function end_el( &$output, $category, $depth = 0, $args = array() ) { + $output .= "
  • \n"; + } +} + +/** + * Output an unordered list of checkbox elements labelled + * with category names. + * + * @see wp_terms_checklist() + * @since 2.5.1 + * + * @param int $post_id Mark categories associated with this post as checked. $selected_cats must not be an array. + * @param int $descendants_and_self ID of the category to output along with its descendents. + * @param bool|array $selected_cats List of categories to mark as checked. + * @param bool|array $popular_cats Override the list of categories that receive the "popular-category" class. + * @param object $walker Walker object to use to build the output. + * @param bool $checked_ontop Move checked items out of the hierarchy and to the top of the list. + */ +function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false, $walker = null, $checked_ontop = true ) { + wp_terms_checklist( $post_id, array( + 'taxonomy' => 'category', + 'descendants_and_self' => $descendants_and_self, + 'selected_cats' => $selected_cats, + 'popular_cats' => $popular_cats, + 'walker' => $walker, + 'checked_ontop' => $checked_ontop + ) ); +} + +/** + * Output an unordered list of checkbox elements labelled + * with term names. Taxonomy independent version of wp_category_checklist(). + * + * @since 3.0.0 + * + * @param int $post_id + * @param array $args + */ +function wp_terms_checklist($post_id = 0, $args = array()) { + $defaults = array( + 'descendants_and_self' => 0, + 'selected_cats' => false, + 'popular_cats' => false, + 'walker' => null, + 'taxonomy' => 'category', + 'checked_ontop' => true + ); + + /** + * Filter the taxonomy terms checklist arguments. + * + * @since 3.4.0 + * + * @see wp_terms_checklist() + * + * @param array $args An array of arguments. + * @param int $post_id The post ID. + */ + $args = apply_filters( 'wp_terms_checklist_args', $args, $post_id ); + + extract( wp_parse_args($args, $defaults), EXTR_SKIP ); + + if ( empty($walker) || !is_a($walker, 'Walker') ) + $walker = new Walker_Category_Checklist; + + $descendants_and_self = (int) $descendants_and_self; + + $args = array('taxonomy' => $taxonomy); + + $tax = get_taxonomy($taxonomy); + $args['disabled'] = !current_user_can($tax->cap->assign_terms); + + if ( is_array( $selected_cats ) ) + $args['selected_cats'] = $selected_cats; + elseif ( $post_id ) + $args['selected_cats'] = wp_get_object_terms($post_id, $taxonomy, array_merge($args, array('fields' => 'ids'))); + else + $args['selected_cats'] = array(); + + if ( is_array( $popular_cats ) ) + $args['popular_cats'] = $popular_cats; + else + $args['popular_cats'] = get_terms( $taxonomy, array( 'fields' => 'ids', 'orderby' => 'count', 'order' => 'DESC', 'number' => 10, 'hierarchical' => false ) ); + + if ( $descendants_and_self ) { + $categories = (array) get_terms($taxonomy, array( 'child_of' => $descendants_and_self, 'hierarchical' => 0, 'hide_empty' => 0 ) ); + $self = get_term( $descendants_and_self, $taxonomy ); + array_unshift( $categories, $self ); + } else { + $categories = (array) get_terms($taxonomy, array('get' => 'all')); + } + + if ( $checked_ontop ) { + // Post process $categories rather than adding an exclude to the get_terms() query to keep the query the same across all posts (for any query cache) + $checked_categories = array(); + $keys = array_keys( $categories ); + + foreach( $keys as $k ) { + if ( in_array( $categories[$k]->term_id, $args['selected_cats'] ) ) { + $checked_categories[] = $categories[$k]; + unset( $categories[$k] ); + } + } + + // Put checked cats on top + echo call_user_func_array(array(&$walker, 'walk'), array($checked_categories, 0, $args)); + } + // Then the rest of them + echo call_user_func_array(array(&$walker, 'walk'), array($categories, 0, $args)); +} + +/** + * Retrieve a list of the most popular terms from the specified taxonomy. + * + * If the $echo argument is true then the elements for a list of checkbox + * elements labelled with the names of the selected terms is output. + * If the $post_ID global isn't empty then the terms associated with that + * post will be marked as checked. + * + * @since 2.5.0 + * + * @param string $taxonomy Taxonomy to retrieve terms from. + * @param int $default Unused. + * @param int $number Number of terms to retrieve. Defaults to 10. + * @param bool $echo Optionally output the list as well. Defaults to true. + * @return array List of popular term IDs. + */ +function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $echo = true ) { + $post = get_post(); + + if ( $post && $post->ID ) + $checked_terms = wp_get_object_terms($post->ID, $taxonomy, array('fields'=>'ids')); + else + $checked_terms = array(); + + $terms = get_terms( $taxonomy, array( 'orderby' => 'count', 'order' => 'DESC', 'number' => $number, 'hierarchical' => false ) ); + + $tax = get_taxonomy($taxonomy); + + $popular_ids = array(); + foreach ( (array) $terms as $term ) { + $popular_ids[] = $term->term_id; + if ( !$echo ) // hack for AJAX use + continue; + $id = "popular-$taxonomy-$term->term_id"; + $checked = in_array( $term->term_id, $checked_terms ) ? 'checked="checked"' : ''; + ?> + + + + 'name', 'hide_empty' => 0 ) ); + + if ( empty( $categories ) ) + return; + + foreach ( $categories as $category ) { + $cat_id = $category->term_id; + + /** This filter is documented in wp-includes/category-template.php */ + $name = esc_html( apply_filters( 'the_category', $category->name ) ); + $checked = in_array( $cat_id, $checked_categories ) ? ' checked="checked"' : ''; + echo '"; + } +} + +// adds hidden fields with the data for use in the inline editor for posts and pages +/** + * {@internal Missing Short Description}} + * + * @since 2.7.0 + * + * @param unknown_type $post + */ +function get_inline_data($post) { + $post_type_object = get_post_type_object($post->post_type); + if ( ! current_user_can( 'edit_post', $post->ID ) ) + return; + + $title = esc_textarea( trim( $post->post_title ) ); + + /** This filter is documented in wp-admin/edit-tag-form.php */ + echo ' +'; +} + +/** + * {@internal Missing Short Description}} + * + * @since 2.7.0 + * + * @param unknown_type $position + * @param unknown_type $checkbox + * @param unknown_type $mode + */ +function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single', $table_row = true) { + + /** + * Filter the in-line comment reply-to form output in the Comments + * list table. + * + * Returning a non-empty value here will short-circuit display + * of the in-line comment-reply form in the Comments list table, + * echoing the returned value instead. + * + * @since 2.7.0 + * + * @see wp_comment_reply() + * + * @param string $content The reply-to form content. + * @param array $args An array of default args. + */ + $content = apply_filters( 'wp_comment_reply', '', array( 'position' => $position, 'checkbox' => $checkbox, 'mode' => $mode ) ); + + if ( ! empty($content) ) { + echo $content; + return; + } + + if ( $mode == 'single' ) { + $wp_list_table = _get_list_table('WP_Post_Comments_List_Table'); + } else { + $wp_list_table = _get_list_table('WP_Comments_List_Table'); + } + +?> +
    + +
    + + + +
    + + + + + + + ' . _x( 'Name', 'meta name' ) . ' + ' . __( 'Value' ) . ' + + + + + +'; //TBODY needed for list-manipulation JS + return; + } + $count = 0; +?> + + + + + + + + + + +
    + + $entry['meta_id'] = (int) $entry['meta_id']; + + $delete_nonce = wp_create_nonce( 'delete-meta_' . $entry['meta_id'] ); + + $r .= "\n\t"; + $r .= "\n\t\t"; + + $r .= "\n\t\t
    "; + $r .= get_submit_button( __( 'Delete' ), 'deletemeta small', "deletemeta[{$entry['meta_id']}]", false, array( 'data-wp-lists' => "delete:the-list:meta-{$entry['meta_id']}::_ajax_nonce=$delete_nonce" ) ); + $r .= "\n\t\t"; + $r .= get_submit_button( __( 'Update' ), 'updatemeta small', "meta-{$entry['meta_id']}-submit", false, array( 'data-wp-lists' => "add:the-list:meta-{$entry['meta_id']}::_ajax_nonce-add-meta=$update_nonce" ) ); + $r .= "
    "; + $r .= wp_nonce_field( 'change-meta', '_ajax_nonce', false, false ); + $r .= ""; + + $r .= "\n\t\t\n\t"; + return $r; +} + +/** + * Prints the form in the Custom Fields meta box. + * + * @since 1.2.0 + * + * @param WP_Post $post Optional. The post being edited. + */ +function meta_form( $post = null ) { + global $wpdb; + $post = get_post( $post ); + + /** + * Filter the number of custom fields to retrieve for the drop-down + * in the Custom Fields meta box. + * + * @since 2.1.0 + * + * @param int $limit Number of custom fields to retrieve. Default 30. + */ + $limit = (int) apply_filters( 'postmeta_form_limit', 30 ); + $keys = $wpdb->get_col( " + SELECT meta_key + FROM $wpdb->postmeta + GROUP BY meta_key + HAVING meta_key NOT LIKE '\_%' + ORDER BY meta_key + LIMIT $limit" ); + if ( $keys ) { + natcasesort( $keys ); + $meta_key_input_id = 'metakeyselect'; + } else { + $meta_key_input_id = 'metakeyinput'; + } +?> +

    + + + + + + + + + + + + + + + + +
    + + + + + + + + + +
    +
    + 'newmeta-submit', 'data-wp-lists' => 'add:the-list:newmeta' ) ); ?> +
    + +
    +post_status, array('draft', 'pending') ) && (!$post->post_date_gmt || '0000-00-00 00:00:00' == $post->post_date_gmt ) ); + + $tab_index_attribute = ''; + if ( (int) $tab_index > 0 ) + $tab_index_attribute = " tabindex=\"$tab_index\""; + + // echo '
    '; + + $time_adj = current_time('timestamp'); + $post_date = ($for_post) ? $post->post_date : $comment->comment_date; + $jj = ($edit) ? mysql2date( 'd', $post_date, false ) : gmdate( 'd', $time_adj ); + $mm = ($edit) ? mysql2date( 'm', $post_date, false ) : gmdate( 'm', $time_adj ); + $aa = ($edit) ? mysql2date( 'Y', $post_date, false ) : gmdate( 'Y', $time_adj ); + $hh = ($edit) ? mysql2date( 'H', $post_date, false ) : gmdate( 'H', $time_adj ); + $mn = ($edit) ? mysql2date( 'i', $post_date, false ) : gmdate( 'i', $time_adj ); + $ss = ($edit) ? mysql2date( 's', $post_date, false ) : gmdate( 's', $time_adj ); + + $cur_jj = gmdate( 'd', $time_adj ); + $cur_mm = gmdate( 'm', $time_adj ); + $cur_aa = gmdate( 'Y', $time_adj ); + $cur_hh = gmdate( 'H', $time_adj ); + $cur_mn = gmdate( 'i', $time_adj ); + + $month = "'; + + $day = ''; + $year = ''; + $hour = ''; + $minute = ''; + + echo '
    '; + /* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */ + printf( __( '%1$s %2$s, %3$s @ %4$s : %5$s' ), $month, $day, $year, $hour, $minute ); + + echo '
    '; + + if ( $multi ) return; + + echo "\n\n"; + foreach ( array('mm', 'jj', 'aa', 'hh', 'mn') as $timeunit ) { + echo '' . "\n"; + $cur_timeunit = 'cur_' . $timeunit; + echo '' . "\n"; + } +?> + +

    + + +

    + HTML elements for the page templates drop-down. + * + * @since 1.5.0 + * + * @param string $default Optional. The template file name. Default empty. + */ +function page_template_dropdown( $default = '' ) { + $templates = get_page_templates( get_post() ); + ksort( $templates ); + foreach ( array_keys( $templates ) as $template ) { + $selected = selected( $default, $templates[ $template ], false ); + echo "\n\t"; + } +} + +/** + * Print out "; + parent_dropdown( $default, $item->ID, $level +1 ); + } + } else { + return false; + } +} + +/** + * Print out "; + else + $r .= "\n\t"; + } + echo $p . $r; +} + +/** + * Outputs the form used by the importers to accept the data to be imported + * + * @since 2.0.0 + * + * @param string $action The action attribute for the form. + */ +function wp_import_upload_form( $action ) { + + /** + * Filter the maximum allowed upload size for import files. + * + * @since 2.3.0 + * + * @see wp_max_upload_size() + * + * @param int $max_upload_size Allowed upload size. Default 1 MB. + */ + $bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() ); + $size = size_format( $bytes ); + $upload_dir = wp_upload_dir(); + if ( ! empty( $upload_dir['error'] ) ) : + ?>

    +

    +
    +

    + () + + + +

    + +
    +id; + + if ( !isset($wp_meta_boxes) ) + $wp_meta_boxes = array(); + if ( !isset($wp_meta_boxes[$page]) ) + $wp_meta_boxes[$page] = array(); + if ( !isset($wp_meta_boxes[$page][$context]) ) + $wp_meta_boxes[$page][$context] = array(); + + foreach ( array_keys($wp_meta_boxes[$page]) as $a_context ) { + foreach ( array('high', 'core', 'default', 'low') as $a_priority ) { + if ( !isset($wp_meta_boxes[$page][$a_context][$a_priority][$id]) ) + continue; + + // If a core box was previously added or removed by a plugin, don't add. + if ( 'core' == $priority ) { + // If core box previously deleted, don't add + if ( false === $wp_meta_boxes[$page][$a_context][$a_priority][$id] ) + return; + // If box was added with default priority, give it core priority to maintain sort order + if ( 'default' == $a_priority ) { + $wp_meta_boxes[$page][$a_context]['core'][$id] = $wp_meta_boxes[$page][$a_context]['default'][$id]; + unset($wp_meta_boxes[$page][$a_context]['default'][$id]); + } + return; + } + // If no priority given and id already present, use existing priority + if ( empty($priority) ) { + $priority = $a_priority; + // else if we're adding to the sorted priority, we don't know the title or callback. Grab them from the previously added context/priority. + } elseif ( 'sorted' == $priority ) { + $title = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['title']; + $callback = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['callback']; + $callback_args = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['args']; + } + // An id can be in only one priority and one context + if ( $priority != $a_priority || $context != $a_context ) + unset($wp_meta_boxes[$page][$a_context][$a_priority][$id]); + } + } + + if ( empty($priority) ) + $priority = 'low'; + + if ( !isset($wp_meta_boxes[$page][$context][$priority]) ) + $wp_meta_boxes[$page][$context][$priority] = array(); + + $wp_meta_boxes[$page][$context][$priority][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback, 'args' => $callback_args); +} + +/** + * Meta-Box template function + * + * @since 2.5.0 + * + * @param string|object $screen Screen identifier + * @param string $context box context + * @param mixed $object gets passed to the box callback function as first parameter + * @return int number of meta_boxes + */ +function do_meta_boxes( $screen, $context, $object ) { + global $wp_meta_boxes; + static $already_sorted = false; + + if ( empty( $screen ) ) + $screen = get_current_screen(); + elseif ( is_string( $screen ) ) + $screen = convert_to_screen( $screen ); + + $page = $screen->id; + + $hidden = get_hidden_meta_boxes( $screen ); + + printf('
    ', htmlspecialchars($context)); + + $i = 0; + do { + // Grab the ones the user has manually sorted. Pull them out of their previous context/priority and into the one the user chose + if ( !$already_sorted && $sorted = get_user_option( "meta-box-order_$page" ) ) { + foreach ( $sorted as $box_context => $ids ) { + foreach ( explode(',', $ids ) as $id ) { + if ( $id && 'dashboard_browser_nag' !== $id ) + add_meta_box( $id, null, null, $screen, $box_context, 'sorted' ); + } + } + } + $already_sorted = true; + + if ( !isset($wp_meta_boxes) || !isset($wp_meta_boxes[$page]) || !isset($wp_meta_boxes[$page][$context]) ) + break; + + foreach ( array('high', 'sorted', 'core', 'default', 'low') as $priority ) { + if ( isset($wp_meta_boxes[$page][$context][$priority]) ) { + foreach ( (array) $wp_meta_boxes[$page][$context][$priority] as $box ) { + if ( false == $box || ! $box['title'] ) + continue; + $i++; + $hidden_class = in_array($box['id'], $hidden) ? ' hide-if-js' : ''; + echo '
    ' . "\n"; + if ( 'dashboard_browser_nag' != $box['id'] ) + echo '

    '; + echo "

    {$box['title']}

    \n"; + echo '
    ' . "\n"; + call_user_func($box['callback'], $object, $box); + echo "
    \n"; + echo "
    \n"; + } + } + } + } while(0); + + echo "
    "; + + return $i; + +} + +/** + * Remove a meta box from an edit form. + * + * @since 2.6.0 + * + * @param string $id String for use in the 'id' attribute of tags. + * @param string|object $screen The screen on which to show the box (post, page, link). + * @param string $context The context within the page where the boxes should show ('normal', 'advanced'). + */ +function remove_meta_box($id, $screen, $context) { + global $wp_meta_boxes; + + if ( empty( $screen ) ) + $screen = get_current_screen(); + elseif ( is_string( $screen ) ) + $screen = convert_to_screen( $screen ); + + $page = $screen->id; + + if ( !isset($wp_meta_boxes) ) + $wp_meta_boxes = array(); + if ( !isset($wp_meta_boxes[$page]) ) + $wp_meta_boxes[$page] = array(); + if ( !isset($wp_meta_boxes[$page][$context]) ) + $wp_meta_boxes[$page][$context] = array(); + + foreach ( array('high', 'core', 'default', 'low') as $priority ) + $wp_meta_boxes[$page][$context][$priority][$id] = false; +} + +/** + * Meta Box Accordion Template Function + * + * Largely made up of abstracted code from {@link do_meta_boxes()}, this + * function serves to build meta boxes as list items for display as + * a collapsible accordion. + * + * @since 3.6.0 + * + * @uses global $wp_meta_boxes Used to retrieve registered meta boxes. + * + * @param string|object $screen The screen identifier. + * @param string $context The meta box context. + * @param mixed $object gets passed to the section callback function as first parameter. + * @return int number of meta boxes as accordion sections. + */ +function do_accordion_sections( $screen, $context, $object ) { + global $wp_meta_boxes; + + wp_enqueue_script( 'accordion' ); + + if ( empty( $screen ) ) + $screen = get_current_screen(); + elseif ( is_string( $screen ) ) + $screen = convert_to_screen( $screen ); + + $page = $screen->id; + + $hidden = get_hidden_meta_boxes( $screen ); + ?> +
    +
      + +
    • +

      +
      +
      + +
      +
      +
    • + +
    +
    + $id, 'title' => $title, 'callback' => $callback); +} + +/** + * Add a new field to a section of a settings page + * + * Part of the Settings API. Use this to define a settings field that will show + * as part of a settings section inside a settings page. The fields are shown using + * do_settings_fields() in do_settings-sections() + * + * The $callback argument should be the name of a function that echoes out the + * html input tags for this setting field. Use get_option() to retrieve existing + * values to show. + * + * @since 2.7.0 + * + * @global $wp_settings_fields Storage array of settings fields and info about their pages/sections + * + * @param string $id Slug-name to identify the field. Used in the 'id' attribute of tags. + * @param string $title Formatted title of the field. Shown as the label for the field during output. + * @param string $callback Function that fills the field with the desired form inputs. The function should echo its output. + * @param string $page The slug-name of the settings page on which to show the section (general, reading, writing, ...). + * @param string $section The slug-name of the section of the settings page in which to show the box (default, ...). + * @param array $args Additional arguments + */ +function add_settings_field($id, $title, $callback, $page, $section = 'default', $args = array()) { + global $wp_settings_fields; + + if ( 'misc' == $page ) { + _deprecated_argument( __FUNCTION__, '3.0', __( 'The miscellaneous options group has been removed. Use another settings group.' ) ); + $page = 'general'; + } + + if ( 'privacy' == $page ) { + _deprecated_argument( __FUNCTION__, '3.5', __( 'The privacy options group has been removed. Use another settings group.' ) ); + $page = 'reading'; + } + + $wp_settings_fields[$page][$section][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback, 'args' => $args); +} + +/** + * Prints out all settings sections added to a particular settings page + * + * Part of the Settings API. Use this in a settings page callback function + * to output all the sections and fields that were added to that $page with + * add_settings_section() and add_settings_field() + * + * @global $wp_settings_sections Storage array of all settings sections added to admin pages + * @global $wp_settings_fields Storage array of settings fields and info about their pages/sections + * @since 2.7.0 + * + * @param string $page The slug name of the page whos settings sections you want to output + */ +function do_settings_sections( $page ) { + global $wp_settings_sections, $wp_settings_fields; + + if ( ! isset( $wp_settings_sections[$page] ) ) + return; + + foreach ( (array) $wp_settings_sections[$page] as $section ) { + if ( $section['title'] ) + echo "

    {$section['title']}

    \n"; + + if ( $section['callback'] ) + call_user_func( $section['callback'], $section ); + + if ( ! isset( $wp_settings_fields ) || !isset( $wp_settings_fields[$page] ) || !isset( $wp_settings_fields[$page][$section['id']] ) ) + continue; + echo ''; + do_settings_fields( $page, $section['id'] ); + echo '
    '; + } +} + +/** + * Print out the settings fields for a particular settings section + * + * Part of the Settings API. Use this in a settings page to output + * a specific section. Should normally be called by do_settings_sections() + * rather than directly. + * + * @global $wp_settings_fields Storage array of settings fields and their pages/sections + * + * @since 2.7.0 + * + * @param string $page Slug title of the admin page who's settings fields you want to show. + * @param section $section Slug title of the settings section who's fields you want to show. + */ +function do_settings_fields($page, $section) { + global $wp_settings_fields; + + if ( ! isset( $wp_settings_fields[$page][$section] ) ) + return; + + foreach ( (array) $wp_settings_fields[$page][$section] as $field ) { + echo ''; + if ( !empty($field['args']['label_for']) ) + echo ''; + else + echo '' . $field['title'] . ''; + echo ''; + call_user_func($field['callback'], $field['args']); + echo ''; + echo ''; + } +} + +/** + * Register a settings error to be displayed to the user + * + * Part of the Settings API. Use this to show messages to users about settings validation + * problems, missing settings or anything else. + * + * Settings errors should be added inside the $sanitize_callback function defined in + * register_setting() for a given setting to give feedback about the submission. + * + * By default messages will show immediately after the submission that generated the error. + * Additional calls to settings_errors() can be used to show errors even when the settings + * page is first accessed. + * + * @since 3.0.0 + * + * @global array $wp_settings_errors Storage array of errors registered during this pageload + * + * @param string $setting Slug title of the setting to which this error applies + * @param string $code Slug-name to identify the error. Used as part of 'id' attribute in HTML output. + * @param string $message The formatted message text to display to the user (will be shown inside styled
    and

    ) + * @param string $type The type of message it is, controls HTML class. Use 'error' or 'updated'. + */ +function add_settings_error( $setting, $code, $message, $type = 'error' ) { + global $wp_settings_errors; + + $new_error = array( + 'setting' => $setting, + 'code' => $code, + 'message' => $message, + 'type' => $type + ); + $wp_settings_errors[] = $new_error; +} + +/** + * Fetch settings errors registered by add_settings_error() + * + * Checks the $wp_settings_errors array for any errors declared during the current + * pageload and returns them. + * + * If changes were just submitted ($_GET['settings-updated']) and settings errors were saved + * to the 'settings_errors' transient then those errors will be returned instead. This + * is used to pass errors back across pageloads. + * + * Use the $sanitize argument to manually re-sanitize the option before returning errors. + * This is useful if you have errors or notices you want to show even when the user + * hasn't submitted data (i.e. when they first load an options page, or in admin_notices action hook) + * + * @since 3.0.0 + * + * @global array $wp_settings_errors Storage array of errors registered during this pageload + * + * @param string $setting Optional slug title of a specific setting who's errors you want. + * @param boolean $sanitize Whether to re-sanitize the setting value before returning errors. + * @return array Array of settings errors + */ +function get_settings_errors( $setting = '', $sanitize = false ) { + global $wp_settings_errors; + + // If $sanitize is true, manually re-run the sanitization for this option + // This allows the $sanitize_callback from register_setting() to run, adding + // any settings errors you want to show by default. + if ( $sanitize ) + sanitize_option( $setting, get_option( $setting ) ); + + // If settings were passed back from options.php then use them + if ( isset( $_GET['settings-updated'] ) && $_GET['settings-updated'] && get_transient( 'settings_errors' ) ) { + $wp_settings_errors = array_merge( (array) $wp_settings_errors, get_transient( 'settings_errors' ) ); + delete_transient( 'settings_errors' ); + } + + // Check global in case errors have been added on this pageload + if ( ! count( $wp_settings_errors ) ) + return array(); + + // Filter the results to those of a specific setting if one was set + if ( $setting ) { + $setting_errors = array(); + foreach ( (array) $wp_settings_errors as $key => $details ) { + if ( $setting == $details['setting'] ) + $setting_errors[] = $wp_settings_errors[$key]; + } + return $setting_errors; + } + + return $wp_settings_errors; +} + +/** + * Display settings errors registered by add_settings_error() + * + * Part of the Settings API. Outputs a

    for each error retrieved by get_settings_errors(). + * + * This is called automatically after a settings page based on the Settings API is submitted. + * Errors should be added during the validation callback function for a setting defined in register_setting() + * + * The $sanitize option is passed into get_settings_errors() and will re-run the setting sanitization + * on its current value. + * + * The $hide_on_update option will cause errors to only show when the settings page is first loaded. + * if the user has already saved new values it will be hidden to avoid repeating messages already + * shown in the default error reporting after submission. This is useful to show general errors like missing + * settings when the user arrives at the settings page. + * + * @since 3.0.0 + * + * @param string $setting Optional slug title of a specific setting who's errors you want. + * @param boolean $sanitize Whether to re-sanitize the setting value before returning errors. + * @param boolean $hide_on_update If set to true errors will not be shown if the settings page has already been submitted. + */ +function settings_errors( $setting = '', $sanitize = false, $hide_on_update = false ) { + + if ( $hide_on_update && ! empty( $_GET['settings-updated'] ) ) + return; + + $settings_errors = get_settings_errors( $setting, $sanitize ); + + if ( empty( $settings_errors ) ) + return; + + $output = ''; + foreach ( $settings_errors as $key => $details ) { + $css_id = 'setting-error-' . $details['code']; + $css_class = $details['type'] . ' settings-error'; + $output .= "
    \n"; + $output .= "

    {$details['message']}

    "; + $output .= "
    \n"; + } + echo $output; +} + +/** + * {@internal Missing Short Description}} + * + * @since 2.7.0 + * + * @param unknown_type $found_action + */ +function find_posts_div($found_action = '') { +?> + +post_password ) ) + echo esc_attr( $post->post_password ); +} + +/** + * Get the post title. + * + * The post title is fetched and if it is blank then a default string is + * returned. + * + * @since 2.7.0 + * @param mixed $post Post id or object. If not supplied the global $post is used. + * @return string The post title if set + */ +function _draft_or_post_title( $post = 0 ) { + $title = get_the_title( $post ); + if ( empty( $title ) ) + $title = __( '(no title)' ); + return $title; +} + +/** + * Display the search query. + * + * A simple wrapper to display the "s" parameter in a GET URI. This function + * should only be used when {@link the_search_query()} cannot. + * + * @uses attr + * @since 2.7.0 + * + */ +function _admin_search_query() { + echo isset($_REQUEST['s']) ? esc_attr( wp_unslash( $_REQUEST['s'] ) ) : ''; +} + +/** + * Generic Iframe header for use with Thickbox + * + * @since 2.7.0 + * @param string $title Title of the Iframe page. + * @param bool $limit_styles Limit styles to colour-related styles only (unless others are enqueued). + * + */ +function iframe_header( $title = '', $limit_styles = false ) { + show_admin_bar( false ); + global $hook_suffix, $current_user, $admin_body_class, $wp_locale; + $admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix); + + $current_screen = get_current_screen(); + + @header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) ); + _wp_admin_html_begin(); +?> +<?php bloginfo('name') ?> › <?php echo $title ?> — <?php _e('WordPress'); ?> + + + + + + class="wp-admin wp-core-ui no-js iframe "> + + + + + + +post_password) ) + $post_states['protected'] = __('Password protected'); + if ( 'private' == $post->post_status && 'private' != $post_status ) + $post_states['private'] = __('Private'); + if ( 'draft' == $post->post_status && 'draft' != $post_status ) + $post_states['draft'] = __('Draft'); + if ( 'pending' == $post->post_status && 'pending' != $post_status ) + /* translators: post state */ + $post_states['pending'] = _x('Pending', 'post state'); + if ( is_sticky($post->ID) ) + $post_states['sticky'] = __('Sticky'); + + /** + * Filter the default post display states used in the Posts list table. + * + * @since 2.8.0 + * + * @param array $post_states An array of post display states. Values include 'Password protected', + * 'Private', 'Draft', 'Pending', and 'Sticky'. + * @param int $post The post ID. + */ + $post_states = apply_filters( 'display_post_states', $post_states, $post ); + + if ( ! empty($post_states) ) { + $state_count = count($post_states); + $i = 0; + echo ' - '; + foreach ( $post_states as $state ) { + ++$i; + ( $i == $state_count ) ? $sep = '' : $sep = ', '; + echo "$state$sep"; + } + } + +} + +function _media_states( $post ) { + $media_states = array(); + $stylesheet = get_option('stylesheet'); + + if ( current_theme_supports( 'custom-header') ) { + $meta_header = get_post_meta($post->ID, '_wp_attachment_is_custom_header', true ); + if ( ! empty( $meta_header ) && $meta_header == $stylesheet ) + $media_states[] = __( 'Header Image' ); + } + + if ( current_theme_supports( 'custom-background') ) { + $meta_background = get_post_meta($post->ID, '_wp_attachment_is_custom_background', true ); + if ( ! empty( $meta_background ) && $meta_background == $stylesheet ) + $media_states[] = __( 'Background Image' ); + } + + /** + * Filter the default media display states for items in the Media list table. + * + * @since 3.2.0 + * + * @param array $media_states An array of media states. Default 'Header Image', + * 'Background Image'. + */ + $media_states = apply_filters( 'display_media_states', $media_states ); + + if ( ! empty( $media_states ) ) { + $state_count = count( $media_states ); + $i = 0; + echo ' - '; + foreach ( $media_states as $state ) { + ++$i; + ( $i == $state_count ) ? $sep = '' : $sep = ', '; + echo "$state$sep"; + } + } +} + +/** + * Test support for compressing JavaScript from PHP + * + * Outputs JavaScript that tests if compression from PHP works as expected + * and sets an option with the result. Has no effect when the current user + * is not an administrator. To run the test again the option 'can_compress_scripts' + * has to be deleted. + * + * @since 2.8.0 + */ +function compression_test() { +?> + + '1' ). + * These attributes will be output as attribute="value", such as tabindex="1". + * Defaults to no other attributes. Other attributes can also be provided as a + * string such as 'tabindex="1"', though the array format is typically cleaner. + */ +function get_submit_button( $text = null, $type = 'primary large', $name = 'submit', $wrap = true, $other_attributes = null ) { + if ( ! is_array( $type ) ) + $type = explode( ' ', $type ); + + $button_shorthand = array( 'primary', 'small', 'large' ); + $classes = array( 'button' ); + foreach ( $type as $t ) { + if ( 'secondary' === $t || 'button-secondary' === $t ) + continue; + $classes[] = in_array( $t, $button_shorthand ) ? 'button-' . $t : $t; + } + $class = implode( ' ', array_unique( $classes ) ); + + if ( 'delete' === $type ) + $class = 'button-secondary delete'; + + $text = $text ? $text : __( 'Save Changes' ); + + // Default the id attribute to $name unless an id was specifically provided in $other_attributes + $id = $name; + if ( is_array( $other_attributes ) && isset( $other_attributes['id'] ) ) { + $id = $other_attributes['id']; + unset( $other_attributes['id'] ); + } + + $attributes = ''; + if ( is_array( $other_attributes ) ) { + foreach ( $other_attributes as $attribute => $value ) { + $attributes .= $attribute . '="' . esc_attr( $value ) . '" '; // Trailing space is important + } + } else if ( !empty( $other_attributes ) ) { // Attributes provided as a string + $attributes = $other_attributes; + } + + $button = ''; + + if ( $wrap ) { + $button = '

    ' . $button . '

    '; + } + + return $button; +} + +function _wp_admin_html_begin() { + global $is_IE; + + $admin_html_class = ( is_admin_bar_showing() ) ? 'wp-toolbar' : ''; + + if ( $is_IE ) + @header('X-UA-Compatible: IE=edge'); + +/** + * Fires inside the HTML tag in the admin header. + * + * @since 2.2.0 + */ +?> + + + + + > + + + + pointer_id ) + */ + + $registered_pointers = array( + 'post-new.php' => 'wp350_media', + 'post.php' => array( 'wp350_media', 'wp360_revisions' ), + 'edit.php' => 'wp360_locks', + 'widgets.php' => 'wp390_widgets', + 'themes.php' => 'wp390_widgets', + ); + + // Check if screen related pointer is registered + if ( empty( $registered_pointers[ $hook_suffix ] ) ) + return; + + $pointers = (array) $registered_pointers[ $hook_suffix ]; + + $caps_required = array( + 'wp350_media' => array( 'upload_files' ), + 'wp390_widgets' => array( 'edit_theme_options' ), + ); + + // Get dismissed pointers + $dismissed = explode( ',', (string) get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) ); + + $got_pointers = false; + foreach ( array_diff( $pointers, $dismissed ) as $pointer ) { + if ( isset( $caps_required[ $pointer ] ) ) { + foreach ( $caps_required[ $pointer ] as $cap ) { + if ( ! current_user_can( $cap ) ) + continue 2; + } + } + + // Bind pointer print function + add_action( 'admin_print_footer_scripts', array( 'WP_Internal_Pointers', 'pointer_' . $pointer ) ); + $got_pointers = true; + } + + if ( ! $got_pointers ) + return; + + // Add pointers script and style to queue + wp_enqueue_style( 'wp-pointer' ); + wp_enqueue_script( 'wp-pointer' ); + } + + /** + * Print the pointer javascript data. + * + * @since 3.3.0 + * + * @param string $pointer_id The pointer ID. + * @param string $selector The HTML elements, on which the pointer should be attached. + * @param array $args Arguments to be passed to the pointer JS (see wp-pointer.js). + */ + private static function print_js( $pointer_id, $selector, $args ) { + if ( empty( $pointer_id ) || empty( $selector ) || empty( $args ) || empty( $args['content'] ) ) + return; + + ?> + + ' . __( 'New Media Manager' ) . ''; + $content .= '

    ' . __( 'Uploading files and creating image galleries has a whole new look. Check it out!' ) . '

    '; + + self::print_js( 'wp350_media', '.insert-media', array( + 'content' => $content, + 'position' => array( 'edge' => is_rtl() ? 'right' : 'left', 'align' => 'center' ), + ) ); + } + + public static function pointer_wp360_revisions() { + $content = '

    ' . __( 'Compare Revisions' ) . '

    '; + $content .= '

    ' . __( 'View, compare, and restore other versions of this content on the improved revisions screen.' ) . '

    '; + + self::print_js( 'wp360_revisions', '.misc-pub-section.misc-pub-revisions', array( + 'content' => $content, + 'position' => array( 'edge' => is_rtl() ? 'left' : 'right', 'align' => 'center', 'my' => is_rtl() ? 'left' : 'right-14px' ), + ) ); + } + + public static function pointer_wp360_locks() { + if ( ! is_multi_author() ) { + return; + } + + $content = '

    ' . __( 'Edit Lock' ) . '

    '; + $content .= '

    ' . __( 'Someone else is editing this. No need to refresh; the lock will disappear when they’re done.' ) . '

    '; + + self::print_js( 'wp360_locks', 'tr.wp-locked .locked-indicator', array( + 'content' => $content, + 'position' => array( 'edge' => 'left', 'align' => 'left' ), + ) ); + } + + public static function pointer_wp390_widgets() { + if ( ! current_theme_supports( 'widgets' ) ) { + return; + } + + $content = '

    ' . __( 'New Feature: Live Widget Previews' ) . '

    '; + $content .= '

    ' . __( 'Add, edit, and play around with your widgets from the theme customizer.' ) . ' ' . __( 'Preview your changes in real-time and only save them when you’re ready.' ) . '

    '; + + if ( 'themes' === get_current_screen()->id ) { + $selector = '.theme.active .customize'; + $position = array( 'edge' => is_rtl() ? 'right' : 'left', 'align' => 'center', 'my' => is_rtl() ? 'right-13px' : '' ); + } else { + $selector = 'a[href="customize.php"]'; + if ( is_rtl() ) { + $position = array( 'edge' => 'right', 'align' => 'center', 'my' => 'right-5px' ); + } else { + $position = array( 'edge' => 'left', 'align' => 'center', 'my' => 'left-5px' ); + } + } + + self::print_js( 'wp390_widgets', $selector, array( + 'content' => $content, + 'position' => $position, + ) ); + } + + /** + * Prevents new users from seeing existing 'new feature' pointers. + * + * @since 3.3.0 + */ + public static function dismiss_pointers_for_new_users( $user_id ) { + add_user_meta( $user_id, 'dismissed_wp_pointers', 'wp350_media,wp360_revisions,wp360_locks,wp390_widgets' ); + } +} + +add_action( 'admin_enqueue_scripts', array( 'WP_Internal_Pointers', 'enqueue_scripts' ) ); +add_action( 'user_register', array( 'WP_Internal_Pointers', 'dismiss_pointers_for_new_users' ) ); + +/** + * Convert a screen string to a screen object + * + * @since 3.0.0 + * + * @param string $hook_name The hook name (also known as the hook suffix) used to determine the screen. + * @return WP_Screen Screen object. + */ +function convert_to_screen( $hook_name ) { + if ( ! class_exists( 'WP_Screen' ) ) { + _doing_it_wrong( 'convert_to_screen(), add_meta_box()', __( "Likely direct inclusion of wp-admin/includes/template.php in order to use add_meta_box(). This is very wrong. Hook the add_meta_box() call into the add_meta_boxes action instead." ), '3.3' ); + return (object) array( 'id' => '_invalid', 'base' => '_are_belong_to_us' ); + } + + return WP_Screen::get( $hook_name ); +} + +/** + * Output the HTML for restoring the post data from DOM storage + * + * @since 3.6.0 + * @access private + */ +function _local_storage_notice() { + ?> + + 0, + 'type' => 'rating', + 'number' => 0, + ); + $r = wp_parse_args( $args, $defaults ); + extract( $r, EXTR_SKIP ); + + // Non-english decimal places when the $rating is coming from a string + $rating = str_replace( ',', '.', $rating ); + + // Convert Percentage to star rating, 0..5 in .5 increments + if ( 'percent' == $type ) { + $rating = round( $rating / 10, 0 ) / 2; + } + + // Calculate the number of each type of star needed + $full_stars = floor( $rating ); + $half_stars = ceil( $rating - $full_stars ); + $empty_stars = 5 - $full_stars - $half_stars; + + if ( $number ) { + /* translators: 1: The rating, 2: The number of ratings */ + $title = _n( '%1$s rating based on %2$s rating', '%1$s rating based on %2$s ratings', $number ); + $title = sprintf( $title, number_format_i18n( $rating, 1 ), number_format_i18n( $number ) ); + } else { + /* translators: 1: The rating */ + $title = sprintf( __( '%s rating' ), number_format_i18n( $rating, 1 ) ); + } + + echo '
    '; + echo str_repeat( '
    ', $full_stars ); + echo str_repeat( '
    ', $half_stars ); + echo str_repeat( '
    ', $empty_stars); + echo '
    '; +} diff --git a/wp-admin/includes/theme-install.php b/wp-admin/includes/theme-install.php new file mode 100644 index 0000000..0a28e0f --- /dev/null +++ b/wp-admin/includes/theme-install.php @@ -0,0 +1,205 @@ + array('href' => array(), 'title' => array(), 'target' => array()), + 'abbr' => array('title' => array()), 'acronym' => array('title' => array()), + 'code' => array(), 'pre' => array(), 'em' => array(), 'strong' => array(), + 'div' => array(), 'p' => array(), 'ul' => array(), 'ol' => array(), 'li' => array(), + 'h1' => array(), 'h2' => array(), 'h3' => array(), 'h4' => array(), 'h5' => array(), 'h6' => array(), + 'img' => array('src' => array(), 'class' => array(), 'alt' => array()) +); + +$theme_field_defaults = array( 'description' => true, 'sections' => false, 'tested' => true, 'requires' => true, + 'rating' => true, 'downloaded' => true, 'downloadlink' => true, 'last_updated' => true, 'homepage' => true, + 'tags' => true, 'num_ratings' => true +); + +/** + * Retrieve list of WordPress theme features (aka theme tags) + * + * @since 2.8.0 + * + * @deprecated since 3.1.0 Use get_theme_feature_list() instead. + * + * @return array + */ +function install_themes_feature_list() { + _deprecated_function( __FUNCTION__, '3.1', 'get_theme_feature_list()' ); + + if ( !$cache = get_transient( 'wporg_theme_feature_list' ) ) + set_transient( 'wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS ); + + if ( $cache ) + return $cache; + + $feature_list = themes_api( 'feature_list', array() ); + if ( is_wp_error( $feature_list ) ) + return array(); + + set_transient( 'wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS ); + + return $feature_list; +} + +/** + * Display search form for searching themes. + * + * @since 2.8.0 + */ +function install_theme_search_form( $type_selector = true ) { + $type = isset( $_REQUEST['type'] ) ? wp_unslash( $_REQUEST['type'] ) : 'term'; + $term = isset( $_REQUEST['s'] ) ? wp_unslash( $_REQUEST['s'] ) : ''; + if ( ! $type_selector ) + echo '

    ' . __( 'Search for themes by keyword.' ) . '

    '; + ?> +
    + + + + + + + + + + +
    + +

    +

    + +
    + + '; + + foreach ( (array) $feature_list as $feature_name => $features ) { + $feature_name = esc_html( $feature_name ); + echo '
    ' . $feature_name . '
    '; + + echo '
      '; + foreach ( $features as $feature => $feature_name ) { + $feature_name = esc_html( $feature_name ); + $feature = esc_attr($feature); +?> + +
    1. + + +
    2. + + +
    +
    + + +
    +
    + + + +

    +
    + + + +
    + prepare_items(); + $wp_list_table->single_row( $theme ); +} + +/** + * Display theme content based on theme list. + * + * @since 2.8.0 + */ +function display_themes() { + global $wp_list_table; + + if ( ! isset( $wp_list_table ) ) { + $wp_list_table = _get_list_table('WP_Theme_Install_List_Table'); + } + $wp_list_table->prepare_items(); + $wp_list_table->display(); + +} +// add_action('install_themes_search', 'display_themes'); +// add_action('install_themes_featured', 'display_themes'); +// add_action('install_themes_new', 'display_themes'); +// add_action('install_themes_updated', 'display_themes'); + +/** + * Display theme information in dialog box form. + * + * @since 2.8.0 + */ +function install_theme_information() { + global $wp_list_table; + + $theme = themes_api( 'theme_information', array( 'slug' => wp_unslash( $_REQUEST['theme'] ) ) ); + + if ( is_wp_error( $theme ) ) + wp_die( $theme ); + + iframe_header( __('Theme Install') ); + if ( ! isset( $wp_list_table ) ) { + $wp_list_table = _get_list_table('WP_Theme_Install_List_Table'); + } + $wp_list_table->theme_installer_single( $theme ); + iframe_footer(); + exit; +} +add_action('install_themes_pre_theme-information', 'install_theme_information'); diff --git a/wp-admin/includes/theme.php b/wp-admin/includes/theme.php new file mode 100644 index 0000000..ab665f8 --- /dev/null +++ b/wp-admin/includes/theme.php @@ -0,0 +1,457 @@ +errors) && $wp_filesystem->errors->get_error_code() ) + return new WP_Error('fs_error', __('Filesystem error.'), $wp_filesystem->errors); + + //Get the base plugin folder + $themes_dir = $wp_filesystem->wp_themes_dir(); + if ( empty($themes_dir) ) + return new WP_Error('fs_no_themes_dir', __('Unable to locate WordPress theme directory.')); + + $themes_dir = trailingslashit( $themes_dir ); + $theme_dir = trailingslashit($themes_dir . $stylesheet); + $deleted = $wp_filesystem->delete($theme_dir, true); + + if ( ! $deleted ) + return new WP_Error('could_not_remove_theme', sprintf(__('Could not fully remove the theme %s.'), $stylesheet) ); + + // Force refresh of theme update information + delete_site_transient('update_themes'); + + return true; +} + +/** + * Get the Page Templates available in this theme + * + * @since 1.5.0 + * + * @param WP_Post|null $post Optional. The post being edited, provided for context. + * @return array Key is the template name, value is the filename of the template + */ +function get_page_templates( $post = null ) { + return array_flip( wp_get_theme()->get_page_templates( $post ) ); +} + +/** + * Tidies a filename for url display by the theme editor. + * + * @since 2.9.0 + * @access private + * + * @param string $fullpath Full path to the theme file + * @param string $containingfolder Path of the theme parent folder + * @return string + */ +function _get_template_edit_filename($fullpath, $containingfolder) { + return str_replace(dirname(dirname( $containingfolder )) , '', $fullpath); +} + +/** + * Check if there is an update for a theme available. + * + * Will display link, if there is an update available. + * + * @since 2.7.0 + * @see get_theme_update_available() + * + * @param object $theme Theme data object. + */ +function theme_update_available( $theme ) { + echo get_theme_update_available( $theme ); +} + +/** + * Retrieve the update link if there is a theme update available. + * + * Will return a link if there is an update available. + * + * @since 3.8.0 + * + * @param WP_Theme $theme WP_Theme object. + * @return string|bool HTML for the update link, or false if invalid info was passed. + */ +function get_theme_update_available( $theme ) { + static $themes_update; + + if ( !current_user_can('update_themes' ) ) + return false; + + if ( !isset($themes_update) ) + $themes_update = get_site_transient('update_themes'); + + if ( ! is_a( $theme, 'WP_Theme' ) ) + return false; + + $stylesheet = $theme->get_stylesheet(); + + $html = ''; + + if ( isset($themes_update->response[ $stylesheet ]) ) { + $update = $themes_update->response[ $stylesheet ]; + $theme_name = $theme->display('Name'); + $details_url = add_query_arg(array('TB_iframe' => 'true', 'width' => 1024, 'height' => 800), $update['url']); //Theme browser inside WP? replace this, Also, theme preview JS will override this on the available list. + $update_url = wp_nonce_url( admin_url( 'update.php?action=upgrade-theme&theme=' . urlencode( $stylesheet ) ), 'upgrade-theme_' . $stylesheet ); + $update_onclick = 'onclick="if ( confirm(\'' . esc_js( __("Updating this theme will lose any customizations you have made. 'Cancel' to stop, 'OK' to update.") ) . '\') ) {return true;}return false;"'; + + if ( !is_multisite() ) { + if ( ! current_user_can('update_themes') ) { + $html = sprintf( '

    ' . __( 'There is a new version of %1$s available. View version %4$s details.' ) . '

    ', + $theme_name, esc_url( $details_url ), esc_attr( $theme['Name'] ), $update['new_version'] ); + } else if ( empty( $update['package'] ) ) { + $html = sprintf( '

    ' . __( 'There is a new version of %1$s available. View version %4$s details. Automatic update is unavailable for this theme.' ) . '

    ', + $theme_name, esc_url( $details_url ), esc_attr( $theme['Name'] ), $update['new_version'] ); + } else { + $html = sprintf( '

    ' . __( 'There is a new version of %1$s available. View version %4$s details or update now.' ) . '

    ', + $theme_name, esc_url( $details_url ), esc_attr( $theme['Name'] ), $update['new_version'], $update_url, $update_onclick ); + } + } + } + + return $html; +} + +/** + * Retrieve list of WordPress theme features (aka theme tags) + * + * @since 3.1.0 + * + * @param bool $api Optional. Whether try to fetch tags from the WP.org API. Defaults to true. + * @return array Array of features keyed by category with translations keyed by slug. + */ +function get_theme_feature_list( $api = true ) { + // Hard-coded list is used if api not accessible. + $features = array( + __( 'Colors' ) => array( + 'black' => __( 'Black' ), + 'blue' => __( 'Blue' ), + 'brown' => __( 'Brown' ), + 'gray' => __( 'Gray' ), + 'green' => __( 'Green' ), + 'orange' => __( 'Orange' ), + 'pink' => __( 'Pink' ), + 'purple' => __( 'Purple' ), + 'red' => __( 'Red' ), + 'silver' => __( 'Silver' ), + 'tan' => __( 'Tan' ), + 'white' => __( 'White' ), + 'yellow' => __( 'Yellow' ), + 'dark' => __( 'Dark' ), + 'light' => __( 'Light' ), + ), + + __( 'Layout' ) => array( + 'fixed-layout' => __( 'Fixed Layout' ), + 'fluid-layout' => __( 'Fluid Layout' ), + 'responsive-layout' => __( 'Responsive Layout' ), + 'one-column' => __( 'One Column' ), + 'two-columns' => __( 'Two Columns' ), + 'three-columns' => __( 'Three Columns' ), + 'four-columns' => __( 'Four Columns' ), + 'left-sidebar' => __( 'Left Sidebar' ), + 'right-sidebar' => __( 'Right Sidebar' ), + ), + + __( 'Features' ) => array( + 'accessibility-ready' => __( 'Accessibility Ready' ), + 'blavatar' => __( 'Blavatar' ), + 'buddypress' => __( 'BuddyPress' ), + 'custom-background' => __( 'Custom Background' ), + 'custom-colors' => __( 'Custom Colors' ), + 'custom-header' => __( 'Custom Header' ), + 'custom-menu' => __( 'Custom Menu' ), + 'editor-style' => __( 'Editor Style' ), + 'featured-image-header' => __( 'Featured Image Header' ), + 'featured-images' => __( 'Featured Images' ), + 'flexible-header' => __( 'Flexible Header' ), + 'front-page-post-form' => __( 'Front Page Posting' ), + 'full-width-template' => __( 'Full Width Template' ), + 'microformats' => __( 'Microformats' ), + 'post-formats' => __( 'Post Formats' ), + 'rtl-language-support' => __( 'RTL Language Support' ), + 'sticky-post' => __( 'Sticky Post' ), + 'theme-options' => __( 'Theme Options' ), + 'threaded-comments' => __( 'Threaded Comments' ), + 'translation-ready' => __( 'Translation Ready' ), + ), + + __( 'Subject' ) => array( + 'holiday' => __( 'Holiday' ), + 'photoblogging' => __( 'Photoblogging' ), + 'seasonal' => __( 'Seasonal' ), + ) + ); + + if ( ! $api || ! current_user_can( 'install_themes' ) ) + return $features; + + if ( !$feature_list = get_site_transient( 'wporg_theme_feature_list' ) ) + set_site_transient( 'wporg_theme_feature_list', array(), 10800); + + if ( !$feature_list ) { + $feature_list = themes_api( 'feature_list', array() ); + if ( is_wp_error( $feature_list ) ) + return $features; + } + + if ( !$feature_list ) + return $features; + + set_site_transient( 'wporg_theme_feature_list', $feature_list, 10800 ); + + $category_translations = array( + 'Colors' => __( 'Colors' ), + 'Layout' => __( 'Layout' ), + 'Features' => __( 'Features' ), + 'Subject' => __( 'Subject' ) + ); + + // Loop over the wporg canonical list and apply translations + $wporg_features = array(); + foreach ( (array) $feature_list as $feature_category => $feature_items ) { + if ( isset($category_translations[$feature_category]) ) + $feature_category = $category_translations[$feature_category]; + $wporg_features[$feature_category] = array(); + + foreach ( $feature_items as $feature ) { + if ( isset($features[$feature_category][$feature]) ) + $wporg_features[$feature_category][$feature] = $features[$feature_category][$feature]; + else + $wporg_features[$feature_category][$feature] = $feature; + } + } + + return $wporg_features; +} + +/** + * Retrieve theme installer pages from WordPress Themes API. + * + * It is possible for a theme to override the Themes API result with three + * filters. Assume this is for themes, which can extend on the Theme Info to + * offer more choices. This is very powerful and must be used with care, when + * overridding the filters. + * + * The first filter, 'themes_api_args', is for the args and gives the action as + * the second parameter. The hook for 'themes_api_args' must ensure that an + * object is returned. + * + * The second filter, 'themes_api', is the result that would be returned. + * + * @since 2.8.0 + * + * @param string $action The requested action. Likely values are 'theme_information', + * 'feature_list', or 'query_themes'. + * @param array|object $args Optional. Arguments to serialize for the Theme Info API. + * @return mixed + */ + function themes_api( $action, $args = null ) { + + if ( is_array($args) ) + $args = (object)$args; + + if ( !isset($args->per_page) ) + $args->per_page = 24; + /** + * Filter arguments used to query for installer pages from the WordPress.org Themes API. + * + * Important: An object MUST be returned to this filter. + * + * @since 2.8.0 + * + * @param object $args Arguments used to query for installer pages from the WordPress.org Themes API. + * @param string $action Requested action. Likely values are 'theme_information', + * 'feature_list', or 'query_themes'. + */ + $args = apply_filters( 'themes_api_args', $args, $action ); + + /** + * Filter whether to override the WordPress.org Themes API. + * + * Returning a value of true to this filter allows a theme to completely + * override the built-in WordPress.org API. + * + * @since 2.8.0 + * + * @param bool $bool Whether to override the WordPress.org Themes API. Default false. + * @param string $action Requested action. Likely values are 'theme_information', + * 'feature_list', or 'query_themes'. + * @param object $args Arguments used to query for installer pages from the Themes API. + */ + $res = apply_filters( 'themes_api', false, $action, $args ); + + if ( ! $res ) { + $url = $http_url = 'http://api.wordpress.org/themes/info/1.0/'; + if ( $ssl = wp_http_supports( array( 'ssl' ) ) ) + $url = set_url_scheme( $url, 'https' ); + + $args = array( + 'body' => array( + 'action' => $action, + 'request' => serialize( $args ) + ) + ); + $request = wp_remote_post( $url, $args ); + + if ( $ssl && is_wp_error( $request ) ) { + if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) { + trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE ); + } + $request = wp_remote_post( $http_url, $args ); + } + + if ( is_wp_error($request) ) { + $res = new WP_Error('themes_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ), $request->get_error_message() ); + } else { + $res = maybe_unserialize( wp_remote_retrieve_body( $request ) ); + if ( ! is_object( $res ) && ! is_array( $res ) ) + $res = new WP_Error('themes_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ), wp_remote_retrieve_body( $request ) ); + } + } + + /** + * Filter the returned WordPress.org Themes API response. + * + * @since 2.8.0 + * + * @param array|object $res WordPress.org Themes API response. + * @param string $action Requested action. Likely values are 'theme_information', + * 'feature_list', or 'query_themes'. + * @param object $args Arguments used to query for installer pages from the WordPress.org Themes API. + */ + return apply_filters( 'themes_api_result', $res, $action, $args ); +} + +/** + * Prepare themes for JavaScript. + * + * @since 3.8.0 + * + * @param array $themes Optional. Array of WP_Theme objects to prepare. + * Defaults to all allowed themes. + * + * @return array An associative array of theme data, sorted by name. + */ +function wp_prepare_themes_for_js( $themes = null ) { + $current_theme = get_stylesheet(); + + // Make sure the current theme is listed first. + $prepared_themes = array( $current_theme => array() ); + + if ( null === $themes ) { + $themes = wp_get_themes( array( 'allowed' => true ) ); + if ( ! isset( $themes[ $current_theme ] ) ) { + $themes[ $current_theme ] = wp_get_theme(); + } + } + + $updates = array(); + if ( current_user_can( 'update_themes' ) ) { + $updates_transient = get_site_transient( 'update_themes' ); + if ( isset( $updates_transient->response ) ) { + $updates = $updates_transient->response; + } + } + + WP_Theme::sort_by_name( $themes ); + foreach ( $themes as $theme ) { + $parent = false; + if ( $theme->parent() ) { + $parent = $theme->parent()->display( 'Name' ); + } + + $slug = $theme->get_stylesheet(); + $encoded_slug = urlencode( $slug ); + + $prepared_themes[ $slug ] = array( + 'id' => $slug, + 'name' => $theme->display( 'Name' ), + 'screenshot' => array( $theme->get_screenshot() ), // @todo multiple + 'description' => $theme->display( 'Description' ), + 'author' => $theme->display( 'Author', false, true ), + 'authorAndUri' => $theme->display( 'Author' ), + 'version' => $theme->display( 'Version' ), + 'tags' => $theme->display( 'Tags' ), + 'parent' => $parent, + 'active' => $slug === $current_theme, + 'hasUpdate' => isset( $updates[ $slug ] ), + 'update' => get_theme_update_available( $theme ), + 'actions' => array( + 'activate' => current_user_can( 'switch_themes' ) ? wp_nonce_url( admin_url( 'themes.php?action=activate&stylesheet=' . $encoded_slug ), 'switch-theme_' . $slug ) : null, + 'customize'=> current_user_can( 'edit_theme_options' ) ? wp_customize_url( $slug ) : null, + 'preview' => add_query_arg( array( + 'preview' => 1, + 'template' => urlencode( $theme->get_template() ), + 'stylesheet' => urlencode( $slug ), + 'preview_iframe' => true, + 'TB_iframe' => true, + ), home_url( '/' ) ), + 'delete' => current_user_can( 'delete_themes' ) ? wp_nonce_url( admin_url( 'themes.php?action=delete&stylesheet=' . $encoded_slug ), 'delete-theme_' . $slug ) : null, + ), + ); + } + + /** + * Filter the themes prepared for JavaScript, for themes.php. + * + * Could be useful for changing the order, which is by name by default. + * + * @since 3.8.0 + * + * @param array $prepared_themes Array of themes. + */ + $prepared_themes = apply_filters( 'wp_prepare_themes_for_js', $prepared_themes ); + return array_values( $prepared_themes ); +} diff --git a/wp-admin/includes/update-core.php b/wp-admin/includes/update-core.php new file mode 100644 index 0000000..52f2171 --- /dev/null +++ b/wp-admin/includes/update-core.php @@ -0,0 +1,1148 @@ + Introduced version + * Directories should be noted by suffixing it with a trailing slash (/) + * + * @since 3.2.0 + * @global array $_new_bundled_files + * @var array + * @name $_new_bundled_files + */ +global $_new_bundled_files; + +$_new_bundled_files = array( + 'plugins/akismet/' => '2.0', + 'themes/twentyten/' => '3.0', + 'themes/twentyeleven/' => '3.2', + 'themes/twentytwelve/' => '3.5', + 'themes/twentythirteen/' => '3.6', + 'themes/twentyfourteen/' => '3.8', +); + +/** + * Upgrade the core of WordPress. + * + * This will create a .maintenance file at the base of the WordPress directory + * to ensure that people can not access the web site, when the files are being + * copied to their locations. + * + * The files in the {@link $_old_files} list will be removed and the new files + * copied from the zip file after the database is upgraded. + * + * The files in the {@link $_new_bundled_files} list will be added to the installation + * if the version is greater than or equal to the old version being upgraded. + * + * The steps for the upgrader for after the new release is downloaded and + * unzipped is: + * 1. Test unzipped location for select files to ensure that unzipped worked. + * 2. Create the .maintenance file in current WordPress base. + * 3. Copy new WordPress directory over old WordPress files. + * 4. Upgrade WordPress to new version. + * 4.1. Copy all files/folders other than wp-content + * 4.2. Copy any language files to WP_LANG_DIR (which may differ from WP_CONTENT_DIR + * 4.3. Copy any new bundled themes/plugins to their respective locations + * 5. Delete new WordPress directory path. + * 6. Delete .maintenance file. + * 7. Remove old files. + * 8. Delete 'update_core' option. + * + * There are several areas of failure. For instance if PHP times out before step + * 6, then you will not be able to access any portion of your site. Also, since + * the upgrade will not continue where it left off, you will not be able to + * automatically remove old files and remove the 'update_core' option. This + * isn't that bad. + * + * If the copy of the new WordPress over the old fails, then the worse is that + * the new WordPress directory will remain. + * + * If it is assumed that every file will be copied over, including plugins and + * themes, then if you edit the default theme, you should rename it, so that + * your changes remain. + * + * @since 2.7.0 + * + * @param string $from New release unzipped path. + * @param string $to Path to old WordPress installation. + * @return WP_Error|null WP_Error on failure, null on success. + */ +function update_core($from, $to) { + global $wp_filesystem, $_old_files, $_new_bundled_files, $wpdb; + + @set_time_limit( 300 ); + + /** + * Filter feedback messages displayed during the core update process. + * + * The filter is first evaluated after the zip file for the latest version + * has been downloaded and unzipped. It is evaluated five more times during + * the process: + * + * 1. Before WordPress begins the core upgrade process. + * 2. Before Maintenance Mode is enabled. + * 3. Before WordPress begins copying over the necessary files. + * 4. Before Maintenance Mode is disabled. + * 5. Before the database is upgraded. + * + * @since 2.5.0 + * + * @param string $feedback The core update feedback messages. + */ + apply_filters( 'update_feedback', __( 'Verifying the unpacked files…' ) ); + + // Sanity check the unzipped distribution. + $distro = ''; + $roots = array( '/wordpress/', '/wordpress-mu/' ); + foreach ( $roots as $root ) { + if ( $wp_filesystem->exists( $from . $root . 'readme.html' ) && $wp_filesystem->exists( $from . $root . 'wp-includes/version.php' ) ) { + $distro = $root; + break; + } + } + if ( ! $distro ) { + $wp_filesystem->delete( $from, true ); + return new WP_Error( 'insane_distro', __('The update could not be unpacked') ); + } + + // Import $wp_version, $required_php_version, and $required_mysql_version from the new version + // $wp_filesystem->wp_content_dir() returned unslashed pre-2.8 + $versions_file = trailingslashit( $wp_filesystem->wp_content_dir() ) . 'upgrade/version-current.php'; + if ( ! $wp_filesystem->copy( $from . $distro . 'wp-includes/version.php', $versions_file ) ) { + $wp_filesystem->delete( $from, true ); + return new WP_Error( 'copy_failed_for_version_file', __( 'The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.' ), 'wp-includes/version.php' ); + } + + $wp_filesystem->chmod( $versions_file, FS_CHMOD_FILE ); + require( WP_CONTENT_DIR . '/upgrade/version-current.php' ); + $wp_filesystem->delete( $versions_file ); + + $php_version = phpversion(); + $mysql_version = $wpdb->db_version(); + $old_wp_version = $GLOBALS['wp_version']; // The version of WordPress we're updating from + $development_build = ( false !== strpos( $old_wp_version . $wp_version, '-' ) ); // a dash in the version indicates a Development release + $php_compat = version_compare( $php_version, $required_php_version, '>=' ); + if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) ) + $mysql_compat = true; + else + $mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ); + + if ( !$mysql_compat || !$php_compat ) + $wp_filesystem->delete($from, true); + + if ( !$mysql_compat && !$php_compat ) + return new WP_Error( 'php_mysql_not_compatible', sprintf( __('The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version ) ); + elseif ( !$php_compat ) + return new WP_Error( 'php_not_compatible', sprintf( __('The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.'), $wp_version, $required_php_version, $php_version ) ); + elseif ( !$mysql_compat ) + return new WP_Error( 'mysql_not_compatible', sprintf( __('The update cannot be installed because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.'), $wp_version, $required_mysql_version, $mysql_version ) ); + + /** This filter is documented in wp-admin/includes/update-core.php */ + apply_filters( 'update_feedback', __( 'Preparing to install the latest version…' ) ); + + // Don't copy wp-content, we'll deal with that below + // We also copy version.php last so failed updates report their old version + $skip = array( 'wp-content', 'wp-includes/version.php' ); + $check_is_writable = array(); + + // Check to see which files don't really need updating - only available for 3.7 and higher + if ( function_exists( 'get_core_checksums' ) ) { + // Find the local version of the working directory + $working_dir_local = WP_CONTENT_DIR . '/upgrade/' . basename( $from ) . $distro; + + $checksums = get_core_checksums( $wp_version, isset( $wp_local_package ) ? $wp_local_package : 'en_US' ); + if ( is_array( $checksums ) && isset( $checksums[ $wp_version ] ) ) + $checksums = $checksums[ $wp_version ]; // Compat code for 3.7-beta2 + if ( is_array( $checksums ) ) { + foreach( $checksums as $file => $checksum ) { + if ( 'wp-content' == substr( $file, 0, 10 ) ) + continue; + if ( ! file_exists( ABSPATH . $file ) ) + continue; + if ( ! file_exists( $working_dir_local . $file ) ) + continue; + if ( md5_file( ABSPATH . $file ) === $checksum ) + $skip[] = $file; + else + $check_is_writable[ $file ] = ABSPATH . $file; + } + } + } + + // If we're using the direct method, we can predict write failures that are due to permissions. + if ( $check_is_writable && 'direct' === $wp_filesystem->method ) { + $files_writable = array_filter( $check_is_writable, array( $wp_filesystem, 'is_writable' ) ); + if ( $files_writable !== $check_is_writable ) { + $files_not_writable = array_diff_key( $check_is_writable, $files_writable ); + foreach ( $files_not_writable as $relative_file_not_writable => $file_not_writable ) { + // If the writable check failed, chmod file to 0644 and try again, same as copy_dir(). + $wp_filesystem->chmod( $file_not_writable, FS_CHMOD_FILE ); + if ( $wp_filesystem->is_writable( $file_not_writable ) ) + unset( $files_not_writable[ $relative_file_not_writable ] ); + } + + // Store package-relative paths (the key) of non-writable files in the WP_Error object. + $error_data = version_compare( $old_wp_version, '3.7-beta2', '>' ) ? array_keys( $files_not_writable ) : ''; + + if ( $files_not_writable ) + return new WP_Error( 'files_not_writable', __( 'The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.' ), implode( ', ', $error_data ) ); + } + } + + /** This filter is documented in wp-admin/includes/update-core.php */ + apply_filters( 'update_feedback', __( 'Enabling Maintenance mode…' ) ); + // Create maintenance file to signal that we are upgrading + $maintenance_string = ''; + $maintenance_file = $to . '.maintenance'; + $wp_filesystem->delete($maintenance_file); + $wp_filesystem->put_contents($maintenance_file, $maintenance_string, FS_CHMOD_FILE); + + /** This filter is documented in wp-admin/includes/update-core.php */ + apply_filters( 'update_feedback', __( 'Copying the required files…' ) ); + // Copy new versions of WP files into place. + $result = _copy_dir( $from . $distro, $to, $skip ); + if ( is_wp_error( $result ) ) + $result = new WP_Error( $result->get_error_code(), $result->get_error_message(), substr( $result->get_error_data(), strlen( $to ) ) ); + + // Since we know the core files have copied over, we can now copy the version file + if ( ! is_wp_error( $result ) ) { + if ( ! $wp_filesystem->copy( $from . $distro . 'wp-includes/version.php', $to . 'wp-includes/version.php', true /* overwrite */ ) ) { + $wp_filesystem->delete( $from, true ); + $result = new WP_Error( 'copy_failed_for_version_file', __( 'The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.' ), 'wp-includes/version.php' ); + } + $wp_filesystem->chmod( $to . 'wp-includes/version.php', FS_CHMOD_FILE ); + } + + // Check to make sure everything copied correctly, ignoring the contents of wp-content + $skip = array( 'wp-content' ); + $failed = array(); + if ( isset( $checksums ) && is_array( $checksums ) ) { + foreach ( $checksums as $file => $checksum ) { + if ( 'wp-content' == substr( $file, 0, 10 ) ) + continue; + if ( ! file_exists( $working_dir_local . $file ) ) + continue; + if ( file_exists( ABSPATH . $file ) && md5_file( ABSPATH . $file ) == $checksum ) + $skip[] = $file; + else + $failed[] = $file; + } + } + + // Some files didn't copy properly + if ( ! empty( $failed ) ) { + $total_size = 0; + foreach ( $failed as $file ) { + if ( file_exists( $working_dir_local . $file ) ) + $total_size += filesize( $working_dir_local . $file ); + } + + // If we don't have enough free space, it isn't worth trying again. + // Unlikely to be hit due to the check in unzip_file(). + $available_space = @disk_free_space( ABSPATH ); + if ( $available_space && $total_size >= $available_space ) { + $result = new WP_Error( 'disk_full', __( 'There is not enough free disk space to complete the update.' ) ); + } else { + $result = _copy_dir( $from . $distro, $to, $skip ); + if ( is_wp_error( $result ) ) + $result = new WP_Error( $result->get_error_code() . '_retry', $result->get_error_message(), substr( $result->get_error_data(), strlen( $to ) ) ); + } + } + + // Custom Content Directory needs updating now. + // Copy Languages + if ( !is_wp_error($result) && $wp_filesystem->is_dir($from . $distro . 'wp-content/languages') ) { + if ( WP_LANG_DIR != ABSPATH . WPINC . '/languages' || @is_dir(WP_LANG_DIR) ) + $lang_dir = WP_LANG_DIR; + else + $lang_dir = WP_CONTENT_DIR . '/languages'; + + if ( !@is_dir($lang_dir) && 0 === strpos($lang_dir, ABSPATH) ) { // Check the language directory exists first + $wp_filesystem->mkdir($to . str_replace(ABSPATH, '', $lang_dir), FS_CHMOD_DIR); // If it's within the ABSPATH we can handle it here, otherwise they're out of luck. + clearstatcache(); // for FTP, Need to clear the stat cache + } + + if ( @is_dir($lang_dir) ) { + $wp_lang_dir = $wp_filesystem->find_folder($lang_dir); + if ( $wp_lang_dir ) { + $result = copy_dir($from . $distro . 'wp-content/languages/', $wp_lang_dir); + if ( is_wp_error( $result ) ) + $result = new WP_Error( $result->get_error_code() . '_languages', $result->get_error_message(), substr( $result->get_error_data(), strlen( $wp_lang_dir ) ) ); + } + } + } + + /** This filter is documented in wp-admin/includes/update-core.php */ + apply_filters( 'update_feedback', __( 'Disabling Maintenance mode…' ) ); + // Remove maintenance file, we're done with potential site-breaking changes + $wp_filesystem->delete( $maintenance_file ); + + // 3.5 -> 3.5+ - an empty twentytwelve directory was created upon upgrade to 3.5 for some users, preventing installation of Twenty Twelve. + if ( '3.5' == $old_wp_version ) { + if ( is_dir( WP_CONTENT_DIR . '/themes/twentytwelve' ) && ! file_exists( WP_CONTENT_DIR . '/themes/twentytwelve/style.css' ) ) { + $wp_filesystem->delete( $wp_filesystem->wp_themes_dir() . 'twentytwelve/' ); + } + } + + // Copy New bundled plugins & themes + // This gives us the ability to install new plugins & themes bundled with future versions of WordPress whilst avoiding the re-install upon upgrade issue. + // $development_build controls us overwriting bundled themes and plugins when a non-stable release is being updated + if ( !is_wp_error($result) && ( ! defined('CORE_UPGRADE_SKIP_NEW_BUNDLED') || ! CORE_UPGRADE_SKIP_NEW_BUNDLED ) ) { + foreach ( (array) $_new_bundled_files as $file => $introduced_version ) { + // If a $development_build or if $introduced version is greater than what the site was previously running + if ( $development_build || version_compare( $introduced_version, $old_wp_version, '>' ) ) { + $directory = ('/' == $file[ strlen($file)-1 ]); + list($type, $filename) = explode('/', $file, 2); + + // Check to see if the bundled items exist before attempting to copy them + if ( ! $wp_filesystem->exists( $from . $distro . 'wp-content/' . $file ) ) + continue; + + if ( 'plugins' == $type ) + $dest = $wp_filesystem->wp_plugins_dir(); + elseif ( 'themes' == $type ) + $dest = trailingslashit($wp_filesystem->wp_themes_dir()); // Back-compat, ::wp_themes_dir() did not return trailingslash'd pre-3.2 + else + continue; + + if ( ! $directory ) { + if ( ! $development_build && $wp_filesystem->exists( $dest . $filename ) ) + continue; + + if ( ! $wp_filesystem->copy($from . $distro . 'wp-content/' . $file, $dest . $filename, FS_CHMOD_FILE) ) + $result = new WP_Error( "copy_failed_for_new_bundled_$type", __( 'Could not copy file.' ), $dest . $filename ); + } else { + if ( ! $development_build && $wp_filesystem->is_dir( $dest . $filename ) ) + continue; + + $wp_filesystem->mkdir($dest . $filename, FS_CHMOD_DIR); + $_result = copy_dir( $from . $distro . 'wp-content/' . $file, $dest . $filename); + + // If a error occurs partway through this final step, keep the error flowing through, but keep process going. + if ( is_wp_error( $_result ) ) { + if ( ! is_wp_error( $result ) ) + $result = new WP_Error; + $result->add( $_result->get_error_code() . "_$type", $_result->get_error_message(), substr( $_result->get_error_data(), strlen( $dest ) ) ); + } + } + } + } //end foreach + } + + // Handle $result error from the above blocks + if ( is_wp_error($result) ) { + $wp_filesystem->delete($from, true); + return $result; + } + + // Remove old files + foreach ( $_old_files as $old_file ) { + $old_file = $to . $old_file; + if ( !$wp_filesystem->exists($old_file) ) + continue; + $wp_filesystem->delete($old_file, true); + } + + // Upgrade DB with separate request + /** This filter is documented in wp-admin/includes/update-core.php */ + apply_filters( 'update_feedback', __( 'Upgrading database…' ) ); + $db_upgrade_url = admin_url('upgrade.php?step=upgrade_db'); + wp_remote_post($db_upgrade_url, array('timeout' => 60)); + + // Clear the cache to prevent an update_option() from saving a stale db_version to the cache + wp_cache_flush(); + // (Not all cache backends listen to 'flush') + wp_cache_delete( 'alloptions', 'options' ); + + // Remove working directory + $wp_filesystem->delete($from, true); + + // Force refresh of update information + if ( function_exists('delete_site_transient') ) + delete_site_transient('update_core'); + else + delete_option('update_core'); + + /** + * Fires after WordPress core has been successfully updated. + * + * @since 3.3.0 + * + * @param string $wp_version The current WordPress version. + */ + do_action( '_core_updated_successfully', $wp_version ); + + // Clear the option that blocks auto updates after failures, now that we've been successful. + if ( function_exists( 'delete_site_option' ) ) + delete_site_option( 'auto_core_update_failed' ); + + return $wp_version; +} + +/** + * Copies a directory from one location to another via the WordPress Filesystem Abstraction. + * Assumes that WP_Filesystem() has already been called and setup. + * + * This is a temporary function for the 3.1 -> 3.2 upgrade, as well as for those upgrading to + * 3.7+ + * + * @ignore + * @since 3.2.0 + * @since 3.7.0 Updated not to use a regular expression for the skip list + * @see copy_dir() + * + * @param string $from source directory + * @param string $to destination directory + * @param array $skip_list a list of files/folders to skip copying + * @return mixed WP_Error on failure, True on success. + */ +function _copy_dir($from, $to, $skip_list = array() ) { + global $wp_filesystem; + + $dirlist = $wp_filesystem->dirlist($from); + + $from = trailingslashit($from); + $to = trailingslashit($to); + + foreach ( (array) $dirlist as $filename => $fileinfo ) { + if ( in_array( $filename, $skip_list ) ) + continue; + + if ( 'f' == $fileinfo['type'] ) { + if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true, FS_CHMOD_FILE) ) { + // If copy failed, chmod file to 0644 and try again. + $wp_filesystem->chmod( $to . $filename, FS_CHMOD_FILE ); + if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true, FS_CHMOD_FILE) ) + return new WP_Error( 'copy_failed__copy_dir', __( 'Could not copy file.' ), $to . $filename ); + } + } elseif ( 'd' == $fileinfo['type'] ) { + if ( !$wp_filesystem->is_dir($to . $filename) ) { + if ( !$wp_filesystem->mkdir($to . $filename, FS_CHMOD_DIR) ) + return new WP_Error( 'mkdir_failed__copy_dir', __( 'Could not create directory.' ), $to . $filename ); + } + + // generate the $sub_skip_list for the subdirectory as a sub-set of the existing $skip_list + $sub_skip_list = array(); + foreach ( $skip_list as $skip_item ) { + if ( 0 === strpos( $skip_item, $filename . '/' ) ) + $sub_skip_list[] = preg_replace( '!^' . preg_quote( $filename, '!' ) . '/!i', '', $skip_item ); + } + + $result = _copy_dir($from . $filename, $to . $filename, $sub_skip_list); + if ( is_wp_error($result) ) + return $result; + } + } + return true; +} + +/** + * Redirect to the About WordPress page after a successful upgrade. + * + * This function is only needed when the existing install is older than 3.4.0. + * + * @since 3.3.0 + * + */ +function _redirect_to_about_wordpress( $new_version ) { + global $wp_version, $pagenow, $action; + + if ( version_compare( $wp_version, '3.4-RC1', '>=' ) ) + return; + + // Ensure we only run this on the update-core.php page. The Core_Upgrader may be used in other contexts. + if ( 'update-core.php' != $pagenow ) + return; + + if ( 'do-core-upgrade' != $action && 'do-core-reinstall' != $action ) + return; + + // Load the updated default text localization domain for new strings + load_default_textdomain(); + + // See do_core_upgrade() + show_message( __('WordPress updated successfully') ); + + // self_admin_url() won't exist when upgrading from <= 3.0, so relative URLs are intentional. + show_message( '' . sprintf( __( 'Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click here.' ), $new_version, 'about.php?updated' ) . '' ); + show_message( '' . sprintf( __( 'Welcome to WordPress %1$s. Learn more.' ), $new_version, 'about.php?updated' ) . '' ); + echo '
    '; + ?> + + 'latest' ); + return $updates[0]; +} + +/** + * Get available core updates. + * + * @param array $options Set $options['dismissed'] to true to show dismissed upgrades too, + * set $options['available'] to false to skip not-dismissed updates. + * @return bool|array Array of the update objects on success, false on failure. + */ +function get_core_updates( $options = array() ) { + $options = array_merge( array( 'available' => true, 'dismissed' => false ), $options ); + $dismissed = get_site_option( 'dismissed_update_core' ); + + if ( ! is_array( $dismissed ) ) + $dismissed = array(); + + $from_api = get_site_transient( 'update_core' ); + + if ( ! isset( $from_api->updates ) || ! is_array( $from_api->updates ) ) + return false; + + $updates = $from_api->updates; + $result = array(); + foreach ( $updates as $update ) { + if ( $update->response == 'autoupdate' ) + continue; + + if ( array_key_exists( $update->current . '|' . $update->locale, $dismissed ) ) { + if ( $options['dismissed'] ) { + $update->dismissed = true; + $result[] = $update; + } + } else { + if ( $options['available'] ) { + $update->dismissed = false; + $result[] = $update; + } + } + } + return $result; +} + +/** + * Gets the best available (and enabled) Auto-Update for WordPress Core. + * + * If there's 1.2.3 and 1.3 on offer, it'll choose 1.3 if the install allows it, else, 1.2.3 + * + * @since 3.7.0 + * + * @return bool|array False on failure, otherwise the core update offering. + */ +function find_core_auto_update() { + $updates = get_site_transient( 'update_core' ); + if ( ! $updates || empty( $updates->updates ) ) + return false; + + include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; + + $auto_update = false; + $upgrader = new WP_Automatic_Updater; + foreach ( $updates->updates as $update ) { + if ( 'autoupdate' != $update->response ) + continue; + + if ( ! $upgrader->should_update( 'core', $update, ABSPATH ) ) + continue; + + if ( ! $auto_update || version_compare( $update->current, $auto_update->current, '>' ) ) + $auto_update = $update; + } + return $auto_update; +} + +/** + * Gets and caches the checksums for the given version of WordPress. + * + * @since 3.7.0 + * + * @param string $version Version string to query. + * @param string $locale Locale to query. + * @return bool|array False on failure. An array of checksums on success. + */ +function get_core_checksums( $version, $locale ) { + $return = array(); + + $url = $http_url = 'http://api.wordpress.org/core/checksums/1.0/?' . http_build_query( compact( 'version', 'locale' ), null, '&' ); + + if ( $ssl = wp_http_supports( array( 'ssl' ) ) ) + $url = set_url_scheme( $url, 'https' ); + + $options = array( + 'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3 ), + ); + + $response = wp_remote_get( $url, $options ); + if ( $ssl && is_wp_error( $response ) ) { + trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE ); + $response = wp_remote_get( $http_url, $options ); + } + + if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) + return false; + + $body = trim( wp_remote_retrieve_body( $response ) ); + $body = json_decode( $body, true ); + + if ( ! is_array( $body ) || ! isset( $body['checksums'] ) || ! is_array( $body['checksums'] ) ) + return false; + + return $body['checksums']; +} + +function dismiss_core_update( $update ) { + $dismissed = get_site_option( 'dismissed_update_core' ); + $dismissed[ $update->current . '|' . $update->locale ] = true; + return update_site_option( 'dismissed_update_core', $dismissed ); +} + +function undismiss_core_update( $version, $locale ) { + $dismissed = get_site_option( 'dismissed_update_core' ); + $key = $version . '|' . $locale; + + if ( ! isset( $dismissed[$key] ) ) + return false; + + unset( $dismissed[$key] ); + return update_site_option( 'dismissed_update_core', $dismissed ); +} + +function find_core_update( $version, $locale ) { + $from_api = get_site_transient( 'update_core' ); + + if ( ! isset( $from_api->updates ) || ! is_array( $from_api->updates ) ) + return false; + + $updates = $from_api->updates; + foreach ( $updates as $update ) { + if ( $update->current == $version && $update->locale == $locale ) + return $update; + } + return false; +} + +function core_update_footer( $msg = '' ) { + if ( !current_user_can('update_core') ) + return sprintf( __( 'Version %s' ), get_bloginfo( 'version', 'display' ) ); + + $cur = get_preferred_from_update_core(); + if ( ! is_object( $cur ) ) + $cur = new stdClass; + + if ( ! isset( $cur->current ) ) + $cur->current = ''; + + if ( ! isset( $cur->url ) ) + $cur->url = ''; + + if ( ! isset( $cur->response ) ) + $cur->response = ''; + + switch ( $cur->response ) { + case 'development' : + return sprintf( __( 'You are using a development version (%1$s). Cool! Please stay updated.' ), get_bloginfo( 'version', 'display' ), network_admin_url( 'update-core.php' ) ); + break; + + case 'upgrade' : + return sprintf( ''.__( 'Get Version %2$s' ).'', network_admin_url( 'update-core.php' ), $cur->current); + break; + + case 'latest' : + default : + return sprintf( __( 'Version %s' ), get_bloginfo( 'version', 'display' ) ); + break; + } +} +add_filter( 'update_footer', 'core_update_footer' ); + +function update_nag() { + if ( is_multisite() && !current_user_can('update_core') ) + return false; + + global $pagenow; + + if ( 'update-core.php' == $pagenow ) + return; + + $cur = get_preferred_from_update_core(); + + if ( ! isset( $cur->response ) || $cur->response != 'upgrade' ) + return false; + + if ( current_user_can('update_core') ) { + $msg = sprintf( __('WordPress %1$s is available! Please update now.'), $cur->current, network_admin_url( 'update-core.php' ) ); + } else { + $msg = sprintf( __('WordPress %1$s is available! Please notify the site administrator.'), $cur->current ); + } + echo "
    $msg
    "; +} +add_action( 'admin_notices', 'update_nag', 3 ); +add_action( 'network_admin_notices', 'update_nag', 3 ); + +// Called directly from dashboard +function update_right_now_message() { + $theme_name = wp_get_theme(); + if ( current_user_can( 'switch_themes' ) ) { + $theme_name = sprintf( '%1$s', $theme_name ); + } + + $msg = sprintf( __( 'WordPress %1$s running %2$s theme.' ), get_bloginfo( 'version', 'display' ), $theme_name ); + + if ( current_user_can('update_core') ) { + $cur = get_preferred_from_update_core(); + + if ( isset( $cur->response ) && $cur->response == 'upgrade' ) + $msg .= " " . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . ''; + } + + echo "

    $msg

    "; +} + +function get_plugin_updates() { + $all_plugins = get_plugins(); + $upgrade_plugins = array(); + $current = get_site_transient( 'update_plugins' ); + foreach ( (array)$all_plugins as $plugin_file => $plugin_data) { + if ( isset( $current->response[ $plugin_file ] ) ) { + $upgrade_plugins[ $plugin_file ] = (object) $plugin_data; + $upgrade_plugins[ $plugin_file ]->update = $current->response[ $plugin_file ]; + } + } + + return $upgrade_plugins; +} + +function wp_plugin_update_rows() { + if ( !current_user_can('update_plugins' ) ) + return; + + $plugins = get_site_transient( 'update_plugins' ); + if ( isset($plugins->response) && is_array($plugins->response) ) { + $plugins = array_keys( $plugins->response ); + foreach( $plugins as $plugin_file ) { + add_action( "after_plugin_row_$plugin_file", 'wp_plugin_update_row', 10, 2 ); + } + } +} +add_action( 'admin_init', 'wp_plugin_update_rows' ); + +function wp_plugin_update_row( $file, $plugin_data ) { + $current = get_site_transient( 'update_plugins' ); + if ( !isset( $current->response[ $file ] ) ) + return false; + + $r = $current->response[ $file ]; + + $plugins_allowedtags = array('a' => array('href' => array(),'title' => array()),'abbr' => array('title' => array()),'acronym' => array('title' => array()),'code' => array(),'em' => array(),'strong' => array()); + $plugin_name = wp_kses( $plugin_data['Name'], $plugins_allowedtags ); + + $details_url = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $r->slug . '§ion=changelog&TB_iframe=true&width=600&height=800'); + + $wp_list_table = _get_list_table('WP_Plugins_List_Table'); + + if ( is_network_admin() || !is_multisite() ) { + echo '
    '; + + if ( ! current_user_can('update_plugins') ) + printf( __('There is a new version of %1$s available. View version %4$s details.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version ); + else if ( empty($r->package) ) + printf( __('There is a new version of %1$s available. View version %4$s details. Automatic update is unavailable for this plugin.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version ); + else + printf( __('There is a new version of %1$s available. View version %4$s details or update now.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version, wp_nonce_url( self_admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file) ); + + /** + * Fires at the end of the update message container in each + * row of the plugins list table. + * + * The dynamic portion of the hook name, $file, refers to the path + * of the plugin's primary file relative to the plugins directory. + * + * @since 2.8.0 + * + * @param array $plugin_data { + * An array of plugin metadata. + * + * @type string $name The human-readable name of the plugin. + * @type string $plugin_uri Plugin URI. + * @type string $version Plugin version. + * @type string $description Plugin description. + * @type string $author Plugin author. + * @type string $author_uri Plugin author URI. + * @type string $text_domain Plugin text domain. + * @type string $domain_path Relative path to the plugin's .mo file(s). + * @type bool $network Whether the plugin can only be activated network wide. + * @type string $title The human-readable title of the plugin. + * @type string $author_name Plugin author's name. + * @type bool $update Whether there's an available update. Default null. + * } + * @param array $r { + * An array of metadata about the available plugin update. + * + * @type int $id Plugin ID. + * @type string $slug Plugin slug. + * @type string $new_version New plugin version. + * @type string $url Plugin URL. + * @type string $package Plugin update package URL. + * } + */ + do_action( "in_plugin_update_message-{$file}", $plugin_data, $r ); + + echo '
    '; + } +} + +function get_theme_updates() { + $themes = wp_get_themes(); + $current = get_site_transient('update_themes'); + + if ( ! isset( $current->response ) ) + return array(); + + $update_themes = array(); + foreach ( $current->response as $stylesheet => $data ) { + $update_themes[ $stylesheet ] = wp_get_theme( $stylesheet ); + $update_themes[ $stylesheet ]->update = $data; + } + + return $update_themes; +} + +function wp_theme_update_rows() { + if ( !current_user_can('update_themes' ) ) + return; + + $themes = get_site_transient( 'update_themes' ); + if ( isset($themes->response) && is_array($themes->response) ) { + $themes = array_keys( $themes->response ); + + foreach( $themes as $theme ) { + add_action( "after_theme_row_$theme", 'wp_theme_update_row', 10, 2 ); + } + } +} +add_action( 'admin_init', 'wp_theme_update_rows' ); + +function wp_theme_update_row( $theme_key, $theme ) { + $current = get_site_transient( 'update_themes' ); + if ( !isset( $current->response[ $theme_key ] ) ) + return false; + $r = $current->response[ $theme_key ]; + $themes_allowedtags = array('a' => array('href' => array(),'title' => array()),'abbr' => array('title' => array()),'acronym' => array('title' => array()),'code' => array(),'em' => array(),'strong' => array()); + $theme_name = wp_kses( $theme['Name'], $themes_allowedtags ); + + $details_url = add_query_arg( array( 'TB_iframe' => 'true', 'width' => 1024, 'height' => 800 ), $current->response[ $theme_key ]['url'] ); + + $wp_list_table = _get_list_table('WP_MS_Themes_List_Table'); + + echo '
    '; + if ( ! current_user_can('update_themes') ) + printf( __('There is a new version of %1$s available. View version %4$s details.'), $theme['Name'], esc_url($details_url), esc_attr($theme['Name']), $r->new_version ); + else if ( empty( $r['package'] ) ) + printf( __('There is a new version of %1$s available. View version %4$s details. Automatic update is unavailable for this theme.'), $theme['Name'], esc_url($details_url), esc_attr($theme['Name']), $r['new_version'] ); + else + printf( __('There is a new version of %1$s available. View version %4$s details or update now.'), $theme['Name'], esc_url($details_url), esc_attr($theme['Name']), $r['new_version'], wp_nonce_url( self_admin_url('update.php?action=upgrade-theme&theme=') . $theme_key, 'upgrade-theme_' . $theme_key) ); + + /** + * Fires at the end of the update message container in each + * row of the themes list table. + * + * The dynamic portion of the hook name, $theme_key, refers to + * the theme slug as found in the WordPress.org themes repository. + * + * @since 3.1.0 + * + * @param WP_Theme $theme The WP_Theme object. + * @param array $r { + * An array of metadata about the available theme update. + * + * @type string $new_version New theme version. + * @type string $url Theme URL. + * @type string $package Theme update package URL. + * } + */ + do_action( "in_theme_update_message-{$theme_key}", $theme, $r ); + + echo '
    '; +} + +function maintenance_nag() { + include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version + global $upgrading; + $nag = isset( $upgrading ); + if ( ! $nag ) { + $failed = get_site_option( 'auto_core_update_failed' ); + /* + * If an update failed critically, we may have copied over version.php but not other files. + * In that case, if the install claims we're running the version we attempted, nag. + * This is serious enough to err on the side of nagging. + * + * If we simply failed to update before we tried to copy any files, then assume things are + * OK if they are now running the latest. + * + * This flag is cleared whenever a successful update occurs using Core_Upgrader. + */ + $comparison = ! empty( $failed['critical'] ) ? '>=' : '>'; + if ( version_compare( $failed['attempted'], $wp_version, $comparison ) ) + $nag = true; + } + + if ( ! $nag ) + return false; + + if ( current_user_can('update_core') ) + $msg = sprintf( __('An automated WordPress update has failed to complete - please attempt the update again now.'), 'update-core.php' ); + else + $msg = __('An automated WordPress update has failed to complete! Please notify the site administrator.'); + + echo "
    $msg
    "; +} +add_action( 'admin_notices', 'maintenance_nag' ); +add_action( 'network_admin_notices', 'maintenance_nag' ); diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php new file mode 100644 index 0000000..4a853fe --- /dev/null +++ b/wp-admin/includes/upgrade.php @@ -0,0 +1,2128 @@ +Note that password carefully! It is a random password that was generated just for you.'); + $user_id = wp_create_user($user_name, $user_password, $user_email); + update_user_option($user_id, 'default_password_nag', true, true); + $email_password = true; + } else if ( !$user_id ) { + // Password has been provided + $message = ''.__('Your chosen password.').''; + $user_id = wp_create_user($user_name, $user_password, $user_email); + } else { + $message = __('User already exists. Password inherited.'); + } + + $user = new WP_User($user_id); + $user->set_role('administrator'); + + wp_install_defaults($user_id); + + flush_rewrite_rules(); + + wp_new_blog_notification($blog_title, $guessurl, $user_id, ($email_password ? $user_password : __('The password you chose during the install.') ) ); + + wp_cache_flush(); + + /** + * Fires after a site is fully installed. + * + * @since 3.9.0 + * + * @param WP_User $user The site owner. + */ + do_action( 'wp_install', $user ); + + return array('url' => $guessurl, 'user_id' => $user_id, 'password' => $user_password, 'password_message' => $message); +} +endif; + +if ( !function_exists('wp_install_defaults') ) : +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since 2.1.0 + * + * @param int $user_id User ID. + */ +function wp_install_defaults( $user_id ) { + global $wpdb, $wp_rewrite, $table_prefix; + + // Default category + $cat_name = __('Uncategorized'); + /* translators: Default category slug */ + $cat_slug = sanitize_title(_x('Uncategorized', 'Default category slug')); + + if ( global_terms_enabled() ) { + $cat_id = $wpdb->get_var( $wpdb->prepare( "SELECT cat_ID FROM {$wpdb->sitecategories} WHERE category_nicename = %s", $cat_slug ) ); + if ( $cat_id == null ) { + $wpdb->insert( $wpdb->sitecategories, array('cat_ID' => 0, 'cat_name' => $cat_name, 'category_nicename' => $cat_slug, 'last_updated' => current_time('mysql', true)) ); + $cat_id = $wpdb->insert_id; + } + update_option('default_category', $cat_id); + } else { + $cat_id = 1; + } + + $wpdb->insert( $wpdb->terms, array('term_id' => $cat_id, 'name' => $cat_name, 'slug' => $cat_slug, 'term_group' => 0) ); + $wpdb->insert( $wpdb->term_taxonomy, array('term_id' => $cat_id, 'taxonomy' => 'category', 'description' => '', 'parent' => 0, 'count' => 1)); + $cat_tt_id = $wpdb->insert_id; + + // First post + $now = date('Y-m-d H:i:s'); + $now_gmt = gmdate('Y-m-d H:i:s'); + $first_post_guid = get_option('home') . '/?p=1'; + + if ( is_multisite() ) { + $first_post = get_site_option( 'first_post' ); + + if ( empty($first_post) ) + $first_post = __( 'Welcome to SITE_NAME. This is your first post. Edit or delete it, then start blogging!' ); + + $first_post = str_replace( "SITE_URL", esc_url( network_home_url() ), $first_post ); + $first_post = str_replace( "SITE_NAME", get_current_site()->site_name, $first_post ); + } else { + $first_post = __('Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!'); + } + + $wpdb->insert( $wpdb->posts, array( + 'post_author' => $user_id, + 'post_date' => $now, + 'post_date_gmt' => $now_gmt, + 'post_content' => $first_post, + 'post_excerpt' => '', + 'post_title' => __('Hello world!'), + /* translators: Default post slug */ + 'post_name' => sanitize_title( _x('hello-world', 'Default post slug') ), + 'post_modified' => $now, + 'post_modified_gmt' => $now_gmt, + 'guid' => $first_post_guid, + 'comment_count' => 1, + 'to_ping' => '', + 'pinged' => '', + 'post_content_filtered' => '' + )); + $wpdb->insert( $wpdb->term_relationships, array('term_taxonomy_id' => $cat_tt_id, 'object_id' => 1) ); + + // Default comment + $first_comment_author = __('Mr WordPress'); + $first_comment_url = 'https://wordpress.org/'; + $first_comment = __('Hi, this is a comment. +To delete a comment, just log in and view the post's comments. There you will have the option to edit or delete them.'); + if ( is_multisite() ) { + $first_comment_author = get_site_option( 'first_comment_author', $first_comment_author ); + $first_comment_url = get_site_option( 'first_comment_url', network_home_url() ); + $first_comment = get_site_option( 'first_comment', $first_comment ); + } + $wpdb->insert( $wpdb->comments, array( + 'comment_post_ID' => 1, + 'comment_author' => $first_comment_author, + 'comment_author_email' => '', + 'comment_author_url' => $first_comment_url, + 'comment_date' => $now, + 'comment_date_gmt' => $now_gmt, + 'comment_content' => $first_comment + )); + + // First Page + $first_page = sprintf( __( "This is an example page. It's different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this: + +
    Hi there! I'm a bike messenger by day, aspiring actor by night, and this is my blog. I live in Los Angeles, have a great dog named Jack, and I like piña coladas. (And gettin' caught in the rain.)
    + +...or something like this: + +
    The XYZ Doohickey Company was founded in 1971, and has been providing quality doohickeys to the public ever since. Located in Gotham City, XYZ employs over 2,000 people and does all kinds of awesome things for the Gotham community.
    + +As a new WordPress user, you should go to your dashboard to delete this page and create new pages for your content. Have fun!" ), admin_url() ); + if ( is_multisite() ) + $first_page = get_site_option( 'first_page', $first_page ); + $first_post_guid = get_option('home') . '/?page_id=2'; + $wpdb->insert( $wpdb->posts, array( + 'post_author' => $user_id, + 'post_date' => $now, + 'post_date_gmt' => $now_gmt, + 'post_content' => $first_page, + 'post_excerpt' => '', + 'post_title' => __( 'Sample Page' ), + /* translators: Default page slug */ + 'post_name' => __( 'sample-page' ), + 'post_modified' => $now, + 'post_modified_gmt' => $now_gmt, + 'guid' => $first_post_guid, + 'post_type' => 'page', + 'to_ping' => '', + 'pinged' => '', + 'post_content_filtered' => '' + )); + $wpdb->insert( $wpdb->postmeta, array( 'post_id' => 2, 'meta_key' => '_wp_page_template', 'meta_value' => 'default' ) ); + + // Set up default widgets for default theme. + update_option( 'widget_search', array ( 2 => array ( 'title' => '' ), '_multiwidget' => 1 ) ); + update_option( 'widget_recent-posts', array ( 2 => array ( 'title' => '', 'number' => 5 ), '_multiwidget' => 1 ) ); + update_option( 'widget_recent-comments', array ( 2 => array ( 'title' => '', 'number' => 5 ), '_multiwidget' => 1 ) ); + update_option( 'widget_archives', array ( 2 => array ( 'title' => '', 'count' => 0, 'dropdown' => 0 ), '_multiwidget' => 1 ) ); + update_option( 'widget_categories', array ( 2 => array ( 'title' => '', 'count' => 0, 'hierarchical' => 0, 'dropdown' => 0 ), '_multiwidget' => 1 ) ); + update_option( 'widget_meta', array ( 2 => array ( 'title' => '' ), '_multiwidget' => 1 ) ); + update_option( 'sidebars_widgets', array ( 'wp_inactive_widgets' => array (), 'sidebar-1' => array ( 0 => 'search-2', 1 => 'recent-posts-2', 2 => 'recent-comments-2', 3 => 'archives-2', 4 => 'categories-2', 5 => 'meta-2', ), 'sidebar-2' => array (), 'sidebar-3' => array (), 'array_version' => 3 ) ); + + if ( ! is_multisite() ) + update_user_meta( $user_id, 'show_welcome_panel', 1 ); + elseif ( ! is_super_admin( $user_id ) && ! metadata_exists( 'user', $user_id, 'show_welcome_panel' ) ) + update_user_meta( $user_id, 'show_welcome_panel', 2 ); + + if ( is_multisite() ) { + // Flush rules to pick up the new page. + $wp_rewrite->init(); + $wp_rewrite->flush_rules(); + + $user = new WP_User($user_id); + $wpdb->update( $wpdb->options, array('option_value' => $user->user_email), array('option_name' => 'admin_email') ); + + // Remove all perms except for the login user. + $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id != %d AND meta_key = %s", $user_id, $table_prefix.'user_level') ); + $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id != %d AND meta_key = %s", $user_id, $table_prefix.'capabilities') ); + + // Delete any caps that snuck into the previously active blog. (Hardcoded to blog 1 for now.) TODO: Get previous_blog_id. + if ( !is_super_admin( $user_id ) && $user_id != 1 ) + $wpdb->delete( $wpdb->usermeta, array( 'user_id' => $user_id , 'meta_key' => $wpdb->base_prefix.'1_capabilities' ) ); + } +} +endif; + +if ( !function_exists('wp_new_blog_notification') ) : +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since 2.1.0 + * + * @param string $blog_title Blog title. + * @param string $blog_url Blog url. + * @param int $user_id User ID. + * @param string $password User's Password. + */ +function wp_new_blog_notification($blog_title, $blog_url, $user_id, $password) { + $user = new WP_User( $user_id ); + $email = $user->user_email; + $name = $user->user_login; + $message = sprintf(__("Your new WordPress site has been successfully set up at: + +%1\$s + +You can log in to the administrator account with the following information: + +Username: %2\$s +Password: %3\$s + +We hope you enjoy your new site. Thanks! + +--The WordPress Team +https://wordpress.org/ +"), $blog_url, $name, $password); + + @wp_mail($email, __('New WordPress Site'), $message); +} +endif; + +if ( !function_exists('wp_upgrade') ) : +/** + * Run WordPress Upgrade functions. + * + * {@internal Missing Long Description}} + * + * @since 2.1.0 + * + * @return null + */ +function wp_upgrade() { + global $wp_current_db_version, $wp_db_version, $wpdb; + + $wp_current_db_version = __get_option('db_version'); + + // We are up-to-date. Nothing to do. + if ( $wp_db_version == $wp_current_db_version ) + return; + + if ( ! is_blog_installed() ) + return; + + wp_check_mysql_version(); + wp_cache_flush(); + pre_schema_upgrade(); + make_db_current_silent(); + upgrade_all(); + if ( is_multisite() && is_main_site() ) + upgrade_network(); + wp_cache_flush(); + + if ( is_multisite() ) { + if ( $wpdb->get_row( "SELECT blog_id FROM {$wpdb->blog_versions} WHERE blog_id = '{$wpdb->blogid}'" ) ) + $wpdb->query( "UPDATE {$wpdb->blog_versions} SET db_version = '{$wp_db_version}' WHERE blog_id = '{$wpdb->blogid}'" ); + else + $wpdb->query( "INSERT INTO {$wpdb->blog_versions} ( `blog_id` , `db_version` , `last_updated` ) VALUES ( '{$wpdb->blogid}', '{$wp_db_version}', NOW());" ); + } + + /** + * Fires after a site is fully upgraded. + * + * @since 3.9.0 + * + * @param int $wp_db_version The new $wp_db_version. + * @param int $wp_current_db_version The old (current) $wp_db_version. + */ + do_action( 'wp_upgrade', $wp_db_version, $wp_current_db_version ); +} +endif; + +/** + * Functions to be called in install and upgrade scripts. + * + * {@internal Missing Long Description}} + * + * @since 1.0.1 + */ +function upgrade_all() { + global $wp_current_db_version, $wp_db_version; + $wp_current_db_version = __get_option('db_version'); + + // We are up-to-date. Nothing to do. + if ( $wp_db_version == $wp_current_db_version ) + return; + + // If the version is not set in the DB, try to guess the version. + if ( empty($wp_current_db_version) ) { + $wp_current_db_version = 0; + + // If the template option exists, we have 1.5. + $template = __get_option('template'); + if ( !empty($template) ) + $wp_current_db_version = 2541; + } + + if ( $wp_current_db_version < 6039 ) + upgrade_230_options_table(); + + populate_options(); + + if ( $wp_current_db_version < 2541 ) { + upgrade_100(); + upgrade_101(); + upgrade_110(); + upgrade_130(); + } + + if ( $wp_current_db_version < 3308 ) + upgrade_160(); + + if ( $wp_current_db_version < 4772 ) + upgrade_210(); + + if ( $wp_current_db_version < 4351 ) + upgrade_old_slugs(); + + if ( $wp_current_db_version < 5539 ) + upgrade_230(); + + if ( $wp_current_db_version < 6124 ) + upgrade_230_old_tables(); + + if ( $wp_current_db_version < 7499 ) + upgrade_250(); + + if ( $wp_current_db_version < 7935 ) + upgrade_252(); + + if ( $wp_current_db_version < 8201 ) + upgrade_260(); + + if ( $wp_current_db_version < 8989 ) + upgrade_270(); + + if ( $wp_current_db_version < 10360 ) + upgrade_280(); + + if ( $wp_current_db_version < 11958 ) + upgrade_290(); + + if ( $wp_current_db_version < 15260 ) + upgrade_300(); + + if ( $wp_current_db_version < 19389 ) + upgrade_330(); + + if ( $wp_current_db_version < 20080 ) + upgrade_340(); + + if ( $wp_current_db_version < 22422 ) + upgrade_350(); + + if ( $wp_current_db_version < 25824 ) + upgrade_370(); + + if ( $wp_current_db_version < 26148 ) + upgrade_372(); + + if ( $wp_current_db_version < 26691 ) + upgrade_380(); + + maybe_disable_link_manager(); + + maybe_disable_automattic_widgets(); + + update_option( 'db_version', $wp_db_version ); + update_option( 'db_upgraded', true ); +} + +/** + * Execute changes made in WordPress 1.0. + * + * @since 1.0.0 + */ +function upgrade_100() { + global $wpdb; + + // Get the title and ID of every post, post_name to check if it already has a value + $posts = $wpdb->get_results("SELECT ID, post_title, post_name FROM $wpdb->posts WHERE post_name = ''"); + if ($posts) { + foreach($posts as $post) { + if ('' == $post->post_name) { + $newtitle = sanitize_title($post->post_title); + $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET post_name = %s WHERE ID = %d", $newtitle, $post->ID) ); + } + } + } + + $categories = $wpdb->get_results("SELECT cat_ID, cat_name, category_nicename FROM $wpdb->categories"); + foreach ($categories as $category) { + if ('' == $category->category_nicename) { + $newtitle = sanitize_title($category->cat_name); + $wpdb->update( $wpdb->categories, array('category_nicename' => $newtitle), array('cat_ID' => $category->cat_ID) ); + } + } + + $wpdb->query("UPDATE $wpdb->options SET option_value = REPLACE(option_value, 'wp-links/links-images/', 'wp-images/links/') + WHERE option_name LIKE 'links_rating_image%' + AND option_value LIKE 'wp-links/links-images/%'"); + + $done_ids = $wpdb->get_results("SELECT DISTINCT post_id FROM $wpdb->post2cat"); + if ($done_ids) : + foreach ($done_ids as $done_id) : + $done_posts[] = $done_id->post_id; + endforeach; + $catwhere = ' AND ID NOT IN (' . implode(',', $done_posts) . ')'; + else: + $catwhere = ''; + endif; + + $allposts = $wpdb->get_results("SELECT ID, post_category FROM $wpdb->posts WHERE post_category != '0' $catwhere"); + if ($allposts) : + foreach ($allposts as $post) { + // Check to see if it's already been imported + $cat = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->post2cat WHERE post_id = %d AND category_id = %d", $post->ID, $post->post_category) ); + if (!$cat && 0 != $post->post_category) { // If there's no result + $wpdb->insert( $wpdb->post2cat, array('post_id' => $post->ID, 'category_id' => $post->post_category) ); + } + } + endif; +} + +/** + * Execute changes made in WordPress 1.0.1. + * + * @since 1.0.1 + */ +function upgrade_101() { + global $wpdb; + + // Clean up indices, add a few + add_clean_index($wpdb->posts, 'post_name'); + add_clean_index($wpdb->posts, 'post_status'); + add_clean_index($wpdb->categories, 'category_nicename'); + add_clean_index($wpdb->comments, 'comment_approved'); + add_clean_index($wpdb->comments, 'comment_post_ID'); + add_clean_index($wpdb->links , 'link_category'); + add_clean_index($wpdb->links , 'link_visible'); +} + +/** + * Execute changes made in WordPress 1.2. + * + * @since 1.2.0 + */ +function upgrade_110() { + global $wpdb; + + // Set user_nicename. + $users = $wpdb->get_results("SELECT ID, user_nickname, user_nicename FROM $wpdb->users"); + foreach ($users as $user) { + if ('' == $user->user_nicename) { + $newname = sanitize_title($user->user_nickname); + $wpdb->update( $wpdb->users, array('user_nicename' => $newname), array('ID' => $user->ID) ); + } + } + + $users = $wpdb->get_results("SELECT ID, user_pass from $wpdb->users"); + foreach ($users as $row) { + if (!preg_match('/^[A-Fa-f0-9]{32}$/', $row->user_pass)) { + $wpdb->update( $wpdb->users, array('user_pass' => md5($row->user_pass)), array('ID' => $row->ID) ); + } + } + + // Get the GMT offset, we'll use that later on + $all_options = get_alloptions_110(); + + $time_difference = $all_options->time_difference; + + $server_time = time()+date('Z'); + $weblogger_time = $server_time + $time_difference * HOUR_IN_SECONDS; + $gmt_time = time(); + + $diff_gmt_server = ($gmt_time - $server_time) / HOUR_IN_SECONDS; + $diff_weblogger_server = ($weblogger_time - $server_time) / HOUR_IN_SECONDS; + $diff_gmt_weblogger = $diff_gmt_server - $diff_weblogger_server; + $gmt_offset = -$diff_gmt_weblogger; + + // Add a gmt_offset option, with value $gmt_offset + add_option('gmt_offset', $gmt_offset); + + // Check if we already set the GMT fields (if we did, then + // MAX(post_date_gmt) can't be '0000-00-00 00:00:00' + // I just slapped myself silly for not thinking about it earlier + $got_gmt_fields = ! ($wpdb->get_var("SELECT MAX(post_date_gmt) FROM $wpdb->posts") == '0000-00-00 00:00:00'); + + if (!$got_gmt_fields) { + + // Add or subtract time to all dates, to get GMT dates + $add_hours = intval($diff_gmt_weblogger); + $add_minutes = intval(60 * ($diff_gmt_weblogger - $add_hours)); + $wpdb->query("UPDATE $wpdb->posts SET post_date_gmt = DATE_ADD(post_date, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE)"); + $wpdb->query("UPDATE $wpdb->posts SET post_modified = post_date"); + $wpdb->query("UPDATE $wpdb->posts SET post_modified_gmt = DATE_ADD(post_modified, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE) WHERE post_modified != '0000-00-00 00:00:00'"); + $wpdb->query("UPDATE $wpdb->comments SET comment_date_gmt = DATE_ADD(comment_date, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE)"); + $wpdb->query("UPDATE $wpdb->users SET user_registered = DATE_ADD(user_registered, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE)"); + } + +} + +/** + * Execute changes made in WordPress 1.5. + * + * @since 1.5.0 + */ +function upgrade_130() { + global $wpdb; + + // Remove extraneous backslashes. + $posts = $wpdb->get_results("SELECT ID, post_title, post_content, post_excerpt, guid, post_date, post_name, post_status, post_author FROM $wpdb->posts"); + if ($posts) { + foreach($posts as $post) { + $post_content = addslashes(deslash($post->post_content)); + $post_title = addslashes(deslash($post->post_title)); + $post_excerpt = addslashes(deslash($post->post_excerpt)); + if ( empty($post->guid) ) + $guid = get_permalink($post->ID); + else + $guid = $post->guid; + + $wpdb->update( $wpdb->posts, compact('post_title', 'post_content', 'post_excerpt', 'guid'), array('ID' => $post->ID) ); + + } + } + + // Remove extraneous backslashes. + $comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_content FROM $wpdb->comments"); + if ($comments) { + foreach($comments as $comment) { + $comment_content = deslash($comment->comment_content); + $comment_author = deslash($comment->comment_author); + + $wpdb->update($wpdb->comments, compact('comment_content', 'comment_author'), array('comment_ID' => $comment->comment_ID) ); + } + } + + // Remove extraneous backslashes. + $links = $wpdb->get_results("SELECT link_id, link_name, link_description FROM $wpdb->links"); + if ($links) { + foreach($links as $link) { + $link_name = deslash($link->link_name); + $link_description = deslash($link->link_description); + + $wpdb->update( $wpdb->links, compact('link_name', 'link_description'), array('link_id' => $link->link_id) ); + } + } + + $active_plugins = __get_option('active_plugins'); + + // If plugins are not stored in an array, they're stored in the old + // newline separated format. Convert to new format. + if ( !is_array( $active_plugins ) ) { + $active_plugins = explode("\n", trim($active_plugins)); + update_option('active_plugins', $active_plugins); + } + + // Obsolete tables + $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'optionvalues'); + $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'optiontypes'); + $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'optiongroups'); + $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'optiongroup_options'); + + // Update comments table to use comment_type + $wpdb->query("UPDATE $wpdb->comments SET comment_type='trackback', comment_content = REPLACE(comment_content, '', '') WHERE comment_content LIKE '%'"); + $wpdb->query("UPDATE $wpdb->comments SET comment_type='pingback', comment_content = REPLACE(comment_content, '', '') WHERE comment_content LIKE '%'"); + + // Some versions have multiple duplicate option_name rows with the same values + $options = $wpdb->get_results("SELECT option_name, COUNT(option_name) AS dupes FROM `$wpdb->options` GROUP BY option_name"); + foreach ( $options as $option ) { + if ( 1 != $option->dupes ) { // Could this be done in the query? + $limit = $option->dupes - 1; + $dupe_ids = $wpdb->get_col( $wpdb->prepare("SELECT option_id FROM $wpdb->options WHERE option_name = %s LIMIT %d", $option->option_name, $limit) ); + if ( $dupe_ids ) { + $dupe_ids = join($dupe_ids, ','); + $wpdb->query("DELETE FROM $wpdb->options WHERE option_id IN ($dupe_ids)"); + } + } + } + + make_site_theme(); +} + +/** + * Execute changes made in WordPress 2.0. + * + * @since 2.0.0 + */ +function upgrade_160() { + global $wpdb, $wp_current_db_version; + + populate_roles_160(); + + $users = $wpdb->get_results("SELECT * FROM $wpdb->users"); + foreach ( $users as $user ) : + if ( !empty( $user->user_firstname ) ) + update_user_meta( $user->ID, 'first_name', wp_slash($user->user_firstname) ); + if ( !empty( $user->user_lastname ) ) + update_user_meta( $user->ID, 'last_name', wp_slash($user->user_lastname) ); + if ( !empty( $user->user_nickname ) ) + update_user_meta( $user->ID, 'nickname', wp_slash($user->user_nickname) ); + if ( !empty( $user->user_level ) ) + update_user_meta( $user->ID, $wpdb->prefix . 'user_level', $user->user_level ); + if ( !empty( $user->user_icq ) ) + update_user_meta( $user->ID, 'icq', wp_slash($user->user_icq) ); + if ( !empty( $user->user_aim ) ) + update_user_meta( $user->ID, 'aim', wp_slash($user->user_aim) ); + if ( !empty( $user->user_msn ) ) + update_user_meta( $user->ID, 'msn', wp_slash($user->user_msn) ); + if ( !empty( $user->user_yim ) ) + update_user_meta( $user->ID, 'yim', wp_slash($user->user_icq) ); + if ( !empty( $user->user_description ) ) + update_user_meta( $user->ID, 'description', wp_slash($user->user_description) ); + + if ( isset( $user->user_idmode ) ): + $idmode = $user->user_idmode; + if ($idmode == 'nickname') $id = $user->user_nickname; + if ($idmode == 'login') $id = $user->user_login; + if ($idmode == 'firstname') $id = $user->user_firstname; + if ($idmode == 'lastname') $id = $user->user_lastname; + if ($idmode == 'namefl') $id = $user->user_firstname.' '.$user->user_lastname; + if ($idmode == 'namelf') $id = $user->user_lastname.' '.$user->user_firstname; + if (!$idmode) $id = $user->user_nickname; + $wpdb->update( $wpdb->users, array('display_name' => $id), array('ID' => $user->ID) ); + endif; + + // FIXME: RESET_CAPS is temporary code to reset roles and caps if flag is set. + $caps = get_user_meta( $user->ID, $wpdb->prefix . 'capabilities'); + if ( empty($caps) || defined('RESET_CAPS') ) { + $level = get_user_meta($user->ID, $wpdb->prefix . 'user_level', true); + $role = translate_level_to_role($level); + update_user_meta( $user->ID, $wpdb->prefix . 'capabilities', array($role => true) ); + } + + endforeach; + $old_user_fields = array( 'user_firstname', 'user_lastname', 'user_icq', 'user_aim', 'user_msn', 'user_yim', 'user_idmode', 'user_ip', 'user_domain', 'user_browser', 'user_description', 'user_nickname', 'user_level' ); + $wpdb->hide_errors(); + foreach ( $old_user_fields as $old ) + $wpdb->query("ALTER TABLE $wpdb->users DROP $old"); + $wpdb->show_errors(); + + // populate comment_count field of posts table + $comments = $wpdb->get_results( "SELECT comment_post_ID, COUNT(*) as c FROM $wpdb->comments WHERE comment_approved = '1' GROUP BY comment_post_ID" ); + if ( is_array( $comments ) ) + foreach ($comments as $comment) + $wpdb->update( $wpdb->posts, array('comment_count' => $comment->c), array('ID' => $comment->comment_post_ID) ); + + // Some alpha versions used a post status of object instead of attachment and put + // the mime type in post_type instead of post_mime_type. + if ( $wp_current_db_version > 2541 && $wp_current_db_version <= 3091 ) { + $objects = $wpdb->get_results("SELECT ID, post_type FROM $wpdb->posts WHERE post_status = 'object'"); + foreach ($objects as $object) { + $wpdb->update( $wpdb->posts, array( 'post_status' => 'attachment', + 'post_mime_type' => $object->post_type, + 'post_type' => ''), + array( 'ID' => $object->ID ) ); + + $meta = get_post_meta($object->ID, 'imagedata', true); + if ( ! empty($meta['file']) ) + update_attached_file( $object->ID, $meta['file'] ); + } + } +} + +/** + * Execute changes made in WordPress 2.1. + * + * @since 2.1.0 + */ +function upgrade_210() { + global $wpdb, $wp_current_db_version; + + if ( $wp_current_db_version < 3506 ) { + // Update status and type. + $posts = $wpdb->get_results("SELECT ID, post_status FROM $wpdb->posts"); + + if ( ! empty($posts) ) foreach ($posts as $post) { + $status = $post->post_status; + $type = 'post'; + + if ( 'static' == $status ) { + $status = 'publish'; + $type = 'page'; + } else if ( 'attachment' == $status ) { + $status = 'inherit'; + $type = 'attachment'; + } + + $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET post_status = %s, post_type = %s WHERE ID = %d", $status, $type, $post->ID) ); + } + } + + if ( $wp_current_db_version < 3845 ) { + populate_roles_210(); + } + + if ( $wp_current_db_version < 3531 ) { + // Give future posts a post_status of future. + $now = gmdate('Y-m-d H:i:59'); + $wpdb->query ("UPDATE $wpdb->posts SET post_status = 'future' WHERE post_status = 'publish' AND post_date_gmt > '$now'"); + + $posts = $wpdb->get_results("SELECT ID, post_date FROM $wpdb->posts WHERE post_status ='future'"); + if ( !empty($posts) ) + foreach ( $posts as $post ) + wp_schedule_single_event(mysql2date('U', $post->post_date, false), 'publish_future_post', array($post->ID)); + } +} + +/** + * Execute changes made in WordPress 2.3. + * + * @since 2.3.0 + */ +function upgrade_230() { + global $wp_current_db_version, $wpdb; + + if ( $wp_current_db_version < 5200 ) { + populate_roles_230(); + } + + // Convert categories to terms. + $tt_ids = array(); + $have_tags = false; + $categories = $wpdb->get_results("SELECT * FROM $wpdb->categories ORDER BY cat_ID"); + foreach ($categories as $category) { + $term_id = (int) $category->cat_ID; + $name = $category->cat_name; + $description = $category->category_description; + $slug = $category->category_nicename; + $parent = $category->category_parent; + $term_group = 0; + + // Associate terms with the same slug in a term group and make slugs unique. + if ( $exists = $wpdb->get_results( $wpdb->prepare("SELECT term_id, term_group FROM $wpdb->terms WHERE slug = %s", $slug) ) ) { + $term_group = $exists[0]->term_group; + $id = $exists[0]->term_id; + $num = 2; + do { + $alt_slug = $slug . "-$num"; + $num++; + $slug_check = $wpdb->get_var( $wpdb->prepare("SELECT slug FROM $wpdb->terms WHERE slug = %s", $alt_slug) ); + } while ( $slug_check ); + + $slug = $alt_slug; + + if ( empty( $term_group ) ) { + $term_group = $wpdb->get_var("SELECT MAX(term_group) FROM $wpdb->terms GROUP BY term_group") + 1; + $wpdb->query( $wpdb->prepare("UPDATE $wpdb->terms SET term_group = %d WHERE term_id = %d", $term_group, $id) ); + } + } + + $wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->terms (term_id, name, slug, term_group) VALUES + (%d, %s, %s, %d)", $term_id, $name, $slug, $term_group) ); + + $count = 0; + if ( !empty($category->category_count) ) { + $count = (int) $category->category_count; + $taxonomy = 'category'; + $wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ( %d, %s, %s, %d, %d)", $term_id, $taxonomy, $description, $parent, $count) ); + $tt_ids[$term_id][$taxonomy] = (int) $wpdb->insert_id; + } + + if ( !empty($category->link_count) ) { + $count = (int) $category->link_count; + $taxonomy = 'link_category'; + $wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ( %d, %s, %s, %d, %d)", $term_id, $taxonomy, $description, $parent, $count) ); + $tt_ids[$term_id][$taxonomy] = (int) $wpdb->insert_id; + } + + if ( !empty($category->tag_count) ) { + $have_tags = true; + $count = (int) $category->tag_count; + $taxonomy = 'post_tag'; + $wpdb->insert( $wpdb->term_taxonomy, compact('term_id', 'taxonomy', 'description', 'parent', 'count') ); + $tt_ids[$term_id][$taxonomy] = (int) $wpdb->insert_id; + } + + if ( empty($count) ) { + $count = 0; + $taxonomy = 'category'; + $wpdb->insert( $wpdb->term_taxonomy, compact('term_id', 'taxonomy', 'description', 'parent', 'count') ); + $tt_ids[$term_id][$taxonomy] = (int) $wpdb->insert_id; + } + } + + $select = 'post_id, category_id'; + if ( $have_tags ) + $select .= ', rel_type'; + + $posts = $wpdb->get_results("SELECT $select FROM $wpdb->post2cat GROUP BY post_id, category_id"); + foreach ( $posts as $post ) { + $post_id = (int) $post->post_id; + $term_id = (int) $post->category_id; + $taxonomy = 'category'; + if ( !empty($post->rel_type) && 'tag' == $post->rel_type) + $taxonomy = 'tag'; + $tt_id = $tt_ids[$term_id][$taxonomy]; + if ( empty($tt_id) ) + continue; + + $wpdb->insert( $wpdb->term_relationships, array('object_id' => $post_id, 'term_taxonomy_id' => $tt_id) ); + } + + // < 3570 we used linkcategories. >= 3570 we used categories and link2cat. + if ( $wp_current_db_version < 3570 ) { + // Create link_category terms for link categories. Create a map of link cat IDs + // to link_category terms. + $link_cat_id_map = array(); + $default_link_cat = 0; + $tt_ids = array(); + $link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM " . $wpdb->prefix . 'linkcategories'); + foreach ( $link_cats as $category) { + $cat_id = (int) $category->cat_id; + $term_id = 0; + $name = wp_slash($category->cat_name); + $slug = sanitize_title($name); + $term_group = 0; + + // Associate terms with the same slug in a term group and make slugs unique. + if ( $exists = $wpdb->get_results( $wpdb->prepare("SELECT term_id, term_group FROM $wpdb->terms WHERE slug = %s", $slug) ) ) { + $term_group = $exists[0]->term_group; + $term_id = $exists[0]->term_id; + } + + if ( empty($term_id) ) { + $wpdb->insert( $wpdb->terms, compact('name', 'slug', 'term_group') ); + $term_id = (int) $wpdb->insert_id; + } + + $link_cat_id_map[$cat_id] = $term_id; + $default_link_cat = $term_id; + + $wpdb->insert( $wpdb->term_taxonomy, array('term_id' => $term_id, 'taxonomy' => 'link_category', 'description' => '', 'parent' => 0, 'count' => 0) ); + $tt_ids[$term_id] = (int) $wpdb->insert_id; + } + + // Associate links to cats. + $links = $wpdb->get_results("SELECT link_id, link_category FROM $wpdb->links"); + if ( !empty($links) ) foreach ( $links as $link ) { + if ( 0 == $link->link_category ) + continue; + if ( ! isset($link_cat_id_map[$link->link_category]) ) + continue; + $term_id = $link_cat_id_map[$link->link_category]; + $tt_id = $tt_ids[$term_id]; + if ( empty($tt_id) ) + continue; + + $wpdb->insert( $wpdb->term_relationships, array('object_id' => $link->link_id, 'term_taxonomy_id' => $tt_id) ); + } + + // Set default to the last category we grabbed during the upgrade loop. + update_option('default_link_category', $default_link_cat); + } else { + $links = $wpdb->get_results("SELECT link_id, category_id FROM $wpdb->link2cat GROUP BY link_id, category_id"); + foreach ( $links as $link ) { + $link_id = (int) $link->link_id; + $term_id = (int) $link->category_id; + $taxonomy = 'link_category'; + $tt_id = $tt_ids[$term_id][$taxonomy]; + if ( empty($tt_id) ) + continue; + $wpdb->insert( $wpdb->term_relationships, array('object_id' => $link_id, 'term_taxonomy_id' => $tt_id) ); + } + } + + if ( $wp_current_db_version < 4772 ) { + // Obsolete linkcategories table + $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'linkcategories'); + } + + // Recalculate all counts + $terms = $wpdb->get_results("SELECT term_taxonomy_id, taxonomy FROM $wpdb->term_taxonomy"); + foreach ( (array) $terms as $term ) { + if ( ('post_tag' == $term->taxonomy) || ('category' == $term->taxonomy) ) + $count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(*) FROM $wpdb->term_relationships, $wpdb->posts WHERE $wpdb->posts.ID = $wpdb->term_relationships.object_id AND post_status = 'publish' AND post_type = 'post' AND term_taxonomy_id = %d", $term->term_taxonomy_id) ); + else + $count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(*) FROM $wpdb->term_relationships WHERE term_taxonomy_id = %d", $term->term_taxonomy_id) ); + $wpdb->update( $wpdb->term_taxonomy, array('count' => $count), array('term_taxonomy_id' => $term->term_taxonomy_id) ); + } +} + +/** + * Remove old options from the database. + * + * @since 2.3.0 + */ +function upgrade_230_options_table() { + global $wpdb; + $old_options_fields = array( 'option_can_override', 'option_type', 'option_width', 'option_height', 'option_description', 'option_admin_level' ); + $wpdb->hide_errors(); + foreach ( $old_options_fields as $old ) + $wpdb->query("ALTER TABLE $wpdb->options DROP $old"); + $wpdb->show_errors(); +} + +/** + * Remove old categories, link2cat, and post2cat database tables. + * + * @since 2.3.0 + */ +function upgrade_230_old_tables() { + global $wpdb; + $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'categories'); + $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'link2cat'); + $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'post2cat'); +} + +/** + * Upgrade old slugs made in version 2.2. + * + * @since 2.2.0 + */ +function upgrade_old_slugs() { + // upgrade people who were using the Redirect Old Slugs plugin + global $wpdb; + $wpdb->query("UPDATE $wpdb->postmeta SET meta_key = '_wp_old_slug' WHERE meta_key = 'old_slug'"); +} + +/** + * Execute changes made in WordPress 2.5.0. + * + * @since 2.5.0 + */ +function upgrade_250() { + global $wp_current_db_version; + + if ( $wp_current_db_version < 6689 ) { + populate_roles_250(); + } + +} + +/** + * Execute changes made in WordPress 2.5.2. + * + * @since 2.5.2 + */ +function upgrade_252() { + global $wpdb; + + $wpdb->query("UPDATE $wpdb->users SET user_activation_key = ''"); +} + +/** + * Execute changes made in WordPress 2.6. + * + * @since 2.6.0 + */ +function upgrade_260() { + global $wp_current_db_version; + + if ( $wp_current_db_version < 8000 ) + populate_roles_260(); +} + +/** + * Execute changes made in WordPress 2.7. + * + * @since 2.7.0 + */ +function upgrade_270() { + global $wpdb, $wp_current_db_version; + + if ( $wp_current_db_version < 8980 ) + populate_roles_270(); + + // Update post_date for unpublished posts with empty timestamp + if ( $wp_current_db_version < 8921 ) + $wpdb->query( "UPDATE $wpdb->posts SET post_date = post_modified WHERE post_date = '0000-00-00 00:00:00'" ); +} + +/** + * Execute changes made in WordPress 2.8. + * + * @since 2.8.0 + */ +function upgrade_280() { + global $wp_current_db_version, $wpdb; + + if ( $wp_current_db_version < 10360 ) + populate_roles_280(); + if ( is_multisite() ) { + $start = 0; + while( $rows = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options ORDER BY option_id LIMIT $start, 20" ) ) { + foreach( $rows as $row ) { + $value = $row->option_value; + if ( !@unserialize( $value ) ) + $value = stripslashes( $value ); + if ( $value !== $row->option_value ) { + update_option( $row->option_name, $value ); + } + } + $start += 20; + } + refresh_blog_details( $wpdb->blogid ); + } +} + +/** + * Execute changes made in WordPress 2.9. + * + * @since 2.9.0 + */ +function upgrade_290() { + global $wp_current_db_version; + + if ( $wp_current_db_version < 11958 ) { + // Previously, setting depth to 1 would redundantly disable threading, but now 2 is the minimum depth to avoid confusion + if ( get_option( 'thread_comments_depth' ) == '1' ) { + update_option( 'thread_comments_depth', 2 ); + update_option( 'thread_comments', 0 ); + } + } +} + +/** + * Execute changes made in WordPress 3.0. + * + * @since 3.0.0 + */ +function upgrade_300() { + global $wp_current_db_version, $wpdb; + + if ( $wp_current_db_version < 15093 ) + populate_roles_300(); + + if ( $wp_current_db_version < 14139 && is_multisite() && is_main_site() && ! defined( 'MULTISITE' ) && get_site_option( 'siteurl' ) === false ) + add_site_option( 'siteurl', '' ); + + // 3.0 screen options key name changes. + if ( is_main_site() && !defined('DO_NOT_UPGRADE_GLOBAL_TABLES') ) { + $prefix = like_escape($wpdb->base_prefix); + $wpdb->query( "DELETE FROM $wpdb->usermeta WHERE meta_key LIKE '{$prefix}%meta-box-hidden%' OR meta_key LIKE '{$prefix}%closedpostboxes%' OR meta_key LIKE '{$prefix}%manage-%-columns-hidden%' OR meta_key LIKE '{$prefix}%meta-box-order%' OR meta_key LIKE '{$prefix}%metaboxorder%' OR meta_key LIKE '{$prefix}%screen_layout%' + OR meta_key = 'manageedittagscolumnshidden' OR meta_key='managecategoriescolumnshidden' OR meta_key = 'manageedit-tagscolumnshidden' OR meta_key = 'manageeditcolumnshidden' OR meta_key = 'categories_per_page' OR meta_key = 'edit_tags_per_page'" ); + } + +} + +/** + * Execute changes made in WordPress 3.3. + * + * @since 3.3.0 + */ +function upgrade_330() { + global $wp_current_db_version, $wpdb, $wp_registered_widgets, $sidebars_widgets; + + if ( $wp_current_db_version < 19061 && is_main_site() && ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) { + $wpdb->query( "DELETE FROM $wpdb->usermeta WHERE meta_key IN ('show_admin_bar_admin', 'plugins_last_view')" ); + } + + if ( $wp_current_db_version >= 11548 ) + return; + + $sidebars_widgets = get_option( 'sidebars_widgets', array() ); + $_sidebars_widgets = array(); + + if ( isset($sidebars_widgets['wp_inactive_widgets']) || empty($sidebars_widgets) ) + $sidebars_widgets['array_version'] = 3; + elseif ( !isset($sidebars_widgets['array_version']) ) + $sidebars_widgets['array_version'] = 1; + + switch ( $sidebars_widgets['array_version'] ) { + case 1 : + foreach ( (array) $sidebars_widgets as $index => $sidebar ) + if ( is_array($sidebar) ) + foreach ( (array) $sidebar as $i => $name ) { + $id = strtolower($name); + if ( isset($wp_registered_widgets[$id]) ) { + $_sidebars_widgets[$index][$i] = $id; + continue; + } + $id = sanitize_title($name); + if ( isset($wp_registered_widgets[$id]) ) { + $_sidebars_widgets[$index][$i] = $id; + continue; + } + + $found = false; + + foreach ( $wp_registered_widgets as $widget_id => $widget ) { + if ( strtolower($widget['name']) == strtolower($name) ) { + $_sidebars_widgets[$index][$i] = $widget['id']; + $found = true; + break; + } elseif ( sanitize_title($widget['name']) == sanitize_title($name) ) { + $_sidebars_widgets[$index][$i] = $widget['id']; + $found = true; + break; + } + } + + if ( $found ) + continue; + + unset($_sidebars_widgets[$index][$i]); + } + $_sidebars_widgets['array_version'] = 2; + $sidebars_widgets = $_sidebars_widgets; + unset($_sidebars_widgets); + + case 2 : + $sidebars_widgets = retrieve_widgets(); + $sidebars_widgets['array_version'] = 3; + update_option( 'sidebars_widgets', $sidebars_widgets ); + } +} + +/** + * Execute changes made in WordPress 3.4. + * + * @since 3.4.0 + */ +function upgrade_340() { + global $wp_current_db_version, $wpdb; + + if ( $wp_current_db_version < 19798 ) { + $wpdb->hide_errors(); + $wpdb->query( "ALTER TABLE $wpdb->options DROP COLUMN blog_id" ); + $wpdb->show_errors(); + } + + if ( $wp_current_db_version < 19799 ) { + $wpdb->hide_errors(); + $wpdb->query("ALTER TABLE $wpdb->comments DROP INDEX comment_approved"); + $wpdb->show_errors(); + } + + if ( $wp_current_db_version < 20022 && is_main_site() && ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) { + $wpdb->query( "DELETE FROM $wpdb->usermeta WHERE meta_key = 'themes_last_view'" ); + } + + if ( $wp_current_db_version < 20080 ) { + if ( 'yes' == $wpdb->get_var( "SELECT autoload FROM $wpdb->options WHERE option_name = 'uninstall_plugins'" ) ) { + $uninstall_plugins = get_option( 'uninstall_plugins' ); + delete_option( 'uninstall_plugins' ); + add_option( 'uninstall_plugins', $uninstall_plugins, null, 'no' ); + } + } +} + +/** + * Execute changes made in WordPress 3.5. + * + * @since 3.5.0 + */ +function upgrade_350() { + global $wp_current_db_version, $wpdb; + + if ( $wp_current_db_version < 22006 && $wpdb->get_var( "SELECT link_id FROM $wpdb->links LIMIT 1" ) ) + update_option( 'link_manager_enabled', 1 ); // Previously set to 0 by populate_options() + + if ( $wp_current_db_version < 21811 && is_main_site() && ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) { + $meta_keys = array(); + foreach ( array_merge( get_post_types(), get_taxonomies() ) as $name ) { + if ( false !== strpos( $name, '-' ) ) + $meta_keys[] = 'edit_' . str_replace( '-', '_', $name ) . '_per_page'; + } + if ( $meta_keys ) { + $meta_keys = implode( "', '", $meta_keys ); + $wpdb->query( "DELETE FROM $wpdb->usermeta WHERE meta_key IN ('$meta_keys')" ); + } + } + + if ( $wp_current_db_version < 22422 && $term = get_term_by( 'slug', 'post-format-standard', 'post_format' ) ) + wp_delete_term( $term->term_id, 'post_format' ); +} + +/** + * Execute changes made in WordPress 3.7. + * + * @since 3.7.0 + */ +function upgrade_370() { + global $wp_current_db_version; + if ( $wp_current_db_version < 25824 ) + wp_clear_scheduled_hook( 'wp_auto_updates_maybe_update' ); +} + +/** + * Execute changes made in WordPress 3.7.2. + * + * @since 3.7.2 + * @since 3.8.0 + */ +function upgrade_372() { + global $wp_current_db_version; + if ( $wp_current_db_version < 26148 ) + wp_clear_scheduled_hook( 'wp_maybe_auto_update' ); +} + +/** + * Execute changes made in WordPress 3.8.0. + * + * @since 3.8.0 + */ +function upgrade_380() { + global $wp_current_db_version; + if ( $wp_current_db_version < 26691 ) { + deactivate_plugins( array( 'mp6/mp6.php' ), true ); + } +} +/** + * Execute network level changes + * + * @since 3.0.0 + */ +function upgrade_network() { + global $wp_current_db_version, $wpdb; + + // Always + if ( is_main_network() ) { + // Deletes all expired transients. + // The multi-table delete syntax is used to delete the transient record from table a, + // and the corresponding transient_timeout record from table b. + $time = time(); + $wpdb->query("DELETE a, b FROM $wpdb->sitemeta a, $wpdb->sitemeta b WHERE + a.meta_key LIKE '\_site\_transient\_%' AND + a.meta_key NOT LIKE '\_site\_transient\_timeout\_%' AND + b.meta_key = CONCAT( '_site_transient_timeout_', SUBSTRING( a.meta_key, 17 ) ) + AND b.meta_value < $time"); + } + + // 2.8 + if ( $wp_current_db_version < 11549 ) { + $wpmu_sitewide_plugins = get_site_option( 'wpmu_sitewide_plugins' ); + $active_sitewide_plugins = get_site_option( 'active_sitewide_plugins' ); + if ( $wpmu_sitewide_plugins ) { + if ( !$active_sitewide_plugins ) + $sitewide_plugins = (array) $wpmu_sitewide_plugins; + else + $sitewide_plugins = array_merge( (array) $active_sitewide_plugins, (array) $wpmu_sitewide_plugins ); + + update_site_option( 'active_sitewide_plugins', $sitewide_plugins ); + } + delete_site_option( 'wpmu_sitewide_plugins' ); + delete_site_option( 'deactivated_sitewide_plugins' ); + + $start = 0; + while( $rows = $wpdb->get_results( "SELECT meta_key, meta_value FROM {$wpdb->sitemeta} ORDER BY meta_id LIMIT $start, 20" ) ) { + foreach( $rows as $row ) { + $value = $row->meta_value; + if ( !@unserialize( $value ) ) + $value = stripslashes( $value ); + if ( $value !== $row->meta_value ) { + update_site_option( $row->meta_key, $value ); + } + } + $start += 20; + } + } + + // 3.0 + if ( $wp_current_db_version < 13576 ) + update_site_option( 'global_terms_enabled', '1' ); + + // 3.3 + if ( $wp_current_db_version < 19390 ) + update_site_option( 'initial_db_version', $wp_current_db_version ); + + if ( $wp_current_db_version < 19470 ) { + if ( false === get_site_option( 'active_sitewide_plugins' ) ) + update_site_option( 'active_sitewide_plugins', array() ); + } + + // 3.4 + if ( $wp_current_db_version < 20148 ) { + // 'allowedthemes' keys things by stylesheet. 'allowed_themes' keyed things by name. + $allowedthemes = get_site_option( 'allowedthemes' ); + $allowed_themes = get_site_option( 'allowed_themes' ); + if ( false === $allowedthemes && is_array( $allowed_themes ) && $allowed_themes ) { + $converted = array(); + $themes = wp_get_themes(); + foreach ( $themes as $stylesheet => $theme_data ) { + if ( isset( $allowed_themes[ $theme_data->get('Name') ] ) ) + $converted[ $stylesheet ] = true; + } + update_site_option( 'allowedthemes', $converted ); + delete_site_option( 'allowed_themes' ); + } + } + + // 3.5 + if ( $wp_current_db_version < 21823 ) + update_site_option( 'ms_files_rewriting', '1' ); + + // 3.5.2 + if ( $wp_current_db_version < 24448 ) { + $illegal_names = get_site_option( 'illegal_names' ); + if ( is_array( $illegal_names ) && count( $illegal_names ) === 1 ) { + $illegal_name = reset( $illegal_names ); + $illegal_names = explode( ' ', $illegal_name ); + update_site_option( 'illegal_names', $illegal_names ); + } + } +} + +// The functions we use to actually do stuff + +// General + +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since 1.0.0 + * + * @param string $table_name Database table name to create. + * @param string $create_ddl SQL statement to create table. + * @return bool If table already exists or was created by function. + */ +function maybe_create_table($table_name, $create_ddl) { + global $wpdb; + if ( $wpdb->get_var("SHOW TABLES LIKE '$table_name'") == $table_name ) + return true; + //didn't find it try to create it. + $q = $wpdb->query($create_ddl); + // we cannot directly tell that whether this succeeded! + if ( $wpdb->get_var("SHOW TABLES LIKE '$table_name'") == $table_name ) + return true; + return false; +} + +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since 1.0.1 + * + * @param string $table Database table name. + * @param string $index Index name to drop. + * @return bool True, when finished. + */ +function drop_index($table, $index) { + global $wpdb; + $wpdb->hide_errors(); + $wpdb->query("ALTER TABLE `$table` DROP INDEX `$index`"); + // Now we need to take out all the extra ones we may have created + for ($i = 0; $i < 25; $i++) { + $wpdb->query("ALTER TABLE `$table` DROP INDEX `{$index}_$i`"); + } + $wpdb->show_errors(); + return true; +} + +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since 1.0.1 + * + * @param string $table Database table name. + * @param string $index Database table index column. + * @return bool True, when done with execution. + */ +function add_clean_index($table, $index) { + global $wpdb; + drop_index($table, $index); + $wpdb->query("ALTER TABLE `$table` ADD INDEX ( `$index` )"); + return true; +} + +/** + ** maybe_add_column() + ** Add column to db table if it doesn't exist. + ** Returns: true if already exists or on successful completion + ** false on error + */ +function maybe_add_column($table_name, $column_name, $create_ddl) { + global $wpdb; + foreach ($wpdb->get_col("DESC $table_name", 0) as $column ) { + if ($column == $column_name) { + return true; + } + } + //didn't find it try to create it. + $q = $wpdb->query($create_ddl); + // we cannot directly tell that whether this succeeded! + foreach ($wpdb->get_col("DESC $table_name", 0) as $column ) { + if ($column == $column_name) { + return true; + } + } + return false; +} + +/** + * Retrieve all options as it was for 1.2. + * + * @since 1.2.0 + * + * @return array List of options. + */ +function get_alloptions_110() { + global $wpdb; + $all_options = new stdClass; + if ( $options = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options" ) ) { + foreach ( $options as $option ) { + if ( 'siteurl' == $option->option_name || 'home' == $option->option_name || 'category_base' == $option->option_name ) + $option->option_value = untrailingslashit( $option->option_value ); + $all_options->{$option->option_name} = stripslashes( $option->option_value ); + } + } + return $all_options; +} + +/** + * Version of get_option that is private to install/upgrade. + * + * @since 1.5.1 + * @access private + * + * @param string $setting Option name. + * @return mixed + */ +function __get_option($setting) { + global $wpdb; + + if ( $setting == 'home' && defined( 'WP_HOME' ) ) + return untrailingslashit( WP_HOME ); + + if ( $setting == 'siteurl' && defined( 'WP_SITEURL' ) ) + return untrailingslashit( WP_SITEURL ); + + $option = $wpdb->get_var( $wpdb->prepare("SELECT option_value FROM $wpdb->options WHERE option_name = %s", $setting ) ); + + if ( 'home' == $setting && '' == $option ) + return __get_option( 'siteurl' ); + + if ( 'siteurl' == $setting || 'home' == $setting || 'category_base' == $setting || 'tag_base' == $setting ) + $option = untrailingslashit( $option ); + + return maybe_unserialize( $option ); +} + +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since 1.5.0 + * + * @param string $content + * @return string + */ +function deslash($content) { + // Note: \\\ inside a regex denotes a single backslash. + + // Replace one or more backslashes followed by a single quote with + // a single quote. + $content = preg_replace("/\\\+'/", "'", $content); + + // Replace one or more backslashes followed by a double quote with + // a double quote. + $content = preg_replace('/\\\+"/', '"', $content); + + // Replace one or more backslashes with one backslash. + $content = preg_replace("/\\\+/", "\\", $content); + + return $content; +} + +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since 1.5.0 + * + * @param unknown_type $queries + * @param unknown_type $execute + * @return unknown + */ +function dbDelta( $queries = '', $execute = true ) { + global $wpdb; + + if ( in_array( $queries, array( '', 'all', 'blog', 'global', 'ms_global' ), true ) ) + $queries = wp_get_db_schema( $queries ); + + // Separate individual queries into an array + if ( !is_array($queries) ) { + $queries = explode( ';', $queries ); + $queries = array_filter( $queries ); + } + + /** + * Filter the dbDelta SQL queries. + * + * @since 3.3.0 + * + * @param array $queries An array of dbDelta SQL queries. + */ + $queries = apply_filters( 'dbdelta_queries', $queries ); + + $cqueries = array(); // Creation Queries + $iqueries = array(); // Insertion Queries + $for_update = array(); + + // Create a tablename index for an array ($cqueries) of queries + foreach($queries as $qry) { + if (preg_match("|CREATE TABLE ([^ ]*)|", $qry, $matches)) { + $cqueries[ trim( $matches[1], '`' ) ] = $qry; + $for_update[$matches[1]] = 'Created table '.$matches[1]; + } else if (preg_match("|CREATE DATABASE ([^ ]*)|", $qry, $matches)) { + array_unshift($cqueries, $qry); + } else if (preg_match("|INSERT INTO ([^ ]*)|", $qry, $matches)) { + $iqueries[] = $qry; + } else if (preg_match("|UPDATE ([^ ]*)|", $qry, $matches)) { + $iqueries[] = $qry; + } else { + // Unrecognized query type + } + } + + /** + * Filter the dbDelta SQL queries for creating tables and/or databases. + * + * Queries filterable via this hook contain "CREATE TABLE" or "CREATE DATABASE". + * + * @since 3.3.0 + * + * @param array $cqueries An array of dbDelta create SQL queries. + */ + $cqueries = apply_filters( 'dbdelta_create_queries', $cqueries ); + + /** + * Filter the dbDelta SQL queries for inserting or updating. + * + * Queries filterable via this hook contain "INSERT INTO" or "UPDATE". + * + * @since 3.3.0 + * + * @param array $iqueries An array of dbDelta insert or update SQL queries. + */ + $iqueries = apply_filters( 'dbdelta_insert_queries', $iqueries ); + + $global_tables = $wpdb->tables( 'global' ); + foreach ( $cqueries as $table => $qry ) { + // Upgrade global tables only for the main site. Don't upgrade at all if DO_NOT_UPGRADE_GLOBAL_TABLES is defined. + if ( in_array( $table, $global_tables ) && ( !is_main_site() || defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) ) { + unset( $cqueries[ $table ], $for_update[ $table ] ); + continue; + } + + // Fetch the table column structure from the database + $suppress = $wpdb->suppress_errors(); + $tablefields = $wpdb->get_results("DESCRIBE {$table};"); + $wpdb->suppress_errors( $suppress ); + + if ( ! $tablefields ) + continue; + + // Clear the field and index arrays + $cfields = $indices = array(); + // Get all of the field names in the query from between the parens + preg_match("|\((.*)\)|ms", $qry, $match2); + $qryline = trim($match2[1]); + + // Separate field lines into an array + $flds = explode("\n", $qryline); + + //echo "
    \n".print_r(strtolower($table), true).":\n".print_r($cqueries, true)."

    "; + + // For every field line specified in the query + foreach ($flds as $fld) { + // Extract the field name + preg_match("|^([^ ]*)|", trim($fld), $fvals); + $fieldname = trim( $fvals[1], '`' ); + + // Verify the found field name + $validfield = true; + switch (strtolower($fieldname)) { + case '': + case 'primary': + case 'index': + case 'fulltext': + case 'unique': + case 'key': + $validfield = false; + $indices[] = trim(trim($fld), ", \n"); + break; + } + $fld = trim($fld); + + // If it's a valid field, add it to the field array + if ($validfield) { + $cfields[strtolower($fieldname)] = trim($fld, ", \n"); + } + } + + // For every field in the table + foreach ($tablefields as $tablefield) { + // If the table field exists in the field array... + if (array_key_exists(strtolower($tablefield->Field), $cfields)) { + // Get the field type from the query + preg_match("|".$tablefield->Field." ([^ ]*( unsigned)?)|i", $cfields[strtolower($tablefield->Field)], $matches); + $fieldtype = $matches[1]; + + // Is actual field type different from the field type in query? + if ($tablefield->Type != $fieldtype) { + // Add a query to change the column type + $cqueries[] = "ALTER TABLE {$table} CHANGE COLUMN {$tablefield->Field} " . $cfields[strtolower($tablefield->Field)]; + $for_update[$table.'.'.$tablefield->Field] = "Changed type of {$table}.{$tablefield->Field} from {$tablefield->Type} to {$fieldtype}"; + } + + // Get the default value from the array + //echo "{$cfields[strtolower($tablefield->Field)]}
    "; + if (preg_match("| DEFAULT '(.*?)'|i", $cfields[strtolower($tablefield->Field)], $matches)) { + $default_value = $matches[1]; + if ($tablefield->Default != $default_value) { + // Add a query to change the column's default value + $cqueries[] = "ALTER TABLE {$table} ALTER COLUMN {$tablefield->Field} SET DEFAULT '{$default_value}'"; + $for_update[$table.'.'.$tablefield->Field] = "Changed default value of {$table}.{$tablefield->Field} from {$tablefield->Default} to {$default_value}"; + } + } + + // Remove the field from the array (so it's not added) + unset($cfields[strtolower($tablefield->Field)]); + } else { + // This field exists in the table, but not in the creation queries? + } + } + + // For every remaining field specified for the table + foreach ($cfields as $fieldname => $fielddef) { + // Push a query line into $cqueries that adds the field to that table + $cqueries[] = "ALTER TABLE {$table} ADD COLUMN $fielddef"; + $for_update[$table.'.'.$fieldname] = 'Added column '.$table.'.'.$fieldname; + } + + // Index stuff goes here + // Fetch the table index structure from the database + $tableindices = $wpdb->get_results("SHOW INDEX FROM {$table};"); + + if ($tableindices) { + // Clear the index array + unset($index_ary); + + // For every index in the table + foreach ($tableindices as $tableindex) { + // Add the index to the index data array + $keyname = $tableindex->Key_name; + $index_ary[$keyname]['columns'][] = array('fieldname' => $tableindex->Column_name, 'subpart' => $tableindex->Sub_part); + $index_ary[$keyname]['unique'] = ($tableindex->Non_unique == 0)?true:false; + } + + // For each actual index in the index array + foreach ($index_ary as $index_name => $index_data) { + // Build a create string to compare to the query + $index_string = ''; + if ($index_name == 'PRIMARY') { + $index_string .= 'PRIMARY '; + } else if($index_data['unique']) { + $index_string .= 'UNIQUE '; + } + $index_string .= 'KEY '; + if ($index_name != 'PRIMARY') { + $index_string .= $index_name; + } + $index_columns = ''; + // For each column in the index + foreach ($index_data['columns'] as $column_data) { + if ($index_columns != '') $index_columns .= ','; + // Add the field to the column list string + $index_columns .= $column_data['fieldname']; + if ($column_data['subpart'] != '') { + $index_columns .= '('.$column_data['subpart'].')'; + } + } + // Add the column list to the index create string + $index_string .= ' ('.$index_columns.')'; + if (!(($aindex = array_search($index_string, $indices)) === false)) { + unset($indices[$aindex]); + //echo "
    {$table}:
    Found index:".$index_string."
    \n"; + } + //else echo "
    {$table}:
    Did not find index:".$index_string."
    ".print_r($indices, true)."
    \n"; + } + } + + // For every remaining index specified for the table + foreach ( (array) $indices as $index ) { + // Push a query line into $cqueries that adds the index to that table + $cqueries[] = "ALTER TABLE {$table} ADD $index"; + $for_update[] = 'Added index ' . $table . ' ' . $index; + } + + // Remove the original table creation query from processing + unset( $cqueries[ $table ], $for_update[ $table ] ); + } + + $allqueries = array_merge($cqueries, $iqueries); + if ($execute) { + foreach ($allqueries as $query) { + //echo "
    ".print_r($query, true)."
    \n"; + $wpdb->query($query); + } + } + + return $for_update; +} + +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since 1.5.0 + */ +function make_db_current( $tables = 'all' ) { + $alterations = dbDelta( $tables ); + echo "
      \n"; + foreach($alterations as $alteration) echo "
    1. $alteration
    2. \n"; + echo "
    \n"; +} + +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since 1.5.0 + */ +function make_db_current_silent( $tables = 'all' ) { + $alterations = dbDelta( $tables ); +} + +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since 1.5.0 + * + * @param unknown_type $theme_name + * @param unknown_type $template + * @return unknown + */ +function make_site_theme_from_oldschool($theme_name, $template) { + $home_path = get_home_path(); + $site_dir = WP_CONTENT_DIR . "/themes/$template"; + + if (! file_exists("$home_path/index.php")) + return false; + + // Copy files from the old locations to the site theme. + // TODO: This does not copy arbitrary include dependencies. Only the + // standard WP files are copied. + $files = array('index.php' => 'index.php', 'wp-layout.css' => 'style.css', 'wp-comments.php' => 'comments.php', 'wp-comments-popup.php' => 'comments-popup.php'); + + foreach ($files as $oldfile => $newfile) { + if ($oldfile == 'index.php') + $oldpath = $home_path; + else + $oldpath = ABSPATH; + + if ($oldfile == 'index.php') { // Check to make sure it's not a new index + $index = implode('', file("$oldpath/$oldfile")); + if (strpos($index, 'WP_USE_THEMES') !== false) { + if (! @copy(WP_CONTENT_DIR . '/themes/' . WP_DEFAULT_THEME . '/index.php', "$site_dir/$newfile")) + return false; + continue; // Don't copy anything + } + } + + if (! @copy("$oldpath/$oldfile", "$site_dir/$newfile")) + return false; + + chmod("$site_dir/$newfile", 0777); + + // Update the blog header include in each file. + $lines = explode("\n", implode('', file("$site_dir/$newfile"))); + if ($lines) { + $f = fopen("$site_dir/$newfile", 'w'); + + foreach ($lines as $line) { + if (preg_match('/require.*wp-blog-header/', $line)) + $line = '//' . $line; + + // Update stylesheet references. + $line = str_replace("/wp-layout.css", "", $line); + + // Update comments template inclusion. + $line = str_replace("", "", $line); + + fwrite($f, "{$line}\n"); + } + fclose($f); + } + } + + // Add a theme header. + $header = "/*\nTheme Name: $theme_name\nTheme URI: " . __get_option('siteurl') . "\nDescription: A theme automatically created by the update.\nVersion: 1.0\nAuthor: Moi\n*/\n"; + + $stylelines = file_get_contents("$site_dir/style.css"); + if ($stylelines) { + $f = fopen("$site_dir/style.css", 'w'); + + fwrite($f, $header); + fwrite($f, $stylelines); + fclose($f); + } + + return true; +} + +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since 1.5.0 + * + * @param unknown_type $theme_name + * @param unknown_type $template + * @return unknown + */ +function make_site_theme_from_default($theme_name, $template) { + $site_dir = WP_CONTENT_DIR . "/themes/$template"; + $default_dir = WP_CONTENT_DIR . '/themes/' . WP_DEFAULT_THEME; + + // Copy files from the default theme to the site theme. + //$files = array('index.php', 'comments.php', 'comments-popup.php', 'footer.php', 'header.php', 'sidebar.php', 'style.css'); + + $theme_dir = @ opendir($default_dir); + if ($theme_dir) { + while(($theme_file = readdir( $theme_dir )) !== false) { + if (is_dir("$default_dir/$theme_file")) + continue; + if (! @copy("$default_dir/$theme_file", "$site_dir/$theme_file")) + return; + chmod("$site_dir/$theme_file", 0777); + } + } + @closedir($theme_dir); + + // Rewrite the theme header. + $stylelines = explode("\n", implode('', file("$site_dir/style.css"))); + if ($stylelines) { + $f = fopen("$site_dir/style.css", 'w'); + + foreach ($stylelines as $line) { + if (strpos($line, 'Theme Name:') !== false) $line = 'Theme Name: ' . $theme_name; + elseif (strpos($line, 'Theme URI:') !== false) $line = 'Theme URI: ' . __get_option('url'); + elseif (strpos($line, 'Description:') !== false) $line = 'Description: Your theme.'; + elseif (strpos($line, 'Version:') !== false) $line = 'Version: 1'; + elseif (strpos($line, 'Author:') !== false) $line = 'Author: You'; + fwrite($f, $line . "\n"); + } + fclose($f); + } + + // Copy the images. + umask(0); + if (! mkdir("$site_dir/images", 0777)) { + return false; + } + + $images_dir = @ opendir("$default_dir/images"); + if ($images_dir) { + while(($image = readdir($images_dir)) !== false) { + if (is_dir("$default_dir/images/$image")) + continue; + if (! @copy("$default_dir/images/$image", "$site_dir/images/$image")) + return; + chmod("$site_dir/images/$image", 0777); + } + } + @closedir($images_dir); +} + +// Create a site theme from the default theme. +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since 1.5.0 + * + * @return unknown + */ +function make_site_theme() { + // Name the theme after the blog. + $theme_name = __get_option('blogname'); + $template = sanitize_title($theme_name); + $site_dir = WP_CONTENT_DIR . "/themes/$template"; + + // If the theme already exists, nothing to do. + if ( is_dir($site_dir)) { + return false; + } + + // We must be able to write to the themes dir. + if (! is_writable(WP_CONTENT_DIR . "/themes")) { + return false; + } + + umask(0); + if (! mkdir($site_dir, 0777)) { + return false; + } + + if (file_exists(ABSPATH . 'wp-layout.css')) { + if (! make_site_theme_from_oldschool($theme_name, $template)) { + // TODO: rm -rf the site theme directory. + return false; + } + } else { + if (! make_site_theme_from_default($theme_name, $template)) + // TODO: rm -rf the site theme directory. + return false; + } + + // Make the new site theme active. + $current_template = __get_option('template'); + if ($current_template == WP_DEFAULT_THEME) { + update_option('template', $template); + update_option('stylesheet', $template); + } + return $template; +} + +/** + * Translate user level to user role name. + * + * @since 2.0.0 + * + * @param int $level User level. + * @return string User role name. + */ +function translate_level_to_role($level) { + switch ($level) { + case 10: + case 9: + case 8: + return 'administrator'; + case 7: + case 6: + case 5: + return 'editor'; + case 4: + case 3: + case 2: + return 'author'; + case 1: + return 'contributor'; + case 0: + return 'subscriber'; + } +} + +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since 2.1.0 + */ +function wp_check_mysql_version() { + global $wpdb; + $result = $wpdb->check_database_version(); + if ( is_wp_error( $result ) ) + die( $result->get_error_message() ); +} + +/** + * Disables the Automattic widgets plugin, which was merged into core. + * + * @since 2.2.0 + */ +function maybe_disable_automattic_widgets() { + $plugins = __get_option( 'active_plugins' ); + + foreach ( (array) $plugins as $plugin ) { + if ( basename( $plugin ) == 'widgets.php' ) { + array_splice( $plugins, array_search( $plugin, $plugins ), 1 ); + update_option( 'active_plugins', $plugins ); + break; + } + } +} + +/** + * Disables the Link Manager on upgrade, if at the time of upgrade, no links exist in the DB. + * + * @since 3.5.0 + */ +function maybe_disable_link_manager() { + global $wp_current_db_version, $wpdb; + + if ( $wp_current_db_version >= 22006 && get_option( 'link_manager_enabled' ) && ! $wpdb->get_var( "SELECT link_id FROM $wpdb->links LIMIT 1" ) ) + update_option( 'link_manager_enabled', 0 ); +} + +/** + * Runs before the schema is upgraded. + * + * @since 2.9.0 + */ +function pre_schema_upgrade() { + global $wp_current_db_version, $wpdb; + + // Upgrade versions prior to 2.9 + if ( $wp_current_db_version < 11557 ) { + // Delete duplicate options. Keep the option with the highest option_id. + $wpdb->query("DELETE o1 FROM $wpdb->options AS o1 JOIN $wpdb->options AS o2 USING (`option_name`) WHERE o2.option_id > o1.option_id"); + + // Drop the old primary key and add the new. + $wpdb->query("ALTER TABLE $wpdb->options DROP PRIMARY KEY, ADD PRIMARY KEY(option_id)"); + + // Drop the old option_name index. dbDelta() doesn't do the drop. + $wpdb->query("ALTER TABLE $wpdb->options DROP INDEX option_name"); + } + + // Multisite schema upgrades. + if ( $wp_current_db_version < 25448 && is_multisite() && ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) && is_main_network() ) { + + // Upgrade verions prior to 3.7 + if ( $wp_current_db_version < 25179 ) { + // New primary key for signups. + $wpdb->query( "ALTER TABLE $wpdb->signups ADD signup_id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST" ); + $wpdb->query( "ALTER TABLE $wpdb->signups DROP INDEX domain" ); + } + + if ( $wp_current_db_version < 25448 ) { + // Convert archived from enum to tinyint. + $wpdb->query( "ALTER TABLE $wpdb->blogs CHANGE COLUMN archived archived varchar(1) NOT NULL default '0'" ); + $wpdb->query( "ALTER TABLE $wpdb->blogs CHANGE COLUMN archived archived tinyint(2) NOT NULL default 0" ); + } + } +} + +/** + * Install global terms. + * + * @since 3.0.0 + * + */ +if ( !function_exists( 'install_global_terms' ) ) : +function install_global_terms() { + global $wpdb, $charset_collate; + $ms_queries = " +CREATE TABLE $wpdb->sitecategories ( + cat_ID bigint(20) NOT NULL auto_increment, + cat_name varchar(55) NOT NULL default '', + category_nicename varchar(200) NOT NULL default '', + last_updated timestamp NOT NULL, + PRIMARY KEY (cat_ID), + KEY category_nicename (category_nicename), + KEY last_updated (last_updated) +) $charset_collate; +"; +// now create tables + dbDelta( $ms_queries ); +} +endif; diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php new file mode 100644 index 0000000..137afcd --- /dev/null +++ b/wp-admin/includes/user.php @@ -0,0 +1,436 @@ +ID = (int) $user_id; + $userdata = get_userdata( $user_id ); + $user->user_login = wp_slash( $userdata->user_login ); + } else { + $update = false; + } + + if ( !$update && isset( $_POST['user_login'] ) ) + $user->user_login = sanitize_user($_POST['user_login'], true); + + $pass1 = $pass2 = ''; + if ( isset( $_POST['pass1'] ) ) + $pass1 = $_POST['pass1']; + if ( isset( $_POST['pass2'] ) ) + $pass2 = $_POST['pass2']; + + if ( isset( $_POST['role'] ) && current_user_can( 'edit_users' ) ) { + $new_role = sanitize_text_field( $_POST['role'] ); + $potential_role = isset($wp_roles->role_objects[$new_role]) ? $wp_roles->role_objects[$new_role] : false; + // Don't let anyone with 'edit_users' (admins) edit their own role to something without it. + // Multisite super admins can freely edit their blog roles -- they possess all caps. + if ( ( is_multisite() && current_user_can( 'manage_sites' ) ) || $user_id != get_current_user_id() || ($potential_role && $potential_role->has_cap( 'edit_users' ) ) ) + $user->role = $new_role; + + // If the new role isn't editable by the logged-in user die with error + $editable_roles = get_editable_roles(); + if ( ! empty( $new_role ) && empty( $editable_roles[$new_role] ) ) + wp_die(__('You can’t give users that role.')); + } + + if ( isset( $_POST['email'] )) + $user->user_email = sanitize_text_field( $_POST['email'] ); + if ( isset( $_POST['url'] ) ) { + if ( empty ( $_POST['url'] ) || $_POST['url'] == 'http://' ) { + $user->user_url = ''; + } else { + $user->user_url = esc_url_raw( $_POST['url'] ); + $protocols = implode( '|', array_map( 'preg_quote', wp_allowed_protocols() ) ); + $user->user_url = preg_match('/^(' . $protocols . '):/is', $user->user_url) ? $user->user_url : 'http://'.$user->user_url; + } + } + if ( isset( $_POST['first_name'] ) ) + $user->first_name = sanitize_text_field( $_POST['first_name'] ); + if ( isset( $_POST['last_name'] ) ) + $user->last_name = sanitize_text_field( $_POST['last_name'] ); + if ( isset( $_POST['nickname'] ) ) + $user->nickname = sanitize_text_field( $_POST['nickname'] ); + if ( isset( $_POST['display_name'] ) ) + $user->display_name = sanitize_text_field( $_POST['display_name'] ); + + if ( isset( $_POST['description'] ) ) + $user->description = trim( $_POST['description'] ); + + foreach ( wp_get_user_contact_methods( $user ) as $method => $name ) { + if ( isset( $_POST[$method] )) + $user->$method = sanitize_text_field( $_POST[$method] ); + } + + if ( $update ) { + $user->rich_editing = isset( $_POST['rich_editing'] ) && 'false' == $_POST['rich_editing'] ? 'false' : 'true'; + $user->admin_color = isset( $_POST['admin_color'] ) ? sanitize_text_field( $_POST['admin_color'] ) : 'fresh'; + $user->show_admin_bar_front = isset( $_POST['admin_bar_front'] ) ? 'true' : 'false'; + } + + $user->comment_shortcuts = isset( $_POST['comment_shortcuts'] ) && 'true' == $_POST['comment_shortcuts'] ? 'true' : ''; + + $user->use_ssl = 0; + if ( !empty($_POST['use_ssl']) ) + $user->use_ssl = 1; + + $errors = new WP_Error(); + + /* checking that username has been typed */ + if ( $user->user_login == '' ) + $errors->add( 'user_login', __( 'ERROR: Please enter a username.' ) ); + + /* checking the password has been typed twice */ + /** + * Fires before the password and confirm password fields are checked for congruity. + * + * @since 1.5.1 + * + * @param string $user_login The username. + * @param string &$pass1 The password, passed by reference. + * @param string &$pass2 The confirmed password, passed by reference. + */ + do_action_ref_array( 'check_passwords', array( $user->user_login, &$pass1, &$pass2 ) ); + + if ( $update ) { + if ( empty($pass1) && !empty($pass2) ) + $errors->add( 'pass', __( 'ERROR: You entered your new password only once.' ), array( 'form-field' => 'pass1' ) ); + elseif ( !empty($pass1) && empty($pass2) ) + $errors->add( 'pass', __( 'ERROR: You entered your new password only once.' ), array( 'form-field' => 'pass2' ) ); + } else { + if ( empty($pass1) ) + $errors->add( 'pass', __( 'ERROR: Please enter your password.' ), array( 'form-field' => 'pass1' ) ); + elseif ( empty($pass2) ) + $errors->add( 'pass', __( 'ERROR: Please enter your password twice.' ), array( 'form-field' => 'pass2' ) ); + } + + /* Check for "\" in password */ + if ( false !== strpos( wp_unslash( $pass1 ), "\\" ) ) + $errors->add( 'pass', __( 'ERROR: Passwords may not contain the character "\\".' ), array( 'form-field' => 'pass1' ) ); + + /* checking the password has been typed twice the same */ + if ( $pass1 != $pass2 ) + $errors->add( 'pass', __( 'ERROR: Please enter the same password in the two password fields.' ), array( 'form-field' => 'pass1' ) ); + + if ( !empty( $pass1 ) ) + $user->user_pass = $pass1; + + if ( !$update && isset( $_POST['user_login'] ) && !validate_username( $_POST['user_login'] ) ) + $errors->add( 'user_login', __( 'ERROR: This username is invalid because it uses illegal characters. Please enter a valid username.' )); + + if ( !$update && username_exists( $user->user_login ) ) + $errors->add( 'user_login', __( 'ERROR: This username is already registered. Please choose another one.' )); + + /* checking e-mail address */ + if ( empty( $user->user_email ) ) { + $errors->add( 'empty_email', __( 'ERROR: Please enter an e-mail address.' ), array( 'form-field' => 'email' ) ); + } elseif ( !is_email( $user->user_email ) ) { + $errors->add( 'invalid_email', __( 'ERROR: The email address isn’t correct.' ), array( 'form-field' => 'email' ) ); + } elseif ( ( $owner_id = email_exists($user->user_email) ) && ( !$update || ( $owner_id != $user->ID ) ) ) { + $errors->add( 'email_exists', __('ERROR: This email is already registered, please choose another one.'), array( 'form-field' => 'email' ) ); + } + + /** + * Fires before user profile update errors are returned. + * + * @since 2.8.0 + * + * @param array &$errors An array of user profile update errors, passed by reference. + * @param bool $update Whether this is a user update. + * @param WP_User &$user WP_User object, passed by reference. + */ + do_action_ref_array( 'user_profile_update_errors', array( &$errors, $update, &$user ) ); + + if ( $errors->get_error_codes() ) + return $errors; + + if ( $update ) { + $user_id = wp_update_user( $user ); + } else { + $user_id = wp_insert_user( $user ); + wp_new_user_notification( $user_id, isset( $_POST['send_password'] ) ? wp_unslash( $pass1 ) : '' ); + } + return $user_id; +} + +/** + * Fetch a filtered list of user roles that the current user is + * allowed to edit. + * + * Simple function who's main purpose is to allow filtering of the + * list of roles in the $wp_roles object so that plugins can remove + * inappropriate ones depending on the situation or user making edits. + * Specifically because without filtering anyone with the edit_users + * capability can edit others to be administrators, even if they are + * only editors or authors. This filter allows admins to delegate + * user management. + * + * @since 2.8.0 + * + * @return unknown + */ +function get_editable_roles() { + global $wp_roles; + + $all_roles = $wp_roles->roles; + + /** + * Filter the list of editable roles. + * + * @since 2.8.0 + * + * @param array $all_roles List of roles. + */ + $editable_roles = apply_filters( 'editable_roles', $all_roles ); + + return $editable_roles; +} + +/** + * Retrieve user data and filter it. + * + * @since 2.0.5 + * + * @param int $user_id User ID. + * @return WP_User|bool WP_User object on success, false on failure. + */ +function get_user_to_edit( $user_id ) { + $user = get_userdata( $user_id ); + + if ( $user ) + $user->filter = 'edit'; + + return $user; +} + +/** + * Retrieve the user's drafts. + * + * @since 2.0.0 + * + * @param int $user_id User ID. + * @return array + */ +function get_users_drafts( $user_id ) { + global $wpdb; + $query = $wpdb->prepare("SELECT ID, post_title FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'draft' AND post_author = %d ORDER BY post_modified DESC", $user_id); + + /** + * Filter the user's drafts query string. + * + * @since 2.0.0 + * + * @param string $query The user's drafts query string. + */ + $query = apply_filters( 'get_users_drafts', $query ); + return $wpdb->get_results( $query ); +} + +/** + * Remove user and optionally reassign posts and links to another user. + * + * If the $reassign parameter is not assigned to an User ID, then all posts will + * be deleted of that user. The action 'delete_user' that is passed the User ID + * being deleted will be run after the posts are either reassigned or deleted. + * The user meta will also be deleted that are for that User ID. + * + * @since 2.0.0 + * + * @param int $id User ID. + * @param int $reassign Optional. Reassign posts and links to new User ID. + * @return bool True when finished. + */ +function wp_delete_user( $id, $reassign = null ) { + global $wpdb; + + $id = (int) $id; + $user = new WP_User( $id ); + + if ( !$user->exists() ) + return false; + + // Normalize $reassign to null or a user ID. 'novalue' was an older default. + if ( 'novalue' === $reassign ) { + $reassign = null; + } elseif ( null !== $reassign ) { + $reassign = (int) $reassign; + } + + /** + * Fires immediately before a user is deleted from the database. + * + * @since 2.0.0 + * + * @param int $id ID of the user to delete. + * @param int|null $reassign ID of the user to reassign posts and links to. + * Default null, for no reassignment. + */ + do_action( 'delete_user', $id, $reassign ); + + if ( null === $reassign ) { + $post_types_to_delete = array(); + foreach ( get_post_types( array(), 'objects' ) as $post_type ) { + if ( $post_type->delete_with_user ) { + $post_types_to_delete[] = $post_type->name; + } elseif ( null === $post_type->delete_with_user && post_type_supports( $post_type->name, 'author' ) ) { + $post_types_to_delete[] = $post_type->name; + } + } + + /** + * Filter the list of post types to delete with a user. + * + * @since 3.4.0 + * + * @param array $post_types_to_delete Post types to delete. + * @param int $id User ID. + */ + $post_types_to_delete = apply_filters( 'post_types_to_delete_with_user', $post_types_to_delete, $id ); + $post_types_to_delete = implode( "', '", $post_types_to_delete ); + $post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_author = %d AND post_type IN ('$post_types_to_delete')", $id ) ); + if ( $post_ids ) { + foreach ( $post_ids as $post_id ) + wp_delete_post( $post_id ); + } + + // Clean links + $link_ids = $wpdb->get_col( $wpdb->prepare("SELECT link_id FROM $wpdb->links WHERE link_owner = %d", $id) ); + + if ( $link_ids ) { + foreach ( $link_ids as $link_id ) + wp_delete_link($link_id); + } + } else { + $post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_author = %d", $id ) ); + $wpdb->update( $wpdb->posts, array('post_author' => $reassign), array('post_author' => $id) ); + if ( ! empty( $post_ids ) ) { + foreach ( $post_ids as $post_id ) + clean_post_cache( $post_id ); + } + $link_ids = $wpdb->get_col( $wpdb->prepare("SELECT link_id FROM $wpdb->links WHERE link_owner = %d", $id) ); + $wpdb->update( $wpdb->links, array('link_owner' => $reassign), array('link_owner' => $id) ); + if ( ! empty( $link_ids ) ) { + foreach ( $link_ids as $link_id ) + clean_bookmark_cache( $link_id ); + } + } + + // FINALLY, delete user + if ( is_multisite() ) { + remove_user_from_blog( $id, get_current_blog_id() ); + } else { + $meta = $wpdb->get_col( $wpdb->prepare( "SELECT umeta_id FROM $wpdb->usermeta WHERE user_id = %d", $id ) ); + foreach ( $meta as $mid ) + delete_metadata_by_mid( 'user', $mid ); + + $wpdb->delete( $wpdb->users, array( 'ID' => $id ) ); + } + + clean_user_cache( $user ); + + /** + * Fires immediately after a user is deleted from the database. + * + * @since 2.9.0 + * + * @param int $id ID of the deleted user. + * @param int|null $reassign ID of the user to reassign posts and links to. + * Default null, for no reassignment. + */ + do_action( 'deleted_user', $id, $reassign ); + + return true; +} + +/** + * Remove all capabilities from user. + * + * @since 2.1.0 + * + * @param int $id User ID. + */ +function wp_revoke_user($id) { + $id = (int) $id; + + $user = new WP_User($id); + $user->remove_all_caps(); +} + +add_action('admin_init', 'default_password_nag_handler'); +/** + * @since 2.8.0 + */ +function default_password_nag_handler($errors = false) { + global $user_ID; + if ( ! get_user_option('default_password_nag') ) //Short circuit it. + return; + + //get_user_setting = JS saved UI setting. else no-js-fallback code. + if ( 'hide' == get_user_setting('default_password_nag') || isset($_GET['default_password_nag']) && '0' == $_GET['default_password_nag'] ) { + delete_user_setting('default_password_nag'); + update_user_option($user_ID, 'default_password_nag', false, true); + } +} + +add_action('profile_update', 'default_password_nag_edit_user', 10, 2); +/** + * @since 2.8.0 + */ +function default_password_nag_edit_user($user_ID, $old_data) { + if ( ! get_user_option('default_password_nag', $user_ID) ) //Short circuit it. + return; + + $new_data = get_userdata($user_ID); + + if ( $new_data->user_pass != $old_data->user_pass ) { //Remove the nag if the password has been changed. + delete_user_setting('default_password_nag'); + update_user_option($user_ID, 'default_password_nag', false, true); + } +} + +add_action('admin_notices', 'default_password_nag'); +/** + * @since 2.8.0 + */ +function default_password_nag() { + global $pagenow; + if ( 'profile.php' == $pagenow || ! get_user_option('default_password_nag') ) //Short circuit it. + return; + + echo '
    '; + echo '

    '; + echo '' . __('Notice:') . ' '; + _e('You’re using the auto-generated password for your account. Would you like to change it to something easier to remember?'); + echo '

    '; + printf( '' . __('Yes, take me to my profile page') . ' | ', get_edit_profile_url() . '#password' ); + printf( '' . __('No thanks, do not remind me again') . '', '?default_password_nag=0' ); + echo '

    '; +} diff --git a/wp-admin/includes/widgets.php b/wp-admin/includes/widgets.php new file mode 100644 index 0000000..0a86815 --- /dev/null +++ b/wp-admin/includes/widgets.php @@ -0,0 +1,242 @@ + $widget['id'], 'widget_name' => $widget['name'], '_display' => 'template' ); + + if ( isset($wp_registered_widget_controls[$widget['id']]['id_base']) && isset($widget['params'][0]['number']) ) { + $id_base = $wp_registered_widget_controls[$widget['id']]['id_base']; + $args['_temp_id'] = "$id_base-__i__"; + $args['_multi_num'] = next_widget_id_number($id_base); + $args['_add'] = 'multi'; + } else { + $args['_add'] = 'single'; + if ( $sidebar ) + $args['_hide'] = '1'; + } + + $args = wp_list_widget_controls_dynamic_sidebar( array( 0 => $args, 1 => $widget['params'][0] ) ); + call_user_func_array( 'wp_widget_control', $args ); + } +} + +/** + * Callback to sort array by a 'name' key. + * + * @since 3.1.0 + * @access private + */ +function _sort_name_callback( $a, $b ) { + return strnatcasecmp( $a['name'], $b['name'] ); +} + +/** + * Show the widgets and their settings for a sidebar. + * Used in the admin widget config screen. + * + * @since 2.5.0 + * + * @param string $sidebar id slug of the sidebar + * @param string optional $sidebar_name Include the HTML for the sidebar name + */ +function wp_list_widget_controls( $sidebar, $sidebar_name = '' ) { + add_filter( 'dynamic_sidebar_params', 'wp_list_widget_controls_dynamic_sidebar' ); + + $description = wp_sidebar_description( $sidebar ); + + echo '
    '; + + if ( $sidebar_name ) { + ?> + + '; + + if ( ! empty( $description ) ) { + echo '

    ' . $description . '

    '; + } + + echo '
    '; + + dynamic_sidebar( $sidebar ); + + echo ''; +} + +/** + * {@internal Missing Short Description}} + * + * @since 2.5.0 + * + * @param array $params + * @return array + */ +function wp_list_widget_controls_dynamic_sidebar( $params ) { + global $wp_registered_widgets; + static $i = 0; + $i++; + + $widget_id = $params[0]['widget_id']; + $id = isset($params[0]['_temp_id']) ? $params[0]['_temp_id'] : $widget_id; + $hidden = isset($params[0]['_hide']) ? ' style="display:none;"' : ''; + + $params[0]['before_widget'] = "
    "; + $params[0]['after_widget'] = "
    "; + $params[0]['before_title'] = "%BEG_OF_TITLE%"; // deprecated + $params[0]['after_title'] = "%END_OF_TITLE%"; // deprecated + if ( is_callable( $wp_registered_widgets[$widget_id]['callback'] ) ) { + $wp_registered_widgets[$widget_id]['_callback'] = $wp_registered_widgets[$widget_id]['callback']; + $wp_registered_widgets[$widget_id]['callback'] = 'wp_widget_control'; + } + + return $params; +} + +function next_widget_id_number($id_base) { + global $wp_registered_widgets; + $number = 1; + + foreach ( $wp_registered_widgets as $widget_id => $widget ) { + if ( preg_match( '/' . $id_base . '-([0-9]+)$/', $widget_id, $matches ) ) + $number = max($number, $matches[1]); + } + $number++; + + return $number; +} + +/** + * Meta widget used to display the control form for a widget. + * + * Called from dynamic_sidebar(). + * + * @since 2.5.0 + * + * @param array $sidebar_args + * @return array + */ +function wp_widget_control( $sidebar_args ) { + global $wp_registered_widgets, $wp_registered_widget_controls, $sidebars_widgets; + + $widget_id = $sidebar_args['widget_id']; + $sidebar_id = isset($sidebar_args['id']) ? $sidebar_args['id'] : false; + $key = $sidebar_id ? array_search( $widget_id, $sidebars_widgets[$sidebar_id] ) : '-1'; // position of widget in sidebar + $control = isset($wp_registered_widget_controls[$widget_id]) ? $wp_registered_widget_controls[$widget_id] : array(); + $widget = $wp_registered_widgets[$widget_id]; + + $id_format = $widget['id']; + $widget_number = isset($control['params'][0]['number']) ? $control['params'][0]['number'] : ''; + $id_base = isset($control['id_base']) ? $control['id_base'] : $widget_id; + $multi_number = isset($sidebar_args['_multi_num']) ? $sidebar_args['_multi_num'] : ''; + $add_new = isset($sidebar_args['_add']) ? $sidebar_args['_add'] : ''; + + $query_arg = array( 'editwidget' => $widget['id'] ); + if ( $add_new ) { + $query_arg['addnew'] = 1; + if ( $multi_number ) { + $query_arg['num'] = $multi_number; + $query_arg['base'] = $id_base; + } + } else { + $query_arg['sidebar'] = $sidebar_id; + $query_arg['key'] = $key; + } + + // We aren't showing a widget control, we're outputting a template for a multi-widget control + if ( isset($sidebar_args['_display']) && 'template' == $sidebar_args['_display'] && $widget_number ) { + // number == -1 implies a template where id numbers are replaced by a generic '__i__' + $control['params'][0]['number'] = -1; + // with id_base widget id's are constructed like {$id_base}-{$id_number} + if ( isset($control['id_base']) ) + $id_format = $control['id_base'] . '-__i__'; + } + + $wp_registered_widgets[$widget_id]['callback'] = $wp_registered_widgets[$widget_id]['_callback']; + unset($wp_registered_widgets[$widget_id]['_callback']); + + $widget_title = esc_html( strip_tags( $sidebar_args['widget_name'] ) ); + $has_form = 'noform'; + + echo $sidebar_args['before_widget']; ?> +
    +
    + + + + + + +
    +

    +
    + +
    +
    +
    +" . __('There are no options for this widget.') . "

    \n"; ?> +
    + + + + + + + + +
    +
    + | + +
    +
    + 'widget-' . esc_attr( $id_format ) . '-savewidget' ) ); ?> + +
    +
    +
    +
    +
    + +
    + +
    +' . __( 'Welcome to your WordPress Dashboard! This is the screen you will see when you log in to your site, and gives you access to all the site management features of WordPress. You can get help for any screen by clicking the Help tab in the upper corner.' ) . '

    '; + +// Not using chaining here, so as to be parseable by PHP4. +$screen = get_current_screen(); + +$screen->add_help_tab( array( + 'id' => 'overview', + 'title' => __( 'Overview' ), + 'content' => $help, +) ); + +// Help tabs + +$help = '

    ' . __( 'The left-hand navigation menu provides links to all of the WordPress administration screens, with submenu items displayed on hover. You can minimize this menu to a narrow icon strip by clicking on the Collapse Menu arrow at the bottom.' ) . '

    '; +$help .= '

    ' . __( 'Links in the Toolbar at the top of the screen connect your dashboard and the front end of your site, and provide access to your profile and helpful WordPress information.' ) . '

    '; + +$screen->add_help_tab( array( + 'id' => 'help-navigation', + 'title' => __( 'Navigation' ), + 'content' => $help, +) ); + +$help = '

    ' . __( 'You can use the following controls to arrange your Dashboard screen to suit your workflow. This is true on most other administration screens as well.' ) . '

    '; +$help .= '

    ' . __( 'Screen Options - Use the Screen Options tab to choose which Dashboard boxes to show.' ) . '

    '; +$help .= '

    ' . __( 'Drag and Drop - To rearrange the boxes, drag and drop by clicking on the title bar of the selected box and releasing when you see a gray dotted-line rectangle appear in the location you want to place the box.' ) . '

    '; +$help .= '

    ' . __( 'Box Controls - Click the title bar of the box to expand or collapse it. Some boxes added by plugins may have configurable content, and will show a “Configure” link in the title bar if you hover over it.' ) . '

    '; + +$screen->add_help_tab( array( + 'id' => 'help-layout', + 'title' => __( 'Layout' ), + 'content' => $help, +) ); + +$help = '

    ' . __( 'The boxes on your Dashboard screen are:' ) . '

    '; +if ( current_user_can( 'edit_posts' ) ) + $help .= '

    ' . __( 'At A Glance - Displays a summary of the content on your site and identifies which theme and version of WordPress you are using.' ) . '

    '; + $help .= '

    ' . __( 'Activity - Shows the upcoming scheduled posts, recently published posts, and the most recent comments on your posts and allows you to moderate them.' ) . '

    '; +if ( is_blog_admin() && current_user_can( 'edit_posts' ) ) + $help .= '

    ' . __( "Quick Draft - Allows you to create a new post and save it as a draft. Also displays links to the 5 most recent draft posts you've started." ) . '

    '; +if ( ! is_multisite() && current_user_can( 'install_plugins' ) ) + $help .= '

    ' . __( 'WordPress News - Latest news from the official WordPress project, the WordPress Planet, and popular and recent plugins.' ) . '

    '; +else + $help .= '

    ' . __( 'WordPress News - Latest news from the official WordPress project, the WordPress Planet.' ) . '

    '; +if ( current_user_can( 'edit_theme_options' ) ) + $help .= '

    ' . __( 'Welcome - Shows links for some of the most common tasks when setting up a new site.' ) . '

    '; + +$screen->add_help_tab( array( + 'id' => 'help-content', + 'title' => __( 'Content' ), + 'content' => $help, +) ); + +unset( $help ); + +$screen->set_help_sidebar( + '

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

    ' . + '

    ' . __( 'Documentation on Dashboard' ) . '

    ' . + '

    ' . __( 'Support Forums' ) . '

    ' +); + +include( ABSPATH . 'wp-admin/admin-header.php' ); +?> + +
    +

    + +user_email != get_option( 'admin_email' ) ); + if ( $hide ) + $classes .= ' hidden'; ?> + +
    + + + remove_action( 'welcome_panel', 'wp_welcome_panel' ); + * + * @since 3.5.0 + */ + do_action( 'welcome_panel' ); + ?> +
    + + +
    + +
    + +
    + + + * check_column('wp_links', 'link_description', 'mediumtext'); + * if (check_column($wpdb->comments, 'comment_author', 'tinytext')) + * echo "ok\n"; + * + * $error_count = 0; + * $tablename = $wpdb->links; + * // check the column + * if (!check_column($wpdb->links, 'link_description', 'varchar(255)')) { + * $ddl = "ALTER TABLE $wpdb->links MODIFY COLUMN link_description varchar(255) NOT NULL DEFAULT '' "; + * $q = $wpdb->query($ddl); + * } + * + * if (check_column($wpdb->links, 'link_description', 'varchar(255)')) { + * $res .= $tablename . ' - ok
    '; + * } else { + * $res .= 'There was a problem with ' . $tablename . '
    '; + * ++$error_count; + * } + * + * + * @package WordPress + * @subpackage Plugin + */ + +/** Load WordPress Bootstrap */ +require_once(dirname(dirname(__FILE__)).'/wp-load.php'); + +if ( ! function_exists('maybe_create_table') ) : +/** + * Create database table, if it doesn't already exist. + * + * @since 1.0.0 + * + * @uses $wpdb + * + * @param string $table_name Database table name. + * @param string $create_ddl Create database table SQL. + * @return bool False on error, true if already exists or success. + */ +function maybe_create_table($table_name, $create_ddl) { + global $wpdb; + foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) { + if ($table == $table_name) { + return true; + } + } + //didn't find it try to create it. + $wpdb->query($create_ddl); + // we cannot directly tell that whether this succeeded! + foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) { + if ($table == $table_name) { + return true; + } + } + return false; +} +endif; + +if ( ! function_exists('maybe_add_column') ) : +/** + * Add column to database table, if column doesn't already exist in table. + * + * @since 1.0.0 + * + * @uses $wpdb + * + * @param string $table_name Database table name + * @param string $column_name Table column name + * @param string $create_ddl SQL to add column to table. + * @return bool False on failure. True, if already exists or was successful. + */ +function maybe_add_column($table_name, $column_name, $create_ddl) { + global $wpdb; + foreach ($wpdb->get_col("DESC $table_name",0) as $column ) { + + if ($column == $column_name) { + return true; + } + } + //didn't find it try to create it. + $wpdb->query($create_ddl); + // we cannot directly tell that whether this succeeded! + foreach ($wpdb->get_col("DESC $table_name",0) as $column ) { + if ($column == $column_name) { + return true; + } + } + return false; +} +endif; + +/** + * Drop column from database table, if it exists. + * + * @since 1.0.0 + * + * @uses $wpdb + * + * @param string $table_name Table name + * @param string $column_name Column name + * @param string $drop_ddl SQL statement to drop column. + * @return bool False on failure, true on success or doesn't exist. + */ +function maybe_drop_column($table_name, $column_name, $drop_ddl) { + global $wpdb; + foreach ($wpdb->get_col("DESC $table_name",0) as $column ) { + if ($column == $column_name) { + //found it try to drop it. + $wpdb->query($drop_ddl); + // we cannot directly tell that whether this succeeded! + foreach ($wpdb->get_col("DESC $table_name",0) as $column ) { + if ($column == $column_name) { + return false; + } + } + } + } + // else didn't find it + return true; +} + +/** + * Check column matches criteria. + * + * Uses the SQL DESC for retrieving the table info for the column. It will help + * understand the parameters, if you do more research on what column information + * is returned by the SQL statement. Pass in null to skip checking that + * criteria. + * + * Column names returned from DESC table are case sensitive and are listed: + * Field + * Type + * Null + * Key + * Default + * Extra + * + * @since 1.0.0 + * + * @param string $table_name Table name + * @param string $col_name Column name + * @param string $col_type Column type + * @param bool $is_null Optional. Check is null. + * @param mixed $key Optional. Key info. + * @param mixed $default Optional. Default value. + * @param mixed $extra Optional. Extra value. + * @return bool True, if matches. False, if not matching. + */ +function check_column($table_name, $col_name, $col_type, $is_null = null, $key = null, $default = null, $extra = null) { + global $wpdb; + $diffs = 0; + $results = $wpdb->get_results("DESC $table_name"); + + foreach ($results as $row ) { + + if ($row->Field == $col_name) { + // got our column, check the params + if (($col_type != null) && ($row->Type != $col_type)) { + ++$diffs; + } + if (($is_null != null) && ($row->Null != $is_null)) { + ++$diffs; + } + if (($key != null) && ($row->Key != $key)) { + ++$diffs; + } + if (($default != null) && ($row->Default != $default)) { + ++$diffs; + } + if (($extra != null) && ($row->Extra != $extra)) { + ++$diffs; + } + if ($diffs > 0) { + return false; + } + return true; + } // end if found our column + } + return false; +} diff --git a/wp-admin/install.php b/wp-admin/install.php new file mode 100644 index 0000000..d29c809 --- /dev/null +++ b/wp-admin/install.php @@ -0,0 +1,256 @@ + + + + + + Error: PHP is not running + + +

    WordPress

    +

    Error: PHP is not running

    +

    WordPress requires that your web server is running PHP. Your server does not have PHP installed, or PHP is turned off.

    + + + + +> + + + + <?php _e( 'WordPress › Installation' ); ?> + + + +

    + +get_var("SHOW TABLES LIKE '$wpdb->users'") != null ); + + // Ensure that Blogs appear in search engines by default + $blog_public = 1; + if ( ! empty( $_POST ) ) + $blog_public = isset( $_POST['blog_public'] ); + + $weblog_title = isset( $_POST['weblog_title'] ) ? trim( wp_unslash( $_POST['weblog_title'] ) ) : ''; + $user_name = isset($_POST['user_name']) ? trim( wp_unslash( $_POST['user_name'] ) ) : ''; + $admin_password = isset($_POST['admin_password']) ? trim( wp_unslash( $_POST['admin_password'] ) ) : ''; + $admin_email = isset( $_POST['admin_email'] ) ? trim( wp_unslash( $_POST['admin_email'] ) ) : ''; + + if ( ! is_null( $error ) ) { +?> +

    + +
    + + + + + + + + + + + + + + + + + + + + + + + +
    + '; + } else { + ?> +

    + +
    + +

    +
    + +

    +
    +

    +
    +

    +

    +
    +' . __( 'Already Installed' ) . '

    ' . __( 'You appear to have already installed WordPress. To reinstall please clear your old database tables first.' ) . '

    ' . __( 'Log In' ) . '

    ' ); +} + +$php_version = phpversion(); +$mysql_version = $wpdb->db_version(); +$php_compat = version_compare( $php_version, $required_php_version, '>=' ); +$mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' ); + +if ( !$mysql_compat && !$php_compat ) + $compat = sprintf( __( 'You cannot install because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.' ), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version ); +elseif ( !$php_compat ) + $compat = sprintf( __( 'You cannot install because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_php_version, $php_version ); +elseif ( !$mysql_compat ) + $compat = sprintf( __( 'You cannot install because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_mysql_version, $mysql_version ); + +if ( !$mysql_compat || !$php_compat ) { + display_header(); + die( '

    ' . __( 'Insufficient Requirements' ) . '

    ' . $compat . '

    ' ); +} + +if ( ! is_string( $wpdb->base_prefix ) || '' === $wpdb->base_prefix ) { + display_header(); + die( '

    ' . __( 'Configuration Error' ) . '

    ' . __( 'Your wp-config.php file has an empty database table prefix, which is not supported.' ) . '

    ' ); +} + +switch($step) { + case 0: // Step 1 + case 1: // Step 1, direct link. + display_header(); +?> +

    +

    ReadMe documentation at your leisure. Otherwise, just fill in the information below and you’ll be on your way to using the most extendable and powerful personal publishing platform in the world.' ), '../readme.html' ); ?>

    + +

    +

    + +error ) ) + wp_die( $wpdb->error->get_error_message() ); + + display_header(); + // Fill in the data we gathered + $weblog_title = isset( $_POST['weblog_title'] ) ? trim( wp_unslash( $_POST['weblog_title'] ) ) : ''; + $user_name = isset($_POST['user_name']) ? trim( wp_unslash( $_POST['user_name'] ) ) : ''; + $admin_password = isset($_POST['admin_password']) ? wp_unslash( $_POST['admin_password'] ) : ''; + $admin_password_check = isset($_POST['admin_password2']) ? wp_unslash( $_POST['admin_password2'] ) : ''; + $admin_email = isset( $_POST['admin_email'] ) ?trim( wp_unslash( $_POST['admin_email'] ) ) : ''; + $public = isset( $_POST['blog_public'] ) ? (int) $_POST['blog_public'] : 0; + // check e-mail address + $error = false; + if ( empty( $user_name ) ) { + // TODO: poka-yoke + display_setup_form( __( 'Please provide a valid username.' ) ); + $error = true; + } elseif ( $user_name != sanitize_user( $user_name, true ) ) { + display_setup_form( __( 'The username you provided has invalid characters.' ) ); + $error = true; + } elseif ( $admin_password != $admin_password_check ) { + // TODO: poka-yoke + display_setup_form( __( 'Your passwords do not match. Please try again.' ) ); + $error = true; + } else if ( empty( $admin_email ) ) { + // TODO: poka-yoke + display_setup_form( __( 'You must provide an email address.' ) ); + $error = true; + } elseif ( ! is_email( $admin_email ) ) { + // TODO: poka-yoke + display_setup_form( __( 'Sorry, that isn’t a valid email address. Email addresses look like username@example.com.' ) ); + $error = true; + } + + if ( $error === false ) { + $wpdb->show_errors(); + $result = wp_install($weblog_title, $user_name, $admin_email, $public, '', wp_slash( $admin_password ) ); + extract( $result, EXTR_SKIP ); +?> + +

    + +

    + + + + + + + + + + +
    '. esc_html($password) .'
    '; + echo "

    $password_message

    "; ?> +
    + +

    + + + + + + + diff --git a/wp-admin/js/accordion.js b/wp-admin/js/accordion.js new file mode 100644 index 0000000..7bc99cc --- /dev/null +++ b/wp-admin/js/accordion.js @@ -0,0 +1,55 @@ +( function( $ ){ + + $( document ).ready( function () { + + // Expand/Collapse on click + $( '.accordion-container' ).on( 'click keydown', '.accordion-section-title', function( e ) { + if ( e.type === 'keydown' && 13 !== e.which ) // "return" key + return; + e.preventDefault(); // Keep this AFTER the key filter above + + accordionSwitch( $( this ) ); + }); + + // Re-initialize accordion when screen options are toggled + $( '.hide-postbox-tog' ).click( function () { + accordionInit(); + }); + + }); + + var accordionOptions = $( '.accordion-container li.accordion-section' ), + sectionContent = $( '.accordion-section-content' ); + + function accordionInit () { + // Rounded corners + accordionOptions.removeClass( 'top bottom' ); + accordionOptions.filter( ':visible' ).first().addClass( 'top' ); + accordionOptions.filter( ':visible' ).last().addClass( 'bottom' ).find( sectionContent ).addClass( 'bottom' ); + } + + function accordionSwitch ( el ) { + var section = el.closest( '.accordion-section' ), + siblings = section.closest( '.accordion-container' ).find( '.open' ), + content = section.find( sectionContent ); + + if ( section.hasClass( 'cannot-expand' ) ) + return; + + if ( section.hasClass( 'open' ) ) { + section.toggleClass( 'open' ); + content.toggle( true ).slideToggle( 150 ); + } else { + siblings.removeClass( 'open' ); + siblings.find( sectionContent ).show().slideUp( 150 ); + content.toggle( false ).slideToggle( 150 ); + section.toggleClass( 'open' ); + } + + accordionInit(); + } + + // Initialize the accordion (currently just corner fixes) + accordionInit(); + +})(jQuery); diff --git a/wp-admin/js/accordion.min.js b/wp-admin/js/accordion.min.js new file mode 100644 index 0000000..a67e757 --- /dev/null +++ b/wp-admin/js/accordion.min.js @@ -0,0 +1 @@ +!function(a){function b(){d.removeClass("top bottom"),d.filter(":visible").first().addClass("top"),d.filter(":visible").last().addClass("bottom").find(e).addClass("bottom")}function c(a){var c=a.closest(".accordion-section"),d=c.closest(".accordion-container").find(".open"),f=c.find(e);c.hasClass("cannot-expand")||(c.hasClass("open")?(c.toggleClass("open"),f.toggle(!0).slideToggle(150)):(d.removeClass("open"),d.find(e).show().slideUp(150),f.toggle(!1).slideToggle(150),c.toggleClass("open")),b())}a(document).ready(function(){a(".accordion-container").on("click keydown",".accordion-section-title",function(b){("keydown"!==b.type||13===b.which)&&(b.preventDefault(),c(a(this)))}),a(".hide-postbox-tog").click(function(){b()})});var d=a(".accordion-container li.accordion-section"),e=a(".accordion-section-content");b()}(jQuery); \ No newline at end of file diff --git a/wp-admin/js/color-picker.js b/wp-admin/js/color-picker.js new file mode 100644 index 0000000..1cc0a13 --- /dev/null +++ b/wp-admin/js/color-picker.js @@ -0,0 +1,134 @@ +/* global wpColorPickerL10n:true */ +( function( $, undef ){ + + var ColorPicker, + // html stuff + _before = '', + _after = '
    ', + _wrap = '
    ', + _button = ''; + + // jQuery UI Widget constructor + ColorPicker = { + options: { + defaultColor: false, + change: false, + clear: false, + hide: true, + palettes: true + }, + _create: function() { + // bail early for unsupported Iris. + if ( ! $.support.iris ) + return; + var self = this, + el = self.element; + + $.extend( self.options, el.data() ); + + self.initialValue = el.val(); + + // Set up HTML structure, hide things + el.addClass( 'wp-color-picker' ).hide().wrap( _wrap ); + self.wrap = el.parent(); + self.toggler = $( _before ).insertBefore( el ).css( { backgroundColor: self.initialValue } ).attr( 'title', wpColorPickerL10n.pick ).attr( 'data-current', wpColorPickerL10n.current ); + self.pickerContainer = $( _after ).insertAfter( el ); + self.button = $( _button ); + + if ( self.options.defaultColor ) + self.button.addClass( 'wp-picker-default' ).val( wpColorPickerL10n.defaultString ); + else + self.button.addClass( 'wp-picker-clear' ).val( wpColorPickerL10n.clear ); + + el.wrap('').after(self.button); + + el.iris( { + target: self.pickerContainer, + hide: true, + width: 255, + mode: 'hsv', + palettes: self.options.palettes, + change: function( event, ui ) { + self.toggler.css( { backgroundColor: ui.color.toString() } ); + // check for a custom cb + if ( $.isFunction( self.options.change ) ) + self.options.change.call( this, event, ui ); + } + } ); + el.val( self.initialValue ); + self._addListeners(); + if ( ! self.options.hide ) + self.toggler.click(); + }, + _addListeners: function() { + var self = this; + + self.toggler.click( function( event ){ + event.stopPropagation(); + self.element.toggle().iris( 'toggle' ); + self.button.toggleClass('hidden'); + self.toggler.toggleClass( 'wp-picker-open' ); + + // close picker when you click outside it + if ( self.toggler.hasClass( 'wp-picker-open' ) ) + $( 'body' ).on( 'click', { wrap: self.wrap, toggler: self.toggler }, self._bodyListener ); + else + $( 'body' ).off( 'click', self._bodyListener ); + }); + + self.element.change(function( event ) { + var me = $(this), + val = me.val(); + // Empty = clear + if ( val === '' || val === '#' ) { + self.toggler.css('backgroundColor', ''); + // fire clear callback if we have one + if ( $.isFunction( self.options.clear ) ) + self.options.clear.call( this, event ); + } + }); + + // open a keyboard-focused closed picker with space or enter + self.toggler.on('keyup', function( e ) { + if ( e.keyCode === 13 || e.keyCode === 32 ) { + e.preventDefault(); + self.toggler.trigger('click').next().focus(); + } + }); + + self.button.click( function( event ) { + var me = $(this); + if ( me.hasClass( 'wp-picker-clear' ) ) { + self.element.val( '' ); + self.toggler.css('backgroundColor', ''); + if ( $.isFunction( self.options.clear ) ) + self.options.clear.call( this, event ); + } else if ( me.hasClass( 'wp-picker-default' ) ) { + self.element.val( self.options.defaultColor ).change(); + } + }); + }, + _bodyListener: function( event ) { + if ( ! event.data.wrap.find( event.target ).length ) + event.data.toggler.click(); + }, + // $("#input").wpColorPicker('color') returns the current color + // $("#input").wpColorPicker('color', '#bada55') to set + color: function( newColor ) { + if ( newColor === undef ) + return this.element.iris( 'option', 'color' ); + + this.element.iris( 'option', 'color', newColor ); + }, + //$("#input").wpColorPicker('defaultColor') returns the current default color + //$("#input").wpColorPicker('defaultColor', newDefaultColor) to set + defaultColor: function( newDefaultColor ) { + if ( newDefaultColor === undef ) + return this.options.defaultColor; + + this.options.defaultColor = newDefaultColor; + } + }; + + $.widget( 'wp.wpColorPicker', ColorPicker ); +}( jQuery ) ); diff --git a/wp-admin/js/color-picker.min.js b/wp-admin/js/color-picker.min.js new file mode 100644 index 0000000..92e935f --- /dev/null +++ b/wp-admin/js/color-picker.min.js @@ -0,0 +1 @@ +!function(a,b){var c,d='',e='
    ',f='
    ',g='';c={options:{defaultColor:!1,change:!1,clear:!1,hide:!0,palettes:!0},_create:function(){if(a.support.iris){var b=this,c=b.element;a.extend(b.options,c.data()),b.initialValue=c.val(),c.addClass("wp-color-picker").hide().wrap(f),b.wrap=c.parent(),b.toggler=a(d).insertBefore(c).css({backgroundColor:b.initialValue}).attr("title",wpColorPickerL10n.pick).attr("data-current",wpColorPickerL10n.current),b.pickerContainer=a(e).insertAfter(c),b.button=a(g),b.options.defaultColor?b.button.addClass("wp-picker-default").val(wpColorPickerL10n.defaultString):b.button.addClass("wp-picker-clear").val(wpColorPickerL10n.clear),c.wrap('').after(b.button),c.iris({target:b.pickerContainer,hide:!0,width:255,mode:"hsv",palettes:b.options.palettes,change:function(c,d){b.toggler.css({backgroundColor:d.color.toString()}),a.isFunction(b.options.change)&&b.options.change.call(this,c,d)}}),c.val(b.initialValue),b._addListeners(),b.options.hide||b.toggler.click()}},_addListeners:function(){var b=this;b.toggler.click(function(c){c.stopPropagation(),b.element.toggle().iris("toggle"),b.button.toggleClass("hidden"),b.toggler.toggleClass("wp-picker-open"),b.toggler.hasClass("wp-picker-open")?a("body").on("click",{wrap:b.wrap,toggler:b.toggler},b._bodyListener):a("body").off("click",b._bodyListener)}),b.element.change(function(c){var d=a(this),e=d.val();(""===e||"#"===e)&&(b.toggler.css("backgroundColor",""),a.isFunction(b.options.clear)&&b.options.clear.call(this,c))}),b.toggler.on("keyup",function(a){(13===a.keyCode||32===a.keyCode)&&(a.preventDefault(),b.toggler.trigger("click").next().focus())}),b.button.click(function(c){var d=a(this);d.hasClass("wp-picker-clear")?(b.element.val(""),b.toggler.css("backgroundColor",""),a.isFunction(b.options.clear)&&b.options.clear.call(this,c)):d.hasClass("wp-picker-default")&&b.element.val(b.options.defaultColor).change()})},_bodyListener:function(a){a.data.wrap.find(a.target).length||a.data.toggler.click()},color:function(a){return a===b?this.element.iris("option","color"):void this.element.iris("option","color",a)},defaultColor:function(a){return a===b?this.options.defaultColor:void(this.options.defaultColor=a)}},a.widget("wp.wpColorPicker",c)}(jQuery); \ No newline at end of file diff --git a/wp-admin/js/comment.js b/wp-admin/js/comment.js new file mode 100644 index 0000000..b5506ea --- /dev/null +++ b/wp-admin/js/comment.js @@ -0,0 +1,50 @@ +/* global postboxes:true, commentL10n:true */ +jQuery(document).ready( function($) { + + postboxes.add_postbox_toggles('comment'); + + var stamp = $('#timestamp').html(); + $('.edit-timestamp').click(function () { + if ($('#timestampdiv').is(':hidden')) { + $('#timestampdiv').slideDown('normal'); + $('.edit-timestamp').hide(); + } + return false; + }); + + $('.cancel-timestamp').click(function() { + $('#timestampdiv').slideUp('normal'); + $('#mm').val($('#hidden_mm').val()); + $('#jj').val($('#hidden_jj').val()); + $('#aa').val($('#hidden_aa').val()); + $('#hh').val($('#hidden_hh').val()); + $('#mn').val($('#hidden_mn').val()); + $('#timestamp').html(stamp); + $('.edit-timestamp').show(); + return false; + }); + + $('.save-timestamp').click(function () { // crazyhorse - multiple ok cancels + var aa = $('#aa').val(), mm = $('#mm').val(), jj = $('#jj').val(), hh = $('#hh').val(), mn = $('#mn').val(), + newD = new Date( aa, mm - 1, jj, hh, mn ); + + if ( newD.getFullYear() != aa || (1 + newD.getMonth()) != mm || newD.getDate() != jj || newD.getMinutes() != mn ) { + $('.timestamp-wrap', '#timestampdiv').addClass('form-invalid'); + return false; + } else { + $('.timestamp-wrap', '#timestampdiv').removeClass('form-invalid'); + } + + $('#timestampdiv').slideUp('normal'); + $('.edit-timestamp').show(); + $('#timestamp').html( + commentL10n.submittedOn + ' ' + + $( '#mm option[value="' + mm + '"]' ).text() + ' ' + + jj + ', ' + + aa + ' @ ' + + hh + ':' + + mn + ' ' + ); + return false; + }); +}); diff --git a/wp-admin/js/comment.min.js b/wp-admin/js/comment.min.js new file mode 100644 index 0000000..fbfa877 --- /dev/null +++ b/wp-admin/js/comment.min.js @@ -0,0 +1 @@ +jQuery(document).ready(function(a){postboxes.add_postbox_toggles("comment");var b=a("#timestamp").html();a(".edit-timestamp").click(function(){return a("#timestampdiv").is(":hidden")&&(a("#timestampdiv").slideDown("normal"),a(".edit-timestamp").hide()),!1}),a(".cancel-timestamp").click(function(){return a("#timestampdiv").slideUp("normal"),a("#mm").val(a("#hidden_mm").val()),a("#jj").val(a("#hidden_jj").val()),a("#aa").val(a("#hidden_aa").val()),a("#hh").val(a("#hidden_hh").val()),a("#mn").val(a("#hidden_mn").val()),a("#timestamp").html(b),a(".edit-timestamp").show(),!1}),a(".save-timestamp").click(function(){var b=a("#aa").val(),c=a("#mm").val(),d=a("#jj").val(),e=a("#hh").val(),f=a("#mn").val(),g=new Date(b,c-1,d,e,f);return g.getFullYear()!=b||1+g.getMonth()!=c||g.getDate()!=d||g.getMinutes()!=f?(a(".timestamp-wrap","#timestampdiv").addClass("form-invalid"),!1):(a(".timestamp-wrap","#timestampdiv").removeClass("form-invalid"),a("#timestampdiv").slideUp("normal"),a(".edit-timestamp").show(),a("#timestamp").html(commentL10n.submittedOn+" "+a('#mm option[value="'+c+'"]').text()+" "+d+", "+b+" @ "+e+":"+f+" "),!1)})}); \ No newline at end of file diff --git a/wp-admin/js/common.js b/wp-admin/js/common.js new file mode 100644 index 0000000..510f295 --- /dev/null +++ b/wp-admin/js/common.js @@ -0,0 +1,735 @@ +/* global setUserSetting, ajaxurl, commonL10n, alert, confirm, pagenow */ +var showNotice, adminMenu, columns, validateForm, screenMeta; +( function( $, window, undefined ) { +// Removed in 3.3. +// (perhaps) needed for back-compat +adminMenu = { + init : function() {}, + fold : function() {}, + restoreMenuState : function() {}, + toggle : function() {}, + favorites : function() {} +}; + +// show/hide/save table columns +columns = { + init : function() { + var that = this; + $('.hide-column-tog', '#adv-settings').click( function() { + var $t = $(this), column = $t.val(); + if ( $t.prop('checked') ) + that.checked(column); + else + that.unchecked(column); + + columns.saveManageColumnsState(); + }); + }, + + saveManageColumnsState : function() { + var hidden = this.hidden(); + $.post(ajaxurl, { + action: 'hidden-columns', + hidden: hidden, + screenoptionnonce: $('#screenoptionnonce').val(), + page: pagenow + }); + }, + + checked : function(column) { + $('.column-' + column).show(); + this.colSpanChange(+1); + }, + + unchecked : function(column) { + $('.column-' + column).hide(); + this.colSpanChange(-1); + }, + + hidden : function() { + return $('.manage-column').filter(':hidden').map(function() { return this.id; }).get().join(','); + }, + + useCheckboxesForHidden : function() { + this.hidden = function(){ + return $('.hide-column-tog').not(':checked').map(function() { + var id = this.id; + return id.substring( id, id.length - 5 ); + }).get().join(','); + }; + }, + + colSpanChange : function(diff) { + var $t = $('table').find('.colspanchange'), n; + if ( !$t.length ) + return; + n = parseInt( $t.attr('colspan'), 10 ) + diff; + $t.attr('colspan', n.toString()); + } +}; + +$(document).ready(function(){columns.init();}); + +validateForm = function( form ) { + return !$( form ) + .find( '.form-required' ) + .filter( function() { return $( 'input:visible', this ).val() === ''; } ) + .addClass( 'form-invalid' ) + .find( 'input:visible' ) + .change( function() { $( this ).closest( '.form-invalid' ).removeClass( 'form-invalid' ); } ) + .size(); +}; + +// stub for doing better warnings +showNotice = { + warn : function() { + var msg = commonL10n.warnDelete || ''; + if ( confirm(msg) ) { + return true; + } + + return false; + }, + + note : function(text) { + alert(text); + } +}; + +screenMeta = { + element: null, // #screen-meta + toggles: null, // .screen-meta-toggle + page: null, // #wpcontent + + init: function() { + this.element = $('#screen-meta'); + this.toggles = $('.screen-meta-toggle a'); + this.page = $('#wpcontent'); + + this.toggles.click( this.toggleEvent ); + }, + + toggleEvent: function( e ) { + var panel = $( this.href.replace(/.+#/, '#') ); + e.preventDefault(); + + if ( !panel.length ) + return; + + if ( panel.is(':visible') ) + screenMeta.close( panel, $(this) ); + else + screenMeta.open( panel, $(this) ); + }, + + open: function( panel, link ) { + + $('.screen-meta-toggle').not( link.parent() ).css('visibility', 'hidden'); + + panel.parent().show(); + panel.slideDown( 'fast', function() { + panel.focus(); + link.addClass('screen-meta-active').attr('aria-expanded', true); + }); + }, + + close: function( panel, link ) { + panel.slideUp( 'fast', function() { + link.removeClass('screen-meta-active').attr('aria-expanded', false); + $('.screen-meta-toggle').css('visibility', ''); + panel.parent().hide(); + }); + } +}; + +/** + * Help tabs. + */ +$('.contextual-help-tabs').delegate('a', 'click focus', function(e) { + var link = $(this), + panel; + + e.preventDefault(); + + // Don't do anything if the click is for the tab already showing. + if ( link.is('.active a') ) + return false; + + // Links + $('.contextual-help-tabs .active').removeClass('active'); + link.parent('li').addClass('active'); + + panel = $( link.attr('href') ); + + // Panels + $('.help-tab-content').not( panel ).removeClass('active').hide(); + panel.addClass('active').show(); +}); + +$(document).ready( function() { + var checks, first, last, checked, sliced, mobileEvent, transitionTimeout, focusedRowActions, + lastClicked = false, + menu = $('#adminmenu'), + pageInput = $('input.current-page'), + currentPage = pageInput.val(); + + // when the menu is folded, make the fly-out submenu header clickable + menu.on('click.wp-submenu-head', '.wp-submenu-head', function(e){ + $(e.target).parent().siblings('a').get(0).click(); + }); + + $('#collapse-menu').on('click.collapse-menu', function() { + var body = $( document.body ), respWidth; + + // reset any compensation for submenus near the bottom of the screen + $('#adminmenu div.wp-submenu').css('margin-top', ''); + + if ( window.innerWidth ) { + // window.innerWidth is affected by zooming on phones + respWidth = Math.max( window.innerWidth, document.documentElement.clientWidth ); + } else { + // IE < 9 doesn't support @media CSS rules + respWidth = 901; + } + + if ( respWidth && respWidth < 900 ) { + if ( body.hasClass('auto-fold') ) { + body.removeClass('auto-fold').removeClass('folded'); + setUserSetting('unfold', 1); + setUserSetting('mfold', 'o'); + } else { + body.addClass('auto-fold'); + setUserSetting('unfold', 0); + } + } else { + if ( body.hasClass('folded') ) { + body.removeClass('folded'); + setUserSetting('mfold', 'o'); + } else { + body.addClass('folded'); + setUserSetting('mfold', 'f'); + } + } + }); + + if ( 'ontouchstart' in window || /IEMobile\/[1-9]/.test(navigator.userAgent) ) { // touch screen device + // iOS Safari works with touchstart, the rest work with click + mobileEvent = /Mobile\/.+Safari/.test(navigator.userAgent) ? 'touchstart' : 'click'; + + // close any open submenus when touch/click is not on the menu + $(document.body).on( mobileEvent+'.wp-mobile-hover', function(e) { + if ( menu.data('wp-responsive') ) { + return; + } + + if ( ! $(e.target).closest('#adminmenu').length ) { + menu.find('li.wp-has-submenu.opensub').removeClass('opensub'); + } + }); + + menu.find('a.wp-has-submenu').on( mobileEvent+'.wp-mobile-hover', function(e) { + var b, h, o, f, menutop, wintop, maxtop, + el = $(this), + parent = el.parent(), + m = parent.find('.wp-submenu'); + + if ( menu.data('wp-responsive') ) { + return; + } + + // Show the sub instead of following the link if: + // - the submenu is not open + // - the submenu is not shown inline or the menu is not folded + if ( !parent.hasClass('opensub') && ( !parent.hasClass('wp-menu-open') || parent.width() < 40 ) ) { + e.preventDefault(); + + menutop = parent.offset().top; + wintop = $(window).scrollTop(); + maxtop = menutop - wintop - 30; // max = make the top of the sub almost touch admin bar + + b = menutop + m.height() + 1; // Bottom offset of the menu + h = $('#wpwrap').height(); // Height of the entire page + o = 60 + b - h; + f = $(window).height() + wintop - 50; // The fold + + if ( f < (b - o) ) { + o = b - f; + } + + if ( o > maxtop ) { + o = maxtop; + } + + if ( o > 1 ) { + m.css('margin-top', '-'+o+'px'); + } else { + m.css('margin-top', ''); + } + + menu.find('li.opensub').removeClass('opensub'); + parent.addClass('opensub'); + } + }); + } + + menu.find('li.wp-has-submenu').hoverIntent({ + over: function() { + var b, h, o, f, m = $(this).find('.wp-submenu'), menutop, wintop, maxtop, top = parseInt( m.css('top'), 10 ); + + if ( isNaN(top) || top > -5 ) { // meaning the submenu is visible + return; + } + + if ( menu.data('wp-responsive') ) { + // The menu is in responsive mode, bail + return; + } + + menutop = $(this).offset().top; + wintop = $(window).scrollTop(); + maxtop = menutop - wintop - 30; // max = make the top of the sub almost touch admin bar + + b = menutop + m.height() + 1; // Bottom offset of the menu + h = $('#wpwrap').height(); // Height of the entire page + o = 60 + b - h; + f = $(window).height() + wintop - 15; // The fold + + if ( f < (b - o) ) { + o = b - f; + } + + if ( o > maxtop ) { + o = maxtop; + } + + if ( o > 1 ) { + m.css('margin-top', '-'+o+'px'); + } else { + m.css('margin-top', ''); + } + + menu.find('li.menu-top').removeClass('opensub'); + $(this).addClass('opensub'); + }, + out: function(){ + if ( menu.data('wp-responsive') ) { + // The menu is in responsive mode, bail + return; + } + + $(this).removeClass('opensub').find('.wp-submenu').css('margin-top', ''); + }, + timeout: 200, + sensitivity: 7, + interval: 90 + }); + + menu.on('focus.adminmenu', '.wp-submenu a', function(e){ + if ( menu.data('wp-responsive') ) { + // The menu is in responsive mode, bail + return; + } + + $(e.target).closest('li.menu-top').addClass('opensub'); + }).on('blur.adminmenu', '.wp-submenu a', function(e){ + if ( menu.data('wp-responsive') ) { + // The menu is in responsive mode, bail + return; + } + + $(e.target).closest('li.menu-top').removeClass('opensub'); + }); + + // Move .updated and .error alert boxes. Don't move boxes designed to be inline. + $('div.wrap h2:first').nextAll('div.updated, div.error').addClass('below-h2'); + $('div.updated, div.error').not('.below-h2, .inline').insertAfter( $('div.wrap h2:first') ); + + // Init screen meta + screenMeta.init(); + + // check all checkboxes + $('tbody').children().children('.check-column').find(':checkbox').click( function(e) { + if ( 'undefined' == e.shiftKey ) { return true; } + if ( e.shiftKey ) { + if ( !lastClicked ) { return true; } + checks = $( lastClicked ).closest( 'form' ).find( ':checkbox' ); + first = checks.index( lastClicked ); + last = checks.index( this ); + checked = $(this).prop('checked'); + if ( 0 < first && 0 < last && first != last ) { + sliced = ( last > first ) ? checks.slice( first, last ) : checks.slice( last, first ); + sliced.prop( 'checked', function() { + if ( $(this).closest('tr').is(':visible') ) + return checked; + + return false; + }); + } + } + lastClicked = this; + + // toggle "check all" checkboxes + var unchecked = $(this).closest('tbody').find(':checkbox').filter(':visible').not(':checked'); + $(this).closest('table').children('thead, tfoot').find(':checkbox').prop('checked', function() { + return ( 0 === unchecked.length ); + }); + + return true; + }); + + $('thead, tfoot').find('.check-column :checkbox').on( 'click.wp-toggle-checkboxes', function( event ) { + var $this = $(this), + $table = $this.closest( 'table' ), + controlChecked = $this.prop('checked'), + toggle = event.shiftKey || $this.data('wp-toggle'); + + $table.children( 'tbody' ).filter(':visible') + .children().children('.check-column').find(':checkbox') + .prop('checked', function() { + if ( $(this).is(':hidden') ) { + return false; + } + + if ( toggle ) { + return ! $(this).prop( 'checked' ); + } else if ( controlChecked ) { + return true; + } + + return false; + }); + + $table.children('thead, tfoot').filter(':visible') + .children().children('.check-column').find(':checkbox') + .prop('checked', function() { + if ( toggle ) { + return false; + } else if ( controlChecked ) { + return true; + } + + return false; + }); + }); + + // Show row actions on keyboard focus of its parent container element or any other elements contained within + $( 'td.post-title, td.title, td.comment, .bookmarks td.column-name, td.blogname, td.username, .dashboard-comment-wrap' ).focusin(function(){ + clearTimeout( transitionTimeout ); + focusedRowActions = $(this).find( '.row-actions' ); + focusedRowActions.addClass( 'visible' ); + }).focusout(function(){ + // Tabbing between post title and .row-actions links needs a brief pause, otherwise + // the .row-actions div gets hidden in transit in some browsers (ahem, Firefox). + transitionTimeout = setTimeout(function(){ + focusedRowActions.removeClass( 'visible' ); + }, 30); + }); + + $('#default-password-nag-no').click( function() { + setUserSetting('default_password_nag', 'hide'); + $('div.default-password-nag').hide(); + return false; + }); + + // tab in textareas + $('#newcontent').bind('keydown.wpevent_InsertTab', function(e) { + var el = e.target, selStart, selEnd, val, scroll, sel; + + if ( e.keyCode == 27 ) { // escape key + $(el).data('tab-out', true); + return; + } + + if ( e.keyCode != 9 || e.ctrlKey || e.altKey || e.shiftKey ) // tab key + return; + + if ( $(el).data('tab-out') ) { + $(el).data('tab-out', false); + return; + } + + selStart = el.selectionStart; + selEnd = el.selectionEnd; + val = el.value; + + try { + this.lastKey = 9; // not a standard DOM property, lastKey is to help stop Opera tab event. See blur handler below. + } catch(err) {} + + if ( document.selection ) { + el.focus(); + sel = document.selection.createRange(); + sel.text = '\t'; + } else if ( selStart >= 0 ) { + scroll = this.scrollTop; + el.value = val.substring(0, selStart).concat('\t', val.substring(selEnd) ); + el.selectionStart = el.selectionEnd = selStart + 1; + this.scrollTop = scroll; + } + + if ( e.stopPropagation ) + e.stopPropagation(); + if ( e.preventDefault ) + e.preventDefault(); + }); + + $('#newcontent').bind('blur.wpevent_InsertTab', function() { + if ( this.lastKey && 9 == this.lastKey ) + this.focus(); + }); + + if ( pageInput.length ) { + pageInput.closest('form').submit( function() { + + // Reset paging var for new filters/searches but not for bulk actions. See #17685. + if ( $('select[name="action"]').val() == -1 && $('select[name="action2"]').val() == -1 && pageInput.val() == currentPage ) + pageInput.val('1'); + }); + } + + $('.search-box input[type="search"], .search-box input[type="submit"]').mousedown(function () { + $('select[name^="action"]').val('-1'); + }); + + // Scroll into view when focused + $('#contextual-help-link, #show-settings-link').on( 'focus.scroll-into-view', function(e){ + if ( e.target.scrollIntoView ) + e.target.scrollIntoView(false); + }); + + // Disable upload buttons until files are selected + (function(){ + var button, input, form = $('form.wp-upload-form'); + if ( ! form.length ) + return; + button = form.find('input[type="submit"]'); + input = form.find('input[type="file"]'); + + function toggleUploadButton() { + button.prop('disabled', '' === input.map( function() { + return $(this).val(); + }).get().join('')); + } + toggleUploadButton(); + input.on('change', toggleUploadButton); + })(); +}); + +// Fire a custom jQuery event at the end of window resize +( function() { + var timeout; + + function triggerEvent() { + $(document).trigger( 'wp-window-resized' ); + } + + function fireOnce() { + window.clearTimeout( timeout ); + timeout = window.setTimeout( triggerEvent, 200 ); + } + + $(window).on( 'resize.wp-fire-once', fireOnce ); +}()); + +$(document).ready( function() { + var $document = $( document ), + $window = $( window ), + $body = $( document.body ), + $adminMenuWrap = $( '#adminmenuwrap' ), + $collapseMenu = $( '#collapse-menu' ), + $wpwrap = $( '#wpwrap' ), + $adminmenu = $( '#adminmenu' ), + $overlay = $( '#wp-responsive-overlay' ), + $toolbar = $( '#wp-toolbar' ), + $toolbarPopups = $toolbar.find( 'a[aria-haspopup="true"]' ), + $sortables = $('.meta-box-sortables'), + stickyMenuActive = false, + wpResponsiveActive = false; + + window.stickyMenu = { + enable: function() { + if ( ! stickyMenuActive ) { + $document.on( 'wp-window-resized.sticky-menu', $.proxy( this.update, this ) ); + $collapseMenu.on( 'click.sticky-menu', $.proxy( this.update, this ) ); + this.update(); + stickyMenuActive = true; + } + }, + + disable: function() { + if ( stickyMenuActive ) { + $window.off( 'resize.sticky-menu' ); + $collapseMenu.off( 'click.sticky-menu' ); + $body.removeClass( 'sticky-menu' ); + stickyMenuActive = false; + } + }, + + update: function() { + // Make the admin menu sticky if the viewport is taller than it + if ( $window.height() > $adminMenuWrap.height() + 32 ) { + if ( ! $body.hasClass( 'sticky-menu' ) ) { + $body.addClass( 'sticky-menu' ); + } + } else { + if ( $body.hasClass( 'sticky-menu' ) ) { + $body.removeClass( 'sticky-menu' ); + } + } + } + }; + + window.wpResponsive = { + init: function() { + var self = this, + scrollStart = 0; + + // Modify functionality based on custom activate/deactivate event + $document.on( 'wp-responsive-activate.wp-responsive', function() { + self.activate(); + }).on( 'wp-responsive-deactivate.wp-responsive', function() { + self.deactivate(); + }); + + $( '#wp-admin-bar-menu-toggle a' ).attr( 'aria-expanded', 'false' ); + + // Toggle sidebar when toggle is clicked + $( '#wp-admin-bar-menu-toggle' ).on( 'click.wp-responsive', function( event ) { + event.preventDefault(); + $wpwrap.toggleClass( 'wp-responsive-open' ); + if ( $wpwrap.hasClass( 'wp-responsive-open' ) ) { + $(this).find('a').attr( 'aria-expanded', 'true' ); + $( '#adminmenu a:first' ).focus(); + } else { + $(this).find('a').attr( 'aria-expanded', 'false' ); + } + } ); + + // Add menu events + $adminmenu.on( 'touchstart.wp-responsive', 'li.wp-has-submenu > a', function() { + scrollStart = $window.scrollTop(); + }).on( 'touchend.wp-responsive click.wp-responsive', 'li.wp-has-submenu > a', function( event ) { + if ( ! $adminmenu.data('wp-responsive') || + ( event.type === 'touchend' && $window.scrollTop() !== scrollStart ) ) { + + return; + } + + $( this ).parent( 'li' ).toggleClass( 'selected' ); + event.preventDefault(); + }); + + self.trigger(); + $document.on( 'wp-window-resized.wp-responsive', $.proxy( this.trigger, this ) ); + + // This needs to run later as UI Sortable may be initialized later on $(document).ready() + $window.on( 'load.wp-responsive', function() { + var width = navigator.userAgent.indexOf('AppleWebKit/') > -1 ? $window.width() : window.innerWidth; + + if ( width <= 782 ) { + self.disableSortables(); + } + }); + }, + + activate: function() { + window.stickyMenu.disable(); + + if ( ! $body.hasClass( 'auto-fold' ) ) { + $body.addClass( 'auto-fold' ); + } + + $adminmenu.data( 'wp-responsive', 1 ); + this.disableSortables(); + }, + + deactivate: function() { + window.stickyMenu.enable(); + $adminmenu.removeData('wp-responsive'); + this.enableSortables(); + }, + + trigger: function() { + var width; + + if ( window.innerWidth ) { + // window.innerWidth is affected by zooming on phones + width = Math.max( window.innerWidth, document.documentElement.clientWidth ); + } else { + // Exclude IE < 9, it doesn't support @media CSS rules + return; + } + + if ( width <= 782 ) { + if ( ! wpResponsiveActive ) { + $document.trigger( 'wp-responsive-activate' ); + wpResponsiveActive = true; + } + } else { + if ( wpResponsiveActive ) { + $document.trigger( 'wp-responsive-deactivate' ); + wpResponsiveActive = false; + } + } + + if ( width <= 480 ) { + this.enableOverlay(); + } else { + this.disableOverlay(); + } + }, + + enableOverlay: function() { + if ( $overlay.length === 0 ) { + $overlay = $( '
    ' ) + .insertAfter( '#wpcontent' ) + .hide() + .on( 'click.wp-responsive', function() { + $toolbar.find( '.menupop.hover' ).removeClass( 'hover' ); + $( this ).hide(); + }); + } + + $toolbarPopups.on( 'click.wp-responsive', function() { + $overlay.show(); + }); + }, + + disableOverlay: function() { + $toolbarPopups.off( 'click.wp-responsive' ); + $overlay.hide(); + }, + + disableSortables: function() { + if ( $sortables.length ) { + try { + $sortables.sortable('disable'); + } catch(e) {} + } + }, + + enableSortables: function() { + if ( $sortables.length ) { + try { + $sortables.sortable('enable'); + } catch(e) {} + } + } + }; + + window.stickyMenu.enable(); + window.wpResponsive.init(); +}); + +// make Windows 8 devices playing along nicely +(function(){ + if ( '-ms-user-select' in document.documentElement.style && navigator.userAgent.match(/IEMobile\/10\.0/) ) { + var msViewportStyle = document.createElement( 'style' ); + msViewportStyle.appendChild( + document.createTextNode( '@-ms-viewport{width:auto!important}' ) + ); + document.getElementsByTagName( 'head' )[0].appendChild( msViewportStyle ); + } +})(); + +}( jQuery, window )); diff --git a/wp-admin/js/common.min.js b/wp-admin/js/common.min.js new file mode 100644 index 0000000..7f43a02 --- /dev/null +++ b/wp-admin/js/common.min.js @@ -0,0 +1 @@ +var showNotice,adminMenu,columns,validateForm,screenMeta;!function(a,b){adminMenu={init:function(){},fold:function(){},restoreMenuState:function(){},toggle:function(){},favorites:function(){}},columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var c=a(this),d=c.val();c.prop("checked")?b.checked(d):b.unchecked(d),columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show(),this.colSpanChange(1)},unchecked:function(b){a(".column-"+b).hide(),this.colSpanChange(-1)},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var a=this.id;return a.substring(a,a.length-5)}).get().join(",")}},colSpanChange:function(b){var c,d=a("table").find(".colspanchange");d.length&&(c=parseInt(d.attr("colspan"),10)+b,d.attr("colspan",c.toString()))}},a(document).ready(function(){columns.init()}),validateForm=function(b){return!a(b).find(".form-required").filter(function(){return""===a("input:visible",this).val()}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()},showNotice={warn:function(){var a=commonL10n.warnDelete||"";return confirm(a)?!0:!1},note:function(a){alert(a)}},screenMeta={element:null,toggles:null,page:null,init:function(){this.element=a("#screen-meta"),this.toggles=a(".screen-meta-toggle a"),this.page=a("#wpcontent"),this.toggles.click(this.toggleEvent)},toggleEvent:function(b){var c=a(this.href.replace(/.+#/,"#"));b.preventDefault(),c.length&&(c.is(":visible")?screenMeta.close(c,a(this)):screenMeta.open(c,a(this)))},open:function(b,c){a(".screen-meta-toggle").not(c.parent()).css("visibility","hidden"),b.parent().show(),b.slideDown("fast",function(){b.focus(),c.addClass("screen-meta-active").attr("aria-expanded",!0)})},close:function(b,c){b.slideUp("fast",function(){c.removeClass("screen-meta-active").attr("aria-expanded",!1),a(".screen-meta-toggle").css("visibility",""),b.parent().hide()})}},a(".contextual-help-tabs").delegate("a","click focus",function(b){var c,d=a(this);return b.preventDefault(),d.is(".active a")?!1:(a(".contextual-help-tabs .active").removeClass("active"),d.parent("li").addClass("active"),c=a(d.attr("href")),a(".help-tab-content").not(c).removeClass("active").hide(),void c.addClass("active").show())}),a(document).ready(function(){var c,d,e,f,g,h,i,j,k=!1,l=a("#adminmenu"),m=a("input.current-page"),n=m.val();l.on("click.wp-submenu-head",".wp-submenu-head",function(b){a(b.target).parent().siblings("a").get(0).click()}),a("#collapse-menu").on("click.collapse-menu",function(){var c,d=a(document.body);a("#adminmenu div.wp-submenu").css("margin-top",""),c=b.innerWidth?Math.max(b.innerWidth,document.documentElement.clientWidth):901,c&&900>c?d.hasClass("auto-fold")?(d.removeClass("auto-fold").removeClass("folded"),setUserSetting("unfold",1),setUserSetting("mfold","o")):(d.addClass("auto-fold"),setUserSetting("unfold",0)):d.hasClass("folded")?(d.removeClass("folded"),setUserSetting("mfold","o")):(d.addClass("folded"),setUserSetting("mfold","f"))}),("ontouchstart"in b||/IEMobile\/[1-9]/.test(navigator.userAgent))&&(h=/Mobile\/.+Safari/.test(navigator.userAgent)?"touchstart":"click",a(document.body).on(h+".wp-mobile-hover",function(b){l.data("wp-responsive")||a(b.target).closest("#adminmenu").length||l.find("li.wp-has-submenu.opensub").removeClass("opensub")}),l.find("a.wp-has-submenu").on(h+".wp-mobile-hover",function(c){var d,e,f,g,h,i,j,k=a(this),m=k.parent(),n=m.find(".wp-submenu");l.data("wp-responsive")||m.hasClass("opensub")||m.hasClass("wp-menu-open")&&!(m.width()<40)||(c.preventDefault(),h=m.offset().top,i=a(b).scrollTop(),j=h-i-30,d=h+n.height()+1,e=a("#wpwrap").height(),f=60+d-e,g=a(b).height()+i-50,d-f>g&&(f=d-g),f>j&&(f=j),f>1?n.css("margin-top","-"+f+"px"):n.css("margin-top",""),l.find("li.opensub").removeClass("opensub"),m.addClass("opensub"))})),l.find("li.wp-has-submenu").hoverIntent({over:function(){var c,d,e,f,g,h,i,j=a(this).find(".wp-submenu"),k=parseInt(j.css("top"),10);isNaN(k)||k>-5||l.data("wp-responsive")||(g=a(this).offset().top,h=a(b).scrollTop(),i=g-h-30,c=g+j.height()+1,d=a("#wpwrap").height(),e=60+c-d,f=a(b).height()+h-15,c-e>f&&(e=c-f),e>i&&(e=i),e>1?j.css("margin-top","-"+e+"px"):j.css("margin-top",""),l.find("li.menu-top").removeClass("opensub"),a(this).addClass("opensub"))},out:function(){l.data("wp-responsive")||a(this).removeClass("opensub").find(".wp-submenu").css("margin-top","")},timeout:200,sensitivity:7,interval:90}),l.on("focus.adminmenu",".wp-submenu a",function(b){l.data("wp-responsive")||a(b.target).closest("li.menu-top").addClass("opensub")}).on("blur.adminmenu",".wp-submenu a",function(b){l.data("wp-responsive")||a(b.target).closest("li.menu-top").removeClass("opensub")}),a("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2"),a("div.updated, div.error").not(".below-h2, .inline").insertAfter(a("div.wrap h2:first")),screenMeta.init(),a("tbody").children().children(".check-column").find(":checkbox").click(function(b){if("undefined"==b.shiftKey)return!0;if(b.shiftKey){if(!k)return!0;c=a(k).closest("form").find(":checkbox"),d=c.index(k),e=c.index(this),f=a(this).prop("checked"),d>0&&e>0&&d!=e&&(g=e>d?c.slice(d,e):c.slice(e,d),g.prop("checked",function(){return a(this).closest("tr").is(":visible")?f:!1}))}k=this;var h=a(this).closest("tbody").find(":checkbox").filter(":visible").not(":checked");return a(this).closest("table").children("thead, tfoot").find(":checkbox").prop("checked",function(){return 0===h.length}),!0}),a("thead, tfoot").find(".check-column :checkbox").on("click.wp-toggle-checkboxes",function(b){var c=a(this),d=c.closest("table"),e=c.prop("checked"),f=b.shiftKey||c.data("wp-toggle");d.children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",function(){return a(this).is(":hidden")?!1:f?!a(this).prop("checked"):e?!0:!1}),d.children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",function(){return f?!1:e?!0:!1})}),a("td.post-title, td.title, td.comment, .bookmarks td.column-name, td.blogname, td.username, .dashboard-comment-wrap").focusin(function(){clearTimeout(i),j=a(this).find(".row-actions"),j.addClass("visible")}).focusout(function(){i=setTimeout(function(){j.removeClass("visible")},30)}),a("#default-password-nag-no").click(function(){return setUserSetting("default_password_nag","hide"),a("div.default-password-nag").hide(),!1}),a("#newcontent").bind("keydown.wpevent_InsertTab",function(b){var c,d,e,f,g,h=b.target;if(27==b.keyCode)return void a(h).data("tab-out",!0);if(!(9!=b.keyCode||b.ctrlKey||b.altKey||b.shiftKey)){if(a(h).data("tab-out"))return void a(h).data("tab-out",!1);c=h.selectionStart,d=h.selectionEnd,e=h.value;try{this.lastKey=9}catch(i){}document.selection?(h.focus(),g=document.selection.createRange(),g.text=" "):c>=0&&(f=this.scrollTop,h.value=e.substring(0,c).concat(" ",e.substring(d)),h.selectionStart=h.selectionEnd=c+1,this.scrollTop=f),b.stopPropagation&&b.stopPropagation(),b.preventDefault&&b.preventDefault()}}),a("#newcontent").bind("blur.wpevent_InsertTab",function(){this.lastKey&&9==this.lastKey&&this.focus()}),m.length&&m.closest("form").submit(function(){-1==a('select[name="action"]').val()&&-1==a('select[name="action2"]').val()&&m.val()==n&&m.val("1")}),a('.search-box input[type="search"], .search-box input[type="submit"]').mousedown(function(){a('select[name^="action"]').val("-1")}),a("#contextual-help-link, #show-settings-link").on("focus.scroll-into-view",function(a){a.target.scrollIntoView&&a.target.scrollIntoView(!1)}),function(){function b(){c.prop("disabled",""===d.map(function(){return a(this).val()}).get().join(""))}var c,d,e=a("form.wp-upload-form");e.length&&(c=e.find('input[type="submit"]'),d=e.find('input[type="file"]'),b(),d.on("change",b))}()}),function(){function c(){a(document).trigger("wp-window-resized")}function d(){b.clearTimeout(e),e=b.setTimeout(c,200)}var e;a(b).on("resize.wp-fire-once",d)}(),a(document).ready(function(){var c=a(document),d=a(b),e=a(document.body),f=a("#adminmenuwrap"),g=a("#collapse-menu"),h=a("#wpwrap"),i=a("#adminmenu"),j=a("#wp-responsive-overlay"),k=a("#wp-toolbar"),l=k.find('a[aria-haspopup="true"]'),m=a(".meta-box-sortables"),n=!1,o=!1;b.stickyMenu={enable:function(){n||(c.on("wp-window-resized.sticky-menu",a.proxy(this.update,this)),g.on("click.sticky-menu",a.proxy(this.update,this)),this.update(),n=!0)},disable:function(){n&&(d.off("resize.sticky-menu"),g.off("click.sticky-menu"),e.removeClass("sticky-menu"),n=!1)},update:function(){d.height()>f.height()+32?e.hasClass("sticky-menu")||e.addClass("sticky-menu"):e.hasClass("sticky-menu")&&e.removeClass("sticky-menu")}},b.wpResponsive={init:function(){var e=this,f=0;c.on("wp-responsive-activate.wp-responsive",function(){e.activate()}).on("wp-responsive-deactivate.wp-responsive",function(){e.deactivate()}),a("#wp-admin-bar-menu-toggle a").attr("aria-expanded","false"),a("#wp-admin-bar-menu-toggle").on("click.wp-responsive",function(b){b.preventDefault(),h.toggleClass("wp-responsive-open"),h.hasClass("wp-responsive-open")?(a(this).find("a").attr("aria-expanded","true"),a("#adminmenu a:first").focus()):a(this).find("a").attr("aria-expanded","false")}),i.on("touchstart.wp-responsive","li.wp-has-submenu > a",function(){f=d.scrollTop()}).on("touchend.wp-responsive click.wp-responsive","li.wp-has-submenu > a",function(b){!i.data("wp-responsive")||"touchend"===b.type&&d.scrollTop()!==f||(a(this).parent("li").toggleClass("selected"),b.preventDefault())}),e.trigger(),c.on("wp-window-resized.wp-responsive",a.proxy(this.trigger,this)),d.on("load.wp-responsive",function(){var a=navigator.userAgent.indexOf("AppleWebKit/")>-1?d.width():b.innerWidth;782>=a&&e.disableSortables()})},activate:function(){b.stickyMenu.disable(),e.hasClass("auto-fold")||e.addClass("auto-fold"),i.data("wp-responsive",1),this.disableSortables()},deactivate:function(){b.stickyMenu.enable(),i.removeData("wp-responsive"),this.enableSortables()},trigger:function(){var a;b.innerWidth&&(a=Math.max(b.innerWidth,document.documentElement.clientWidth),782>=a?o||(c.trigger("wp-responsive-activate"),o=!0):o&&(c.trigger("wp-responsive-deactivate"),o=!1),480>=a?this.enableOverlay():this.disableOverlay())},enableOverlay:function(){0===j.length&&(j=a('
    ').insertAfter("#wpcontent").hide().on("click.wp-responsive",function(){k.find(".menupop.hover").removeClass("hover"),a(this).hide()})),l.on("click.wp-responsive",function(){j.show()})},disableOverlay:function(){l.off("click.wp-responsive"),j.hide()},disableSortables:function(){if(m.length)try{m.sortable("disable")}catch(a){}},enableSortables:function(){if(m.length)try{m.sortable("enable")}catch(a){}}},b.stickyMenu.enable(),b.wpResponsive.init()}),function(){if("-ms-user-select"in document.documentElement.style&&navigator.userAgent.match(/IEMobile\/10\.0/)){var a=document.createElement("style");a.appendChild(document.createTextNode("@-ms-viewport{width:auto!important}")),document.getElementsByTagName("head")[0].appendChild(a)}}()}(jQuery,window); \ No newline at end of file diff --git a/wp-admin/js/custom-background.js b/wp-admin/js/custom-background.js new file mode 100644 index 0000000..81fd591 --- /dev/null +++ b/wp-admin/js/custom-background.js @@ -0,0 +1,75 @@ +/* global ajaxurl */ +(function($) { + $(document).ready(function() { + var frame, + bgImage = $( '#custom-background-image' ); + + $('#background-color').wpColorPicker({ + change: function( event, ui ) { + bgImage.css('background-color', ui.color.toString()); + }, + clear: function() { + bgImage.css('background-color', ''); + } + }); + + $('input[name="background-position-x"]').change(function() { + bgImage.css('background-position', $(this).val() + ' top'); + }); + + $('input[name="background-repeat"]').change(function() { + bgImage.css('background-repeat', $(this).val()); + }); + + $('#choose-from-library-link').click( function( event ) { + var $el = $(this); + + event.preventDefault(); + + // If the media frame already exists, reopen it. + if ( frame ) { + frame.open(); + return; + } + + // Create the media frame. + frame = wp.media.frames.customBackground = wp.media({ + // Set the title of the modal. + title: $el.data('choose'), + + // Tell the modal to show only images. + library: { + type: 'image' + }, + + // Customize the submit button. + button: { + // Set the text of the button. + text: $el.data('update'), + // Tell the button not to close the modal, since we're + // going to refresh the page when the image is selected. + close: false + } + }); + + // When an image is selected, run a callback. + frame.on( 'select', function() { + // Grab the selected attachment. + var attachment = frame.state().get('selection').first(); + + // Run an AJAX request to set the background image. + $.post( ajaxurl, { + action: 'set-background-image', + attachment_id: attachment.id, + size: 'full' + }).done( function() { + // When the request completes, reload the window. + window.location.reload(); + }); + }); + + // Finally, open the modal. + frame.open(); + }); + }); +})(jQuery); diff --git a/wp-admin/js/custom-background.min.js b/wp-admin/js/custom-background.min.js new file mode 100644 index 0000000..f53e02c --- /dev/null +++ b/wp-admin/js/custom-background.min.js @@ -0,0 +1 @@ +!function(a){a(document).ready(function(){var b,c=a("#custom-background-image");a("#background-color").wpColorPicker({change:function(a,b){c.css("background-color",b.color.toString())},clear:function(){c.css("background-color","")}}),a('input[name="background-position-x"]').change(function(){c.css("background-position",a(this).val()+" top")}),a('input[name="background-repeat"]').change(function(){c.css("background-repeat",a(this).val())}),a("#choose-from-library-link").click(function(c){var d=a(this);return c.preventDefault(),b?void b.open():(b=wp.media.frames.customBackground=wp.media({title:d.data("choose"),library:{type:"image"},button:{text:d.data("update"),close:!1}}),b.on("select",function(){var c=b.state().get("selection").first();a.post(ajaxurl,{action:"set-background-image",attachment_id:c.id,size:"full"}).done(function(){window.location.reload()})}),void b.open())})})}(jQuery); \ No newline at end of file diff --git a/wp-admin/js/custom-header.js b/wp-admin/js/custom-header.js new file mode 100644 index 0000000..ce224e4 --- /dev/null +++ b/wp-admin/js/custom-header.js @@ -0,0 +1,61 @@ +/* global isRtl */ +(function($) { + var frame; + + $( function() { + // Fetch available headers and apply jQuery.masonry + // once the images have loaded. + var $headers = $('.available-headers'); + + $headers.imagesLoaded( function() { + $headers.masonry({ + itemSelector: '.default-header', + isRTL: !! ( 'undefined' != typeof isRtl && isRtl ) + }); + }); + + // Build the choose from library frame. + $('#choose-from-library-link').click( function( event ) { + var $el = $(this); + event.preventDefault(); + + // If the media frame already exists, reopen it. + if ( frame ) { + frame.open(); + return; + } + + // Create the media frame. + frame = wp.media.frames.customHeader = wp.media({ + // Set the title of the modal. + title: $el.data('choose'), + + // Tell the modal to show only images. + library: { + type: 'image' + }, + + // Customize the submit button. + button: { + // Set the text of the button. + text: $el.data('update'), + // Tell the button not to close the modal, since we're + // going to refresh the page when the image is selected. + close: false + } + }); + + // When an image is selected, run a callback. + frame.on( 'select', function() { + // Grab the selected attachment. + var attachment = frame.state().get('selection').first(), + link = $el.data('updateLink'); + + // Tell the browser to navigate to the crop step. + window.location = link + '&file=' + attachment.id; + }); + + frame.open(); + }); + }); +}(jQuery)); diff --git a/wp-admin/js/customize-controls.js b/wp-admin/js/customize-controls.js new file mode 100644 index 0000000..4bfc252 --- /dev/null +++ b/wp-admin/js/customize-controls.js @@ -0,0 +1,1209 @@ +/* globals _wpCustomizeHeader, _wpMediaViewsL10n */ +(function( exports, $ ){ + var api = wp.customize; + + /** + * @param options + * - previewer - The Previewer instance to sync with. + * - transport - The transport to use for previewing. Supports 'refresh' and 'postMessage'. + */ + api.Setting = api.Value.extend({ + initialize: function( id, value, options ) { + api.Value.prototype.initialize.call( this, value, options ); + + this.id = id; + this.transport = this.transport || 'refresh'; + + this.bind( this.preview ); + }, + preview: function() { + switch ( this.transport ) { + case 'refresh': + return this.previewer.refresh(); + case 'postMessage': + return this.previewer.send( 'setting', [ this.id, this() ] ); + } + } + }); + + api.Control = api.Class.extend({ + initialize: function( id, options ) { + var control = this, + nodes, radios, settings; + + this.params = {}; + $.extend( this, options || {} ); + + this.id = id; + this.selector = '#customize-control-' + id.replace( /\]/g, '' ).replace( /\[/g, '-' ); + this.container = $( this.selector ); + + settings = $.map( this.params.settings, function( value ) { + return value; + }); + + api.apply( api, settings.concat( function() { + var key; + + control.settings = {}; + for ( key in control.params.settings ) { + control.settings[ key ] = api( control.params.settings[ key ] ); + } + + control.setting = control.settings['default'] || null; + control.ready(); + }) ); + + control.elements = []; + + nodes = this.container.find('[data-customize-setting-link]'); + radios = {}; + + nodes.each( function() { + var node = $(this), + name; + + if ( node.is(':radio') ) { + name = node.prop('name'); + if ( radios[ name ] ) + return; + + radios[ name ] = true; + node = nodes.filter( '[name="' + name + '"]' ); + } + + api( node.data('customizeSettingLink'), function( setting ) { + var element = new api.Element( node ); + control.elements.push( element ); + element.sync( setting ); + element.set( setting() ); + }); + }); + }, + + ready: function() {}, + + dropdownInit: function() { + var control = this, + statuses = this.container.find('.dropdown-status'), + params = this.params, + toggleFreeze = false, + update = function( to ) { + if ( typeof to === 'string' && params.statuses && params.statuses[ to ] ) + statuses.html( params.statuses[ to ] ).show(); + else + statuses.hide(); + }; + + // Support the .dropdown class to open/close complex elements + this.container.on( 'click keydown', '.dropdown', function( event ) { + if ( event.type === 'keydown' && 13 !== event.which ) // enter + return; + + event.preventDefault(); + + if (!toggleFreeze) + control.container.toggleClass('open'); + + if ( control.container.hasClass('open') ) + control.container.parent().parent().find('li.library-selected').focus(); + + // Don't want to fire focus and click at same time + toggleFreeze = true; + setTimeout(function () { + toggleFreeze = false; + }, 400); + }); + + this.setting.bind( update ); + update( this.setting() ); + } + }); + + api.ColorControl = api.Control.extend({ + ready: function() { + var control = this, + picker = this.container.find('.color-picker-hex'); + + picker.val( control.setting() ).wpColorPicker({ + change: function() { + control.setting.set( picker.wpColorPicker('color') ); + }, + clear: function() { + control.setting.set( false ); + } + }); + } + }); + + api.UploadControl = api.Control.extend({ + ready: function() { + var control = this; + + this.params.removed = this.params.removed || ''; + + this.success = $.proxy( this.success, this ); + + this.uploader = $.extend({ + container: this.container, + browser: this.container.find('.upload'), + dropzone: this.container.find('.upload-dropzone'), + success: this.success, + plupload: {}, + params: {} + }, this.uploader || {} ); + + if ( control.params.extensions ) { + control.uploader.plupload.filters = [{ + title: api.l10n.allowedFiles, + extensions: control.params.extensions + }]; + } + + if ( control.params.context ) + control.uploader.params['post_data[context]'] = this.params.context; + + if ( api.settings.theme.stylesheet ) + control.uploader.params['post_data[theme]'] = api.settings.theme.stylesheet; + + this.uploader = new wp.Uploader( this.uploader ); + + this.remover = this.container.find('.remove'); + this.remover.on( 'click keydown', function( event ) { + if ( event.type === 'keydown' && 13 !== event.which ) // enter + return; + + control.setting.set( control.params.removed ); + event.preventDefault(); + }); + + this.removerVisibility = $.proxy( this.removerVisibility, this ); + this.setting.bind( this.removerVisibility ); + this.removerVisibility( this.setting.get() ); + }, + success: function( attachment ) { + this.setting.set( attachment.get('url') ); + }, + removerVisibility: function( to ) { + this.remover.toggle( to != this.params.removed ); + } + }); + + api.ImageControl = api.UploadControl.extend({ + ready: function() { + var control = this, + panels; + + this.uploader = { + init: function() { + var fallback, button; + + if ( this.supports.dragdrop ) + return; + + // Maintain references while wrapping the fallback button. + fallback = control.container.find( '.upload-fallback' ); + button = fallback.children().detach(); + + this.browser.detach().empty().append( button ); + fallback.append( this.browser ).show(); + } + }; + + api.UploadControl.prototype.ready.call( this ); + + this.thumbnail = this.container.find('.preview-thumbnail img'); + this.thumbnailSrc = $.proxy( this.thumbnailSrc, this ); + this.setting.bind( this.thumbnailSrc ); + + this.library = this.container.find('.library'); + + // Generate tab objects + this.tabs = {}; + panels = this.library.find('.library-content'); + + this.library.children('ul').children('li').each( function() { + var link = $(this), + id = link.data('customizeTab'), + panel = panels.filter('[data-customize-tab="' + id + '"]'); + + control.tabs[ id ] = { + both: link.add( panel ), + link: link, + panel: panel + }; + }); + + // Bind tab switch events + this.library.children('ul').on( 'click keydown', 'li', function( event ) { + if ( event.type === 'keydown' && 13 !== event.which ) // enter + return; + + var id = $(this).data('customizeTab'), + tab = control.tabs[ id ]; + + event.preventDefault(); + + if ( tab.link.hasClass('library-selected') ) + return; + + control.selected.both.removeClass('library-selected'); + control.selected = tab; + control.selected.both.addClass('library-selected'); + }); + + // Bind events to switch image urls. + this.library.on( 'click keydown', 'a', function( event ) { + if ( event.type === 'keydown' && 13 !== event.which ) // enter + return; + + var value = $(this).data('customizeImageValue'); + + if ( value ) { + control.setting.set( value ); + event.preventDefault(); + } + }); + + if ( this.tabs.uploaded ) { + this.tabs.uploaded.target = this.library.find('.uploaded-target'); + if ( ! this.tabs.uploaded.panel.find('.thumbnail').length ) + this.tabs.uploaded.both.addClass('hidden'); + } + + // Select a tab + panels.each( function() { + var tab = control.tabs[ $(this).data('customizeTab') ]; + + // Select the first visible tab. + if ( ! tab.link.hasClass('hidden') ) { + control.selected = tab; + tab.both.addClass('library-selected'); + return false; + } + }); + + this.dropdownInit(); + }, + success: function( attachment ) { + api.UploadControl.prototype.success.call( this, attachment ); + + // Add the uploaded image to the uploaded tab. + if ( this.tabs.uploaded && this.tabs.uploaded.target.length ) { + this.tabs.uploaded.both.removeClass('hidden'); + + // @todo: Do NOT store this on the attachment model. That is bad. + attachment.element = $( '
    ' ) + .data( 'customizeImageValue', attachment.get('url') ) + .append( '' ) + .appendTo( this.tabs.uploaded.target ); + } + }, + thumbnailSrc: function( to ) { + if ( /^(https?:)?\/\//.test( to ) ) + this.thumbnail.prop( 'src', to ).show(); + else + this.thumbnail.hide(); + } + }); + + api.HeaderControl = api.Control.extend({ + ready: function() { + this.btnRemove = $('#customize-control-header_image .actions .remove'); + this.btnNew = $('#customize-control-header_image .actions .new'); + + _.bindAll(this, 'openMedia', 'removeImage'); + + this.btnNew.on( 'click', this.openMedia ); + this.btnRemove.on( 'click', this.removeImage ); + + api.HeaderTool.currentHeader = new api.HeaderTool.ImageModel(); + + new api.HeaderTool.CurrentView({ + model: api.HeaderTool.currentHeader, + el: '.current .container' + }); + + new api.HeaderTool.ChoiceListView({ + collection: api.HeaderTool.UploadsList = new api.HeaderTool.ChoiceList(), + el: '.choices .uploaded .list' + }); + + new api.HeaderTool.ChoiceListView({ + collection: api.HeaderTool.DefaultsList = new api.HeaderTool.DefaultsList(), + el: '.choices .default .list' + }); + + api.HeaderTool.combinedList = api.HeaderTool.CombinedList = new api.HeaderTool.CombinedList([ + api.HeaderTool.UploadsList, + api.HeaderTool.DefaultsList + ]); + }, + + /** + * Returns a set of options, computed from the attached image data and + * theme-specific data, to be fed to the imgAreaSelect plugin in + * wp.media.view.Cropper. + * + * @param {wp.media.model.Attachment} attachment + * @param {wp.media.controller.Cropper} controller + * @returns {Object} Options + */ + calculateImageSelectOptions: function(attachment, controller) { + var xInit = parseInt(_wpCustomizeHeader.data.width, 10), + yInit = parseInt(_wpCustomizeHeader.data.height, 10), + flexWidth = !! parseInt(_wpCustomizeHeader.data['flex-width'], 10), + flexHeight = !! parseInt(_wpCustomizeHeader.data['flex-height'], 10), + ratio, xImg, yImg, realHeight, realWidth, + imgSelectOptions; + + realWidth = attachment.get('width'); + realHeight = attachment.get('height'); + + this.headerImage = new api.HeaderTool.ImageModel(); + this.headerImage.set({ + themeWidth: xInit, + themeHeight: yInit, + themeFlexWidth: flexWidth, + themeFlexHeight: flexHeight, + imageWidth: realWidth, + imageHeight: realHeight + }); + + controller.set( 'canSkipCrop', ! this.headerImage.shouldBeCropped() ); + + ratio = xInit / yInit; + xImg = realWidth; + yImg = realHeight; + + if ( xImg / yImg > ratio ) { + yInit = yImg; + xInit = yInit * ratio; + } else { + xInit = xImg; + yInit = xInit / ratio; + } + + imgSelectOptions = { + handles: true, + keys: true, + instance: true, + persistent: true, + imageWidth: realWidth, + imageHeight: realHeight, + x1: 0, + y1: 0, + x2: xInit, + y2: yInit + }; + + if (flexHeight === false && flexWidth === false) { + imgSelectOptions.aspectRatio = xInit + ':' + yInit; + } + if (flexHeight === false ) { + imgSelectOptions.maxHeight = yInit; + } + if (flexWidth === false ) { + imgSelectOptions.maxWidth = xInit; + } + + return imgSelectOptions; + }, + + /** + * Sets up and opens the Media Manager in order to select an image. + * Depending on both the size of the image and the properties of the + * current theme, a cropping step after selection may be required or + * skippable. + * + * @param {event} event + */ + openMedia: function(event) { + var l10n = _wpMediaViewsL10n; + + event.preventDefault(); + + this.frame = wp.media({ + button: { + text: l10n.selectAndCrop, + close: false + }, + states: [ + new wp.media.controller.Library({ + title: l10n.chooseImage, + library: wp.media.query({ type: 'image' }), + multiple: false, + priority: 20, + suggestedWidth: _wpCustomizeHeader.data.width, + suggestedHeight: _wpCustomizeHeader.data.height + }), + new wp.media.controller.Cropper({ + imgSelectOptions: this.calculateImageSelectOptions + }) + ] + }); + + this.frame.on('select', this.onSelect, this); + this.frame.on('cropped', this.onCropped, this); + this.frame.on('skippedcrop', this.onSkippedCrop, this); + + this.frame.open(); + }, + + onSelect: function() { + this.frame.setState('cropper'); + }, + onCropped: function(croppedImage) { + var url = croppedImage.post_content, + attachmentId = croppedImage.attachment_id, + w = croppedImage.width, + h = croppedImage.height; + this.setImageFromURL(url, attachmentId, w, h); + }, + onSkippedCrop: function(selection) { + var url = selection.get('url'), + w = selection.get('width'), + h = selection.get('height'); + this.setImageFromURL(url, selection.id, w, h); + }, + + /** + * Creates a new wp.customize.HeaderTool.ImageModel from provided + * header image data and inserts it into the user-uploaded headers + * collection. + * + * @param {String} url + * @param {Number} attachmentId + * @param {Number} width + * @param {Number} height + */ + setImageFromURL: function(url, attachmentId, width, height) { + var choice, data = {}; + + data.url = url; + data.thumbnail_url = url; + data.timestamp = _.now(); + + if (attachmentId) { + data.attachment_id = attachmentId; + } + + if (width) { + data.width = width; + } + + if (height) { + data.height = height; + } + + choice = new api.HeaderTool.ImageModel({ + header: data, + choice: url.split('/').pop() + }); + api.HeaderTool.UploadsList.add(choice); + api.HeaderTool.currentHeader.set(choice.toJSON()); + choice.save(); + choice.importImage(); + }, + + /** + * Triggers the necessary events to deselect an image which was set as + * the currently selected one. + */ + removeImage: function() { + api.HeaderTool.currentHeader.trigger('hide'); + api.HeaderTool.CombinedList.trigger('control:removeImage'); + } + + }); + + // Change objects contained within the main customize object to Settings. + api.defaultConstructor = api.Setting; + + // Create the collection of Control objects. + api.control = new api.Values({ defaultConstructor: api.Control }); + + api.PreviewFrame = api.Messenger.extend({ + sensitivity: 2000, + + initialize: function( params, options ) { + var deferred = $.Deferred(); + + // This is the promise object. + deferred.promise( this ); + + this.container = params.container; + this.signature = params.signature; + + $.extend( params, { channel: api.PreviewFrame.uuid() }); + + api.Messenger.prototype.initialize.call( this, params, options ); + + this.add( 'previewUrl', params.previewUrl ); + + this.query = $.extend( params.query || {}, { customize_messenger_channel: this.channel() }); + + this.run( deferred ); + }, + + run: function( deferred ) { + var self = this, + loaded = false, + ready = false; + + if ( this._ready ) + this.unbind( 'ready', this._ready ); + + this._ready = function() { + ready = true; + + if ( loaded ) + deferred.resolveWith( self ); + }; + + this.bind( 'ready', this._ready ); + + this.request = $.ajax( this.previewUrl(), { + type: 'POST', + data: this.query, + xhrFields: { + withCredentials: true + } + } ); + + this.request.fail( function() { + deferred.rejectWith( self, [ 'request failure' ] ); + }); + + this.request.done( function( response ) { + var location = self.request.getResponseHeader('Location'), + signature = self.signature, + index; + + // Check if the location response header differs from the current URL. + // If so, the request was redirected; try loading the requested page. + if ( location && location != self.previewUrl() ) { + deferred.rejectWith( self, [ 'redirect', location ] ); + return; + } + + // Check if the user is not logged in. + if ( '0' === response ) { + self.login( deferred ); + return; + } + + // Check for cheaters. + if ( '-1' === response ) { + deferred.rejectWith( self, [ 'cheatin' ] ); + return; + } + + // Check for a signature in the request. + index = response.lastIndexOf( signature ); + if ( -1 === index || index < response.lastIndexOf('') ) { + deferred.rejectWith( self, [ 'unsigned' ] ); + return; + } + + // Strip the signature from the request. + response = response.slice( 0, index ) + response.slice( index + signature.length ); + + // Create the iframe and inject the html content. + self.iframe = $('"; + echo '
    '; + require_once(ABSPATH . 'wp-admin/admin-footer.php'); + exit; + break; + case 'delete-selected': + if ( ! current_user_can( 'delete_themes' ) ) + wp_die( __('You do not have sufficient permissions to delete themes for this site.') ); + check_admin_referer( 'bulk-themes' ); + + $themes = isset( $_REQUEST['checked'] ) ? (array) $_REQUEST['checked'] : array(); + + unset( $themes[ get_option( 'stylesheet' ) ], $themes[ get_option( 'template' ) ] ); + + if ( empty( $themes ) ) { + wp_safe_redirect( add_query_arg( 'error', 'none', $referer ) ); + exit; + } + + $files_to_delete = $theme_info = array(); + foreach ( $themes as $key => $theme ) { + $theme_info[ $theme ] = wp_get_theme( $theme ); + $files_to_delete = array_merge( $files_to_delete, list_files( $theme_info[ $theme ]->get_stylesheet_directory() ) ); + } + + if ( empty( $themes ) ) { + wp_safe_redirect( add_query_arg( 'error', 'main', $referer ) ); + exit; + } + + include(ABSPATH . 'wp-admin/update.php'); + + $parent_file = 'themes.php'; + + if ( ! isset( $_REQUEST['verify-delete'] ) ) { + wp_enqueue_script( 'jquery' ); + require_once( ABSPATH . 'wp-admin/admin-header.php' ); + ?> +
    + ' . _n( 'Delete Theme', 'Delete Themes', $themes_to_delete ) . ''; + ?> +

    +

    +
      + ', sprintf( __('%1$s by %2$s' ), $theme->display('Name'), $theme->display('Author') ), ''; /* translators: 1: theme name, 2: theme author */ ?> +
    +

    +
    + + + '; + ?> + + +
    +
    + +
    + +

    + +
    + 1, + 'action' => 'delete-selected', + 'checked' => $_REQUEST['checked'], + '_wpnonce' => $_REQUEST['_wpnonce'] + ), network_admin_url( 'themes.php' ) ) ) ); + } + + $paged = ( $_REQUEST['paged'] ) ? $_REQUEST['paged'] : 1; + wp_redirect( add_query_arg( array( + 'deleted' => count( $themes ), + 'paged' => $paged, + 's' => $s + ), network_admin_url( 'themes.php' ) ) ); + exit; + break; + } +} + +$wp_list_table->prepare_items(); + +add_thickbox(); + +add_screen_option( 'per_page', array('label' => _x( 'Themes', 'themes per page (screen options)' )) ); + +get_current_screen()->add_help_tab( array( + 'id' => 'overview', + 'title' => __('Overview'), + 'content' => + '

    ' . __('This screen enables and disables the inclusion of themes available to choose in the Appearance menu for each site. It does not activate or deactivate which theme a site is currently using.') . '

    ' . + '

    ' . __('If the network admin disables a theme that is in use, it can still remain selected on that site. If another theme is chosen, the disabled theme will not appear in the site’s Appearance > Themes screen.') . '

    ' . + '

    ' . __('Themes can be enabled on a site by site basis by the network admin on the Edit Site screen (which has a Themes tab); get there via the Edit action link on the All Sites screen. Only network admins are able to install or edit themes.') . '

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

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

    ' . + '

    ' . __('Documentation on Network Themes') . '

    ' . + '

    ' . __('Support Forums') . '

    ' +); + +$title = __('Themes'); +$parent_file = 'themes.php'; + +wp_enqueue_script( 'theme-preview' ); + +require_once(ABSPATH . 'wp-admin/admin-header.php'); + +?> + +
    +

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

    + +

    ' . sprintf( _n( 'Theme enabled.', '%s themes enabled.', $_GET['enabled'] ), number_format_i18n( $_GET['enabled'] ) ) . '

    '; +} elseif ( isset( $_GET['disabled'] ) ) { + $_GET['disabled'] = absint( $_GET['disabled'] ); + echo '

    ' . sprintf( _n( 'Theme disabled.', '%s themes disabled.', $_GET['disabled'] ), number_format_i18n( $_GET['disabled'] ) ) . '

    '; +} elseif ( isset( $_GET['deleted'] ) ) { + $_GET['deleted'] = absint( $_GET['deleted'] ); + echo '

    ' . sprintf( _nx( 'Theme deleted.', '%s themes deleted.', $_GET['deleted'], 'network' ), number_format_i18n( $_GET['deleted'] ) ) . '

    '; +} elseif ( isset( $_GET['error'] ) && 'none' == $_GET['error'] ) { + echo '

    ' . __( 'No theme selected.' ) . '

    '; +} elseif ( isset( $_GET['error'] ) && 'main' == $_GET['error'] ) { + echo '

    ' . __( 'You cannot delete a theme while it is active on the main site.' ) . '

    '; +} + +?> + +
    +search_box( __( 'Search Installed Themes' ), 'theme' ); ?> +
    + +views(); + +if ( 'broken' == $status ) + echo '

    ' . __('The following themes are installed but incomplete. Themes must have a stylesheet and a template.') . '

    '; +?> + +
    + + + +display(); ?> +
    + +
    + +add_help_tab( array( + 'id' => 'overview', + 'title' => __('Overview'), + 'content' => + '

    ' . __('Only use this screen once you have updated to a new version of WordPress through Updates/Available Updates (via the Network Administration navigation menu or the Toolbar). Clicking the Upgrade Network button will step through each site in the network, five at a time, and make sure any database updates are applied.') . '

    ' . + '

    ' . __('If a version update to core has not happened, clicking this button won’t affect anything.') . '

    ' . + '

    ' . __('If this process fails for any reason, users logging in to their sites will force the same update.') . '

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

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

    ' . + '

    ' . __('Documentation on Upgrade Network') . '

    ' . + '

    ' . __('Support Forums') . '

    ' +); + +require_once( ABSPATH . 'wp-admin/admin-header.php' ); + +if ( ! current_user_can( 'manage_network' ) ) + wp_die( __( 'You do not have permission to access this page.' ) ); + +echo '
    '; +echo '

    ' . __( 'Upgrade Network' ) . '

    '; + +$action = isset($_GET['action']) ? $_GET['action'] : 'show'; + +switch ( $action ) { + case "upgrade": + $n = ( isset($_GET['n']) ) ? intval($_GET['n']) : 0; + + if ( $n < 5 ) { + global $wp_db_version; + update_site_option( 'wpmu_upgrade_site', $wp_db_version ); + } + + $blogs = $wpdb->get_results( "SELECT * FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' AND spam = '0' AND deleted = '0' AND archived = '0' ORDER BY registered DESC LIMIT {$n}, 5", ARRAY_A ); + if ( empty( $blogs ) ) { + echo '

    ' . __( 'All done!' ) . '

    '; + break; + } + echo "
      "; + foreach ( (array) $blogs as $details ) { + switch_to_blog( $details['blog_id'] ); + $siteurl = site_url(); + $upgrade_url = admin_url( 'upgrade.php?step=upgrade_db' ); + restore_current_blog(); + echo "
    • $siteurl
    • "; + $response = wp_remote_get( $upgrade_url, array( 'timeout' => 120, 'httpversion' => '1.1' ) ); + if ( is_wp_error( $response ) ) + wp_die( sprintf( __( 'Warning! Problem updating %1$s. Your server may not be able to connect to sites running on it. Error message: %2$s' ), $siteurl, $response->get_error_message() ) ); + /** + * Fires after the Multisite DB upgrade for each site is complete. + * + * @since MU + * + * @param array|WP_Error $response The upgrade response array or WP_Error on failure. + */ + do_action( 'after_mu_upgrade', $response ); + /** + * Fires after each site has been upgraded. + * + * @since MU + * + * @param int $blog_id The id of the blog. + */ + do_action( 'wpmu_upgrade_site', $details[ 'blog_id' ] ); + } + echo "
    "; + ?>

    + +

    +

    + + +

    +

    + +
    + + diff --git a/wp-admin/network/user-edit.php b/wp-admin/network/user-edit.php new file mode 100644 index 0000000..effaaf8 --- /dev/null +++ b/wp-admin/network/user-edit.php @@ -0,0 +1,16 @@ +add_help_tab( array( + 'id' => 'overview', + 'title' => __('Overview'), + 'content' => + '

    ' . __('Add User will set up a new user account on the network and send that person an email with username and password.') . '

    ' . + '

    ' . __('Users who are signed up to the network without a site are added as subscribers to the main or primary dashboard site, giving them profile pages to manage their accounts. These users will only see Dashboard and My Sites in the main navigation until a site is created for them.') . '

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

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

    ' . + '

    ' . __('Documentation on Network Users') . '

    ' . + '

    ' . __('Support Forums') . '

    ' +); + +if ( isset($_REQUEST['action']) && 'add-user' == $_REQUEST['action'] ) { + check_admin_referer( 'add-user', '_wpnonce_add-user' ); + if ( ! current_user_can( 'manage_network_users' ) ) + wp_die( __( 'You do not have permission to access this page.' ) ); + + if ( ! is_array( $_POST['user'] ) ) + wp_die( __( 'Cannot create an empty user.' ) ); + + $user = $_POST['user']; + + $user_details = wpmu_validate_user_signup( $user['username'], $user['email'] ); + if ( is_wp_error( $user_details[ 'errors' ] ) && ! empty( $user_details[ 'errors' ]->errors ) ) { + $add_user_errors = $user_details[ 'errors' ]; + } else { + $password = wp_generate_password( 12, false); + $user_id = wpmu_create_user( esc_html( strtolower( $user['username'] ) ), $password, esc_html( $user['email'] ) ); + + if ( ! $user_id ) { + $add_user_errors = new WP_Error( 'add_user_fail', __( 'Cannot add user.' ) ); + } else { + wp_new_user_notification( $user_id, $password ); + wp_redirect( add_query_arg( array('update' => 'added'), 'user-new.php' ) ); + exit; + } + } +} + +if ( isset($_GET['update']) ) { + $messages = array(); + if ( 'added' == $_GET['update'] ) + $messages[] = __('User added.'); +} + +$title = __('Add New User'); +$parent_file = 'users.php'; + +require( ABSPATH . 'wp-admin/admin-header.php' ); ?> + +
    +

    +

    ' . $msg . '

    '; +} + +if ( isset( $add_user_errors ) && is_wp_error( $add_user_errors ) ) { ?> +
    + get_error_messages() as $message ) + echo "

    $message

    "; + ?> +
    + +
    + + + + + + + + + + + + +
    + + +
    +
    + +

    +

    +
    + + ID'>$current_user->user_login"; + + foreach ( ( $allusers = (array) $_POST['allusers'] ) as $key => $val ) { + if ( $val != '' && $val != '0' ) { + $delete_user = get_userdata( $val ); + + if ( ! current_user_can( 'delete_user', $delete_user->ID ) ) + wp_die( sprintf( __( 'Warning! User %s cannot be deleted.' ), $delete_user->user_login ) ); + + if ( in_array( $delete_user->user_login, $site_admins ) ) + wp_die( sprintf( __( 'Warning! User cannot be deleted. The user %s is a network administrator.' ), $delete_user->user_login ) ); + + echo "\n"; + $blogs = get_blogs_of_user( $val, true ); + + if ( !empty( $blogs ) ) { + ?> +

    ' . $delete_user->user_login . '' ); ?>

    + $details ) { + $blog_users = get_users( array( 'blog_id' => $details->userblog_id, 'fields' => array( 'ID', 'user_login' ) ) ); + if ( is_array( $blog_users ) && !empty( $blog_users ) ) { + $user_site = "{$details->blogname}"; + $user_dropdown = "\n"; + ?> +
      +
    • +
    • +
    • +
    + "; + } + } + } + + submit_button( __('Confirm Deletion'), 'delete' ); + ?> + + '; + confirm_delete_users( $_POST['allusers'] ); + echo '
    '; + require_once( ABSPATH . 'wp-admin/admin-footer.php' ); + } else { + wp_redirect( network_admin_url( 'users.php' ) ); + } + exit(); + break; + + case 'allusers': + if ( !current_user_can( 'manage_network_users' ) ) + wp_die( __( 'You do not have permission to access this page.' ) ); + + if ( ( isset( $_POST['action']) || isset($_POST['action2'] ) ) && isset( $_POST['allusers'] ) ) { + check_admin_referer( 'bulk-users-network' ); + + $doaction = $_POST['action'] != -1 ? $_POST['action'] : $_POST['action2']; + $userfunction = ''; + + foreach ( (array) $_POST['allusers'] as $key => $val ) { + if ( !empty( $val ) ) { + switch ( $doaction ) { + case 'delete': + if ( ! current_user_can( 'delete_users' ) ) + wp_die( __( 'You do not have permission to access this page.' ) ); + $title = __( 'Users' ); + $parent_file = 'users.php'; + require_once( ABSPATH . 'wp-admin/admin-header.php' ); + echo '
    '; + confirm_delete_users( $_POST['allusers'] ); + echo '
    '; + require_once( ABSPATH . 'wp-admin/admin-footer.php' ); + exit(); + break; + + case 'spam': + $user = get_userdata( $val ); + if ( is_super_admin( $user->ID ) ) + wp_die( sprintf( __( 'Warning! User cannot be modified. The user %s is a network administrator.' ), esc_html( $user->user_login ) ) ); + + $userfunction = 'all_spam'; + $blogs = get_blogs_of_user( $val, true ); + foreach ( (array) $blogs as $key => $details ) { + if ( $details->userblog_id != $current_site->blog_id ) // main blog not a spam ! + update_blog_status( $details->userblog_id, 'spam', '1' ); + } + update_user_status( $val, 'spam', '1' ); + break; + + case 'notspam': + $userfunction = 'all_notspam'; + $blogs = get_blogs_of_user( $val, true ); + foreach ( (array) $blogs as $key => $details ) + update_blog_status( $details->userblog_id, 'spam', '0' ); + + update_user_status( $val, 'spam', '0' ); + break; + } + } + } + + wp_safe_redirect( add_query_arg( array( 'updated' => 'true', 'action' => $userfunction ), wp_get_referer() ) ); + } else { + $location = network_admin_url( 'users.php' ); + + if ( ! empty( $_REQUEST['paged'] ) ) + $location = add_query_arg( 'paged', (int) $_REQUEST['paged'], $location ); + wp_redirect( $location ); + } + exit(); + break; + + case 'dodelete': + check_admin_referer( 'ms-users-delete' ); + if ( ! ( current_user_can( 'manage_network_users' ) && current_user_can( 'delete_users' ) ) ) + wp_die( __( 'You do not have permission to access this page.' ) ); + + if ( ! empty( $_POST['blog'] ) && is_array( $_POST['blog'] ) ) { + foreach ( $_POST['blog'] as $id => $users ) { + foreach ( $users as $blogid => $user_id ) { + if ( ! current_user_can( 'delete_user', $id ) ) + continue; + + if ( ! empty( $_POST['delete'] ) && 'reassign' == $_POST['delete'][$blogid][$id] ) + remove_user_from_blog( $id, $blogid, $user_id ); + else + remove_user_from_blog( $id, $blogid ); + } + } + } + $i = 0; + if ( is_array( $_POST['user'] ) && ! empty( $_POST['user'] ) ) + foreach( $_POST['user'] as $id ) { + if ( ! current_user_can( 'delete_user', $id ) ) + continue; + wpmu_delete_user( $id ); + $i++; + } + + if ( $i == 1 ) + $deletefunction = 'delete'; + else + $deletefunction = 'all_delete'; + + wp_redirect( add_query_arg( array( 'updated' => 'true', 'action' => $deletefunction ), network_admin_url( 'users.php' ) ) ); + exit(); + break; + } +} + +$wp_list_table = _get_list_table('WP_MS_Users_List_Table'); +$pagenum = $wp_list_table->get_pagenum(); +$wp_list_table->prepare_items(); +$total_pages = $wp_list_table->get_pagination_arg( 'total_pages' ); + +if ( $pagenum > $total_pages && $total_pages > 0 ) { + wp_redirect( add_query_arg( 'paged', $total_pages ) ); + exit; +} +$title = __( 'Users' ); +$parent_file = 'users.php'; + +add_screen_option( 'per_page', array('label' => _x( 'Users', 'users per page (screen options)' )) ); + +get_current_screen()->add_help_tab( array( + 'id' => 'overview', + 'title' => __('Overview'), + 'content' => + '

    ' . __('This table shows all users across the network and the sites to which they are assigned.') . '

    ' . + '

    ' . __('Hover over any user on the list to make the edit links appear. The Edit link on the left will take you to their Edit User profile page; the Edit link on the right by any site name goes to an Edit Site screen for that site.') . '

    ' . + '

    ' . __('You can also go to the user’s profile page by clicking on the individual username.') . '

    ' . + '

    ' . __('You can sort the table by clicking on any of the bold headings and switch between list and excerpt views by using the icons in the upper right.') . '

    ' . + '

    ' . __('The bulk action will permanently delete selected users, or mark/unmark those selected as spam. Spam users will have posts removed and will be unable to sign up again with the same email addresses.') . '

    ' . + '

    ' . __('You can make an existing user an additional super admin by going to the Edit User profile page and checking the box to grant that privilege.') . '

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

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

    ' . + '

    ' . __('Documentation on Network Users') . '

    ' . + '

    ' . __('Support Forums') . '

    ' +); + +require_once( ABSPATH . 'wp-admin/admin-header.php' ); + +if ( isset( $_REQUEST['updated'] ) && $_REQUEST['updated'] == 'true' && ! empty( $_REQUEST['action'] ) ) { + ?> +

    + +

    + +
    +

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

    + + views(); ?> + +
    + search_box( __( 'Search Users' ), 'all-user' ); ?> +
    + +
    + display(); ?> +
    +
    + + diff --git a/wp-admin/options-discussion.php b/wp-admin/options-discussion.php new file mode 100644 index 0000000..da0801a --- /dev/null +++ b/wp-admin/options-discussion.php @@ -0,0 +1,273 @@ +add_help_tab( array( + 'id' => 'overview', + 'title' => __('Overview'), + 'content' => '

    ' . __('This screen provides many options for controlling the management and display of comments and links to your posts/pages. So many, in fact, they won’t all fit here! :) Use the documentation links to get information on what each discussion setting does.') . '

    ' . + '

    ' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '

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

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

    ' . + '

    ' . __('Documentation on Discussion Settings') . '

    ' . + '

    ' . __('Support Forums') . '

    ' +); + +include( ABSPATH . 'wp-admin/admin-header.php' ); +?> + +
    +

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    +

    +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    +

    + +

    +

    + +

    +
    +

    +

    + +

    +
    + +

    + +

    + + + + + + + + + + + + + + + + + +
    + +
    + + __('G — Suitable for all audiences'), + /* translators: Content suitability rating: http://bit.ly/89QxZA */ + 'PG' => __('PG — Possibly offensive, usually for audiences 13 and above'), + /* translators: Content suitability rating: http://bit.ly/89QxZA */ + 'R' => __('R — Intended for adult audiences above 17'), + /* translators: Content suitability rating: http://bit.ly/89QxZA */ + 'X' => __('X — Even more mature than above') +); +foreach ($ratings as $key => $rating) : + $selected = (get_option('avatar_rating') == $key) ? 'checked="checked"' : ''; + echo "\n\t
    "; +endforeach; +?> + +
    + +
    + + __('Mystery Man'), + 'blank' => __('Blank'), + 'gravatar_default' => __('Gravatar Logo'), + 'identicon' => __('Identicon (Generated)'), + 'wavatar' => __('Wavatar (Generated)'), + 'monsterid' => __('MonsterID (Generated)'), + 'retro' => __('Retro (Generated)') +); +/** + * Filter the default avatars. + * + * Avatars are stored in key/value pairs, where the key is option value, + * and the name is the displayed avatar name. + * + * @since 2.6.0 + * + * @param array $avatar_defaults Array of default avatars. + */ +$avatar_defaults = apply_filters( 'avatar_defaults', $avatar_defaults ); +$default = get_option('avatar_default'); +if ( empty($default) ) + $default = 'mystery'; +$size = 32; +$avatar_list = ''; +foreach ( $avatar_defaults as $default_key => $default_name ) { + $selected = ($default == $default_key) ? 'checked="checked" ' : ''; + $avatar_list .= "\n\t'; + $avatar_list .= '
    '; +} +/** + * Filter the HTML output of the default avatar list. + * + * @since 2.6.0 + * + * @param string $avatar_list HTML markup of the avatar list. + */ +echo apply_filters( 'default_avatar_select', $avatar_list ); +?> + +
    + + + + +
    +
    + + diff --git a/wp-admin/options-general.php b/wp-admin/options-general.php new file mode 100644 index 0000000..38f20c5 --- /dev/null +++ b/wp-admin/options-general.php @@ -0,0 +1,329 @@ + + +' . __('The fields on this screen determine some of the basics of your site setup.') . '

    ' . + '

    ' . __('Most themes display the site title at the top of every page, in the title bar of the browser, and as the identifying name for syndicated feeds. The tagline is also displayed by many themes.') . '

    '; + +if ( ! is_multisite() ) { + $options_help .= '

    ' . __('The WordPress URL and the Site URL can be the same (example.com) or different; for example, having the WordPress core files (example.com/wordpress) in a subdirectory instead of the root directory.') . '

    ' . + '

    ' . __('If you want site visitors to be able to register themselves, as opposed to by the site administrator, check the membership box. A default user role can be set for all new users, whether self-registered or registered by the site admin.') . '

    '; +} + +$options_help .= '

    ' . __('UTC means Coordinated Universal Time.') . '

    ' . + '

    ' . __( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.' ) . '

    '; + +get_current_screen()->add_help_tab( array( + 'id' => 'overview', + 'title' => __('Overview'), + 'content' => $options_help, +) ); + +get_current_screen()->set_help_sidebar( + '

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

    ' . + '

    ' . __('Documentation on General Settings') . '

    ' . + '

    ' . __('Support Forums') . '

    ' +); + +include( ABSPATH . 'wp-admin/admin-header.php' ); +?> + +
    +

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    class="regular-text code" />
    class="regular-text code" /> +

    to be different from the directory you installed WordPress.'); ?>

    +

    +
    + +
    +

    The new address will not become active until confirmed.') ?>

    + +
    +

    %1$s. Cancel'), esc_html( $new_admin_email ), esc_url( admin_url( 'options.php?dismiss=new_admin_email' ) ) ); ?>

    +
    + +
    + + + + UTC time is %s'), date_i18n($timezone_format, false, 'gmt')); ?> + + %1$s'), date_i18n($timezone_format)); ?> + +

    + +
    + + +
    + $right_now ) { + $found = true; + break; + } + } + + if ( $found ) { + echo ' '; + $message = $tr['isdst'] ? + __('Daylight saving time begins on: %s.') : + __('Standard time begins on: %s.'); + // Add the difference between the current offset and the new offset to ts to get the correct transition time from date_i18n(). + printf( $message, date_i18n(get_option('date_format') . ' ' . get_option('time_format'), $tr['ts'] + ($tz_offset - $tr['offset']) ) ); + } else { + _e('This timezone does not observe daylight saving time.'); + } + } + // Set back to UTC. + date_default_timezone_set('UTC'); + ?> +
    + +
    +
    + ' . date_i18n( $format ) . "
    \n"; + } + + echo ' ' . date_i18n( get_option('date_format') ) . " \n"; + + echo "\t

    " . __('Documentation on date and time formatting.') . "

    \n"; +?> +
    +
    +
    + ' . date_i18n( $format ) . "
    \n"; + } + + echo ' ' . date_i18n( get_option('time_format') ) . " \n"; + ; +?> +
    +
    + +
    + + + + +
    + +
    + + diff --git a/wp-admin/options-head.php b/wp-admin/options-head.php new file mode 100644 index 0000000..1c706c8 --- /dev/null +++ b/wp-admin/options-head.php @@ -0,0 +1,18 @@ +' . __('You can set maximum sizes for images inserted into your written content; you can also insert an image as Full Size.') . '

    '; + +if ( ! is_multisite() && ( get_option('upload_url_path') || ( get_option('upload_path') != 'wp-content/uploads' && get_option('upload_path') ) ) ) { + $media_options_help .= '

    ' . __('Uploading Files allows you to choose the folder and path for storing your uploaded files.') . '

    '; +} + +$media_options_help .= '

    ' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '

    '; + +get_current_screen()->add_help_tab( array( + 'id' => 'overview', + 'title' => __('Overview'), + 'content' => $media_options_help, +) ); + +get_current_screen()->set_help_sidebar( + '

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

    ' . + '

    ' . __('Documentation on Media Settings') . '

    ' . + '

    ' . __('Support Forums') . '

    ' +); + +include( ABSPATH . 'wp-admin/admin-header.php' ); + +?> + +
    +

    + +
    + + +

    +

    + + + + + + + + + + + + + + + + + + +
    + + + +
    +/> + +
    + + + + +
    + + + + +
    + + +

    + + +
    + + + +

    + + + + + + + + + + + + + + + + + +
    +

    wp-content/uploads'); ?>

    +
    +

    +
    + +
    + + + + + + +
    + +
    + + diff --git a/wp-admin/options-permalink.php b/wp-admin/options-permalink.php new file mode 100644 index 0000000..28395e9 --- /dev/null +++ b/wp-admin/options-permalink.php @@ -0,0 +1,294 @@ +add_help_tab( array( + 'id' => 'overview', + 'title' => __('Overview'), + 'content' => '

    ' . __('Permalinks are the permanent URLs to your individual pages and blog posts, as well as your category and tag archives. A permalink is the web address used to link to your content. The URL to each post should be permanent, and never change — hence the name permalink.') . '

    ' . + '

    ' . __('This screen allows you to choose your default permalink structure. You can choose from common settings or create custom URL structures.') . '

    ' . + '

    ' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '

    ', +) ); + +get_current_screen()->add_help_tab( array( + 'id' => 'common-settings', + 'title' => __('Common Settings'), + 'content' => '

    ' . __('Many people choose to use “pretty permalinks,” URLs that contain useful information such as the post title rather than generic post ID numbers. You can choose from any of the permalink formats under Common Settings, or can craft your own if you select Custom Structure.') . '

    ' . + '

    ' . __('If you pick an option other than Default, your general URL path with structure tags, terms surrounded by %, will also appear in the custom structure field and your path can be further modified there.') . '

    ' . + '

    ' . __('When you assign multiple categories or tags to a post, only one can show up in the permalink: the lowest numbered category. This applies if your custom structure includes %category% or %tag%.') . '

    ' . + '

    ' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '

    ', +) ); + +get_current_screen()->add_help_tab( array( + 'id' => 'custom-structures', + 'title' => __('Custom Structures'), + 'content' => '

    ' . __('The Optional fields let you customize the “category” and “tag” base names that will appear in archive URLs. For example, the page listing all posts in the “Uncategorized” category could be /topics/uncategorized instead of /category/uncategorized.') . '

    ' . + '

    ' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '

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

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

    ' . + '

    ' . __('Documentation on Permalinks Settings') . '

    ' . + '

    ' . __('Documentation on Using Permalinks') . '

    ' . + '

    ' . __('Support Forums') . '

    ' +); + +/** + * Display JavaScript on the page. + * + * @since 3.5.0 + */ +function options_permalink_add_js() { + ?> + +set_permalink_structure( $permalink_structure ); + } + + if ( isset( $_POST['category_base'] ) ) { + $category_base = $_POST['category_base']; + if ( ! empty( $category_base ) ) + $category_base = $blog_prefix . preg_replace('#/+#', '/', '/' . str_replace( '#', '', $category_base ) ); + $wp_rewrite->set_category_base( $category_base ); + } + + if ( isset( $_POST['tag_base'] ) ) { + $tag_base = $_POST['tag_base']; + if ( ! empty( $tag_base ) ) + $tag_base = $blog_prefix . preg_replace('#/+#', '/', '/' . str_replace( '#', '', $tag_base ) ); + $wp_rewrite->set_tag_base( $tag_base ); + } + + wp_redirect( admin_url( 'options-permalink.php?settings-updated=true' ) ); + exit; +} + +$permalink_structure = get_option( 'permalink_structure' ); +$category_base = get_option( 'category_base' ); +$tag_base = get_option( 'tag_base' ); +$update_required = false; + +if ( $iis7_permalinks ) { + if ( ( ! file_exists($home_path . 'web.config') && win_is_writable($home_path) ) || win_is_writable($home_path . 'web.config') ) + $writable = true; + else + $writable = false; +} elseif ( $is_nginx ) { + $writable = false; +} else { + if ( ( ! file_exists( $home_path . '.htaccess' ) && is_writable( $home_path ) ) || is_writable( $home_path . '.htaccess' ) ) { + $writable = true; + } else { + $writable = false; + $existing_rules = array_filter( extract_from_markers( $home_path . '.htaccess', 'WordPress' ) ); + $new_rules = array_filter( explode( "\n", $wp_rewrite->mod_rewrite_rules() ) ); + $update_required = ( $new_rules !== $existing_rules ); + } +} + +if ( $wp_rewrite->using_index_permalinks() ) + $usingpi = true; +else + $usingpi = false; + +flush_rewrite_rules(); + +require( ABSPATH . 'wp-admin/admin-header.php' ); + +if ( ! empty( $_GET['settings-updated'] ) ) : ?> +

    +

    + + +
    +

    + +
    + + +

    URLs which have question marks and lots of numbers in them; however, WordPress offers you the ability to create a custom URL structure for your permalinks and archives. This can improve the aesthetics, usability, and forward-compatibility of your links. A number of tags are available, and here are some examples to get you started.'); ?>

    + + '', + 1 => $prefix . '/%year%/%monthnum%/%day%/%postname%/', + 2 => $prefix . '/%year%/%monthnum%/%postname%/', + 3 => $prefix . '/' . _x( 'archives', 'sample permalink base' ) . '/%post_id%', + 4 => $prefix . '/%postname%/', +); +?> +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    + +

    URLs here. For example, using topics as your category base would make your category links like http://example.org/%stopics/uncategorized/. If you leave these blank the defaults will be used.'), $suffix ); ?>

    + + + + + + + + + + + +
    + + + + +
    + + +

    web.config file were writable, we could do this automatically, but it isn’t so this is the url rewrite rule you should have in your web.config file. Click in the field and press CTRL + a to select all. Then insert this rule inside of the /<configuration>/<system.webServer>/<rewrite>/<rules> element in web.config file.') ?>

    +
    + +

    +
    +

    web.config file writable for us to generate rewrite rules automatically, do not forget to revert the permissions after rule has been saved.') ?>

    + +

    writable, we could do this automatically, but it isn’t so this is the url rewrite rule you should have in your web.config file. Create a new file, called web.config in the root directory of your site. Click in the field and press CTRL + a to select all. Then insert this code into the web.config file.') ?>

    +
    + +

    +
    +

    web.config file automatically, do not forget to revert the permissions after the file has been created.') ?>

    + + + +

    .htaccess file were writable, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your .htaccess file. Click in the field and press CTRL + a to select all.') ?>

    +
    + +

    +
    + + + + +
    + + diff --git a/wp-admin/options-reading.php b/wp-admin/options-reading.php new file mode 100644 index 0000000..7bcb20b --- /dev/null +++ b/wp-admin/options-reading.php @@ -0,0 +1,184 @@ + + +'; + echo '

    ' . __( 'The character encoding of your site (UTF-8 is recommended)' ) . '

    '; +} + +get_current_screen()->add_help_tab( array( + 'id' => 'overview', + 'title' => __('Overview'), + 'content' => '

    ' . __('This screen contains the settings that affect the display of your content.') . '

    ' . + '

    ' . sprintf(__('You can choose what’s displayed on the front page of your site. It can be posts in reverse chronological order (classic blog), or a fixed/static page. To set a static home page, you first need to create two Pages. One will become the front page, and the other will be where your posts are displayed.'), 'post-new.php?post_type=page') . '

    ' . + '

    ' . __('You can also control the display of your content in RSS feeds, including the maximum numbers of posts to display and whether to show full text or a summary.') . '

    ' . + '

    ' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '

    ', +) ); + +get_current_screen()->add_help_tab( array( + 'id' => 'site-visibility', + 'title' => has_action( 'blog_privacy_selector' ) ? __( 'Site Visibility' ) : __( 'Search Engine Visibility' ), + 'content' => '

    ' . __( 'You can choose whether or not your site will be crawled by robots, ping services, and spiders. If you want those services to ignore your site, click the checkbox next to “Discourage search engines from indexing this site” and click the Save Changes button at the bottom of the screen. Note that your privacy is not complete; your site is still visible on the web.' ) . '

    ' . + '

    ' . __( 'When this setting is in effect, a reminder is shown in the At a Glance box of the Dashboard that says, “Search Engines Discouraged,” to remind you that your site is not being crawled.' ) . '

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

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

    ' . + '

    ' . __('Documentation on Reading Settings') . '

    ' . + '

    ' . __('Support Forums') . '

    ' +); + +include( ABSPATH . 'wp-admin/admin-header.php' ); +?> + +
    +

    + +
    + 'blog_charset' ) ); +?> + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    +

    +

    +

    +
      +
    • +
    • +
    + +

    Warning: these pages should not be the same!' ); ?>

    + +
    + +
    +


    +

    +
    + + /> +
    + /> + +

    + + + +

    + +
    + + + + +
    +
    + diff --git a/wp-admin/options-writing.php b/wp-admin/options-writing.php new file mode 100644 index 0000000..4c761d2 --- /dev/null +++ b/wp-admin/options-writing.php @@ -0,0 +1,194 @@ +add_help_tab( array( + 'id' => 'overview', + 'title' => __('Overview'), + 'content' => '

    ' . __('You can submit content in several different ways; this screen holds the settings for all of them. The top section controls the editor within the dashboard, while the rest control external publishing methods. For more information on any of these methods, use the documentation links.') . '

    ' . + '

    ' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '

    ', +) ); + +get_current_screen()->add_help_tab( array( + 'id' => 'options-press', + 'title' => __('Press This'), + 'content' => '

    ' . __('Press This is a bookmarklet that makes it easy to blog about something you come across on the web. You can use it to just grab a link, or to post an excerpt. Press This will even allow you to choose from images included on the page and use them in your post. Just drag the Press This link on this screen to your bookmarks bar in your browser, and you’ll be on your way to easier content creation. Clicking on it while on another website opens a popup window with all these options.') . '

    ', +) ); + +/** This filter is documented in wp-admin/options.php */ +if ( apply_filters( 'enable_post_by_email_configuration', true ) ) { + get_current_screen()->add_help_tab( array( + 'id' => 'options-postemail', + 'title' => __( 'Post Via Email' ), + 'content' => '

    ' . __( 'Post via email settings allow you to send your WordPress install an email with the content of your post. You must set up a secret e-mail account with POP3 access to use this, and any mail received at this address will be posted, so it’s a good idea to keep this address very secret.' ) . '

    ', + ) ); +} + +/** This filter is documented in wp-admin/options-writing.php */ +if ( apply_filters( 'enable_update_services_configuration', true ) ) { + get_current_screen()->add_help_tab( array( + 'id' => 'options-services', + 'title' => __( 'Update Services' ), + 'content' => '

    ' . __( 'If desired, WordPress will automatically alert various services of your new posts.' ) . '

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

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

    ' . + '

    ' . __('Documentation on Writing Settings') . '

    ' . + '

    ' . __('Support Forums') . '

    ' +); + +include( ABSPATH . 'wp-admin/admin-header.php' ); +?> + +
    +

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    + 0, 'name' => 'default_category', 'orderby' => 'name', 'selected' => get_option('default_category'), 'hierarchical' => true)); +?> +
    + +
    + 0, 'name' => 'default_link_category', 'orderby' => 'name', 'selected' => get_option('default_link_category'), 'hierarchical' => true, 'taxonomy' => 'link_category')); +?> +
    + +

    +

    +

    +

    +

    + + + +

    +

    %s, %s, %s.'), wp_generate_password(8, false), wp_generate_password(8, false), wp_generate_password(8, false)) ?>

    + + + + + + + + + + + + + + + + + + + +
    + + +
    + +
    + 0, 'name' => 'default_email_category', 'orderby' => 'name', 'selected' => get_option('default_email_category'), 'hierarchical' => true)); +?> +
    + + + +

    + + + +

    + + + + + +

    Update Services because of your site’s visibility settings.'), 'options-reading.php'); ?>

    + + + + + + + +
    +
    + + diff --git a/wp-admin/options.php b/wp-admin/options.php new file mode 100644 index 0000000..f705a9f --- /dev/null +++ b/wp-admin/options.php @@ -0,0 +1,255 @@ + array( 'blogname', 'blogdescription', 'gmt_offset', 'date_format', 'time_format', 'start_of_week', 'timezone_string' ), + 'discussion' => array( 'default_pingback_flag', 'default_ping_status', 'default_comment_status', 'comments_notify', 'moderation_notify', 'comment_moderation', 'require_name_email', 'comment_whitelist', 'comment_max_links', 'moderation_keys', 'blacklist_keys', 'show_avatars', 'avatar_rating', 'avatar_default', 'close_comments_for_old_posts', 'close_comments_days_old', 'thread_comments', 'thread_comments_depth', 'page_comments', 'comments_per_page', 'default_comments_page', 'comment_order', 'comment_registration' ), + 'media' => array( 'thumbnail_size_w', 'thumbnail_size_h', 'thumbnail_crop', 'medium_size_w', 'medium_size_h', 'large_size_w', 'large_size_h', 'image_default_size', 'image_default_align', 'image_default_link_type' ), + 'reading' => array( 'posts_per_page', 'posts_per_rss', 'rss_use_excerpt', 'show_on_front', 'page_on_front', 'page_for_posts', 'blog_public' ), + 'writing' => array( 'use_smilies', 'default_category', 'default_email_category', 'use_balanceTags', 'default_link_category', 'default_post_format' ) +); +$whitelist_options['misc'] = $whitelist_options['options'] = $whitelist_options['privacy'] = array(); + +$mail_options = array('mailserver_url', 'mailserver_port', 'mailserver_login', 'mailserver_pass'); + +if ( ! in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ) ) + $whitelist_options['reading'][] = 'blog_charset'; + +if ( !is_multisite() ) { + if ( !defined( 'WP_SITEURL' ) ) + $whitelist_options['general'][] = 'siteurl'; + if ( !defined( 'WP_HOME' ) ) + $whitelist_options['general'][] = 'home'; + + $whitelist_options['general'][] = 'admin_email'; + $whitelist_options['general'][] = 'users_can_register'; + $whitelist_options['general'][] = 'default_role'; + + $whitelist_options['writing'] = array_merge($whitelist_options['writing'], $mail_options); + $whitelist_options['writing'][] = 'ping_sites'; + + $whitelist_options['media'][] = 'uploads_use_yearmonth_folders'; + + // If upload_url_path and upload_path are both default values, they're locked. + if ( get_option( 'upload_url_path' ) || ( get_option('upload_path') != 'wp-content/uploads' && get_option('upload_path') ) ) { + $whitelist_options['media'][] = 'upload_path'; + $whitelist_options['media'][] = 'upload_url_path'; + } +} else { + $whitelist_options['general'][] = 'new_admin_email'; + $whitelist_options['general'][] = 'WPLANG'; + + /** + * Filter whether the post-by-email functionality is enabled. + * + * @since 3.0.0 + * + * @param bool $enabled Whether post-by-email configuration is enabled. Default true. + */ + if ( apply_filters( 'enable_post_by_email_configuration', true ) ) + $whitelist_options['writing'] = array_merge($whitelist_options['writing'], $mail_options); +} + +/** + * Filter the options white list. + * + * @since 2.7.0 + * + * @param array White list options. + */ +$whitelist_options = apply_filters( 'whitelist_options', $whitelist_options ); + +/* + * If $_GET['action'] == 'update' we are saving settings sent from a settings page + */ +if ( 'update' == $action ) { + if ( 'options' == $option_page && !isset( $_POST['option_page'] ) ) { // This is for back compat and will eventually be removed. + $unregistered = true; + check_admin_referer( 'update-options' ); + } else { + $unregistered = false; + check_admin_referer( $option_page . '-options' ); + } + + if ( !isset( $whitelist_options[ $option_page ] ) ) + wp_die( __( 'ERROR: options page not found.' ) ); + + if ( 'options' == $option_page ) { + if ( is_multisite() && ! is_super_admin() ) + wp_die( __( 'You do not have sufficient permissions to modify unregistered settings for this site.' ) ); + $options = explode( ',', wp_unslash( $_POST[ 'page_options' ] ) ); + } else { + $options = $whitelist_options[ $option_page ]; + } + + // Handle custom date/time formats + if ( 'general' == $option_page ) { + if ( !empty($_POST['date_format']) && isset($_POST['date_format_custom']) && '\c\u\s\t\o\m' == wp_unslash( $_POST['date_format'] ) ) + $_POST['date_format'] = $_POST['date_format_custom']; + if ( !empty($_POST['time_format']) && isset($_POST['time_format_custom']) && '\c\u\s\t\o\m' == wp_unslash( $_POST['time_format'] ) ) + $_POST['time_format'] = $_POST['time_format_custom']; + // Map UTC+- timezones to gmt_offsets and set timezone_string to empty. + if ( !empty($_POST['timezone_string']) && preg_match('/^UTC[+-]/', $_POST['timezone_string']) ) { + $_POST['gmt_offset'] = $_POST['timezone_string']; + $_POST['gmt_offset'] = preg_replace('/UTC\+?/', '', $_POST['gmt_offset']); + $_POST['timezone_string'] = ''; + } + } + + if ( $options ) { + foreach ( $options as $option ) { + if ( $unregistered ) + _deprecated_argument( 'options.php', '2.7', sprintf( __( 'The %1$s setting is unregistered. Unregistered settings are deprecated. See http://codex.wordpress.org/Settings_API' ), $option, $option_page ) ); + + $option = trim( $option ); + $value = null; + if ( isset( $_POST[ $option ] ) ) { + $value = $_POST[ $option ]; + if ( ! is_array( $value ) ) + $value = trim( $value ); + $value = wp_unslash( $value ); + } + update_option( $option, $value ); + } + } + + /** + * Handle settings errors and return to options page + */ + // If no settings errors were registered add a general 'updated' message. + if ( !count( get_settings_errors() ) ) + add_settings_error('general', 'settings_updated', __('Settings saved.'), 'updated'); + set_transient('settings_errors', get_settings_errors(), 30); + + /** + * Redirect back to the settings page that was submitted + */ + $goback = add_query_arg( 'settings-updated', 'true', wp_get_referer() ); + wp_redirect( $goback ); + exit; +} + +include( ABSPATH . 'wp-admin/admin-header.php' ); ?> + +
    +

    +
    + + + + +get_results( "SELECT * FROM $wpdb->options ORDER BY option_name" ); + +foreach ( (array) $options as $option ) : + $disabled = false; + if ( $option->option_name == '' ) + continue; + if ( is_serialized( $option->option_value ) ) { + if ( is_serialized_string( $option->option_value ) ) { + // this is a serialized string, so we should display it + $value = maybe_unserialize( $option->option_value ); + $options_to_update[] = $option->option_name; + $class = 'all-options'; + } else { + $value = 'SERIALIZED DATA'; + $disabled = true; + $class = 'all-options disabled'; + } + } else { + $value = $option->option_value; + $options_to_update[] = $option->option_name; + $class = 'all-options'; + } + $name = esc_attr( $option->option_name ); + echo " + + + +"; +endforeach; +?> +
    "; + if ( strpos( $value, "\n" ) !== false ) + echo ""; + else + echo ""; + echo "
    + + + + + +
    +
    + + +
    +

    +

    +
    + time() ) + (array) get_option( 'recently_activated' ) ); + + wp_redirect(add_query_arg('_wpnonce', wp_create_nonce('edit-plugin-test_' . $file), "plugin-editor.php?file=$file&liveupdate=1&scrollto=$scrollto&networkwide=" . $network_wide)); + exit; + } + wp_redirect( self_admin_url("plugin-editor.php?file=$file&a=te&scrollto=$scrollto") ); + } else { + wp_redirect( self_admin_url("plugin-editor.php?file=$file&scrollto=$scrollto") ); + } + exit; + +break; + +default: + + if ( isset($_GET['liveupdate']) ) { + check_admin_referer('edit-plugin-test_' . $file); + + $error = validate_plugin($file); + if ( is_wp_error($error) ) + wp_die( $error ); + + if ( ( ! empty( $_GET['networkwide'] ) && ! is_plugin_active_for_network($file) ) || ! is_plugin_active($file) ) + activate_plugin($file, "plugin-editor.php?file=$file&phperror=1", ! empty( $_GET['networkwide'] ) ); // we'll override this later if the plugin can be included without fatal error + + wp_redirect( self_admin_url("plugin-editor.php?file=$file&a=te&scrollto=$scrollto") ); + exit; + } + + // List of allowable extensions + $editable_extensions = array('php', 'txt', 'text', 'js', 'css', 'html', 'htm', 'xml', 'inc', 'include'); + + /** + * Filter file type extensions editable in the plugin editor. + * + * @since 2.8.0 + * + * @param array $editable_extensions An array of editable plugin file extensions. + */ + $editable_extensions = (array) apply_filters( 'editable_extensions', $editable_extensions ); + + if ( ! is_file($real_file) ) { + wp_die(sprintf('

    %s

    ', __('No such file exists! Double check the name and try again.'))); + } else { + // Get the extension of the file + if ( preg_match('/\.([^.]+)$/', $real_file, $matches) ) { + $ext = strtolower($matches[1]); + // If extension is not in the acceptable list, skip it + if ( !in_array( $ext, $editable_extensions) ) + wp_die(sprintf('

    %s

    ', __('Files of this type are not editable.'))); + } + } + + get_current_screen()->add_help_tab( array( + 'id' => 'overview', + 'title' => __('Overview'), + 'content' => + '

    ' . __('You can use the editor to make changes to any of your plugins’ individual PHP files. Be aware that if you make changes, plugins updates will overwrite your customizations.') . '

    ' . + '

    ' . __('Choose a plugin to edit from the menu in the upper right and click the Select button. Click once on any file name to load it in the editor, and make your changes. Don’t forget to save your changes (Update File) when you’re finished.') . '

    ' . + '

    ' . __('The Documentation menu below the editor lists the PHP functions recognized in the plugin file. Clicking Look Up takes you to a web page about that particular function.') . '

    ' . + '

    ' . __('In the editing area the Tab key enters a tab character. To move below this area by pressing Tab, press the Esc key followed by the Tab key.') . '

    ' . + '

    ' . __('If you want to make changes but don’t want them to be overwritten when the plugin is updated, you may be ready to think about writing your own plugin. For information on how to edit plugins, write your own from scratch, or just better understand their anatomy, check out the links below.') . '

    ' . + ( is_network_admin() ? '

    ' . __('Any edits to files from this screen will be reflected on all sites in the network.') . '

    ' : '' ) + ) ); + + get_current_screen()->set_help_sidebar( + '

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

    ' . + '

    ' . __('Documentation on Editing Plugins') . '

    ' . + '

    ' . __('Documentation on Writing Plugins') . '

    ' . + '

    ' . __('Support Forums') . '

    ' + ); + + require_once(ABSPATH . 'wp-admin/admin-header.php'); + + update_recently_edited(WP_PLUGIN_DIR . '/' . $file); + + $content = file_get_contents( $real_file ); + + if ( '.php' == substr( $real_file, strrpos( $real_file, '.' ) ) ) { + $functions = wp_doc_link_parse( $content ); + + if ( !empty($functions) ) { + $docs_select = ''; + } + } + + $content = esc_textarea( $content ); + ?> + +

    + +

    fatal error.') ?>

    + + + +
    + +
    +

    + +
    +
    +%s (active)'), $file); + else + echo sprintf(__('Browsing %s (active)'), $file); + } else { + if ( is_writeable($real_file) ) + echo sprintf(__('Editing %s (inactive)'), $file); + else + echo sprintf(__('Browsing %s (inactive)'), $file); + } + ?> +
    +
    +
    + + + +
    +
    +
    +
    + +
    +

    + +
      + + > + +
    +
    +
    + +
    + + + + +
    + +
    + + + +

    Warning: Making changes to active plugins is not recommended. If your changes cause a fatal error, the plugin will be automatically deactivated.'); ?>

    + +

    + "; + submit_button( __( 'Update File and Attempt to Reactivate' ), 'primary', 'submit', false ); + } else { + submit_button( __( 'Update File' ), 'primary', 'submit', false ); + } + ?> +

    + +

    the Codex for more information.'); ?>

    + +
    +
    +
    + +get_pagenum(); +$wp_list_table->prepare_items(); + +$title = __('Install Plugins'); +$parent_file = 'plugins.php'; + +wp_enqueue_script( 'plugin-install' ); +if ( 'plugin-information' != $tab ) + add_thickbox(); + +$body_id = $tab; + +/** + * Fires before each tab on the Install Plugins screen is loaded. + * + * The dynamic portion of the action hook, $tab, allows for targeting + * individual tabs, for instance 'install_plugins_pre_plugin-information'. + * + * @since 2.7.0 + */ +do_action( "install_plugins_pre_$tab" ); + +get_current_screen()->add_help_tab( array( +'id' => 'overview', +'title' => __('Overview'), +'content' => + '

    ' . sprintf(__('Plugins hook into WordPress to extend its functionality with custom features. Plugins are developed independently from the core WordPress application by thousands of developers all over the world. All plugins in the official WordPress.org Plugin Directory are compatible with the license WordPress uses. You can find new plugins to install by searching or browsing the Directory right here in your own Plugins section.'), 'https://wordpress.org/plugins/') . '

    ' +) ); +get_current_screen()->add_help_tab( array( +'id' => 'adding-plugins', +'title' => __('Adding Plugins'), +'content' => + '

    ' . __('If you know what you’re looking for, Search is your best bet. The Search screen has options to search the WordPress.org Plugin Directory for a particular Term, Author, or Tag. You can also search the directory by selecting popular tags. Tags in larger type mean more plugins have been labeled with that tag.') . '

    ' . + '

    ' . __('If you just want to get an idea of what’s available, you can browse Featured, Popular, and Newest plugins by using the links in the upper left of the screen. These sections rotate regularly.') . '

    ' . + '

    ' . __('You can also browse a user’s favorite plugins, by using the Favorites link in the upper left of the screen and entering their WordPress.org username.') . '

    ' . + '

    ' . __('If you want to install a plugin that you’ve downloaded elsewhere, click the Upload link in the upper left. You will be prompted to upload the .zip package, and once uploaded, you can activate the new plugin.') . '

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

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

    ' . + '

    ' . __('Documentation on Installing Plugins') . '

    ' . + '

    ' . __('Support Forums') . '

    ' +); + +/** + * WordPress Administration Template Header. + */ +include(ABSPATH . 'wp-admin/admin-header.php'); +?> +
    +

    + +views(); ?> + +
    + + +
    +get_pagenum(); + +$action = $wp_list_table->current_action(); + +$plugin = isset($_REQUEST['plugin']) ? $_REQUEST['plugin'] : ''; +$s = isset($_REQUEST['s']) ? urlencode($_REQUEST['s']) : ''; + +// Clean up request URI from temporary args for screen options/paging uri's to work as expected. +$_SERVER['REQUEST_URI'] = remove_query_arg(array('error', 'deleted', 'activate', 'activate-multi', 'deactivate', 'deactivate-multi', '_error_nonce'), $_SERVER['REQUEST_URI']); + +if ( $action ) { + + switch ( $action ) { + case 'activate': + if ( ! current_user_can('activate_plugins') ) + wp_die(__('You do not have sufficient permissions to activate plugins for this site.')); + + if ( is_multisite() && ! is_network_admin() && is_network_only_plugin( $plugin ) ) { + wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") ); + exit; + } + + check_admin_referer('activate-plugin_' . $plugin); + + $result = activate_plugin($plugin, self_admin_url('plugins.php?error=true&plugin=' . $plugin), is_network_admin() ); + if ( is_wp_error( $result ) ) { + if ( 'unexpected_output' == $result->get_error_code() ) { + $redirect = self_admin_url('plugins.php?error=true&charsout=' . strlen($result->get_error_data()) . '&plugin=' . $plugin . "&plugin_status=$status&paged=$page&s=$s"); + wp_redirect(add_query_arg('_error_nonce', wp_create_nonce('plugin-activation-error_' . $plugin), $redirect)); + exit; + } else { + wp_die($result); + } + } + + if ( ! is_network_admin() ) { + $recent = (array) get_option( 'recently_activated' ); + unset( $recent[ $plugin ] ); + update_option( 'recently_activated', $recent ); + } + + if ( isset($_GET['from']) && 'import' == $_GET['from'] ) { + wp_redirect( self_admin_url("import.php?import=" . str_replace('-importer', '', dirname($plugin))) ); // overrides the ?error=true one above and redirects to the Imports page, stripping the -importer suffix + } else { + wp_redirect( self_admin_url("plugins.php?activate=true&plugin_status=$status&paged=$page&s=$s") ); // overrides the ?error=true one above + } + exit; + break; + case 'activate-selected': + if ( ! current_user_can('activate_plugins') ) + wp_die(__('You do not have sufficient permissions to activate plugins for this site.')); + + check_admin_referer('bulk-plugins'); + + $plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array(); + + if ( is_network_admin() ) { + foreach ( $plugins as $i => $plugin ) { + // Only activate plugins which are not already network activated. + if ( is_plugin_active_for_network( $plugin ) ) { + unset( $plugins[ $i ] ); + } + } + } else { + foreach ( $plugins as $i => $plugin ) { + // Only activate plugins which are not already active and are not network-only when on Multisite. + if ( is_plugin_active( $plugin ) || ( is_multisite() && is_network_only_plugin( $plugin ) ) ) { + unset( $plugins[ $i ] ); + } + } + } + + if ( empty($plugins) ) { + wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") ); + exit; + } + + activate_plugins($plugins, self_admin_url('plugins.php?error=true'), is_network_admin() ); + + if ( ! is_network_admin() ) { + $recent = (array) get_option('recently_activated' ); + foreach ( $plugins as $plugin ) + unset( $recent[ $plugin ] ); + update_option( 'recently_activated', $recent ); + } + + wp_redirect( self_admin_url("plugins.php?activate-multi=true&plugin_status=$status&paged=$page&s=$s") ); + exit; + break; + case 'update-selected' : + + check_admin_referer( 'bulk-plugins' ); + + if ( isset( $_GET['plugins'] ) ) + $plugins = explode( ',', $_GET['plugins'] ); + elseif ( isset( $_POST['checked'] ) ) + $plugins = (array) $_POST['checked']; + else + $plugins = array(); + + $title = __( 'Update Plugins' ); + $parent_file = 'plugins.php'; + + wp_enqueue_script( 'updates' ); + require_once(ABSPATH . 'wp-admin/admin-header.php'); + + echo '
    '; + echo '

    ' . esc_html( $title ) . '

    '; + + $url = self_admin_url('update.php?action=update-selected&plugins=' . urlencode( join(',', $plugins) )); + $url = wp_nonce_url($url, 'bulk-update-plugins'); + + echo ""; + echo '
    '; + require_once(ABSPATH . 'wp-admin/admin-footer.php'); + exit; + break; + case 'error_scrape': + if ( ! current_user_can('activate_plugins') ) + wp_die(__('You do not have sufficient permissions to activate plugins for this site.')); + + check_admin_referer('plugin-activation-error_' . $plugin); + + $valid = validate_plugin($plugin); + if ( is_wp_error($valid) ) + wp_die($valid); + + if ( ! WP_DEBUG ) { + 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 ); + } + + @ini_set('display_errors', true); //Ensure that Fatal errors are displayed. + // Go back to "sandbox" scope so we get the same errors as before + function plugin_sandbox_scrape( $plugin ) { + wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin ); + include( WP_PLUGIN_DIR . '/' . $plugin ); + } + plugin_sandbox_scrape( $plugin ); + /** This action is documented in wp-admin/includes/plugins.php */ + do_action( "activate_{$plugin}" ); + exit; + break; + case 'deactivate': + if ( ! current_user_can('activate_plugins') ) + wp_die(__('You do not have sufficient permissions to deactivate plugins for this site.')); + + check_admin_referer('deactivate-plugin_' . $plugin); + + if ( ! is_network_admin() && is_plugin_active_for_network( $plugin ) ) { + wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") ); + exit; + } + + deactivate_plugins( $plugin, false, is_network_admin() ); + if ( ! is_network_admin() ) + update_option( 'recently_activated', array( $plugin => time() ) + (array) get_option( 'recently_activated' ) ); + if ( headers_sent() ) + echo ""; + else + wp_redirect( self_admin_url("plugins.php?deactivate=true&plugin_status=$status&paged=$page&s=$s") ); + exit; + break; + case 'deactivate-selected': + if ( ! current_user_can('activate_plugins') ) + wp_die(__('You do not have sufficient permissions to deactivate plugins for this site.')); + + check_admin_referer('bulk-plugins'); + + $plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array(); + // Do not deactivate plugins which are already deactivated. + if ( is_network_admin() ) { + $plugins = array_filter( $plugins, 'is_plugin_active_for_network' ); + } else { + $plugins = array_filter( $plugins, 'is_plugin_active' ); + $plugins = array_diff( $plugins, array_filter( $plugins, 'is_plugin_active_for_network' ) ); + } + if ( empty($plugins) ) { + wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") ); + exit; + } + + deactivate_plugins( $plugins, false, is_network_admin() ); + + if ( ! is_network_admin() ) { + $deactivated = array(); + foreach ( $plugins as $plugin ) + $deactivated[ $plugin ] = time(); + update_option( 'recently_activated', $deactivated + (array) get_option( 'recently_activated' ) ); + } + + wp_redirect( self_admin_url("plugins.php?deactivate-multi=true&plugin_status=$status&paged=$page&s=$s") ); + exit; + break; + case 'delete-selected': + if ( ! current_user_can('delete_plugins') ) + wp_die(__('You do not have sufficient permissions to delete plugins for this site.')); + + check_admin_referer('bulk-plugins'); + + //$_POST = from the plugin form; $_GET = from the FTP details screen. + $plugins = isset( $_REQUEST['checked'] ) ? (array) $_REQUEST['checked'] : array(); + if ( empty( $plugins ) ) { + wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") ); + exit; + } + + $plugins = array_filter($plugins, 'is_plugin_inactive'); // Do not allow to delete Activated plugins. + if ( empty( $plugins ) ) { + wp_redirect( self_admin_url( "plugins.php?error=true&main=true&plugin_status=$status&paged=$page&s=$s" ) ); + exit; + } + + include(ABSPATH . 'wp-admin/update.php'); + + $parent_file = 'plugins.php'; + + if ( ! isset($_REQUEST['verify-delete']) ) { + wp_enqueue_script('jquery'); + require_once(ABSPATH . 'wp-admin/admin-header.php'); + ?> +
    + $data ) { + $plugin_info[ $plugin_file ] = _get_plugin_data_markup_translate( $plugin_file, $data ); + $plugin_info[ $plugin_file ]['is_uninstallable'] = is_uninstallable_plugin( $plugin ); + if ( ! $plugin_info[ $plugin_file ]['Network'] ) + $have_non_network_plugins = true; + } + } + } + } + $plugins_to_delete = count( $plugin_info ); + echo '

    ' . _n( 'Delete Plugin', 'Delete Plugins', $plugins_to_delete ) . '

    '; + ?> + +

    + +

    +
      + ', sprintf( __( '%1$s by %2$s (will also delete its data)' ), esc_html($plugin['Name']), esc_html($plugin['AuthorName']) ), ''; + $data_to_delete = true; + } else { + /* translators: 1: plugin name, 2: plugin author */ + echo '
    • ', sprintf( __('%1$s by %2$s' ), esc_html($plugin['Name']), esc_html($plugin['AuthorName']) ), '
    • '; + } + } + ?> +
    +

    +
    + + + '; + ?> + + +
    +
    + +
    + +

    + +
    + prepare_items(); + +wp_enqueue_script('plugin-install'); +add_thickbox(); + +add_screen_option( 'per_page', array('label' => _x( 'Plugins', 'plugins per page (screen options)' ), 'default' => 999 ) ); + +get_current_screen()->add_help_tab( array( +'id' => 'overview', +'title' => __('Overview'), +'content' => + '

    ' . __('Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.') . '

    ' . + '

    ' . sprintf(__('You can find additional plugins for your site by using the Plugin Browser/Installer functionality or by browsing the WordPress Plugin Directory directly and installing new plugins manually. To manually install a plugin you generally just need to upload the plugin file into your /wp-content/plugins directory. Once a plugin has been installed, you can activate it here.'), 'plugin-install.php', 'https://wordpress.org/plugins/') . '

    ' +) ); +get_current_screen()->add_help_tab( array( +'id' => 'compatibility-problems', +'title' => __('Troubleshooting'), +'content' => + '

    ' . __('Most of the time, plugins play nicely with the core of WordPress and with other plugins. Sometimes, though, a plugin’s code will get in the way of another plugin, causing compatibility issues. If your site starts doing strange things, this may be the problem. Try deactivating all your plugins and re-activating them in various combinations until you isolate which one(s) caused the issue.') . '

    ' . + '

    ' . sprintf( __('If something goes wrong with a plugin and you can’t use WordPress, delete or rename that file in the %s directory and it will be automatically deactivated.'), WP_PLUGIN_DIR) . '

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

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

    ' . + '

    ' . __('Documentation on Managing Plugins') . '

    ' . + '

    ' . __('Support Forums') . '

    ' +); + +$title = __('Plugins'); +$parent_file = 'plugins.php'; + +require_once(ABSPATH . 'wp-admin/admin-header.php'); + +$invalid = validate_active_plugins(); +if ( !empty($invalid) ) + foreach ( $invalid as $plugin_file => $error ) + echo '

    ' . sprintf(__('The plugin %s has been deactivated due to an error: %s'), esc_html($plugin_file), $error->get_error_message()) . '

    '; +?> + +unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.'), $_GET['charsout']); + else + $errmsg = __('Plugin could not be activated because it triggered a fatal error.'); + ?> +

    + + + +
    + +

    get_error_message() ); ?>

    + +

    deleted.'); ?>

    + + +

    activated.') ?>

    + +

    activated.'); ?>

    + +

    deactivated.') ?>

    + +

    deactivated.'); ?>

    + +

    + + +
    +

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

    + + + +views(); ?> + +
    +search_box( __( 'Search Installed Plugins' ), 'plugin' ); ?> +
    + +
    + + + + +display(); ?> +
    + +
    + + true ) ) ) ) + $post_type = $_GET['post_type']; +else + wp_die( __('Invalid post type') ); + +$post_type_object = get_post_type_object( $post_type ); + +if ( 'post' == $post_type ) { + $parent_file = 'edit.php'; + $submenu_file = 'post-new.php'; +} elseif ( 'attachment' == $post_type ) { + if ( wp_redirect( admin_url( 'media-new.php' ) ) ) + exit; +} else { + $submenu_file = "post-new.php?post_type=$post_type"; + if ( isset( $post_type_object ) && $post_type_object->show_in_menu && $post_type_object->show_in_menu !== true ) { + $parent_file = $post_type_object->show_in_menu; + if ( ! isset( $_registered_pages[ get_plugin_page_hookname( "post-new.php?post_type=$post_type", $post_type_object->show_in_menu ) ] ) ) + $submenu_file = $parent_file; + } else { + $parent_file = "edit.php?post_type=$post_type"; + } +} + +$title = $post_type_object->labels->add_new_item; + +$editing = true; + +if ( ! current_user_can( $post_type_object->cap->edit_posts ) || ! current_user_can( $post_type_object->cap->create_posts ) ) + wp_die( __( 'Cheatin’ uh?' ) ); + +// Schedule auto-draft cleanup +if ( ! wp_next_scheduled( 'wp_scheduled_auto_draft_delete' ) ) + wp_schedule_event( time(), 'daily', 'wp_scheduled_auto_draft_delete' ); + +wp_enqueue_script( 'autosave' ); + +if ( is_multisite() ) { + add_action( 'admin_footer', '_admin_notice_post_locked' ); +} else { + $check_users = get_users( array( 'fields' => 'ID', 'number' => 2 ) ); + + if ( count( $check_users ) > 1 ) + add_action( 'admin_footer', '_admin_notice_post_locked' ); + + unset( $check_users ); +} + +// Show post form. +$post = get_default_post_to_edit( $post_type, true ); +$post_ID = $post->ID; +include( ABSPATH . 'wp-admin/edit-form-advanced.php' ); +include( ABSPATH . 'wp-admin/admin-footer.php' ); diff --git a/wp-admin/post.php b/wp-admin/post.php new file mode 100644 index 0000000..f378c22 --- /dev/null +++ b/wp-admin/post.php @@ -0,0 +1,325 @@ +post_type; + $post_type_object = get_post_type_object( $post_type ); +} + +/** + * Redirect to previous page. + * + * @param int $post_id Optional. Post ID. + */ +function redirect_post($post_id = '') { + if ( isset($_POST['save']) || isset($_POST['publish']) ) { + $status = get_post_status( $post_id ); + + if ( isset( $_POST['publish'] ) ) { + switch ( $status ) { + case 'pending': + $message = 8; + break; + case 'future': + $message = 9; + break; + default: + $message = 6; + } + } else { + $message = 'draft' == $status ? 10 : 1; + } + + $location = add_query_arg( 'message', $message, get_edit_post_link( $post_id, 'url' ) ); + } elseif ( isset($_POST['addmeta']) && $_POST['addmeta'] ) { + $location = add_query_arg( 'message', 2, wp_get_referer() ); + $location = explode('#', $location); + $location = $location[0] . '#postcustom'; + } elseif ( isset($_POST['deletemeta']) && $_POST['deletemeta'] ) { + $location = add_query_arg( 'message', 3, wp_get_referer() ); + $location = explode('#', $location); + $location = $location[0] . '#postcustom'; + } else { + $location = add_query_arg( 'message', 4, get_edit_post_link( $post_id, 'url' ) ); + } + + /** + * Filter the post redirect destination URL. + * + * @since 2.9.0 + * + * @param string $location The destination URL. + * @param int $post_id The post ID. + */ + wp_redirect( apply_filters( 'redirect_post_location', $location, $post_id ) ); + exit; +} + +if ( isset( $_POST['deletepost'] ) ) + $action = 'delete'; +elseif ( isset($_POST['wp-preview']) && 'dopreview' == $_POST['wp-preview'] ) + $action = 'preview'; + +$sendback = wp_get_referer(); +if ( ! $sendback || + strpos( $sendback, 'post.php' ) !== false || + strpos( $sendback, 'post-new.php' ) !== false ) { + if ( 'attachment' == $post_type ) { + $sendback = admin_url( 'upload.php' ); + } else { + $sendback = admin_url( 'edit.php' ); + $sendback .= ( ! empty( $post_type ) ) ? '?post_type=' . $post_type : ''; + } +} else { + $sendback = remove_query_arg( array('trashed', 'untrashed', 'deleted', 'ids'), $sendback ); +} + +switch($action) { +case 'post-quickdraft-save': + // Check nonce and capabilities + $nonce = $_REQUEST['_wpnonce']; + $error_msg = false; + + // For output of the quickdraft dashboard widget + require_once ABSPATH . 'wp-admin/includes/dashboard.php'; + + if ( ! wp_verify_nonce( $nonce, 'add-post' ) ) + $error_msg = __( 'Unable to submit this form, please refresh and try again.' ); + + if ( ! current_user_can( 'edit_posts' ) ) + $error_msg = __( 'Oops, you don’t have access to add new drafts.' ); + + if ( $error_msg ) + return wp_dashboard_quick_press( $error_msg ); + + $post = get_post( $_REQUEST['post_ID'] ); + check_admin_referer( 'add-' . $post->post_type ); + + $_POST['comment_status'] = get_option( 'default_comment_status' ); + $_POST['ping_status'] = get_option( 'default_ping_status' ); + + edit_post(); + wp_dashboard_quick_press(); + exit; + break; + +case 'postajaxpost': +case 'post': + check_admin_referer( 'add-' . $post_type ); + $post_id = 'postajaxpost' == $action ? edit_post() : write_post(); + redirect_post( $post_id ); + exit(); + break; + +case 'edit': + $editing = true; + + if ( empty( $post_id ) ) { + wp_redirect( admin_url('post.php') ); + exit(); + } + + if ( ! $post ) + wp_die( __( 'You attempted to edit an item that doesn’t exist. Perhaps it was deleted?' ) ); + + if ( ! $post_type_object ) + wp_die( __( 'Unknown post type.' ) ); + + if ( ! current_user_can( 'edit_post', $post_id ) ) + wp_die( __( 'You are not allowed to edit this item.' ) ); + + if ( 'trash' == $post->post_status ) + wp_die( __( 'You can’t edit this item because it is in the Trash. Please restore it and try again.' ) ); + + if ( ! empty( $_GET['get-post-lock'] ) ) { + wp_set_post_lock( $post_id ); + wp_redirect( get_edit_post_link( $post_id, 'url' ) ); + exit(); + } + + $post_type = $post->post_type; + if ( 'post' == $post_type ) { + $parent_file = "edit.php"; + $submenu_file = "edit.php"; + $post_new_file = "post-new.php"; + } elseif ( 'attachment' == $post_type ) { + $parent_file = 'upload.php'; + $submenu_file = 'upload.php'; + $post_new_file = 'media-new.php'; + } else { + if ( isset( $post_type_object ) && $post_type_object->show_in_menu && $post_type_object->show_in_menu !== true ) + $parent_file = $post_type_object->show_in_menu; + else + $parent_file = "edit.php?post_type=$post_type"; + $submenu_file = "edit.php?post_type=$post_type"; + $post_new_file = "post-new.php?post_type=$post_type"; + } + + if ( ! wp_check_post_lock( $post->ID ) ) { + $active_post_lock = wp_set_post_lock( $post->ID ); + + if ( 'attachment' !== $post_type ) + wp_enqueue_script('autosave'); + } + + if ( is_multisite() ) { + add_action( 'admin_footer', '_admin_notice_post_locked' ); + } else { + $check_users = get_users( array( 'fields' => 'ID', 'number' => 2 ) ); + + if ( count( $check_users ) > 1 ) + add_action( 'admin_footer', '_admin_notice_post_locked' ); + + unset( $check_users ); + } + + $title = $post_type_object->labels->edit_item; + $post = get_post($post_id, OBJECT, 'edit'); + + if ( post_type_supports($post_type, 'comments') ) { + wp_enqueue_script('admin-comments'); + enqueue_comment_hotkeys_js(); + } + + include( ABSPATH . 'wp-admin/edit-form-advanced.php' ); + + break; + +case 'editattachment': + check_admin_referer('update-post_' . $post_id); + + // Don't let these be changed + unset($_POST['guid']); + $_POST['post_type'] = 'attachment'; + + // Update the thumbnail filename + $newmeta = wp_get_attachment_metadata( $post_id, true ); + $newmeta['thumb'] = $_POST['thumb']; + + wp_update_attachment_metadata( $post_id, $newmeta ); + +case 'editpost': + check_admin_referer('update-post_' . $post_id); + + $post_id = edit_post(); + + // Session cookie flag that the post was saved + if ( isset( $_COOKIE['wp-saving-post-' . $post_id] ) ) + setcookie( 'wp-saving-post-' . $post_id, 'saved' ); + + redirect_post($post_id); // Send user on their way while we keep working + + exit(); + break; + +case 'trash': + check_admin_referer('trash-post_' . $post_id); + + if ( ! $post ) + wp_die( __( 'The item you are trying to move to the Trash no longer exists.' ) ); + + if ( ! $post_type_object ) + wp_die( __( 'Unknown post type.' ) ); + + if ( ! current_user_can( 'delete_post', $post_id ) ) + wp_die( __( 'You are not allowed to move this item to the Trash.' ) ); + + if ( $user_id = wp_check_post_lock( $post_id ) ) { + $user = get_userdata( $user_id ); + wp_die( sprintf( __( 'You cannot move this item to the Trash. %s is currently editing.' ), $user->display_name ) ); + } + + if ( ! wp_trash_post( $post_id ) ) + wp_die( __( 'Error in moving to Trash.' ) ); + + wp_redirect( add_query_arg( array('trashed' => 1, 'ids' => $post_id), $sendback ) ); + exit(); + break; + +case 'untrash': + check_admin_referer('untrash-post_' . $post_id); + + if ( ! $post ) + wp_die( __( 'The item you are trying to restore from the Trash no longer exists.' ) ); + + if ( ! $post_type_object ) + wp_die( __( 'Unknown post type.' ) ); + + if ( ! current_user_can( 'delete_post', $post_id ) ) + wp_die( __( 'You are not allowed to move this item out of the Trash.' ) ); + + if ( ! wp_untrash_post( $post_id ) ) + wp_die( __( 'Error in restoring from Trash.' ) ); + + wp_redirect( add_query_arg('untrashed', 1, $sendback) ); + exit(); + break; + +case 'delete': + check_admin_referer('delete-post_' . $post_id); + + if ( ! $post ) + wp_die( __( 'This item has already been deleted.' ) ); + + if ( ! $post_type_object ) + wp_die( __( 'Unknown post type.' ) ); + + if ( ! current_user_can( 'delete_post', $post_id ) ) + wp_die( __( 'You are not allowed to delete this item.' ) ); + + $force = ! EMPTY_TRASH_DAYS; + if ( $post->post_type == 'attachment' ) { + $force = ( $force || ! MEDIA_TRASH ); + if ( ! wp_delete_attachment( $post_id, $force ) ) + wp_die( __( 'Error in deleting.' ) ); + } else { + if ( ! wp_delete_post( $post_id, $force ) ) + wp_die( __( 'Error in deleting.' ) ); + } + + wp_redirect( add_query_arg('deleted', 1, $sendback) ); + exit(); + break; + +case 'preview': + check_admin_referer( 'update-post_' . $post_id ); + + $url = post_preview(); + + wp_redirect($url); + exit(); + break; + +default: + wp_redirect( admin_url('edit.php') ); + exit(); + break; +} // end switch +include( ABSPATH . 'wp-admin/admin-footer.php' ); diff --git a/wp-admin/press-this.php b/wp-admin/press-this.php new file mode 100644 index 0000000..1becc48 --- /dev/null +++ b/wp-admin/press-this.php @@ -0,0 +1,680 @@ +cap->create_posts ) ) + wp_die( __( 'Cheatin’ uh?' ) ); + +/** + * Press It form handler. + * + * @since 2.6.0 + * + * @return int Post ID + */ +function press_it() { + + $post = get_default_post_to_edit(); + $post = get_object_vars($post); + $post_ID = $post['ID'] = (int) $_POST['post_id']; + + if ( !current_user_can('edit_post', $post_ID) ) + wp_die(__('You are not allowed to edit this post.')); + + $post['post_category'] = isset($_POST['post_category']) ? $_POST['post_category'] : ''; + $post['tax_input'] = isset($_POST['tax_input']) ? $_POST['tax_input'] : ''; + $post['post_title'] = isset($_POST['title']) ? $_POST['title'] : ''; + $content = isset($_POST['content']) ? $_POST['content'] : ''; + + $upload = false; + if ( !empty($_POST['photo_src']) && current_user_can('upload_files') ) { + foreach( (array) $_POST['photo_src'] as $key => $image) { + // see if files exist in content - we don't want to upload non-used selected files. + if ( strpos($_POST['content'], htmlspecialchars($image)) !== false ) { + $desc = isset($_POST['photo_description'][$key]) ? $_POST['photo_description'][$key] : ''; + $upload = media_sideload_image($image, $post_ID, $desc); + + // Replace the POSTED content with correct uploaded ones. Regex contains fix for Magic Quotes + if ( !is_wp_error($upload) ) + $content = preg_replace('/]*)src=\\\?(\"|\')'.preg_quote(htmlspecialchars($image), '/').'\\\?(\2)([^>\/]*)\/*>/is', $upload, $content); + } + } + } + // set the post_content and status + $post['post_content'] = $content; + if ( isset( $_POST['publish'] ) && current_user_can( 'publish_posts' ) ) + $post['post_status'] = 'publish'; + elseif ( isset( $_POST['review'] ) ) + $post['post_status'] = 'pending'; + else + $post['post_status'] = 'draft'; + + // error handling for media_sideload + if ( is_wp_error($upload) ) { + wp_delete_post($post_ID); + wp_die($upload); + } else { + // Post formats + if ( isset( $_POST['post_format'] ) ) { + if ( current_theme_supports( 'post-formats', $_POST['post_format'] ) ) + set_post_format( $post_ID, $_POST['post_format'] ); + elseif ( '0' == $_POST['post_format'] ) + set_post_format( $post_ID, false ); + } + + $post_ID = wp_update_post($post); + } + + return $post_ID; +} + +// For submitted posts. +if ( isset($_REQUEST['action']) && 'post' == $_REQUEST['action'] ) { + check_admin_referer('press-this'); + $posted = $post_ID = press_it(); +} else { + $post = get_default_post_to_edit('post', true); + $post_ID = $post->ID; +} + +// Set Variables +$title = isset( $_GET['t'] ) ? trim( strip_tags( html_entity_decode( wp_unslash( $_GET['t'] ) , ENT_QUOTES) ) ) : ''; + +$selection = ''; +if ( !empty($_GET['s']) ) { + $selection = str_replace(''', "'", wp_unslash($_GET['s'])); + $selection = trim( htmlspecialchars( html_entity_decode($selection, ENT_QUOTES) ) ); +} + +if ( ! empty($selection) ) { + $selection = preg_replace('/(\r?\n|\r)/', '

    ', $selection); + $selection = '

    ' . str_replace('

    ', '', $selection) . '

    '; +} + +$url = isset($_GET['u']) ? esc_url($_GET['u']) : ''; +$image = isset($_GET['i']) ? $_GET['i'] : ''; + +if ( !empty($_REQUEST['ajax']) ) { + switch ($_REQUEST['ajax']) { + case 'video': ?> + +
    +

    +
    + +

    +
    +
    + + +

    +
    +
    + +
    +
    + +

    + + + <?php echo esc_attr(__('Click to insert.')); ?> + +

    + +

    + ]*)src=(\"|\')([^<>\'\"]+)(\2)([^>]*)\/*>/i'; + $content = str_replace(array("\n","\t","\r"), '', $content); + preg_match_all($pattern, $content, $matches); + if ( empty($matches[0]) ) + return ''; + $sources = array(); + foreach ($matches[3] as $src) { + // if no http in url + if (strpos($src, 'http') === false) + // if it doesn't have a relative uri + if ( strpos($src, '../') === false && strpos($src, './') === false && strpos($src, '/') === 0) + $src = 'http://'.str_replace('//','/', $host['host'].'/'.$src); + else + $src = 'http://'.str_replace('//','/', $host['host'].'/'.dirname($host['path']).'/'.$src); + $sources[] = esc_url($src); + } + return "'" . implode("','", $sources) . "'"; + } + $url = wp_kses(urldecode($url), null); + echo 'new Array('.get_images_from_uri($url).')'; + break; + + case 'photo_js': ?> + // gather images and load some default JS + var last = null + var img, img_tag, aspect, w, h, skip, i, strtoappend = ""; + if(photostorage == false) { + var my_src = eval( + jQuery.ajax({ + type: "GET", + url: "", + cache : false, + async : false, + data: "ajax=photo_images&u=", + dataType : "script" + }).responseText + ); + if(my_src.length == 0) { + var my_src = eval( + jQuery.ajax({ + type: "GET", + url: "", + cache : false, + async : false, + data: "ajax=photo_images&u=", + dataType : "script" + }).responseText + ); + if(my_src.length == 0) { + strtoappend = ''; + } + } + } + for (i = 0; i < my_src.length; i++) { + img = new Image(); + img.src = my_src[i]; + img_attr = 'id="img' + i + '"'; + skip = false; + + maybeappend = ''; + + if (img.width && img.height) { + if (img.width >= 30 && img.height >= 30) { + aspect = img.width / img.height; + scale = (aspect > 1) ? (71 / img.width) : (71 / img.height); + + w = img.width; + h = img.height; + + if (scale < 1) { + w = parseInt(img.width * scale); + h = parseInt(img.height * scale); + } + img_attr += ' style="width: ' + w + 'px; height: ' + h + 'px;"'; + strtoappend += maybeappend; + } + } else { + strtoappend += maybeappend; + } + } + + function pick(img, desc) { + if (img) { + if('object' == typeof jQuery('.photolist input') && jQuery('.photolist input').length != 0) length = jQuery('.photolist input').length; + if(length == 0) length = 1; + jQuery('.photolist').append(''); + jQuery('.photolist').append(''); + insert_editor( "\n\n" + encodeURI('

    ' + desc + '

    ')); + } + return false; + } + + function image_selector(el) { + var desc, src, parent = jQuery(el).closest('#photo-add-url-div'); + + if ( parent.length ) { + desc = parent.find('input.tb_this_photo_description').val() || ''; + src = parent.find('input.tb_this_photo').val() || '' + } else { + desc = jQuery('#tb_this_photo_description').val() || ''; + src = jQuery('#tb_this_photo').val() || '' + } + + tb_remove(); + pick(src, desc); + jQuery('#extra-fields').hide(); + jQuery('#extra-fields').html(''); + return false; + } + + jQuery('#extra-fields').html('

    ()

    '); + jQuery('#img_container').html(strtoappend); + +<?php _e('Press This') ?> + + + + + + + +
    +
    +
    +
    + + + + + + + + +
    + +
    +

    +

    +
    +

    + 'save' ) ); + if ( current_user_can('publish_posts') ) { + submit_button( __( 'Publish' ), 'primary', 'publish', false ); + } else { + echo '

    '; + submit_button( __( 'Submit for Review' ), 'primary', 'review', false ); + } ?> + +

    + +

    + +

    + +
    +
    + + +
    +

    +

    +
    +
    + + + + + +
    +
      + 'category', 'popular_cats' => $popular_ids ) ) ?> +
    +
    + + cap->assign_terms) ) : ?> +

    + + cap->edit_terms) ) : ?> +
    +

    + + labels->add_new_item ); ?> + +

    +

    + + + + 'category', 'hide_empty' => 0, 'name' => 'newcategory_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => '— ' . $tax->labels->parent_item . ' —' ) ); ?> + + + +

    +
    + +
    +
    +
    + +
    +

    +

    +
    +
    +
    + + +
    + + +
    +
    +
    +
    + +
    +
    +
    +
    +
    + + + + +
    +

    + + | + |

    +
    + + +
    +
    + +
    +
    + + + + + +
    + true, + 'textarea_rows' => '15' + ); + + $content = ''; + if ( $selection ) + $content .= $selection; + + if ( $url ) { + $content .= '

    '; + + if ( $selection ) + $content .= __('via '); + + $content .= sprintf( "%s.

    ", esc_url( $url ), esc_html( $title ) ); + } + + remove_action( 'media_buttons', 'media_buttons' ); + add_action( 'media_buttons', 'press_this_media_buttons' ); + function press_this_media_buttons() { + _e( 'Add:' ); + + if ( current_user_can('upload_files') ) { + ?> + + <?php esc_attr_e('Insert an Image'); ?> + + <?php esc_attr_e('Embed a Video'); ?> + +
    +
    +
    +
    + + + + + diff --git a/wp-admin/profile.php b/wp-admin/profile.php new file mode 100644 index 0000000..0f33eb2 --- /dev/null +++ b/wp-admin/profile.php @@ -0,0 +1,18 @@ +post_parent ) ) + break; + + if ( ! $post = get_post( $revision->post_parent ) ) + break; + + // Revisions disabled (previously checked autosaves && ! wp_is_post_autosave( $revision )) + if ( ! wp_revisions_enabled( $post ) ) { + $redirect = 'edit.php?post_type=' . $post->post_type; + break; + } + + // Don't allow revision restore when post is locked + if ( wp_check_post_lock( $post->ID ) ) + break; + + check_admin_referer( "restore-post_{$revision->ID}" ); + + wp_restore_post_revision( $revision->ID ); + $redirect = add_query_arg( array( 'message' => 5, 'revision' => $revision->ID ), get_edit_post_link( $post->ID, 'url' ) ); + break; +case 'view' : +case 'edit' : +default : + if ( ! $revision = wp_get_post_revision( $revision_id ) ) + break; + if ( ! $post = get_post( $revision->post_parent ) ) + break; + + if ( ! current_user_can( 'read_post', $revision->ID ) || ! current_user_can( 'read_post', $post->ID ) ) + break; + + // Revisions disabled and we're not looking at an autosave + if ( ! wp_revisions_enabled( $post ) && ! wp_is_post_autosave( $revision ) ) { + $redirect = 'edit.php?post_type=' . $post->post_type; + break; + } + + $post_edit_link = get_edit_post_link(); + $post_title = '' . _draft_or_post_title() . ''; + $h2 = sprintf( __( 'Compare Revisions of “%1$s”' ), $post_title ); + $return_to_post = '' . __( '← Return to post editor' ) . ''; + $title = __( 'Revisions' ); + + $redirect = false; + break; +endswitch; + +// Empty post_type means either malformed object found, or no valid parent was found. +if ( ! $redirect && empty( $post->post_type ) ) + $redirect = 'edit.php'; + +if ( ! empty( $redirect ) ) { + wp_redirect( $redirect ); + exit; +} + +// This is so that the correct "Edit" menu item is selected. +if ( ! empty( $post->post_type ) && 'post' != $post->post_type ) + $parent_file = $submenu_file = 'edit.php?post_type=' . $post->post_type; +else + $parent_file = $submenu_file = 'edit.php'; + +wp_enqueue_script( 'revisions' ); +wp_localize_script( 'revisions', '_wpRevisionsSettings', wp_prepare_revisions_for_js( $post, $revision_id, $from ) ); + +/* Revisions Help Tab */ + +$revisions_overview = '

    ' . __( 'This screen is used for managing your content revisions.' ) . '

    '; +$revisions_overview .= '

    ' . __( 'Revisions are saved copies of your post or page, which are periodically created as you update your content. The red text on the left shows the content that was removed. The green text on the right shows the content that was added.' ) . '

    '; +$revisions_overview .= '

    ' . __( 'From this screen you can review, compare, and restore revisions:' ) . '

    '; +$revisions_overview .= '
    • ' . __( 'To navigate between revisions, drag the slider handle left or right or use the Previous or Next buttons.' ) . '
    • '; +$revisions_overview .= '
    • ' . __( 'Compare two different revisions by selecting the “Compare any two revisions” box to the side.' ) . '
    • '; +$revisions_overview .= '
    • ' . __( 'To restore a revision, click Restore This Revision.' ) . '
    '; + +get_current_screen()->add_help_tab( array( + 'id' => 'revisions-overview', + 'title' => __( 'Overview' ), + 'content' => $revisions_overview +) ); + +$revisions_sidebar = '

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

    '; +$revisions_sidebar .= '

    ' . __( 'Revisions Management' ) . '

    '; +$revisions_sidebar .= '

    ' . __( 'Support Forums' ) . '

    '; + +get_current_screen()->set_help_sidebar( $revisions_sidebar ); + +require_once( ABSPATH . 'wp-admin/admin-header.php' ); + +?> + +
    +

    + +
    + + + + + + + + + + + + +' . sprintf( __( "The file 'wp-config.php' already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try installing now." ), 'install.php' ) . '

    ' ); + +// Check if wp-config.php exists above the root directory but is not part of another install +if ( file_exists(ABSPATH . '../wp-config.php' ) && ! file_exists( ABSPATH . '../wp-settings.php' ) ) + wp_die( '

    ' . sprintf( __( "The file 'wp-config.php' already exists one level above your WordPress installation. If you need to reset any of the configuration items in this file, please delete it first. You may try installing now."), 'install.php' ) . '

    ' ); + +$step = isset( $_GET['step'] ) ? (int) $_GET['step'] : 0; + +/** + * Display setup wp-config.php file header. + * + * @ignore + * @since 2.3.0 + */ +function setup_config_display_header() { + global $wp_version; + + header( 'Content-Type: text/html; charset=utf-8' ); +?> + +> + + + +<?php _e( 'WordPress › Setup Configuration File' ); ?> + + + + + +

    + + +

    +
      +
    1. +
    2. +
    3. +
    4. +
    5. +
    +

    wp-config-sample.php in a text editor, fill in your information, and save it as wp-config.php." ); ?>

    +

    + +

    + +
    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    localhost does not work.' ); ?>
    + +

    +
    +

    ' . __( 'Try again' ) . ''; + + if ( empty( $prefix ) ) + wp_die( __( 'ERROR: "Table Prefix" must not be empty.' . $tryagain_link ) ); + + // Validate $prefix: it can only contain letters, numbers and underscores. + if ( preg_match( '|[^a-z0-9_]|i', $prefix ) ) + wp_die( __( 'ERROR: "Table Prefix" can only contain numbers, letters, and underscores.' . $tryagain_link ) ); + + // Test the db connection. + /**#@+ + * @ignore + */ + define('DB_NAME', $dbname); + define('DB_USER', $uname); + define('DB_PASSWORD', $pwd); + define('DB_HOST', $dbhost); + /**#@-*/ + + // We'll fail here if the values are no good. + require_wp_db(); + if ( ! empty( $wpdb->error ) ) + wp_die( $wpdb->error->get_error_message() . $tryagain_link ); + + // Fetch or generate keys and salts. + $no_api = isset( $_POST['noapi'] ); + if ( ! $no_api ) { + require_once( ABSPATH . WPINC . '/class-http.php' ); + require_once( ABSPATH . WPINC . '/http.php' ); + /**#@+ + * @ignore + */ + function get_bloginfo() { + return wp_guess_url(); + } + /**#@-*/ + $secret_keys = wp_remote_get( 'https://api.wordpress.org/secret-key/1.1/salt/' ); + } + + if ( $no_api || is_wp_error( $secret_keys ) ) { + $secret_keys = array(); + require_once( ABSPATH . WPINC . '/pluggable.php' ); + for ( $i = 0; $i < 8; $i++ ) { + $secret_keys[] = wp_generate_password( 64, true, true ); + } + } else { + $secret_keys = explode( "\n", wp_remote_retrieve_body( $secret_keys ) ); + foreach ( $secret_keys as $k => $v ) { + $secret_keys[$k] = substr( $v, 28, 64 ); + } + } + + $key = 0; + // Not a PHP5-style by-reference foreach, as this file must be parseable by PHP4. + foreach ( $config_file as $line_num => $line ) { + if ( '$table_prefix =' == substr( $line, 0, 16 ) ) { + $config_file[ $line_num ] = '$table_prefix = \'' . addcslashes( $prefix, "\\'" ) . "';\r\n"; + continue; + } + + if ( ! preg_match( '/^define\(\'([A-Z_]+)\',([ ]+)/', $line, $match ) ) + continue; + + $constant = $match[1]; + $padding = $match[2]; + + switch ( $constant ) { + case 'DB_NAME' : + case 'DB_USER' : + case 'DB_PASSWORD' : + case 'DB_HOST' : + $config_file[ $line_num ] = "define('" . $constant . "'," . $padding . "'" . addcslashes( constant( $constant ), "\\'" ) . "');\r\n"; + break; + case 'AUTH_KEY' : + case 'SECURE_AUTH_KEY' : + case 'LOGGED_IN_KEY' : + case 'NONCE_KEY' : + case 'AUTH_SALT' : + case 'SECURE_AUTH_SALT' : + case 'LOGGED_IN_SALT' : + case 'NONCE_SALT' : + $config_file[ $line_num ] = "define('" . $constant . "'," . $padding . "'" . $secret_keys[$key++] . "');\r\n"; + break; + } + } + unset( $line ); + + if ( ! is_writable(ABSPATH) ) : + setup_config_display_header(); +?> +

    wp-config.php file." ); ?>

    +

    wp-config.php manually and paste the following text into it.' ); ?>

    + +

    +

    + + +

    + +

    + + + diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php new file mode 100644 index 0000000..382e594 --- /dev/null +++ b/wp-admin/theme-editor.php @@ -0,0 +1,245 @@ +'.__('You do not have sufficient permissions to edit templates for this site.').'

    '); + +$title = __("Edit Themes"); +$parent_file = 'themes.php'; + +get_current_screen()->add_help_tab( array( +'id' => 'overview', +'title' => __('Overview'), +'content' => + '

    ' . __('You can use the Theme Editor to edit the individual CSS and PHP files which make up your theme.') . '

    +

    ' . __('Begin by choosing a theme to edit from the dropdown menu and clicking Select. A list then appears of all the template files. Clicking once on any file name causes the file to appear in the large Editor box.') . '

    +

    ' . __('For PHP files, you can use the Documentation dropdown to select from functions recognized in that file. Look Up takes you to a web page with reference material about that particular function.') . '

    +

    ' . __('In the editing area the Tab key enters a tab character. To move below this area by pressing Tab, press the Esc key followed by the Tab key.') . '

    +

    ' . __('After typing in your edits, click Update File.') . '

    +

    ' . __('Advice: think very carefully about your site crashing if you are live-editing the theme currently in use.') . '

    +

    ' . sprintf( __('Upgrading to a newer version of the same theme will override changes made here. To avoid this, consider creating a child theme instead.'), __('http://codex.wordpress.org/Child_Themes') ) . '

    ' . + ( is_network_admin() ? '

    ' . __('Any edits to files from this screen will be reflected on all sites in the network.') . '

    ' : '' ) +) ); + +get_current_screen()->set_help_sidebar( + '

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

    ' . + '

    ' . __('Documentation on Theme Development') . '

    ' . + '

    ' . __('Documentation on Using Themes') . '

    ' . + '

    ' . __('Documentation on Editing Files') . '

    ' . + '

    ' . __('Documentation on Template Tags') . '

    ' . + '

    ' . __('Support Forums') . '

    ' +); + +wp_reset_vars( array( 'action', 'error', 'file', 'theme' ) ); + +if ( $theme ) + $stylesheet = $theme; +else + $stylesheet = get_stylesheet(); + +$theme = wp_get_theme( $stylesheet ); + +if ( ! $theme->exists() ) + wp_die( __( 'The requested theme does not exist.' ) ); + +if ( $theme->errors() && 'theme_no_stylesheet' == $theme->errors()->get_error_code() ) + wp_die( __( 'The requested theme does not exist.' ) . ' ' . $theme->errors()->get_error_message() ); + +$allowed_files = $theme->get_files( 'php', 1 ); +$has_templates = ! empty( $allowed_files ); +$style_files = $theme->get_files( 'css' ); +$allowed_files['style.css'] = $style_files['style.css']; +$allowed_files += $style_files; + +if ( empty( $file ) ) { + $relative_file = 'style.css'; + $file = $allowed_files['style.css']; +} else { + $relative_file = $file; + $file = $theme->get_stylesheet_directory() . '/' . $relative_file; +} + +validate_file_to_edit( $file, $allowed_files ); +$scrollto = isset( $_REQUEST['scrollto'] ) ? (int) $_REQUEST['scrollto'] : 0; + +switch( $action ) { +case 'update': + check_admin_referer( 'edit-theme_' . $file . $stylesheet ); + $newcontent = wp_unslash( $_POST['newcontent'] ); + $location = 'theme-editor.php?file=' . urlencode( $relative_file ) . '&theme=' . urlencode( $stylesheet ) . '&scrollto=' . $scrollto; + if ( is_writeable( $file ) ) { + //is_writable() not always reliable, check return value. see comments @ http://uk.php.net/is_writable + $f = fopen( $file, 'w+' ); + if ( $f !== false ) { + fwrite( $f, $newcontent ); + fclose( $f ); + $location .= '&updated=true'; + $theme->cache_delete(); + } + } + wp_redirect( $location ); + exit; +break; + +default: + + require_once( ABSPATH . 'wp-admin/admin-header.php' ); + + update_recently_edited( $file ); + + if ( ! is_file( $file ) ) + $error = true; + + $content = ''; + if ( ! $error && filesize( $file ) > 0 ) { + $f = fopen($file, 'r'); + $content = fread($f, filesize($file)); + + if ( '.php' == substr( $file, strrpos( $file, '.' ) ) ) { + $functions = wp_doc_link_parse( $content ); + + $docs_select = ''; + } + + $content = esc_textarea( $content ); + } + + ?> + +

    +(' . $file_show . ')'; +?> +
    +

    + +
    +
    +

    display('Name'); if ( $description ) echo ': ' . $description; ?>

    +
    +
    +
    + + + +
    +
    +
    +
    +errors() ) + echo '

    ' . __( 'This theme is broken.' ) . ' ' . $theme->errors()->get_error_message() . '

    '; +?> +
    +parent() ) : +?> +

    + parent() ) : ?> +

    get_template() ) ) . '">' . $theme->parent()->display('Name') . '' ); ?>

    + +
      + $absolute_filename ) : + if ( 'style.css' == $filename ) + echo "\t
    \n\t

    " . _x( 'Styles', 'Theme stylesheets in theme editor' ) . "

    \n\t
      \n"; + + $file_description = get_file_description( $absolute_filename ); + if ( $file_description != basename( $filename ) ) + $file_description .= '
      (' . $filename . ')'; + + if ( $absolute_filename == $file ) + $file_description = '' . $file_description . ''; +?> +
    • + +
    + +
    +

    ' . __('Oops, no such file exists! Double check the name and try again, merci.') . '

    '; +else : ?> +
    + +
    + + + + +
    + +
    + + + +
    + + +
    + get_stylesheet() == get_template() ) : ?> +

    +

    + + +

    the Codex for more information.'); ?>

    + +
    +
    + +
    +
    + + __( 'Featured Themes' ), + 'popular' => __( 'Popular Themes' ), + 'new' => __( 'Newest Themes' ), +); + +$installed_themes = search_theme_directories(); +foreach ( $installed_themes as $k => $v ) { + if ( false !== strpos( $k, '/' ) ) { + unset( $installed_themes[ $k ] ); + } +} + +wp_localize_script( 'theme', '_wpThemeSettings', array( + 'themes' => false, + 'settings' => array( + 'isInstall' => true, + 'canInstall' => current_user_can( 'install_themes' ), + 'installURI' => current_user_can( 'install_themes' ) ? self_admin_url( 'theme-install.php' ) : null, + 'adminUrl' => parse_url( self_admin_url(), PHP_URL_PATH ) + ), + 'l10n' => array( + 'addNew' => __( 'Add New Theme' ), + 'search' => __( 'Search Themes' ), + 'searchPlaceholder' => __( 'Search themes...' ), // placeholder (no ellipsis) + 'upload' => __( 'Upload Theme' ), + 'back' => __( 'Back' ), + 'error' => __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ) + ), + 'installedThemes' => array_keys( $installed_themes ), + 'browse' => array( + 'sections' => $sections, + ), +) ); + +wp_enqueue_script( 'theme' ); + +/** + * Fires before each of the tabs are rendered on the Install Themes page. + * + * The dynamic portion of the hook name, $tab, refers to the current + * theme install tab. Possible values are 'dashboard', 'search', 'upload', + * 'featured', 'new', or 'updated'. + * + * @since 2.8.0 + */ +if ( $tab ) { + do_action( "install_themes_pre_{$tab}" ); +} + +$help_overview = + '

    ' . sprintf(__('You can find additional themes for your site by using the Theme Browser/Installer on this screen, which will display themes from the WordPress.org Theme Directory. These themes are designed and developed by third parties, are available free of charge, and are compatible with the license WordPress uses.'), 'https://wordpress.org/themes/') . '

    ' . + '

    ' . __('You can Search for themes by keyword, author, or tag, or can get more specific and search by criteria listed in the feature filter. Alternately, you can browse the themes that are Featured, Newest, or Recently Updated. When you find a theme you like, you can preview it or install it.') . '

    ' . + '

    ' . __('You can Upload a theme manually if you have already downloaded its ZIP archive onto your computer (make sure it is from a trusted and original source). You can also do it the old-fashioned way and copy a downloaded theme’s folder via FTP into your /wp-content/themes directory.') . '

    '; + +get_current_screen()->add_help_tab( array( + 'id' => 'overview', + 'title' => __('Overview'), + 'content' => $help_overview +) ); + +$help_installing = + '

    ' . __('Once you have generated a list of themes, you can preview and install any of them. Click on the thumbnail of the theme you’re interested in previewing. It will open up in a full-screen Preview page to give you a better idea of how that theme will look.') . '

    ' . + '

    ' . __('To install the theme so you can preview it with your site’s content and customize its theme options, click the "Install" button at the top of the left-hand pane. The theme files will be downloaded to your website automatically. When this is complete, the theme is now available for activation, which you can do by clicking the "Activate" link, or by navigating to your Manage Themes screen and clicking the "Live Preview" link under any installed theme’s thumbnail image.') . '

    '; + +get_current_screen()->add_help_tab( array( + 'id' => 'installing', + 'title' => __('Previewing and Installing'), + 'content' => $help_installing +) ); + +get_current_screen()->set_help_sidebar( + '

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

    ' . + '

    ' . __('Documentation on Adding New Themes') . '

    ' . + '

    ' . __('Support Forums') . '

    ' +); + +include(ABSPATH . 'wp-admin/admin-header.php'); + +?> +
    +

    + + + +

    + +
    + +
    + +
    + + + + +
    + + +
    +
    + + +
    + $features ) { + if ( $feature_name === 'Features' || $feature_name === __( 'Features' ) ) { // hack hack hack + echo '
    '; + } else { + echo '
    '; + } + $feature_name = esc_html( $feature_name ); + echo '

    ' . $feature_name . '

    '; + echo '
      '; + foreach ( $features as $feature => $feature_name ) { + $feature = esc_attr( $feature ); + echo '
    1. '; + echo '
    2. '; + } + echo '
    '; + echo '
    '; + } + ?> +
    + +
    + +
    +
    +
    +
    +
    + +

    + + +
    + +
    + + + + + +exists() || ! $theme->is_allowed() ) + wp_die( __( 'Cheatin’ uh?' ) ); + switch_theme( $theme->get_stylesheet() ); + wp_redirect( admin_url('themes.php?activated=true') ); + exit; + } elseif ( 'delete' == $_GET['action'] ) { + check_admin_referer('delete-theme_' . $_GET['stylesheet']); + $theme = wp_get_theme( $_GET['stylesheet'] ); + if ( !current_user_can('delete_themes') || ! $theme->exists() ) + wp_die( __( 'Cheatin’ uh?' ) ); + delete_theme($_GET['stylesheet']); + wp_redirect( admin_url('themes.php?deleted=true') ); + exit; + } +} + +$title = __('Manage Themes'); +$parent_file = 'themes.php'; + +// Help tab: Overview +if ( current_user_can( 'switch_themes' ) ) { + $help_overview = '

    ' . __( 'This screen is used for managing your installed themes. Aside from the default theme(s) included with your WordPress installation, themes are designed and developed by third parties.' ) . '

    ' . + '

    ' . __( 'From this screen you can:' ) . '

    ' . + '
    • ' . __( 'Hover or tap to see Activate and Live Preview buttons' ) . '
    • ' . + '
    • ' . __( 'Click on the theme to see the theme name, version, author, description, tags, and the Delete link' ) . '
    • ' . + '
    • ' . __( 'Click Customize for the current theme or Live Preview for any other theme to see a live preview' ) . '
    ' . + '

    ' . __( 'The current theme is displayed highlighted as the first theme.' ) . '

    '; + + get_current_screen()->add_help_tab( array( + 'id' => 'overview', + 'title' => __( 'Overview' ), + 'content' => $help_overview + ) ); +} // switch_themes + +// Help tab: Adding Themes +if ( current_user_can( 'install_themes' ) ) { + if ( is_multisite() ) { + $help_install = '

    ' . __('Installing themes on Multisite can only be done from the Network Admin section.') . '

    '; + } else { + $help_install = '

    ' . sprintf( __('If you would like to see more themes to choose from, click on the “Add New” button and you will be able to browse or search for additional themes from the WordPress.org Theme Directory. Themes in the WordPress.org Theme Directory are designed and developed by third parties, and are compatible with the license WordPress uses. Oh, and they’re free!'), 'https://wordpress.org/themes/' ) . '

    '; + } + + get_current_screen()->add_help_tab( array( + 'id' => 'adding-themes', + 'title' => __('Adding Themes'), + 'content' => $help_install + ) ); +} // install_themes + +// Help tab: Previewing and Customizing +if ( current_user_can( 'edit_theme_options' ) ) { + $help_customize = + '

    ' . __( 'Tap or hover on any theme then click the Live Preview button to see a live preview of that theme and change theme options in a separate, full-screen view. You can also find a Live Preview button at the bottom of the theme details screen. Any installed theme can be previewed and customized in this way.' ) . '

    '. + '

    ' . __( 'The theme being previewed is fully interactive — navigate to different pages to see how the theme handles posts, archives, and other page templates. The settings may differ depending on what theme features the theme being previewed supports. To accept the new settings and activate the theme all in one step, click the Save & Activate button above the menu.' ) . '

    ' . + '

    ' . __( 'When previewing on smaller monitors, you can use the collapse icon at the bottom of the left-hand pane. This will hide the pane, giving you more room to preview your site in the new theme. To bring the pane back, click on the collapse icon again.' ) . '

    '; + + get_current_screen()->add_help_tab( array( + 'id' => 'customize-preview-themes', + 'title' => __( 'Previewing and Customizing' ), + 'content' => $help_customize + ) ); +} // edit_theme_options + +get_current_screen()->set_help_sidebar( + '

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

    ' . + '

    ' . __( 'Documentation on Using Themes' ) . '

    ' . + '

    ' . __( 'Support Forums' ) . '

    ' +); + +if ( current_user_can( 'switch_themes' ) ) { + $themes = wp_prepare_themes_for_js(); +} else { + $themes = wp_prepare_themes_for_js( array( wp_get_theme() ) ); +} +wp_reset_vars( array( 'theme', 'search' ) ); + +wp_localize_script( 'theme', '_wpThemeSettings', array( + 'themes' => $themes, + 'settings' => array( + 'canInstall' => ( ! is_multisite() && current_user_can( 'install_themes' ) ), + 'installURI' => ( ! is_multisite() && current_user_can( 'install_themes' ) ) ? admin_url( 'theme-install.php' ) : null, + 'confirmDelete' => __( "Are you sure you want to delete this theme?\n\nClick 'Cancel' to go back, 'OK' to confirm the delete." ), + 'adminUrl' => parse_url( admin_url(), PHP_URL_PATH ), + ), + 'l10n' => array( + 'addNew' => __( 'Add New Theme' ), + 'search' => __( 'Search Installed Themes' ), + 'searchPlaceholder' => __( 'Search installed themes...' ), // placeholder (no ellipsis) + ), +) ); + +add_thickbox(); +wp_enqueue_script( 'theme' ); +wp_enqueue_script( 'customize-loader' ); + +require_once( ABSPATH . 'wp-admin/admin-header.php' ); +?> + +
    +

    + + + + +

    + +

    + +

    Visit site' ), home_url( '/' ) ); ?>

    + +

    Visit site' ), home_url( '/' ) ); ?>

    +

    +errors() && ( ! is_multisite() || current_user_can( 'manage_network_themes' ) ) ) { + echo '

    ' . sprintf( __( 'ERROR: %s' ), $ct->errors()->get_error_message() ) . '

    '; +} + +/* +// Certain error codes are less fatal than others. We can still display theme information in most cases. +if ( ! $ct->errors() || ( 1 == count( $ct->errors()->get_error_codes() ) + && in_array( $ct->errors()->get_error_code(), array( 'theme_no_parent', 'theme_parent_invalid', 'theme_no_index' ) ) ) ) : ?> +*/ + + // Pretend you didn't see this. + $current_theme_actions = array(); + if ( is_array( $submenu ) && isset( $submenu['themes.php'] ) ) { + foreach ( (array) $submenu['themes.php'] as $item) { + $class = ''; + if ( 'themes.php' == $item[2] || 'theme-editor.php' == $item[2] || 'customize.php' == $item[2] ) + continue; + // 0 = name, 1 = capability, 2 = file + if ( ( strcmp($self, $item[2]) == 0 && empty($parent_file)) || ($parent_file && ($item[2] == $parent_file)) ) + $class = ' class="current"'; + if ( !empty($submenu[$item[2]]) ) { + $submenu[$item[2]] = array_values($submenu[$item[2]]); // Re-index. + $menu_hook = get_plugin_page_hook($submenu[$item[2]][0][2], $item[2]); + if ( file_exists(WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook)) + $current_theme_actions[] = "{$item[0]}"; + else + $current_theme_actions[] = "{$item[0]}"; + } else if ( current_user_can($item[1]) ) { + $menu_file = $item[2]; + if ( false !== ( $pos = strpos( $menu_file, '?' ) ) ) + $menu_file = substr( $menu_file, 0, $pos ); + if ( file_exists( ABSPATH . "wp-admin/$menu_file" ) ) { + $current_theme_actions[] = "{$item[0]}"; + } else { + $current_theme_actions[] = "{$item[0]}"; + } + } + } + } + +?> + +
    +
    + + +
    + +
    + +
    + +
    + + +
    + + +

    + +

    + + +
    + + + + + + + + + + + +
    + + +
    + +
    + +
    +
    +
    +
    + + true ) ) ) { +?> + +
    +

    +

    + + + + + + + + + + "; + } +?> +
    " . ( $broken_theme->get( 'Name' ) ? $broken_theme->get( 'Name' ) : $broken_theme->get_stylesheet() ) . "" . $broken_theme->errors()->get_error_message() . "
    +
    + + +
    + + + + + + + diff --git a/wp-admin/tools.php b/wp-admin/tools.php new file mode 100644 index 0000000..afc65d9 --- /dev/null +++ b/wp-admin/tools.php @@ -0,0 +1,75 @@ +add_help_tab( array( + 'id' => 'press-this', + 'title' => __('Press This'), + 'content' => '

    ' . __('Press This is a bookmarklet that makes it easy to blog about something you come across on the web. You can use it to just grab a link, or to post an excerpt. Press This will even allow you to choose from images included on the page and use them in your post. Just drag the Press This link on this screen to your bookmarks bar in your browser, and you’ll be on your way to easier content creation. Clicking on it while on another website opens a popup window with all these options.') . '

    ', +) ); +get_current_screen()->add_help_tab( array( + 'id' => 'converter', + 'title' => __('Categories and Tags Converter'), + 'content' => '

    ' . __('Categories have hierarchy, meaning that you can nest sub-categories. Tags do not have hierarchy and cannot be nested. Sometimes people start out using one on their posts, then later realize that the other would work better for their content.' ) . '

    ' . + '

    ' . __( 'The Categories and Tags Converter link on this screen will take you to the Import screen, where that Converter is one of the plugins you can install. Once that plugin is installed, the Activate Plugin & Run Importer link will take you to a screen where you can choose to convert tags into categories or vice versa.' ) . '

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

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

    ' . + '

    ' . __('Documentation on Tools') . '

    ' . + '

    ' . __('Support Forums') . '

    ' +); + +require_once( ABSPATH . 'wp-admin/admin-header.php' ); + +?> +
    +

    + + +
    +

    +

    + +

    +

    +

    + +
    +cap->manage_terms) || current_user_can($tags->cap->manage_terms) ) : ?> +
    +

    +

    Categories and Tags Converter available from the Import screen.'), 'import.php' ); ?>

    +
    + +
    +locale && 'en_US' == get_locale() ) + $version_string = $update->current; + // If the only available update is a partial builds, it doesn't need a language-specific version string. + elseif ( 'en_US' == $update->locale && $update->packages->partial && $wp_version == $update->partial_version && ( $updates = get_core_updates() ) && 1 == count( $updates ) ) + $version_string = $update->current; + else + $version_string = sprintf( "%s–%s", $update->current, $update->locale ); + + $current = false; + if ( !isset($update->response) || 'latest' == $update->response ) + $current = true; + $submit = __('Update Now'); + $form_action = 'update-core.php?action=do-core-upgrade'; + $php_version = phpversion(); + $mysql_version = $wpdb->db_version(); + $show_buttons = true; + if ( 'development' == $update->response ) { + $message = __('You are using a development version of WordPress. You can update to the latest nightly build automatically or download the nightly build and install it manually:'); + $download = __('Download nightly build'); + } else { + if ( $current ) { + $message = sprintf( __( 'If you need to re-install version %s, you can do so here or download the package and re-install manually:' ), $version_string ); + $submit = __('Re-install Now'); + $form_action = 'update-core.php?action=do-core-reinstall'; + } else { + $php_compat = version_compare( $php_version, $update->php_version, '>=' ); + if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) ) + $mysql_compat = true; + else + $mysql_compat = version_compare( $mysql_version, $update->mysql_version, '>=' ); + + if ( !$mysql_compat && !$php_compat ) + $message = sprintf( __('You cannot update because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $update->current, $update->php_version, $update->mysql_version, $php_version, $mysql_version ); + elseif ( !$php_compat ) + $message = sprintf( __('You cannot update because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.'), $update->current, $update->php_version, $php_version ); + elseif ( !$mysql_compat ) + $message = sprintf( __('You cannot update because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.'), $update->current, $update->mysql_version, $mysql_version ); + else + $message = sprintf(__('You can update to WordPress %2$s automatically or download the package and install it manually:'), $update->current, $version_string); + if ( !$mysql_compat || !$php_compat ) + $show_buttons = false; + } + $download = sprintf(__('Download %s'), $version_string); + } + + echo '

    '; + echo $message; + echo '

    '; + echo '
    '; + wp_nonce_field('upgrade-core'); + echo '

    '; + echo ''; + echo ''; + if ( $show_buttons ) { + if ( $first_pass ) { + submit_button( $submit, $current ? 'button' : 'primary regular', 'upgrade', false ); + $first_pass = false; + } else { + submit_button( $submit, 'button', 'upgrade', false ); + } + echo ' ' . $download . ' '; + } + if ( 'en_US' != $update->locale ) + if ( !isset( $update->dismissed ) || !$update->dismissed ) + submit_button( __('Hide this update'), 'button', 'dismiss', false ); + else + submit_button( __('Bring back this update'), 'button', 'undismiss', false ); + echo '

    '; + if ( 'en_US' != $update->locale && ( !isset($wp_local_package) || $wp_local_package != $update->locale ) ) + echo '

    '.__('This localized version contains both the translation and various other localization fixes. You can skip upgrading if you want to keep your current translation.').'

    '; + // Partial builds don't need language-specific warnings. + elseif ( 'en_US' == $update->locale && get_locale() != 'en_US' && ( ! $update->packages->partial && $wp_version == $update->partial_version ) ) { + echo '

    '.sprintf( __('You are about to install WordPress %s in English (US). There is a chance this update will break your translation. You may prefer to wait for the localized version to be released.'), $update->response != 'development' ? $update->current : '' ).'

    '; + } + echo '
    '; + +} + +function dismissed_updates() { + $dismissed = get_core_updates( array( 'dismissed' => true, 'available' => false ) ); + if ( $dismissed ) { + + $show_text = esc_js(__('Show hidden updates')); + $hide_text = esc_js(__('Hide hidden updates')); + ?> + + '.__('Show hidden updates').'

    '; + echo '
      '; + foreach( (array) $dismissed as $update) { + echo '
    • '; + list_core_update( $update ); + echo '
    • '; + } + echo '
    '; + } +} + +/** + * Display upgrade WordPress for downloading latest or upgrading automatically form. + * + * @since 2.7.0 + * + * @return null + */ +function core_upgrade_preamble() { + global $wp_version, $required_php_version, $required_mysql_version; + + $updates = get_core_updates(); + + if ( !isset($updates[0]->response) || 'latest' == $updates[0]->response ) { + echo '

    '; + _e('You have the latest version of WordPress.'); + + if ( wp_http_supports( array( 'ssl' ) ) ) { + require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; + $upgrader = new WP_Automatic_Updater; + $future_minor_update = (object) array( + 'current' => $wp_version . '.1.next.minor', + 'version' => $wp_version . '.1.next.minor', + 'php_version' => $required_php_version, + 'mysql_version' => $required_mysql_version, + ); + $should_auto_update = $upgrader->should_update( 'core', $future_minor_update, ABSPATH ); + if ( $should_auto_update ) + echo ' ' . __( 'Future security updates will be applied automatically.' ); + } + echo '

    '; + } else { + echo '

    '; + _e('Important: before updating, please back up your database and files. For help with updates, visit the Updating WordPress Codex page.'); + echo '

    '; + + echo '

    '; + _e( 'An updated version of WordPress is available.' ); + echo '

    '; + } + + if ( isset( $updates[0] ) && $updates[0]->response == 'development' ) { + require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; + $upgrader = new WP_Automatic_Updater; + if ( wp_http_supports( 'ssl' ) && $upgrader->should_update( 'core', $updates[0], ABSPATH ) ) + echo '

    BETA TESTERS: This site is set up to install updates of future beta versions automatically.

    '; + } + + echo '
      '; + $alternate = true; + foreach( (array) $updates as $update ) { + echo '
    • '; + list_core_update( $update ); + echo '
    • '; + } + echo '
    '; + // Don't show the maintenance mode notice when we are only showing a single re-install option. + if ( $updates && ( count( $updates ) > 1 || $updates[0]->response != 'latest' ) ) { + echo '

    ' . __( 'While your site is being updated, it will be in maintenance mode. As soon as your updates are complete, your site will return to normal.' ) . '

    '; + } elseif ( ! $updates ) { + list( $normalized_version ) = explode( '-', $wp_version ); + echo '

    ' . sprintf( __( 'Learn more about WordPress %s.' ), esc_url( self_admin_url( 'about.php' ) ), $normalized_version ) . '

    '; + } + dismissed_updates(); +} + +function list_plugin_updates() { + global $wp_version; + + $cur_wp_version = preg_replace('/-.*$/', '', $wp_version); + + require_once(ABSPATH . 'wp-admin/includes/plugin-install.php'); + $plugins = get_plugin_updates(); + if ( empty( $plugins ) ) { + echo '

    ' . __( 'Plugins' ) . '

    '; + echo '

    ' . __( 'Your plugins are all up to date.' ) . '

    '; + return; + } + $form_action = 'update-core.php?action=do-plugin-upgrade'; + + $core_updates = get_core_updates(); + if ( !isset($core_updates[0]->response) || 'latest' == $core_updates[0]->response || 'development' == $core_updates[0]->response || version_compare( $core_updates[0]->current, $cur_wp_version, '=') ) + $core_update_version = false; + else + $core_update_version = $core_updates[0]->current; + ?> +

    +

    +
    + +

    + + + + + + + + + + + + + + + + $plugin_data) { + $info = plugins_api('plugin_information', array('slug' => $plugin_data->update->slug )); + // Get plugin compat for running version of WordPress. + if ( isset($info->tested) && version_compare($info->tested, $cur_wp_version, '>=') ) { + $compat = '
    ' . sprintf(__('Compatibility with WordPress %1$s: 100%% (according to its author)'), $cur_wp_version); + } elseif ( isset($info->compatibility[$cur_wp_version][$plugin_data->update->new_version]) ) { + $compat = $info->compatibility[$cur_wp_version][$plugin_data->update->new_version]; + $compat = '
    ' . sprintf(__('Compatibility with WordPress %1$s: %2$d%% (%3$d "works" votes out of %4$d total)'), $cur_wp_version, $compat[0], $compat[2], $compat[1]); + } else { + $compat = '
    ' . sprintf(__('Compatibility with WordPress %1$s: Unknown'), $cur_wp_version); + } + // Get plugin compat for updated version of WordPress. + if ( $core_update_version ) { + if ( isset($info->compatibility[$core_update_version][$plugin_data->update->new_version]) ) { + $update_compat = $info->compatibility[$core_update_version][$plugin_data->update->new_version]; + $compat .= '
    ' . sprintf(__('Compatibility with WordPress %1$s: %2$d%% (%3$d "works" votes out of %4$d total)'), $core_update_version, $update_compat[0], $update_compat[2], $update_compat[1]); + } else { + $compat .= '
    ' . sprintf(__('Compatibility with WordPress %1$s: Unknown'), $core_update_version); + } + } + // Get the upgrade notice for the new plugin version. + if ( isset($plugin_data->update->upgrade_notice) ) { + $upgrade_notice = '
    ' . strip_tags($plugin_data->update->upgrade_notice); + } else { + $upgrade_notice = ''; + } + + $details_url = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $plugin_data->update->slug . '§ion=changelog&TB_iframe=true&width=640&height=662'); + $details_text = sprintf(__('View version %1$s details'), $plugin_data->update->new_version); + $details = sprintf('%3$s.', esc_url($details_url), esc_attr($plugin_data->Name), $details_text); + + echo " + + + + "; + } +?> + +

    {$plugin_data->Name}
    " . sprintf(__('You have version %1$s installed. Update to %2$s.'), $plugin_data->Version, $plugin_data->update->new_version) . ' ' . $details . $compat . $upgrade_notice . "

    +

    +
    +' . __( 'Themes' ) . ''; + echo '

    ' . __( 'Your themes are all up to date.' ) . '

    '; + return; + } + + $form_action = 'update-core.php?action=do-theme-upgrade'; + +?> +

    +

    +

    Please Note: Any customizations you have made to theme files will be lost. Please consider using child themes for modifications.' ), __( 'http://codex.wordpress.org/Child_Themes' ) ); ?>

    +
    + +

    + + + + + + + + + + + + + + + + $theme ) { + echo " + + + + "; + } +?> + +
    " . $theme->display('Name') . ' ' . sprintf( __( 'You have version %1$s installed. Update to %2$s.' ), $theme->display('Version'), $theme->update['new_version'] ) . "
    +

    +
    +' . __( 'Translations' ) . ''; + echo '

    ' . __( 'Your translations are all up to date.' ) . '

    '; + } + return; + } + + $form_action = 'update-core.php?action=do-translation-upgrade'; + ?> +

    +
    +

    + +

    +
    + +
    +

    +'; + return; + } + + if ( ! WP_Filesystem( $credentials, ABSPATH ) ) { + // Failed to connect, Error and request again + request_filesystem_credentials( $url, '', true, ABSPATH ); + echo '
    '; + return; + } + + if ( $wp_filesystem->errors->get_error_code() ) { + foreach ( $wp_filesystem->errors->get_error_messages() as $message ) + show_message($message); + echo '
    '; + return; + } + + if ( $reinstall ) + $update->response = 'reinstall'; + + add_filter( 'update_feedback', 'show_message' ); + + $upgrader = new Core_Upgrader(); + $result = $upgrader->upgrade( $update ); + + if ( is_wp_error($result) ) { + show_message($result); + if ('up_to_date' != $result->get_error_code() ) + show_message( __('Installation Failed') ); + echo ''; + return; + } + + show_message( __('WordPress updated successfully') ); + show_message( '' . sprintf( __( 'Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click here.' ), $result, esc_url( self_admin_url( 'about.php?updated' ) ) ) . '' ); + show_message( '' . sprintf( __( 'Welcome to WordPress %1$s. Learn more.' ), $result, esc_url( self_admin_url( 'about.php?updated' ) ) ) . '' ); + ?> + + + ' . __( 'On this screen, you can update to the latest version of WordPress, as well as update your themes and plugins from the WordPress.org repositories.' ) . '

    '; +$updates_overview .= '

    ' . __( 'If an update is available, you᾿ll see a notification appear in the Toolbar and navigation menu.' ) . ' ' . __( 'Keeping your site updated is important for security. It also makes the internet a safer place for you and your readers.' ) . '

    '; + +get_current_screen()->add_help_tab( array( + 'id' => 'overview', + 'title' => __( 'Overview' ), + 'content' => $updates_overview +) ); + +$updates_howto = '

    ' . __( 'WordPress — Updating your WordPress installation is a simple one-click procedure: just click on the “Update Now” button when you are notified that a new version is available.' ) . ' ' . __( 'In most cases, WordPress will automatically apply maintenance and security updates in the background for you.' ) . '

    '; +$updates_howto .= '

    ' . __( 'Themes and Plugins — To update individual themes or plugins from this screen, use the checkboxes to make your selection, then click on the appropriate “Update” button. To update all of your themes or plugins at once, you can check the box at the top of the section to select all before clicking the update button.' ) . '

    '; + +if ( 'en_US' != get_locale() ) { + $updates_howto .= '

    ' . __( 'Translations — The files translating WordPress into your language are updated for you whenever any other updates occur. But if these files are out of date, you can click the “Update Translations” button.' ) . '

    '; +} + +get_current_screen()->add_help_tab( array( + 'id' => 'how-to-update', + 'title' => __( 'How to Update' ), + 'content' => $updates_howto +) ); + +get_current_screen()->set_help_sidebar( + '

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

    ' . + '

    ' . __( 'Documentation on Updating WordPress' ) . '

    ' . + '

    ' . __( 'Support Forums' ) . '

    ' +); + +if ( 'upgrade-core' == $action ) { + // Force a update check when requested + $force_check = ! empty( $_GET['force-check'] ); + wp_version_check( array(), $force_check ); + + require_once(ABSPATH . 'wp-admin/admin-header.php'); + ?> +
    +

    +

    '; + if ( $upgrade_error == 'themes' ) + _e('Please select one or more themes to update.'); + else + _e('Please select one or more plugins to update.'); + echo '

    '; + } + + echo '

    '; + /* translators: %1 date, %2 time. */ + printf( __('Last checked on %1$s at %2$s.'), date_i18n( get_option( 'date_format' ) ), date_i18n( get_option( 'time_format' ) ) ); + echo '   ' . __( 'Check Again' ) . ''; + echo '

    '; + + if ( $core = current_user_can( 'update_core' ) ) + core_upgrade_preamble(); + if ( $plugins = current_user_can( 'update_plugins' ) ) + list_plugin_updates(); + if ( $themes = current_user_can( 'update_themes' ) ) + list_theme_updates(); + if ( $core || $plugins || $themes ) + list_translation_updates(); + unset( $core, $plugins, $themes ); + /** + * Fires after the core, plugin, and theme update tables. + * + * @since 2.9.0 + */ + do_action( 'core_upgrade_preamble' ); + echo ''; + include(ABSPATH . 'wp-admin/admin-footer.php'); + +} elseif ( 'do-core-upgrade' == $action || 'do-core-reinstall' == $action ) { + + if ( ! current_user_can( 'update_core' ) ) + wp_die( __( 'You do not have sufficient permissions to update this site.' ) ); + + check_admin_referer('upgrade-core'); + + // do the (un)dismiss actions before headers, + // so that they can redirect + if ( isset( $_POST['dismiss'] ) ) + do_dismiss_core_update(); + elseif ( isset( $_POST['undismiss'] ) ) + do_undismiss_core_update(); + + require_once(ABSPATH . 'wp-admin/admin-header.php'); + if ( 'do-core-reinstall' == $action ) + $reinstall = true; + else + $reinstall = false; + + if ( isset( $_POST['upgrade'] ) ) + do_core_upgrade($reinstall); + + include(ABSPATH . 'wp-admin/admin-footer.php'); + +} elseif ( 'do-plugin-upgrade' == $action ) { + + if ( ! current_user_can( 'update_plugins' ) ) + wp_die( __( 'You do not have sufficient permissions to update this site.' ) ); + + check_admin_referer('upgrade-core'); + + if ( isset( $_GET['plugins'] ) ) { + $plugins = explode( ',', $_GET['plugins'] ); + } elseif ( isset( $_POST['checked'] ) ) { + $plugins = (array) $_POST['checked']; + } else { + wp_redirect( admin_url('update-core.php') ); + exit; + } + + $url = 'update.php?action=update-selected&plugins=' . urlencode(implode(',', $plugins)); + $url = wp_nonce_url($url, 'bulk-update-plugins'); + + $title = __('Update Plugins'); + + require_once(ABSPATH . 'wp-admin/admin-header.php'); + echo '
    '; + echo '

    ' . esc_html__('Update Plugins') . '

    '; + echo ""; + echo '
    '; + include(ABSPATH . 'wp-admin/admin-footer.php'); + +} elseif ( 'do-theme-upgrade' == $action ) { + + if ( ! current_user_can( 'update_themes' ) ) + wp_die( __( 'You do not have sufficient permissions to update this site.' ) ); + + check_admin_referer('upgrade-core'); + + if ( isset( $_GET['themes'] ) ) { + $themes = explode( ',', $_GET['themes'] ); + } elseif ( isset( $_POST['checked'] ) ) { + $themes = (array) $_POST['checked']; + } else { + wp_redirect( admin_url('update-core.php') ); + exit; + } + + $url = 'update.php?action=update-selected-themes&themes=' . urlencode(implode(',', $themes)); + $url = wp_nonce_url($url, 'bulk-update-themes'); + + $title = __('Update Themes'); + + require_once(ABSPATH . 'wp-admin/admin-header.php'); + echo '
    '; + echo '

    ' . esc_html__('Update Themes') . '

    '; + echo ""; + echo '
    '; + include(ABSPATH . 'wp-admin/admin-footer.php'); + +} elseif ( 'do-translation-upgrade' == $action ) { + + if ( ! current_user_can( 'update_core' ) && ! current_user_can( 'update_plugins' ) && ! current_user_can( 'update_themes' ) ) + wp_die( __( 'You do not have sufficient permissions to update this site.' ) ); + + check_admin_referer( 'upgrade-translations' ); + + require_once( ABSPATH . 'wp-admin/admin-header.php' ); + include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); + + $url = 'update-core.php?action=do-translation-upgrade'; + $nonce = 'upgrade-translations'; + $title = __( 'Update Translations' ); + $context = WP_LANG_DIR; + + $upgrader = new Language_Pack_Upgrader( new Language_Pack_Upgrader_Skin( compact( 'url', 'nonce', 'title', 'context' ) ) ); + $result = $upgrader->bulk_upgrade(); + + require_once( ABSPATH . 'wp-admin/admin-footer.php' ); + +} else { + /** + * Fires for each custom update action on the WordPress Updates screen. + * + * The dynamic portion of the hook name, $action, refers to the + * passed update action. The hook fires in lieu of all available + * default update actions. + * + * @since 3.2.0 + */ + do_action( "update-core-custom_{$action}" ); +} diff --git a/wp-admin/update.php b/wp-admin/update.php new file mode 100644 index 0000000..fc86574 --- /dev/null +++ b/wp-admin/update.php @@ -0,0 +1,270 @@ +bulk_upgrade( $plugins ); + + iframe_footer(); + + } elseif ( 'upgrade-plugin' == $action ) { + if ( ! current_user_can('update_plugins') ) + wp_die(__('You do not have sufficient permissions to update plugins for this site.')); + + check_admin_referer('upgrade-plugin_' . $plugin); + + $title = __('Update Plugin'); + $parent_file = 'plugins.php'; + $submenu_file = 'plugins.php'; + + wp_enqueue_script( 'updates' ); + require_once(ABSPATH . 'wp-admin/admin-header.php'); + + $nonce = 'upgrade-plugin_' . $plugin; + $url = 'update.php?action=upgrade-plugin&plugin=' . urlencode( $plugin ); + + $upgrader = new Plugin_Upgrader( new Plugin_Upgrader_Skin( compact('title', 'nonce', 'url', 'plugin') ) ); + $upgrader->upgrade($plugin); + + include(ABSPATH . 'wp-admin/admin-footer.php'); + + } elseif ('activate-plugin' == $action ) { + if ( ! current_user_can('update_plugins') ) + wp_die(__('You do not have sufficient permissions to update plugins for this site.')); + + check_admin_referer('activate-plugin_' . $plugin); + if ( ! isset($_GET['failure']) && ! isset($_GET['success']) ) { + wp_redirect( admin_url('update.php?action=activate-plugin&failure=true&plugin=' . urlencode( $plugin ) . '&_wpnonce=' . $_GET['_wpnonce']) ); + activate_plugin( $plugin, '', ! empty( $_GET['networkwide'] ), true ); + wp_redirect( admin_url('update.php?action=activate-plugin&success=true&plugin=' . urlencode( $plugin ) . '&_wpnonce=' . $_GET['_wpnonce']) ); + die(); + } + iframe_header( __('Plugin Reactivation'), true ); + if ( isset($_GET['success']) ) + echo '

    ' . __('Plugin reactivated successfully.') . '

    '; + + if ( isset($_GET['failure']) ){ + echo '

    ' . __('Plugin failed to reactivate due to a fatal error.') . '

    '; + + 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 ); + @ini_set('display_errors', true); //Ensure that Fatal errors are displayed. + wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin ); + include( WP_PLUGIN_DIR . '/' . $plugin ); + } + iframe_footer(); + } elseif ( 'install-plugin' == $action ) { + + if ( ! current_user_can('install_plugins') ) + wp_die( __( 'You do not have sufficient permissions to install plugins on this site.' ) ); + + include_once ABSPATH . 'wp-admin/includes/plugin-install.php'; //for plugins_api.. + + check_admin_referer('install-plugin_' . $plugin); + $api = plugins_api('plugin_information', array('slug' => $plugin, 'fields' => array('sections' => false) ) ); //Save on a bit of bandwidth. + + if ( is_wp_error($api) ) + wp_die($api); + + $title = __('Plugin Install'); + $parent_file = 'plugins.php'; + $submenu_file = 'plugin-install.php'; + require_once(ABSPATH . 'wp-admin/admin-header.php'); + + $title = sprintf( __('Installing Plugin: %s'), $api->name . ' ' . $api->version ); + $nonce = 'install-plugin_' . $plugin; + $url = 'update.php?action=install-plugin&plugin=' . urlencode( $plugin ); + if ( isset($_GET['from']) ) + $url .= '&from=' . urlencode(stripslashes($_GET['from'])); + + $type = 'web'; //Install plugin type, From Web or an Upload. + + $upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact('title', 'url', 'nonce', 'plugin', 'api') ) ); + $upgrader->install($api->download_link); + + include(ABSPATH . 'wp-admin/admin-footer.php'); + + } elseif ( 'upload-plugin' == $action ) { + + if ( ! current_user_can('install_plugins') ) + wp_die( __( 'You do not have sufficient permissions to install plugins on this site.' ) ); + + check_admin_referer('plugin-upload'); + + $file_upload = new File_Upload_Upgrader('pluginzip', 'package'); + + $title = __('Upload Plugin'); + $parent_file = 'plugins.php'; + $submenu_file = 'plugin-install.php'; + require_once(ABSPATH . 'wp-admin/admin-header.php'); + + $title = sprintf( __('Installing Plugin from uploaded file: %s'), esc_html( basename( $file_upload->filename ) ) ); + $nonce = 'plugin-upload'; + $url = add_query_arg(array('package' => $file_upload->id), 'update.php?action=upload-plugin'); + $type = 'upload'; //Install plugin type, From Web or an Upload. + + $upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact('type', 'title', 'nonce', 'url') ) ); + $result = $upgrader->install( $file_upload->package ); + + if ( $result || is_wp_error($result) ) + $file_upload->cleanup(); + + include(ABSPATH . 'wp-admin/admin-footer.php'); + + } elseif ( 'upgrade-theme' == $action ) { + + if ( ! current_user_can('update_themes') ) + wp_die(__('You do not have sufficient permissions to update themes for this site.')); + + check_admin_referer('upgrade-theme_' . $theme); + + wp_enqueue_script( 'customize-loader' ); + wp_enqueue_script( 'updates' ); + + $title = __('Update Theme'); + $parent_file = 'themes.php'; + $submenu_file = 'themes.php'; + require_once(ABSPATH . 'wp-admin/admin-header.php'); + + $nonce = 'upgrade-theme_' . $theme; + $url = 'update.php?action=upgrade-theme&theme=' . urlencode( $theme ); + + $upgrader = new Theme_Upgrader( new Theme_Upgrader_Skin( compact('title', 'nonce', 'url', 'theme') ) ); + $upgrader->upgrade($theme); + + include(ABSPATH . 'wp-admin/admin-footer.php'); + } elseif ( 'update-selected-themes' == $action ) { + if ( ! current_user_can( 'update_themes' ) ) + wp_die( __( 'You do not have sufficient permissions to update themes for this site.' ) ); + + check_admin_referer( 'bulk-update-themes' ); + + if ( isset( $_GET['themes'] ) ) + $themes = explode( ',', stripslashes($_GET['themes']) ); + elseif ( isset( $_POST['checked'] ) ) + $themes = (array) $_POST['checked']; + else + $themes = array(); + + $themes = array_map('urldecode', $themes); + + $url = 'update.php?action=update-selected-themes&themes=' . urlencode(implode(',', $themes)); + $nonce = 'bulk-update-themes'; + + wp_enqueue_script( 'updates' ); + iframe_header(); + + $upgrader = new Theme_Upgrader( new Bulk_Theme_Upgrader_Skin( compact( 'nonce', 'url' ) ) ); + $upgrader->bulk_upgrade( $themes ); + + iframe_footer(); + } elseif ( 'install-theme' == $action ) { + + if ( ! current_user_can('install_themes') ) + wp_die( __( 'You do not have sufficient permissions to install themes on this site.' ) ); + + include_once ABSPATH . 'wp-admin/includes/theme-install.php'; //for themes_api.. + + check_admin_referer( 'install-theme_' . $theme ); + $api = themes_api('theme_information', array('slug' => $theme, 'fields' => array('sections' => false, 'tags' => false) ) ); //Save on a bit of bandwidth. + + if ( is_wp_error($api) ) + wp_die($api); + + wp_enqueue_script( 'customize-loader' ); + + $title = __('Install Themes'); + $parent_file = 'themes.php'; + $submenu_file = 'themes.php'; + require_once(ABSPATH . 'wp-admin/admin-header.php'); + + $title = sprintf( __('Installing Theme: %s'), $api->name . ' ' . $api->version ); + $nonce = 'install-theme_' . $theme; + $url = 'update.php?action=install-theme&theme=' . urlencode( $theme ); + $type = 'web'; //Install theme type, From Web or an Upload. + + $upgrader = new Theme_Upgrader( new Theme_Installer_Skin( compact('title', 'url', 'nonce', 'plugin', 'api') ) ); + $upgrader->install($api->download_link); + + include(ABSPATH . 'wp-admin/admin-footer.php'); + + } elseif ( 'upload-theme' == $action ) { + + if ( ! current_user_can('install_themes') ) + wp_die( __( 'You do not have sufficient permissions to install themes on this site.' ) ); + + check_admin_referer('theme-upload'); + + $file_upload = new File_Upload_Upgrader('themezip', 'package'); + + wp_enqueue_script( 'customize-loader' ); + + $title = __('Upload Theme'); + $parent_file = 'themes.php'; + $submenu_file = 'theme-install.php'; + + require_once(ABSPATH . 'wp-admin/admin-header.php'); + + $title = sprintf( __('Installing Theme from uploaded file: %s'), esc_html( basename( $file_upload->filename ) ) ); + $nonce = 'theme-upload'; + $url = add_query_arg(array('package' => $file_upload->id), 'update.php?action=upload-theme'); + $type = 'upload'; //Install plugin type, From Web or an Upload. + + $upgrader = new Theme_Upgrader( new Theme_Installer_Skin( compact('type', 'title', 'nonce', 'url') ) ); + $result = $upgrader->install( $file_upload->package ); + + if ( $result || is_wp_error($result) ) + $file_upload->cleanup(); + + include(ABSPATH . 'wp-admin/admin-footer.php'); + + } else { + /** + * Fires when a custom plugin or theme update request is received. + * + * The dynamic portion of the hook name, $action, refers to the action + * provided in the request for wp-admin/update.php. Can be used to + * provide custom update functionality for themes and plugins. + * + * @since 2.8.0 + */ + do_action( "update-custom_{$action}" ); + } +} diff --git a/wp-admin/upgrade-functions.php b/wp-admin/upgrade-functions.php new file mode 100644 index 0000000..7be637c --- /dev/null +++ b/wp-admin/upgrade-functions.php @@ -0,0 +1,12 @@ +db_version(); +$php_compat = version_compare( $php_version, $required_php_version, '>=' ); +if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) ) + $mysql_compat = true; +else + $mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ); + +@header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) ); +?> + +> + + + + <?php _e( 'WordPress › Update' ); ?> + + + +

    + + + +

    +

    +

    + +WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version ); + elseif ( !$php_compat ) + printf( __('You cannot update because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.'), $wp_version, $required_php_version, $php_version ); + elseif ( !$mysql_compat ) + printf( __('You cannot update because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.'), $wp_version, $required_mysql_version, $mysql_version ); +?> + +

    +

    +

    +

    + +

    +

    +

    + + + + + + diff --git a/wp-admin/upload.php b/wp-admin/upload.php new file mode 100644 index 0000000..c38a0b6 --- /dev/null +++ b/wp-admin/upload.php @@ -0,0 +1,245 @@ +get_pagenum(); + +// Handle bulk actions +$doaction = $wp_list_table->current_action(); + +if ( $doaction ) { + check_admin_referer('bulk-media'); + + if ( 'delete_all' == $doaction ) { + $post_ids = $wpdb->get_col( "SELECT ID FROM $wpdb->posts WHERE post_type='attachment' AND post_status = 'trash'" ); + $doaction = 'delete'; + } elseif ( isset( $_REQUEST['media'] ) ) { + $post_ids = $_REQUEST['media']; + } elseif ( isset( $_REQUEST['ids'] ) ) { + $post_ids = explode( ',', $_REQUEST['ids'] ); + } + + $location = 'upload.php'; + if ( $referer = wp_get_referer() ) { + if ( false !== strpos( $referer, 'upload.php' ) ) + $location = remove_query_arg( array( 'trashed', 'untrashed', 'deleted', 'message', 'ids', 'posted' ), $referer ); + } + + switch ( $doaction ) { + case 'find_detached': + if ( !current_user_can('edit_posts') ) + wp_die( __('You are not allowed to scan for lost attachments.') ); + + $lost = $wpdb->get_col( " + SELECT ID FROM $wpdb->posts + WHERE post_type = 'attachment' AND post_parent > '0' + AND post_parent NOT IN ( + SELECT ID FROM $wpdb->posts + WHERE post_type NOT IN ( 'attachment', '" . join( "', '", get_post_types( array( 'public' => false ) ) ) . "' ) + ) + " ); + + $_REQUEST['detached'] = 1; + break; + case 'attach': + $parent_id = (int) $_REQUEST['found_post_id']; + if ( !$parent_id ) + return; + + $parent = get_post( $parent_id ); + if ( !current_user_can( 'edit_post', $parent_id ) ) + wp_die( __( 'You are not allowed to edit this post.' ) ); + + $attach = array(); + foreach ( (array) $_REQUEST['media'] as $att_id ) { + $att_id = (int) $att_id; + + if ( !current_user_can( 'edit_post', $att_id ) ) + continue; + + $attach[] = $att_id; + } + + if ( ! empty( $attach ) ) { + $attach_string = implode( ',', $attach ); + $attached = $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->posts SET post_parent = %d WHERE post_type = 'attachment' AND ID IN ( $attach_string )", $parent_id ) ); + foreach ( $attach as $att_id ) { + clean_attachment_cache( $att_id ); + } + } + + if ( isset( $attached ) ) { + $location = 'upload.php'; + if ( $referer = wp_get_referer() ) { + if ( false !== strpos( $referer, 'upload.php' ) ) + $location = $referer; + } + + $location = add_query_arg( array( 'attached' => $attached ) , $location ); + wp_redirect( $location ); + exit; + } + break; + case 'trash': + if ( !isset( $post_ids ) ) + break; + foreach ( (array) $post_ids as $post_id ) { + if ( !current_user_can( 'delete_post', $post_id ) ) + wp_die( __( 'You are not allowed to move this post to the trash.' ) ); + + if ( !wp_trash_post( $post_id ) ) + wp_die( __( 'Error in moving to trash.' ) ); + } + $location = add_query_arg( array( 'trashed' => count( $post_ids ), 'ids' => join( ',', $post_ids ) ), $location ); + break; + case 'untrash': + if ( !isset( $post_ids ) ) + break; + foreach ( (array) $post_ids as $post_id ) { + if ( !current_user_can( 'delete_post', $post_id ) ) + wp_die( __( 'You are not allowed to move this post out of the trash.' ) ); + + if ( !wp_untrash_post( $post_id ) ) + wp_die( __( 'Error in restoring from trash.' ) ); + } + $location = add_query_arg( 'untrashed', count( $post_ids ), $location ); + break; + case 'delete': + if ( !isset( $post_ids ) ) + break; + foreach ( (array) $post_ids as $post_id_del ) { + if ( !current_user_can( 'delete_post', $post_id_del ) ) + wp_die( __( 'You are not allowed to delete this post.' ) ); + + if ( !wp_delete_attachment( $post_id_del ) ) + wp_die( __( 'Error in deleting.' ) ); + } + $location = add_query_arg( 'deleted', count( $post_ids ), $location ); + break; + } + + wp_redirect( $location ); + exit; +} elseif ( ! empty( $_GET['_wp_http_referer'] ) ) { + wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ); + exit; +} + +$wp_list_table->prepare_items(); + +$title = __('Media Library'); +$parent_file = 'upload.php'; + +wp_enqueue_script( 'media' ); + +add_screen_option( 'per_page', array('label' => _x( 'Media items', 'items per page (screen options)' )) ); + +get_current_screen()->add_help_tab( array( +'id' => 'overview', +'title' => __('Overview'), +'content' => + '

    ' . __( 'All the files you’ve uploaded are listed in the Media Library, with the most recent uploads listed first. You can use the Screen Options tab to customize the display of this screen.' ) . '

    ' . + '

    ' . __( 'You can narrow the list by file type/status using the text link filters at the top of the screen. You also can refine the list by date using the dropdown menu above the media table.' ) . '

    ' +) ); +get_current_screen()->add_help_tab( array( +'id' => 'actions-links', +'title' => __('Available Actions'), +'content' => + '

    ' . __( 'Hovering over a row reveals action links: Edit, Delete Permanently, and View. Clicking Edit or on the media file’s name displays a simple screen to edit that individual file’s metadata. Clicking Delete Permanently will delete the file from the media library (as well as from any posts to which it is currently attached). View will take you to the display page for that file.' ) . '

    ' +) ); +get_current_screen()->add_help_tab( array( +'id' => 'attaching-files', +'title' => __('Attaching Files'), +'content' => + '

    ' . __( 'If a media file has not been attached to any post, you will see that in the Attached To column, and can click on Attach File to launch a small popup that will allow you to search for a post and attach the file.' ) . '

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

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

    ' . + '

    ' . __( 'Documentation on Media Library' ) . '

    ' . + '

    ' . __( 'Support Forums' ) . '

    ' +); + +require_once( ABSPATH . 'wp-admin/admin-header.php' ); +?> + +
    +

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

    + +' . __('Undo') . ''; + $_SERVER['REQUEST_URI'] = remove_query_arg(array('trashed'), $_SERVER['REQUEST_URI']); +} + +if ( ! empty( $_GET['untrashed'] ) && $untrashed = absint( $_GET['untrashed'] ) ) { + $message = sprintf( _n( 'Media attachment restored from the trash.', '%d media attachments restored from the trash.', $untrashed ), number_format_i18n( $_GET['untrashed'] ) ); + $_SERVER['REQUEST_URI'] = remove_query_arg(array('untrashed'), $_SERVER['REQUEST_URI']); +} + +$messages[1] = __('Media attachment updated.'); +$messages[2] = __('Media permanently deleted.'); +$messages[3] = __('Error saving media attachment.'); +$messages[4] = __('Media moved to the trash.') . ' ' . __('Undo') . ''; +$messages[5] = __('Media restored from the trash.'); + +if ( ! empty( $_GET['message'] ) && isset( $messages[ $_GET['message'] ] ) ) { + $message = $messages[ $_GET['message'] ]; + $_SERVER['REQUEST_URI'] = remove_query_arg(array('message'), $_SERVER['REQUEST_URI']); +} + +if ( !empty($message) ) { ?> +

    + + +views(); ?> + +
    + +search_box( __( 'Search Media' ), 'media' ); ?> + +display(); ?> + +
    + +
    +
    + +ID ) ); + +if ( ! $user_id && IS_PROFILE_PAGE ) + $user_id = $current_user->ID; +elseif ( ! $user_id && ! IS_PROFILE_PAGE ) + wp_die(__( 'Invalid user ID.' ) ); +elseif ( ! get_userdata( $user_id ) ) + wp_die( __('Invalid user ID.') ); + +wp_enqueue_script('user-profile'); + +$title = IS_PROFILE_PAGE ? __('Profile') : __('Edit User'); +if ( current_user_can('edit_users') && !IS_PROFILE_PAGE ) + $submenu_file = 'users.php'; +else + $submenu_file = 'profile.php'; + +if ( current_user_can('edit_users') && !is_user_admin() ) + $parent_file = 'users.php'; +else + $parent_file = 'profile.php'; + +$profile_help = '

    ' . __('Your profile contains information about you (your “account”) as well as some personal options related to using WordPress.') . '

    ' . + '

    ' . __('You can change your password, turn on keyboard shortcuts, change the color scheme of your WordPress administration screens, and turn off the WYSIWYG (Visual) editor, among other things. You can hide the Toolbar (formerly called the Admin Bar) from the front end of your site, however it cannot be disabled on the admin screens.') . '

    ' . + '

    ' . __('Your username cannot be changed, but you can use other fields to enter your real name or a nickname, and change which name to display on your posts.') . '

    ' . + '

    ' . __('Required fields are indicated; the rest are optional. Profile information will only be displayed if your theme is set up to do so.') . '

    ' . + '

    ' . __('Remember to click the Update Profile button when you are finished.') . '

    '; + +get_current_screen()->add_help_tab( array( + 'id' => 'overview', + 'title' => __('Overview'), + 'content' => $profile_help, +) ); + +get_current_screen()->set_help_sidebar( + '

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

    ' . + '

    ' . __('Documentation on User Profiles') . '

    ' . + '

    ' . __('Support Forums') . '

    ' +); + +$wp_http_referer = remove_query_arg(array('update', 'delete_count'), $wp_http_referer ); + +$user_can_edit = current_user_can( 'edit_posts' ) || current_user_can( 'edit_pages' ); + +/** + * Optional SSL preference that can be turned on by hooking to the 'personal_options' action. + * + * @since 2.7.0 + * + * @param object $user User data object + */ +function use_ssl_preference($user) { +?> + + + + +ID + && ! apply_filters( 'enable_edit_any_user_configuration', true ) +) { + wp_die( __( 'You do not have permission to edit this user.' ) ); +} + +// Execute confirmed email change. See send_confirmation_on_profile_email(). +if ( is_multisite() && IS_PROFILE_PAGE && isset( $_GET[ 'newuseremail' ] ) && $current_user->ID ) { + $new_email = get_option( $current_user->ID . '_new_email' ); + if ( $new_email[ 'hash' ] == $_GET[ 'newuseremail' ] ) { + $user = new stdClass; + $user->ID = $current_user->ID; + $user->user_email = esc_html( trim( $new_email[ 'newemail' ] ) ); + if ( $wpdb->get_var( $wpdb->prepare( "SELECT user_login FROM {$wpdb->signups} WHERE user_login = %s", $current_user->user_login ) ) ) + $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->signups} SET user_email = %s WHERE user_login = %s", $user->user_email, $current_user->user_login ) ); + wp_update_user( $user ); + delete_option( $current_user->ID . '_new_email' ); + wp_redirect( add_query_arg( array('updated' => 'true'), self_admin_url( 'profile.php' ) ) ); + die(); + } +} elseif ( is_multisite() && IS_PROFILE_PAGE && !empty( $_GET['dismiss'] ) && $current_user->ID . '_new_email' == $_GET['dismiss'] ) { + delete_option( $current_user->ID . '_new_email' ); + wp_redirect( add_query_arg( array('updated' => 'true'), self_admin_url( 'profile.php' ) ) ); + die(); +} + +switch ($action) { +case 'update': + +check_admin_referer('update-user_' . $user_id); + +if ( !current_user_can('edit_user', $user_id) ) + wp_die(__('You do not have permission to edit this user.')); + +if ( IS_PROFILE_PAGE ) { + /** + * Fires before the page loads on the 'Your Profile' editing screen. + * + * The action only fires if the current user is editing their own profile. + * + * @since 2.0.0 + * + * @param int $user_id The user ID. + */ + do_action( 'personal_options_update', $user_id ); +} else { + /** + * Fires before the page loads on the 'Edit User' screen. + * + * @since 2.7.0 + * + * @param int $user_id The user ID. + */ + do_action( 'edit_user_profile_update', $user_id ); +} + +if ( !is_multisite() ) { + $errors = edit_user($user_id); +} else { + $user = get_userdata( $user_id ); + + // Update the email address in signups, if present. + if ( $user->user_login && isset( $_POST[ 'email' ] ) && is_email( $_POST[ 'email' ] ) && $wpdb->get_var( $wpdb->prepare( "SELECT user_login FROM {$wpdb->signups} WHERE user_login = %s", $user->user_login ) ) ) + $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->signups} SET user_email = %s WHERE user_login = %s", $_POST[ 'email' ], $user_login ) ); + + // We must delete the user from the current blog if WP added them after editing. + $delete_role = false; + $blog_prefix = $wpdb->get_blog_prefix(); + if ( $user_id != $current_user->ID ) { + $cap = $wpdb->get_var( "SELECT meta_value FROM {$wpdb->usermeta} WHERE user_id = '{$user_id}' AND meta_key = '{$blog_prefix}capabilities' AND meta_value = 'a:0:{}'" ); + if ( !is_network_admin() && null == $cap && $_POST[ 'role' ] == '' ) { + $_POST[ 'role' ] = 'contributor'; + $delete_role = true; + } + } + if ( !isset( $errors ) || ( isset( $errors ) && is_object( $errors ) && false == $errors->get_error_codes() ) ) + $errors = edit_user($user_id); + if ( $delete_role ) // stops users being added to current blog when they are edited + delete_user_meta( $user_id, $blog_prefix . 'capabilities' ); + + if ( is_multisite() && is_network_admin() && !IS_PROFILE_PAGE && current_user_can( 'manage_network_options' ) && !isset($super_admins) && empty( $_POST['super_admin'] ) == is_super_admin( $user_id ) ) + empty( $_POST['super_admin'] ) ? revoke_super_admin( $user_id ) : grant_super_admin( $user_id ); +} + +if ( !is_wp_error( $errors ) ) { + $redirect = add_query_arg( 'updated', true, get_edit_user_link( $user_id ) ); + if ( $wp_http_referer ) + $redirect = add_query_arg('wp_http_referer', urlencode($wp_http_referer), $redirect); + wp_redirect($redirect); + exit; +} + +default: +$profileuser = get_user_to_edit($user_id); + +if ( !current_user_can('edit_user', $user_id) ) + wp_die(__('You do not have permission to edit this user.')); + +include (ABSPATH . 'wp-admin/admin-header.php'); +?> + +ID ) && current_user_can( 'manage_network_options' ) ) { ?> +

    + + +
    + +

    + +

    + + +

    + +
    + + +

    \n

    ", $errors->get_error_messages() ); ?>

    + + +
    +

    + + + + + +

    + +
    > + + + + +

    + + +

    + +

    + + + + + + + + + 1 && has_action('admin_color_scheme_picker') ) : ?> + + + + + + + + + + + + + + + + +
    More information'); ?>
    +
    +
    +
    + + +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +user_email != get_site_option( 'admin_email' ) || ! is_super_admin( $profileuser->ID ) ) : ?> +

    + +

    + +
    + +
    + +

    + + + + + + + + + + + + + $desc ) { +?> + + + + + + +
    + ID . '_new_email' ); + if ( $new_email && $new_email['newemail'] != $current_user->user_email && $profileuser->ID == $current_user->ID ) : ?> +
    +

    %1$s. Cancel'), $new_email['newemail'], esc_url( self_admin_url( 'profile.php?dismiss=' . $current_user->ID . '_new_email' ) ) ); ?>

    +
    + +
    + +

    + + + + + + + + + + + + + + + + + +

    +
    + +
    + +
    +
    + +
    +
    +

    +
    + + + +caps ) > count( $profileuser->roles ) + && apply_filters( 'additional_capabilities_display', true, $profileuser ) +) : ?> +

    + + + + + +
    +caps as $cap => $value ) { + if ( ! $wp_roles->is_role( $cap ) ) { + if ( '' != $output ) + $output .= ', '; + $output .= $value ? $cap : sprintf( __( 'Denied: %s' ), $cap ); + } + } + echo $output; +?> +
    + + + + + + + +
    +
    + + + 'enter_email'), 'user-new.php' ) ); + die(); + } + } + + if ( !$user_details ) { + wp_redirect( add_query_arg( array('update' => 'does_not_exist'), 'user-new.php' ) ); + die(); + } + + if ( ! current_user_can('promote_user', $user_details->ID) ) + wp_die(__('Cheatin’ uh?')); + + // Adding an existing user to this blog + $new_user_email = $user_details->user_email; + $redirect = 'user-new.php'; + $username = $user_details->user_login; + $user_id = $user_details->ID; + if ( ( $username != null && !is_super_admin( $user_id ) ) && ( array_key_exists($blog_id, get_blogs_of_user($user_id)) ) ) { + $redirect = add_query_arg( array('update' => 'addexisting'), 'user-new.php' ); + } else { + if ( isset( $_POST[ 'noconfirmation' ] ) && is_super_admin() ) { + add_existing_user_to_blog( array( 'user_id' => $user_id, 'role' => $_REQUEST[ 'role' ] ) ); + $redirect = add_query_arg( array('update' => 'addnoconfirmation'), 'user-new.php' ); + } else { + $newuser_key = substr( md5( $user_id ), 0, 5 ); + add_option( 'new_user_' . $newuser_key, array( 'user_id' => $user_id, 'email' => $user_details->user_email, 'role' => $_REQUEST[ 'role' ] ) ); + + $roles = get_editable_roles(); + $role = $roles[ $_REQUEST['role'] ]; + /* translators: 1: Site name, 2: site URL, 3: role, 4: activation URL */ + $message = __( 'Hi, + +You\'ve been invited to join \'%1$s\' at +%2$s with the role of %3$s. + +Please click the following link to confirm the invite: +%4$s' ); + wp_mail( $new_user_email, sprintf( __( '[%s] Joining confirmation' ), wp_specialchars_decode( get_option( 'blogname' ) ) ), sprintf( $message, get_option( 'blogname' ), home_url(), wp_specialchars_decode( translate_user_role( $role['name'] ) ), home_url( "/newbloguser/$newuser_key/" ) ) ); + $redirect = add_query_arg( array('update' => 'add'), 'user-new.php' ); + } + } + wp_redirect( $redirect ); + die(); +} elseif ( isset($_REQUEST['action']) && 'createuser' == $_REQUEST['action'] ) { + check_admin_referer( 'create-user', '_wpnonce_create-user' ); + + if ( ! current_user_can('create_users') ) + wp_die(__('Cheatin’ uh?')); + + if ( ! is_multisite() ) { + $user_id = edit_user(); + + if ( is_wp_error( $user_id ) ) { + $add_user_errors = $user_id; + } else { + if ( current_user_can( 'list_users' ) ) + $redirect = 'users.php?update=add&id=' . $user_id; + else + $redirect = add_query_arg( 'update', 'add', 'user-new.php' ); + wp_redirect( $redirect ); + die(); + } + } else { + // Adding a new user to this site + $user_details = wpmu_validate_user_signup( $_REQUEST[ 'user_login' ], $_REQUEST[ 'email' ] ); + if ( is_wp_error( $user_details[ 'errors' ] ) && !empty( $user_details[ 'errors' ]->errors ) ) { + $add_user_errors = $user_details[ 'errors' ]; + } else { + /** + * Filter the user_login, also known as the username, before it is added to the site. + * + * @since 2.0.3 + * + * @param string $user_login The sanitized username. + */ + $new_user_login = apply_filters( 'pre_user_login', sanitize_user( wp_unslash( $_REQUEST['user_login'] ), true ) ); + if ( isset( $_POST[ 'noconfirmation' ] ) && is_super_admin() ) { + add_filter( 'wpmu_signup_user_notification', '__return_false' ); // Disable confirmation email + } + wpmu_signup_user( $new_user_login, $_REQUEST[ 'email' ], array( 'add_to_blog' => $wpdb->blogid, 'new_role' => $_REQUEST[ 'role' ] ) ); + if ( isset( $_POST[ 'noconfirmation' ] ) && is_super_admin() ) { + $key = $wpdb->get_var( $wpdb->prepare( "SELECT activation_key FROM {$wpdb->signups} WHERE user_login = %s AND user_email = %s", $new_user_login, $_REQUEST[ 'email' ] ) ); + wpmu_activate_signup( $key ); + $redirect = add_query_arg( array('update' => 'addnoconfirmation'), 'user-new.php' ); + } else { + $redirect = add_query_arg( array('update' => 'newuserconfirmation'), 'user-new.php' ); + } + wp_redirect( $redirect ); + die(); + } + } +} + +$title = __('Add New User'); +$parent_file = 'users.php'; + +$do_both = false; +if ( is_multisite() && current_user_can('promote_users') && current_user_can('create_users') ) + $do_both = true; + +$help = '

    ' . __('To add a new user to your site, fill in the form on this screen and click the Add New User button at the bottom.') . '

    '; + +if ( is_multisite() ) { + $help .= '

    ' . __('Because this is a multisite installation, you may add accounts that already exist on the Network by specifying a username or email, and defining a role. For more options, such as specifying a password, you have to be a Network Administrator and use the hover link under an existing user’s name to Edit the user profile under Network Admin > All Users.') . '

    ' . + '

    ' . __('New users will receive an email letting them know they’ve been added as a user for your site. This email will also contain their password. Check the box if you don’t want the user to receive a welcome email.') . '

    '; +} else { + $help .= '

    ' . __('You must assign a password to the new user, which they can change after logging in. The username, however, cannot be changed.') . '

    ' . + '

    ' . __('New users will receive an email letting them know they’ve been added as a user for your site. By default, this email will also contain their password. Uncheck the box if you don’t want the password to be included in the welcome email.') . '

    '; +} + +$help .= '

    ' . __('Remember to click the Add New User button at the bottom of this screen when you are finished.') . '

    '; + +get_current_screen()->add_help_tab( array( + 'id' => 'overview', + 'title' => __('Overview'), + 'content' => $help, +) ); + +get_current_screen()->add_help_tab( array( +'id' => 'user-roles', +'title' => __('User Roles'), +'content' => '

    ' . __('Here is a basic overview of the different user roles and the permissions associated with each one:') . '

    ' . + '
      ' . + '
    • ' . __('Administrators have access to all the administration features.') . '
    • ' . + '
    • ' . __('Editors can publish posts, manage posts as well as manage other people’s posts, etc.') . '
    • ' . + '
    • ' . __('Authors can publish and manage their own posts, and are able to upload files.') . '
    • ' . + '
    • ' . __('Contributors can write and manage their posts but not publish posts or upload media files.') . '
    • ' . + '
    • ' . __('Subscribers can read comments/comment/receive newsletters, etc. but cannot create regular site content.') . '
    • ' . + '
    ' +) ); + +get_current_screen()->set_help_sidebar( + '

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

    ' . + '

    ' . __('Documentation on Adding New Users') . '

    ' . + '

    ' . __('Support Forums') . '

    ' +); + +wp_enqueue_script('wp-ajax-response'); +wp_enqueue_script('user-profile'); + +/** + * Filter whether to enable user auto-complete for non-super admins in Multisite. + * + * @since 3.4.0 + * + * @param bool $enable Whether to enable auto-complete for non-super admins. Default false. + */ +if ( is_multisite() && current_user_can( 'promote_users' ) && ! wp_is_large_network( 'users' ) + && ( is_super_admin() || apply_filters( 'autocomplete_users_for_site_admins', false ) ) +) { + wp_enqueue_script( 'user-suggest' ); +} + +require_once( ABSPATH . 'wp-admin/admin-header.php' ); + +if ( isset($_GET['update']) ) { + $messages = array(); + if ( is_multisite() ) { + switch ( $_GET['update'] ) { + case "newuserconfirmation": + $messages[] = __('Invitation email sent to new user. A confirmation link must be clicked before their account is created.'); + break; + case "add": + $messages[] = __('Invitation email sent to user. A confirmation link must be clicked for them to be added to your site.'); + break; + case "addnoconfirmation": + $messages[] = __('User has been added to your site.'); + break; + case "addexisting": + $messages[] = __('That user is already a member of this site.'); + break; + case "does_not_exist": + $messages[] = __('The requested user does not exist.'); + break; + case "enter_email": + $messages[] = __('Please enter a valid email address.'); + break; + } + } else { + if ( 'add' == $_GET['update'] ) + $messages[] = __('User added.'); + } +} +?> +
    +

    +

    + + +
    +
      + get_error_messages() as $err ) + echo "
    • $err
    • \n"; + ?> +
    +
    +

    ' . $msg . '

    '; +} ?> + + +
    + get_error_messages() as $message ) + echo "

    $message

    "; + ?> +
    + +
    + +' . __('Add Existing User') . ''; + if ( !is_super_admin() ) { + _e( 'Enter the email address of an existing user on this network to invite them to this site. That person will be sent an email asking them to confirm the invite.' ); + $label = __('E-mail'); + } else { + _e( 'Enter the email address or username of an existing user on this network to invite them to this site. That person will be sent an email asking them to confirm the invite.' ); + $label = __('E-mail or Username'); + } +?> + +
    > + + + + + + + + + + + + + + + + + + +
    +
    + + 'addusersub' ) ); ?> +
    +' . __( 'Add New User' ) . ''; +?> +

    + +
    > + + + 'login', 'first_name' => 'firstname', 'last_name' => 'lastname', + 'email' => 'email', 'url' => 'uri', 'role' => 'role', 'send_password' => 'send_password', 'noconfirmation' => 'ignore_pass' ) as $post_field => $var ) { + $var = "new_user_$var"; + if( isset( $_POST['createuser'] ) ) { + if ( ! isset($$var) ) + $$var = isset( $_POST[$post_field] ) ? wp_unslash( $_POST[$post_field] ) : ''; + } else { + $$var = false; + } +} + +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +
    + +
    +
    +

    +
    +
    + + + + 'createusersub' ) ); ?> + +
    + + +domain != $current_site->domain ) || ( $current_blog->path != $current_site->path ) ); +/** + * Filter whether to redirect the request to the User Admin in Multisite. + * + * @since 3.2.0 + * + * @param bool $redirect_user_admin_request Whether the request should be redirected. + */ +$redirect_user_admin_request = apply_filters( 'redirect_user_admin_request', $redirect_user_admin_request ); +if ( $redirect_user_admin_request ) { + wp_redirect( user_admin_url() ); + exit; +} +unset( $redirect_user_admin_request ); diff --git a/wp-admin/user/credits.php b/wp-admin/user/credits.php new file mode 100644 index 0000000..2b4021a --- /dev/null +++ b/wp-admin/user/credits.php @@ -0,0 +1,13 @@ +get_pagenum(); +$title = __('Users'); +$parent_file = 'users.php'; + +add_screen_option( 'per_page', array('label' => _x( 'Users', 'users per page (screen options)' )) ); + +// contextual help - choose Help on the top right of admin panel to preview this. +get_current_screen()->add_help_tab( array( + 'id' => 'overview', + 'title' => __('Overview'), + 'content' => '

    ' . __('This screen lists all the existing users for your site. Each user has one of five defined roles as set by the site admin: Site Administrator, Editor, Author, Contributor, or Subscriber. Users with roles other than Administrator will see fewer options in the dashboard navigation when they are logged in, based on their role.') . '

    ' . + '

    ' . __('To add a new user for your site, click the Add New button at the top of the screen or Add New in the Users menu section.') . '

    ' +) ) ; + +get_current_screen()->add_help_tab( array( + 'id' => 'screen-display', + 'title' => __('Screen Display'), + 'content' => '

    ' . __('You can customize the display of this screen in a number of ways:') . '

    ' . + '
      ' . + '
    • ' . __('You can hide/display columns based on your needs and decide how many users to list per screen using the Screen Options tab.') . '
    • ' . + '
    • ' . __('You can filter the list of users by User Role using the text links in the upper left to show All, Administrator, Editor, Author, Contributor, or Subscriber. The default view is to show all users. Unused User Roles are not listed.') . '
    • ' . + '
    • ' . __('You can view all posts made by a user by clicking on the number under the Posts column.') . '
    • ' . + '
    ' +) ); + +$help = '

    ' . __('Hovering over a row in the users list will display action links that allow you to manage users. You can perform the following actions:') . '

    ' . + '
      ' . + '
    • ' . __('Edit takes you to the editable profile screen for that user. You can also reach that screen by clicking on the username.') . '
    • '; + +if ( is_multisite() ) + $help .= '
    • ' . __( 'Remove allows you to remove a user from your site. It does not delete their content. You can also remove multiple users at once by using Bulk Actions.' ) . '
    • '; +else + $help .= '
    • ' . __( 'Delete brings you to the Delete Users screen for confirmation, where you can permanently remove a user from your site and delete their content. You can also delete multiple users at once by using Bulk Actions.' ) . '
    • '; + +$help .= '
    '; + +get_current_screen()->add_help_tab( array( + 'id' => 'actions', + 'title' => __('Actions'), + 'content' => $help, +) ); +unset( $help ); + +get_current_screen()->set_help_sidebar( + '

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

    ' . + '

    ' . __('Documentation on Managing Users') . '

    ' . + '

    ' . __('Descriptions of Roles and Capabilities') . '

    ' . + '

    ' . __('Support Forums') . '

    ' +); + +if ( empty($_REQUEST) ) { + $referer = ''; +} elseif ( isset($_REQUEST['wp_http_referer']) ) { + $redirect = remove_query_arg(array('wp_http_referer', 'updated', 'delete_count'), wp_unslash( $_REQUEST['wp_http_referer'] ) ); + $referer = ''; +} else { + $redirect = 'users.php'; + $referer = ''; +} + +$update = ''; + +/** + * @since 3.5.0 + * @access private + */ +function delete_users_add_js() { ?> + +current_action() ) { + +/* Bulk Dropdown menu Role changes */ +case 'promote': + check_admin_referer('bulk-users'); + + if ( ! current_user_can( 'promote_users' ) ) + wp_die( __( 'You can’t edit that user.' ) ); + + if ( empty($_REQUEST['users']) ) { + wp_redirect($redirect); + exit(); + } + + $editable_roles = get_editable_roles(); + if ( empty( $editable_roles[$_REQUEST['new_role']] ) ) + wp_die(__('You can’t give users that role.')); + + $userids = $_REQUEST['users']; + $update = 'promote'; + foreach ( $userids as $id ) { + $id = (int) $id; + + if ( ! current_user_can('promote_user', $id) ) + wp_die(__('You can’t edit that user.')); + // The new role of the current user must also have the promote_users cap or be a multisite super admin + if ( $id == $current_user->ID && ! $wp_roles->role_objects[ $_REQUEST['new_role'] ]->has_cap('promote_users') + && ! ( is_multisite() && is_super_admin() ) ) { + $update = 'err_admin_role'; + continue; + } + + // If the user doesn't already belong to the blog, bail. + if ( is_multisite() && !is_user_member_of_blog( $id ) ) + wp_die(__('Cheatin’ uh?')); + + $user = get_userdata( $id ); + $user->set_role($_REQUEST['new_role']); + } + + wp_redirect(add_query_arg('update', $update, $redirect)); + exit(); + +break; + +case 'dodelete': + if ( is_multisite() ) + wp_die( __('User deletion is not allowed from this screen.') ); + + check_admin_referer('delete-users'); + + if ( empty($_REQUEST['users']) ) { + wp_redirect($redirect); + exit(); + } + + $userids = array_map( 'intval', (array) $_REQUEST['users'] ); + + if ( empty( $_REQUEST['delete_option'] ) ) { + $url = self_admin_url( 'users.php?action=delete&users[]=' . implode( '&users[]=', $userids ) . '&error=true' ); + $url = str_replace( '&', '&', wp_nonce_url( $url, 'bulk-users' ) ); + wp_redirect( $url ); + exit; + } + + if ( ! current_user_can( 'delete_users' ) ) + wp_die(__('You can’t delete users.')); + + $update = 'del'; + $delete_count = 0; + + foreach ( $userids as $id ) { + if ( ! current_user_can( 'delete_user', $id ) ) + wp_die(__( 'You can’t delete that user.' ) ); + + if ( $id == $current_user->ID ) { + $update = 'err_admin_del'; + continue; + } + switch ( $_REQUEST['delete_option'] ) { + case 'delete': + wp_delete_user( $id ); + break; + case 'reassign': + wp_delete_user( $id, $_REQUEST['reassign_user'] ); + break; + } + ++$delete_count; + } + + $redirect = add_query_arg( array('delete_count' => $delete_count, 'update' => $update), $redirect); + wp_redirect($redirect); + exit(); + +break; + +case 'delete': + if ( is_multisite() ) + wp_die( __('User deletion is not allowed from this screen.') ); + + check_admin_referer('bulk-users'); + + if ( empty($_REQUEST['users']) && empty($_REQUEST['user']) ) { + wp_redirect($redirect); + exit(); + } + + if ( ! current_user_can( 'delete_users' ) ) + $errors = new WP_Error( 'edit_users', __( 'You can’t delete users.' ) ); + + if ( empty($_REQUEST['users']) ) + $userids = array( intval( $_REQUEST['user'] ) ); + else + $userids = array_map( 'intval', (array) $_REQUEST['users'] ); + + add_action( 'admin_head', 'delete_users_add_js' ); + + include( ABSPATH . 'wp-admin/admin-header.php' ); +?> +
    + + + +
    +

    + +
    +

    +
    + +

    +
      +ID ) { + echo "
    • " . sprintf(__('ID #%1$s: %2$s The current user will not be deleted.'), $id, $user->user_login) . "
    • \n"; + } else { + echo "
    • " . sprintf(__('ID #%1$s: %2$s'), $id, $user->user_login) . "
    • \n"; + $go_delete++; + } + } + ?> +
    + +

    +
      +
    • +
    • + ' . __( 'Attribute all content to:' ) . ' '; + wp_dropdown_users( array( 'name' => 'reassign_user', 'exclude' => array_diff( $userids, array($current_user->ID) ) ) ); ?>
    • +
    + + + +

    + +
    +
    +ID && !is_super_admin() ) { + $update = 'err_admin_remove'; + continue; + } + if ( !current_user_can('remove_user', $id) ) { + $update = 'err_admin_remove'; + continue; + } + remove_user_from_blog($id, $blog_id); + } + + $redirect = add_query_arg( array('update' => $update), $redirect); + wp_redirect($redirect); + exit; + +break; + +case 'remove': + + check_admin_referer('bulk-users'); + + if ( ! is_multisite() ) + wp_die( __( 'You can’t remove users.' ) ); + + if ( empty($_REQUEST['users']) && empty($_REQUEST['user']) ) { + wp_redirect($redirect); + exit(); + } + + if ( !current_user_can('remove_users') ) + $error = new WP_Error('edit_users', __('You can’t remove users.')); + + if ( empty($_REQUEST['users']) ) + $userids = array(intval($_REQUEST['user'])); + else + $userids = $_REQUEST['users']; + + include( ABSPATH . 'wp-admin/admin-header.php' ); +?> +
    + + + +
    +

    +

    +
      +ID && !is_super_admin() ) { + echo "
    • " . sprintf(__('ID #%1$s: %2$s The current user will not be removed.'), $id, $user->user_login) . "
    • \n"; + } elseif ( !current_user_can('remove_user', $id) ) { + echo "
    • " . sprintf(__('ID #%1$s: %2$s You don\'t have permission to remove this user.'), $id, $user->user_login) . "
    • \n"; + } else { + echo "
    • " . sprintf(__('ID #%1$s: %2$s'), $id, $user->user_login) . "
    • \n"; + $go_remove = true; + } + } + ?> + + + + +

      + +
    +
    +prepare_items(); + $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' ); + if ( $pagenum > $total_pages && $total_pages > 0 ) { + wp_redirect( add_query_arg( 'paged', $total_pages ) ); + exit; + } + + include( ABSPATH . 'wp-admin/admin-header.php' ); + + $messages = array(); + if ( isset($_GET['update']) ) : + switch($_GET['update']) { + case 'del': + case 'del_many': + $delete_count = isset($_GET['delete_count']) ? (int) $_GET['delete_count'] : 0; + $messages[] = '

    ' . sprintf( _n( 'User deleted.', '%s users deleted.', $delete_count ), number_format_i18n( $delete_count ) ) . '

    '; + break; + case 'add': + if ( isset( $_GET['id'] ) && ( $user_id = $_GET['id'] ) && current_user_can( 'edit_user', $user_id ) ) { + $messages[] = '

    ' . sprintf( __( 'New user created. Edit user' ), + esc_url( add_query_arg( 'wp_http_referer', urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ), + self_admin_url( 'user-edit.php?user_id=' . $user_id ) ) ) ) . '

    '; + } else { + $messages[] = '

    ' . __( 'New user created.' ) . '

    '; + } + break; + case 'promote': + $messages[] = '

    ' . __('Changed roles.') . '

    '; + break; + case 'err_admin_role': + $messages[] = '

    ' . __('The current user’s role must have user editing capabilities.') . '

    '; + $messages[] = '

    ' . __('Other user roles have been changed.') . '

    '; + break; + case 'err_admin_del': + $messages[] = '

    ' . __('You can’t delete the current user.') . '

    '; + $messages[] = '

    ' . __('Other users have been deleted.') . '

    '; + break; + case 'remove': + $messages[] = '

    ' . __('User removed from this site.') . '

    '; + break; + case 'err_admin_remove': + $messages[] = '

    ' . __("You can't remove the current user.") . '

    '; + $messages[] = '

    ' . __('Other users have been removed.') . '

    '; + break; + } + endif; ?> + + +
    +
      + get_error_messages() as $err ) + echo "
    • $err
    • \n"; + ?> +
    +
    + + +
    +

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

    + +views(); ?> + +
    + +search_box( __( 'Search Users' ), 'user' ); ?> + +display(); ?> +
    + +
    +
    +add_help_tab( array( +'id' => 'overview', +'title' => __('Overview'), +'content' => + '

    ' . __('Widgets are independent sections of content that can be placed into any widgetized area provided by your theme (commonly called sidebars). To populate your sidebars/widget areas with individual widgets, drag and drop the title bars into the desired area. By default, only the first widget area is expanded. To populate additional widget areas, click on their title bars to expand them.') . '

    +

    ' . __('The Available Widgets section contains all the widgets you can choose from. Once you drag a widget into a sidebar, it will open to allow you to configure its settings. When you are happy with the widget settings, click the Save button and the widget will go live on your site. If you click Delete, it will remove the widget.') . '

    ' +) ); +get_current_screen()->add_help_tab( array( +'id' => 'removing-reusing', +'title' => __('Removing and Reusing'), +'content' => + '

    ' . __('If you want to remove the widget but save its setting for possible future use, just drag it into the Inactive Widgets area. You can add them back anytime from there. This is especially helpful when you switch to a theme with fewer or different widget areas.') . '

    +

    ' . __('Widgets may be used multiple times. You can give each widget a title, to display on your site, but it’s not required.') . '

    +

    ' . __('Enabling Accessibility Mode, via Screen Options, allows you to use Add and Edit buttons instead of using drag and drop.') . '

    ' +) ); +get_current_screen()->add_help_tab( array( +'id' => 'missing-widgets', +'title' => __('Missing Widgets'), +'content' => + '

    ' . __('Many themes show some sidebar widgets by default until you edit your sidebars, but they are not automatically displayed in your sidebar management tool. After you make your first widget change, you can re-add the default widgets by adding them from the Available Widgets area.') . '

    ' . + '

    ' . __('When changing themes, there is often some variation in the number and setup of widget areas/sidebars and sometimes these conflicts make the transition a bit less smooth. If you changed themes and seem to be missing widgets, scroll down on this screen to the Inactive Widgets area, where all of your widgets and their settings will have been saved.') . '

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

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

    ' . + '

    ' . __('Documentation on Widgets') . '

    ' . + '

    ' . __('Support Forums') . '

    ' +); + +if ( ! current_theme_supports( 'widgets' ) ) { + wp_die( __( 'The theme you are currently using isn’t widget-aware, meaning that it has no sidebars that you are able to change. For information on making your theme widget-aware, please follow these instructions.' ) ); +} + +// These are the widgets grouped by sidebar +$sidebars_widgets = wp_get_sidebars_widgets(); + +if ( empty( $sidebars_widgets ) ) + $sidebars_widgets = wp_get_widget_defaults(); + +foreach ( $sidebars_widgets as $sidebar_id => $widgets ) { + if ( 'wp_inactive_widgets' == $sidebar_id ) + continue; + + if ( !isset( $wp_registered_sidebars[ $sidebar_id ] ) ) { + if ( ! empty( $widgets ) ) { // register the inactive_widgets area as sidebar + register_sidebar(array( + 'name' => __( 'Inactive Sidebar (not used)' ), + 'id' => $sidebar_id, + 'class' => 'inactive-sidebar orphan-sidebar', + 'description' => __( 'This sidebar is no longer available and does not show anywhere on your site. Remove each of the widgets below to fully remove this inactive sidebar.' ), + 'before_widget' => '', + 'after_widget' => '', + 'before_title' => '', + 'after_title' => '', + )); + } else { + unset( $sidebars_widgets[ $sidebar_id ] ); + } + } +} + +// register the inactive_widgets area as sidebar +register_sidebar(array( + 'name' => __('Inactive Widgets'), + 'id' => 'wp_inactive_widgets', + 'class' => 'inactive-sidebar', + 'description' => __( 'Drag widgets here to remove them from the sidebar but keep their settings.' ), + 'before_widget' => '', + 'after_widget' => '', + 'before_title' => '', + 'after_title' => '', +)); + +retrieve_widgets(); + +// We're saving a widget without js +if ( isset($_POST['savewidget']) || isset($_POST['removewidget']) ) { + $widget_id = $_POST['widget-id']; + check_admin_referer("save-delete-widget-$widget_id"); + + $number = isset($_POST['multi_number']) ? (int) $_POST['multi_number'] : ''; + if ( $number ) { + foreach ( $_POST as $key => $val ) { + if ( is_array($val) && preg_match('/__i__|%i%/', key($val)) ) { + $_POST[$key] = array( $number => array_shift($val) ); + break; + } + } + } + + $sidebar_id = $_POST['sidebar']; + $position = isset($_POST[$sidebar_id . '_position']) ? (int) $_POST[$sidebar_id . '_position'] - 1 : 0; + + $id_base = $_POST['id_base']; + $sidebar = isset($sidebars_widgets[$sidebar_id]) ? $sidebars_widgets[$sidebar_id] : array(); + + // delete + if ( isset($_POST['removewidget']) && $_POST['removewidget'] ) { + + if ( !in_array($widget_id, $sidebar, true) ) { + wp_redirect( admin_url('widgets.php?error=0') ); + exit; + } + + $sidebar = array_diff( $sidebar, array($widget_id) ); + $_POST = array('sidebar' => $sidebar_id, 'widget-' . $id_base => array(), 'the-widget-id' => $widget_id, 'delete_widget' => '1'); + } + + $_POST['widget-id'] = $sidebar; + + foreach ( (array) $wp_registered_widget_updates as $name => $control ) { + if ( $name != $id_base || !is_callable($control['callback']) ) + continue; + + ob_start(); + call_user_func_array( $control['callback'], $control['params'] ); + ob_end_clean(); + + break; + } + + $sidebars_widgets[$sidebar_id] = $sidebar; + + // remove old position + if ( !isset($_POST['delete_widget']) ) { + foreach ( $sidebars_widgets as $key => $sb ) { + if ( is_array($sb) ) + $sidebars_widgets[$key] = array_diff( $sb, array($widget_id) ); + } + array_splice( $sidebars_widgets[$sidebar_id], $position, 0, $widget_id ); + } + + wp_set_sidebars_widgets($sidebars_widgets); + wp_redirect( admin_url('widgets.php?message=0') ); + exit; +} + +// Output the widget form without js +if ( isset($_GET['editwidget']) && $_GET['editwidget'] ) { + $widget_id = $_GET['editwidget']; + + if ( isset($_GET['addnew']) ) { + // Default to the first sidebar + $keys = array_keys( $wp_registered_sidebars ); + $sidebar = array_shift( $keys ); + + if ( isset($_GET['base']) && isset($_GET['num']) ) { // multi-widget + // Copy minimal info from an existing instance of this widget to a new instance + foreach ( $wp_registered_widget_controls as $control ) { + if ( $_GET['base'] === $control['id_base'] ) { + $control_callback = $control['callback']; + $multi_number = (int) $_GET['num']; + $control['params'][0]['number'] = -1; + $widget_id = $control['id'] = $control['id_base'] . '-' . $multi_number; + $wp_registered_widget_controls[$control['id']] = $control; + break; + } + } + } + } + + if ( isset($wp_registered_widget_controls[$widget_id]) && !isset($control) ) { + $control = $wp_registered_widget_controls[$widget_id]; + $control_callback = $control['callback']; + } elseif ( !isset($wp_registered_widget_controls[$widget_id]) && isset($wp_registered_widgets[$widget_id]) ) { + $name = esc_html( strip_tags($wp_registered_widgets[$widget_id]['name']) ); + } + + if ( !isset($name) ) + $name = esc_html( strip_tags($control['name']) ); + + if ( !isset($sidebar) ) + $sidebar = isset($_GET['sidebar']) ? $_GET['sidebar'] : 'wp_inactive_widgets'; + + if ( !isset($multi_number) ) + $multi_number = isset($control['params'][0]['number']) ? $control['params'][0]['number'] : ''; + + $id_base = isset($control['id_base']) ? $control['id_base'] : $control['id']; + + // show the widget form + $width = ' style="width:' . max($control['width'], 350) . 'px"'; + $key = isset($_GET['key']) ? (int) $_GET['key'] : 0; + + require_once( ABSPATH . 'wp-admin/admin-header.php' ); ?> +
    +

    +
    > +

    + +
    +
    +' . __('There are no options for this widget.') . "

    \n"; ?> +
    + +

    +
    + + $sbvalue ) { + echo "\t\t\n"; + } ?> +
    "; + if ( 'wp_inactive_widgets' == $sbname || 'orphaned_widgets' == substr( $sbname, 0, 16 ) ) { + echo ' '; + } else { + if ( !isset($sidebars_widgets[$sbname]) || !is_array($sidebars_widgets[$sbname]) ) { + $j = 1; + $sidebars_widgets[$sbname] = array(); + } else { + $j = count($sidebars_widgets[$sbname]); + if ( isset($_GET['addnew']) || !in_array($widget_id, $sidebars_widgets[$sbname], true) ) + $j++; + } + $selected = ''; + echo "\t\t\n"; + } + echo "
    +
    + +
    + + + + + + + +
    +
    +
    +
    +
    + + +
    +

    + + +

    + + +

    + + + + +
    +
    +
    + +
    + +
    + +
    +
    +
    +
    +
    + + $registered_sidebar ) { + if ( false !== strpos( $registered_sidebar['class'], 'inactive-sidebar' ) || 'orphaned_widgets' == substr( $sidebar, 0, 16 ) ) { + $wrap_class = 'widgets-holder-wrap'; + if ( !empty( $registered_sidebar['class'] ) ) + $wrap_class .= ' ' . $registered_sidebar['class']; + + ?> +
    +
    + +
    +
    +
    + +
    +
    + 1 ) { + $split = ceil( $sidebars_count / 2 ); +} else { + $single_sidebar_class = ' class="single-sidebar"'; +} + +?> +
    +
    > + +
    +
    +
    + +
    +
    +
    + +
    +
      +
      + + +
      +
      + +comment_status ) ) { + /** + * Fires when a comment is attempted on a post that does not exist. + * + * @since 1.5.0 + * + * @param int $comment_post_ID Post ID. + */ + do_action( 'comment_id_not_found', $comment_post_ID ); + exit; +} + +// get_post_status() will get the parent status for attachments. +$status = get_post_status($post); + +$status_obj = get_post_status_object($status); + +if ( ! comments_open( $comment_post_ID ) ) { + /** + * Fires when a comment is attempted on a post that has comments closed. + * + * @since 1.5.0 + * + * @param int $comment_post_ID Post ID. + */ + do_action( 'comment_closed', $comment_post_ID ); + wp_die( __('Sorry, comments are closed for this item.') ); +} elseif ( 'trash' == $status ) { + /** + * Fires when a comment is attempted on a trashed post. + * + * @since 2.9.0 + * + * @param int $comment_post_ID Post ID. + */ + do_action( 'comment_on_trash', $comment_post_ID ); + exit; +} elseif ( ! $status_obj->public && ! $status_obj->private ) { + /** + * Fires when a comment is attempted on a post in draft mode. + * + * @since 1.5.1 + * + * @param int $comment_post_ID Post ID. + */ + do_action( 'comment_on_draft', $comment_post_ID ); + exit; +} elseif ( post_password_required( $comment_post_ID ) ) { + /** + * Fires when a comment is attempted on a password-protected post. + * + * @since 2.9.0 + * + * @param int $comment_post_ID Post ID. + */ + do_action( 'comment_on_password_protected', $comment_post_ID ); + exit; +} else { + /** + * Fires before a comment is posted. + * + * @since 2.8.0 + * + * @param int $comment_post_ID Post ID. + */ + do_action( 'pre_comment_on_post', $comment_post_ID ); +} + +$comment_author = ( isset($_POST['author']) ) ? trim(strip_tags($_POST['author'])) : null; +$comment_author_email = ( isset($_POST['email']) ) ? trim($_POST['email']) : null; +$comment_author_url = ( isset($_POST['url']) ) ? trim($_POST['url']) : null; +$comment_content = ( isset($_POST['comment']) ) ? trim($_POST['comment']) : null; + +// If the user is logged in +$user = wp_get_current_user(); +if ( $user->exists() ) { + if ( empty( $user->display_name ) ) + $user->display_name=$user->user_login; + $comment_author = wp_slash( $user->display_name ); + $comment_author_email = wp_slash( $user->user_email ); + $comment_author_url = wp_slash( $user->user_url ); + if ( current_user_can( 'unfiltered_html' ) ) { + if ( ! isset( $_POST['_wp_unfiltered_html_comment'] ) + || ! wp_verify_nonce( $_POST['_wp_unfiltered_html_comment'], 'unfiltered-html-comment_' . $comment_post_ID ) + ) { + kses_remove_filters(); // start with a clean slate + kses_init_filters(); // set up the filters + } + } +} else { + if ( get_option('comment_registration') || 'private' == $status ) + wp_die( __('Sorry, you must be logged in to post a comment.') ); +} + +$comment_type = ''; + +if ( get_option('require_name_email') && !$user->exists() ) { + if ( 6 > strlen($comment_author_email) || '' == $comment_author ) + wp_die( __('ERROR: please fill the required fields (name, email).') ); + elseif ( !is_email($comment_author_email)) + wp_die( __('ERROR: please enter a valid email address.') ); +} + +if ( '' == $comment_content ) + wp_die( __('ERROR: please type a comment.') ); + +$comment_parent = isset($_POST['comment_parent']) ? absint($_POST['comment_parent']) : 0; + +$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); + +/** + * Perform other actions when comment cookies are set. + * + * @since 3.4.0 + * + * @param object $comment Comment object. + * @param WP_User $user User object. The user may not exist. + */ +do_action( 'set_comment_cookies', $comment, $user ); + +$location = empty($_POST['redirect_to']) ? get_comment_link($comment_id) : $_POST['redirect_to'] . '#comment-' . $comment_id; + +/** + * Filter the location URI to send the commenter after posting. + * + * @since 2.0.5 + * + * @param string $location The 'redirect_to' URI sent via $_POST. + * @param object $comment Comment object. + */ +$location = apply_filters( 'comment_post_redirect', $location, $comment ); + +wp_safe_redirect( $location ); +exit; diff --git a/wp-config-sample.php b/wp-config-sample.php new file mode 100644 index 0000000..5a6acc6 --- /dev/null +++ b/wp-config-sample.php @@ -0,0 +1,90 @@ +x' ) + .attr( 'commentid', thisCommentId[1] ) + .attr( 'title', WPAkismet.strings['Remove this URL'] ) + ); + } + }); + $('.remove_url').live('click', function () { + var thisId = $(this).attr('commentid'); + var data = { + action: 'comment_author_deurl', + _wpnonce: WPAkismet.comment_author_url_nonce, + id: thisId + }; + $.ajax({ + url: ajaxurl, + type: 'POST', + data: data, + beforeSend: function () { + // Removes "x" link + $("a[commentid='"+ thisId +"']").hide(); + // Show temp status + $("#author_comment_url_"+ thisId).html( $( '' ).text( WPAkismet.strings['Removing...'] ) ); + }, + success: function (response) { + if (response) { + // Show status/undo link + $("#author_comment_url_"+ thisId) + .attr('cid', thisId) + .addClass('akismet_undo_link_removal') + .html( + $( '' ).text( WPAkismet.strings['URL removed'] ) + ) + .append( ' ' ) + .append( + $( '' ) + .text( WPAkismet.strings['(undo)'] ) + .addClass( 'akismet-span-link' ) + ); + } + } + }); + + return false; + }); + $('.akismet_undo_link_removal').live('click', function () { + var thisId = $(this).attr('cid'); + var thisUrl = $(this).attr('href').replace("http://www.", "").replace("http://", ""); + var data = { + action: 'comment_author_reurl', + _wpnonce: WPAkismet.comment_author_url_nonce, + id: thisId, + url: thisUrl + }; + $.ajax({ + url: ajaxurl, + type: 'POST', + data: data, + beforeSend: function () { + // Show temp status + $("#author_comment_url_"+ thisId).html( $( '' ).text( WPAkismet.strings['Re-adding...'] ) ); + }, + success: function (response) { + if (response) { + // Add "x" link + $("a[commentid='"+ thisId +"']").show(); + // Show link + $("#author_comment_url_"+ thisId).removeClass('akismet_undo_link_removal').html(thisUrl); + } + } + }); + + return false; + }); + $('a[id^="author_comment_url"], tr.pingback td.column-author a:first-of-type').mouseover(function () { + var wpcomProtocol = ( 'https:' === location.protocol ) ? 'https://' : 'http://'; + // Need to determine size of author column + var thisParentWidth = $(this).parent().width(); + // It changes based on if there is a gravatar present + thisParentWidth = ($(this).parent().find('.grav-hijack').length) ? thisParentWidth - 42 + 'px' : thisParentWidth + 'px'; + if ($(this).find('.mShot').length == 0 && !$(this).hasClass('akismet_undo_link_removal')) { + var self = $( this ); + $('.widefat td').css('overflow', 'visible'); + $(this).css('position', 'relative'); + var thisHref = $.URLEncode( $(this).attr('href') ); + $(this).append('
      '); + setTimeout(function () { + self.find( '.mshot-image' ).attr('src', '//s0.wordpress.com/mshots/v1/'+thisHref+'?w=450&r=2'); + }, 6000); + setTimeout(function () { + self.find( '.mshot-image' ).attr('src', '//s0.wordpress.com/mshots/v1/'+thisHref+'?w=450&r=3'); + }, 12000); + } else { + $(this).find('.mShot').css('left', thisParentWidth).show(); + } + }).mouseout(function () { + $(this).find('.mShot').hide(); + }); + $('.checkforspam:not(.button-disabled)').click( function(e) { + $('.checkforspam:not(.button-disabled)').addClass('button-disabled'); + $('.checkforspam-spinner').show(); + akismet_check_for_spam(0, 100); + e.preventDefault(); + }); + + function akismet_check_for_spam(offset, limit) { + $.post( + ajaxurl, + { + 'action': 'akismet_recheck_queue', + 'offset': offset, + 'limit': limit + }, + function(result) { + if (result.processed < limit) { + window.location.reload(); + } + else { + akismet_check_for_spam(offset + limit, limit); + } + } + ); + } +}); +// URL encode plugin +jQuery.extend({URLEncode:function(c){var o='';var x=0;c=c.toString();var r=/(^[a-zA-Z0-9_.]*)/; + while(x1 && m[1]!=''){o+=m[1];x+=m[1].length; + }else{if(c[x]==' ')o+='+';else{var d=c.charCodeAt(x);var h=d.toString(16); + o+='%'+(h.length<2?'0':'')+h.toUpperCase();}x++;}}return o;} +}); diff --git a/wp-content/plugins/akismet/_inc/form.js b/wp-content/plugins/akismet/_inc/form.js new file mode 100644 index 0000000..ec5e56e --- /dev/null +++ b/wp-content/plugins/akismet/_inc/form.js @@ -0,0 +1,17 @@ +jQuery( function ( $ ) { + var ak_js = $( '#ak_js' ); + + // If the form field already exists just use that + if ( ak_js.length == 0 ) { + ak_js = $( '' ); + } + else { + ak_js.remove(); + } + + ak_js.val( ( new Date() ).getTime() ); + + // single page, front-end comment form + // inline comment reply, wp-admin + $( '#commentform, #replyrow td:first' ).append( ak_js ); +} ); diff --git a/wp-content/plugins/akismet/_inc/img/logo-full-2x.png b/wp-content/plugins/akismet/_inc/img/logo-full-2x.png new file mode 100644 index 0000000..a9bed8b Binary files /dev/null and b/wp-content/plugins/akismet/_inc/img/logo-full-2x.png differ diff --git a/wp-content/plugins/akismet/akismet.php b/wp-content/plugins/akismet/akismet.php new file mode 100644 index 0000000..811ab71 --- /dev/null +++ b/wp-content/plugins/akismet/akismet.php @@ -0,0 +1,59 @@ +protect your blog from comment and trackback spam. It keeps your site protected from spam even while you sleep. To get started: 1) Click the "Activate" link to the left of this description, 2) Sign up for an Akismet API key, and 3) Go to your Akismet configuration page, and save your API key. +Version: 3.0.0 +Author: Automattic +Author URI: http://automattic.com/wordpress-plugins/ +License: GPLv2 or later +Text Domain: akismet +*/ + +/* +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. +*/ + +// Make sure we don't expose any info if called directly +if ( !function_exists( 'add_action' ) ) { + echo 'Hi there! I\'m just a plugin, not much I can do when called directly.'; + exit; +} + +define( 'AKISMET_VERSION', '3.0.0' ); +define( 'AKISMET__MINIMUM_WP_VERSION', '3.0' ); +define( 'AKISMET__PLUGIN_URL', plugin_dir_url( __FILE__ ) ); +define( 'AKISMET__PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); +define( 'AKISMET_DELETE_LIMIT', 100000 ); + +register_activation_hook( __FILE__, array( 'Akismet', 'plugin_activation' ) ); +register_deactivation_hook( __FILE__, array( 'Akismet', 'plugin_deactivation' ) ); + +require_once( AKISMET__PLUGIN_DIR . 'class.akismet.php' ); +require_once( AKISMET__PLUGIN_DIR . 'class.akismet-widget.php' ); + +add_action( 'init', array( 'Akismet', 'init' ) ); + +if ( is_admin() ) { + require_once( AKISMET__PLUGIN_DIR . 'class.akismet-admin.php' ); + add_action( 'init', array( 'Akismet_Admin', 'init' ) ); +} + +//add wrapper class around deprecated akismet functions that are referenced elsewhere +require_once( AKISMET__PLUGIN_DIR . 'wrapper.php' ); + diff --git a/wp-content/plugins/akismet/class.akismet-admin.php b/wp-content/plugins/akismet/class.akismet-admin.php new file mode 100644 index 0000000..15f5d47 --- /dev/null +++ b/wp-content/plugins/akismet/class.akismet-admin.php @@ -0,0 +1,964 @@ +'.__('Settings', 'akismet').''; + array_unshift( $links, $settings_link ); + return $links; + } + + public static function load_menu() { + if ( class_exists( 'Jetpack' ) ) + $hook = add_submenu_page( 'jetpack', __( 'Akismet' , 'akismet'), __( 'Akismet' , 'akismet'), 'manage_options', 'akismet-key-config', array( 'Akismet_Admin', 'display_page' ) ); + else + $hook = add_options_page( __('Akismet', 'akismet'), __('Akismet', 'akismet'), 'manage_options', 'akismet-key-config', array( 'Akismet_Admin', 'display_page' ) ); + + if ( version_compare( $GLOBALS['wp_version'], '3.3', '>=' ) ) { + add_action( "load-$hook", array( 'Akismet_Admin', 'admin_help' ) ); + } + } + + public static function load_resources() { + global $hook_suffix; + + if ( in_array( $hook_suffix, array( + 'index.php', # dashboard + 'edit-comments.php', + 'comment.php', + 'post.php', + 'settings_page_akismet-key-config', + 'jetpack_page_akismet-key-config', + ) ) ) { + wp_register_style( 'akismet.css', AKISMET__PLUGIN_URL . '_inc/akismet.css', array(), AKISMET_VERSION ); + wp_enqueue_style( 'akismet.css'); + + wp_register_script( 'akismet.js', AKISMET__PLUGIN_URL . '_inc/akismet.js', array('jquery','postbox'), AKISMET_VERSION ); + wp_enqueue_script( 'akismet.js' ); + wp_localize_script( 'akismet.js', 'WPAkismet', array( + 'comment_author_url_nonce' => wp_create_nonce( 'comment_author_url_nonce' ), + 'strings' => array( + 'Remove this URL' => __( 'Remove this URL' , 'akismet'), + 'Removing...' => __( 'Removing...' , 'akismet'), + 'URL removed' => __( 'URL removed' , 'akismet'), + '(undo)' => __( '(undo)' , 'akismet'), + 'Re-adding...' => __( 'Re-adding...' , 'akismet'), + ) + ) ); + } + } + + /** + * Add help to the Akismet page + * + * @return false if not the Akismet page + */ + public static function admin_help() { + $current_screen = get_current_screen(); + + // Screen Content + if ( current_user_can( 'manage_options' ) ) { + if ( !Akismet::get_api_key() || ( isset( $_GET['view'] ) && $_GET['view'] == 'start' ) ) { + //setup page + $current_screen->add_help_tab( + array( + 'id' => 'overview', + 'title' => __( 'Overview' , 'akismet'), + 'content' => + '

      ' . esc_html__( 'Akismet Setup' , 'akismet') . '

      ' . + '

      ' . esc_html__( 'Akismet filters out your comment and trackback spam for you, so you can focus on more important things.' , 'akismet') . '

      ' . + '

      ' . esc_html__( 'On this page, you are able to setup the Akismet plugin.' , 'akismet') . '

      ', + ) + ); + + $current_screen->add_help_tab( + array( + 'id' => 'setup-signup', + 'title' => __( 'New to Akismet' , 'akismet'), + 'content' => + '

      ' . esc_html__( 'Akismet Setup' , 'akismet') . '

      ' . + '

      ' . esc_html__( 'You need to enter an API key to activate the Akismet service on your site.' , 'akismet') . '

      ' . + '

      ' . sprintf( __( 'Signup for an account on %s to get an API Key.' , 'akismet'), 'Akismet.com' ) . '

      ', + ) + ); + + $current_screen->add_help_tab( + array( + 'id' => 'setup-manual', + 'title' => __( 'Enter an API Key' , 'akismet'), + 'content' => + '

      ' . esc_html__( 'Akismet Setup' , 'akismet') . '

      ' . + '

      ' . esc_html__( 'If you already have an API key' , 'akismet') . '

      ' . + '
        ' . + '
      1. ' . esc_html__( 'Copy and paste the API key into the text field.' , 'akismet') . '
      2. ' . + '
      3. ' . esc_html__( 'Click the Use this Key button.' , 'akismet') . '
      4. ' . + '
      ', + ) + ); + } + elseif ( isset( $_GET['view'] ) && $_GET['view'] == 'stats' ) { + //stats page + $current_screen->add_help_tab( + array( + 'id' => 'overview', + 'title' => __( 'Overview' , 'akismet'), + 'content' => + '

      ' . esc_html__( 'Akismet Stats' , 'akismet') . '

      ' . + '

      ' . esc_html__( 'Akismet filters out your comment and trackback spam for you, so you can focus on more important things.' , 'akismet') . '

      ' . + '

      ' . esc_html__( 'On this page, you are able to view stats on spam filtered on your site.' , 'akismet') . '

      ', + ) + ); + } + else { + //configuration page + $current_screen->add_help_tab( + array( + 'id' => 'overview', + 'title' => __( 'Overview' , 'akismet'), + 'content' => + '

      ' . esc_html__( 'Akismet Configuration' , 'akismet') . '

      ' . + '

      ' . esc_html__( 'Akismet filters out your comment and trackback spam for you, so you can focus on more important things.' , 'akismet') . '

      ' . + '

      ' . esc_html__( 'On this page, you are able to enter/remove an API key, view account information and view spam stats.' , 'akismet') . '

      ', + ) + ); + + $current_screen->add_help_tab( + array( + 'id' => 'settings', + 'title' => __( 'Settings' , 'akismet'), + 'content' => + '

      ' . esc_html__( 'Akismet Configuration' , 'akismet') . '

      ' . + '

      ' . esc_html__( 'API Key' , 'akismet') . ' - ' . esc_html__( 'Enter/remove an API key.' , 'akismet') . '

      ' . + '

      ' . esc_html__( 'Comments' , 'akismet') . ' - ' . esc_html__( 'Show the number of approved comments beside each comment author in the comments list page.' , 'akismet') . '

      ' . + '

      ' . esc_html__( 'Strictness' , 'akismet') . ' - ' . esc_html__( 'Choose to either discard the worst spam automatically or to always put all spam in spam folder.' , 'akismet') . '

      ', + ) + ); + + $current_screen->add_help_tab( + array( + 'id' => 'account', + 'title' => __( 'Account' , 'akismet'), + 'content' => + '

      ' . esc_html__( 'Akismet Configuration' , 'akismet') . '

      ' . + '

      ' . esc_html__( 'Subscription Type' , 'akismet') . ' - ' . esc_html__( 'The Akismet subscription plan' , 'akismet') . '

      ' . + '

      ' . esc_html__( 'Status' , 'akismet') . ' - ' . esc_html__( 'The subscription status - active, cancelled or suspended' , 'akismet') . '

      ', + ) + ); + } + } + + // Help Sidebar + $current_screen->set_help_sidebar( + '

      ' . esc_html__( 'For more information:' , 'akismet') . '

      ' . + '

      ' . esc_html__( 'Akismet FAQ' , 'akismet') . '

      ' . + '

      ' . esc_html__( 'Akismet Support' , 'akismet') . '

      ' + ); + } + + public static function enter_api_key() { + if ( function_exists('current_user_can') && !current_user_can('manage_options') ) + die(__('Cheatin’ uh?', 'akismet')); + + if ( !wp_verify_nonce( $_POST['_wpnonce'], self::NONCE ) ) + return false; + + foreach( array( 'akismet_strictness', 'akismet_show_user_comments_approved' ) as $option ) { + update_option( $option, isset( $_POST[$option] ) && (int) $_POST[$option] == 1 ? '1' : '0' ); + } + + if ( defined( 'WPCOM_API_KEY' ) ) + return false; //shouldn't have option to save key if already defined + + $new_key = preg_replace( '/[^a-h0-9]/i', '', $_POST['key'] ); + $old_key = Akismet::get_api_key(); + + if ( empty( $new_key ) ) { + if ( !empty( $old_key ) ) { + delete_option( 'wordpress_api_key' ); + self::$notices[] = 'new-key-empty'; + } + } + elseif ( $new_key != $old_key ) { + self::save_key( $new_key ); + } + + return true; + } + + public static function save_key( $api_key ) { + $key_status = Akismet::verify_key( $api_key ); + + if ( $key_status == 'valid' ) { + $akismet_user = self::get_akismet_user( $api_key ); + + if ( $akismet_user ) { + if ( in_array( $akismet_user->status, array( 'active', 'active-dunning', 'no-sub' ) ) ) + update_option( 'wordpress_api_key', $api_key ); + + if ( $akismet_user->status == 'active' ) + self::$notices['status'] = 'new-key-valid'; + else + self::$notices['status'] = $akismet_user->status; + } + else + self::$notices['status'] = 'new-key-invalid'; + } + elseif ( in_array( $key_status, array( 'invalid', 'failed' ) ) ) + self::$notices['status'] = 'new-key-'.$key_status; + } + + public static function dashboard_stats() { + if ( !function_exists('did_action') || did_action( 'rightnow_end' ) ) + return; // We already displayed this info in the "Right Now" section + + if ( !$count = get_option('akismet_spam_count') ) + return; + + global $submenu; + + echo '

      ' . esc_html( _x( 'Spam', 'comments' , 'akismet') ) . '

      '; + + echo '

      '.sprintf( _n( + 'Akismet has protected your site from %3$s spam comment.', + 'Akismet has protected your site from %3$s spam comments.', + $count + , 'akismet'), 'https://akismet.com/wordpress/', esc_url( add_query_arg( array( 'page' => 'akismet-admin' ), admin_url( isset( $submenu['edit-comments.php'] ) ? 'edit-comments.php' : 'edit.php' ) ) ), number_format_i18n($count) ).'

      '; + } + + // WP 2.5+ + public static function rightnow_stats() { + global $submenu, $wp_db_version; + + if ( 8645 < $wp_db_version ) // 2.7 + $link = add_query_arg( array( 'comment_status' => 'spam' ), admin_url( 'edit-comments.php' ) ); + elseif ( isset( $submenu['edit-comments.php'] ) ) + $link = add_query_arg( array( 'page' => 'akismet-admin' ), admin_url( 'edit-comments.php' ) ); + else + $link = add_query_arg( array( 'page' => 'akismet-admin' ), admin_url( 'edit.php' ) ); + + if ( $count = get_option('akismet_spam_count') ) { + $intro = sprintf( _n( + 'Akismet has protected your site from %2$s spam comment already. ', + 'Akismet has protected your site from %2$s spam comments already. ', + $count + , 'akismet'), 'https://akismet.com/wordpress/', number_format_i18n( $count ) ); + } else { + $intro = sprintf( __('Akismet blocks spam from getting to your blog. ', 'akismet'), 'https://akismet.com/wordpress/' ); + } + + $link = function_exists( 'esc_url' ) ? esc_url( $link ) : clean_url( $link ); + if ( $queue_count = self::get_spam_count() ) { + $queue_text = sprintf( _n( + 'There’s %1$s comment in your spam queue right now.', + 'There are %1$s comments in your spam queue right now.', + $queue_count + , 'akismet'), number_format_i18n( $queue_count ), $link ); + } else { + $queue_text = sprintf( __( "There’s nothing in your spam queue at the moment." , 'akismet'), $link ); + } + + $text = $intro . '
      ' . $queue_text; + echo "

      $text

      \n"; + } + + public static function check_for_spam_button( $comment_status ) { + if ( 'approved' == $comment_status ) + return; + + if ( function_exists('plugins_url') ) + $link = add_query_arg( array( 'action' => 'akismet_recheck_queue' ), admin_url( 'admin.php' ) ); + else + $link = add_query_arg( array( 'page' => 'akismet-admin', 'recheckqueue' => 'true', 'noheader' => 'true' ), admin_url( 'edit-comments.php' ) ); + + echo '
      ' . esc_html__('Check for Spam', 'akismet') . ''; + echo ''; + } + + public static function transition_comment_status( $new_status, $old_status, $comment ) { + if ( $new_status == $old_status ) + return; + + # we don't need to record a history item for deleted comments + if ( $new_status == 'delete' ) + return; + + if ( !is_admin() ) + return; + + if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) && !current_user_can( 'moderate_comments' ) ) + return; + + if ( defined('WP_IMPORTING') && WP_IMPORTING == true ) + return; + + // if this is present, it means the status has been changed by a re-check, not an explicit user action + if ( get_comment_meta( $comment->comment_ID, 'akismet_rechecking' ) ) + return; + + global $current_user; + $reporter = ''; + if ( is_object( $current_user ) ) + $reporter = $current_user->user_login; + + // Assumption alert: + // We want to submit comments to Akismet only when a moderator explicitly spams or approves it - not if the status + // is changed automatically by another plugin. Unfortunately WordPress doesn't provide an unambiguous way to + // determine why the transition_comment_status action was triggered. And there are several different ways by which + // to spam and unspam comments: bulk actions, ajax, links in moderation emails, the dashboard, and perhaps others. + // We'll assume that this is an explicit user action if POST or GET has an 'action' key. + if ( isset($_POST['action']) || isset($_GET['action']) ) { + if ( $new_status == 'spam' && ( $old_status == 'approved' || $old_status == 'unapproved' || !$old_status ) ) { + return self::submit_spam_comment( $comment->comment_ID ); + } elseif ( $old_status == 'spam' && ( $new_status == 'approved' || $new_status == 'unapproved' ) ) { + return self::submit_nonspam_comment( $comment->comment_ID ); + } + } + + Akismet::update_comment_history( $comment->comment_ID, sprintf( __('%1$s changed the comment status to %2$s', 'akismet'), $reporter, $new_status ), 'status-' . $new_status ); + } + + public static function recheck_queue() { + global $wpdb; + + Akismet::fix_scheduled_recheck(); + + if ( ! ( isset( $_GET['recheckqueue'] ) || ( isset( $_REQUEST['action'] ) && 'akismet_recheck_queue' == $_REQUEST['action'] ) ) ) + return; + + $paginate = ''; + if ( isset( $_POST['limit'] ) && isset( $_POST['offset'] ) ) { + $paginate = $wpdb->prepare( " LIMIT %d OFFSET %d", array( $_POST['limit'], $_POST['offset'] ) ); + } + $moderation = $wpdb->get_results( "SELECT * FROM {$wpdb->comments} WHERE comment_approved = '0'{$paginate}", ARRAY_A ); + + foreach ( (array) $moderation as $c ) { + $c['user_ip'] = $c['comment_author_IP']; + $c['user_agent'] = $c['comment_agent']; + $c['referrer'] = ''; + $c['blog'] = get_bloginfo('url'); + $c['blog_lang'] = get_locale(); + $c['blog_charset'] = get_option('blog_charset'); + $c['permalink'] = get_permalink($c['comment_post_ID']); + + $c['user_role'] = ''; + if ( isset( $c['user_ID'] ) ) + $c['user_role'] = Akismet::get_user_roles($c['user_ID']); + + if ( Akismet::is_test_mode() ) + $c['is_test'] = 'true'; + + add_comment_meta( $c['comment_ID'], 'akismet_rechecking', true ); + + $response = Akismet::http_post( http_build_query( $c ), 'comment-check' ); + if ( 'true' == $response[1] ) { + wp_set_comment_status( $c['comment_ID'], 'spam' ); + update_comment_meta( $c['comment_ID'], 'akismet_result', 'true' ); + delete_comment_meta( $c['comment_ID'], 'akismet_error' ); + delete_comment_meta( $c['comment_ID'], 'akismet_delayed_moderation_email' ); + Akismet::update_comment_history( $c['comment_ID'], __('Akismet re-checked and caught this comment as spam', 'akismet'), 'check-spam' ); + + } elseif ( 'false' == $response[1] ) { + update_comment_meta( $c['comment_ID'], 'akismet_result', 'false' ); + delete_comment_meta( $c['comment_ID'], 'akismet_error' ); + delete_comment_meta( $c['comment_ID'], 'akismet_delayed_moderation_email' ); + Akismet::update_comment_history( $c['comment_ID'], __('Akismet re-checked and cleared this comment', 'akismet'), 'check-ham' ); + // abnormal result: error + } else { + update_comment_meta( $c['comment_ID'], 'akismet_result', 'error' ); + Akismet::update_comment_history( $c['comment_ID'], sprintf( __('Akismet was unable to re-check this comment (response: %s)', 'akismet'), substr($response[1], 0, 50)), 'check-error' ); + } + + delete_comment_meta( $c['comment_ID'], 'akismet_rechecking' ); + } + if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) { + wp_send_json( array( + 'processed' => count((array) $moderation), + )); + } + else { + $redirect_to = isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : admin_url( 'edit-comments.php' ); + wp_safe_redirect( $redirect_to ); + exit; + } + } + + // Adds an 'x' link next to author URLs, clicking will remove the author URL and show an undo link + public static function remove_comment_author_url() { + if ( !empty( $_POST['id'] ) && check_admin_referer( 'comment_author_url_nonce' ) ) { + $comment = get_comment( intval( $_POST['id'] ), ARRAY_A ); + if ( $comment && current_user_can( 'edit_comment', $comment['comment_ID'] ) ) { + $comment['comment_author_url'] = ''; + do_action( 'comment_remove_author_url' ); + print( wp_update_comment( $comment ) ); + die(); + } + } + } + + public static function add_comment_author_url() { + if ( !empty( $_POST['id'] ) && !empty( $_POST['url'] ) && check_admin_referer( 'comment_author_url_nonce' ) ) { + $comment = get_comment( intval( $_POST['id'] ), ARRAY_A ); + if ( $comment && current_user_can( 'edit_comment', $comment['comment_ID'] ) ) { + $comment['comment_author_url'] = esc_url( $_POST['url'] ); + do_action( 'comment_add_author_url' ); + print( wp_update_comment( $comment ) ); + die(); + } + } + } + + public static function comment_row_action( $a, $comment ) { + + // failsafe for old WP versions + if ( !function_exists('add_comment_meta') ) + return $a; + + $akismet_result = get_comment_meta( $comment->comment_ID, 'akismet_result', true ); + $akismet_error = get_comment_meta( $comment->comment_ID, 'akismet_error', true ); + $user_result = get_comment_meta( $comment->comment_ID, 'akismet_user_result', true); + $comment_status = wp_get_comment_status( $comment->comment_ID ); + $desc = null; + if ( $akismet_error ) { + $desc = __( 'Awaiting spam check' , 'akismet'); + } elseif ( !$user_result || $user_result == $akismet_result ) { + // Show the original Akismet result if the user hasn't overridden it, or if their decision was the same + if ( $akismet_result == 'true' && $comment_status != 'spam' && $comment_status != 'trash' ) + $desc = __( 'Flagged as spam by Akismet' , 'akismet'); + elseif ( $akismet_result == 'false' && $comment_status == 'spam' ) + $desc = __( 'Cleared by Akismet' , 'akismet'); + } else { + $who = get_comment_meta( $comment->comment_ID, 'akismet_user', true ); + if ( $user_result == 'true' ) + $desc = sprintf( __('Flagged as spam by %s', 'akismet'), $who ); + else + $desc = sprintf( __('Un-spammed by %s', 'akismet'), $who ); + } + + // add a History item to the hover links, just after Edit + if ( $akismet_result ) { + $b = array(); + foreach ( $a as $k => $item ) { + $b[ $k ] = $item; + if ( + $k == 'edit' + || ( $k == 'unspam' && $GLOBALS['wp_version'] >= 3.4 ) + ) { + $b['history'] = ' '. esc_html__('History', 'akismet') . ''; + } + } + + $a = $b; + } + + if ( $desc ) + echo ''.esc_html( $desc ).''; + + if ( apply_filters( 'akismet_show_user_comments_approved', get_option('akismet_show_user_comments_approved') ) ) { + $comment_count = Akismet::get_user_comments_approved( $comment->user_id, $comment->comment_author_email, $comment->comment_author, $comment->comment_author_url ); + $comment_count = intval( $comment_count ); + echo ''; + } + + return $a; + } + + public static function comment_status_meta_box( $comment ) { + $history = Akismet::get_comment_history( $comment->comment_ID ); + + if ( $history ) { + echo '
      '; + foreach ( $history as $row ) { + $time = date( 'D d M Y @ h:i:m a', $row['time'] ) . ' GMT'; + echo '
      ' . sprintf( esc_html__('%s ago', 'akismet'), human_time_diff( $row['time'] ) ) . ' - '; + echo esc_html( $row['message'] ) . '
      '; + } + echo '
      '; + } + } + + public static function plugin_action_links( $links, $file ) { + if ( $file == plugin_basename( AKISMET__PLUGIN_URL . '/akismet.php' ) ) { + $links[] = ''.esc_html__( 'Settings' , 'akismet').''; + } + + return $links; + } + + public static function text_add_link_callback( $m ) { + // bare link? + if ( $m[4] == $m[2] ) + return ''.$m[4].''; + else + return ''.$m[4].''; + } + + public static function text_add_link_class( $comment_text ) { + return preg_replace_callback( '#]*)href="([^"]+)"([^>]*)>(.*?)#i', array( 'Akismet_Admin', 'text_add_link_callback' ), $comment_text ); + } + + public static function submit_spam_comment( $comment_id ) { + global $wpdb, $current_user, $current_site; + + $comment_id = (int) $comment_id; + + $comment = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->comments} WHERE comment_ID = %d", $comment_id ) ); + + if ( !$comment ) // it was deleted + return; + + if ( 'spam' != $comment->comment_approved ) + return; + + // use the original version stored in comment_meta if available + $as_submitted = get_comment_meta( $comment_id, 'akismet_as_submitted', true); + + if ( $as_submitted && is_array( $as_submitted ) && isset( $as_submitted['comment_content'] ) ) + $comment = (object) array_merge( (array)$comment, $as_submitted ); + + $comment->blog = get_bloginfo('url'); + $comment->blog_lang = get_locale(); + $comment->blog_charset = get_option('blog_charset'); + $comment->permalink = get_permalink($comment->comment_post_ID); + + if ( is_object($current_user) ) + $comment->reporter = $current_user->user_login; + + if ( is_object($current_site) ) + $comment->site_domain = $current_site->domain; + + $comment->user_role = ''; + if ( isset( $comment->user_ID ) ) + $comment->user_role = Akismet::get_user_roles( $comment->user_ID ); + + if ( Akismet::is_test_mode() ) + $comment->is_test = 'true'; + + $post = get_post( $comment->comment_post_ID ); + $comment->comment_post_modified_gmt = $post->post_modified_gmt; + + $response = Akismet::http_post( http_build_query( $comment ), 'submit-spam' ); + if ( $comment->reporter ) { + Akismet::update_comment_history( $comment_id, sprintf( __('%s reported this comment as spam', 'akismet'), $comment->reporter ), 'report-spam' ); + update_comment_meta( $comment_id, 'akismet_user_result', 'true' ); + update_comment_meta( $comment_id, 'akismet_user', $comment->reporter ); + } + + do_action('akismet_submit_spam_comment', $comment_id, $response[1]); + } + + public static function submit_nonspam_comment( $comment_id ) { + global $wpdb, $current_user, $current_site; + + $comment_id = (int) $comment_id; + + $comment = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->comments} WHERE comment_ID = %d", $comment_id ) ); + if ( !$comment ) // it was deleted + return; + + // use the original version stored in comment_meta if available + $as_submitted = get_comment_meta( $comment_id, 'akismet_as_submitted', true); + + if ( $as_submitted && is_array($as_submitted) && isset($as_submitted['comment_content']) ) + $comment = (object) array_merge( (array)$comment, $as_submitted ); + + $comment->blog = get_bloginfo('url'); + $comment->blog_lang = get_locale(); + $comment->blog_charset = get_option('blog_charset'); + $comment->permalink = get_permalink( $comment->comment_post_ID ); + $comment->user_role = ''; + + if ( is_object($current_user) ) + $comment->reporter = $current_user->user_login; + + if ( is_object($current_site) ) + $comment->site_domain = $current_site->domain; + + if ( isset( $comment->user_ID ) ) + $comment->user_role = Akismet::get_user_roles($comment->user_ID); + + if ( Akismet::is_test_mode() ) + $comment->is_test = 'true'; + + $post = get_post( $comment->comment_post_ID ); + $comment->comment_post_modified_gmt = $post->post_modified_gmt; + + $response = Akismet::http_post( http_build_query( $comment ), 'submit-ham' ); + if ( $comment->reporter ) { + Akismet::update_comment_history( $comment_id, sprintf( __('%s reported this comment as not spam', 'akismet'), $comment->reporter ), 'report-ham' ); + update_comment_meta( $comment_id, 'akismet_user_result', 'false' ); + update_comment_meta( $comment_id, 'akismet_user', $comment->reporter ); + } + + do_action('akismet_submit_nonspam_comment', $comment_id, $response[1]); + } + + // Total spam in queue + // get_option( 'akismet_spam_count' ) is the total caught ever + public static function get_spam_count( $type = false ) { + global $wpdb; + + if ( !$type ) { // total + $count = wp_cache_get( 'akismet_spam_count', 'widget' ); + if ( false === $count ) { + if ( function_exists('wp_count_comments') ) { + $count = wp_count_comments(); + $count = $count->spam; + } else { + $count = (int) $wpdb->get_var("SELECT COUNT(comment_ID) FROM {$wpdb->comments} WHERE comment_approved = 'spam'"); + } + wp_cache_set( 'akismet_spam_count', $count, 'widget', 3600 ); + } + return $count; + } elseif ( 'comments' == $type || 'comment' == $type ) { // comments + $type = ''; + } else { // pingback, trackback, ... + $type = $wpdb->escape( $type ); + } + + return (int) $wpdb->get_var("SELECT COUNT(comment_ID) FROM {$wpdb->comments} WHERE comment_approved = 'spam' AND comment_type='$type'"); + } + + // Check connectivity between the WordPress blog and Akismet's servers. + // Returns an associative array of server IP addresses, where the key is the IP address, and value is true (available) or false (unable to connect). + public static function check_server_connectivity() { + $test_host = 'rest.akismet.com'; + + // Some web hosts may disable one or both functions + if ( !function_exists('fsockopen') || !function_exists('gethostbynamel') ) + return array(); + + $ips = gethostbynamel( $test_host ); + if ( !$ips || !is_array($ips) || !count($ips) ) + return array(); + + $api_key = Akismet::get_api_key(); + + $servers = array(); + foreach ( $ips as $ip ) { + $response = Akismet::verify_key( $api_key, $ip ); + // even if the key is invalid, at least we know we have connectivity + if ( $response == 'valid' || $response == 'invalid' ) + $servers[$ip] = true; + else + $servers[$ip] = false; + } + return $servers; + } + + // Check the server connectivity and store the results in an option. + // Cached results will be used if not older than the specified timeout in seconds; use $cache_timeout = 0 to force an update. + // Returns the same associative array as check_server_connectivity() + public static function get_server_connectivity( $cache_timeout = 86400 ) { + $servers = get_option('akismet_available_servers'); + if ( (time() - get_option('akismet_connectivity_time') < $cache_timeout) && $servers !== false ) + return $servers; + + // There's a race condition here but the effect is harmless. + $servers = self::check_server_connectivity(); + update_option('akismet_available_servers', $servers); + update_option('akismet_connectivity_time', time()); + return $servers; + } + + public static function get_number_spam_waiting() { + global $wpdb; + return (int) $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->commentmeta} WHERE meta_key = 'akismet_error'" ); + } + + public static function get_page_url( $page = 'config' ) { + + $args = array( 'page' => 'akismet-key-config' ); + + if ( $page == 'stats' ) + $args = array( 'page' => 'akismet-key-config', 'view' => 'stats' ); + elseif ( $page == 'delete_key' ) + $args = array( 'page' => 'akismet-key-config', 'view' => 'start', 'action' => 'delete-key', '_wpnonce' => wp_create_nonce( self::NONCE ) ); + + $url = add_query_arg( $args, class_exists( 'Jetpack' ) ? admin_url( 'admin.php' ) : admin_url( 'options-general.php' ) ); + + return $url; + } + + public static function get_akismet_user( $api_key ) { + $akismet_user = Akismet::http_post( http_build_query( array( 'key' => $api_key ) ), 'get-subscription' ); + + if ( ! empty( $akismet_user[1] ) ) + $akismet_user = json_decode( $akismet_user[1] ); + else + $akismet_user = false; + + return $akismet_user; + } + + public static function get_stats( $api_key ) { + $stat_totals = array(); + + foreach( array( '6-months', 'all' ) as $interval ) { + $response = Akismet::http_post( http_build_query( array( 'blog' => urlencode( get_bloginfo('url') ), 'key' => $api_key, 'from' => $interval ) ), 'get-stats' ); + + if ( ! empty( $response[1] ) ) { + $stat_totals[$interval] = json_decode( $response[1] ); + } + } + return $stat_totals; + } + + public static function verify_wpcom_key( $api_key, $user_id, $token = '' ) { + $akismet_account = Akismet::http_post( http_build_query( array( + 'user_id' => $user_id, + 'api_key' => $api_key, + 'token' => $token, + 'get_account_type' => 'true' + ) ), 'verify-wpcom-key' ); + + if ( ! empty( $akismet_account[1] ) ) + $akismet_account = json_decode( $akismet_account[1] ); + + Akismet::log( compact( 'akismet_account' ) ); + + return $akismet_account; + } + + public static function display_alert() { + Akismet::view( 'notice', array( + 'type' => 'alert', + 'code' => (int) get_option( 'akismet_alert_code' ), + 'msg' => get_option( 'akismet_alert_msg' ) + ) ); + } + + public static function display_spam_check_warning() { + Akismet::fix_scheduled_recheck(); + + if ( self::get_number_spam_waiting() > 0 && wp_next_scheduled('akismet_schedule_cron_recheck') > time() ) + Akismet::view( 'notice', array( 'type' => 'spam-check' ) ); + } + + public static function display_invalid_version() { + Akismet::view( 'notice', array( 'type' => 'version' ) ); + } + + public static function display_api_key_warning() { + Akismet::view( 'notice', array( 'type' => 'plugin' ) ); + } + + public static function display_page() { + if ( !Akismet::get_api_key() || ( isset( $_GET['view'] ) && $_GET['view'] == 'start' ) ) + self::display_start_page(); + elseif ( isset( $_GET['view'] ) && $_GET['view'] == 'stats' ) + self::display_stats_page(); + else + self::display_configuration_page(); + } + + public static function display_start_page() { + if ( isset( $_GET['action'] ) ) { + if ( $_GET['action'] == 'delete-key' ) { + if ( isset( $_GET['_wpnonce'] ) && wp_verify_nonce( $_GET['_wpnonce'], self::NONCE ) ) + delete_option( 'wordpress_api_key' ); + } + } + + if ( $api_key = Akismet::get_api_key() ) { + self::display_configuration_page(); + return; + } + + //the user can choose to auto connect their API key by clicking a button on the akismet done page + //if jetpack, get verified api key by using connected wpcom user id + //if no jetpack, get verified api key by using an akismet token + + $akismet_user = false; + + if ( isset( $_GET['token'] ) && preg_match('/^(\d+)-[0-9a-f]{20}$/', $_GET['token'] ) ) + $akismet_user = self::verify_wpcom_key( '', '', $_GET['token'] ); + elseif ( $jetpack_user = self::get_jetpack_user() ) + $akismet_user = self::verify_wpcom_key( $jetpack_user['api_key'], $jetpack_user['user_id'] ); + + if ( isset( $_GET['action'] ) ) { + if ( $_GET['action'] == 'save-key' ) { + if ( is_object( $akismet_user ) ) { + self::save_key( $akismet_user->api_key ); + self::display_notice(); + self::display_configuration_page(); + return; + } + } + } + + echo '

      '.esc_html__('Akismet', 'akismet').'

      '; + + self::display_status(); + + Akismet::view( 'start', compact( 'akismet_user' ) ); + } + + public static function display_stats_page() { + Akismet::view( 'stats' ); + } + + public static function display_configuration_page() { + $api_key = Akismet::get_api_key(); + $akismet_user = self::get_akismet_user( $api_key ); + $stat_totals = self::get_stats( $api_key ); + + // If unset, create the new strictness option using the old discard option to determine its default + if ( get_option( 'akismet_strictness' ) === false ) + add_option( 'akismet_strictness', (get_option('akismet_discard_month') === 'true' ? '1' : '0') ); + + if ( empty( self::$notices ) ) { + //show status + if ( $akismet_user->status == 'active' && $akismet_user->account_type == 'free-api-key' ) { + + $time_saved = false; + + if ( $stat_totals['all']->time_saved > 1800 ) { + $total_in_minutes = round( $stat_totals['all']->time_saved / 60 ); + $total_in_hours = round( $total_in_minutes / 60 ); + $total_in_days = round( $total_in_hours / 8 ); + $cleaning_up = __( 'Cleaning up spam takes time.' , 'akismet'); + + if ( $total_in_days > 1 ) + $time_saved = $cleaning_up . ' ' . sprintf( __( 'Since you joined us, Akismet has saved you %s days!' , 'akismet'), number_format_i18n( $total_in_days ) ); + elseif ( $total_in_hours > 1 ) + $time_saved = $cleaning_up . ' ' . sprintf( __( 'Since you joined us, Akismet has saved you %d hours!' , 'akismet'), $total_in_hours ); + elseif ( $total_in_minutes >= 30 ) + $time_saved = $cleaning_up . ' ' . sprintf( __( 'Since you joined us, Akismet has saved you %d minutes!' , 'akismet'), $total_in_minutes ); + } + + Akismet::view( 'notice', array( 'type' => 'active-notice', 'time_saved' => $time_saved ) ); + } + + if ( !empty( $akismet_user->limit_reached ) && in_array( $akismet_user->limit_reached, array( 'yellow', 'red' ) ) ) { + Akismet::view( 'notice', array( 'type' => 'limit-reached', 'level' => $akismet_user->limit_reached ) ); + } + } + + if ( !isset( self::$notices['status'] ) && in_array( $akismet_user->status, array( 'cancelled', 'suspended', 'missing', 'no-sub' ) ) ) + Akismet::view( 'notice', array( 'type' => $akismet_user->status ) ); + + Akismet::log( compact( 'stat_totals', 'akismet_user' ) ); + Akismet::view( 'config', compact( 'api_key', 'akismet_user', 'stat_totals' ) ); + } + + public static function display_notice() { + global $hook_suffix; + + if ( in_array( $hook_suffix, array( 'jetpack_page_akismet-key-config', 'settings_page_akismet-key-config', 'edit-comments.php' ) ) && (int) get_option( 'akismet_alert_code' ) > 0 ) { + self::display_alert(); + } + elseif ( $hook_suffix == 'plugins.php' && !Akismet::get_api_key() ) { + self::display_api_key_warning(); + } + elseif ( $hook_suffix == 'edit-comments.php' && wp_next_scheduled( 'akismet_schedule_cron_recheck' ) ) { + self::display_spam_check_warning(); + } + elseif ( in_array( $hook_suffix, array( 'jetpack_page_akismet-key-config', 'settings_page_akismet-key-config' ) ) && Akismet::get_api_key() ) { + self::display_status(); + } + } + + public static function display_status() { + $servers = self::get_server_connectivity(); + $fail_count = count( $servers ) - count( array_filter( $servers ) ); + $type = ''; + + if ( empty( $servers ) || $fail_count > 0 ) + $type = 'servers-be-down'; + + if ( !function_exists('fsockopen') || !function_exists('gethostbynamel') ) + $type = 'missing-functions'; + + if ( !empty( $type ) ) + Akismet::view( 'notice', compact( 'type' ) ); + elseif ( !empty( self::$notices ) ) { + foreach ( self::$notices as $type ) + Akismet::view( 'notice', compact( 'type' ) ); + } + } + + private static function get_jetpack_user() { + if ( !class_exists('Jetpack') ) + return false; + + Jetpack::load_xml_rpc_client(); + $xml = new Jetpack_IXR_ClientMulticall( array( 'user_id' => get_current_user_id() ) ); + + $xml->addCall( 'wpcom.getUserID' ); + $xml->addCall( 'akismet.getAPIKey' ); + $xml->query(); + + Akismet::log( compact( 'xml' ) ); + + if ( !$xml->isError() ) { + $responses = $xml->getResponse(); + if ( count( $responses ) > 1 ) { + $api_key = array_shift( $responses[0] ); + $user_id = (int) array_shift( $responses[1] ); + return compact( 'api_key', 'user_id' ); + } + } + return false; + } +} \ No newline at end of file diff --git a/wp-content/plugins/akismet/class.akismet-widget.php b/wp-content/plugins/akismet/class.akismet-widget.php new file mode 100644 index 0000000..a60ae60 --- /dev/null +++ b/wp-content/plugins/akismet/class.akismet-widget.php @@ -0,0 +1,110 @@ + __( 'Display the number of spam comments Akismet has caught' , 'akismet') ) + ); + + if ( is_active_widget( false, false, $this->id_base ) ) { + add_action( 'wp_head', array( $this, 'css' ) ); + } + } + + function css() { +?> + + + + + +

      + + +

      + + + + + + $key, 'blog' => get_option('home') ) ), 'verify-key', $ip ); + } + + public static function verify_key( $key, $ip = null ) { + $response = self::check_key_status( $key, $ip ); + + if ( $response[1] != 'valid' && $response[1] != 'invalid' ) + return 'failed'; + + self::update_alert( $response ); + + return $response[1]; + } + + public static function auto_check_comment( $commentdata ) { + self::$last_comment_result = null; + + $comment = $commentdata; + + $comment['user_ip'] = self::get_ip_address(); + $comment['user_agent'] = self::get_user_agent(); + $comment['referrer'] = self::get_referer(); + $comment['blog'] = get_option('home'); + $comment['blog_lang'] = get_locale(); + $comment['blog_charset'] = get_option('blog_charset'); + $comment['permalink'] = get_permalink( $comment['comment_post_ID'] ); + + if ( !empty( $comment['user_ID'] ) ) + $comment['user_role'] = Akismet::get_user_roles( $comment['user_ID'] ); + + $akismet_nonce_option = apply_filters( 'akismet_comment_nonce', get_option( 'akismet_comment_nonce' ) ); + $comment['akismet_comment_nonce'] = 'inactive'; + if ( $akismet_nonce_option == 'true' || $akismet_nonce_option == '' ) { + $comment['akismet_comment_nonce'] = 'failed'; + if ( isset( $_POST['akismet_comment_nonce'] ) && wp_verify_nonce( $_POST['akismet_comment_nonce'], 'akismet_comment_nonce_' . $comment['comment_post_ID'] ) ) + $comment['akismet_comment_nonce'] = 'passed'; + + // comment reply in wp-admin + if ( isset( $_POST['_ajax_nonce-replyto-comment'] ) && check_ajax_referer( 'replyto-comment', '_ajax_nonce-replyto-comment' ) ) + $comment['akismet_comment_nonce'] = 'passed'; + + } + + if ( self::is_test_mode() ) + $comment['is_test'] = 'true'; + + foreach( $_POST as $key => $value ) { + if ( is_string( $value ) ) + $comment["POST_{$key}"] = $value; + } + + $ignore = array( 'HTTP_COOKIE', 'HTTP_COOKIE2', 'PHP_AUTH_PW' ); + + foreach ( $_SERVER as $key => $value ) { + if ( !in_array( $key, $ignore ) && is_string($value) ) + $comment["$key"] = $value; + else + $comment["$key"] = ''; + } + + $post = get_post( $comment['comment_post_ID'] ); + $comment[ 'comment_post_modified_gmt' ] = $post->post_modified_gmt; + + $response = self::http_post( http_build_query( $comment ), 'comment-check' ); + + do_action( 'akismet_comment_check_response', $response ); + + self::update_alert( $response ); + + $commentdata['comment_as_submitted'] = $comment; + $commentdata['akismet_result'] = $response[1]; + + if ( isset( $response[0]['x-akismet-pro-tip'] ) ) + $commentdata['akismet_pro_tip'] = $response[0]['x-akismet-pro-tip']; + + if ( 'true' == $response[1] ) { + // akismet_spam_count will be incremented later by comment_is_spam() + self::$last_comment_result = 'spam'; + + $discard = ( isset( $commentdata['akismet_pro_tip'] ) && $commentdata['akismet_pro_tip'] === 'discard' && self::allow_discard() ); + + do_action( 'akismet_spam_caught', $discard ); + + if ( $discard ) { + // akismet_result_spam() won't be called so bump the counter here + if ( $incr = apply_filters('akismet_spam_count_incr', 1) ) + update_option( 'akismet_spam_count', get_option('akismet_spam_count') + $incr ); + $redirect_to = isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : get_permalink( $post ); + wp_safe_redirect( esc_url_raw( $redirect_to ) ); + die(); + } + } + + // if the response is neither true nor false, hold the comment for moderation and schedule a recheck + if ( 'true' != $response[1] && 'false' != $response[1] ) { + if ( !current_user_can('moderate_comments') ) { + // Comment status should be moderated + self::$last_comment_result = '0'; + } + if ( function_exists('wp_next_scheduled') && function_exists('wp_schedule_single_event') ) { + if ( !wp_next_scheduled( 'akismet_schedule_cron_recheck' ) ) { + wp_schedule_single_event( time() + 1200, 'akismet_schedule_cron_recheck' ); + } + } + + self::$prevent_moderation_email_for_these_comments[] = $commentdata; + } + + if ( function_exists('wp_next_scheduled') && function_exists('wp_schedule_event') ) { + // WP 2.1+: delete old comments daily + if ( !wp_next_scheduled( 'akismet_scheduled_delete' ) ) + wp_schedule_event( time(), 'daily', 'akismet_scheduled_delete' ); + } + elseif ( (mt_rand(1, 10) == 3) ) { + // WP 2.0: run this one time in ten + self::delete_old_comments(); + } + + self::set_last_comment( $commentdata ); + self::fix_scheduled_recheck(); + + return self::$last_comment; + } + + public static function get_last_comment() { + return self::$last_comment; + } + + public static function set_last_comment( $comment ) { + if ( is_null( $comment ) ) { + self::$last_comment = null; + } + else { + // We filter it here so that it matches the filtered comment data that we'll have to compare against later. + // wp_filter_comment expects comment_author_IP + self::$last_comment = wp_filter_comment( + array_merge( + array( 'comment_author_IP' => self::get_ip_address() ), + $comment + ) + ); + } + } + + // this fires on wp_insert_comment. we can't update comment_meta when auto_check_comment() runs + // because we don't know the comment ID at that point. + public static function auto_check_update_meta( $id, $comment ) { + + // failsafe for old WP versions + if ( !function_exists('add_comment_meta') ) + return false; + + if ( !isset( self::$last_comment['comment_author_email'] ) ) + self::$last_comment['comment_author_email'] = ''; + + // wp_insert_comment() might be called in other contexts, so make sure this is the same comment + // as was checked by auto_check_comment + if ( is_object( $comment ) && !empty( self::$last_comment ) && is_array( self::$last_comment ) ) { + if ( self::matches_last_comment( $comment ) ) { + + load_plugin_textdomain( 'akismet' ); + + // normal result: true or false + if ( self::$last_comment['akismet_result'] == 'true' ) { + update_comment_meta( $comment->comment_ID, 'akismet_result', 'true' ); + self::update_comment_history( $comment->comment_ID, __('Akismet caught this comment as spam', 'akismet'), 'check-spam' ); + if ( $comment->comment_approved != 'spam' ) + self::update_comment_history( $comment->comment_ID, sprintf( __('Comment status was changed to %s', 'akismet'), $comment->comment_approved), 'status-changed'.$comment->comment_approved ); + } + elseif ( self::$last_comment['akismet_result'] == 'false' ) { + update_comment_meta( $comment->comment_ID, 'akismet_result', 'false' ); + self::update_comment_history( $comment->comment_ID, __('Akismet cleared this comment', 'akismet'), 'check-ham' ); + if ( $comment->comment_approved == 'spam' ) { + if ( wp_blacklist_check($comment->comment_author, $comment->comment_author_email, $comment->comment_author_url, $comment->comment_content, $comment->comment_author_IP, $comment->comment_agent) ) + self::update_comment_history( $comment->comment_ID, __('Comment was caught by wp_blacklist_check', 'akismet'), 'wp-blacklisted' ); + else + self::update_comment_history( $comment->comment_ID, sprintf( __('Comment status was changed to %s', 'akismet'), $comment->comment_approved), 'status-changed-'.$comment->comment_approved ); + } + } // abnormal result: error + else { + update_comment_meta( $comment->comment_ID, 'akismet_error', time() ); + self::update_comment_history( $comment->comment_ID, sprintf( __('Akismet was unable to check this comment (response: %s), will automatically retry again later.', 'akismet'), substr(self::$last_comment['akismet_result'], 0, 50)), 'check-error' ); + } + + // record the complete original data as submitted for checking + if ( isset( self::$last_comment['comment_as_submitted'] ) ) + update_comment_meta( $comment->comment_ID, 'akismet_as_submitted', self::$last_comment['comment_as_submitted'] ); + + if ( isset( self::$last_comment['akismet_pro_tip'] ) ) + update_comment_meta( $comment->comment_ID, 'akismet_pro_tip', self::$last_comment['akismet_pro_tip'] ); + } + } + } + + public static function delete_old_comments() { + global $wpdb; + + while( $comment_ids = $wpdb->get_col( $wpdb->prepare( "SELECT comment_id FROM {$wpdb->comments} WHERE DATE_SUB(NOW(), INTERVAL 15 DAY) > comment_date_gmt AND comment_approved = 'spam' LIMIT %d", defined( 'AKISMET_DELETE_LIMIT' ) ? AKISMET_DELETE_LIMIT : 10000 ) ) ) { + if ( empty( $comment_ids ) ) + return; + + $wpdb->queries = array(); + + do_action( 'delete_comment', $comment_ids ); + + $comma_comment_ids = implode( ', ', array_map('intval', $comment_ids) ); + + $wpdb->query("DELETE FROM {$wpdb->comments} WHERE comment_id IN ( $comma_comment_ids )"); + $wpdb->query("DELETE FROM {$wpdb->commentmeta} WHERE comment_id IN ( $comma_comment_ids )"); + + clean_comment_cache( $comment_ids ); + } + + if ( apply_filters( 'akismet_optimize_table', ( mt_rand(1, 5000) == 11), $wpdb->comments ) ) // lucky number + $wpdb->query("OPTIMIZE TABLE {$wpdb->comments}"); + } + + public static function delete_old_comments_meta() { + global $wpdb; + + $interval = apply_filters( 'akismet_delete_commentmeta_interval', 15 ); + + # enfore a minimum of 1 day + $interval = absint( $interval ); + if ( $interval < 1 ) + $interval = 1; + + // akismet_as_submitted meta values are large, so expire them + // after $interval days regardless of the comment status + while ( $comment_ids = $wpdb->get_col( $wpdb->prepare( "SELECT m.comment_id FROM {$wpdb->commentmeta} as m INNER JOIN {$wpdb->comments} as c USING(comment_id) WHERE m.meta_key = 'akismet_as_submitted' AND DATE_SUB(NOW(), INTERVAL %d DAY) > c.comment_date_gmt LIMIT 10000", $interval ) ) ) { + if ( empty( $comment_ids ) ) + return; + + $wpdb->queries = array(); + + foreach ( $comment_ids as $comment_id ) { + delete_comment_meta( $comment_id, 'akismet_as_submitted' ); + } + } + + if ( apply_filters( 'akismet_optimize_table', ( mt_rand(1, 5000) == 11), $wpdb->commentmeta ) ) // lucky number + $wpdb->query("OPTIMIZE TABLE {$wpdb->commentmeta}"); + } + + // how many approved comments does this author have? + public static function get_user_comments_approved( $user_id, $comment_author_email, $comment_author, $comment_author_url ) { + global $wpdb; + + if ( !empty( $user_id ) ) + return (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM {$wpdb->comments} WHERE user_id = %d AND comment_approved = 1", $user_id ) ); + + if ( !empty( $comment_author_email ) ) + return (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM {$wpdb->comments} WHERE comment_author_email = %s AND comment_author = %s AND comment_author_url = %s AND comment_approved = 1", $comment_author_email, $comment_author, $comment_author_url ) ); + + return 0; + } + + // get the full comment history for a given comment, as an array in reverse chronological order + public static function get_comment_history( $comment_id ) { + + // failsafe for old WP versions + if ( !function_exists('add_comment_meta') ) + return false; + + $history = get_comment_meta( $comment_id, 'akismet_history', false ); + usort( $history, array( 'Akismet', '_cmp_time' ) ); + return $history; + } + + // log an event for a given comment, storing it in comment_meta + public static function update_comment_history( $comment_id, $message, $event=null ) { + global $current_user; + + // failsafe for old WP versions + if ( !function_exists('add_comment_meta') ) + return false; + + $user = ''; + if ( is_object( $current_user ) && isset( $current_user->user_login ) ) + $user = $current_user->user_login; + + $event = array( + 'time' => self::_get_microtime(), + 'message' => $message, + 'event' => $event, + 'user' => $user, + ); + + // $unique = false so as to allow multiple values per comment + $r = add_comment_meta( $comment_id, 'akismet_history', $event, false ); + } + + public static function check_db_comment( $id, $recheck_reason = 'recheck_queue' ) { + global $wpdb; + + $c = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->comments} WHERE comment_ID = %d", $id ), ARRAY_A ); + if ( !$c ) + return; + + $c['user_ip'] = $c['comment_author_IP']; + $c['user_agent'] = $c['comment_agent']; + $c['referrer'] = ''; + $c['blog'] = get_option('home'); + $c['blog_lang'] = get_locale(); + $c['blog_charset'] = get_option('blog_charset'); + $c['permalink'] = get_permalink($c['comment_post_ID']); + $c['recheck_reason'] = $recheck_reason; + + if ( self::is_test_mode() ) + $c['is_test'] = 'true'; + + $response = self::http_post( http_build_query( $c ), 'comment-check' ); + + return ( is_array( $response ) && ! empty( $response[1] ) ) ? $response[1] : false; + } + + public static function cron_recheck() { + global $wpdb; + + $api_key = self::get_api_key(); + + $status = self::verify_key( $api_key ); + if ( get_option( 'akismet_alert_code' ) || $status == 'invalid' ) { + // since there is currently a problem with the key, reschedule a check for 6 hours hence + wp_schedule_single_event( time() + 21600, 'akismet_schedule_cron_recheck' ); + return false; + } + + delete_option('akismet_available_servers'); + + $comment_errors = $wpdb->get_col( "SELECT comment_id FROM {$wpdb->commentmeta} WHERE meta_key = 'akismet_error' LIMIT 100" ); + + load_plugin_textdomain( 'akismet' ); + + foreach ( (array) $comment_errors as $comment_id ) { + // if the comment no longer exists, or is too old, remove the meta entry from the queue to avoid getting stuck + $comment = get_comment( $comment_id ); + if ( !$comment || strtotime( $comment->comment_date_gmt ) < strtotime( "-15 days" ) ) { + delete_comment_meta( $comment_id, 'akismet_error' ); + delete_comment_meta( $comment_id, 'akismet_delayed_moderation_email' ); + continue; + } + + add_comment_meta( $comment_id, 'akismet_rechecking', true ); + $status = self::check_db_comment( $comment_id, 'retry' ); + + $msg = ''; + if ( $status == 'true' ) { + $msg = __( 'Akismet caught this comment as spam during an automatic retry.' , 'akismet'); + } elseif ( $status == 'false' ) { + $msg = __( 'Akismet cleared this comment during an automatic retry.' , 'akismet'); + } + + // If we got back a legit response then update the comment history + // other wise just bail now and try again later. No point in + // re-trying all the comments once we hit one failure. + if ( !empty( $msg ) ) { + delete_comment_meta( $comment_id, 'akismet_error' ); + self::update_comment_history( $comment_id, $msg, 'cron-retry' ); + update_comment_meta( $comment_id, 'akismet_result', $status ); + // make sure the comment status is still pending. if it isn't, that means the user has already moved it elsewhere. + $comment = get_comment( $comment_id ); + if ( $comment && 'unapproved' == wp_get_comment_status( $comment_id ) ) { + if ( $status == 'true' ) { + wp_spam_comment( $comment_id ); + } elseif ( $status == 'false' ) { + // comment is good, but it's still in the pending queue. depending on the moderation settings + // we may need to change it to approved. + if ( check_comment($comment->comment_author, $comment->comment_author_email, $comment->comment_author_url, $comment->comment_content, $comment->comment_author_IP, $comment->comment_agent, $comment->comment_type) ) + wp_set_comment_status( $comment_id, 1 ); + else if ( get_comment_meta( $comment_id, 'akismet_delayed_moderation_email', true ) ) + wp_notify_moderator( $comment_id ); + } + } + + delete_comment_meta( $comment_id, 'akismet_delayed_moderation_email' ); + } else { + // If this comment has been pending moderation for longer than MAX_DELAY_BEFORE_MODERATION_EMAIL, + // send a moderation email now. + if ( ( intval( gmdate( 'U' ) ) - strtotime( $comment->comment_date_gmt ) ) < self::MAX_DELAY_BEFORE_MODERATION_EMAIL ) { + delete_comment_meta( $comment_id, 'akismet_delayed_moderation_email' ); + wp_notify_moderator( $comment_id ); + } + + delete_comment_meta( $comment_id, 'akismet_rechecking' ); + wp_schedule_single_event( time() + 1200, 'akismet_schedule_cron_recheck' ); + return; + } + delete_comment_meta( $comment_id, 'akismet_rechecking' ); + } + + $remaining = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->commentmeta} WHERE meta_key = 'akismet_error'" ); + if ( $remaining && !wp_next_scheduled('akismet_schedule_cron_recheck') ) { + wp_schedule_single_event( time() + 1200, 'akismet_schedule_cron_recheck' ); + } + } + + public static function fix_scheduled_recheck() { + $future_check = wp_next_scheduled( 'akismet_schedule_cron_recheck' ); + if ( !$future_check ) { + return; + } + + if ( get_option( 'akismet_alert_code' ) > 0 ) { + return; + } + + $check_range = time() + 1200; + if ( $future_check > $check_range ) { + wp_clear_scheduled_hook( 'akismet_schedule_cron_recheck' ); + wp_schedule_single_event( time() + 300, 'akismet_schedule_cron_recheck' ); + } + } + + public static function add_comment_nonce( $post_id ) { + echo '

      '; + wp_nonce_field( 'akismet_comment_nonce_' . $post_id, 'akismet_comment_nonce', FALSE ); + echo '

      '; + } + + public static function is_test_mode() { + return defined('AKISMET_TEST_MODE') && AKISMET_TEST_MODE; + } + + public static function allow_discard() { + if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) + return false; + if ( is_user_logged_in() ) + return false; + + return ( get_option( 'akismet_strictness' ) === '1' ); + } + + public static function get_ip_address() { + return isset( $_SERVER['REMOTE_ADDR'] ) ? $_SERVER['REMOTE_ADDR'] : null; + } + + /** + * Do these two comments, without checking the comment_ID, "match"? + * + * @param mixed $comment1 A comment object or array. + * @param mixed $comment2 A comment object or array. + * @return bool Whether the two comments should be treated as the same comment. + */ + private static function comments_match( $comment1, $comment2 ) { + $comment1 = (array) $comment1; + $comment2 = (array) $comment2; + + return ( + isset( $comment1['comment_post_ID'], $comment2['comment_post_ID'] ) + && intval( $comment1['comment_post_ID'] ) == intval( $comment2['comment_post_ID'] ) + && $comment1['comment_author'] == $comment2['comment_author'] + && $comment1['comment_author_email'] == $comment2['comment_author_email'] + ); + } + + // Does the supplied comment match the details of the one most recently stored in self::$last_comment? + public static function matches_last_comment( $comment ) { + if ( is_object( $comment ) ) + $comment = (array) $comment; + + return self::comments_match( self::$last_comment, $comment ); + } + + private static function get_user_agent() { + return isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : null; + } + + private static function get_referer() { + return isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : null; + } + + // return a comma-separated list of role names for the given user + public static function get_user_roles( $user_id ) { + $roles = false; + + if ( !class_exists('WP_User') ) + return false; + + if ( $user_id > 0 ) { + $comment_user = new WP_User( $user_id ); + if ( isset( $comment_user->roles ) ) + $roles = join( ',', $comment_user->roles ); + } + + if ( is_multisite() && is_super_admin( $user_id ) ) { + if ( empty( $roles ) ) { + $roles = 'super_admin'; + } else { + $comment_user->roles[] = 'super_admin'; + $roles = join( ',', $comment_user->roles ); + } + } + + return $roles; + } + + // filter handler used to return a spam result to pre_comment_approved + public static function last_comment_status( $approved, $comment ) { + // Only do this if it's the correct comment + if ( is_null(self::$last_comment_result) || ! self::matches_last_comment( $comment ) ) { + self::log( "comment_is_spam mismatched comment, returning unaltered $approved" ); + return $approved; + } + + // bump the counter here instead of when the filter is added to reduce the possibility of overcounting + if ( $incr = apply_filters('akismet_spam_count_incr', 1) ) + update_option( 'akismet_spam_count', get_option('akismet_spam_count') + $incr ); + + return self::$last_comment_result; + } + + /** + * If Akismet is temporarily unreachable, we don't want to "spam" the blogger with + * moderation emails for comments that will be automatically cleared or spammed on + * the next retry. + * + * For comments that will be rechecked later, empty the list of email addresses that + * the moderation email would be sent to. + * + * @param array $emails An array of email addresses that the moderation email will be sent to. + * @param int $comment_id The ID of the relevant comment. + * @return array An array of email addresses that the moderation email will be sent to. + */ + public static function disable_moderation_emails_if_unreachable( $emails, $comment_id ) { + if ( ! empty( self::$prevent_moderation_email_for_these_comments ) && ! empty( $emails ) ) { + $comment = get_comment( $comment_id ); + + foreach ( self::$prevent_moderation_email_for_these_comments as $possible_match ) { + if ( self::comments_match( $possible_match, $comment ) ) { + update_comment_meta( $comment_id, 'akismet_delayed_moderation_email', true ); + return array(); + } + } + } + + return $emails; + } + + public static function _cmp_time( $a, $b ) { + return $a['time'] > $b['time'] ? -1 : 1; + } + + public static function _get_microtime() { + $mtime = explode( ' ', microtime() ); + return $mtime[1] + $mtime[0]; + } + + /** + * Make a POST request to the Akismet API. + * + * @param string $request The body of the request. + * @param string $path The path for the request. + * @param string $ip The specific IP address to hit. + * @return array A two-member array consisting of the headers and the response body, both empty in the case of a failure. + */ + public static function http_post( $request, $path, $ip=null ) { + + $akismet_ua = sprintf( 'WordPress/%s | Akismet/%s', $GLOBALS['wp_version'], constant( 'AKISMET_VERSION' ) ); + $akismet_ua = apply_filters( 'akismet_ua', $akismet_ua ); + + $content_length = strlen( $request ); + + $api_key = self::get_api_key(); + $host = self::API_HOST; + + if ( !empty( $api_key ) ) + $host = $api_key.'.'.$host; + + $http_host = $host; + // use a specific IP if provided + // needed by Akismet_Admin::check_server_connectivity() + if ( $ip && long2ip( ip2long( $ip ) ) ) { + $http_host = $ip; + } + + $http_args = array( + 'body' => $request, + 'headers' => array( + 'Content-Type' => 'application/x-www-form-urlencoded; charset=' . get_option( 'blog_charset' ), + 'Host' => $host, + 'User-Agent' => $akismet_ua, + ), + 'httpversion' => '1.0', + 'timeout' => 15 + ); + + $akismet_url = "http://{$http_host}/1.1/{$path}"; + $response = wp_remote_post( $akismet_url, $http_args ); + Akismet::log( compact( 'akismet_url', 'http_args', 'response' ) ); + if ( is_wp_error( $response ) ) + return array( '', '' ); + + return array( $response['headers'], $response['body'] ); + } + + // given a response from an API call like check_key_status(), update the alert code options if an alert is present. + private static function update_alert( $response ) { + $code = $msg = null; + if ( isset( $response[0]['x-akismet-alert-code'] ) ) { + $code = $response[0]['x-akismet-alert-code']; + $msg = $response[0]['x-akismet-alert-msg']; + } + + // only call update_option() if the value has changed + if ( $code != get_option( 'akismet_alert_code' ) ) { + if ( ! $code ) { + delete_option( 'akismet_alert_code' ); + delete_option( 'akismet_alert_msg' ); + } + else { + update_option( 'akismet_alert_code', $code ); + update_option( 'akismet_alert_msg', $msg ); + } + } + } + + public static function load_form_js() { + wp_enqueue_script( 'akismet-form', AKISMET__PLUGIN_URL . '_inc/form.js', array( 'jquery' ), AKISMET_VERSION ); + wp_print_scripts( 'akismet-form' ); + } + + public static function inject_ak_js( $fields ) { + echo '

      '; + echo ''; + echo '

      '; + } + + private static function bail_on_activation( $message, $deactivate = true ) { +?> + + + + + + +

      + + + $plugin ) { + if ( $plugin === $akismet ) { + $plugins[$i] = false; + $update = true; + } + } + + if ( $update ) { + update_option( 'active_plugins', array_filter( $plugins ) ); + } + } + exit; + } + + public static function view( $name, array $args = array() ) { + $args = apply_filters( 'akismet_view_arguments', $args, $name ); + + foreach ( $args AS $key => $val ) { + $$key = $val; + } + + load_plugin_textdomain( 'akismet' ); + + $file = AKISMET__PLUGIN_DIR . 'views/'. $name . '.php'; + + include( $file ); + } + + /** + * Attached to activate_{ plugin_basename( __FILES__ ) } by register_activation_hook() + * @static + */ + public static function plugin_activation() { + if ( version_compare( $GLOBALS['wp_version'], AKISMET__MINIMUM_WP_VERSION, '<' ) ) { + load_plugin_textdomain( 'akismet' ); + + $message = ''.sprintf(esc_html__( 'Akismet %s requires WordPress %s or higher.' , 'akismet'), AKISMET_VERSION, AKISMET__MINIMUM_WP_VERSION ).' '.sprintf(__('Please upgrade WordPress to a current version, or downgrade to version 2.4 of the Akismet plugin.', 'akismet'), 'https://codex.wordpress.org/Upgrading_WordPress', 'http://wordpress.org/extend/plugins/akismet/download/'); + + Akismet::bail_on_activation( $message ); + } + } + + /** + * Removes all connection options + * @static + */ + public static function plugin_deactivation( ) { + //tidy up + } + + public static function log( $akismet_debug ) { + if ( defined( 'WP_DEBUG_LOG' ) && WP_DEBUG_LOG ) + error_log( print_r( compact( 'akismet_debug' ), 1 ) ); //send message to debug.log when in debug mode + } +} \ No newline at end of file diff --git a/wp-content/plugins/akismet/index.php b/wp-content/plugins/akismet/index.php new file mode 100644 index 0000000..cf879a5 --- /dev/null +++ b/wp-content/plugins/akismet/index.php @@ -0,0 +1,2 @@ + + +

      + +
      + + spam > 0 ) : ?> + +
      + + + + + + +
        +
      • +

        + spam );?> + +
      • +
      • +

        + spam );?> + +
      • +
      • +

        + accuracy; ?>% + false_positives , 'akismet') + ), + number_format( $stat_totals['all']->missed_spam ), + number_format( $stat_totals['all']->false_positives ) + ); ?> +
      • +
      +
      +
      + + + + +
      + +
      +
      +
      +

      +

      +
      +
      + + + + + + + + + + + + + + + + + + + +
      + + +
      +

      + +

      +
      +
      +

      +

      +
      + spam folder older than 15 days is deleted automatically.' , 'akismet'), admin_url( 'edit-comments.php?comment_status=spam' ) );?> +
      +
      +
      + +
      + +
      + + +
      + + + +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +

      +

      +
      + + + + + + + + + + + next_billing_date ) : ?> + + + + + + +
      + + account_name; ?> +
      + + status ) : + esc_html_e( 'Cancelled', 'akismet' ); + elseif ( 'suspended' == $akismet_user->status ) : + esc_html_e( 'Suspended', 'akismet' ); + elseif ( 'missing' == $akismet_user->status ) : + esc_html_e( 'Missing', 'akismet' ); + elseif ( 'no-sub' == $akismet_user->status ) : + esc_html_e( 'No Subscription Found', 'akismet' ); + else : + esc_html_e( 'Active', 'akismet' ); + endif; ?> +
      + + next_billing_date ); ?> +
      +
      +
      +
      + ( $akismet_user->account_type == 'free-api-key' && $akismet_user->status == 'active' ? __( 'Upgrade' , 'akismet') : __( 'Change' , 'akismet') ), 'redirect' => 'upgrade' ) ); ?> +
      +
      +
      +
      +
      +
      +
      + + + +
      +
      \ No newline at end of file diff --git a/wp-content/plugins/akismet/views/get.php b/wp-content/plugins/akismet/views/get.php new file mode 100644 index 0000000..70727f6 --- /dev/null +++ b/wp-content/plugins/akismet/views/get.php @@ -0,0 +1,5 @@ +
      + + + +
      \ No newline at end of file diff --git a/wp-content/plugins/akismet/views/notice.php b/wp-content/plugins/akismet/views/notice.php new file mode 100644 index 0000000..f613c37 --- /dev/null +++ b/wp-content/plugins/akismet/views/notice.php @@ -0,0 +1,96 @@ + +
      + +
      +
      +
      A
      +
      +
      +
      +
      +
      +
      Almost done - activate your account and say goodbye to comment spam', 'akismet');?>
      +
      +
      +
      + +

      Akismet configuration and contact your web host if problems persist.', 'akismet'), esc_url( Akismet_Admin::get_page_url() ) );?>

      + +

      upgrade WordPress to a current version, or downgrade to version 2.4 of the Akismet plugin.', 'akismet'), 'https://codex.wordpress.org/Upgrading_WordPress', 'https://wordpress.org/extend/plugins/akismet/download/');?>

      + +
      +

      +

      +

      https://akismet.com/errors/' . $code . '' ); + + ?> +

      +
      + +
      +

      +

      fsockopen or gethostbynamel functions. Akismet cannot work correctly until this is fixed. Please contact your web host or firewall administrator and give them this information about Akismet’s system requirements.', 'akismet'), 'https://blog.akismet.com/akismet-hosting-faq/'); ?>

      +
      + +
      +

      +

      our guide about firewalls.', 'akismet'), 'https://blog.akismet.com/akismet-hosting-faq/'); ?>

      +
      + +
      +

      +

      update your payment details.', 'akismet'), 'https://akismet.com/account/'); ?>

      +
      + +
      +

      +

      Akismet account page to reactivate your subscription.', 'akismet'), 'https://akismet.com/account/'); ?>

      +
      + +
      +

      +

      Akismet support for assistance.', 'akismet'), 'https://akismet.com/contact/'); ?>

      +
      + +
      +

      +

      contributing a token amount.', 'akismet'), 'https://akismet.com/account/upgrade/'); ?>

      +
      + +
      +

      +

      Akismet support for assistance.', 'akismet'), 'https://akismet.com/contact/'); ?>

      +
      + +
      +

      +

      sign into your account and choose one. Please contact our support team with any questions.', 'akismet'), 'https://akismet.com/account/upgrade/', 'https://akismet.com/contact/' ); ?>

      +
      + +
      +

      +
      + +
      +

      +
      + +
      +

      +
      + +
      + +

      +

      upgrade to an Enterprise subscription. If you have any questions, please get in touch with our support team', 'akismet'), 'https://akismet.com/account/upgrade/', 'https://akismet.com/contact/'); ?>

      + +

      +

      upgrade to an Enterprise subscription, which covers an unlimited number of sites. Please contact our support team with any questions.', 'akismet'), 'https://akismet.com/account/upgrade/', 'https://akismet.com/contact/'); ?>

      + +
      + \ No newline at end of file diff --git a/wp-content/plugins/akismet/views/start.php b/wp-content/plugins/akismet/views/start.php new file mode 100644 index 0000000..692b8af --- /dev/null +++ b/wp-content/plugins/akismet/views/start.php @@ -0,0 +1,95 @@ +
      status, array( 'active', 'active-dunning', 'no-sub', 'missing', 'cancelled', 'suspended' ) ) ) : + if ( $akismet_user->status == 'missing' ) :?> +

      +
      +
      + + user_email ); ?> +
      +
      + + + + +
      +
      +status == 'cancelled' ) :?> +

      +
      +
      + + user_email ); ?> +
      +
      + + + + +
      +
      +status == 'suspended' ) : ?> +

      +
      + +

      user_email ); ?>

      +

      + +
      + +

      +
      +
      + + user_email ); ?> +
      +
      + + + + +
      +
      + +
      +
      + +

      +
      + __( 'Register a different email address' , 'akismet'), 'classes' => array( 'right', 'button', 'button-secondary' ) ) ); ?> +
      +
      +
      + +

      +
      +
      + + + + +
      +
      + +

      +
      +
      + +

      +
      + __( 'Get your API key' , 'akismet'), 'classes' => array( 'right', 'button', 'button-primary' ) ) ); ?> +
      +
      +
      + +

      +
      +
      + + + + +
      +
      +
      \ No newline at end of file diff --git a/wp-content/plugins/akismet/views/stats.php b/wp-content/plugins/akismet/views/stats.php new file mode 100644 index 0000000..1ca7661 --- /dev/null +++ b/wp-content/plugins/akismet/views/stats.php @@ -0,0 +1,4 @@ +
      +

      + +
      \ No newline at end of file diff --git a/wp-content/plugins/akismet/views/strict.php b/wp-content/plugins/akismet/views/strict.php new file mode 100644 index 0000000..3cf197c --- /dev/null +++ b/wp-content/plugins/akismet/views/strict.php @@ -0,0 +1,7 @@ + + +
      +

      +

      +
      + \ No newline at end of file diff --git a/wp-content/plugins/akismet/wrapper.php b/wp-content/plugins/akismet/wrapper.php new file mode 100644 index 0000000..71d5abf --- /dev/null +++ b/wp-content/plugins/akismet/wrapper.php @@ -0,0 +1,293 @@ + + +, Benny Baumann + * @copyright (C) 2004 - 2007 Nigel McNie, (C) 2007 - 2008 Benny Baumann + * @license http://gnu.org/copyleft/gpl.html GNU GPL + * + */ + +// +// GeSHi Constants +// You should use these constant names in your programs instead of +// their values - you never know when a value may change in a future +// version +// + +/** The version of this GeSHi file */ +define('GESHI_VERSION', '1.0.7.21'); + +// Define the root directory for the GeSHi code tree +if (!defined('GESHI_ROOT')) { + /** The root directory for GeSHi */ + define('GESHI_ROOT', dirname(__FILE__) . DIRECTORY_SEPARATOR); +} +/** The language file directory for GeSHi + @access private */ +define('GESHI_LANG_ROOT', GESHI_ROOT . 'geshi' . DIRECTORY_SEPARATOR); + + +// Line numbers - use with enable_line_numbers() +/** Use no line numbers when building the result */ +define('GESHI_NO_LINE_NUMBERS', 0); +/** Use normal line numbers when building the result */ +define('GESHI_NORMAL_LINE_NUMBERS', 1); +/** Use fancy line numbers when building the result */ +define('GESHI_FANCY_LINE_NUMBERS', 2); + +// Container HTML type +/** Use nothing to surround the source */ +define('GESHI_HEADER_NONE', 0); +/** Use a "div" to surround the source */ +define('GESHI_HEADER_DIV', 1); +/** Use a "pre" to surround the source */ +define('GESHI_HEADER_PRE', 2); + +// Capatalisation constants +/** Lowercase keywords found */ +define('GESHI_CAPS_NO_CHANGE', 0); +/** Uppercase keywords found */ +define('GESHI_CAPS_UPPER', 1); +/** Leave keywords found as the case that they are */ +define('GESHI_CAPS_LOWER', 2); + +// Link style constants +/** Links in the source in the :link state */ +define('GESHI_LINK', 0); +/** Links in the source in the :hover state */ +define('GESHI_HOVER', 1); +/** Links in the source in the :active state */ +define('GESHI_ACTIVE', 2); +/** Links in the source in the :visited state */ +define('GESHI_VISITED', 3); + +// Important string starter/finisher +// Note that if you change these, they should be as-is: i.e., don't +// write them as if they had been run through htmlentities() +/** The starter for important parts of the source */ +define('GESHI_START_IMPORTANT', ''); +/** The ender for important parts of the source */ +define('GESHI_END_IMPORTANT', ''); + +/**#@+ + * @access private + */ +// When strict mode applies for a language +/** Strict mode never applies (this is the most common) */ +define('GESHI_NEVER', 0); +/** Strict mode *might* apply, and can be enabled or + disabled by {@link GeSHi::enable_strict_mode()} */ +define('GESHI_MAYBE', 1); +/** Strict mode always applies */ +define('GESHI_ALWAYS', 2); + +// Advanced regexp handling constants, used in language files +/** The key of the regex array defining what to search for */ +define('GESHI_SEARCH', 0); +/** The key of the regex array defining what bracket group in a + matched search to use as a replacement */ +define('GESHI_REPLACE', 1); +/** The key of the regex array defining any modifiers to the regular expression */ +define('GESHI_MODIFIERS', 2); +/** The key of the regex array defining what bracket group in a + matched search to put before the replacement */ +define('GESHI_BEFORE', 3); +/** The key of the regex array defining what bracket group in a + matched search to put after the replacement */ +define('GESHI_AFTER', 4); +/** The key of the regex array defining a custom keyword to use + for this regexp's html tag class */ +define('GESHI_CLASS', 5); + +/** Used in language files to mark comments */ +define('GESHI_COMMENTS', 0); + +// Error detection - use these to analyse faults +/** No sourcecode to highlight was specified + * @deprecated + */ +define('GESHI_ERROR_NO_INPUT', 1); +/** The language specified does not exist */ +define('GESHI_ERROR_NO_SUCH_LANG', 2); +/** GeSHi could not open a file for reading (generally a language file) */ +define('GESHI_ERROR_FILE_NOT_READABLE', 3); +/** The header type passed to {@link GeSHi::set_header_type()} was invalid */ +define('GESHI_ERROR_INVALID_HEADER_TYPE', 4); +/** The line number type passed to {@link GeSHi::enable_line_numbers()} was invalid */ +define('GESHI_ERROR_INVALID_LINE_NUMBER_TYPE', 5); +/**#@-*/ + + +/** + * The GeSHi Class. + * + * Please refer to the documentation for GeSHi 1.0.X that is available + * at http://qbnz.com/highlighter/documentation.php for more information + * about how to use this class. + * + * @package geshi + * @author Nigel McNie , Benny Baumann + * @copyright (C) 2004 - 2007 Nigel McNie, (C) 2007 - 2008 Benny Baumann + */ +class GeSHi { + /**#@+ + * @access private + */ + /** + * The source code to highlight + * @var string + */ + var $source = ''; + + /** + * The language to use when highlighting + * @var string + */ + var $language = ''; + + /** + * The data for the language used + * @var array + */ + var $language_data = array(); + + /** + * The path to the language files + * @var string + */ + var $language_path = GESHI_LANG_ROOT; + + /** + * The error message associated with an error + * @var string + * @todo check err reporting works + */ + var $error = false; + + /** + * Possible error messages + * @var array + */ + var $error_messages = array( + GESHI_ERROR_NO_SUCH_LANG => 'GeSHi could not find the language {LANGUAGE} (using path {PATH})', + GESHI_ERROR_FILE_NOT_READABLE => 'The file specified for load_from_file was not readable', + GESHI_ERROR_INVALID_HEADER_TYPE => 'The header type specified is invalid', + GESHI_ERROR_INVALID_LINE_NUMBER_TYPE => 'The line number type specified is invalid' + ); + + /** + * Whether highlighting is strict or not + * @var boolean + */ + var $strict_mode = false; + + /** + * Whether to use CSS classes in output + * @var boolean + */ + var $use_classes = false; + + /** + * The type of header to use. Can be one of the following + * values: + * + * - GESHI_HEADER_PRE: Source is outputted in a "pre" HTML element. + * - GESHI_HEADER_DIV: Source is outputted in a "div" HTML element. + * - GESHI_HEADER_NONE: No header is outputted. + * + * @var int + */ + var $header_type = GESHI_HEADER_PRE; + + /** + * Array of permissions for which lexics should be highlighted + * @var array + */ + var $lexic_permissions = array( + 'KEYWORDS' => array(), + 'COMMENTS' => array('MULTI' => true), + 'REGEXPS' => array(), + 'ESCAPE_CHAR' => true, + 'BRACKETS' => true, + 'SYMBOLS' => false, + 'STRINGS' => true, + 'NUMBERS' => true, + 'METHODS' => true, + 'SCRIPT' => true + ); + + /** + * The time it took to parse the code + * @var double + */ + var $time = 0; + + /** + * The content of the header block + * @var string + */ + var $header_content = ''; + + /** + * The content of the footer block + * @var string + */ + var $footer_content = ''; + + /** + * The style of the header block + * @var string + */ + var $header_content_style = ''; + + /** + * The style of the footer block + * @var string + */ + var $footer_content_style = ''; + + /** + * Tells if a block around the highlighted source should be forced + * if not using line numbering + * @var boolean + */ + var $force_code_block = false; + + /** + * The styles for hyperlinks in the code + * @var array + */ + var $link_styles = array(); + + /** + * Whether important blocks should be recognised or not + * @var boolean + * @deprecated + * @todo REMOVE THIS FUNCTIONALITY! + */ + var $enable_important_blocks = false; + + /** + * Styles for important parts of the code + * @var string + * @deprecated + * @todo As above - rethink the whole idea of important blocks as it is buggy and + * will be hard to implement in 1.2 + */ + var $important_styles = 'font-weight: bold; color: red;'; // Styles for important parts of the code + + /** + * Whether CSS IDs should be added to the code + * @var boolean + */ + var $add_ids = false; + + /** + * Lines that should be highlighted extra + * @var array + */ + var $highlight_extra_lines = array(); + + /** + * Styles of lines that should be highlighted extra + * @var array + */ + var $highlight_extra_lines_styles = array(); + + /** + * Styles of extra-highlighted lines + * @var string + */ + var $highlight_extra_lines_style = 'color: #cc0; background-color: #ffc;'; + + /** + * The line ending + * If null, nl2br() will be used on the result string. + * Otherwise, all instances of \n will be replaced with $line_ending + * @var string + */ + var $line_ending = null; + + /** + * Number at which line numbers should start at + * @var int + */ + var $line_numbers_start = 1; + + /** + * The overall style for this code block + * @var string + */ + var $overall_style = ''; + + /** + * The style for the actual code + * @var string + */ + var $code_style = 'font-family: \'Courier New\', Courier, monospace; font-weight: normal;'; + + /** + * The overall class for this code block + * @var string + */ + var $overall_class = ''; + + /** + * The overall ID for this code block + * @var string + */ + var $overall_id = ''; + + /** + * Line number styles + * @var string + */ + var $line_style1 = 'font-family: \'Courier New\', Courier, monospace; color: black; font-weight: normal; font-style: normal;'; + + /** + * Line number styles for fancy lines + * @var string + */ + var $line_style2 = 'font-weight: bold;'; + + /** + * Flag for how line nubmers are displayed + * @var boolean + */ + var $line_numbers = GESHI_NO_LINE_NUMBERS; + + /** + * The "nth" value for fancy line highlighting + * @var int + */ + var $line_nth_row = 0; + + /** + * The size of tab stops + * @var int + */ + var $tab_width = 8; + + /** + * Should we use language-defined tab stop widths? + * @var int + */ + var $use_language_tab_width = false; + + /** + * Default target for keyword links + * @var string + */ + var $link_target = ''; + + /** + * The encoding to use for entity encoding + * NOTE: no longer used + * @var string + */ + var $encoding = 'ISO-8859-1'; + + /** + * Should keywords be linked? + * @var boolean + */ + var $keyword_links = true; + + /**#@-*/ + + /** + * Creates a new GeSHi object, with source and language + * + * @param string The source code to highlight + * @param string The language to highlight the source with + * @param string The path to the language file directory. This + * is deprecated! I've backported the auto path + * detection from the 1.1.X dev branch, so now it + * should be automatically set correctly. If you have + * renamed the language directory however, you will + * still need to set the path using this parameter or + * {@link GeSHi::set_language_path()} + * @since 1.0.0 + */ + function GeSHi($source, $language, $path = '') { + $this->set_source($source); + $this->set_language_path($path); + $this->set_language($language); + } + + /** + * Returns an error message associated with the last GeSHi operation, + * or false if no error has occured + * + * @return string|false An error message if there has been an error, else false + * @since 1.0.0 + */ + function error() { + if ($this->error) { + $msg = $this->error_messages[$this->error]; + $debug_tpl_vars = array( + '{LANGUAGE}' => $this->language, + '{PATH}' => $this->language_path + ); + foreach ($debug_tpl_vars as $tpl => $var) { + $msg = str_replace($tpl, $var, $msg); + } + return "
      GeSHi Error: $msg (code $this->error)
      "; + } + return false; + } + + /** + * Gets a human-readable language name (thanks to Simon Patterson + * for the idea :)) + * + * @return string The name for the current language + * @since 1.0.2 + */ + function get_language_name() { + if (GESHI_ERROR_NO_SUCH_LANG == $this->error) { + return $this->language_data['LANG_NAME'] . ' (Unknown Language)'; + } + return $this->language_data['LANG_NAME']; + } + + /** + * Sets the source code for this object + * + * @param string The source code to highlight + * @since 1.0.0 + */ + function set_source($source) { + $this->source = $source; + $this->highlight_extra_lines = array(); + } + + /** + * Sets the language for this object + * + * @param string The name of the language to use + * @since 1.0.0 + */ + function set_language($language) { + $this->error = false; + $this->strict_mode = GESHI_NEVER; + + $language = preg_replace('#[^a-zA-Z0-9\-_]#', '', $language); + $this->language = strtolower($language); + + $file_name = $this->language_path . $this->language . '.php'; + if (!is_readable($file_name)) { + $this->error = GESHI_ERROR_NO_SUCH_LANG; + return; + } + // Load the language for parsing + $this->load_language($file_name); + } + + /** + * Sets the path to the directory containing the language files. Note + * that this path is relative to the directory of the script that included + * geshi.php, NOT geshi.php itself. + * + * @param string The path to the language directory + * @since 1.0.0 + * @deprecated The path to the language files should now be automatically + * detected, so this method should no longer be needed. The + * 1.1.X branch handles manual setting of the path differently + * so this method will disappear in 1.2.0. + */ + function set_language_path($path) { + if ($path) { + $this->language_path = ('/' == substr($path, strlen($path) - 1, 1)) ? $path : $path . '/'; + $this->set_language($this->language); // otherwise set_language_path has no effect + } + } + + /** + * Sets the type of header to be used. + * + * If GESHI_HEADER_DIV is used, the code is surrounded in a "div".This + * means more source code but more control over tab width and line-wrapping. + * GESHI_HEADER_PRE means that a "pre" is used - less source, but less + * control. Default is GESHI_HEADER_PRE. + * + * From 1.0.7.2, you can use GESHI_HEADER_NONE to specify that no header code + * should be outputted. + * + * @param int The type of header to be used + * @since 1.0.0 + */ + function set_header_type($type) { + if (GESHI_HEADER_DIV != $type && GESHI_HEADER_PRE != $type && GESHI_HEADER_NONE != $type) { + $this->error = GESHI_ERROR_INVALID_HEADER_TYPE; + return; + } + $this->header_type = $type; + // Set a default overall style if the header is a
      + if (GESHI_HEADER_DIV == $type && !$this->overall_style) { + $this->overall_style = 'font-family: monospace;'; + } + } + + /** + * Sets the styles for the code that will be outputted + * when this object is parsed. The style should be a + * string of valid stylesheet declarations + * + * @param string The overall style for the outputted code block + * @param boolean Whether to merge the styles with the current styles or not + * @since 1.0.0 + */ + function set_overall_style($style, $preserve_defaults = false) { + if (!$preserve_defaults) { + $this->overall_style = $style; + } + else { + $this->overall_style .= $style; + } + } + + /** + * Sets the overall classname for this block of code. This + * class can then be used in a stylesheet to style this object's + * output + * + * @param string The class name to use for this block of code + * @since 1.0.0 + */ + function set_overall_class($class) { + $this->overall_class = $class; + } + + /** + * Sets the overall id for this block of code. This id can then + * be used in a stylesheet to style this object's output + * + * @param string The ID to use for this block of code + * @since 1.0.0 + */ + function set_overall_id($id) { + $this->overall_id = $id; + } + + /** + * Sets whether CSS classes should be used to highlight the source. Default + * is off, calling this method with no arguments will turn it on + * + * @param boolean Whether to turn classes on or not + * @since 1.0.0 + */ + function enable_classes($flag = true) { + $this->use_classes = ($flag) ? true : false; + } + + /** + * Sets the style for the actual code. This should be a string + * containing valid stylesheet declarations. If $preserve_defaults is + * true, then styles are merged with the default styles, with the + * user defined styles having priority + * + * Note: Use this method to override any style changes you made to + * the line numbers if you are using line numbers, else the line of + * code will have the same style as the line number! Consult the + * GeSHi documentation for more information about this. + * + * @param string The style to use for actual code + * @param boolean Whether to merge the current styles with the new styles + * @since 1.0.2 + */ + function set_code_style($style, $preserve_defaults = false) { + if (!$preserve_defaults) { + $this->code_style = $style; + } + else { + $this->code_style .= $style; + } + } + + /** + * Sets the styles for the line numbers. + * + * @param string The style for the line numbers that are "normal" + * @param string|boolean If a string, this is the style of the line + * numbers that are "fancy", otherwise if boolean then this + * defines whether the normal styles should be merged with the + * new normal styles or not + * @param boolean If set, is the flag for whether to merge the "fancy" + * styles with the current styles or not + * @since 1.0.2 + */ + function set_line_style($style1, $style2 = '', $preserve_defaults = false) { + if (is_bool($style2)) { + $preserve_defaults = $style2; + $style2 = ''; + } + if (!$preserve_defaults) { + $this->line_style1 = $style1; + $this->line_style2 = $style2; + } + else { + $this->line_style1 .= $style1; + $this->line_style2 .= $style2; + } + } + + /** + * Sets whether line numbers should be displayed. + * + * Valid values for the first parameter are: + * + * - GESHI_NO_LINE_NUMBERS: Line numbers will not be displayed + * - GESHI_NORMAL_LINE_NUMBERS: Line numbers will be displayed + * - GESHI_FANCY_LINE_NUMBERS: Fancy line numbers will be displayed + * + * For fancy line numbers, the second parameter is used to signal which lines + * are to be fancy. For example, if the value of this parameter is 5 then every + * 5th line will be fancy. + * + * @param int How line numbers should be displayed + * @param int Defines which lines are fancy + * @since 1.0.0 + */ + function enable_line_numbers($flag, $nth_row = 5) { + if (GESHI_NO_LINE_NUMBERS != $flag && GESHI_NORMAL_LINE_NUMBERS != $flag + && GESHI_FANCY_LINE_NUMBERS != $flag) { + $this->error = GESHI_ERROR_INVALID_LINE_NUMBER_TYPE; + } + $this->line_numbers = $flag; + $this->line_nth_row = $nth_row; + } + + /** + * Sets the style for a keyword group. If $preserve_defaults is + * true, then styles are merged with the default styles, with the + * user defined styles having priority + * + * @param int The key of the keyword group to change the styles of + * @param string The style to make the keywords + * @param boolean Whether to merge the new styles with the old or just + * to overwrite them + * @since 1.0.0 + */ + function set_keyword_group_style($key, $style, $preserve_defaults = false) { + if (!$preserve_defaults) { + $this->language_data['STYLES']['KEYWORDS'][$key] = $style; + } + else { + $this->language_data['STYLES']['KEYWORDS'][$key] .= $style; + } + } + + /** + * Turns highlighting on/off for a keyword group + * + * @param int The key of the keyword group to turn on or off + * @param boolean Whether to turn highlighting for that group on or off + * @since 1.0.0 + */ + function set_keyword_group_highlighting($key, $flag = true) { + $this->lexic_permissions['KEYWORDS'][$key] = ($flag) ? true : false; + } + + /** + * Sets the styles for comment groups. If $preserve_defaults is + * true, then styles are merged with the default styles, with the + * user defined styles having priority + * + * @param int The key of the comment group to change the styles of + * @param string The style to make the comments + * @param boolean Whether to merge the new styles with the old or just + * to overwrite them + * @since 1.0.0 + */ + function set_comments_style($key, $style, $preserve_defaults = false) { + if (!$preserve_defaults) { + $this->language_data['STYLES']['COMMENTS'][$key] = $style; + } + else { + $this->language_data['STYLES']['COMMENTS'][$key] .= $style; + } + } + + /** + * Turns highlighting on/off for comment groups + * + * @param int The key of the comment group to turn on or off + * @param boolean Whether to turn highlighting for that group on or off + * @since 1.0.0 + */ + function set_comments_highlighting($key, $flag = true) { + $this->lexic_permissions['COMMENTS'][$key] = ($flag) ? true : false; + } + + /** + * Sets the styles for escaped characters. If $preserve_defaults is + * true, then styles are merged with the default styles, with the + * user defined styles having priority + * + * @param string The style to make the escape characters + * @param boolean Whether to merge the new styles with the old or just + * to overwrite them + * @since 1.0.0 + */ + function set_escape_characters_style($style, $preserve_defaults = false) { + if (!$preserve_defaults) { + $this->language_data['STYLES']['ESCAPE_CHAR'][0] = $style; + } + else { + $this->language_data['STYLES']['ESCAPE_CHAR'][0] .= $style; + } + } + + /** + * Turns highlighting on/off for escaped characters + * + * @param boolean Whether to turn highlighting for escape characters on or off + * @since 1.0.0 + */ + function set_escape_characters_highlighting($flag = true) { + $this->lexic_permissions['ESCAPE_CHAR'] = ($flag) ? true : false; + } + + /** + * Sets the styles for brackets. If $preserve_defaults is + * true, then styles are merged with the default styles, with the + * user defined styles having priority + * + * This method is DEPRECATED: use set_symbols_style instead. + * This method will be removed in 1.2.X + * + * @param string The style to make the brackets + * @param boolean Whether to merge the new styles with the old or just + * to overwrite them + * @since 1.0.0 + * @deprecated In favour of set_symbols_style + */ + function set_brackets_style($style, $preserve_defaults = false) { + if (!$preserve_defaults) { + $this->language_data['STYLES']['BRACKETS'][0] = $style; + } + else { + $this->language_data['STYLES']['BRACKETS'][0] .= $style; + } + } + + /** + * Turns highlighting on/off for brackets + * + * This method is DEPRECATED: use set_symbols_highlighting instead. + * This method will be remove in 1.2.X + * + * @param boolean Whether to turn highlighting for brackets on or off + * @since 1.0.0 + * @deprecated In favour of set_symbols_highlighting + */ + function set_brackets_highlighting($flag) { + $this->lexic_permissions['BRACKETS'] = ($flag) ? true : false; + } + + /** + * Sets the styles for symbols. If $preserve_defaults is + * true, then styles are merged with the default styles, with the + * user defined styles having priority + * + * @param string The style to make the symbols + * @param boolean Whether to merge the new styles with the old or just + * to overwrite them + * @param int Tells the group of symbols for which style should be set. + * @since 1.0.1 + */ + function set_symbols_style($style, $preserve_defaults = false, $group = 0) { + if (!$preserve_defaults) { + $this->language_data['STYLES']['SYMBOLS'][$group] = $style; + } + else { + $this->language_data['STYLES']['SYMBOLS'][$group] .= $style; + } + // For backward compatibility + if(0 == $group) { + $this->set_brackets_style ($style, $preserve_defaults); + } + } + + /** + * Turns highlighting on/off for symbols + * + * @param boolean Whether to turn highlighting for symbols on or off + * @since 1.0.0 + */ + function set_symbols_highlighting($flag) { + $this->lexic_permissions['SYMBOLS'] = ($flag) ? true : false; + // For backward compatibility + $this->set_brackets_highlighting ($flag); + } + + /** + * Sets the styles for strings. If $preserve_defaults is + * true, then styles are merged with the default styles, with the + * user defined styles having priority + * + * @param string The style to make the escape characters + * @param boolean Whether to merge the new styles with the old or just + * to overwrite them + * @since 1.0.0 + */ + function set_strings_style($style, $preserve_defaults = false) { + if (!$preserve_defaults) { + $this->language_data['STYLES']['STRINGS'][0] = $style; + } + else { + $this->language_data['STYLES']['STRINGS'][0] .= $style; + } + } + + /** + * Turns highlighting on/off for strings + * + * @param boolean Whether to turn highlighting for strings on or off + * @since 1.0.0 + */ + function set_strings_highlighting($flag) { + $this->lexic_permissions['STRINGS'] = ($flag) ? true : false; + } + + /** + * Sets the styles for numbers. If $preserve_defaults is + * true, then styles are merged with the default styles, with the + * user defined styles having priority + * + * @param string The style to make the numbers + * @param boolean Whether to merge the new styles with the old or just + * to overwrite them + * @since 1.0.0 + */ + function set_numbers_style($style, $preserve_defaults = false) { + if (!$preserve_defaults) { + $this->language_data['STYLES']['NUMBERS'][0] = $style; + } + else { + $this->language_data['STYLES']['NUMBERS'][0] .= $style; + } + } + + /** + * Turns highlighting on/off for numbers + * + * @param boolean Whether to turn highlighting for numbers on or off + * @since 1.0.0 + */ + function set_numbers_highlighting($flag) { + $this->lexic_permissions['NUMBERS'] = ($flag) ? true : false; + } + + /** + * Sets the styles for methods. $key is a number that references the + * appropriate "object splitter" - see the language file for the language + * you are highlighting to get this number. If $preserve_defaults is + * true, then styles are merged with the default styles, with the + * user defined styles having priority + * + * @param int The key of the object splitter to change the styles of + * @param string The style to make the methods + * @param boolean Whether to merge the new styles with the old or just + * to overwrite them + * @since 1.0.0 + */ + function set_methods_style($key, $style, $preserve_defaults = false) { + if (!$preserve_defaults) { + $this->language_data['STYLES']['METHODS'][$key] = $style; + } + else { + $this->language_data['STYLES']['METHODS'][$key] .= $style; + } + } + + /** + * Turns highlighting on/off for methods + * + * @param boolean Whether to turn highlighting for methods on or off + * @since 1.0.0 + */ + function set_methods_highlighting($flag) { + $this->lexic_permissions['METHODS'] = ($flag) ? true : false; + } + + /** + * Sets the styles for regexps. If $preserve_defaults is + * true, then styles are merged with the default styles, with the + * user defined styles having priority + * + * @param string The style to make the regular expression matches + * @param boolean Whether to merge the new styles with the old or just + * to overwrite them + * @since 1.0.0 + */ + function set_regexps_style($key, $style, $preserve_defaults = false) { + if (!$preserve_defaults) { + $this->language_data['STYLES']['REGEXPS'][$key] = $style; + } + else { + $this->language_data['STYLES']['REGEXPS'][$key] .= $style; + } + } + + /** + * Turns highlighting on/off for regexps + * + * @param int The key of the regular expression group to turn on or off + * @param boolean Whether to turn highlighting for the regular expression group on or off + * @since 1.0.0 + */ + function set_regexps_highlighting($key, $flag) { + $this->lexic_permissions['REGEXPS'][$key] = ($flag) ? true : false; + } + + /** + * Sets whether a set of keywords are checked for in a case sensitive manner + * + * @param int The key of the keyword group to change the case sensitivity of + * @param boolean Whether to check in a case sensitive manner or not + * @since 1.0.0 + */ + function set_case_sensitivity($key, $case) { + $this->language_data['CASE_SENSITIVE'][$key] = ($case) ? true : false; + } + + /** + * Sets the case that keywords should use when found. Use the constants: + * + * - GESHI_CAPS_NO_CHANGE: leave keywords as-is + * - GESHI_CAPS_UPPER: convert all keywords to uppercase where found + * - GESHI_CAPS_LOWER: convert all keywords to lowercase where found + * + * @param int A constant specifying what to do with matched keywords + * @since 1.0.1 + */ + function set_case_keywords($case) { + if(in_array($case, array( + GESHI_CAPS_NO_CHANGE, GESHI_CAPS_UPPER, GESHI_CAPS_LOWER))) { + $this->language_data['CASE_KEYWORDS'] = $case; + } + } + + /** + * Sets how many spaces a tab is substituted for + * + * Widths below zero are ignored + * + * @param int The tab width + * @since 1.0.0 + */ + function set_tab_width($width) { + $this->tab_width = intval($width); + //Check if it fit's the constraints: + if($this->tab_width < 1) { + //Return it to the default + $this->tab_width = 8; + } + } + + /** + * Sets whether or not to use tab-stop width specifed by language + * + * @param boolean Whether to use language-specific tab-stop widths + * @since 1.0.7.20 + */ + function set_use_language_tab_width($use) { + $this->use_language_tab_width = (bool) $use; + } + + /** + * Returns the tab width to use, based on the current language and user + * preference + * + * @return int Tab width + * @since 1.0.7.20 + */ + function get_real_tab_width() { + if (!$this->use_language_tab_width || !isset($this->language_data['TAB_WIDTH'])) { + return $this->tab_width; + } else { + return $this->language_data['TAB_WIDTH']; + } + } + + /** + * Enables/disables strict highlighting. Default is off, calling this + * method without parameters will turn it on. See documentation + * for more details on strict mode and where to use it. + * + * @param boolean Whether to enable strict mode or not + * @since 1.0.0 + */ + function enable_strict_mode($mode = true) { + if (GESHI_MAYBE == $this->language_data['STRICT_MODE_APPLIES']) { + $this->strict_mode = ($mode) ? true : false; + } + } + + /** + * Disables all highlighting + * + * @since 1.0.0 + * @todo Rewrite with array traversal + * @deprecated In favour of enable_highlighting + */ + function disable_highlighting() { + $this->enable_highlighting(false); + } + + /** + * Enables all highlighting + * + * The optional flag parameter was added in version 1.0.7.21 and can be used + * to enable (true) or disable (false) all highlighting. + * + * @since 1.0.0 + * @param boolean A flag specifying whether to enable or disable all highlighting + * @todo Rewrite with array traversal + */ + function enable_highlighting($flag = true) { + $flag = $flag ? true : false; + foreach ($this->lexic_permissions as $key => $value) { + if (is_array($value)) { + foreach ($value as $k => $v) { + $this->lexic_permissions[$key][$k] = $flag; + } + } + else { + $this->lexic_permissions[$key] = $flag; + } + } + // Context blocks + $this->enable_important_blocks = $flag; + } + + /** + * Given a file extension, this method returns either a valid geshi language + * name, or the empty string if it couldn't be found + * + * @param string The extension to get a language name for + * @param array A lookup array to use instead of the default one + * @since 1.0.5 + * @todo Re-think about how this method works (maybe make it private and/or make it + * a extension->lang lookup?) + * @todo static? + */ + function get_language_name_from_extension( $extension, $lookup = array() ) { + if ( !is_array($lookup) || !count($lookup)) { + $lookup = array( + 'actionscript' => array('as'), + 'ada' => array('a', 'ada', 'adb', 'ads'), + 'apache' => array('conf'), + 'asm' => array('ash', 'asm'), + 'asp' => array('asp'), + 'bash' => array('sh'), + 'c' => array('c', 'h'), + 'c_mac' => array('c', 'h'), + 'caddcl' => array(), + 'cadlisp' => array(), + 'cdfg' => array('cdfg'), + 'cpp' => array('cpp', 'h', 'hpp'), + 'csharp' => array(), + 'css' => array('css'), + 'delphi' => array('dpk', 'dpr', 'pp', 'pas'), + 'dos' => array('bat', 'cmd'), + 'html4strict' => array('html', 'htm'), + 'java' => array('java'), + 'javascript' => array('js'), + 'lisp' => array('lisp'), + 'lua' => array('lua'), + 'mpasm' => array(), + 'nsis' => array(), + 'objc' => array(), + 'oobas' => array(), + 'oracle8' => array(), + 'pascal' => array(), + 'perl' => array('pl', 'pm'), + 'php' => array('php', 'php5', 'phtml', 'phps'), + 'python' => array('py'), + 'qbasic' => array('bi'), + 'sas' => array('sas'), + 'smarty' => array(), + 'vb' => array('bas'), + 'vbnet' => array(), + 'visualfoxpro' => array(), + 'xml' => array('xml') + ); + } + + foreach ($lookup as $lang => $extensions) { + foreach ($extensions as $ext) { + if ($ext == $extension) { + return $lang; + } + } + } + return ''; + } + + /** + * Given a file name, this method loads its contents in, and attempts + * to set the language automatically. An optional lookup table can be + * passed for looking up the language name. If not specified a default + * table is used + * + * The language table is in the form + *
      array(
      +     *   'lang_name' => array('extension', 'extension', ...),
      +     *   'lang_name' ...
      +     * );
      + * + * @param string The filename to load the source from + * @param array A lookup array to use instead of the default one + * @todo Complete rethink of this and above method + * @since 1.0.5 + */ + function load_from_file($file_name, $lookup = array()) { + if (is_readable($file_name)) { + $this->set_source(implode('', file($file_name))); + $this->set_language($this->get_language_name_from_extension(substr(strrchr($file_name, '.'), 1), $lookup)); + } + else { + $this->error = GESHI_ERROR_FILE_NOT_READABLE; + } + } + + /** + * Adds a keyword to a keyword group for highlighting + * + * @param int The key of the keyword group to add the keyword to + * @param string The word to add to the keyword group + * @since 1.0.0 + */ + function add_keyword($key, $word) { + $this->language_data['KEYWORDS'][$key][] = $word; + } + + /** + * Removes a keyword from a keyword group + * + * @param int The key of the keyword group to remove the keyword from + * @param string The word to remove from the keyword group + * @since 1.0.0 + */ + function remove_keyword($key, $word) { + $this->language_data['KEYWORDS'][$key] = + array_diff($this->language_data['KEYWORDS'][$key], array($word)); + } + + /** + * Creates a new keyword group + * + * @param int The key of the keyword group to create + * @param string The styles for the keyword group + * @param boolean Whether the keyword group is case sensitive ornot + * @param array The words to use for the keyword group + * @since 1.0.0 + */ + function add_keyword_group($key, $styles, $case_sensitive = true, $words = array()) { + $words = (array) $words; + $this->language_data['KEYWORDS'][$key] = $words; + $this->lexic_permissions['KEYWORDS'][$key] = true; + $this->language_data['CASE_SENSITIVE'][$key] = $case_sensitive; + $this->language_data['STYLES']['KEYWORDS'][$key] = $styles; + } + + /** + * Removes a keyword group + * + * @param int The key of the keyword group to remove + * @since 1.0.0 + */ + function remove_keyword_group ($key) { + unset($this->language_data['KEYWORDS'][$key]); + unset($this->lexic_permissions['KEYWORDS'][$key]); + unset($this->language_data['CASE_SENSITIVE'][$key]); + unset($this->language_data['STYLES']['KEYWORDS'][$key]); + } + + /** + * Sets the content of the header block + * + * @param string The content of the header block + * @since 1.0.2 + */ + function set_header_content($content) { + $this->header_content = $content; + } + + /** + * Sets the content of the footer block + * + * @param string The content of the footer block + * @since 1.0.2 + */ + function set_footer_content($content) { + $this->footer_content = $content; + } + + /** + * Sets the style for the header content + * + * @param string The style for the header content + * @since 1.0.2 + */ + function set_header_content_style($style) { + $this->header_content_style = $style; + } + + /** + * Sets the style for the footer content + * + * @param string The style for the footer content + * @since 1.0.2 + */ + function set_footer_content_style($style) { + $this->footer_content_style = $style; + } + + /** + * Sets whether to force a surrounding block around + * the highlighted code or not + * + * @param boolean Tells whether to enable or disable this feature + * @since 1.0.7.20 + */ + function enable_inner_code_block($flag) { + $this->force_code_block = (bool)$flag; + } + + /** + * Sets the base URL to be used for keywords + * + * @param int The key of the keyword group to set the URL for + * @param string The URL to set for the group. If {FNAME} is in + * the url somewhere, it is replaced by the keyword + * that the URL is being made for + * @since 1.0.2 + */ + function set_url_for_keyword_group($group, $url) { + $this->language_data['URLS'][$group] = $url; + } + + /** + * Sets styles for links in code + * + * @param int A constant that specifies what state the style is being + * set for - e.g. :hover or :visited + * @param string The styles to use for that state + * @since 1.0.2 + */ + function set_link_styles($type, $styles) { + $this->link_styles[$type] = $styles; + } + + /** + * Sets the target for links in code + * + * @param string The target for links in the code, e.g. _blank + * @since 1.0.3 + */ + function set_link_target($target) { + if (!$target) { + $this->link_target = ''; + } + else { + $this->link_target = ' target="' . $target . '" '; + } + } + + /** + * Sets styles for important parts of the code + * + * @param string The styles to use on important parts of the code + * @since 1.0.2 + */ + function set_important_styles($styles) { + $this->important_styles = $styles; + } + + /** + * Sets whether context-important blocks are highlighted + * + * @param boolean Tells whether to enable or disable highlighting of important blocks + * @todo REMOVE THIS SHIZ FROM GESHI! + * @deprecated + * @since 1.0.2 + */ + function enable_important_blocks($flag) { + $this->enable_important_blocks = ( $flag ) ? true : false; + } + + /** + * Whether CSS IDs should be added to each line + * + * @param boolean If true, IDs will be added to each line. + * @since 1.0.2 + */ + function enable_ids($flag = true) { + $this->add_ids = ($flag) ? true : false; + } + + /** + * Specifies which lines to highlight extra + * + * The extra style parameter was added in 1.0.7.21. + * + * @param mixed An array of line numbers to highlight, or just a line + * number on its own. + * @param string A string specifying the style to use for this line + * @since 1.0.2 + * @todo Some data replication here that could be cut down on + */ + function highlight_lines_extra($lines, $style = null) { + if (is_array($lines)) { + foreach ($lines as $line) { + $this->highlight_lines_extra(line, $style); + } + } + else { + $this->highlight_extra_lines[intval($lines)] = intval($lines); + if ($style != null) { + $this->highlight_extra_lines_styles[intval($lines)] = $style; + } else { + unset($this->highlight_extra_lines_styles[intval($lines)]); + } + } + } + + /** + * Sets the style for extra-highlighted lines + * + * @param string The style for extra-highlighted lines + * @since 1.0.2 + */ + function set_highlight_lines_extra_style($styles) { + $this->highlight_extra_lines_style = $styles; + } + + /** + * Sets the line-ending + * + * @param string The new line-ending + * @since 1.0.2 + */ + function set_line_ending($line_ending) { + $this->line_ending = (string)$line_ending; + } + + /** + * Sets what number line numbers should start at. Should + * be a positive integer, and will be converted to one. + * + * Warning: Using this method will add the "start" + * attribute to the <ol> that is used for line numbering. + * This is not valid XHTML strict, so if that's what you + * care about then don't use this method. Firefox is getting + * support for the CSS method of doing this in 1.1 and Opera + * has support for the CSS method, but (of course) IE doesn't + * so it's not worth doing it the CSS way yet. + * + * @param int The number to start line numbers at + * @since 1.0.2 + */ + function start_line_numbers_at($number) { + $this->line_numbers_start = abs(intval($number)); + } + + /** + * Sets the encoding used for htmlspecialchars(), for international + * support. + * + * NOTE: This is not needed for now because htmlspecialchars() is not + * being used (it has a security hole in PHP4 that has not been patched). + * Maybe in a future version it may make a return for speed reasons, but + * I doubt it. + * + * @param string The encoding to use for the source + * @since 1.0.3 + */ + function set_encoding($encoding) { + if ($encoding) { + $this->encoding = $encoding; + } + } + + /** + * Turns linking of keywords on or off. + * + * @param boolean If true, links will be added to keywords + * @since 1.0.2 + */ + function enable_keyword_links($enable = true) { + $this->keyword_links = ($enable) ? true : false; + } + + /** + * Returns the code in $this->source, highlighted and surrounded by the + * nessecary HTML. + * + * This should only be called ONCE, cos it's SLOW! If you want to highlight + * the same source multiple times, you're better off doing a whole lot of + * str_replaces to replace the <span>s + * + * @since 1.0.0 + */ + function parse_code () { + // Start the timer + $start_time = microtime(); + + // Firstly, if there is an error, we won't highlight + if ($this->error) { + $result = GeSHi::hsc($this->source); + // Timing is irrelevant + $this->set_time($start_time, $start_time); + return $this->finalise($result); + } + + // Replace all newlines to a common form. + $code = str_replace("\r\n", "\n", $this->source); + $code = str_replace("\r", "\n", $code); + // Add spaces for regular expression matching and line numbers + $code = "\n" . $code . "\n"; + + // Initialise various stuff + $length = strlen($code); + $STRING_OPEN = ''; + $CLOSE_STRING = false; + $ESCAPE_CHAR_OPEN = false; + $COMMENT_MATCHED = false; + // Turn highlighting on if strict mode doesn't apply to this language + $HIGHLIGHTING_ON = ( !$this->strict_mode ) ? true : ''; + // Whether to highlight inside a block of code + $HIGHLIGHT_INSIDE_STRICT = false; + $HARDQUOTE_OPEN = false; + $STRICTATTRS = ''; + $stuff_to_parse = ''; + $result = ''; + + // "Important" selections are handled like multiline comments + // @todo GET RID OF THIS SHIZ + if ($this->enable_important_blocks) { + $this->language_data['COMMENT_MULTI'][GESHI_START_IMPORTANT] = GESHI_END_IMPORTANT; + } + + if ($this->strict_mode) { + // Break the source into bits. Each bit will be a portion of the code + // within script delimiters - for example, HTML between < and > + $parts = array(0 => array(0 => '')); + $k = 0; + for ($i = 0; $i < $length; $i++) { + $char = substr($code, $i, 1); + if (!$HIGHLIGHTING_ON) { + foreach ($this->language_data['SCRIPT_DELIMITERS'] as $key => $delimiters) { + foreach ($delimiters as $open => $close) { + // Get the next little bit for this opening string + $check = substr($code, $i, strlen($open)); + // If it matches... + if ($check == $open) { + // We start a new block with the highlightable + // code in it + $HIGHLIGHTING_ON = $open; + $i += strlen($open) - 1; + $char = $open; + $parts[++$k][0] = $char; + + // No point going around again... + break(2); + } + } + } + } + else { + foreach ($this->language_data['SCRIPT_DELIMITERS'] as $key => $delimiters) { + foreach ($delimiters as $open => $close) { + if ($open == $HIGHLIGHTING_ON) { + // Found the closing tag + break(2); + } + } + } + // We check code from our current position BACKWARDS. This is so + // the ending string for highlighting can be included in the block + $check = substr($code, $i - strlen($close) + 1, strlen($close)); + if ($check == $close) { + $HIGHLIGHTING_ON = ''; + // Add the string to the rest of the string for this part + $parts[$k][1] = ( isset($parts[$k][1]) ) ? $parts[$k][1] . $char : $char; + $parts[++$k][0] = ''; + $char = ''; + } + } + $parts[$k][1] = ( isset($parts[$k][1]) ) ? $parts[$k][1] . $char : $char; + } + $HIGHLIGHTING_ON = ''; + } + else { + // Not strict mode - simply dump the source into + // the array at index 1 (the first highlightable block) + $parts = array( + 1 => array( + 0 => '', + 1 => $code + ) + ); + } + + // Now we go through each part. We know that even-indexed parts are + // code that shouldn't be highlighted, and odd-indexed parts should + // be highlighted + foreach ($parts as $key => $data) { + $part = $data[1]; + // If this block should be highlighted... + if ($key % 2) { + if ($this->strict_mode) { + // Find the class key for this block of code + foreach ($this->language_data['SCRIPT_DELIMITERS'] as $script_key => $script_data) { + foreach ($script_data as $open => $close) { + if ($data[0] == $open) { + break(2); + } + } + } + + if ($this->language_data['STYLES']['SCRIPT'][$script_key] != '' && + $this->lexic_permissions['SCRIPT']) { + // Add a span element around the source to + // highlight the overall source block + if (!$this->use_classes && + $this->language_data['STYLES']['SCRIPT'][$script_key] != '') { + $attributes = ' style="' . $this->language_data['STYLES']['SCRIPT'][$script_key] . '"'; + } + else { + $attributes = ' class="sc' . $script_key . '"'; + } + $result .= ""; + $STRICTATTRS = $attributes; + } + } + + if (!$this->strict_mode || $this->language_data['HIGHLIGHT_STRICT_BLOCK'][$script_key]) { + // Now, highlight the code in this block. This code + // is really the engine of GeSHi (along with the method + // parse_non_string_part). + $length = strlen($part); + for ($i = 0; $i < $length; $i++) { + // Get the next char + $char = substr($part, $i, 1); + $hq = isset($this->language_data['HARDQUOTE']) ? $this->language_data['HARDQUOTE'][0] : false; + // Is this char the newline and line numbers being used? + if (($this->line_numbers != GESHI_NO_LINE_NUMBERS + || count($this->highlight_extra_lines) > 0) + && $char == "\n") { + // If so, is there a string open? If there is, we should end it before + // the newline and begin it again (so when
    • s are put in the source + // remains XHTML compliant) + // note to self: This opens up possibility of config files specifying + // that languages can/cannot have multiline strings??? + if ($STRING_OPEN) { + if (!$this->use_classes) { + $attributes = ' style="' . $this->language_data['STYLES']['STRINGS'][0] . '"'; + } + else { + $attributes = ' class="st0"'; + } + $char = '' . $char . ""; + } + } + else if ($char == $STRING_OPEN) { + // A match of a string delimiter + if (($this->lexic_permissions['ESCAPE_CHAR'] && $ESCAPE_CHAR_OPEN) || + ($this->lexic_permissions['STRINGS'] && !$ESCAPE_CHAR_OPEN)) { + $char = GeSHi::hsc($char) . ''; + } + $escape_me = false; + if ($HARDQUOTE_OPEN) { + if ($ESCAPE_CHAR_OPEN) { + $escape_me = true; + } + else { + foreach ($this->language_data['HARDESCAPE'] as $hardesc) { + if (substr($part, $i, strlen($hardesc)) == $hardesc) { + $escape_me = true; + break; + } + } + } + } + + if (!$ESCAPE_CHAR_OPEN) { + $STRING_OPEN = ''; + $CLOSE_STRING = true; + } + if (!$escape_me) { + $HARDQUOTE_OPEN = false; + } + $ESCAPE_CHAR_OPEN = false; + } + else if (in_array($char, $this->language_data['QUOTEMARKS']) && + ($STRING_OPEN == '') && $this->lexic_permissions['STRINGS']) { + // The start of a new string + $STRING_OPEN = $char; + if (!$this->use_classes) { + $attributes = ' style="' . $this->language_data['STYLES']['STRINGS'][0] . '"'; + } + else { + $attributes = ' class="st0"'; + } + $char = "" . GeSHi::hsc($char); + + $result .= $this->parse_non_string_part( $stuff_to_parse ); + $stuff_to_parse = ''; + } + else if ($hq && substr($part, $i, strlen($hq)) == $hq && + ($STRING_OPEN == '') && $this->lexic_permissions['STRINGS']) { + // The start of a hard quoted string + $STRING_OPEN = $this->language_data['HARDQUOTE'][1]; + if (!$this->use_classes) { + $attributes = ' style="' . $this->language_data['STYLES']['STRINGS'][0] . '"'; + } + else { + $attributes = ' class="st0"'; + } + $char = "" . $hq; + $i += strlen($hq) - 1; + $HARDQUOTE_OPEN = true; + $result .= $this->parse_non_string_part($stuff_to_parse); + $stuff_to_parse = ''; + } + else if ($char == $this->language_data['ESCAPE_CHAR'] && $STRING_OPEN != '') { + // An escape character + if (!$ESCAPE_CHAR_OPEN) { + $ESCAPE_CHAR_OPEN = !$HARDQUOTE_OPEN; // true unless $HARDQUOTE_OPEN + if ($HARDQUOTE_OPEN) { + foreach ($this->language_data['HARDESCAPE'] as $hard) { + if (substr($part, $i, strlen($hard)) == $hard) { + $ESCAPE_CHAR_OPEN = true; + break; + } + } + } + if ($ESCAPE_CHAR_OPEN && $this->lexic_permissions['ESCAPE_CHAR']) { + if (!$this->use_classes) { + $attributes = ' style="' . $this->language_data['STYLES']['ESCAPE_CHAR'][0] . '"'; + } + else { + $attributes = ' class="es0"'; + } + $char = "" . $char; + if (substr($code, $i + 1, 1) == "\n") { + // escaping a newline, what's the point in putting the span around + // the newline? It only causes hassles when inserting line numbers + $char .= ''; + $ESCAPE_CHAR_OPEN = false; + } + } + } + else { + $ESCAPE_CHAR_OPEN = false; + if ($this->lexic_permissions['ESCAPE_CHAR']) { + $char .= ''; + } + } + } + else if ($ESCAPE_CHAR_OPEN) { + if ($this->lexic_permissions['ESCAPE_CHAR']) { + $char .= ''; + } + $ESCAPE_CHAR_OPEN = false; + $test_str = $char; + } + else if ($STRING_OPEN == '') { + // Is this a multiline comment? + foreach ($this->language_data['COMMENT_MULTI'] as $open => $close) { + $com_len = strlen($open); + $test_str = substr( $part, $i, $com_len ); + $test_str_match = $test_str; + if (strtolower($open) == strtolower($test_str)) { + $COMMENT_MATCHED = true; + //@todo If remove important do remove here + if ($this->lexic_permissions['COMMENTS']['MULTI'] || + $test_str == GESHI_START_IMPORTANT) { + if ($test_str != GESHI_START_IMPORTANT) { + if (!$this->use_classes) { + $attributes = ' style="' . $this->language_data['STYLES']['COMMENTS']['MULTI'] . '"'; + } + else { + $attributes = ' class="coMULTI"'; + } + $test_str = "" . GeSHi::hsc($test_str); + } + else { + if (!$this->use_classes) { + $attributes = ' style="' . $this->important_styles . '"'; + } + else { + $attributes = ' class="imp"'; + } + // We don't include the start of the comment if it's an + // "important" part + $test_str = ""; + } + } + else { + $test_str = GeSHi::hsc($test_str); + } + + $close_pos = strpos( $part, $close, $i + strlen($close) ); + + $oops = false; + if ($close_pos === false) { + $close_pos = strlen($part); + $oops = true; + } + else { + $close_pos -= ($com_len - strlen($close)); + } + + // Short-cut through all the multiline code + $rest_of_comment = GeSHi::hsc(substr($part, $i + $com_len, $close_pos - $i)); + if (($this->lexic_permissions['COMMENTS']['MULTI'] || + $test_str_match == GESHI_START_IMPORTANT) && + ($this->line_numbers != GESHI_NO_LINE_NUMBERS || + count($this->highlight_extra_lines) > 0)) { + // strreplace to put close span and open span around multiline newlines + $test_str .= str_replace( + "\n", "\n", + str_replace("\n ", "\n ", $rest_of_comment) + ); + } + else { + $test_str .= $rest_of_comment; + } + + if ($this->lexic_permissions['COMMENTS']['MULTI'] || + $test_str_match == GESHI_START_IMPORTANT) { + $test_str .= ''; + if ($oops) { + $test_str .= "\n"; + } + } + $i = $close_pos + $com_len - 1; + // parse the rest + $result .= $this->parse_non_string_part($stuff_to_parse); + $stuff_to_parse = ''; + break; + } + } + // If we haven't matched a multiline comment, try single-line comments + if (!$COMMENT_MATCHED) { + foreach ($this->language_data['COMMENT_SINGLE'] as $comment_key => $comment_mark) { + $com_len = strlen($comment_mark); + $test_str = substr($part, $i, $com_len); + if ($this->language_data['CASE_SENSITIVE'][GESHI_COMMENTS]) { + $match = ($comment_mark == $test_str); + } + else { + $match = (strtolower($comment_mark) == strtolower($test_str)); + } + //This check will find special variables like $# in bash or compiler directives of Delphi beginning {$ + if($match) { + $disallowed_before = ""; + $disallowed_after = ""; + + if(isset($this->language_data['PARSER_CONTROL'])) { + if (isset($this->language_data['PARSER_CONTROL']['COMMENTS'])) { + if (isset($this->language_data['PARSER_CONTROL']['COMMENTS']['DISALLOWED_BEFORE'])) { + $disallowed_before = $this->language_data['PARSER_CONTROL']['COMMENTS']['DISALLOWED_BEFORE']; + } + if (isset($this->language_data['PARSER_CONTROL']['COMMENTS']['DISALLOWED_AFTER'])) { + $disallowed_after = $this->language_data['PARSER_CONTROL']['COMMENTS']['DISALLOWED_AFTER']; + } + } + } + + $match = $match && (!strlen($disallowed_before) || ((false === strpos($disallowed_before, substr($part, $i-1, 1))) && (0!=$i))); + $match = $match && (!strlen($disallowed_after) || ((false === strpos($disallowed_after, substr($part, $i+1, 1))) && (strlen($part)-1>$i))); + } + if ($match) { + $COMMENT_MATCHED = true; + if ($this->lexic_permissions['COMMENTS'][$comment_key]) { + if (!$this->use_classes) { + $attributes = ' style="' . $this->language_data['STYLES']['COMMENTS'][$comment_key] . '"'; + } + else { + $attributes = ' class="co' . $comment_key . '"'; + } + $test_str = "" . GeSHi::hsc($this->change_case($test_str)); + } + else { + $test_str = GeSHi::hsc($test_str); + } + $close_pos = strpos($part, "\n", $i); + $oops = false; + if ($close_pos === false) { + $close_pos = strlen($part); + $oops = true; + } + $test_str .= GeSHi::hsc(substr($part, $i + $com_len, $close_pos - $i - $com_len)); + if ($this->lexic_permissions['COMMENTS'][$comment_key]) { + $test_str .= ""; + } + // Take into account that the comment might be the last in the source + if (!$oops) { + $test_str .= "\n"; + } + $i = $close_pos; + // parse the rest + $result .= $this->parse_non_string_part($stuff_to_parse); + $stuff_to_parse = ''; + break; + } + } + } + } + else if ($STRING_OPEN != '') { + // Otherwise, convert it to HTML form + if (strtolower($this->encoding) == 'utf-8') { + //only escape <128 (we don't want to break multibyte chars) + if (ord($char) < 128) { + $char = GeSHi::hsc($char); + } + } + else { + //encode everthing + $char = GeSHi::hsc($char); + } + } + // Where are we adding this char? + if (!$COMMENT_MATCHED) { + if (($STRING_OPEN == '') && !$CLOSE_STRING) { + $stuff_to_parse .= $char; + } + else { + $result .= $char; + $CLOSE_STRING = false; + } + } + else { + $result .= $test_str; + $COMMENT_MATCHED = false; + } + } + // Parse the last bit + $result .= $this->parse_non_string_part($stuff_to_parse); + $stuff_to_parse = ''; + } + else { + if ($STRICTATTRS != '') { + $part = str_replace("\n", "\n", GeSHi::hsc($part)); + $STRICTATTRS = ''; + } + $result .= $part; + } + // Close the that surrounds the block + if ($this->strict_mode && $this->language_data['STYLES']['SCRIPT'][$script_key] != '' && + $this->lexic_permissions['SCRIPT']) { + $result .= ''; + } + } + else { + // Else not a block to highlight + $result .= GeSHi::hsc($part); + } + } + + // Parse the last stuff (redundant?) + $result .= $this->parse_non_string_part($stuff_to_parse); + + // Lop off the very first and last spaces + $result = substr($result, 1, -1); + + // Are we still in a string? + if ($STRING_OPEN) { + $result .= ''; + } + + // We're finished: stop timing + $this->set_time($start_time, microtime()); + + return $this->finalise($result); + } + + /** + * Swaps out spaces and tabs for HTML indentation. Not needed if + * the code is in a pre block... + * + * @param string The source to indent + * @return string The source with HTML indenting applied + * @since 1.0.0 + * @access private + */ + function indent($result) { + /// Replace tabs with the correct number of spaces + if (false !== strpos($result, "\t")) { + $lines = explode("\n", $result); + $tab_width = $this->get_real_tab_width(); + foreach ($lines as $key => $line) { + if (false === strpos($line, "\t")) { + $lines[$key] = $line; + continue; + } + + $pos = 0; + $length = strlen($line); + $result_line = ''; + + $IN_TAG = false; + for ($i = 0; $i < $length; $i++) { + $char = substr($line, $i, 1); + // Simple engine to work out whether we're in a tag. + // If we are we modify $pos. This is so we ignore HTML + // in the line and only workout the tab replacement + // via the actual content of the string + // This test could be improved to include strings in the + // html so that < or > would be allowed in user's styles + // (e.g. quotes: '<' '>'; or similar) + if ($IN_TAG && '>' == $char) { + $IN_TAG = false; + $result_line .= '>'; + ++$pos; + } + else if (!$IN_TAG && '<' == $char) { + $IN_TAG = true; + $result_line .= '<'; + ++$pos; + } + else if (!$IN_TAG && '&' == $char) { + $substr = substr($line, $i + 3, 4); + //$substr_5 = substr($line, 5, 1); + $posi = strpos($substr, ';'); + if (false !== $posi) { + $pos += $posi + 3; + } + $result_line .= '&'; + } + else if (!$IN_TAG && "\t" == $char) { + $str = ''; + // OPTIMISE - move $strs out. Make an array: + // $tabs = array( + // 1 => ' ', + // 2 => '  ', + // 3 => '   ' etc etc + // to use instead of building a string every time + $strs = array(0 => ' ', 1 => ' '); + for ($k = 0; $k < ($tab_width - (($i - $pos) % $tab_width)); $k++) $str .= $strs[$k % 2]; + $result_line .= $str; + $pos += ($i - $pos) % $tab_width + 1; + + if (false === strpos($line, "\t", $i + 1)) { + $result_line .= substr($line, $i + 1); + break; + } + } + else if ($IN_TAG) { + ++$pos; + $result_line .= $char; + } + else { + $result_line .= $char; + //++$pos; + } + } + $lines[$key] = $result_line; + } + $result = implode("\n", $lines); + } + // Other whitespace + // BenBE: Fix to reduce the number of replacements to be done + $result = preg_replace('/^ /m', ' ', $result); + $result = str_replace(' ', '  ', $result); + + if ($this->line_numbers == GESHI_NO_LINE_NUMBERS) { + if ($this->line_ending === null) { + $result = nl2br($result); + } else { + $result = str_replace("\n", $this->line_ending, $result); + } + } + return $result; + } + + /** + * Changes the case of a keyword for those languages where a change is asked for + * + * @param string The keyword to change the case of + * @return string The keyword with its case changed + * @since 1.0.0 + * @access private + */ + function change_case($instr) { + if ($this->language_data['CASE_KEYWORDS'] == GESHI_CAPS_UPPER) { + return strtoupper($instr); + } + else if ($this->language_data['CASE_KEYWORDS'] == GESHI_CAPS_LOWER) { + return strtolower($instr); + } + return $instr; + } + + /** + * Adds a url to a keyword where needed. + * + * @param string The keyword to add the URL HTML to + * @param int What group the keyword is from + * @param boolean Whether to get the HTML for the start or end + * @return The HTML for either the start or end of the HTML <a> tag + * @since 1.0.2 + * @access private + * @todo Get rid of ender + */ + function add_url_to_keyword($keyword, $group, $start_or_end) { + if (!$this->keyword_links) { + // Keyword links have been disabled + return; + } + + if (isset($this->language_data['URLS'][$group]) && + $this->language_data['URLS'][$group] != '' && + substr($keyword, 0, 5) != '</') { + // There is a base group for this keyword + if ($start_or_end == 'BEGIN') { + // HTML workaround... not good form (tm) but should work for 1.0.X + if ($keyword != '') { + // Old system: strtolower + //$keyword = ( $this->language_data['CASE_SENSITIVE'][$group] ) ? $keyword : strtolower($keyword); + // New system: get keyword from language file to get correct case + foreach ($this->language_data['KEYWORDS'][$group] as $word) { + if (strtolower($word) == strtolower($keyword)) { + break; + } + } + $word = ( substr($word, 0, 4) == '<' ) ? substr($word, 4) : $word; + $word = ( substr($word, -4) == '>' ) ? substr($word, 0, strlen($word) - 4) : $word; + if (!$word) return ''; + + return '<|UR1|"' . + str_replace( + array('{FNAME}', '{FNAMEL}', '{FNAMEU}', '.'), + array(GeSHi::hsc($word), GeSHi::hsc(strtolower($word)), + GeSHi::hsc(strtoupper($word)), ''), + $this->language_data['URLS'][$group] + ) . '">'; + } + return ''; + // HTML fix. Again, dirty hackage... + } + else if (!($this->language == 'html4strict' && ('>' == $keyword || '<' == $keyword))) { + return ''; + } + } + } + + /** + * Takes a string that has no strings or comments in it, and highlights + * stuff like keywords, numbers and methods. + * + * @param string The string to parse for keyword, numbers etc. + * @since 1.0.0 + * @access private + * @todo BUGGY! Why? Why not build string and return? + */ + function parse_non_string_part(&$stuff_to_parse) { + $stuff_to_parse = ' ' . GeSHi::hsc($stuff_to_parse); + $stuff_to_parse_pregquote = preg_quote($stuff_to_parse, '/'); + $func = '$this->change_case'; + $func2 = '$this->add_url_to_keyword'; + + // + // Regular expressions + // + foreach ($this->language_data['REGEXPS'] as $key => $regexp) { + if ($this->lexic_permissions['REGEXPS'][$key]) { + if (is_array($regexp)) { + $stuff_to_parse = preg_replace( + "/" . + str_replace('/', '\/', $regexp[GESHI_SEARCH]) . + "/{$regexp[GESHI_MODIFIERS]}", + "{$regexp[GESHI_BEFORE]}<|!REG3XP$key!>{$regexp[GESHI_REPLACE]}|>{$regexp[GESHI_AFTER]}", + $stuff_to_parse + ); + } + else { + $stuff_to_parse = preg_replace( "/(" . str_replace('/', '\/', $regexp) . ")/", "<|!REG3XP$key!>\\1|>", $stuff_to_parse); + } + } + } + + // + // Highlight numbers. This regexp sucks... anyone with a regexp that WORKS + // here wins a cookie if they send it to me. At the moment there's two doing + // almost exactly the same thing, except the second one prevents a number + // being highlighted twice (eg 5) + // Put /NUM!/ in for the styles, which gets replaced at the end. + // + // NEW ONE: Brice Bernard + // + if ($this->lexic_permissions['NUMBERS'] && preg_match('#[0-9]#', $stuff_to_parse )) { + $stuff_to_parse = preg_replace('/([-+]?\\b(?:[0-9]*\\.)?[0-9]+\\b)/', '<|/NUM!/>\\1|>', $stuff_to_parse); + } + + // Highlight keywords + // if there is a couple of alpha symbols there *might* be a keyword + if (preg_match('#[a-zA-Z]{2,}#', $stuff_to_parse)) { + foreach ($this->language_data['KEYWORDS'] as $k => $keywordset) { + if ($this->lexic_permissions['KEYWORDS'][$k]) { + foreach ($keywordset as $keyword) { + $keyword = preg_quote($keyword, '/'); + // + // This replacement checks the word is on it's own (except if brackets etc + // are next to it), then highlights it. We don't put the color=" for the span + // in just yet - otherwise languages with the keywords "color" or "or" have + // a fit. + // + if (false !== stristr($stuff_to_parse_pregquote, $keyword )) { + $stuff_to_parse .= ' '; + // Might make a more unique string for putting the number in soon + // Basically, we don't put the styles in yet because then the styles themselves will + // get highlighted if the language has a CSS keyword in it (like CSS, for example ;)) + $styles = "/$k/"; + $modifiers = ($this->language_data['CASE_SENSITIVE'][$k]) ? "e" : "ie"; + + $disallowed_before = "a-zA-Z0-9\$_\|\#;>|^"; + $disallowed_after = "a-zA-Z0-9_<\|%\\-&"; + if(isset($this->language_data['PARSER_CONTROL'])) { + if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS'])) { + if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_BEFORE'])) { + $disallowed_before = $this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_BEFORE']; + } + if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_AFTER'])) { + $disallowed_after = $this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_AFTER']; + } + } + } + $stuff_to_parse = preg_replace( + "/([^$disallowed_before])($keyword)(?=[^$disallowed_after])/$modifiers", + "'\\1' . $func2('\\2', '$k', 'BEGIN') . '<|$styles>' . $func('\\2') . '|>' . $func2('\\2', '$k', 'END')", + $stuff_to_parse + ); + + $stuff_to_parse = substr($stuff_to_parse, 0, strlen($stuff_to_parse) - 1); + } + } + } + } + } + + // + // Now that's all done, replace /[number]/ with the correct styles + // + foreach ($this->language_data['KEYWORDS'] as $k => $kws) { + if (!$this->use_classes) { + $attributes = ' style="' . $this->language_data['STYLES']['KEYWORDS'][$k] . '"'; + } + else { + $attributes = ' class="kw' . $k . '"'; + } + $stuff_to_parse = str_replace("/$k/", $attributes, $stuff_to_parse); + } + + // Put number styles in + if (!$this->use_classes && $this->lexic_permissions['NUMBERS']) { + $attributes = ' style="' . $this->language_data['STYLES']['NUMBERS'][0] . '"'; + } + else { + $attributes = ' class="nu0"'; + } + $stuff_to_parse = str_replace('/NUM!/', $attributes, $stuff_to_parse); + + // + // Highlight methods and fields in objects + // + if ($this->lexic_permissions['METHODS'] && $this->language_data['OOLANG']) { + foreach ($this->language_data['OBJECT_SPLITTERS'] as $key => $splitter) { + if (false !== stristr($stuff_to_parse, $splitter)) { + if (!$this->use_classes) { + $attributes = ' style="' . $this->language_data['STYLES']['METHODS'][$key] . '"'; + } + else { + $attributes = ' class="me' . $key . '"'; + } + $stuff_to_parse = preg_replace("/(" . preg_quote($this->language_data['OBJECT_SPLITTERS'][$key], 1) . "[\s]*)([a-zA-Z\*\(][a-zA-Z0-9_\*]*)/", "\\1<|$attributes>\\2|>", $stuff_to_parse); + } + } + } + + // + // Highlight brackets. Yes, I've tried adding a semi-colon to this list. + // You try it, and see what happens ;) + // TODO: Fix lexic permissions not converting entities if shouldn't + // be highlighting regardless + // + if ($this->lexic_permissions['BRACKETS']) { + $code_entities_match = array('[', ']', '(', ')', '{', '}'); + if (!$this->use_classes) { + $code_entities_replace = array( + '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">[|>', + '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">]|>', + '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">(|>', + '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">)|>', + '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">{|>', + '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">}|>', + ); + } + else { + $code_entities_replace = array( + '<| class="br0">[|>', + '<| class="br0">]|>', + '<| class="br0">(|>', + '<| class="br0">)|>', + '<| class="br0">{|>', + '<| class="br0">}|>', + ); + } + $stuff_to_parse = str_replace( $code_entities_match, $code_entities_replace, $stuff_to_parse ); + } + + //FIX for symbol highlighting ... + if($this->lexic_permissions['SYMBOLS']) { + //As this is a costy operation, we avoid doing it for multiple groups ... + //Instead we perform it for all symbols at once. + // + //For this to work, we need to reorganize the data arrays. + $symbol_data = $symbol_preg = array(); + foreach($this->language_data['SYMBOLS'] as $key => $symbols) { + if(is_array($symbols)) { + foreach($symbols as $sym) { + if(!isset($symbol_data[$sym])) { + $symbol_data[GeSHi::hsc($sym)] = $key; + $symbol_preg[] = preg_quote(GeSHi::hsc($sym), '/'); + } + } + } else { + if(!isset($symbol_data[$symbols])) { + $symbol_data[GeSHi::hsc($symbols)] = 0; + $symbol_preg[] = preg_quote(GESHI::hsc($symbols), '/'); + } + } + } + //Now we have an array with each possible symbol as the key and the style as the actual data. + //This way we can set the correct style just the moment we highlight ... + // + //Now we need to rewrite our array to get a search string that + $sym_search = implode("|", $symbol_preg); + //Get all matches and throw away those witin a block that is already highlighted... (i.e. matched by a regexp) + preg_match_all("/(?:" . $sym_search . ")+/", $stuff_to_parse, $matches_in_stuff, PREG_OFFSET_CAPTURE | PREG_SET_ORDER); + //Match anything that is a highlighted block ... + preg_match_all("/<\|(?:|[^>])+>(?:(?!\|>).*?)\|>|<\/a>/", $stuff_to_parse, $highlighted_in_stuff, PREG_OFFSET_CAPTURE); + foreach($matches_in_stuff as $stuff_match_id => $stuff_match_data) { + foreach($highlighted_in_stuff[0] as $highlight_id => $highlight_data) { + //Do a range check of the found highlight identifier and the OOP match ... + if(($highlight_data[1] <= $stuff_match_data[0][1]) && + ($highlight_data[1] + strlen($highlight_data[0]) >= $stuff_match_data[0][1] + strlen($stuff_match_data[0][0]))) + { + //We found a match that was already highlighted ... + unset($matches_in_stuff[$stuff_match_id]); + break; + } + } + } + //Rebuild the matches array to be ordered by offset ... + $symbol_offsets = array(); + foreach($matches_in_stuff as $stuff_match_data) { + $symbol_offsets[$stuff_match_data[0][1]] = $stuff_match_data[0][0]; + } + krsort($symbol_offsets); + //Perform the actual replacements ... + foreach($symbol_offsets as $symbol_offset => $symbol_match) { + $symbol_hl = ""; + $old_sym = -1; + //Split the current stuff to replace into its atomic symbols ... + preg_match_all("/$sym_search/", $symbol_match, $sym_match_syms, PREG_PATTERN_ORDER); + foreach($sym_match_syms[0] as $sym_ms) { + //Check if consequtive symbols belong to the same group to save output ... + if (isset($symbol_data[$sym_ms]) && ($symbol_data[$sym_ms] != $old_sym)) { + if(-1 != $old_sym) { + $symbol_hl .= "|>"; + } + $old_sym = $symbol_data[$sym_ms]; + if (!$this->use_classes) { + $symbol_hl .= '<| style="' . $this->language_data['STYLES']['SYMBOLS'][$old_sym] . '">'; + } + else { + $symbol_hl .= '<| class="sy' . $old_sym . '">'; + } + } + $symbol_hl .= $sym_ms; + } + //Close remaining tags and insert the replacement at the right position ... + //Take caution if symbol_hl is empty to avoid doubled closing spans. + if (-1 != $old_sym) { + $symbol_hl .= "|>"; + } + $stuff_to_parse = substr($stuff_to_parse, 0, $symbol_offset) . $symbol_hl . substr($stuff_to_parse, $symbol_offset + strlen($symbol_match)); + } + } + //FIX for symbol highlighting ... + + // + // Add class/style for regexps + // + foreach ($this->language_data['REGEXPS'] as $key => $regexp) { + if ($this->lexic_permissions['REGEXPS'][$key]) { + if (is_callable($this->language_data['STYLES']['REGEXPS'][$key])) { + $func = $this->language_data['STYLES']['REGEXPS'][$key]; + $stuff_to_parse = preg_replace("/!REG3XP$key!(.*)\|>/eU", + "' style=\"' . call_user_func(\"$func\", '\\1') . '\"\\1|>'", $stuff_to_parse); + } + else { + if (!$this->use_classes) { + $attributes = ' style="' . $this->language_data['STYLES']['REGEXPS'][$key] . '"'; + } + else { + if (is_array($this->language_data['REGEXPS'][$key]) && + array_key_exists(GESHI_CLASS, $this->language_data['REGEXPS'][$key])) { + $attributes = ' class="' . + $this->language_data['REGEXPS'][$key][GESHI_CLASS] . '"'; + } + else { + $attributes = ' class="re' . $key . '"'; + } + } + $stuff_to_parse = str_replace("!REG3XP$key!", "$attributes", $stuff_to_parse); + } + } + } + + // Replace with . for urls + $stuff_to_parse = str_replace('', '.', $stuff_to_parse); + // Replace <|UR1| with link_styles[GESHI_LINK])) { + if ($this->use_classes) { + $stuff_to_parse = str_replace('<|UR1|', 'link_target . ' href=', $stuff_to_parse); + } + else { + $stuff_to_parse = str_replace('<|UR1|', 'link_target . ' style="' . $this->link_styles[GESHI_LINK] . '" href=', $stuff_to_parse); + } + } + else { + $stuff_to_parse = str_replace('<|UR1|', 'link_target . ' href=', $stuff_to_parse); + } + + // + // NOW we add the span thingy ;) + // + + $stuff_to_parse = str_replace('<|', '', '', $stuff_to_parse ); + + return substr($stuff_to_parse, 1); + } + + /** + * Sets the time taken to parse the code + * + * @param microtime The time when parsing started + * @param microtime The time when parsing ended + * @since 1.0.2 + * @access private + */ + function set_time($start_time, $end_time) { + $start = explode(' ', $start_time); + $end = explode(' ', $end_time); + $this->time = $end[0] + $end[1] - $start[0] - $start[1]; + } + + /** + * Gets the time taken to parse the code + * + * @return double The time taken to parse the code + * @since 1.0.2 + */ + function get_time() { + return $this->time; + } + + /** + * Gets language information and stores it for later use + * + * @param string The filename of the language file you want to load + * @since 1.0.0 + * @access private + * @todo Needs to load keys for lexic permissions for keywords, regexps etc + */ + function load_language($file_name) { + $this->enable_highlighting(); + $language_data = array(); + require $file_name; + // Perhaps some checking might be added here later to check that + // $language data is a valid thing but maybe not + $this->language_data = $language_data; + // Set strict mode if should be set + if ($this->language_data['STRICT_MODE_APPLIES'] == GESHI_ALWAYS) { + $this->strict_mode = true; + } + // Set permissions for all lexics to true + // so they'll be highlighted by default + foreach ($this->language_data['KEYWORDS'] as $key => $words) { + $this->lexic_permissions['KEYWORDS'][$key] = true; + } + foreach ($this->language_data['COMMENT_SINGLE'] as $key => $comment) { + $this->lexic_permissions['COMMENTS'][$key] = true; + } + foreach ($this->language_data['REGEXPS'] as $key => $regexp) { + $this->lexic_permissions['REGEXPS'][$key] = true; + } + // Set default class for CSS + $this->overall_class = $this->language; + } + + /** + * Takes the parsed code and various options, and creates the HTML + * surrounding it to make it look nice. + * + * @param string The code already parsed + * @return string The code nicely finalised + * @since 1.0.0 + * @access private + */ + function finalise($parsed_code) { + // Remove end parts of important declarations + // This is BUGGY!! My fault for bad code: fix coming in 1.2 + // @todo Remove this crap + if ($this->enable_important_blocks && + (strstr($parsed_code, GeSHi::hsc(GESHI_START_IMPORTANT)) === false)) { + $parsed_code = str_replace(GeSHi::hsc(GESHI_END_IMPORTANT), '', $parsed_code); + } + + // Add HTML whitespace stuff if we're using the
      header + if ($this->header_type != GESHI_HEADER_PRE) { + $parsed_code = $this->indent($parsed_code); + } + + // purge some unnecessary stuff + $parsed_code = preg_replace('#]+>(\s*)#', '\\1', $parsed_code); + $parsed_code = preg_replace('#]+>(\s*)
      #', '\\1', $parsed_code); + + // If we are using IDs for line numbers, there needs to be an overall + // ID set to prevent collisions. + if ($this->add_ids && !$this->overall_id) { + $this->overall_id = 'geshi-' . substr(md5(microtime()), 0, 4); + } + + // If we're using line numbers, we insert
    • s and appropriate + // markup to style them (otherwise we don't need to do anything) + if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { + // If we're using the
       header, we shouldn't add newlines because
      +            // the 
       will line-break them (and the 
    • s already do this for us) + $ls = ($this->header_type != GESHI_HEADER_PRE) ? "\n" : ''; + // Get code into lines + $code = explode("\n", $parsed_code); + // Set vars to defaults for following loop + $parsed_code = ''; + $i = 0; + + // Foreach line... + foreach ($code as $line) { + //Reset the attributes for a new line ... + $attrs = array(); + + // Make lines have at least one space in them if they're empty + // BenBE: Checking emptiness using trim instead of relying on blanks + if ('' == trim($line)) { + $line = ' '; + } + // If this is a "special line"... + if ($this->line_numbers == GESHI_FANCY_LINE_NUMBERS && + $i % $this->line_nth_row == ($this->line_nth_row - 1)) { + // Set the attributes to style the line + if ($this->use_classes) { + //$attr = ' class="li2"'; + $attrs['class'][] = 'li2'; + $def_attr = ' class="de2"'; + } + else { + //$attr = ' style="' . $this->line_style2 . '"'; + $attrs['style'][] = $this->line_style2; + // This style "covers up" the special styles set for special lines + // so that styles applied to special lines don't apply to the actual + // code on that line + $def_attr = ' style="' . $this->code_style . '"'; + } + // Span or div? + $start = ""; + $end = '
    • '; + } + else { + if ($this->use_classes) { + //$attr = ' class="li1"'; + $attrs['class'][] = 'li1'; + $def_attr = ' class="de1"'; + } + else { + //$attr = ' style="' . $this->line_style1 . '"'; + $attrs['style'][] = $this->line_style1; + $def_attr = ' style="' . $this->code_style . '"'; + } + $start = ""; + $end = ''; + } + + ++$i; + // Are we supposed to use ids? If so, add them + if ($this->add_ids) { + $attrs['id'][] = "$this->overall_id-$i"; + } + if (in_array($i, $this->highlight_extra_lines)) { + if ($this->use_classes) { + if(array_key_exists($i, $this->highlight_extra_lines_styles)) { + $attrs['class'][] = "lx$i"; + } else { + $attrs['class'][] = "ln-xtra"; + } + } else { + array_push($attrs['style'], $this->get_line_style($i)); + } + } + + // Add in the line surrounded by appropriate list HTML + $attr_string = ''; + foreach ($attrs as $key => $attr) { + $attr_string .= ' ' . $key . '="' . implode(' ', $attr) . '"'; + } + $parsed_code .= "$start$line$end$ls"; + } + } + else { + // No line numbers, but still need to handle highlighting lines extra. + // Have to use divs so the full width of the code is highlighted + $code = explode("\n", $parsed_code); + $parsed_code = ''; + $i = 0; + foreach ($code as $line) { + // Make lines have at least one space in them if they're empty + // BenBE: Checking emptiness using trim instead of relying on blanks + if ('' == trim($line)) { + $line = ' '; + } + if (in_array(++$i, $this->highlight_extra_lines)) { + if ($this->use_classes) { + if (array_key_exists($i, $this->highlight_extra_lines_styles)) { + $parsed_code .= "
      "; + } else { + $parsed_code .= "
      "; + } + } else { + $parsed_code .= "
      get_line_style($i) . "\">"; + } + // Remove \n because it stuffs up
       header
      +                    $parsed_code .= $line . "
      "; + } else { + $parsed_code .= $line . "\n"; + } + } + } + + if ($this->header_type == GESHI_HEADER_PRE) { + // enforce line numbers when using pre + $parsed_code = str_replace('
    • ', '
    •  
    • ', $parsed_code); + } + + return $this->header() . chop($parsed_code) . $this->footer(); + } + + /** + * Creates the header for the code block (with correct attributes) + * + * @return string The header for the code block + * @since 1.0.0 + * @access private + */ + function header() { + // Get attributes needed + $attributes = $this->get_attributes(); + + $ol_attributes = ''; + + if ($this->line_numbers_start != 1) { + $ol_attributes .= ' start="' . $this->line_numbers_start . '"'; + } + + // Get the header HTML + $header = $this->format_header_content(); + + if (GESHI_HEADER_NONE == $this->header_type) { + if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { + return "$header"; + } + return $header . + ($this->force_code_block ? '
      ' : ''); + } + + // Work out what to return and do it + if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { + if ($this->header_type == GESHI_HEADER_PRE) { + return "$header"; + } + else if ($this->header_type == GESHI_HEADER_DIV) { + return "$header"; + } + } + else { + if ($this->header_type == GESHI_HEADER_PRE) { + return "$header" . + ($this->force_code_block ? '
      ' : ''); + } + else if ($this->header_type == GESHI_HEADER_DIV) { + return "$header" . + ($this->force_code_block ? '
      ' : ''); + } + } + } + + /** + * Returns the header content, formatted for output + * + * @return string The header content, formatted for output + * @since 1.0.2 + * @access private + */ + function format_header_content() { + $header = $this->header_content; + if ($header) { + if ($this->header_type == GESHI_HEADER_PRE) { + $header = str_replace("\n", '', $header); + } + $header = $this->replace_keywords($header); + + if ($this->use_classes) { + $attr = ' class="head"'; + } + else { + $attr = " style=\"{$this->header_content_style}\""; + } + return "$header
      "; + } + } + + /** + * Returns the footer for the code block. + * + * @return string The footer for the code block + * @since 1.0.0 + * @access private + */ + function footer() { + $footer_content = $this->format_footer_content(); + + if (GESHI_HEADER_NONE == $this->header_type) { + return ($this->line_numbers != GESHI_NO_LINE_NUMBERS) ? '' . $footer_content + : $footer_content; + } + + if ($this->header_type == GESHI_HEADER_DIV) { + if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { + return "$footer_content
      "; + } + return ($this->force_code_block ? '
      ' : '') . + "$footer_content
      "; + } + else { + if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { + return "$footer_content"; + } + return ($this->force_code_block ? '
      ' : '') . + "$footer_content"; + } + } + + /** + * Returns the footer content, formatted for output + * + * @return string The footer content, formatted for output + * @since 1.0.2 + * @access private + */ + function format_footer_content() { + $footer = $this->footer_content; + if ($footer) { + if ($this->header_type == GESHI_HEADER_PRE) { + $footer = str_replace("\n", '', $footer);; + } + $footer = $this->replace_keywords($footer); + + if ($this->use_classes) { + $attr = ' class="foot"'; + } + else { + $attr = " style=\"{$this->footer_content_style}\""; + } + return "$footer"; + } + } + + /** + * Replaces certain keywords in the header and footer with + * certain configuration values + * + * @param string The header or footer content to do replacement on + * @return string The header or footer with replaced keywords + * @since 1.0.2 + * @access private + */ + function replace_keywords($instr) { + $keywords = $replacements = array(); + + $keywords[] = '
        to have no effect at all if there are line numbers + // (
          s have margins that should be destroyed so all layout is + // controlled by the set_overall_style method, which works on the + //
           or 
          container). Additionally, set default styles for lines + if (!$economy_mode || $this->line_numbers != GESHI_NO_LINE_NUMBERS) { + //$stylesheet .= "$selector, {$selector}ol, {$selector}ol li {margin: 0;}\n"; + $stylesheet .= "$selector.de1, $selector.de2 {{$this->code_style}}\n"; + } + + // Add overall styles + if (!$economy_mode || $this->overall_style != '') { + $stylesheet .= "$selector {{$this->overall_style}}\n"; + } + + // Add styles for links + foreach ($this->link_styles as $key => $style) { + if (!$economy_mode || $key == GESHI_LINK && $style != '') { + $stylesheet .= "{$selector}a:link {{$style}}\n"; + } + if (!$economy_mode || $key == GESHI_HOVER && $style != '') { + $stylesheet .= "{$selector}a:hover {{$style}}\n"; + } + if (!$economy_mode || $key == GESHI_ACTIVE && $style != '') { + $stylesheet .= "{$selector}a:active {{$style}}\n"; + } + if (!$economy_mode || $key == GESHI_VISITED && $style != '') { + $stylesheet .= "{$selector}a:visited {{$style}}\n"; + } + } + + // Header and footer + if (!$economy_mode || $this->header_content_style != '') { + $stylesheet .= "$selector.head {{$this->header_content_style}}\n"; + } + if (!$economy_mode || $this->footer_content_style != '') { + $stylesheet .= "$selector.foot {{$this->footer_content_style}}\n"; + } + + // Styles for important stuff + if (!$economy_mode || $this->important_styles != '') { + $stylesheet .= "$selector.imp {{$this->important_styles}}\n"; + } + + // Simple line number styles + if (!$economy_mode || ($this->line_numbers != GESHI_NO_LINE_NUMBERS && $this->line_style1 != '')) { + $stylesheet .= "{$selector}li, {$selector}li.li1 {{$this->line_style1}}\n"; + } + // If there is a style set for fancy line numbers, echo it out + if (!$economy_mode || ($this->line_numbers == GESHI_FANCY_LINE_NUMBERS && $this->line_style2 != '')) { + $stylesheet .= "{$selector}li.li2 {{$this->line_style2}}\n"; + } + + foreach ($this->language_data['STYLES']['KEYWORDS'] as $group => $styles) { + if (!$economy_mode || ($economy_mode && $styles != '') && + (isset($this->lexic_permissions['KEYWORDS'][$group]) && + $this->lexic_permissions['KEYWORDS'][$group])) { + $stylesheet .= "$selector.kw$group {{$styles}}\n"; + } + } + foreach ($this->language_data['STYLES']['COMMENTS'] as $group => $styles) { + if (!$economy_mode || ($economy_mode && $styles != '') && + (isset($this->lexic_permissions['COMMENTS'][$group]) && + $this->lexic_permissions['COMMENTS'][$group])) { + $stylesheet .= "$selector.co$group {{$styles}}\n"; + } + } + foreach ($this->language_data['STYLES']['ESCAPE_CHAR'] as $group => $styles) { + if (!$economy_mode || !($economy_mode && $styles == '') && !($economy_mode && + !$this->lexic_permissions['ESCAPE_CHAR'])) { + $stylesheet .= "$selector.es$group {{$styles}}\n"; + } + } + foreach ($this->language_data['STYLES']['BRACKETS'] as $group => $styles) { + if (!$economy_mode || !($economy_mode && $styles == '') && !($economy_mode && + !$this->lexic_permissions['BRACKETS'])) { + $stylesheet .= "$selector.br$group {{$styles}}\n"; + } + } + foreach ($this->language_data['STYLES']['SYMBOLS'] as $group => $styles) { + if (!$economy_mode || !($economy_mode && $styles == '') && !($economy_mode && + !$this->lexic_permissions['SYMBOLS'])) { + $stylesheet .= "$selector.sy$group {{$styles}}\n"; + } + } + foreach ($this->language_data['STYLES']['STRINGS'] as $group => $styles) { + if (!$economy_mode || !($economy_mode && $styles == '') && !($economy_mode && + !$this->lexic_permissions['STRINGS'])) { + $stylesheet .= "$selector.st$group {{$styles}}\n"; + } + } + foreach ($this->language_data['STYLES']['NUMBERS'] as $group => $styles) { + if (!$economy_mode || !($economy_mode && $styles == '') && !($economy_mode && + !$this->lexic_permissions['NUMBERS'])) { + $stylesheet .= "$selector.nu$group {{$styles}}\n"; + } + } + foreach ($this->language_data['STYLES']['METHODS'] as $group => $styles) { + if (!$economy_mode || !($economy_mode && $styles == '') && !($economy_mode && + !$this->lexic_permissions['METHODS'])) { + $stylesheet .= "$selector.me$group {{$styles}}\n"; + } + } + foreach ($this->language_data['STYLES']['SCRIPT'] as $group => $styles) { + if (!$economy_mode || !($economy_mode && $styles == '')) { + $stylesheet .= "$selector.sc$group {{$styles}}\n"; + } + } + foreach ($this->language_data['STYLES']['REGEXPS'] as $group => $styles) { + if (!$economy_mode || ($economy_mode && $styles != '') && + (isset($this->lexic_permissions['REGEXPS'][$group]) && + $this->lexic_permissions['REGEXPS'][$group])) { + if (is_array($this->language_data['REGEXPS'][$group]) && + array_key_exists(GESHI_CLASS, + $this->language_data['REGEXPS'][$group])) { + $stylesheet .= "$selector."; + $stylesheet .= $this->language_data['REGEXPS'][$group][GESHI_CLASS]; + $stylesheet .= " {{$styles}}\n"; + } + else { + $stylesheet .= "$selector.re$group {{$styles}}\n"; + } + } + } + // Styles for lines being highlighted extra + if (!$economy_mode || (count($this->highlight_extra_lines)!=count($this->highlight_extra_lines_styles))) { + $stylesheet .= "{$selector}.ln-xtra, {$selector}li.ln-xtra, {$selector}div.ln-xtra {{$this->highlight_extra_lines_style}}\n"; + } + foreach ($this->highlight_extra_lines_styles as $lineid => $linestyle) { + $stylesheet .= "{$selector}.lx$lineid, {$selector}li.lx$lineid, {$selector}div.lx$lineid {{$linestyle}}\n"; + } + + return $stylesheet; + } + + /** + * Get's the style that is used for the specified line + * + * @param int The line number information is requested for + * @access private + * @since 1.0.7.21 + */ + function get_line_style($line) { + //$style = null; + $style = null; + if (array_key_exists($line, $this->highlight_extra_lines_styles)) { + $style = $this->highlight_extra_lines_styles[$line]; + } else { // if no "extra" style assigned + $style = $this->highlight_extra_lines_style; + } + + return $style; + } +} // End Class GeSHi + + +if (!function_exists('geshi_highlight')) { + /** + * Easy way to highlight stuff. Behaves just like highlight_string + * + * @param string The code to highlight + * @param string The language to highlight the code in + * @param string The path to the language files. You can leave this blank if you need + * as from version 1.0.7 the path should be automatically detected + * @param boolean Whether to return the result or to echo + * @return string The code highlighted (if $return is true) + * @since 1.0.2 + */ + function geshi_highlight($string, $language, $path = null, $return = false) { + $geshi = new GeSHi($string, $language, $path); + $geshi->set_header_type(GESHI_HEADER_NONE); + if ($return) { + return '' . $geshi->parse_code() . ''; + } + echo '' . $geshi->parse_code() . ''; + if ($geshi->error()) { + return false; + } + return true; + } +} + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/abap.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/abap.php new file mode 100644 index 0000000..b254080 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/abap.php @@ -0,0 +1,136 @@ + 'ABAP', + 'COMMENT_SINGLE' => array(1 => '"', 2 => '*'), + 'CASE_KEYWORDS' => 0, + 'QUOTEMARKS' => array("'"), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'if', 'return', 'while', 'case', 'default', + 'do', 'else', 'for', 'endif', 'elseif', 'eq', + 'not', 'and' + ), + 2 => array( + 'data', 'types', 'seletion-screen', 'parameters', 'field-symbols', 'extern', 'inline' + ), + 3 => array( + 'report', 'write', 'append', 'select', 'endselect', 'call method', 'call function', + 'loop', 'endloop', 'raise', 'read table', 'concatenate', 'split', 'shift', + 'condense', 'describe', 'clear', 'endfunction', 'assign', 'create data', 'translate', + 'continue', 'start-of-selection', 'at selection-screen', 'modify', 'call screen', + 'create object', 'perform', 'form', 'endform', + 'reuse_alv_block_list_init', 'zbcialv', 'include' + ), + 4 => array( + 'type ref to', 'type', 'begin of', 'end of', 'like', 'into', + 'from', 'where', 'order by', 'with key', 'into', 'string', 'separated by', + 'exporting', 'importing', 'to upper case', 'to', 'exceptions', 'tables', + 'using', 'changing' + ), + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;', + 4 => 'color: #993333;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #339933;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #202020;', + 2 => 'color: #202020;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://sap4.com/wiki/index.php?title={FNAME}', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.', + 2 => '::' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/actionscript.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/actionscript.php new file mode 100644 index 0000000..a873c26 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/actionscript.php @@ -0,0 +1,197 @@ + 'ActionScript', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + '#include', 'for', 'foreach', 'if', 'elseif', 'else', 'while', 'do', 'dowhile', + 'endwhile', 'endif', 'switch', 'case', 'endswitch', 'return', 'break', 'continue', 'in' + ), + 2 => array( + 'null', 'false', 'true', 'var', + 'default', 'function', 'class', + 'new', '_global' + ), + 3 => array( + '#endinitclip', '#initclip', '__proto__', '_accProps', '_alpha', '_currentframe', + '_droptarget', '_focusrect', '_framesloaded', '_height', '_highquality', '_lockroot', + '_name', '_parent', '_quality', '_root', '_rotation', '_soundbuftime', '_target', '_totalframes', + '_url', '_visible', '_width', '_x', '_xmouse', '_xscale', '_y', '_ymouse', '_yscale', 'abs', + 'Accessibility', 'acos', 'activityLevel', 'add', 'addListener', 'addPage', 'addProperty', + 'addRequestHeader', 'align', 'allowDomain', 'allowInsecureDomain', 'and', 'appendChild', + 'apply', 'Arguments', 'Array', 'asfunction', 'asin', 'atan', 'atan2', 'attachAudio', 'attachMovie', + 'attachSound', 'attachVideo', 'attributes', 'autosize', 'avHardwareDisable', 'background', + 'backgroundColor', 'BACKSPACE', 'bandwidth', 'beginFill', 'beginGradientFill', 'blockIndent', + 'bold', 'Boolean', 'border', 'borderColor', 'bottomScroll', 'bufferLength', 'bufferTime', + 'builtInItems', 'bullet', 'Button', 'bytesLoaded', 'bytesTotal', 'call', 'callee', 'caller', + 'Camera', 'capabilities', 'CAPSLOCK', 'caption', 'catch', 'ceil', 'charAt', 'charCodeAt', + 'childNodes', 'chr', 'clear', 'clearInterval', 'cloneNode', 'close', 'Color', 'concat', + 'connect', 'condenseWhite', 'constructor', 'contentType', 'ContextMenu', 'ContextMenuItem', + 'CONTROL', 'copy', 'cos', 'createElement', 'createEmptyMovieClip', 'createTextField', + 'createTextNode', 'currentFps', 'curveTo', 'CustomActions', 'customItems', 'data', 'Date', + 'deblocking', 'delete', 'DELETEKEY', 'docTypeDecl', 'domain', 'DOWN', + 'duplicateMovieClip', 'duration', 'dynamic', 'E', 'embedFonts', 'enabled', + 'END', 'endFill', 'ENTER', 'eq', 'Error', 'ESCAPE(Konstante)', 'escape(Funktion)', 'eval', + 'exactSettings', 'exp', 'extends', 'finally', 'findText', 'firstChild', 'floor', + 'flush', 'focusEnabled', 'font', 'fps', 'fromCharCode', 'fscommand', + 'gain', 'ge', 'get', 'getAscii', 'getBeginIndex', 'getBounds', 'getBytesLoaded', 'getBytesTotal', + 'getCaretIndex', 'getCode', 'getCount', 'getDate', 'getDay', 'getDepth', 'getEndIndex', 'getFocus', + 'getFontList', 'getFullYear', 'getHours', 'getInstanceAtDepth', 'getLocal', 'getMilliseconds', + 'getMinutes', 'getMonth', 'getNewTextFormat', 'getNextHighestDepth', 'getPan', 'getProgress', + 'getProperty', 'getRGB', 'getSeconds', 'getSelected', 'getSelectedText', 'getSize', 'getStyle', + 'getStyleNames', 'getSWFVersion', 'getText', 'getTextExtent', 'getTextFormat', 'getTextSnapshot', + 'getTime', 'getTimer', 'getTimezoneOffset', 'getTransform', 'getURL', 'getUTCDate', 'getUTCDay', + 'getUTCFullYear', 'getUTCHours', 'getUTCMilliseconds', 'getUTCMinutes', 'getUTCMonth', 'getUTCSeconds', + 'getVersion', 'getVolume', 'getYear', 'globalToLocal', 'goto', 'gotoAndPlay', 'gotoAndStop', + 'hasAccessibility', 'hasAudio', 'hasAudioEncoder', 'hasChildNodes', 'hasEmbeddedVideo', 'hasMP3', + 'hasPrinting', 'hasScreenBroadcast', 'hasScreenPlayback', 'hasStreamingAudio', 'hasStreamingVideo', + 'hasVideoEncoder', 'height', 'hide', 'hideBuiltInItems', 'hitArea', 'hitTest', 'hitTestTextNearPos', + 'HOME', 'hscroll', 'html', 'htmlText', 'ID3', 'ifFrameLoaded', 'ignoreWhite', 'implements', + 'import', 'indent', 'index', 'indexOf', 'Infinity', '-Infinity', 'INSERT', 'insertBefore', 'install', + 'instanceof', 'int', 'interface', 'isActive', 'isDebugger', 'isDown', 'isFinite', 'isNaN', 'isToggled', + 'italic', 'join', 'Key', 'language', 'lastChild', 'lastIndexOf', 'le', 'leading', 'LEFT', 'leftMargin', + 'length', 'level', 'lineStyle', 'lineTo', 'list', 'LN10', 'LN2', 'load', 'loadClip', 'loaded', 'loadMovie', + 'loadMovieNum', 'loadSound', 'loadVariables', 'loadVariablesNum', 'LoadVars', 'LocalConnection', + 'localFileReadDisable', 'localToGlobal', 'log', 'LOG10E', 'LOG2E', 'manufacturer', 'Math', 'max', + 'MAX_VALUE', 'maxChars', 'maxhscroll', 'maxscroll', 'mbchr', 'mblength', 'mbord', 'mbsubstring', 'menu', + 'message', 'Microphone', 'min', 'MIN_VALUE', 'MMExecute', 'motionLevel', 'motionTimeOut', 'Mouse', + 'mouseWheelEnabled', 'moveTo', 'Movieclip', 'MovieClipLoader', 'multiline', 'muted', 'name', 'names', 'NaN', + 'ne', 'NEGATIVE_INFINITY', 'NetConnection', 'NetStream', 'newline', 'nextFrame', + 'nextScene', 'nextSibling', 'nodeName', 'nodeType', 'nodeValue', 'not', 'Number', 'Object', + 'on', 'onActivity', 'onChanged', 'onClipEvent', 'onClose', 'onConnect', 'onData', 'onDragOut', + 'onDragOver', 'onEnterFrame', 'onID3', 'onKeyDown', 'onKeyUp', 'onKillFocus', 'onLoad', 'onLoadComplete', + 'onLoadError', 'onLoadInit', 'onLoadProgress', 'onLoadStart', 'onMouseDown', 'onMouseMove', 'onMouseUp', + 'onMouseWheel', 'onPress', 'onRelease', 'onReleaseOutside', 'onResize', 'onRollOut', 'onRollOver', + 'onScroller', 'onSelect', 'onSetFocus', 'onSoundComplete', 'onStatus', 'onUnload', 'onUpdate', 'onXML', + 'or(logischesOR)', 'ord', 'os', 'parentNode', 'parseCSS', 'parseFloat', 'parseInt', 'parseXML', 'password', + 'pause', 'PGDN', 'PGUP', 'PI', 'pixelAspectRatio', 'play', 'playerType', 'pop', 'position', + 'POSITIVE_INFINITY', 'pow', 'prevFrame', 'previousSibling', 'prevScene', 'print', 'printAsBitmap', + 'printAsBitmapNum', 'PrintJob', 'printNum', 'private', 'prototype', 'public', 'push', 'quality', + 'random', 'rate', 'registerClass', 'removeListener', 'removeMovieClip', 'removeNode', 'removeTextField', + 'replaceSel', 'replaceText', 'resolutionX', 'resolutionY', 'restrict', 'reverse', 'RIGHT', + 'rightMargin', 'round', 'scaleMode', 'screenColor', 'screenDPI', 'screenResolutionX', 'screenResolutionY', + 'scroll', 'seek', 'selectable', 'Selection', 'send', 'sendAndLoad', 'separatorBefore', 'serverString', + 'set', 'setvariable', 'setBufferTime', 'setClipboard', 'setDate', 'setFocus', 'setFullYear', 'setGain', + 'setHours', 'setInterval', 'setMask', 'setMilliseconds', 'setMinutes', 'setMode', 'setMonth', + 'setMotionLevel', 'setNewTextFormat', 'setPan', 'setProperty', 'setQuality', 'setRate', 'setRGB', + 'setSeconds', 'setSelectColor', 'setSelected', 'setSelection', 'setSilenceLevel', 'setStyle', + 'setTextFormat', 'setTime', 'setTransform', 'setUseEchoSuppression', 'setUTCDate', 'setUTCFullYear', + 'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds', 'setVolume', + 'setYear', 'SharedObject', 'SHIFT(Konstante)', 'shift(Methode)', 'show', 'showMenu', 'showSettings', + 'silenceLevel', 'silenceTimeout', 'sin', 'size', 'slice', 'smoothing', 'sort', 'sortOn', 'Sound', 'SPACE', + 'splice', 'split', 'sqrt', 'SQRT1_2', 'SQRT2', 'Stage', 'start', 'startDrag', 'static', 'status', 'stop', + 'stopAllSounds', 'stopDrag', 'String', 'StyleSheet(Klasse)', 'styleSheet(Eigenschaft)', 'substr', + 'substring', 'super', 'swapDepths', 'System', 'TAB', 'tabChildren', 'tabEnabled', 'tabIndex', + 'tabStops', 'tan', 'target', 'targetPath', 'tellTarget', 'text', 'textColor', 'TextField', 'TextFormat', + 'textHeight', 'TextSnapshot', 'textWidth', 'this', 'throw', 'time', 'toggleHighQuality', 'toLowerCase', + 'toString', 'toUpperCase', 'trace', 'trackAsMenu', 'try', 'type', 'typeof', 'undefined', + 'underline', 'unescape', 'uninstall', 'unloadClip', 'unloadMovie', 'unLoadMovieNum', 'unshift', 'unwatch', + 'UP', 'updateAfterEvent', 'updateProperties', 'url', 'useCodePage', 'useEchoSuppression', 'useHandCursor', + 'UTC', 'valueOf', 'variable', 'version', 'Video', 'visible', 'void', 'watch', 'width', + 'with', 'wordwrap', 'XML', 'xmlDecl', 'XMLNode', 'XMLSocket' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #0066CC;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array() +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/ada.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/ada.php new file mode 100644 index 0000000..cd61a9e --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/ada.php @@ -0,0 +1,133 @@ + 'Ada', + 'COMMENT_SINGLE' => array(1 => '--'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'begin', 'declare', 'do', 'else', 'elsif', 'exception', 'for', 'if', + 'is', 'loop', 'while', 'then', 'is', 'end', 'select', 'case', 'while', 'until', + 'goto', 'return' + ), + 2 => array( + 'abs', 'and', 'mod', 'not', 'or', 'rem', 'xor' + ), + 3 => array( + 'abort', 'abstract', 'accept', 'access', 'aliased', 'all', 'array', 'at', 'body', + 'constant', 'delay', 'delta', 'digits', 'entry', 'exit', + 'function', 'generic', 'in', 'limited', 'new', 'null', 'of', 'others', 'out', 'package', 'pragma', + 'private', 'procedure', 'protected', 'raise', 'range', 'record', 'renames', 'requeue', 'reverse', + 'separate', 'subtype', 'tagged', 'task', 'terminate', 'type', 'use', 'when', 'with' + ) + ), + 'SYMBOLS' => array( + '(', ')' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00007f;', + 2 => 'color: #0000ff;', + 3 => 'color: #46aa03; font-weight:bold;', + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'COMMENTS' => array( + 1 => 'color: #adadad; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #7f007f;' + ), + 'NUMBERS' => array( + 0 => 'color: #ff0000;' + ), + 'METHODS' => array( + 1 => 'color: #202020;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/apache.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/apache.php new file mode 100644 index 0000000..aed20b8 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/apache.php @@ -0,0 +1,171 @@ + 'Apache Log', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + /*keywords*/ + 1 => array( + 'accessconfig','accessfilename','action','addalt', + 'addaltbyencoding','addaltbytype','addcharset', + 'adddefaultcharset','adddescription', + 'addencoding','addhandler','addicon','addiconbyencoding', + 'addiconbytype','addlanguage','addmodule','addmoduleinfo', + 'addtype','agentlog','alias','aliasmatch', + 'allow','allowconnect','allowoverride','anonymous', + 'anonymous_authoritative','anonymous_logemail','anonymous_mustgiveemail', + 'anonymous_nouserid','anonymous_verifyemail','authauthoritative', + 'authdbauthoritative','authdbgroupfile','authdbmauthoritative', + 'authdbmgroupfile','authdbmgroupfile','authdbuserfile','authdbmuserfile', + 'authdigestfile','authgroupfile','authname','authtype', + 'authuserfile','bindaddress','browsermatch','browsermatchnocase', + 'bs2000account','cachedefaultexpire','cachedirlength','cachedirlevels', + 'cacheforcecompletion','cachegcinterval','cachelastmodifiedfactor','cachemaxexpire', + 'cachenegotiateddocs','cacheroot','cachesize','checkspelling', + 'clearmodulelist','contentdigest','cookieexpires','cookielog', + 'cookielog','cookietracking','coredumpdirectory','customlog', + 'defaulticon','defaultlanguage','defaulttype','define', + 'deny','directory','directorymatch','directoryindex', + 'documentroot','errordocument','errorlog','example', + 'expiresactive','expiresbytype','expiresdefault','extendedstatus', + 'fancyindexing','files','filesmatch','forcetype', + 'group','header','headername','hostnamelookups', + 'identitycheck','ifdefine','ifmodule','imapbase', + 'imapdefault','imapmenu','include','indexignore', + 'indexoptions','keepalive','keepalivetimeout','languagepriority', + 'limit','limitexcept','limitrequestbody','limitrequestfields', + 'limitrequestfieldsize','limitrequestline','listen','listenbacklog', + 'loadfile','loadmodule','location','locationmatch', + 'lockfile','logformat','loglevel','maxclients', + 'maxkeepaliverequests','maxrequestsperchild','maxspareservers','metadir', + 'metafiles','metasuffix','mimemagicfile','minspareservers', + 'mmapfile','namevirtualhost','nocache','options','order', + 'passenv','pidfile','port','proxyblock','proxydomain', + 'proxypass','proxypassreverse','proxyreceivebuffersize','proxyremote', + 'proxyrequests','proxyvia','qsc','readmename', + 'redirect','redirectmatch','redirectpermanent','redirecttemp', + 'refererignore','refererlog','removehandler','require', + 'resourceconfig','rewritebase','rewritecond','rewriteengine', + 'rewritelock','rewritelog','rewriteloglevel','rewritemap', + 'rewriteoptions','rewriterule','rlimitcpu','rlimitmem', + 'rlimitnproc','satisfy','scoreboardfile','script', + 'scriptalias','scriptaliasmatch','scriptinterpretersource','scriptlog', + 'scriptlogbuffer','scriptloglength','sendbuffersize', + 'serveradmin','serveralias','servername','serverpath', + 'serverroot','serversignature','servertokens','servertype', + 'setenv','setenvif','setenvifnocase','sethandler', + 'singlelisten','startservers','threadsperchild','timeout', + 'transferlog','typesconfig','unsetenv','usecanonicalname', + 'user','userdir','virtualhost','virtualdocumentroot', + 'virtualdocumentrootip','virtualscriptalias','virtualscriptaliasip', + 'xbithack','from','all' + ), + /*keyords 2*/ + 2 => array( + 'on','off','standalone','inetd', + 'force-response-1.0','downgrade-1.0','nokeepalive', + 'ndexes','includes','followsymlinks','none', + 'x-compress','x-gzip' + ) + ), + 'SYMBOLS' => array( + '(', ')' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00007f;', + 2 => 'color: #0000ff;', + ), + 'COMMENTS' => array( + 1 => 'color: #adadad; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #7f007f;' + ), + 'NUMBERS' => array( + 0 => 'color: #ff0000;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/applescript.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/applescript.php new file mode 100644 index 0000000..831bf2d --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/applescript.php @@ -0,0 +1,134 @@ + 'AppleScript', + 'COMMENT_SINGLE' => array(1 => '--'), + 'COMMENT_MULTI' => array( '(*' => '*)'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"',"'"), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'script','property','prop','end','copy','to','set','global','local','on','to','of', + 'in','given','with','without','return','continue','tell','if','then','else','repeat', + 'times','while','until','from','exit','try','error','considering','ignoring','timeout', + 'transaction','my','get','put','into','is' + ), + 2 => array( + 'each','some','every','whose','where','id','index','first','second','third','fourth', + 'fifth','sixth','seventh','eighth','ninth','tenth','last','front','back','st','nd', + 'rd','th','middle','named','through','thru','before','after','beginning','the' + ), + 3 => array( + 'close','copy','count','delete','duplicate','exists','launch','make','move','open', + 'print','quit','reopen','run','save','saving', + 'it','me','version','pi','result','space','tab','anything','case','diacriticals','expansion', + 'hyphens','punctuation','bold','condensed','expanded','hidden','italic','outline','plain', + 'shadow','strikethrough','subscript','superscript','underline','ask','no','yes','false', + 'true','weekday','monday','mon','tuesday','tue','wednesday','wed','thursday','thu','friday', + 'fri','saturday','sat','sunday','sun','month','january','jan','february','feb','march', + 'mar','april','apr','may','june','jun','july','jul','august','aug','september', + 'sep','october','oct','november','nov','december','dec','minutes','hours', + 'days','weeks','div','mod','and','not','or','as','contains','equal','equals','isnt' + ) + ), + 'SYMBOLS' => array( + ')','+','-','^','*','/','&','<','>=','<','<=','=','�' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + 0 => 'color: #0000ff;', + 4 => 'color: #009999;', + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 3 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => ',+-=<>/?^&*' + ), + 'REGEXPS' => array( + 0 => '[\\$%@]+[a-zA-Z_][a-zA-Z0-9_]*', + 4 => '<[a-zA-Z_][a-zA-Z0-9_]*>', + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/asm.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/asm.php new file mode 100644 index 0000000..38bc5a4 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/asm.php @@ -0,0 +1,199 @@ + 'ASM', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /*CPU*/ + 1 => array( + 'aaa','aad','aam','aas','adc','add','and','call','cbw','clc','cld','cli','cmc','cmp', + 'cmps','cmpsb','cmpsw','cwd','daa','das','dec','div','esc','hlt','idiv','imul','in','inc', + 'int','into','iret','ja','jae','jb','jbe','jc','jcxz','je','jg','jge','jl','jle','jmp', + 'jna','jnae','jnb','jnbe','jnc','jne','jng','jnge','jnl','jnle','jno','jnp','jns','jnz', + 'jo','jp','jpe','jpo','js','jz','lahf','lds','lea','les','lods','lodsb','lodsw','loop', + 'loope','loopew','loopne','loopnew','loopnz','loopnzw','loopw','loopz','loopzw','mov', + 'movs','movsb','movsw','mul','neg','nop','not','or','out','pop','popf','push','pushf', + 'rcl','rcr','ret','retf','retn','rol','ror','sahf','sal','sar','sbb','scas','scasb','scasw', + 'shl','shr','stc','std','sti','stos','stosb','stosw','sub','test','wait','xchg','xlat', + 'xlatb','xor','bound','enter','ins','insb','insw','leave','outs','outsb','outsw','popa','pusha','pushw', + 'arpl','lar','lsl','sgdt','sidt','sldt','smsw','str','verr','verw','clts','lgdt','lidt','lldt','lmsw','ltr', + 'bsf','bsr','bt','btc','btr','bts','cdq','cmpsd','cwde','insd','iretd','iretdf','iretf', + 'jecxz','lfs','lgs','lodsd','loopd','looped','loopned','loopnzd','loopzd','lss','movsd', + 'movsx','movzx','outsd','popad','popfd','pushad','pushd','pushfd','scasd','seta','setae', + 'setb','setbe','setc','sete','setg','setge','setl','setle','setna','setnae','setnb','setnbe', + 'setnc','setne','setng','setnge','setnl','setnle','setno','setnp','setns','setnz','seto','setp', + 'setpe','setpo','sets','setz','shld','shrd','stosd','bswap','cmpxchg','invd','invlpg','wbinvd','xadd','lock', + 'rep','repe','repne','repnz','repz' + ), + /*FPU*/ + 2 => array( + 'f2xm1','fabs','fadd','faddp','fbld','fbstp','fchs','fclex','fcom','fcomp','fcompp','fdecstp', + 'fdisi','fdiv','fdivp','fdivr','fdivrp','feni','ffree','fiadd','ficom','ficomp','fidiv', + 'fidivr','fild','fimul','fincstp','finit','fist','fistp','fisub','fisubr','fld','fld1', + 'fldcw','fldenv','fldenvw','fldl2e','fldl2t','fldlg2','fldln2','fldpi','fldz','fmul', + 'fmulp','fnclex','fndisi','fneni','fninit','fnop','fnsave','fnsavew','fnstcw','fnstenv', + 'fnstenvw','fnstsw','fpatan','fprem','fptan','frndint','frstor','frstorw','fsave', + 'fsavew','fscale','fsqrt','fst','fstcw','fstenv','fstenvw','fstp','fstsw','fsub','fsubp', + 'fsubr','fsubrp','ftst','fwait','fxam','fxch','fxtract','fyl2x','fyl2xp1', + 'fsetpm','fcos','fldenvd','fnsaved','fnstenvd','fprem1','frstord','fsaved','fsin','fsincos', + 'fstenvd','fucom','fucomp','fucompp' + ), + /*registers*/ + 3 => array( + 'ah','al','ax','bh','bl','bp','bx','ch','cl','cr0','cr2','cr3','cs','cx','dh','di','dl', + 'dr0','dr1','dr2','dr3','dr6','dr7','ds','dx','eax','ebp','ebx','ecx','edi','edx', + 'es','esi','esp','fs','gs','si','sp','ss','st','tr3','tr4','tr5','tr6','tr7', 'ah', 'bh', 'ch', 'dh' + ), + /*Directive*/ + 4 => array( + '186','286','286c','286p','287','386','386c','386p','387','486','486p', + '8086','8087','alpha','break','code','const','continue','cref','data','data?', + 'dosseg','else','elseif','endif','endw','err','err1','err2','errb', + 'errdef','errdif','errdifi','erre','erridn','erridni','errnb','errndef', + 'errnz','exit','fardata','fardata?','if','lall','lfcond','list','listall', + 'listif','listmacro','listmacroall',' model','no87','nocref','nolist', + 'nolistif','nolistmacro','radix','repeat','sall','seq','sfcond','stack', + 'startup','tfcond','type','until','untilcxz','while','xall','xcref', + 'xlist','alias','align','assume','catstr','comm','comment','db','dd','df','dosseg','dq', + 'dt','dup','dw','echo','else','elseif','elseif1','elseif2','elseifb','elseifdef','elseifdif', + 'elseifdifi','elseife','elseifidn','elseifidni','elseifnb','elseifndef','end', + 'endif','endm','endp','ends','eq',' equ','even','exitm','extern','externdef','extrn','for', + 'forc','ge','goto','group','high','highword','if','if1','if2','ifb','ifdef','ifdif', + 'ifdifi','ife',' ifidn','ifidni','ifnb','ifndef','include','includelib','instr','invoke', + 'irp','irpc','label','le','length','lengthof','local','low','lowword','lroffset', + 'macro','mask','mod','msfloat','name','ne','offset','opattr','option','org','%out', + 'page','popcontext','proc','proto','ptr','public','purge','pushcontext','record', + 'repeat','rept','seg','segment','short','size','sizeof','sizestr','struc','struct', + 'substr','subtitle','subttl','textequ','this','title','type','typedef','union','while','width', + '.model', '.stack', '.code', '.data' + + ), + + /*Operands*/ + 5 => array( + '@b','@f','addr','basic','byte','c','carry?','dword', + 'far','far16','fortran','fword','near','near16','overflow?','parity?','pascal','qword', + 'real4',' real8','real10','sbyte','sdword','sign?','stdcall','sword','syscall','tbyte', + 'vararg','word','zero?','flat','near32','far32', + 'abs','all','assumes','at','casemap','common','compact', + 'cpu','dotname','emulator','epilogue','error','export','expr16','expr32','farstack','flat', + 'forceframe','huge','language','large','listing','ljmp','loadds','m510','medium','memory', + 'nearstack','nodotname','noemulator','nokeyword','noljmp','nom510','none','nonunique', + 'nooldmacros','nooldstructs','noreadonly','noscoped','nosignextend','nothing', + 'notpublic','oldmacros','oldstructs','os_dos','para','private','prologue','radix', + 'readonly','req','scoped','setif2','smallstack','tiny','use16','use32','uses' + ) + ), + 'SYMBOLS' => array( + '[', ']', '(', ')' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00007f;', + 2 => 'color: #0000ff;', + 3 => 'color: #46aa03; font-weight:bold;', + 4 => 'color: #0000ff;', + 5 => 'color: #0000ff;' + ), + 'COMMENTS' => array( + 1 => 'color: #adadad; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #7f007f;' + ), + 'NUMBERS' => array( + 0 => 'color: #ff0000;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + 0 => 'color: #ff0000;', + 1 => 'color: #ff0000;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + 0 => '0[0-9a-fA-F]{1,32}[hH]', + 1 => '[01]{1,64}[bB]' + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 8 +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/asp.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/asp.php new file mode 100644 index 0000000..0895ae3 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/asp.php @@ -0,0 +1,153 @@ + 'ASP', + 'COMMENT_SINGLE' => array(1 => "'", 2 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => 0, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'include', 'file', 'Dim', 'Option', 'Explicit', 'Implicit', 'Set', 'Select', 'ReDim', 'Preserve', + 'ByVal', 'ByRef', 'End', 'Private', 'Public', 'If', 'Then', 'Else', 'ElseIf', 'Case', 'With', 'NOT', + 'While', 'Wend', 'For', 'Loop', 'Do', 'Request', 'Response', 'Server', 'ADODB', 'Session', 'Application', + 'Each', 'In', 'Get', 'Next', 'INT', 'CINT', 'CBOOL', 'CDATE', 'CBYTE', 'CCUR', 'CDBL', 'CLNG', 'CSNG', + 'CSTR', 'Fix', 'Is', 'Sgn', 'String', 'Boolean', 'Currency', 'Me', 'Single', 'Long', 'Integer', 'Byte', + 'Variant', 'Double', 'To', 'Let', 'Xor', 'Resume', 'On', 'Error', 'Imp', 'GoTo', 'Call', 'Global' + ), + 2 => array( + 'Null', 'Nothing', 'And', + 'False', '<%', '%>', + '<script language=', '</script>', + 'True', 'var', 'Or', 'BOF', 'EOF', + 'Function', 'Class', 'New', 'Sub' + ), + 3 => array( + 'CreateObject', 'Write', 'Redirect', 'Cookies', 'BinaryRead', 'ClientCertificate', 'Form', 'QueryString', + 'ServerVariables', 'TotalBytes', 'AddHeader', 'AppendToLog', 'BinaryWrite', 'Buffer', 'CacheControl', + 'Charset', 'Clear', 'ContentType', 'End()', 'Expires', 'ExpiresAbsolute', 'Flush()', 'IsClientConnected', + 'PICS', 'Status', 'Connection', 'Recordset', 'Execute', 'Abandon', 'Lock', 'UnLock', 'Command', 'Fields', + 'Properties', 'Property', 'Send', 'Replace', 'InStr', 'TRIM', 'NOW', 'Day', 'Month', 'Hour', 'Minute', 'Second', + 'Year', 'MonthName', 'LCase', 'UCase', 'Abs', 'Array', 'As', 'LEN', 'MoveFirst', 'MoveLast', 'MovePrevious', + 'MoveNext', 'LBound', 'UBound', 'Transfer', 'Open', 'Close', 'MapPath', 'FileExists', 'OpenTextFile', 'ReadAll' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #990099; font-weight: bold;', + 2 => 'color: #0000ff; font-weight: bold;', + 3 => 'color: #330066;' + ), + 'COMMENTS' => array( + 1 => 'color: #008000;', + 2 => 'color: #ff6600;', + 'MULTI' => 'color: #008000;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #006600; font-weight:bold' + ), + 'STRINGS' => array( + 0 => 'color: #cc0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #800000;' + ), + 'METHODS' => array( + 1 => 'color: #9900cc;' + ), + 'SYMBOLS' => array( + 0 => 'color: #006600; font-weight: bold' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + 0 => array( + '<%' => '%>' + ), + 1 => array( + '' + ), + 2 => array( + '' + ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + 1 => true, + 2 => true, + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/autoit.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/autoit.php new file mode 100644 index 0000000..54bcfd7 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/autoit.php @@ -0,0 +1,453 @@ + 'AutoIt', + 'COMMENT_SINGLE' => array(';'), + 'COMMENT_MULTI' => array('#comments-start' => '#comments-end', '#cs' => '#ce'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'false', 'and', 'byref', 'case', 'const', + 'continuecase', 'continueloop', 'default', 'dim', 'do', + 'else', 'elseif', 'endfunc', 'endif', 'endselect', + 'endswitch', 'endwith', 'enum', 'exit', 'exitloop', + 'for', 'func', 'global', 'if', 'in', + 'local', 'next', 'not', 'or', 'redim', + 'return', 'select', 'step', 'switch', 'then', + 'to', 'true', 'until', 'wend', 'while', + 'with' + ), + 2 => array( + '@appdatacommondir', '@appdatadir', '@autoitexe', '@autoitpid', + '@autoitversion', '@com_eventobj', '@commonfilesdir', '@compiled', + '@computername', '@comspec', '@cr', '@crlf', '@desktopcommondir', + '@desktopdepth', '@desktopdir', '@desktopheight', + '@desktoprefresh', '@desktopwidth', '@documentscommondir', + '@error', '@exitcode', '@exitmethod', '@extended', + '@favoritescommondir', '@favoritesdir', '@gui_ctrlhandle', + '@gui_ctrlid', '@gui_dragfile', '@gui_dragid', '@gui_dropid', + '@gui_winhandle', '@homedrive', '@homepath', '@homeshare', + '@hotkeypressed', '@hour', '@inetgetactive', '@inetgetbytesread', + '@ipaddress1', '@ipaddress2', '@ipaddress3', '@ipaddress4', + '@kblayout', '@lf', '@logondnsdomain', '@logondomain', + '@logonserver', '@mday', '@min', '@mon', '@mydocumentsdir', + '@numparams', '@osbuild', '@oslang', '@osservicepack', '@ostype', + '@osversion', '@processorarch', '@programfilesdir', + '@programscommondir', '@programsdir', '@scriptdir', + '@scriptfullpath', '@scriptlinenumber', '@scriptname', '@sec', + '@startmenucommondir', '@startmenudir', '@startupcommondir', + '@startupdir', '@sw_disable', '@sw_enable', '@sw_hide', '@sw_lock', + '@sw_maximize', '@sw_minimize', '@sw_restore', '@sw_show', + '@sw_showdefault', '@sw_showmaximized', '@sw_showminimized', + '@sw_showminnoactive', '@sw_showna', '@sw_shownoactivate', + '@sw_shownormal', '@sw_unlock', '@systemdir', '@tab', '@tempdir', + '@tray_id', '@trayiconflashing', '@trayiconvisible', '@username', + '@userprofiledir', '@wday', '@windowsdir', '@workingdir', '@yday', + '@year' + ), + 3 => array( + 'abs', 'acos', 'adlibdisable', 'adlibenable', 'asc', 'asin', + 'assign', 'atan', 'autoitsetoption', 'autoitwingettitle', + 'autoitwinsettitle', 'beep', 'binarystring', 'bitand', 'bitnot', + 'bitor', 'bitrotate', 'bitshift', 'bitxor', 'blockinput', 'break', + 'call', 'cdtray', 'ceiling', 'chr', 'clipget', 'clipput', + 'consoleread', 'consolewrite', 'consolewriteerror', 'controlclick', + 'controlcommand', 'controldisable', 'controlenable', + 'controlfocus', 'controlgetfocus', 'controlgethandle', + 'controlgetpos', 'controlgettext', 'controlhide', + 'controllistview', 'controlmove', 'controlsend', 'controlsettext', + 'controlshow', 'cos', 'dec', 'dircopy', 'dircreate', 'dirgetsize', + 'dirmove', 'dirremove', 'dllcall', 'dllclose', 'dllopen', + 'dllstructcreate', 'dllstructgetdata', 'dllstructgetptr', + 'dllstructgetsize', 'dllstructsetdata', 'drivegetdrive', + 'drivegetfilesystem', 'drivegetlabel', 'drivegetserial', + 'drivegettype', 'drivemapadd', 'drivemapdel', 'drivemapget', + 'drivesetlabel', 'drivespacefree', 'drivespacetotal', + 'drivestatus', 'envget', 'envset', 'envupdate', 'eval', 'execute', + 'exp', 'filechangedir', 'fileclose', 'filecopy', + 'filecreatentfslink', 'filecreateshortcut', 'filedelete', + 'fileexists', 'filefindfirstfile', 'filefindnextfile', + 'filegetattrib', 'filegetlongname', 'filegetshortcut', + 'filegetshortname', 'filegetsize', 'filegettime', 'filegetversion', + 'fileinstall', 'filemove', 'fileopen', 'fileopendialog', + 'fileread', 'filereadline', 'filerecycle', 'filerecycleempty', + 'filesavedialog', 'fileselectfolder', 'filesetattrib', + 'filesettime', 'filewrite', 'filewriteline', 'floor', + 'ftpsetproxy', 'guicreate', 'guictrlcreateavi', + 'guictrlcreatebutton', 'guictrlcreatecheckbox', + 'guictrlcreatecombo', 'guictrlcreatecontextmenu', + 'guictrlcreatedate', 'guictrlcreatedummy', 'guictrlcreateedit', + 'guictrlcreategraphic', 'guictrlcreategroup', 'guictrlcreateicon', + 'guictrlcreateinput', 'guictrlcreatelabel', 'guictrlcreatelist', + 'guictrlcreatelistview', 'guictrlcreatelistviewitem', + 'guictrlcreatemenu', 'guictrlcreatemenuitem', + 'guictrlcreatemonthcal', 'guictrlcreateobj', 'guictrlcreatepic', + 'guictrlcreateprogress', 'guictrlcreateradio', + 'guictrlcreateslider', 'guictrlcreatetab', 'guictrlcreatetabitem', + 'guictrlcreatetreeview', 'guictrlcreatetreeviewitem', + 'guictrlcreateupdown', 'guictrldelete', 'guictrlgethandle', + 'guictrlgetstate', 'guictrlread', 'guictrlrecvmsg', + 'guictrlregisterlistviewsort', 'guictrlsendmsg', + 'guictrlsendtodummy', 'guictrlsetbkcolor', 'guictrlsetcolor', + 'guictrlsetcursor', 'guictrlsetdata', 'guictrlsetfont', + 'guictrlsetgraphic', 'guictrlsetimage', 'guictrlsetlimit', + 'guictrlsetonevent', 'guictrlsetpos', 'guictrlsetresizing', + 'guictrlsetstate', 'guictrlsetstyle', 'guictrlsettip', 'guidelete', + 'guigetcursorinfo', 'guigetmsg', 'guiregistermsg', 'guisetbkcolor', + 'guisetcoord', 'guisetcursor', 'guisetfont', 'guisethelp', + 'guiseticon', 'guisetonevent', 'guisetstate', 'guistartgroup', + 'guiswitch', 'hex', 'hotkeyset', 'httpsetproxy', 'hwnd', 'inetget', + 'inetgetsize', 'inidelete', 'iniread', 'inireadsection', + 'inireadsectionnames', 'inirenamesection', 'iniwrite', + 'iniwritesection', 'inputbox', 'int', 'isadmin', 'isarray', + 'isbinarystring', 'isbool', 'isdeclared', 'isdllstruct', 'isfloat', + 'ishwnd', 'isint', 'iskeyword', 'isnumber', 'isobj', 'isstring', + 'log', 'memgetstats', 'mod', 'mouseclick', 'mouseclickdrag', + 'mousedown', 'mousegetcursor', 'mousegetpos', 'mousemove', + 'mouseup', 'mousewheel', 'msgbox', 'number', 'objcreate', + 'objevent', 'objget', 'objname', 'opt', 'ping', 'pixelchecksum', + 'pixelgetcolor', 'pixelsearch', 'pluginclose', 'pluginopen', + 'processclose', 'processexists', 'processlist', + 'processsetpriority', 'processwait', 'processwaitclose', + 'progressoff', 'progresson', 'progressset', 'random', 'regdelete', + 'regenumkey', 'regenumval', 'regread', 'regwrite', 'round', 'run', + 'runasset', 'runwait', 'send', 'seterror', 'setextended', + 'shellexecute', 'shellexecutewait', 'shutdown', 'sin', 'sleep', + 'soundplay', 'soundsetwavevolume', 'splashimageon', 'splashoff', + 'splashtexton', 'sqrt', 'srandom', 'statusbargettext', + 'stderrread', 'stdinwrite', 'stdoutread', 'string', 'stringaddcr', + 'stringformat', 'stringinstr', 'stringisalnum', 'stringisalpha', + 'stringisascii', 'stringisdigit', 'stringisfloat', 'stringisint', + 'stringislower', 'stringisspace', 'stringisupper', + 'stringisxdigit', 'stringleft', 'stringlen', 'stringlower', + 'stringmid', 'stringregexp', 'stringregexpreplace', + 'stringreplace', 'stringright', 'stringsplit', 'stringstripcr', + 'stringstripws', 'stringtrimleft', 'stringtrimright', + 'stringupper', 'tan', 'tcpaccept', 'tcpclosesocket', 'tcpconnect', + 'tcplisten', 'tcpnametoip', 'tcprecv', 'tcpsend', 'tcpshutdown', + 'tcpstartup', 'timerdiff', 'timerinit', 'timerstart', 'timerstop', + 'tooltip', 'traycreateitem', 'traycreatemenu', 'traygetmsg', + 'trayitemdelete', 'trayitemgethandle', 'trayitemgetstate', + 'trayitemgettext', 'trayitemsetonevent', 'trayitemsetstate', + 'trayitemsettext', 'traysetclick', 'trayseticon', 'traysetonevent', + 'traysetpauseicon', 'traysetstate', 'traysettooltip', 'traytip', + 'ubound', 'udpbind', 'udpclosesocket', 'udpopen', 'udprecv', + 'udpsend', 'winactivate', 'winactive', 'winclose', 'winexists', + 'winflash', 'wingetcaretpos', 'wingetclasslist', + 'wingetclientsize', 'wingethandle', 'wingetpos', 'wingetprocess', + 'wingetstate', 'wingettext', 'wingettitle', 'winkill', 'winlist', + 'winmenuselectitem', 'winminimizeall', 'winminimizeallundo', + 'winmove', 'winsetontop', 'winsetstate', 'winsettitle', + 'winsettrans', 'winshow', 'winwait', 'winwaitactive', + 'winwaitclose', 'winwaitnotactive' + ), + 4 => array( + '_arrayadd', '_arraybinarysearch', '_arraycreate', '_arraydelete', + '_arraydisplay', '_arrayinsert', '_arraymax', '_arraymaxindex', + '_arraymin', '_arrayminindex', '_arraypop', '_arraypush', + '_arrayreverse', '_arraysearch', '_arraysort', '_arrayswap', + '_arraytoclip', '_arraytostring', '_arraytrim', '_colorgetblue', + '_colorgetgreen', '_colorgetred', '_dateadd', '_datedayofweek', + '_datedaysinmonth', '_datediff', '_dateisleapyear', '_dateisvalid', + '_datetimeformat', '_datetimesplit', '_datetodayofweek', + '_datetodayofweekiso', '_datetodayvalue', '_dayvaluetodate', + '_now', '_nowcalc', '_nowcalcdate', '_nowdate', '_nowtime', + '_setdate', '_settime', '_tickstotime', '_timetoticks', + '_weeknumberiso', '_filecountlines', '_filecreate', + '_filelisttoarray', '_fileprint', '_filereadtoarray', + '_filewritefromarray', '_filewritelog', '_filewritetoline', + '_pathfull', '_pathmake', '_pathsplit', '_replacestringinfile', + '_tempfile', '_guictrlcomboadddir', '_guictrlcomboaddstring', + '_guictrlcomboautocomplete', '_guictrlcombodeletestring', + '_guictrlcombofindstring', '_guictrlcombogetcount', + '_guictrlcombogetcursel', '_guictrlcombogetdroppedcontrolrect', + '_guictrlcombogetdroppedstate', '_guictrlcombogetdroppedwidth', + '_guictrlcombogeteditsel', '_guictrlcombogetextendedui', + '_guictrlcombogethorizontalextent', '_guictrlcombogetitemheight', + '_guictrlcombogetlbtext', '_guictrlcombogetlbtextlen', + '_guictrlcombogetlist', '_guictrlcombogetlocale', + '_guictrlcombogetminvisible', '_guictrlcombogettopindex', + '_guictrlcomboinitstorage', '_guictrlcomboinsertstring', + '_guictrlcombolimittext', '_guictrlcomboresetcontent', + '_guictrlcomboselectstring', '_guictrlcombosetcursel', + '_guictrlcombosetdroppedwidth', '_guictrlcomboseteditsel', + '_guictrlcombosetextendedui', '_guictrlcombosethorizontalextent', + '_guictrlcombosetitemheight', '_guictrlcombosetminvisible', + '_guictrlcombosettopindex', '_guictrlcomboshowdropdown', + '_guictrleditcanundo', '_guictrleditemptyundobuffer', + '_guictrleditfind', '_guictrleditgetfirstvisibleline', + '_guictrleditgetline', '_guictrleditgetlinecount', + '_guictrleditgetmodify', '_guictrleditgetrect', + '_guictrleditgetsel', '_guictrleditlinefromchar', + '_guictrleditlineindex', '_guictrleditlinelength', + '_guictrleditlinescroll', '_guictrleditreplacesel', + '_guictrleditscroll', '_guictrleditsetmodify', + '_guictrleditsetrect', '_guictrleditsetsel', '_guictrleditundo', + '_guictrlipaddressclear', '_guictrlipaddresscreate', + '_guictrlipaddressdelete', '_guictrlipaddressget', + '_guictrlipaddressisblank', '_guictrlipaddressset', + '_guictrlipaddresssetfocus', '_guictrlipaddresssetfont', + '_guictrlipaddresssetrange', '_guictrlipaddressshowhide', + '_guictrllistadddir', '_guictrllistadditem', '_guictrllistclear', + '_guictrllistcount', '_guictrllistdeleteitem', + '_guictrllistfindstring', '_guictrllistgetanchorindex', + '_guictrllistgetcaretindex', '_guictrllistgethorizontalextent', + '_guictrllistgetinfo', '_guictrllistgetitemrect', + '_guictrllistgetlocale', '_guictrllistgetselcount', + '_guictrllistgetselitems', '_guictrllistgetselitemstext', + '_guictrllistgetselstate', '_guictrllistgettext', + '_guictrllistgettextlen', '_guictrllistgettopindex', + '_guictrllistinsertitem', '_guictrllistreplacestring', + '_guictrllistselectedindex', '_guictrllistselectindex', + '_guictrllistselectstring', '_guictrllistselitemrange', + '_guictrllistselitemrangeex', '_guictrllistsetanchorindex', + '_guictrllistsetcaretindex', '_guictrllistsethorizontalextent', + '_guictrllistsetlocale', '_guictrllistsetsel', + '_guictrllistsettopindex', '_guictrllistsort', + '_guictrllistswapstring', '_guictrllistviewcopyitems', + '_guictrllistviewdeleteallitems', '_guictrllistviewdeletecolumn', + '_guictrllistviewdeleteitem', + '_guictrllistviewdeleteitemsselected', + '_guictrllistviewensurevisible', '_guictrllistviewfinditem', + '_guictrllistviewgetbackcolor', '_guictrllistviewgetcallbackmask', + '_guictrllistviewgetcheckedstate', + '_guictrllistviewgetcolumnorder', '_guictrllistviewgetcolumnwidth', + '_guictrllistviewgetcounterpage', '_guictrllistviewgetcursel', + '_guictrllistviewgetextendedlistviewstyle', + '_guictrllistviewgetheader', '_guictrllistviewgethotcursor', + '_guictrllistviewgethotitem', '_guictrllistviewgethovertime', + '_guictrllistviewgetitemcount', '_guictrllistviewgetitemtext', + '_guictrllistviewgetitemtextarray', '_guictrllistviewgetnextitem', + '_guictrllistviewgetselectedcount', + '_guictrllistviewgetselectedindices', + '_guictrllistviewgetsubitemscount', '_guictrllistviewgettopindex', + '_guictrllistviewgetunicodeformat', '_guictrllistviewhidecolumn', + '_guictrllistviewinsertcolumn', '_guictrllistviewinsertitem', + '_guictrllistviewjustifycolumn', '_guictrllistviewscroll', + '_guictrllistviewsetcheckstate', + '_guictrllistviewsetcolumnheadertext', + '_guictrllistviewsetcolumnorder', '_guictrllistviewsetcolumnwidth', + '_guictrllistviewsethotitem', '_guictrllistviewsethovertime', + '_guictrllistviewsetitemcount', '_guictrllistviewsetitemselstate', + '_guictrllistviewsetitemtext', '_guictrllistviewsort', + '_guictrlmonthcalget1stdow', '_guictrlmonthcalgetcolor', + '_guictrlmonthcalgetdelta', '_guictrlmonthcalgetmaxselcount', + '_guictrlmonthcalgetmaxtodaywidth', + '_guictrlmonthcalgetminreqrect', '_guictrlmonthcalset1stdow', + '_guictrlmonthcalsetcolor', '_guictrlmonthcalsetdelta', + '_guictrlmonthcalsetmaxselcount', '_guictrlslidercleartics', + '_guictrlslidergetlinesize', '_guictrlslidergetnumtics', + '_guictrlslidergetpagesize', '_guictrlslidergetpos', + '_guictrlslidergetrangemax', '_guictrlslidergetrangemin', + '_guictrlslidersetlinesize', '_guictrlslidersetpagesize', + '_guictrlslidersetpos', '_guictrlslidersetticfreq', + '_guictrlstatusbarcreate', '_guictrlstatusbarcreateprogress', + '_guictrlstatusbardelete', '_guictrlstatusbargetborders', + '_guictrlstatusbargeticon', '_guictrlstatusbargetparts', + '_guictrlstatusbargetrect', '_guictrlstatusbargettext', + '_guictrlstatusbargettextlength', '_guictrlstatusbargettip', + '_guictrlstatusbargetunicode', '_guictrlstatusbarissimple', + '_guictrlstatusbarresize', '_guictrlstatusbarsetbkcolor', + '_guictrlstatusbarseticon', '_guictrlstatusbarsetminheight', + '_guictrlstatusbarsetparts', '_guictrlstatusbarsetsimple', + '_guictrlstatusbarsettext', '_guictrlstatusbarsettip', + '_guictrlstatusbarsetunicode', '_guictrlstatusbarshowhide', + '_guictrltabdeleteallitems', '_guictrltabdeleteitem', + '_guictrltabdeselectall', '_guictrltabgetcurfocus', + '_guictrltabgetcursel', '_guictrltabgetextendedstyle', + '_guictrltabgetitemcount', '_guictrltabgetitemrect', + '_guictrltabgetrowcount', '_guictrltabgetunicodeformat', + '_guictrltabhighlightitem', '_guictrltabsetcurfocus', + '_guictrltabsetcursel', '_guictrltabsetmintabwidth', + '_guictrltabsetunicodeformat', '_guictrltreeviewdeleteallitems', + '_guictrltreeviewdeleteitem', '_guictrltreeviewexpand', + '_guictrltreeviewgetbkcolor', '_guictrltreeviewgetcount', + '_guictrltreeviewgetindent', '_guictrltreeviewgetlinecolor', + '_guictrltreeviewgetparenthandle', '_guictrltreeviewgetparentid', + '_guictrltreeviewgetstate', '_guictrltreeviewgettext', + '_guictrltreeviewgettextcolor', '_guictrltreeviewgettree', + '_guictrltreeviewinsertitem', '_guictrltreeviewsetbkcolor', + '_guictrltreeviewseticon', '_guictrltreeviewsetindent', + '_guictrltreeviewsetlinecolor', '_guictrltreeviewsetstate', + '_guictrltreeviewsettext', '_guictrltreeviewsettextcolor', + '_guictrltreeviewsort', '_ie_example', '_ie_introduction', + '_ie_versioninfo', '_ieaction', '_ieattach', '_iebodyreadhtml', + '_iebodyreadtext', '_iebodywritehtml', '_iecreate', + '_iecreateembedded', '_iedocgetobj', '_iedocinserthtml', + '_iedocinserttext', '_iedocreadhtml', '_iedocwritehtml', + '_ieerrorhandlerderegister', '_ieerrorhandlerregister', + '_ieerrornotify', '_ieformelementcheckboxselect', + '_ieformelementgetcollection', '_ieformelementgetobjbyname', + '_ieformelementgetvalue', '_ieformelementoptionselect', + '_ieformelementradioselect', '_ieformelementsetvalue', + '_ieformgetcollection', '_ieformgetobjbyname', '_ieformimageclick', + '_ieformreset', '_ieformsubmit', '_ieframegetcollection', + '_ieframegetobjbyname', '_iegetobjbyname', + '_ieheadinserteventscript', '_ieimgclick', '_ieimggetcollection', + '_ieisframeset', '_ielinkclickbyindex', '_ielinkclickbytext', + '_ielinkgetcollection', '_ieloadwait', '_ieloadwaittimeout', + '_ienavigate', '_iepropertyget', '_iepropertyset', '_iequit', + '_ietablegetcollection', '_ietablewritetoarray', + '_ietagnameallgetcollection', '_ietagnamegetcollection', '_getip', + '_inetexplorercapable', '_inetgetsource', '_inetmail', + '_inetsmtpmail', '_tcpiptoname', '_degree', '_mathcheckdiv', + '_max', '_min', '_radian', '_choosecolor', '_choosefont', + '_clipputfile', '_iif', '_ispressed', '_mousetrap', '_singleton', + '_processgetname', '_processgetpriority', '_rundos', + '_sendmessage', '_soundclose', '_soundlength', '_soundopen', + '_soundpause', '_soundplay', '_soundpos', '_soundresume', + '_soundseek', '_soundstatus', '_soundstop', '_sqlite_changes', + '_sqlite_close', '_sqlite_display2dresult', '_sqlite_encode', + '_sqlite_errcode', '_sqlite_errmsg', '_sqlite_escape', + '_sqlite_exec', '_sqlite_fetchdata', '_sqlite_fetchnames', + '_sqlite_gettable', '_sqlite_gettable2d', + '_sqlite_lastinsertrowid', '_sqlite_libversion', '_sqlite_open', + '_sqlite_query', '_sqlite_queryfinalize', '_sqlite_queryreset', + '_sqlite_querysinglerow', '_sqlite_savemode', '_sqlite_settimeout', + '_sqlite_shutdown', '_sqlite_sqliteexe', '_sqlite_startup', + '_sqlite_totalchanges', '_hextostring', '_stringaddcomma', + '_stringbetween', '_stringencrypt', '_stringinsert', + '_stringproper', '_stringrepeat', '_stringreverse', '_stringtohex', + '_viclose', '_viexeccommand', '_vifindgpib', '_vigpibbusreset', + '_vigtl', '_viopen', '_visetattribute', '_visettimeout' + ), + 5 => array( + '#include', '#include-once', '#notrayicon' + ), + 6 => array( + '#forceref', '#compiler_allow_decompile', '#compiler_au3check_dat', + '#compiler_au3check_parameters', + '#compiler_au3check_stop_onwarning', '#compiler_aut2exe', + '#compiler_autoit3', '#compiler_compression', '#compiler_icon', + '#compiler_outfile', '#compiler_outfile_type', + '#compiler_passphrase', '#compiler_plugin_funcs', + '#compiler_prompt', '#compiler_res_comment', + '#compiler_res_description', '#compiler_res_field', + '#compiler_res_field1name', '#compiler_res_field1value', + '#compiler_res_field2name', '#compiler_res_field2value', + '#compiler_res_fileversion', + '#compiler_res_fileversion_autoincrement', + '#compiler_res_legalcopyright', '#compiler_run_after', + '#compiler_run_au3check', '#compiler_run_before', + '#compiler_run_cvswrapper', '#compiler_run_tidy', + '#compiler_tidy_stop_onerror', '#compiler_useupx', '#endregion', + '#region', '#run_debug_mode', '#tidy_parameters' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '&', '*', '/', '<', '>', '+', '-', '^', '=', '.' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000FF; font-weight: bold;', + 2 => 'color: #800000; font-weight: bold;', + 3 => 'color: #000080; font-style: italic; font-weight: bold;', + 4 => 'color: #0080FF; font-style: italic; font-weight: bold;', + 5 => 'color: #F000FF; font-style: italic;', + 6 => 'color: #A00FF0; font-style: italic;' + ), + 'COMMENTS' => array( + 0 => 'font-style: italic; color: #009933;', + 'MULTI' => 'font-style: italic; color: #669900;' + ), + 'ESCAPE_CHAR' => array( + 0 => '' + ), + 'BRACKETS' => array( + 0 => 'color: #FF0000; font-weight: bold;' + ), + 'STRINGS' => array( + 0 => 'font-weight: bold; color: #008080;' + ), + 'NUMBERS' => array( + 0 => 'color: #AC00A9; font-style: italic; font-weight: bold;' + ), + 'METHODS' => array( + 1 => 'color: #0000FF; font-style: italic; font-weight: bold;' + ), + 'SYMBOLS' => array( + 0 => 'color: #FF0000; font-weight: bold;' + ), + 'REGEXPS' => array( + 0 => 'font-weight: bold; color: #AA0000;' + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '' + ) + ), + 'URLS' => array( + 1 => 'http://www.autoitscript.com/autoit3/docs/keywords.htm', + 2 => 'http://www.autoitscript.com/autoit3/docs/macros.htm', + 3 => 'http://www.autoitscript.com/autoit3/docs/functions/{FNAME}.htm', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + 0 => '[\\$%@]+[a-zA-Z_][a-zA-Z0-9_]*' + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + 1 => true, + 2 => true, + 3 => true + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/bash.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/bash.php new file mode 100644 index 0000000..55d295f --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/bash.php @@ -0,0 +1,205 @@ + 'Bash', + // Bash DOES have single line comments with # markers. But bash also has + // the $# variable, so comments need special handling (see sf.net + // 1564839) + 'COMMENT_SINGLE' => array('#'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'case', 'do', 'done', 'elif', 'else', 'esac', 'fi', 'for', 'function', + 'if', 'in', 'select', 'set', 'then', 'until', 'while', 'time' + ), + 2 => array( + 'aclocal', 'aconnect', 'aplay', 'apm', 'apmsleep', 'apropos', + 'ar', 'arch', 'arecord', 'as', 'as86', 'autoconf', 'autoheader', + 'automake', 'awk', + 'basename', 'bc', 'bison', 'bunzip2', 'bzip2', 'bzcat', + 'bzcmp', 'bzdiff', 'bzegrep', 'bzegrep', 'bzfgrep', 'bzgrep', + 'bzip2', 'bzip2recover', 'bzless', 'bzmore', + 'c++', 'cal', 'cat', 'chattr', 'cc', 'cdda2wav', 'cdparanoia', + 'cdrdao', 'cd-read', 'cdrecord', 'chfn', 'chgrp', 'chmod', + 'chown', 'chroot', 'chsh', 'chvt', 'clear', 'cmp', 'comm', 'co', + 'col', 'cp', 'cpio', 'cpp', 'cut', + 'date', 'dd', 'dc', 'dcop', 'deallocvt', 'df', 'diff', 'diff3', 'dir', + 'dircolors', 'directomatic', 'dirname', 'dmesg', + 'dnsdomainname', 'domainname', 'du', 'dumpkeys', + 'ed', 'egrep', 'env', 'expr', + 'false', 'fbset', 'fgconsole','fgrep', 'find', 'file', 'flex', 'flex++', + 'fmt', 'free', 'ftp', 'funzip', 'fuser', + 'g++', 'gawk', 'gc','gcc', 'gdb', 'getent', 'getkeycodes', + 'getopt', 'gettext', 'gettextize', 'gimp', 'gimp-remote', + 'gimptool', 'gmake', 'gocr', 'grep', 'groups', 'gs', 'gunzip', + 'gzexe', 'gzip', + 'head', 'hexdump', 'hostname', + 'id', 'igawk', 'install', + 'join', + 'kbd_mode','kbdrate', 'kdialog', 'kfile', 'kill', 'killall', + 'last', 'lastb', 'ld', 'ld86', 'ldd', 'less', 'lex', 'link', 'ln', 'loadkeys', + 'loadunimap', 'locate', 'lockfile', 'login', 'logname', + 'lp', 'lpr', 'ls', 'lsattr', 'lsmod', 'lsmod.old', 'lynx', + 'm4', 'make', 'man', 'mapscrn', 'mesg', 'mkdir', 'mkfifo', + 'mknod', 'mktemp', 'more', 'mount', 'msgfmt', 'mv', + 'namei', 'nano', 'nasm', 'nawk', 'netstat', 'nice', + 'nisdomainname', 'nl', 'nm', 'nm86', 'nmap', 'nohup', 'nop', + 'od', 'openvt', + 'passwd', 'patch', 'pcregrep', 'pcretest', 'perl', 'perror', + 'pgawk', 'pidof', 'ping', 'pr', 'procmail', 'prune', 'ps', 'pstree', + 'ps2ascii', 'ps2epsi', 'ps2frag', 'ps2pdf', 'ps2ps', 'psbook', + 'psmerge', 'psnup', 'psresize', 'psselect', 'pstops', + 'rbash', 'rcs', 'read', 'readlink', 'red', 'resizecons', 'rev', 'rm', + 'rmdir', 'run-parts', + 'sash', 'sed', 'setfont', 'setkeycodes', 'setleds', + 'setmetamode', 'setserial', 'scp', 'seq', 'setterm', 'sh', + 'showkey', 'shred', 'size', 'size86', 'skill', 'sleep', 'slogin', + 'snice', 'sort', 'sox', 'split', 'ssed', 'ssh', 'ssh-add', + 'ssh-agent', 'ssh-keygen', 'ssh-keyscan', 'stat', 'strings', + 'strip', 'stty', 'su', 'sudo', 'suidperl', 'sum', 'sync', + 'tac', 'tail', 'tar', 'tee', 'tempfile', 'touch', 'tr', 'true', + 'umount', 'uname', 'unicode_start', 'unicode_stop', 'uniq', + 'unlink', 'unzip', 'updatedb', 'updmap', 'uptime', 'users', + 'utmpdump', 'uuidgen', + 'vdir', 'vmstat', + 'w', 'wall', 'wc', 'wget', 'whatis', 'whereis', 'which', 'who', + 'whoami', 'write', + 'xargs', 'xhost', 'xmodmap', 'xset', + 'yacc', 'yes', 'ypdomainname', + 'zcat', 'zcmp', 'zdiff', 'zegrep', 'zfgrep', 'zforce', 'zgrep', + 'zip', 'zless', 'zmore', 'znew', 'zsh', ' zsoelim' + ), + 3 => array( + 'alias', 'bg', 'bind', 'break', 'builtin', 'cd', 'command', + 'compgen', 'complete', 'continue', 'declare', 'dirs', 'disown', + 'echo', 'enable', 'eval', 'exec', 'exit', 'export', 'fc', + 'fg', 'getopts', 'hash', 'help', 'history', 'jobs', 'kill', 'let', + 'local', 'logout', 'popd', 'printf', 'pushd', 'pwd', 'readonly', + 'return', 'shift', 'shopt', 'source', 'suspend', 'test', 'times', + 'trap', 'type', 'typeset', 'ulimit', 'umask', 'unalias', 'unset', + 'wait' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>', ';;' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight: bold;', + 2 => 'color: #c20cb9; font-weight: bold;', + 3 => 'color: #7a0874; font-weight: bold;' + ), + 'COMMENTS' => array( + 0 => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #7a0874; font-weight: bold;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #000000;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #000000; font-weight: bold;' + ), + 'REGEXPS' => array( + 0 => 'color: #007800;', + 1 => 'color: #007800;', + 2 => 'color: #007800;', +// 3 => 'color: #808080; font-style: italic;', + 4 => 'color: #007800;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + 0 => "\\$\\{[a-zA-Z_][a-zA-Z0-9_]*?\\}", + 1 => "\\$[a-zA-Z_][a-zA-Z0-9_]*", + 2 => "([a-zA-Z_][a-zA-Z0-9_]*)=", +// 3 => "(? "\\$[*#\$\\-\\?!]" + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'COMMENTS' => array( + 'DISALLOWED_BEFORE' => '$' + ) + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/basic4gl.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/basic4gl.php new file mode 100644 index 0000000..d36c1fd --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/basic4gl.php @@ -0,0 +1,336 @@ + 'Basic4GL', + 'COMMENT_SINGLE' => array(1 => "'"), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + + // Navy Blue Bold Keywords + + 'true','rnd_max','m_pi','m_e','false','VK_ZOOM','VK_UP','VK_TAB','VK_SUBTRACT','VK_SPACE','VK_SNAPSHOT', + 'VK_SHIFT','VK_SEPARATOR','VK_SELECT','VK_SCROLL','VK_RWIN','VK_RSHIFT','VK_RMENU','VK_RIGHT','VK_RETURN', + 'VK_RCONTROL','VK_RBUTTON','VK_PROCESSKEY','VK_PRIOR','VK_PRINT','VK_PLAY','VK_PAUSE','VK_NUMPAD9','VK_NUMPAD8', + 'VK_NUMPAD7','VK_NUMPAD6','VK_NUMPAD5','VK_NUMPAD4','VK_NUMPAD3','VK_NUMPAD2','VK_NUMPAD1','VK_NUMPAD0', + 'VK_NUMLOCK','VK_NONCONVERT','VK_NEXT','VK_MULTIPLY','VK_MODECHANGE','VK_MENU','VK_MBUTTON','VK_LWIN', + 'VK_LSHIFT','VK_LMENU','VK_LEFT','VK_LCONTROL','VK_LBUTTON','VK_KANJI','VK_KANA','VK_JUNJA','VK_INSERT', + 'VK_HOME','VK_HELP','VK_HANJA','VK_HANGUL','VK_HANGEUL','VK_FINAL','VK_F9','VK_F8','VK_F7','VK_F6','VK_F5', + 'VK_F4','VK_F3','VK_F24','VK_F23','VK_F22','VK_F21','VK_F20','VK_F2','VK_F19','VK_F18','VK_F17','VK_F16', + 'VK_F15','VK_F14','VK_F13','VK_F12','VK_F11','VK_F10','VK_F1','VK_EXSEL','VK_EXECUTE','VK_ESCAPE','VK_EREOF', + 'VK_END','VK_DOWN','VK_DIVIDE','VK_DELETE','VK_DECIMAL','VK_CRSEL','VK_CONVERT','VK_CONTROL','VK_CLEAR', + 'VK_CAPITAL','VK_CANCEL','VK_BACK','VK_ATTN','VK_APPS','VK_ADD','VK_ACCEPT','TEXT_SIMPLE','TEXT_OVERLAID', + 'TEXT_BUFFERED','SPR_TILEMAP','SPR_SPRITE','SPR_INVALID','MOUSE_RBUTTON','MOUSE_MBUTTON','MOUSE_LBUTTON', + 'GL_ZOOM_Y','GL_ZOOM_X','GL_ZERO','GL_XOR','GL_WIN_swap_hint','GL_WIN_draw_range_elements','GL_VIEWPORT_BIT', + 'GL_VIEWPORT','GL_VERTEX_ARRAY_TYPE_EXT','GL_VERTEX_ARRAY_TYPE','GL_VERTEX_ARRAY_STRIDE_EXT','GL_VERTEX_ARRAY_STRIDE', + 'GL_VERTEX_ARRAY_SIZE_EXT','GL_VERTEX_ARRAY_SIZE','GL_VERTEX_ARRAY_POINTER_EXT','GL_VERTEX_ARRAY_POINTER', + 'GL_VERTEX_ARRAY_EXT','GL_VERTEX_ARRAY_COUNT_EXT','GL_VERTEX_ARRAY','GL_VERSION_1_1','GL_VERSION','GL_VENDOR', + 'GL_V3F','GL_V2F','GL_UNSIGNED_SHORT','GL_UNSIGNED_INT','GL_UNSIGNED_BYTE','GL_UNPACK_SWAP_BYTES','GL_UNPACK_SKIP_ROWS', + 'GL_UNPACK_SKIP_PIXELS','GL_UNPACK_ROW_LENGTH','GL_UNPACK_LSB_FIRST','GL_UNPACK_ALIGNMENT','GL_TRUE','GL_TRIANGLE_STRIP', + 'GL_TRIANGLE_FAN','GL_TRIANGLES','GL_TRANSFORM_BIT','GL_TEXTURE_WRAP_T','GL_TEXTURE_WRAP_S','GL_TEXTURE_WIDTH', + 'GL_TEXTURE_STACK_DEPTH','GL_TEXTURE_RESIDENT','GL_TEXTURE_RED_SIZE','GL_TEXTURE_PRIORITY','GL_TEXTURE_MIN_FILTER', + 'GL_TEXTURE_MATRIX','GL_TEXTURE_MAG_FILTER','GL_TEXTURE_LUMINANCE_SIZE','GL_TEXTURE_INTERNAL_FORMAT','GL_TEXTURE_INTENSITY_SIZE', + 'GL_TEXTURE_HEIGHT','GL_TEXTURE_GREEN_SIZE','GL_TEXTURE_GEN_T','GL_TEXTURE_GEN_S','GL_TEXTURE_GEN_R','GL_TEXTURE_GEN_Q', + 'GL_TEXTURE_GEN_MODE','GL_TEXTURE_ENV_MODE','GL_TEXTURE_ENV_COLOR','GL_TEXTURE_ENV','GL_TEXTURE_COORD_ARRAY_TYPE_EXT', + 'GL_TEXTURE_COORD_ARRAY_TYPE','GL_TEXTURE_COORD_ARRAY_STRIDE_EXT','GL_TEXTURE_COORD_ARRAY_STRIDE','GL_TEXTURE_COORD_ARRAY_SIZE_EXT', + 'GL_TEXTURE_COORD_ARRAY_SIZE','GL_TEXTURE_COORD_ARRAY_POINTER_EXT','GL_TEXTURE_COORD_ARRAY_POINTER','GL_TEXTURE_COORD_ARRAY_EXT', + 'GL_TEXTURE_COORD_ARRAY_COUNT_EXT','GL_TEXTURE_COORD_ARRAY','GL_TEXTURE_COMPONENTS','GL_TEXTURE_BORDER_COLOR','GL_TEXTURE_BORDER', + 'GL_TEXTURE_BLUE_SIZE','GL_TEXTURE_BIT','GL_TEXTURE_BINDING_2D','GL_TEXTURE_BINDING_1D','GL_TEXTURE_ALPHA_SIZE', + 'GL_TEXTURE_2D','GL_TEXTURE_1D','GL_TEXTURE9_ARB','GL_TEXTURE9','GL_TEXTURE8_ARB','GL_TEXTURE8','GL_TEXTURE7_ARB', + 'GL_TEXTURE7','GL_TEXTURE6_ARB','GL_TEXTURE6','GL_TEXTURE5_ARB','GL_TEXTURE5','GL_TEXTURE4_ARB','GL_TEXTURE4', + 'GL_TEXTURE3_ARB','GL_TEXTURE31_ARB','GL_TEXTURE31','GL_TEXTURE30_ARB','GL_TEXTURE30','GL_TEXTURE3','GL_TEXTURE2_ARB', + 'GL_TEXTURE29_ARB','GL_TEXTURE29','GL_TEXTURE28_ARB','GL_TEXTURE28','GL_TEXTURE27_ARB','GL_TEXTURE27','GL_TEXTURE26_ARB', + 'GL_TEXTURE26','GL_TEXTURE25_ARB','GL_TEXTURE25','GL_TEXTURE24_ARB','GL_TEXTURE24','GL_TEXTURE23_ARB','GL_TEXTURE23', + 'GL_TEXTURE22_ARB','GL_TEXTURE22','GL_TEXTURE21_ARB','GL_TEXTURE21','GL_TEXTURE20_ARB','GL_TEXTURE20','GL_TEXTURE2', + 'GL_TEXTURE1_ARB','GL_TEXTURE19_ARB','GL_TEXTURE19','GL_TEXTURE18_ARB','GL_TEXTURE18','GL_TEXTURE17_ARB', + 'GL_TEXTURE17','GL_TEXTURE16_ARB','GL_TEXTURE16','GL_TEXTURE15_ARB','GL_TEXTURE15','GL_TEXTURE14_ARB','GL_TEXTURE14', + 'GL_TEXTURE13_ARB','GL_TEXTURE13','GL_TEXTURE12_ARB','GL_TEXTURE12','GL_TEXTURE11_ARB','GL_TEXTURE11','GL_TEXTURE10_ARB', + 'GL_TEXTURE10','GL_TEXTURE1','GL_TEXTURE0_ARB','GL_TEXTURE0','GL_TEXTURE','GL_T4F_V4F','GL_T4F_C4F_N3F_V4F','GL_T2F_V3F', + 'GL_T2F_N3F_V3F','GL_T2F_C4UB_V3F','GL_T2F_C4F_N3F_V3F','GL_T2F_C3F_V3F','GL_T','GL_SUBPIXEL_BITS','GL_STEREO', + 'GL_STENCIL_WRITEMASK','GL_STENCIL_VALUE_MASK','GL_STENCIL_TEST','GL_STENCIL_REF','GL_STENCIL_PASS_DEPTH_PASS', + 'GL_STENCIL_PASS_DEPTH_FAIL','GL_STENCIL_INDEX','GL_STENCIL_FUNC','GL_STENCIL_FAIL','GL_STENCIL_CLEAR_VALUE', + 'GL_STENCIL_BUFFER_BIT','GL_STENCIL_BITS','GL_STENCIL','GL_STACK_UNDERFLOW','GL_STACK_OVERFLOW','GL_SRC_COLOR', + 'GL_SRC_ALPHA_SATURATE','GL_SRC_ALPHA','GL_SPOT_EXPONENT','GL_SPOT_DIRECTION','GL_SPOT_CUTOFF','GL_SPHERE_MAP', + 'GL_SPECULAR','GL_SOURCE2_RGB_EXT','GL_SOURCE2_RGB','GL_SOURCE2_ALPHA_EXT','GL_SOURCE2_ALPHA','GL_SOURCE1_RGB_EXT', + 'GL_SOURCE1_RGB','GL_SOURCE1_ALPHA_EXT','GL_SOURCE1_ALPHA','GL_SOURCE0_RGB_EXT','GL_SOURCE0_RGB','GL_SOURCE0_ALPHA_EXT', + 'GL_SOURCE0_ALPHA','GL_SMOOTH','GL_SHORT','GL_SHININESS','GL_SHADE_MODEL','GL_SET','GL_SELECTION_BUFFER_SIZE', + 'GL_SELECTION_BUFFER_POINTER','GL_SELECT','GL_SCISSOR_TEST','GL_SCISSOR_BOX','GL_SCISSOR_BIT','GL_S','GL_RIGHT', + 'GL_RGB_SCALE_EXT','GL_RGB_SCALE','GL_RGBA_MODE','GL_RGBA8','GL_RGBA4','GL_RGBA2','GL_RGBA16','GL_RGBA12','GL_RGBA', + 'GL_RGB8','GL_RGB5_A1','GL_RGB5','GL_RGB4','GL_RGB16','GL_RGB12','GL_RGB10_A2','GL_RGB10','GL_RGB','GL_RETURN', + 'GL_REPLACE','GL_REPEAT','GL_RENDER_MODE','GL_RENDERER','GL_RENDER','GL_RED_SCALE','GL_RED_BITS','GL_RED_BIAS', + 'GL_RED','GL_READ_BUFFER','GL_R3_G3_B2','GL_R','GL_QUAD_STRIP','GL_QUADS','GL_QUADRATIC_ATTENUATION','GL_Q', + 'GL_PROXY_TEXTURE_2D','GL_PROXY_TEXTURE_1D','GL_PROJECTION_STACK_DEPTH','GL_PROJECTION_MATRIX','GL_PROJECTION', + 'GL_PRIMARY_COLOR_EXT','GL_PRIMARY_COLOR','GL_PREVIOUS_EXT','GL_PREVIOUS','GL_POSITION','GL_POLYGON_TOKEN', + 'GL_POLYGON_STIPPLE_BIT','GL_POLYGON_STIPPLE','GL_POLYGON_SMOOTH_HINT','GL_POLYGON_SMOOTH','GL_POLYGON_OFFSET_UNITS', + 'GL_POLYGON_OFFSET_POINT','GL_POLYGON_OFFSET_LINE','GL_POLYGON_OFFSET_FILL','GL_POLYGON_OFFSET_FACTOR','GL_POLYGON_MODE', + 'GL_POLYGON_BIT','GL_POLYGON','GL_POINT_TOKEN','GL_POINT_SMOOTH_HINT','GL_POINT_SMOOTH','GL_POINT_SIZE_RANGE', + 'GL_POINT_SIZE_GRANULARITY','GL_POINT_SIZE','GL_POINT_BIT','GL_POINTS','GL_POINT','GL_PIXEL_MODE_BIT', + 'GL_PIXEL_MAP_S_TO_S_SIZE','GL_PIXEL_MAP_S_TO_S','GL_PIXEL_MAP_R_TO_R_SIZE','GL_PIXEL_MAP_R_TO_R','GL_PIXEL_MAP_I_TO_R_SIZE', + 'GL_PIXEL_MAP_I_TO_R','GL_PIXEL_MAP_I_TO_I_SIZE','GL_PIXEL_MAP_I_TO_I','GL_PIXEL_MAP_I_TO_G_SIZE','GL_PIXEL_MAP_I_TO_G', + 'GL_PIXEL_MAP_I_TO_B_SIZE','GL_PIXEL_MAP_I_TO_B','GL_PIXEL_MAP_I_TO_A_SIZE','GL_PIXEL_MAP_I_TO_A','GL_PIXEL_MAP_G_TO_G_SIZE', + 'GL_PIXEL_MAP_G_TO_G','GL_PIXEL_MAP_B_TO_B_SIZE','GL_PIXEL_MAP_B_TO_B','GL_PIXEL_MAP_A_TO_A_SIZE','GL_PIXEL_MAP_A_TO_A', + 'GL_PHONG_WIN','GL_PHONG_HINT_WIN','GL_PERSPECTIVE_CORRECTION_HINT','GL_PASS_THROUGH_TOKEN','GL_PACK_SWAP_BYTES', + 'GL_PACK_SKIP_ROWS','GL_PACK_SKIP_PIXELS','GL_PACK_ROW_LENGTH','GL_PACK_LSB_FIRST','GL_PACK_ALIGNMENT','GL_OUT_OF_MEMORY', + 'GL_OR_REVERSE','GL_OR_INVERTED','GL_ORDER','GL_OR','GL_OPERAND2_RGB_EXT','GL_OPERAND2_RGB','GL_OPERAND2_ALPHA_EXT', + 'GL_OPERAND2_ALPHA','GL_OPERAND1_RGB_EXT','GL_OPERAND1_RGB','GL_OPERAND1_ALPHA_EXT','GL_OPERAND1_ALPHA','GL_OPERAND0_RGB_EXT', + 'GL_OPERAND0_RGB','GL_OPERAND0_ALPHA_EXT','GL_OPERAND0_ALPHA','GL_ONE_MINUS_SRC_COLOR','GL_ONE_MINUS_SRC_ALPHA', + 'GL_ONE_MINUS_DST_COLOR','GL_ONE_MINUS_DST_ALPHA','GL_ONE','GL_OBJECT_PLANE','GL_OBJECT_LINEAR','GL_NO_ERROR', + 'GL_NOTEQUAL','GL_NORMAL_ARRAY_TYPE_EXT','GL_NORMAL_ARRAY_TYPE','GL_NORMAL_ARRAY_STRIDE_EXT','GL_NORMAL_ARRAY_STRIDE', + 'GL_NORMAL_ARRAY_POINTER_EXT','GL_NORMAL_ARRAY_POINTER','GL_NORMAL_ARRAY_EXT','GL_NORMAL_ARRAY_COUNT_EXT', + 'GL_NORMAL_ARRAY','GL_NORMALIZE','GL_NOR','GL_NOOP','GL_NONE','GL_NICEST','GL_NEVER','GL_NEAREST_MIPMAP_NEAREST','GL_NEAREST_MIPMAP_LINEAR', + 'GL_NEAREST','GL_NAND','GL_NAME_STACK_DEPTH','GL_N3F_V3F','GL_MULT','GL_MODULATE','GL_MODELVIEW_STACK_DEPTH','GL_MODELVIEW_MATRIX', + 'GL_MODELVIEW','GL_MAX_VIEWPORT_DIMS','GL_MAX_TEXTURE_UNITS_ARB','GL_MAX_TEXTURE_UNITS','GL_MAX_TEXTURE_STACK_DEPTH', + 'GL_MAX_TEXTURE_SIZE','GL_MAX_PROJECTION_STACK_DEPTH','GL_MAX_PIXEL_MAP_TABLE','GL_MAX_NAME_STACK_DEPTH','GL_MAX_MODELVIEW_STACK_DEPTH', + 'GL_MAX_LIST_NESTING','GL_MAX_LIGHTS','GL_MAX_EVAL_ORDER','GL_MAX_ELEMENTS_VERTICES_WIN','GL_MAX_ELEMENTS_INDICES_WIN', + 'GL_MAX_CLIP_PLANES','GL_MAX_CLIENT_ATTRIB_STACK_DEPTH','GL_MAX_ATTRIB_STACK_DEPTH','GL_MATRIX_MODE','GL_MAP_STENCIL', + 'GL_MAP_COLOR','GL_MAP2_VERTEX_4','GL_MAP2_VERTEX_3','GL_MAP2_TEXTURE_COORD_4','GL_MAP2_TEXTURE_COORD_3','GL_MAP2_TEXTURE_COORD_2', + 'GL_MAP2_TEXTURE_COORD_1','GL_MAP2_NORMAL','GL_MAP2_INDEX','GL_MAP2_GRID_SEGMENTS','GL_MAP2_GRID_DOMAIN','GL_MAP2_COLOR_4', + 'GL_MAP1_VERTEX_4','GL_MAP1_VERTEX_3','GL_MAP1_TEXTURE_COORD_4','GL_MAP1_TEXTURE_COORD_3','GL_MAP1_TEXTURE_COORD_2', + 'GL_MAP1_TEXTURE_COORD_1','GL_MAP1_NORMAL','GL_MAP1_INDEX','GL_MAP1_GRID_SEGMENTS','GL_MAP1_GRID_DOMAIN', + 'GL_MAP1_COLOR_4','GL_LUMINANCE_ALPHA','GL_LUMINANCE8_ALPHA8','GL_LUMINANCE8','GL_LUMINANCE6_ALPHA2','GL_LUMINANCE4_ALPHA4', + 'GL_LUMINANCE4','GL_LUMINANCE16_ALPHA16','GL_LUMINANCE16','GL_LUMINANCE12_ALPHA4','GL_LUMINANCE12_ALPHA12','GL_LUMINANCE12', + 'GL_LUMINANCE','GL_LOGIC_OP_MODE','GL_LOGIC_OP','GL_LOAD','GL_LIST_MODE','GL_LIST_INDEX','GL_LIST_BIT', + 'GL_LIST_BASE','GL_LINE_WIDTH_RANGE','GL_LINE_WIDTH_GRANULARITY','GL_LINE_WIDTH','GL_LINE_TOKEN','GL_LINE_STRIP','GL_LINE_STIPPLE_REPEAT', + 'GL_LINE_STIPPLE_PATTERN','GL_LINE_STIPPLE','GL_LINE_SMOOTH_HINT','GL_LINE_SMOOTH','GL_LINE_RESET_TOKEN','GL_LINE_LOOP', + 'GL_LINE_BIT','GL_LINES','GL_LINEAR_MIPMAP_NEAREST','GL_LINEAR_MIPMAP_LINEAR','GL_LINEAR_ATTENUATION','GL_LINEAR', + 'GL_LINE','GL_LIGHT_MODEL_TWO_SIDE','GL_LIGHT_MODEL_LOCAL_VIEWER','GL_LIGHT_MODEL_AMBIENT','GL_LIGHTING_BIT', + 'GL_LIGHTING','GL_LIGHT7','GL_LIGHT6','GL_LIGHT5','GL_LIGHT4','GL_LIGHT3','GL_LIGHT2','GL_LIGHT1','GL_LIGHT0', + 'GL_LESS','GL_LEQUAL','GL_LEFT','GL_KEEP','GL_INVERT','GL_INVALID_VALUE','GL_INVALID_OPERATION','GL_INVALID_ENUM','GL_INTERPOLATE_EXT', + 'GL_INTERPOLATE','GL_INTENSITY8','GL_INTENSITY4','GL_INTENSITY16','GL_INTENSITY12','GL_INTENSITY','GL_INT', + 'GL_INDEX_WRITEMASK','GL_INDEX_SHIFT','GL_INDEX_OFFSET','GL_INDEX_MODE','GL_INDEX_LOGIC_OP','GL_INDEX_CLEAR_VALUE','GL_INDEX_BITS', + 'GL_INDEX_ARRAY_TYPE_EXT','GL_INDEX_ARRAY_TYPE','GL_INDEX_ARRAY_STRIDE_EXT','GL_INDEX_ARRAY_STRIDE','GL_INDEX_ARRAY_POINTER_EXT', + 'GL_INDEX_ARRAY_POINTER','GL_INDEX_ARRAY_EXT','GL_INDEX_ARRAY_COUNT_EXT','GL_INDEX_ARRAY','GL_INCR','GL_HINT_BIT', + 'GL_GREEN_SCALE','GL_GREEN_BITS','GL_GREEN_BIAS','GL_GREEN','GL_GREATER','GL_GEQUAL','GL_FRONT_RIGHT','GL_FRONT_LEFT', + 'GL_FRONT_FACE','GL_FRONT_AND_BACK','GL_FRONT','GL_FOG_START','GL_FOG_SPECULAR_TEXTURE_WIN','GL_FOG_MODE','GL_FOG_INDEX', + 'GL_FOG_HINT','GL_FOG_END','GL_FOG_DENSITY','GL_FOG_COLOR','GL_FOG_BIT','GL_FOG','GL_FLOAT','GL_FLAT','GL_FILL', + 'GL_FEEDBACK_BUFFER_TYPE','GL_FEEDBACK_BUFFER_SIZE','GL_FEEDBACK_BUFFER_POINTER','GL_FEEDBACK','GL_FASTEST','GL_FALSE', + 'GL_EYE_PLANE','GL_EYE_LINEAR','GL_EXT_vertex_array','GL_EXT_paletted_texture','GL_EXT_bgra','GL_EXTENSIONS','GL_EXP2', + 'GL_EXP','GL_EVAL_BIT','GL_EQUIV','GL_EQUAL','GL_ENABLE_BIT','GL_EMISSION','GL_EDGE_FLAG_ARRAY_STRIDE_EXT','GL_EDGE_FLAG_ARRAY_STRIDE', + 'GL_EDGE_FLAG_ARRAY_POINTER_EXT','GL_EDGE_FLAG_ARRAY_POINTER','GL_EDGE_FLAG_ARRAY_EXT','GL_EDGE_FLAG_ARRAY_COUNT_EXT','GL_EDGE_FLAG_ARRAY', + 'GL_EDGE_FLAG','GL_DST_COLOR','GL_DST_ALPHA','GL_DRAW_PIXEL_TOKEN','GL_DRAW_BUFFER','GL_DOUBLE_EXT','GL_DOUBLEBUFFER', + 'GL_DOUBLE','GL_DONT_CARE','GL_DOMAIN','GL_DITHER','GL_DIFFUSE','GL_DEPTH_WRITEMASK','GL_DEPTH_TEST','GL_DEPTH_SCALE', + 'GL_DEPTH_RANGE','GL_DEPTH_FUNC','GL_DEPTH_COMPONENT','GL_DEPTH_CLEAR_VALUE','GL_DEPTH_BUFFER_BIT','GL_DEPTH_BITS', + 'GL_DEPTH_BIAS','GL_DEPTH','GL_DECR','GL_DECAL','GL_CW','GL_CURRENT_TEXTURE_COORDS','GL_CURRENT_RASTER_TEXTURE_COORDS','GL_CURRENT_RASTER_POSITION_VALID', + 'GL_CURRENT_RASTER_POSITION','GL_CURRENT_RASTER_INDEX','GL_CURRENT_RASTER_DISTANCE','GL_CURRENT_RASTER_COLOR','GL_CURRENT_NORMAL', + 'GL_CURRENT_INDEX','GL_CURRENT_COLOR','GL_CURRENT_BIT','GL_CULL_FACE_MODE','GL_CULL_FACE','GL_COPY_PIXEL_TOKEN', + 'GL_COPY_INVERTED','GL_COPY','GL_CONSTANT_EXT','GL_CONSTANT_ATTENUATION','GL_CONSTANT','GL_COMPILE_AND_EXECUTE','GL_COMPILE','GL_COMBINE_RGB_EXT', + 'GL_COMBINE_RGB','GL_COMBINE_EXT','GL_COMBINE_ALPHA_EXT','GL_COMBINE_ALPHA','GL_COMBINE','GL_COLOR_WRITEMASK', + 'GL_COLOR_TABLE_WIDTH_EXT','GL_COLOR_TABLE_RED_SIZE_EXT','GL_COLOR_TABLE_LUMINANCE_SIZE_EXT','GL_COLOR_TABLE_INTENSITY_SIZE_EXT', + 'GL_COLOR_TABLE_GREEN_SIZE_EXT','GL_COLOR_TABLE_FORMAT_EXT','GL_COLOR_TABLE_BLUE_SIZE_EXT','GL_COLOR_TABLE_ALPHA_SIZE_EXT', + 'GL_COLOR_MATERIAL_PARAMETER','GL_COLOR_MATERIAL_FACE','GL_COLOR_MATERIAL','GL_COLOR_LOGIC_OP','GL_COLOR_INDEXES', + 'GL_COLOR_INDEX8_EXT','GL_COLOR_INDEX4_EXT','GL_COLOR_INDEX2_EXT','GL_COLOR_INDEX1_EXT','GL_COLOR_INDEX16_EXT', + 'GL_COLOR_INDEX12_EXT','GL_COLOR_INDEX','GL_COLOR_CLEAR_VALUE','GL_COLOR_BUFFER_BIT','GL_COLOR_ARRAY_TYPE_EXT', + 'GL_COLOR_ARRAY_TYPE','GL_COLOR_ARRAY_STRIDE_EXT','GL_COLOR_ARRAY_STRIDE','GL_COLOR_ARRAY_SIZE_EXT','GL_COLOR_ARRAY_SIZE', + 'GL_COLOR_ARRAY_POINTER_EXT','GL_COLOR_ARRAY_POINTER','GL_COLOR_ARRAY_EXT','GL_COLOR_ARRAY_COUNT_EXT','GL_COLOR_ARRAY', + 'GL_COLOR','GL_COEFF','GL_CLIP_PLANE5','GL_CLIP_PLANE4','GL_CLIP_PLANE3','GL_CLIP_PLANE2','GL_CLIP_PLANE1','GL_CLIP_PLANE0', + 'GL_CLIENT_VERTEX_ARRAY_BIT','GL_CLIENT_PIXEL_STORE_BIT','GL_CLIENT_ATTRIB_STACK_DEPTH','GL_CLIENT_ALL_ATTRIB_BITS', + 'GL_CLIENT_ACTIVE_TEXTURE_ARB','GL_CLIENT_ACTIVE_TEXTURE','GL_CLEAR','GL_CLAMP','GL_CCW','GL_C4UB_V3F','GL_C4UB_V2F', + 'GL_C4F_N3F_V3F','GL_C3F_V3F','GL_BYTE','GL_BLUE_SCALE','GL_BLUE_BITS','GL_BLUE_BIAS','GL_BLUE','GL_BLEND_SRC','GL_BLEND_DST', + 'GL_BLEND','GL_BITMAP_TOKEN','GL_BITMAP','GL_BGR_EXT','GL_BGRA_EXT','GL_BACK_RIGHT','GL_BACK_LEFT','GL_BACK', + 'GL_AUX_BUFFERS','GL_AUX3','GL_AUX2','GL_AUX1','GL_AUX0','GL_AUTO_NORMAL','GL_ATTRIB_STACK_DEPTH','GL_AND_REVERSE', + 'GL_AND_INVERTED','GL_AND','GL_AMBIENT_AND_DIFFUSE','GL_AMBIENT','GL_ALWAYS','GL_ALPHA_TEST_REF','GL_ALPHA_TEST_FUNC', + 'GL_ALPHA_TEST','GL_ALPHA_SCALE','GL_ALPHA_BITS','GL_ALPHA_BIAS','GL_ALPHA8','GL_ALPHA4','GL_ALPHA16','GL_ALPHA12', + 'GL_ALPHA','GL_ALL_ATTRIB_BITS','GL_ADD_SIGNED_EXT','GL_ADD_SIGNED','GL_ADD','GL_ACTIVE_TEXTURE_ARB','GL_ACTIVE_TEXTURE', + 'GL_ACCUM_RED_BITS','GL_ACCUM_GREEN_BITS','GL_ACCUM_CLEAR_VALUE','GL_ACCUM_BUFFER_BIT','GL_ACCUM_BLUE_BITS','GL_ACCUM_ALPHA_BITS', + 'GL_ACCUM','GL_4_BYTES','GL_4D_COLOR_TEXTURE','GL_3_BYTES','GL_3D_COLOR_TEXTURE','GL_3D_COLOR','GL_3D','GL_2_BYTES', + 'GL_2D','GLU_V_STEP','GLU_VERTEX','GLU_VERSION_1_2','GLU_VERSION_1_1','GLU_VERSION','GLU_U_STEP','GLU_UNKNOWN','GLU_TRUE', + 'GLU_TESS_WINDING_RULE','GLU_TESS_WINDING_POSITIVE','GLU_TESS_WINDING_ODD','GLU_TESS_WINDING_NONZERO','GLU_TESS_WINDING_NEGATIVE', + 'GLU_TESS_WINDING_ABS_GEQ_TWO','GLU_TESS_VERTEX_DATA','GLU_TESS_VERTEX','GLU_TESS_TOLERANCE','GLU_TESS_NEED_COMBINE_CALLBACK','GLU_TESS_MISSING_END_POLYGON', + 'GLU_TESS_MISSING_END_CONTOUR','GLU_TESS_MISSING_BEGIN_POLYGON','GLU_TESS_MISSING_BEGIN_CONTOUR','GLU_TESS_ERROR_DATA', + 'GLU_TESS_ERROR8','GLU_TESS_ERROR7','GLU_TESS_ERROR6','GLU_TESS_ERROR5','GLU_TESS_ERROR4','GLU_TESS_ERROR3','GLU_TESS_ERROR2', + 'GLU_TESS_ERROR1','GLU_TESS_ERROR','GLU_TESS_END_DATA','GLU_TESS_END','GLU_TESS_EDGE_FLAG_DATA','GLU_TESS_EDGE_FLAG', + 'GLU_TESS_COORD_TOO_LARGE','GLU_TESS_COMBINE_DATA','GLU_TESS_COMBINE','GLU_TESS_BOUNDARY_ONLY','GLU_TESS_BEGIN_DATA', + 'GLU_TESS_BEGIN','GLU_SMOOTH','GLU_SILHOUETTE','GLU_SAMPLING_TOLERANCE','GLU_SAMPLING_METHOD','GLU_POINT','GLU_PATH_LENGTH', + 'GLU_PARAMETRIC_TOLERANCE','GLU_PARAMETRIC_ERROR','GLU_OUT_OF_MEMORY','GLU_OUTSIDE','GLU_OUTLINE_POLYGON','GLU_OUTLINE_PATCH', + 'GLU_NURBS_ERROR9','GLU_NURBS_ERROR8','GLU_NURBS_ERROR7','GLU_NURBS_ERROR6','GLU_NURBS_ERROR5','GLU_NURBS_ERROR4', + 'GLU_NURBS_ERROR37','GLU_NURBS_ERROR36','GLU_NURBS_ERROR35','GLU_NURBS_ERROR34','GLU_NURBS_ERROR33','GLU_NURBS_ERROR32', + 'GLU_NURBS_ERROR31','GLU_NURBS_ERROR30','GLU_NURBS_ERROR3','GLU_NURBS_ERROR29','GLU_NURBS_ERROR28','GLU_NURBS_ERROR27','GLU_NURBS_ERROR26', + 'GLU_NURBS_ERROR25','GLU_NURBS_ERROR24','GLU_NURBS_ERROR23','GLU_NURBS_ERROR22','GLU_NURBS_ERROR21','GLU_NURBS_ERROR20', + 'GLU_NURBS_ERROR2','GLU_NURBS_ERROR19','GLU_NURBS_ERROR18','GLU_NURBS_ERROR17','GLU_NURBS_ERROR16','GLU_NURBS_ERROR15','GLU_NURBS_ERROR14', + 'GLU_NURBS_ERROR13','GLU_NURBS_ERROR12','GLU_NURBS_ERROR11','GLU_NURBS_ERROR10','GLU_NURBS_ERROR1','GLU_NONE', + 'GLU_MAP1_TRIM_3','GLU_MAP1_TRIM_2','GLU_LINE','GLU_INVALID_VALUE','GLU_INVALID_ENUM','GLU_INTERIOR','GLU_INSIDE','GLU_INCOMPATIBLE_GL_VERSION', + 'GLU_FLAT','GLU_FILL','GLU_FALSE','GLU_EXTERIOR','GLU_EXTENSIONS','GLU_ERROR','GLU_END','GLU_EDGE_FLAG','GLU_DOMAIN_DISTANCE', + 'GLU_DISPLAY_MODE','GLU_CW','GLU_CULLING','GLU_CCW','GLU_BEGIN','GLU_AUTO_LOAD_MATRIX','CHANNEL_UNORDERED','CHANNEL_ORDERED', + 'CHANNEL_MAX' + ), + 2 => array( + + // Red Lowercase Keywords + + 'WriteWord','WriteString','WriteReal','WriteLine','WriteInt','WriteFloat','WriteDouble','WriteChar','WriteByte', + 'windowwidth','windowheight','waittimer','Vec4','Vec3','Vec2','val','UpdateJoystick','ucase$','Transpose','tickcount', + 'textscroll','textrows','textmode','textcols','tanh','tand','tan','synctimercatchup','synctimer','swapbuffers', + 'str$','stopsoundvoice','stopsounds','stopmusic','sqrt','sqr','sprzorder','spryvel','sprytiles','sprysize','spryrepeat', + 'spryflip','sprycentre','spry','sprxvel','sprxtiles','sprxsize','sprxrepeat','sprxflip','sprxcentre','sprx', + 'sprvisible','sprvel','sprtype','sprtop','sprspin','sprsolid','sprsetzorder','sprsetyvel','sprsetysize','sprsetyrepeat', + 'sprsetyflip','sprsetycentre','sprsety','sprsetxvel','sprsetxsize','sprsetxrepeat','sprsetxflip','sprsetxcentre', + 'sprsetx','sprsetvisible','sprsetvel','sprsettiles','sprsettextures','sprsettexture','sprsetspin','sprsetsolid', + 'sprsetsize','sprsetscale','sprsetpos','sprsetparallax','sprsetframe','sprsetcolor','sprsetanimspeed','sprsetanimloop', + 'sprsetangle','sprsetalpha','sprscale','sprright','sprpos','sprparallax','sprleft','spriteareawidth','spriteareaheight', + 'sprframe','sprcolor','sprcameraz','sprcameray','sprcamerax','sprcamerasetz','sprcamerasety','sprcamerasetx', + 'sprcamerasetpos','sprcamerasetfov','sprcamerasetangle','sprcamerapos','sprcamerafov','sprcameraangle', + 'sprbottom','spranimspeed','spranimloop','spranimdone','sprangle','spralpha','spraddtextures','spraddtexture', + 'sounderror','sleep','sind','sin','showcursor','sgn','settextscroll','setmusicvolume','SendMessage','Seek', + 'scankeydown','RTInvert','rnd','right$','resizetext','resizespritearea','RejectConnection','ReceiveMessage','ReadWord', + 'ReadText','ReadReal','ReadLine','ReadInt','ReadFloat','ReadDouble','ReadChar','ReadByte','randomize','printr', + 'print','pow','playsound','playmusic','performancecounter','Orthonormalize','OpenFileWrite','OpenFileRead','Normalize', + 'newtilemap','newsprite','NewServer','NewConnection','musicplaying','mouse_yd','mouse_y','mouse_xd','mouse_x', + 'mouse_wheel','mouse_button','mid$','MessageSmoothed','MessageReliable','MessagePending','MessageChannel','maxtextureunits', + 'MatrixZero','MatrixTranslate','MatrixScale','MatrixRotateZ','MatrixRotateY','MatrixRotateX','MatrixRotate','MatrixIdentity', + 'MatrixCrossProduct','MatrixBasis','log','locate','loadtexture','loadsound','loadmipmaptexture','loadmipmapimagestrip', + 'loadimagestrip','loadimage','Length','len','left$','lcase$','keydown','Joy_Y','Joy_X','Joy_Up','Joy_Right','Joy_Left', + 'Joy_Keys','Joy_Down','Joy_Button','Joy_3','Joy_2','Joy_1','Joy_0','int','inscankey','input$','inkey$','inittimer', + 'imagewidth','imagestripframes','imageheight','imageformat','imagedatatype','hidecursor','glViewport','glVertex4sv', + 'glVertex4s','glVertex4iv','glVertex4i','glVertex4fv','glVertex4f','glVertex4dv','glVertex4d','glVertex3sv','glVertex3s', + 'glVertex3iv','glVertex3i','glVertex3fv','glVertex3f','glVertex3dv','glVertex3d','glVertex2sv','glVertex2s','glVertex2iv', + 'glVertex2i','glVertex2fv','glVertex2f','glVertex2dv','glVertex2d','gluPerspective','gluOrtho2D','gluLookAt', + 'glubuild2dmipmaps','glTranslatef','glTranslated','gltexsubimage2d','glTexParameteriv','glTexParameteri', + 'glTexParameterfv','glTexParameterf','glteximage2d','glTexGeniv','glTexGeni','glTexGenfv','glTexGenf','glTexGendv', + 'glTexGend','glTexEnviv','glTexEnvi','glTexEnvfv','glTexEnvf','glTexCoord4sv','glTexCoord4s','glTexCoord4iv','glTexCoord4i', + 'glTexCoord4fv','glTexCoord4f','glTexCoord4dv','glTexCoord4d','glTexCoord3sv','glTexCoord3s','glTexCoord3iv','glTexCoord3i', + 'glTexCoord3fv','glTexCoord3f','glTexCoord3dv','glTexCoord3d','glTexCoord2sv','glTexCoord2s','glTexCoord2iv','glTexCoord2i', + 'glTexCoord2fv','glTexCoord2f','glTexCoord2dv','glTexCoord2d','glTexCoord1sv','glTexCoord1s','glTexCoord1iv','glTexCoord1i','glTexCoord1fv', + 'glTexCoord1f','glTexCoord1dv','glTexCoord1d','glStencilOp','glStencilMask','glStencilFunc','glShadeModel','glSelectBuffer', + 'glScissor','glScalef','glScaled','glRotatef','glRotated','glRenderMode','glRectsv','glRects','glRectiv','glRecti', + 'glRectfv','glRectf','glRectdv','glRectd','glReadBuffer','glRasterPos4sv','glRasterPos4s','glRasterPos4iv', + 'glRasterPos4i','glRasterPos4fv','glRasterPos4f','glRasterPos4dv','glRasterPos4d','glRasterPos3sv','glRasterPos3s', + 'glRasterPos3iv','glRasterPos3i','glRasterPos3fv','glRasterPos3f','glRasterPos3dv','glRasterPos3d','glRasterPos2sv', + 'glRasterPos2s','glRasterPos2iv','glRasterPos2i','glRasterPos2fv','glRasterPos2f','glRasterPos2dv','glRasterPos2d', + 'glPushName','glPushMatrix','glPushClientAttrib','glPushAttrib','glPrioritizeTextures','glPopName','glPopMatrix', + 'glPopClientAttrib','glPopAttrib','glpolygonstipple','glPolygonOffset','glPolygonMode','glPointSize','glPixelZoom', + 'glPixelTransferi','glPixelTransferf','glPixelStorei','glPixelStoref','glPassThrough','glOrtho','glNormal3sv','glNormal3s', + 'glNormal3iv','glNormal3i','glNormal3fv','glNormal3f','glNormal3dv','glNormal3d','glNormal3bv','glNormal3b','glNewList', + 'glMultMatrixf','glMultMatrixd','glmultitexcoord2f','glmultitexcoord2d','glMatrixMode','glMaterialiv','glMateriali', + 'glMaterialfv','glMaterialf','glMapGrid2f','glMapGrid2d','glMapGrid1f','glMapGrid1d','glLogicOp','glLoadName','glLoadMatrixf', + 'glLoadMatrixd','glLoadIdentity','glListBase','glLineWidth','glLineStipple','glLightModeliv','glLightModeli','glLightModelfv', + 'glLightModelf','glLightiv','glLighti','glLightfv','glLightf','glIsTexture','glIsList','glIsEnabled','glInitNames', + 'glIndexubv','glIndexub','glIndexsv','glIndexs','glIndexMask','glIndexiv','glIndexi','glIndexfv','glIndexf','glIndexdv', + 'glIndexd','glHint','glGetTexParameteriv','glGetTexParameterfv','glGetTexLevelParameteriv','glGetTexLevelParameterfv', + 'glGetTexGeniv','glGetTexGenfv','glGetTexGendv','glGetTexEnviv','glGetTexEnvfv','glgetstring','glgetpolygonstipple','glGetPixelMapuiv', + 'glGetMaterialiv','glGetMaterialfv','glGetLightiv','glGetLightfv','glGetIntegerv','glGetIntegerv','glGetFloatv','glGetFloatv', + 'glGetError','glGetDoublev','glGetDoublev','glGetClipPlane','glGetBooleanv','glGetBooleanv','glgentextures','glgentexture', + 'glgenlists','glFrustum','glFrontFace','glFogiv','glFogi','glFogfv','glFogf','glFlush','glFinish','glFeedbackBuffer', + 'glEvalPoint2','glEvalPoint1','glEvalMesh2','glEvalMesh1','glEvalCoord2fv','glEvalCoord2f','glEvalCoord2dv','glEvalCoord2d', + 'glEvalCoord1fv','glEvalCoord1f','glEvalCoord1dv','glEvalCoord1d','glEndList','glEnd','glEnableClientState','glEnable', + 'glEdgeFlagv','glEdgeFlag','glDrawBuffer','glDrawArrays','glDisableClientState','glDisable','glDepthRange','glDepthMask', + 'glDepthFunc','gldeletetextures','gldeletetexture','gldeletelists','glCullFace','glCopyTexSubImage2D','glCopyTexSubImage1D', + 'glCopyTexImage2D','glCopyTexImage1D','glColorMaterial','glColorMask','glColor4usv','glColor4us','glColor4uiv','glColor4ui', + 'glColor4ubv','glColor4ub','glColor4sv','glColor4s','glColor4iv','glColor4i','glColor4fv','glColor4f','glColor4dv', + 'glColor4d','glColor4bv','glColor4b','glColor3usv','glColor3us','glColor3uiv','glColor3ui','glColor3ubv','glColor3ub', + 'glColor3sv','glColor3s','glColor3iv','glColor3i','glColor3fv','glColor3f','glColor3dv','glColor3d','glColor3bv', + 'glColor3b','glClipPlane','glClearStencil','glClearIndex','glClearDepth','glClearColor','glClearAccum','glClear', + 'glcalllists','glCallList','glBlendFunc','glBindTexture','glBegin','glArrayElement','glAreTexturesResident', + 'glAlphaFunc','glactivetexture','glAccum','font','FindNextFile','FindFirstFile','FindClose','FileError', + 'extensionsupported','exp','execute','EndOfFile','drawtext','divbyzero','Determinant','deletesprite','deletesound', + 'DeleteServer','deleteimage','DeleteConnection','defaultfont','CrossProduct','cosd','cos','copysprite','ConnectionPending', + 'ConnectionHandShaking','ConnectionConnected','ConnectionAddress','compilererrorline','compilererrorcol','compilererror', + 'compilefile','compile','color','cls','CloseFile','clearregion','clearline','clearkeys','chr$','charat$','bindsprite', + 'beep','atnd','atn2d','atn2','atn','atand','asc','argcount','arg','animatesprites','AcceptConnection','abs' + ), + 3 => array( + + // Blue Lowercase Keywords + + 'xor','while','wend','until','type','traditional_print','traditional','to','then','struc','string','step','single', + 'run','return','reset','read','or','null','not','next','lor','loop','language','land','integer','input','if', + 'goto','gosub','for','endstruc','endif','end','elseif','else','double','do','dim','data','const','basic4gl','as', + 'and','alloc' + ) + + ), + 'SYMBOLS' => array( + '=', '<', '>', '>=', '<=', '+', '-', '*', '/', '%', '(', ')', '{', '}', '[', ']', '&', ';', ':', '$' + ), + + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000080; font-weight: bold;', + 2 => 'color: #FF0000;', + 3 => 'color: #0000FF;' + ), + 'COMMENTS' => array( + 1 => 'color: #657CC4; font-style: italic;' + ), + 'BRACKETS' => array( + 0 => 'color: #000080;' + ), + 'STRINGS' => array( + 0 => 'color: #008000;' + ), + 'NUMBERS' => array( + 0 => 'color: #000080; font-weight: bold;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #0000FF;' + ), + 'ESCAPE_CHAR' => array( + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/blitzbasic.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/blitzbasic.php new file mode 100644 index 0000000..dd8389b --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/blitzbasic.php @@ -0,0 +1,185 @@ + 'BlitzBasic', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'If','EndIf','ElseIf','Else If','Else','While','Wend','Return','Next','Include','End Type','End Select','End If','End Function','End','Select', + 'Type','Forever','For','Or','And','AppTitle','Case','Goto','Gosub','Step','Stop','Int','Last','False','Then','To','True','Until','Float', + 'String','Before','Not' + ), + 2 => array( + + // All Functions - 2D BB and 3D BB + 'Xor','WriteString','WriteShort','WritePixelFast','WritePixel','WriteLine','WriteInt','WriteFloat','WriteFile','WriteBytes', + 'WriteByte','Write','WaitTimer','WaitMouse','WaitKey','WaitJoy','VWait','Viewport', + 'Upper','UpdateGamma','UnlockBuffer','UDPTimeouts','UDPStreamPort','UDPStreamIP','UDPMsgPort','UDPMsgIP', + 'Trim','TotalVidMem','TileImage','TileBlock','TFormImage','TFormFilter','Text', + 'TCPTimeouts','TCPStreamPort','TCPStreamIP','Tan','SystemProperty','StringWidth','StringHeight','Str','StopNetGame', + 'StopChannel','StartNetGame','Sqr','SoundVolume','SoundPitch','SoundPan','Sin','Shr', + 'ShowPointer','Shl','Sgn','SetGfxDriver','SetGamma','SetFont','SetEnv','SetBuffer','SendUDPMsg','SendNetMsg', + 'SeekFile','SeedRnd','ScanLine','ScaleImage','SaveImage','SaveBuffer','Sar','RuntimeError','RSet', + 'RotateImage','RndSeed','Rnd','Right','ResumeChannel','Restore','ResizeImage','ResizeBank','Replace', + 'Repeat','RecvUDPMsg','RecvNetMsg','RectsOverlap','Rect','ReadString','ReadShort','ReadPixelFast','ReadPixel','ReadLine', + 'ReadInt','ReadFloat','ReadFile','ReadDir','ReadBytes','ReadByte','ReadAvail','Read','Rand','Print', + 'PokeShort','PokeInt','PokeFloat','PokeByte','Plot','PlaySound','PlayMusic','PlayCDTrack','Pi','PeekShort', + 'PeekInt','PeekFloat','PeekByte','PauseChannel','Oval','Origin','OpenTCPStream','OpenMovie','OpenFile', + 'Null','NextFile','New','NetPlayerName','NetPlayerLocal','NetMsgType','NetMsgTo','NetMsgFrom', + 'NetMsgData','MovieWidth','MoviePlaying','MovieHeight','MoveMouse','MouseZSpeed','MouseZ','MouseYSpeed','MouseY','MouseXSpeed', + 'MouseX','MouseHit','MouseDown','Mod','Millisecs','MidHandle','Mid','MaskImage','LSet','Lower', + 'LoopSound','Log10','Log','LockBuffer','Locate','Local','LoadSound','LoadImage','LoadFont','LoadBuffer', + 'LoadAnimImage','Line','Len','Left','KeyHit','KeyDown','JoyZDir','JoyZ','JoyYDir', + 'JoyYaw','JoyY','JoyXDir','JoyX','JoyVDir','JoyV','JoyUDir','JoyU','JoyType','JoyRoll', + 'JoyPitch','JoyHit','JoyHat','JoyDown','JoinNetGame','Instr','Insert','Input', + 'ImageYHandle','ImageXHandle','ImageWidth','ImagesOverlap','ImagesCollide','ImageRectOverlap','ImageRectCollide','ImageHeight','ImageBuffer','If', + 'HostNetGame','HostIP','HidePointer','Hex','HandleImage','GraphicsWidth','GraphicsHeight','GraphicsDepth','GraphicsBuffer','Graphics', + 'GrabImage','Global','GFXModeWidth','GFXModeHeight','GfxModeExists','GFXModeDepth','GfxDriverName','GetMouse', + 'GetKey','GetJoy','GetEnv','GetColor','GammaRed','GammaGreen','GammaBlue','Function','FrontBuffer','FreeTimer', + 'FreeSound','FreeImage','FreeFont','FreeBank','FontWidth','FontHeight','FlushMouse','FlushKeys', + 'FlushJoy','Floor','Flip','First','FileType','FileSize','FilePos','Field', + 'Exp','Exit','ExecFile','Eof','EndGraphics','Each','DrawMovie','DrawImageRect','DrawImage','DrawBlockRect','DrawBlock', + 'DottedIP','Dim','DeleteNetPlayer','DeleteFile','DeleteDir','Delete','Delay','Default','DebugLog','Data', + 'CurrentTime','CurrentDir','CurrentDate','CreateUDPStream','CreateTimer','CreateTCPServer','CreateNetPlayer','CreateImage','CreateDir','CreateBank', + 'CountHostIPs','CountGFXModes','CountGfxDrivers','Cos','CopyStream','CopyRect','CopyPixelFast','CopyPixel','CopyImage','CopyFile', + 'CopyBank','Const','CommandLine','ColorRed','ColorGreen','ColorBlue','Color','ClsColor','Cls','CloseUDPStream', + 'CloseTCPStream','CloseTCPServer','CloseMovie','CloseFile','CloseDir','Chr','ChannelVolume','ChannelPlaying','ChannelPitch','ChannelPan', + 'ChangeDir','Ceil','CallDLL','Bin','BankSize','BackBuffer','AvailVidMem','AutoMidHandle', + 'ATan2','ATan','ASin','Asc','After','ACos','AcceptTCPStream','Abs', + // 3D Commands + 'Wireframe','Windowed3D','WBuffer','VertexZ','VertexY', + 'VertexX','VertexW','VertexV','VertexU','VertexTexCoords','VertexRed','VertexNZ','VertexNY','VertexNX','VertexNormal', + 'VertexGreen','VertexCoords','VertexColor','VertexBlue','VertexAlpha','VectorYaw','VectorPitch','UpdateWorld','UpdateNormals','TurnEntity', + 'TrisRendered','TriangleVertex','TranslateEntity','TFormVector','TFormPoint','TFormNormal','TFormedZ','TFormedY','TFormedX','TextureWidth', + 'TextureName','TextureHeight','TextureFilter','TextureCoords','TextureBuffer','TextureBlend','TerrainZ','TerrainY','TerrainX','TerrainSize', + 'TerrainShading','TerrainHeight','TerrainDetail','SpriteViewMode','ShowEntity','SetCubeFace','SetAnimTime','SetAnimKey','ScaleTexture','ScaleSprite', + 'ScaleMesh','ScaleEntity','RotateTexture','RotateSprite','RotateMesh','RotateEntity','ResetEntity','RenderWorld','ProjectedZ','ProjectedY', + 'ProjectedX','PositionTexture','PositionMesh','PositionEntity','PointEntity','PickedZ','PickedY','PickedX','PickedTriangle','PickedTime', + 'PickedSurface','PickedNZ','PickedNY','PickedNX','PickedEntity','PaintSurface','PaintMesh','PaintEntity','NameEntity','MoveEntity', + 'ModifyTerrain','MeshWidth','MeshHeight','MeshesIntersect','MeshDepth','MD2AnimTime','MD2AnimLength','MD2Animating','LoadTexture','LoadTerrain', + 'LoadSprite','LoadMesh','LoadMD2','LoaderMatrix','LoadBSP','LoadBrush','LoadAnimTexture','LoadAnimSeq','LoadAnimMesh','Load3DSound', + 'LinePick','LightRange','LightMesh','LightConeAngles','LightColor','HWMultiTex','HideEntity','HandleSprite','Graphics3D','GfxMode3DExists', + 'GfxMode3D','GfxDriverCaps3D','GfxDriver3D','GetSurfaceBrush','GetSurface','GetParent','GetMatElement','GetEntityType','GetEntityBrush','GetChild', + 'GetBrushTexture','FreeTexture','FreeEntity','FreeBrush','FlipMesh','FitMesh','FindSurface','FindChild','ExtractAnimSeq','EntityZ', + 'EntityYaw','EntityY','EntityX','EntityVisible','EntityType','EntityTexture','EntityShininess','EntityRoll','EntityRadius','EntityPitch', + 'EntityPickMode','EntityPick','EntityParent','EntityOrder','EntityName','EntityInView','EntityFX','EntityDistance','EntityColor','EntityCollided', + 'EntityBox','EntityBlend','EntityAutoFade','EntityAlpha','EmitSound','Dither','DeltaYaw','DeltaPitch','CreateTexture','CreateTerrain', + 'CreateSurface','CreateSprite','CreateSphere','CreatePlane','CreatePivot','CreateMirror','CreateMesh','CreateListener','CreateLight','CreateCylinder', + 'CreateCube','CreateCone','CreateCamera','CreateBrush','CountVertices','CountTriangles','CountSurfaces','CountGfxModes3D','CountCollisions','CountChildren', + 'CopyMesh','CopyEntity','CollisionZ','CollisionY','CollisionX','CollisionTriangle','CollisionTime','CollisionSurface','Collisions','CollisionNZ', + 'CollisionNY','CollisionNX','CollisionEntity','ClearWorld','ClearTextureFilters','ClearSurface','ClearCollisions','CaptureWorld','CameraZoom','CameraViewport', + 'CameraRange','CameraProjMode','CameraProject','CameraPick','CameraFogRange','CameraFogMode','CameraFogColor','CameraClsMode','CameraClsColor','BSPLighting', + 'BSPAmbientLight','BrushTexture','BrushShininess','BrushFX','BrushColor','BrushBlend','BrushAlpha','AntiAlias','AnimTime','AnimSeq', + 'AnimLength','Animating','AnimateMD2','Animate','AmbientLight','AlignToVector','AddVertex','AddTriangle','AddMesh','AddAnimSeq', + ) + ), + 'SYMBOLS' => array( + '(',')' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000066; font-weight: bold;', + 2 => 'color: #0000ff;' + ), + 'COMMENTS' => array( + 1 => 'color: #D9D100; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000066;' + ), + 'STRINGS' => array( + 0 => 'color: #009900;' + ), + 'NUMBERS' => array( + 0 => 'color: #CC0000;' + ), + 'METHODS' => array( + 1 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #000066;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + ) + ), + 'URLS' => array( + 1 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + 1 => '\\' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => false, + 1 => false + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/bnf.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/bnf.php new file mode 100644 index 0000000..14642ab --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/bnf.php @@ -0,0 +1,130 @@ + 'bnf', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"', "'"), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array(), + 'SYMBOLS' => array( + '<', '>', '::=', '|' + ), + 'CASE_SENSITIVE' => array( + //GESHI_COMMENTS => false + ), + 'STYLES' => array( + 'KEYWORDS' => array(), + 'COMMENTS' => array( + ), + 'ESCAPE_CHAR' => array( + 0 => '' + ), + 'BRACKETS' => array( + 0 => '' + ), + 'STRINGS' => array( + 0 => 'color: #a00;', + 1 => 'color: #a00;' + ), + 'NUMBERS' => array( + 0 => '' + ), + 'METHODS' => array( + 0 => '' + ), + 'SYMBOLS' => array( + 0 => 'color: #000066; font-weight: bold;', // Unused + ), + 'REGEXPS' => array( + 0 => 'color: #007;', + 1 => 'color: #099;', + 2 => 'color: #060;', + 3 => 'color: #909;' + ), + 'SCRIPT' => array( + 0 => '' + ) + ), + 'URLS' => array(), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array(), + 'REGEXPS' => array( + 0 => array( + GESHI_SEARCH => '(<)([^&]+?)(>)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3' + ), + 1 => array( + GESHI_SEARCH => '(<|>)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 2 => array( + GESHI_SEARCH => '(::=)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 3 => array( + GESHI_SEARCH => '([()])', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/c.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/c.php new file mode 100644 index 0000000..b6687f7 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/c.php @@ -0,0 +1,143 @@ + 'C', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'if', 'return', 'while', 'case', 'continue', 'default', + 'do', 'else', 'for', 'switch', 'goto' + ), + 2 => array( + 'null', 'false', 'break', 'true', 'function', 'enum', 'extern', 'inline' + ), + 3 => array( + 'printf', 'cout' + ), + 4 => array( + 'auto', 'char', 'const', 'double', 'float', 'int', 'long', + 'register', 'short', 'signed', 'sizeof', 'static', 'string', 'struct', + 'typedef', 'union', 'unsigned', 'void', 'volatile', 'wchar_t' + ), + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;', + 4 => 'color: #993333;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #339933;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #202020;', + 2 => 'color: #202020;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAME}.html', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.', + 2 => '::' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/c_mac.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/c_mac.php new file mode 100644 index 0000000..86b1697 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/c_mac.php @@ -0,0 +1,175 @@ + 'C (Mac)', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'if', 'return', 'while', 'case', 'continue', 'default', + 'do', 'else', 'for', 'switch', 'goto' + ), + 2 => array( + 'NULL', 'false', 'break', 'true', 'enum', 'errno', 'EDOM', + 'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG', + 'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG', + 'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP', + 'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP', + 'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN', + 'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN', + 'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT', + 'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR', + 'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam', 'NULL', + 'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX', 'stdin', 'stdout', 'stderr', + 'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC', + // Mac-specific constants: + 'kCFAllocatorDefault' + ), + 3 => array( + 'printf', 'fprintf', 'snprintf', 'sprintf', 'assert', + 'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint', + 'ispunct', 'isspace', 'ispunct', 'isupper', 'isxdigit', 'tolower', 'toupper', + 'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp', + 'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2', + 'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp', 'asin', 'acos', 'atan', 'atan2', + 'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen', + 'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf', + 'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf', + 'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc', + 'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind', + 'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs', + 'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc', + 'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv', + 'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat', + 'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn', + 'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy', + 'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime', + 'asctime', 'ctime', 'gmtime', 'localtime', 'strftime' + ), + 4 => array( + 'auto', 'char', 'const', 'double', 'float', 'int', 'long', + 'register', 'short', 'signed', 'sizeof', 'static', 'string', 'struct', + 'typedef', 'union', 'unsigned', 'void', 'volatile', 'extern', 'jmp_buf', + 'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t', + 'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm', + // Mac-specific types: + 'CFArrayRef', 'CFDictionaryRef', 'CFMutableDictionaryRef', 'CFBundleRef', 'CFSetRef', 'CFStringRef', + 'CFURLRef', 'CFLocaleRef', 'CFDateFormatterRef', 'CFNumberFormatterRef', 'CFPropertyListRef', + 'CFTreeRef', 'CFWriteStreamRef', 'CFCharacterSetRef', 'CFMutableStringRef', 'CFNotificationRef', + 'CFNotificationRef', 'CFReadStreamRef', 'CFNull', 'CFAllocatorRef', 'CFBagRef', 'CFBinaryHeapRef', + 'CFBitVectorRef', 'CFBooleanRef', 'CFDataRef', 'CFDateRef', 'CFMachPortRef', 'CFMessagePortRef', + 'CFMutableArrayRef', 'CFMutableBagRef', 'CFMutableBitVectorRef', 'CFMutableCharacterSetRef', + 'CFMutableDataRef', 'CFMutableSetRef', 'CFNumberRef', 'CFPlugInRef', 'CFPlugInInstanceRef', + 'CFRunLoopRef', 'CFRunLoopObserverRef', 'CFRunLoopSourceRef', 'CFRunLoopTimerRef', 'CFSocketRef', + 'CFTimeZoneRef', 'CFTypeRef', 'CFUserNotificationRef', 'CFUUIDRef', 'CFXMLNodeRef', 'CFXMLParserRef', + 'CFXMLTreeRef' + ), + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000ff;', + 2 => 'color: #0000ff;', + 3 => 'color: #0000dd;', + 4 => 'color: #0000ff;' + ), + 'COMMENTS' => array( + 1 => 'color: #ff0000;', + 2 => 'color: #339900;', + 'MULTI' => 'color: #ff0000; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #666666; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #666666;' + ), + 'NUMBERS' => array( + 0 => 'color: #0000dd;' + ), + 'METHODS' => array( + 1 => 'color: #00eeff;', + 2 => 'color: #00eeff;' + ), + 'SYMBOLS' => array( + 0 => 'color: #000000;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAME}.html', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.', + 2 => '::' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/caddcl.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/caddcl.php new file mode 100644 index 0000000..47689a3 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/caddcl.php @@ -0,0 +1,125 @@ + 'CAD DCL', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'boxed_column','boxed_radio_column','boxed_radio_row','boxed_row', + 'column','concatenation','button','dialog','edit_box','image','image_button', + 'errtile','list_box','ok_cancel','ok_cancel_help','ok_cancel_help_errtile', + 'ok_cancel_help_info','ok_only','paragraph','popup_list','radio_button', + 'radio_column','radio_row','row','slider','spacer','spacer_0','spacer_1','text', + 'text_part','toggle', + 'action','alignment','allow_accept','aspect_ratio','big_increment', + 'children_alignment','children_fixed_height', + 'children_fixed_width','color', + 'edit_limit','edit_width','fixed_height','fixed_width', + 'height','initial_focus','is_cancel','is_default', + 'is_enabled','is_tab_stop','is-bold','key','label','layout','list', + 'max_value','min_value','mnemonic','multiple_select','password_char', + 'small_increment','tabs','tab_truncate','value','width', + 'false','true','left','right','centered','top','bottom', + 'dialog_line','dialog_foreground','dialog_background', + 'graphics_background','black','red','yellow','green','cyan', + 'blue','magenta','whitegraphics_foreground', + 'horizontal','vertical' + ) + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/cadlisp.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/cadlisp.php new file mode 100644 index 0000000..c95e168 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/cadlisp.php @@ -0,0 +1,185 @@ + 'CAD Lisp', + 'COMMENT_SINGLE' => array(1 => ";"), + 'COMMENT_MULTI' => array(";|" => "|;"), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'abs','acad_colordlg','acad_helpdlg','acad_strlsort','action_tile', + 'add_list','alert','alloc','and','angle','angtof','angtos','append','apply', + 'arx','arxload','arxunload','ascii','assoc','atan','atof','atoi','atom', + 'atoms-family','autoarxload','autoload','Boole','boundp','caddr', + 'cadr','car','cdr','chr','client_data_tile','close','command','cond', + 'cons','cos','cvunit','defun','defun-q','defun-q-list-ref', + 'defun-q-list-set','dictadd','dictnext','dictremove','dictrename', + 'dictsearch','dimx_tile','dimy_tile','distance','distof','done_dialog', + 'end_image','end_list','entdel','entget','entlast','entmake', + 'entmakex','entmod','entnext','entsel','entupd','eq','equal','eval','exit', + 'exp','expand','expt','fill_image','findfile','fix','float','foreach','function', + 'gc','gcd','get_attr','get_tile','getangle','getcfg','getcname','getcorner', + 'getdist','getenv','getfiled','getint','getkword','getorient','getpoint', + 'getreal','getstring','getvar','graphscr','grclear','grdraw','grread','grtext', + 'grvecs','handent','help','if','initdia','initget','inters','itoa','lambda','last', + 'layoutlist','length','list','listp','load','load_dialog','log','logand','logior', + 'lsh','mapcar','max','mem','member','menucmd','menugroup','min','minusp','mode_tile', + 'namedobjdict','nentsel','nentselp','new_dialog','nil','not','nth','null', + 'numberp','open','or','osnap','polar','prin1','princ','print','progn','prompt', + 'quit','quote','read','read-char','read-line','redraw','regapp','rem','repeat', + 'reverse','rtos','set','set_tile','setcfg','setenv','setfunhelp','setq','setvar', + 'setview','sin','slide_image','snvalid','sqrt','ssadd','ssdel','ssget','ssgetfirst', + 'sslength','ssmemb','ssname','ssnamex','sssetfirst','start_dialog','start_image', + 'start_list','startapp','strcase','strcat','strlen','subst','substr','t','tablet', + 'tblnext','tblobjname','tblsearch','term_dialog','terpri','textbox','textpage', + 'textscr','trace','trans','type','unload_dialog','untrace','vector_image','ver', + 'vports','wcmatch','while','write-char','write-line','xdroom','xdsize','zerop', + 'vl-acad-defun','vl-acad-undefun','vl-arx-import','vlax-3D-point', + 'vlax-add-cmd','vlax-create-object','vlax-curve-getArea', + 'vlax-curve-getClosestPointTo','vlax-curve-getClosestPointToProjection', + 'vlax-curve-getDistAtParam','vlax-curve-getDistAtPoint', + 'vlax-curve-getEndParam','vlax-curve-getEndPoint', + 'vlax-curve-getFirstDeriv','vlax-curve-getParamAtDist', + 'vlax-curve-getParamAtPoint','vlax-curve-getPointAtDist', + 'vlax-curve-getPointAtParam','vlax-curve-getSecondDeriv', + 'vlax-curve-getStartParam','vlax-curve-getStartPoint', + 'vlax-curve-isClosed','vlax-curve-isPeriodic','vlax-curve-isPlanar', + 'vlax-dump-object','vlax-erased-p','vlax-for','vlax-get-acad-object', + 'vlax-get-object','vlax-get-or-create-object','vlax-get-property', + 'vlax-import-type-library','vlax-invoke-method','vlax-ldata-delete', + 'vlax-ldata-get','vlax-ldata-list','vlax-ldata-put','vlax-ldata-test', + 'vlax-make-safearray','vlax-make-variant','vlax-map-collection', + 'vlax-method-applicable-p','vlax-object-released-p','vlax-product-key', + 'vlax-property-available-p','vlax-put-property','vlax-read-enabled-p', + 'vlax-release-object','vlax-remove-cmd','vlax-safearray-fill', + 'vlax-safearray-get-dim','vlax-safearray-get-element', + 'vlax-safearray-get-l-bound','vlax-safearray-get-u-bound', + 'vlax-safearray-put-element','vlax-safearray-type','vlax-tmatrix', + 'vlax-typeinfo-available-p','vlax-variant-change-type', + 'vlax-variant-type','vlax-variant-value','vlax-write-enabled-p', + 'vl-bb-ref','vl-bb-set','vl-catch-all-apply','vl-catch-all-error-message', + 'vl-catch-all-error-p','vl-cmdf','vl-consp','vl-directory-files','vl-doc-export', + 'vl-doc-import','vl-doc-ref','vl-doc-set','vl-every','vl-exit-with-error', + 'vl-exit-with-value','vl-file-copy','vl-file-delete','vl-file-directory-p', + 'vl-filename-base','vl-filename-directory','vl-filename-extension', + 'vl-filename-mktemp','vl-file-rename','vl-file-size','vl-file-systime', + 'vl-get-resource','vlisp-compile','vl-list-exported-functions', + 'vl-list-length','vl-list-loaded-vlx','vl-load-all','vl-load-com', + 'vl-load-reactors','vl-member-if','vl-member-if-not','vl-position', + 'vl-prin1-to-string','vl-princ-to-string','vl-propagate','vlr-acdb-reactor', + 'vlr-add','vlr-added-p','vlr-beep-reaction','vlr-command-reactor', + 'vlr-current-reaction-name','vlr-data','vlr-data-set', + 'vlr-deepclone-reactor','vlr-docmanager-reactor','vlr-dwg-reactor', + 'vlr-dxf-reactor','vlr-editor-reactor','vl-registry-delete', + 'vl-registry-descendents','vl-registry-read','vl-registry-write', + 'vl-remove','vl-remove-if','vl-remove-if-not','vlr-insert-reactor', + 'vlr-linker-reactor','vlr-lisp-reactor','vlr-miscellaneous-reactor', + 'vlr-mouse-reactor','vlr-notification','vlr-object-reactor', + 'vlr-owner-add','vlr-owner-remove','vlr-owners','vlr-pers','vlr-pers-list', + 'vlr-pers-p','vlr-pers-release','vlr-reaction-names','vlr-reactions', + 'vlr-reaction-set','vlr-reactors','vlr-remove','vlr-remove-all', + 'vlr-set-notification','vlr-sysvar-reactor','vlr-toolbar-reactor', + 'vlr-trace-reaction','vlr-type','vlr-types','vlr-undo-reactor', + 'vlr-wblock-reactor','vlr-window-reactor','vlr-xref-reactor', + 'vl-some','vl-sort','vl-sort-i','vl-string-elt','vl-string-left-trim', + 'vl-string-mismatch','vl-string-position','vl-string-right-trim', + 'vl-string-search','vl-string-subst','vl-string-translate','vl-string-trim', + 'vl-symbol-name','vl-symbolp','vl-symbol-value','vl-unload-vlx','vl-vbaload', + 'vl-vbarun','vl-vlx-loaded-p' + ) + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '!', '%', '^', '&', '/','+','-','*','=','<','>' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/cfdg.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/cfdg.php new file mode 100644 index 0000000..9683768 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/cfdg.php @@ -0,0 +1,125 @@ + + * Copyright: (c) 2006 John Horigan http://www.ozonehouse.com/john/ + * Release Version: 1.0.7.21 + * Date Started: 2006/03/11 + * + * CFDG language file for GeSHi. + * + * CHANGES + * ------- + * 2006/03/11 (1.0.0) + * - First Release + * + * TODO (updated 2006/03/11) + * ------------------------- + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi 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. + * + * GeSHi 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 GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'CFDG', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'include', 'startshape', 'rule', 'background' + ), + 2 => array( + 'SQUARE', 'CIRCLE', 'TRIANGLE', + ), + 3 => array( + 'b','brightness','h','hue','sat','saturation', + 'a','alpha','x','y','z','s','size', + 'r','rotate','f','flip','skew','xml_set_object' + ) + ), + 'SYMBOLS' => array( + '[', ']', '{', '}', '*', '|' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #717100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #006666;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + 3 => '' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => '', + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/cfm.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/cfm.php new file mode 100644 index 0000000..c0e6cbd --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/cfm.php @@ -0,0 +1,325 @@ + 'ColdFusion', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('','<!---' => '--->', '/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + /* CFM Tags */ + 1 => array( + '<cfabort', '<cfapplet', '<cfapplication', '<cfargument', '<cfassociate', '<<cfbreak>', + '<cfcache', '<cfcase', '<cfcatch', '</cfcatch>', '<cfchart', '</cfchart>', '<cfchartdata', + '<cfchartseries', '</cfchartseries>', '<cfcol', '<cfcollection', '<cfcomponent', '</cfcomponent>', + '<cfcontent', '<cfcookie', '</cfdefaultcase>', '<cfdirectory', '<cfdocument', '</cfdocument>', + '<cfdocumentitem', '</cfdocumentitem>', '<cfdocumentsection', '</cfdocumentsection>', '<cfdump', + '<cfelse', '<cfelseif', '<cferror', '<cfexecute', '</cfexecute>', '<cfexit', '<cffile', + '<cfflush', '<cfform', '</cfform>', '<cfformgroup', '</cfformgroup', '<cfformitem', + '</cfformitem>', '<cfftp', '<cffunction', '</cffunction>', '<cfgrid', '</cfgrid>', + '<cfgridcolumn', '<cfgridrow', '<cfgridupdate', '<cfheader', '<cfhtmlhead', '<cfhttp', + '</cfhttp>', '<cfhttpparam', '<cfif', '</cfif>', '<cfimport', '<cfinclude', '<cfindex', + '<cfinput', '<cfinsert', '<cfinvoke', '<cfinvokeargument', '<cfldap', '<cflocation', '<cflock', + '</cflock>', '<cflog', '<cflogin', '</cflogin>', '<cfloginuser', '<cflogout', '<cfloop', + '</cfloop>', '<cfmail', '</cfmail>', '<cfmailparam', '<cfmailpart', '</cfmailpart>', + '<cfmodule', '<cfNTauthenticate', '<cfobject', '<cfobjectcache', '<cfoutput>', '<cfoutput', '</cfoutput>', + '<cfparam', '<cfpop', '<cfprocessingdirective', '</cfprocessingdirective>', '<cfprocparam', + '<cfprocresult', '<cfproperty', '<cfquery', '</cfquery>', '<cfqueryparam', '<cfregistry', + '</cfregistry>', '<cfreport', '</cfreport>', '<cfreportparam', '</cfreportparam>', + '<cfrethrow', '<cfreturn', '<cfsavecontent', '</cfsavecontent>', '<cfschedule', '<cfscript', '<cfscript>', + '</cfscript>', '<cfsearch', '<cfselect', '</cfselect>', '<cfset', '<cfsetting', '<cfsilent', + '</cfsilent>', '<cfstoredproc', '</cfstoredproc>', '<cfswitch', '</cfswitch>', '<cftable', + '</cftable>', '<cftextarea', '</cftextarea>', '<cfthrow', '<cftimer', '</cftimer>', + '<cftrace', '</cftrace>', '<cftransaction', '</cftransaction>', '<cftree', '</cftree>', + '<cftreeitem', '<cftry', '</cftry>', '<cfupdate', '<cfwddx','<','>' + ), + /* HTML Tags */ + 2 => array( + '<a>', '<abbr>', '<acronym>', '<address>', '<applet>', + '<a', '<abbr', '<acronym', '<address', '<applet', + '</a>', '</abbr>', '</acronym>', '</address>', '</applet>', + '</a', '</abbr', '</acronym', '</address', '</applet', + + '<base>', '<basefont>', '<bdo>', '<big>', '<blockquote>', '<body>', '<br>', '<button>', '<b>', + '<base', '<basefont', '<bdo', '<big', '<blockquote', '<body', '<br', '<button', '<b', + '</base>', '</basefont>', '</bdo>', '</big>', '</blockquote>', '</body>', '</br>', '</button>', '</b>', + '</base', '</basefont', '</bdo', '</big', '</blockquote', '</body', '</br','<br />', '</button', '</b', + + '<caption>', '<center>', '<cite>', '<code>', '<colgroup>', '<col>', + '<caption', '<center', '<cite', '<code', '<colgroup', '<col', + '</caption>', '</center>', '</cite>', '</code>', '</colgroup>', '</col>', + '</caption', '</center', '</cite', '</code', '</colgroup', '</col', + + '<dd>', '<del>', '<dfn>', '<dir>', '<div>', '<dl>', '<dt>', + '<dd', '<del', '<dfn', '<dir', '<div', '<dl', '<dt', + '</dd>', '</del>', '</dfn>', '</dir>', '</div>', '</dl>', '</dt>', + '</dd', '</del', '</dfn', '</dir', '</div', '</dl', '</dt', + + '<em>', + '<em', + '</em>', + '</em', + + '<fieldset>', '<font>', '<form>', '<frame>', '<frameset>', + '<fieldset', '<font', '<form', '<frame', '<frameset', + '</fieldset>', '</font>', '</form>', '</frame>', '</frameset>', + '</fieldset', '</font', '</form', '</frame', '</frameset', + + '<h1>', '<h2>', '<h3>', '<h4>', '<h5>', '<h6>', '<head>', '<hr>', '<html>', + '<h1', '<h2', '<h3', '<h4', '<h5', '<h6', '<head', '<hr', '<html', + '</h1>', '</h2>', '</h3>', '</h4>', '</h5>', '</h6>', '</head>', '</hr>', '</html>', + '</h1', '</h2', '</h3', '</h4', '</h5', '</h6', '</head', '</hr', '</html', + + '<iframe>', '<ilayer>', '<img>', '<input>', '<ins>', '<isindex>', '<i>', + '<iframe', '<ilayer', '<img', '<input', '<ins', '<isindex', '<i', + '</iframe>', '</ilayer>', '</img>', '</input>', '</ins>', '</isindex>', '</i>', + '</iframe', '</ilayer', '</img', '</input', '</ins', '</isindex', '</i', + + '<kbd>', + '<kbd', + '&t;/kbd>', + '</kbd', + + '<label>', '<legend>', '<link>', '<li>', + '<label', '<legend', '<link', '<li', + '</label>', '</legend>', '</link>', '</li>', + '</label', '</legend', '</link', '</li', + + '<map>', '<meta>', + '<map', '<meta', + '</map>', '</meta>', + '</map', '</meta', + + '<noframes>', '<noscript>', + '<noframes', '<noscript', + '</noframes>', '</noscript>', + '</noframes', '</noscript', + + '<object>', '<ol>', '<optgroup>', '<option>', + '<object', '<ol', '<optgroup', '<option', + '</object>', '</ol>', '</optgroup>', '</option>', + '</object', '</ol', '</optgroup', '</option', + + '<param>', '<pre>', '<p>', + '<param', '<pre', '<p', + '</param>', '</pre>', '</p>', + '</param', '</pre', '</p', + + '<q>', + '<q', + '</q>', + '</q', + + '<samp>', '<script>', '<select>', '<small>', '<span>', '<strike>', '<strong>', '<style>', '<sub>', '<sup>', '<s>', + '<samp', '<script', '<select', '<small', '<span', '<strike', '<strong', '<style', '<sub', '<sup', '<s', + '</samp>', '</script>', '</select>', '</small>', '</span>', '</strike>', '</strong>', '</style>', '</sub>', '</sup>', '</s>', + '</samp', '</script', '</select', '</small', '</span', '</strike', '</strong', '</style', '</sub', '</sup', '</s', + + '<table>', '<tbody>', '<td>', '<textarea>', '<text>', '<tfoot>', '<thead>', '<th>', '<title>', '<tr>', '<tt>', + '<table', '<tbody', '<td', '<textarea', '<text', '<tfoot', '<tfoot', '<thead', '<th', '<title', '<tr', '<tt', + '</table>', '</tbody>', '</td>', '</textarea>', '</text>', '</tfoot>', '</thead', '</tfoot', '</th>', '</title>', '</tr>', '</tt>', + '</table', '</tbody', '</td', '</textarea', '</text', '</tfoot', '</tfoot', '</thead', '</th', '</title', '</tr', '</tt', + + '<ul>', '<u>', + '<ul', '<u', + '</ul>', '</ul>', + '</ul', '</u', + + '<var>', + '<var', + '</var>', + '</var', + + '>', '<' + ), + /* HTML attributes */ + 3 => array( + 'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis', + 'background', 'bgcolor', 'border', + 'cellpadding', 'cellspacing', 'char', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords', + 'data', 'datetime', 'declare', 'defer', 'dir', 'disabled', + 'enctype', + 'face', 'for', 'frame', 'frameborder', + 'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv', + 'id', 'ismap', + 'label', 'lang', 'language', 'link', 'longdesc', + 'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple', + 'name', 'nohref', 'noresize', 'noshade', 'nowrap', + 'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onreset', 'onselect', 'onsubmit', 'onunload', + 'profile', 'prompt', + 'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules', + 'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary', + 'tabindex', 'target', 'text', 'title', 'type', + 'usemap', + 'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace', + 'width' + ), + /* CFM Script delimeters */ + 4 => array( + 'var', 'function', 'while', 'if','else' + ), + /* CFM Functions */ + 5 => array( + 'Abs', 'GetFunctionList', 'LSTimeFormat','ACos','GetGatewayHelper','LTrim','AddSOAPRequestHeader','GetHttpRequestData', + 'Max','AddSOAPResponseHeader','GetHttpTimeString','Mid','ArrayAppend','GetLocale','Min','ArrayAvg','GetLocaleDisplayName', + 'Minute','ArrayClear','GetMetaData','Month','ArrayDeleteAt','GetMetricData','MonthAsString','ArrayInsertAt','GetPageContext', + 'Now','ArrayIsEmpty','GetProfileSections','NumberFormat','ArrayLen','GetProfileString','ParagraphFormat','ArrayMax', + 'GetLocalHostIP','ParseDateTime','ArrayMin','GetSOAPRequest','Pi','ArrayNew','GetSOAPRequestHeader','PreserveSingleQuotes', + 'ArrayPrepend','GetSOAPResponse','Quarter','ArrayResize','GetSOAPResponseHeader','QueryAddColumn','ArraySet', + 'GetTempDirectory','QueryAddRow','ArraySort','GetTempDirectory','QueryNew','ArraySum','GetTempFile','QuerySetCell', + 'ArraySwap','GetTickCount','QuotedValueList','ArrayToList','GetTimeZoneInfo','Rand','Asc','GetToken','Randomize', + 'ASin','Hash','RandRange','Atn','Hour','REFind','BinaryDecode','HTMLCodeFormat','REFindNoCase','BinaryEncode', + 'HTMLEditFormat','ReleaseComObject','BitAnd','IIf','RemoveChars','BitMaskClear','IncrementValue','RepeatString', + 'BitMaskRead','InputBaseN','Replace','BitMaskSet','Insert','ReplaceList','BitNot','Int','ReplaceNoCase','BitOr', + 'IsArray','REReplace','BitSHLN','IsBinary','REReplaceNoCase','BitSHRN','IsBoolean','Reverse','BitXor','IsCustomFunction', + 'Right','Ceiling','IsDate','RJustify','CharsetDecode','IsDebugMode','Round','CharsetEncode','IsDefined','RTrim', + 'Chr','IsLeapYear','Second','CJustify','IsLocalHost','SendGatewayMessage','Compare','IsNumeric','SetEncoding', + 'CompareNoCase','IsNumericDate','SetLocale','Cos','IsObject','SetProfileString','CreateDate','IsQuery','SetVariable', + 'CreateDateTime','IsSimpleValue','Sgn','CreateObject','IsSOAPRequest','Sin','CreateODBCDate','IsStruct','SpanExcluding', + 'CreateODBCDateTime','IsUserInRole','SpanIncluding','CreateODBCTime','IsValid','Sqr','CreateTime','IsWDDX','StripCR', + 'CreateTimeSpan','IsXML','StructAppend','CreateUUID','IsXmlAttribute','StructClear','DateAdd','IsXmlDoc','StructCopy', + 'DateCompare','IsXmlElem','StructCount','DateConvert','IsXmlNode','StructDelete','DateDiff','IsXmlRoot','StructFind', + 'DateFormat','JavaCast','StructFindKey','DatePart','JSStringFormat','StructFindValue','Day','LCase','StructGet', + 'DayOfWeek','Left','StructInsert','DayOfWeekAsString','Len','StructIsEmpty','DayOfYear','ListAppend','StructKeyArray', + 'DaysInMonth','ListChangeDelims','StructKeyExists','DaysInYear','ListContains','StructKeyList','DE','ListContainsNoCase', + 'StructNew','DecimalFormat','ListDeleteAt','StructSort','DecrementValue','ListFind','StructUpdate','Decrypt','ListFindNoCase', + 'Tan','DecryptBinary','ListFirst','TimeFormat','DeleteClientVariable','ListGetAt','ToBase64','DirectoryExists', + 'ListInsertAt','ToBinary','DollarFormat','ListLast','ToScript','Duplicate','ListLen','ToString','Encrypt','ListPrepend', + 'Trim','EncryptBinary','ListQualify','UCase','Evaluate','ListRest','URLDecode','Exp','ListSetAt','URLEncodedFormat', + 'ExpandPath','ListSort','URLSessionFormat','FileExists','ListToArray','Val','Find','ListValueCount','ValueList', + 'FindNoCase','ListValueCountNoCase','Week','FindOneOf','LJustify','Wrap','FirstDayOfMonth','Log','WriteOutput', + 'Fix','Log10','XmlChildPos','FormatBaseN','LSCurrencyFormat','XmlElemNew','GetAuthUser','LSDateFormat','XmlFormat', + 'GetBaseTagData','LSEuroCurrencyFormat','XmlGetNodeType','GetBaseTagList','LSIsCurrency','XmlNew','GetBaseTemplatePath', + 'LSIsDate','XmlParse','GetClientVariablesList','LSIsNumeric','XmlSearch','GetCurrentTemplatePath','LSNumberFormat', + 'XmlTransform','GetDirectoryFromPath','LSParseCurrency','XmlValidate','GetEncoding','LSParseDateTime','Year', + 'GetException','LSParseEuroCurrency','YesNoFormat','GetFileFromPath','LSParseNumber' + ), + /* CFM Attributes */ + 6 => array( + '=','&','name','dbtype','connectstring','datasource','username','password','query','delimeter','description','required','hint','default','access','from','to','list','index' + ) + ), + 'SYMBOLS' => array( + '/', '=', 'EQ', 'GT', 'LT', 'GTE', 'LTE', 'IS', 'LIKE', '&', '{', '}', '(', ')', '[', ']','gt','lt' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #990000;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #0000FF;', + 4 => 'color: #000000; font-weight: bold;', + 5 => 'color: #0000FF;', + 6 => 'color: #0000FF' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic; background-color:#FFFF99;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #0000FF;' + ), + 'STRINGS' => array( + 0 => 'color: #009900;' + ), + 'NUMBERS' => array( + 0 => 'color: #FF0000;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #0000FF;' + ), + 'SCRIPT' => array( + 0 => 'color: #00bbdd;', + 1 => 'color: #0000FF;', + 2 => 'color: #000099;', + 3 => 'color: #333333;' + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, + 'SCRIPT_DELIMITERS' => array( + 0 => array( + ' '>' + ), + 1 => array( + '#' => '#' + ), + 2 => array( + '' => ';' + ), + 3 => array( + '<' => '>' + ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => false, + 1 => true, + 2 => true, + 3 => true + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/cpp-qt.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/cpp-qt.php new file mode 100644 index 0000000..0c1fba9 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/cpp-qt.php @@ -0,0 +1,267 @@ + 'C++ (QT)', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'case', 'continue', 'default', 'do', 'else', 'for', 'goto', 'if', 'return', + 'switch', 'while' + ), + 2 => array( + 'NULL', 'false', 'break', 'true', 'enum', 'errno', 'EDOM', + 'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG', + 'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG', + 'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP', + 'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP', + 'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN', + 'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN', + 'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT', + 'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR', + 'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam', 'NULL', + 'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX', 'stdin', 'stdout', 'stderr', + 'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC', + 'virtual', 'public', 'private', 'protected', 'template', 'using', 'namespace', + 'try', 'catch', 'inline', 'dynamic_cast', 'const_cast', 'reinterpret_cast', + 'static_cast', 'explicit', 'friend', 'wchar_t', 'typename', 'typeid', 'class' , + 'foreach','connect', 'Q_OBJECT' , 'slots' , 'signals' + ), + 3 => array( + 'cin', 'cerr', 'clog', 'cout', 'delete', 'new', 'this', + 'printf', 'fprintf', 'snprintf', 'sprintf', 'assert', + 'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint', + 'ispunct', 'isspace', 'ispunct', 'isupper', 'isxdigit', 'tolower', 'toupper', + 'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp', + 'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2', + 'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp', 'asin', 'acos', 'atan', 'atan2', + 'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen', + 'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf', + 'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf', + 'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc', + 'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind', + 'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs', + 'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc', + 'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv', + 'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat', + 'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn', + 'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy', + 'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime', + 'asctime', 'ctime', 'gmtime', 'localtime', 'strftime' + ), + 4 => array( + 'auto', 'bool', 'char', 'const', 'double', 'float', 'int', 'long', 'longint', + 'register', 'short', 'shortint', 'signed', 'static', 'struct', + 'typedef', 'union', 'unsigned', 'void', 'volatile', 'extern', 'jmp_buf', + 'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t', + 'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm', + ), + 5 => array( + 'QAbstractButton','QDir','QIntValidator','QRegExpValidator','QTabWidget','QAbstractEventDispatcher', + 'QDirectPainter','QIODevice','QRegion','QTcpServer','QAbstractExtensionFactory','QDirModel', + 'QItemDelegate','QResizeEvent','QTcpSocket','QAbstractExtensionManager','QDockWidget', + 'QItemEditorCreatorBase','QResource','QTemporaryFile','QAbstractFileEngine','QDomAttr', + 'QItemEditorFactory','QRubberBand','QTestEventList','QAbstractFileEngineHandler','QDomCDATASection', + 'QItemSelection','QScreen','QTextBlock','QAbstractFormBuilder','QDomCharacterData','QItemSelectionModel', + 'QScreenCursor','QTextBlockFormat','QAbstractGraphicsShapeItem','QDomComment','QItemSelectionRange', + 'QScreenDriverFactory','QTextBlockGroup','QAbstractItemDelegate','QDomDocument','QKbdDriverFactory', + 'QScreenDriverPlugin','QTextBlockUserData','QAbstractItemModel','QDomDocumentFragment','QKbdDriverPlugin', + 'QScrollArea','QTextBrowser','QAbstractItemView','QDomDocumentType','QKeyEvent','QScrollBar', + 'QTextCharFormat','QAbstractListModel','QDomElement','QKeySequence','QSemaphore','QTextCodec', + 'QAbstractPrintDialog','QDomEntity','QLabel','QSessionManager','QTextCodecPlugin','QAbstractProxyModel', + 'QDomEntityReference','QLatin1Char','QSet','QTextCursor','QAbstractScrollArea','QDomImplementation', + 'QLatin1String','QSetIterator','QTextDecoder','QAbstractSlider','QDomNamedNodeMap','QLayout','QSettings', + 'QTextDocument','QAbstractSocket','QDomNode','QLayoutItem','QSharedData','QTextDocumentFragment', + 'QAbstractSpinBox','QDomNodeList','QLCDNumber','QSharedDataPointer','QTextEdit','QAbstractTableModel', + 'QDomNotation','QLibrary','QShortcut','QTextEncoder','QAbstractTextDocumentLayout', + 'QDomProcessingInstruction','QLibraryInfo','QShortcutEvent','QTextFormat','QAccessible','QDomText', + 'QLine','QShowEvent','QTextFragment','QAccessibleBridge','QDoubleSpinBox','QLinearGradient', + 'QSignalMapper','QTextFrame','QAccessibleBridgePlugin','QDoubleValidator','QLineEdit','QSignalSpy', + 'QTextFrameFormat','QAccessibleEvent','QDrag','QLineF','QSize','QTextImageFormat','QAccessibleInterface', + 'QDragEnterEvent','QLinkedList','QSizeF','QTextInlineObject','QAccessibleObject','QDragLeaveEvent', + 'QLinkedListIterator','QSizeGrip','QTextLayout','QAccessiblePlugin','QDragMoveEvent','QLinuxFbScreen', + 'QSizePolicy','QTextLength','QAccessibleWidget','QDropEvent','QList','QSlider','QTextLine','QAction', + 'QDynamicPropertyChangeEvent','QListIterator','QSocketNotifier','QTextList','QActionEvent','QErrorMessage', + 'QListView','QSortFilterProxyModel','QTextListFormat','QActionGroup','QEvent','QListWidget','QSound', + 'QTextObject','QApplication','QEventLoop','QListWidgetItem','QSpacerItem','QTextOption','QAssistantClient', + 'QExtensionFactory','QLocale','QSpinBox','QTextStream','QAxAggregated','QExtensionManager', + 'QMacPasteboardMime','QSplashScreen','QTextTable','QAxBase','QFile','QMacStyle','QSplitter', + 'QTextTableCell','QAxBindable','QFileDialog','QMainWindow','QSplitterHandle','QTextTableFormat', + 'QAxFactory','QFileIconProvider','QMap','QSqlDatabase','QThread','QAxObject','QFileInfo','QMapIterator', + 'QSqlDriver','QThreadStorage','QAxScript','QFileOpenEvent','QMatrix','QSqlDriverCreator','QTime', + 'QAxScriptEngine','QFileSystemWatcher','QMenu','QSqlDriverCreatorBase','QTimeEdit','QAxScriptManager', + 'QFlag','QMenuBar','QSqlDriverPlugin','QTimeLine','QAxWidget','QFlags','QMessageBox','QSqlError','QTimer', + 'QBasicTimer','QFocusEvent','QMetaClassInfo','QSqlField','QTimerEvent','QBitArray','QFocusFrame', + 'QMetaEnum','QSqlIndex','QToolBar','QBitmap','QFont','QMetaMethod','QSqlQuery','QToolBox','QBoxLayout', + 'QFontComboBox','QMetaObject','QSqlQueryModel','QToolButton','QBrush','QFontDatabase','QMetaProperty', + 'QSqlRecord','QToolTip','QBuffer','QFontDialog','QMetaType','QSqlRelation','QTransformedScreen', + 'QButtonGroup','QFontInfo','QMimeData','QSqlRelationalDelegate','QTranslator','QByteArray','QFontMetrics', + 'QMimeSource','QSqlRelationalTableModel','QTreeView','QByteArrayMatcher','QFontMetricsF','QModelIndex', + 'QSqlResult','QTreeWidget','QCache','QFormBuilder','QMotifStyle','QSqlTableModel','QTreeWidgetItem', + 'QCalendarWidget','QFrame','QMouseDriverFactory','QStack','QTreeWidgetItemIterator','QCDEStyle', + 'QFSFileEngine','QMouseDriverPlugin','QStackedLayout','QUdpSocket','QChar','QFtp','QMouseEvent', + 'QStackedWidget','QUiLoader','QCheckBox','QGenericArgument','QMoveEvent','QStandardItem','QUndoCommand', + 'QChildEvent','QGenericReturnArgument','QMovie','QStandardItemEditorCreator','QUndoGroup', + 'QCleanlooksStyle','QGLColormap','QMultiHash','QStandardItemModel','QUndoStack','QClipboard', + 'QGLContext','QMultiMap','QStatusBar','QUndoView','QCloseEvent','QGLFormat','QMutableHashIterator', + 'QStatusTipEvent','QUrl','QColor','QGLFramebufferObject','QMutableLinkedListIterator','QString', + 'QUrlInfo','QColorDialog','QGLPixelBuffer','QMutableListIterator','QStringList','QUuid','QColormap', + 'QGLWidget','QMutableMapIterator','QStringListModel','QValidator','QComboBox','QGradient', + 'QMutableSetIterator','QStringMatcher','QVariant','QCommonStyle','QGraphicsEllipseItem', + 'QMutableVectorIterator','QStyle','QVarLengthArray','QCompleter','QGraphicsItem','QMutex', + 'QStyleFactory','QVBoxLayout','QConicalGradient','QGraphicsItemAnimation','QMutexLocker', + 'QStyleHintReturn','QVector','QContextMenuEvent','QGraphicsItemGroup','QNetworkAddressEntry', + 'QStyleHintReturnMask','QVectorIterator','QCopChannel','QGraphicsLineItem','QNetworkInterface', + 'QStyleOption','QVFbScreen','QCoreApplication','QGraphicsPathItem','QNetworkProxy','QStyleOptionButton', + 'QVNCScreen','QCursor','QGraphicsPixmapItem','QObject','QStyleOptionComboBox','QWaitCondition', + 'QCustomRasterPaintDevice','QGraphicsPolygonItem','QObjectCleanupHandler','QStyleOptionComplex', + 'QWhatsThis','QDataStream','QGraphicsRectItem','QPageSetupDialog','QStyleOptionDockWidget', + 'QWhatsThisClickedEvent','QDataWidgetMapper','QGraphicsScene','QPaintDevice','QStyleOptionFocusRect', + 'QWheelEvent','QDate','QGraphicsSceneContextMenuEvent','QPaintEngine','QStyleOptionFrame','QWidget', + 'QDateEdit','QGraphicsSceneEvent','QPaintEngineState','QStyleOptionFrameV2','QWidgetAction','QDateTime', + 'QGraphicsSceneHoverEvent','QPainter','QStyleOptionGraphicsItem','QWidgetItem','QDateTimeEdit', + 'QGraphicsSceneMouseEvent','QPainterPath','QStyleOptionGroupBox','QWindowsMime','QDBusAbstractAdaptor', + 'QGraphicsSceneWheelEvent','QPainterPathStroker','QStyleOptionHeader','QWindowsStyle', + 'QDBusAbstractInterface','QGraphicsSimpleTextItem','QPaintEvent','QStyleOptionMenuItem', + 'QWindowStateChangeEvent','QDBusArgument','QGraphicsSvgItem','QPair','QStyleOptionProgressBar', + 'QWindowsXPStyle','QDBusConnection','QGraphicsTextItem','QPalette','QStyleOptionProgressBarV2', + 'QWorkspace','QDBusConnectionInterface','QGraphicsView','QPen','QStyleOptionQ3DockWindow','QWriteLocker', + 'QDBusError','QGridLayout','QPersistentModelIndex','QStyleOptionQ3ListView','QWSCalibratedMouseHandler', + 'QDBusInterface','QGroupBox','QPicture','QStyleOptionQ3ListViewItem','QWSClient','QDBusMessage','QHash', + 'QPictureFormatPlugin','QStyleOptionRubberBand','QWSEmbedWidget','QDBusObjectPath','QHashIterator', + 'QPictureIO','QStyleOptionSizeGrip','QWSEvent','QDBusReply','QHBoxLayout','QPixmap','QStyleOptionSlider', + 'QWSInputMethod','QDBusServer','QHeaderView','QPixmapCache','QStyleOptionSpinBox','QWSKeyboardHandler', + 'QDBusSignature','QHelpEvent','QPlastiqueStyle','QStyleOptionTab','QWSMouseHandler','QDBusVariant', + 'QHideEvent','QPluginLoader','QStyleOptionTabBarBase','QWSPointerCalibrationData','QDecoration', + 'QHostAddress','QPoint','QStyleOptionTabV2','QWSScreenSaver','QDecorationFactory','QHostInfo','QPointer', + 'QStyleOptionTabWidgetFrame','QWSServer','QDecorationPlugin','QHoverEvent','QPointF','QStyleOptionTitleBar', + 'QWSTslibMouseHandler','QDesignerActionEditorInterface','QHttp','QPolygon','QStyleOptionToolBar','QWSWindow', + 'QDesignerContainerExtension','QHttpHeader','QPolygonF','QStyleOptionToolBox','QWSWindowSurface', + 'QDesignerCustomWidgetCollectionInterface','QHttpRequestHeader','QPrintDialog','QStyleOptionToolButton', + 'QX11EmbedContainer','QDesignerCustomWidgetInterface','QHttpResponseHeader','QPrintEngine', + 'QStyleOptionViewItem','QX11EmbedWidget','QDesignerFormEditorInterface','QIcon','QPrinter', + 'QStyleOptionViewItemV2','QX11Info','QDesignerFormWindowCursorInterface','QIconDragEvent','QProcess', + 'QStylePainter','QXmlAttributes','QDesignerFormWindowInterface','QIconEngine','QProgressBar', + 'QStylePlugin','QXmlContentHandler','QDesignerFormWindowManagerInterface','QIconEnginePlugin', + 'QProgressDialog','QSvgRenderer','QXmlDeclHandler','QDesignerMemberSheetExtension','QImage', + 'QProxyModel','QSvgWidget','QXmlDefaultHandler','QDesignerObjectInspectorInterface','QImageIOHandler', + 'QPushButton','QSyntaxHighlighter','QXmlDTDHandler','QDesignerPropertyEditorInterface','QImageIOPlugin', + 'QQueue','QSysInfo','QXmlEntityResolver','QDesignerPropertySheetExtension','QImageReader','QRadialGradient', + 'QSystemLocale','QXmlErrorHandler','QDesignerTaskMenuExtension','QImageWriter','QRadioButton', + 'QSystemTrayIcon','QXmlInputSource','QDesignerWidgetBoxInterface','QInputContext','QRasterPaintEngine', + 'QTabBar','QXmlLexicalHandler','QDesktopServices','QInputContextFactory','QReadLocker','QTabletEvent', + 'QXmlLocator','QDesktopWidget','QInputContextPlugin','QReadWriteLock','QTableView','QXmlNamespaceSupport', + 'QDial','QInputDialog','QRect','QTableWidget','QXmlParseException','QDialog','QInputEvent','QRectF', + 'QTableWidgetItem','QXmlReader','QDialogButtonBox','QInputMethodEvent','QRegExp', + 'QTableWidgetSelectionRange','QXmlSimpleReader' + ) + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000ff;', + 2 => 'color: #0000ff;', + 3 => 'color: #0000dd;', + 4 => 'color: #0000ff;', + 5 => 'color: #0000ee;' + ), + 'COMMENTS' => array( + 1 => 'color: #ff0000;', + 2 => 'color: #339900;', + 'MULTI' => 'color: #ff0000; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #666666; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #666666;' + ), + 'NUMBERS' => array( + 0 => 'color: #0000dd;' + ), + 'METHODS' => array( + 1 => 'color: #00eeff;', + 2 => 'color: #00eeff;' + ), + 'SYMBOLS' => array( + 0 => 'color: #000000;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => 'http://doc.trolltech.com/4.2/{FNAME}.html' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.', + 2 => '::' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/cpp.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/cpp.php new file mode 100644 index 0000000..7db2681 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/cpp.php @@ -0,0 +1,185 @@ + 'C++', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'break', 'case', 'continue', 'default', 'do', 'else', 'for', 'goto', 'if', 'return', + 'switch', 'throw', 'while' + ), + 2 => array( + 'NULL', 'false', 'true', 'enum', 'errno', 'EDOM', + 'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG', + 'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG', + 'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP', + 'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP', + 'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN', + 'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN', + 'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT', + 'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR', + 'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam', 'NULL', + 'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX', 'stdin', 'stdout', 'stderr', + 'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC', + 'virtual', 'public', 'private', 'protected', 'template', 'using', 'namespace', + 'try', 'catch', 'inline', 'dynamic_cast', 'const_cast', 'reinterpret_cast', + 'static_cast', 'explicit', 'friend', 'wchar_t', 'typename', 'typeid', 'class' + ), + 3 => array( + 'cin', 'cerr', 'clog', 'cout', 'delete', 'new', 'this', + 'printf', 'fprintf', 'snprintf', 'sprintf', 'assert', + 'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint', + 'ispunct', 'isspace', 'ispunct', 'isupper', 'isxdigit', 'tolower', 'toupper', + 'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp', + 'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2', + 'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp', 'asin', 'acos', 'atan', 'atan2', + 'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen', + 'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf', + 'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf', + 'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc', + 'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind', + 'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs', + 'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc', + 'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv', + 'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat', + 'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn', + 'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy', + 'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime', + 'asctime', 'ctime', 'gmtime', 'localtime', 'strftime' + ), + 4 => array( + 'auto', 'bool', 'char', 'const', 'double', 'float', 'int', 'long', 'longint', + 'register', 'short', 'shortint', 'signed', 'static', 'struct', + 'typedef', 'union', 'unsigned', 'void', 'volatile', 'extern', 'jmp_buf', + 'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t', + 'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm', + ), + ), + 'SYMBOLS' => array( + 0 => array('(', ')', '{', '}', '[', ']'), + 1 => array('<', '>','='), + 2 => array('+', '-', '*', '/', '%'), + 3 => array('!', '^', '&', '|'), + 4 => array(':') + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000ff;', + 2 => 'color: #0000ff;', + 3 => 'color: #0000dd;', + 4 => 'color: #0000ff;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666;', + 2 => 'color: #339900;', + 'MULTI' => 'color: #ff0000; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #666666; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #008000;' + ), + 'STRINGS' => array( + 0 => 'color: #FF0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #0000dd;' + ), + 'METHODS' => array( + 1 => 'color: #00eeff;', + 2 => 'color: #00eeff;' + ), + 'SYMBOLS' => array( + 0 => 'color: #008000;', + 1 => 'color: #000080;', + 2 => 'color: #000040;', + 3 => 'color: #000040;', + 4 => 'color: #008080;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.', + 2 => '::' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => "a-zA-Z0-9\$_\|\#>|^", + 'DISALLOWED_AFTER' => "a-zA-Z0-9_<\|%\\-" + ) + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/csharp.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/csharp.php new file mode 100644 index 0000000..dfd3e8e --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/csharp.php @@ -0,0 +1,238 @@ + 'C#', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'HARDQUOTE' => array('@"', '"'), + 'HARDESCAPE' => array('""'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'as', 'auto', 'base', 'break', 'case', 'catch', 'const', 'continue', + 'default', 'do', 'else', 'event', 'explicit', 'extern', 'false', + 'finally', 'fixed', 'for', 'foreach', 'goto', 'if', 'implicit', + 'in', 'internal', 'lock', 'namespace', 'null', 'operator', 'out', + 'override', 'params', 'private', 'protected', 'public', 'readonly', + 'ref', 'return', 'sealed', 'stackalloc', 'static', 'switch', 'this', + 'throw', 'true', 'try', 'unsafe', 'using', 'virtual', 'void', 'while' + ), + 2 => array( + '#elif', '#endif', '#endregion', '#else', '#error', '#define', '#if', + '#line', '#region', '#undef', '#warning' + ), + 3 => array( + 'checked', 'is', 'new', 'sizeof', 'typeof', 'unchecked' + ), + 4 => array( + 'bool', 'byte', 'char', 'class', 'decimal', 'delegate', 'double', + 'enum', 'float', 'int', 'interface', 'long', 'object', 'sbyte', + 'short', 'string', 'struct', 'uint', 'ulong', 'ushort' + ), + 5 => array( + 'Microsoft.Win32', + 'System', + 'System.CodeDOM', + 'System.CodeDOM.Compiler', + 'System.Collections', + 'System.Collections.Bases', + 'System.ComponentModel', + 'System.ComponentModel.Design', + 'System.ComponentModel.Design.CodeModel', + 'System.Configuration', + 'System.Configuration.Assemblies', + 'System.Configuration.Core', + 'System.Configuration.Install', + 'System.Configuration.Interceptors', + 'System.Configuration.Schema', + 'System.Configuration.Web', + 'System.Core', + 'System.Data', + 'System.Data.ADO', + 'System.Data.Design', + 'System.Data.Internal', + 'System.Data.SQL', + 'System.Data.SQLTypes', + 'System.Data.XML', + 'System.Data.XML.DOM', + 'System.Data.XML.XPath', + 'System.Data.XML.XSLT', + 'System.Diagnostics', + 'System.Diagnostics.SymbolStore', + 'System.DirectoryServices', + 'System.Drawing', + 'System.Drawing.Design', + 'System.Drawing.Drawing2D', + 'System.Drawing.Imaging', + 'System.Drawing.Printing', + 'System.Drawing.Text', + 'System.Globalization', + 'System.IO', + 'System.IO.IsolatedStorage', + 'System.Messaging', + 'System.Net', + 'System.Net.Sockets', + 'System.NewXml', + 'System.NewXml.XPath', + 'System.NewXml.Xsl', + 'System.Reflection', + 'System.Reflection.Emit', + 'System.Resources', + 'System.Runtime.InteropServices', + 'System.Runtime.InteropServices.Expando', + 'System.Runtime.Remoting', + 'System.Runtime.Serialization', + 'System.Runtime.Serialization.Formatters', + 'System.Runtime.Serialization.Formatters.Binary', + 'System.Security', + 'System.Security.Cryptography', + 'System.Security.Cryptography.X509Certificates', + 'System.Security.Permissions', + 'System.Security.Policy', + 'System.Security.Principal', + 'System.ServiceProcess', + 'System.Text', + 'System.Text.RegularExpressions', + 'System.Threading', + 'System.Timers', + 'System.Web', + 'System.Web.Caching', + 'System.Web.Configuration', + 'System.Web.Security', + 'System.Web.Services', + 'System.Web.Services.Description', + 'System.Web.Services.Discovery', + 'System.Web.Services.Protocols', + 'System.Web.UI', + 'System.Web.UI.Design', + 'System.Web.UI.Design.WebControls', + 'System.Web.UI.Design.WebControls.ListControls', + 'System.Web.UI.HtmlControls', + 'System.Web.UI.WebControls', + 'System.WinForms', + 'System.WinForms.ComponentModel', + 'System.WinForms.Design', + 'System.Xml', + 'System.Xml.Serialization', + 'System.Xml.Serialization.Code', + 'System.Xml.Serialization.Schema' + ), + ), + 'SYMBOLS' => array( + '+', '-', '*', '?', '=', '/', '%', '&', '>', '<', '^', '!', '|', ':', + '(', ')', '{', '}', '[', ']' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0600FF;', + 2 => 'color: #FF8000; font-weight: bold;', + 3 => 'color: #008000;', + 4 => 'color: #FF0000;', + 5 => 'color: #000000;' + ), + 'COMMENTS' => array( + 1 => 'color: #008080; font-style: italic;', + 2 => 'color: #008080;', + 'MULTI' => 'color: #008080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #008080; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #808080;' + ), + 'NUMBERS' => array( + 0 => 'color: #FF0000;' + ), + 'METHODS' => array( + 1 => 'color: #0000FF;', + 2 => 'color: #0000FF;' + ), + 'SYMBOLS' => array( + 0 => 'color: #008000;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://www.google.com/search?q={FNAME}+msdn.microsoft.com', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.', + 2 => '::' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => "a-zA-Z0-9\$_\|\#>|^", + 'DISALLOWED_AFTER' => "a-zA-Z0-9_<\|%\\-" + ) + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/css-gen.cfg b/wp-content/plugins/highlight-source-pro/geshi/geshi/css-gen.cfg new file mode 100644 index 0000000..e69de29 diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/css.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/css.php new file mode 100644 index 0000000..43f834f --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/css.php @@ -0,0 +1,208 @@ + 'CSS', + 'COMMENT_SINGLE' => array(1 => '@'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"', "'"), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'aqua', 'azimuth', 'background-attachment', 'background-color', + 'background-image', 'background-position', 'background-repeat', + 'background', 'black', 'blue', 'border-bottom-color', + 'border-bottom-style', 'border-bottom-width', 'border-left-color', + 'border-left-style', 'border-left-width', 'border-right', + 'border-right-color', 'border-right-style', 'border-right-width', + 'border-top-color', 'border-top-style', + 'border-top-width','border-bottom', 'border-collapse', + 'border-left', 'border-width', 'border-color', 'border-spacing', + 'border-style', 'border-top', 'border', 'caption-side', 'clear', + 'clip', 'color', 'content', 'counter-increment', 'counter-reset', + 'cue-after', 'cue-before', 'cue', 'cursor', 'direction', 'display', + 'elevation', 'empty-cells', 'float', 'font-family', 'font-size', + 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', + 'font-weight', 'font', 'line-height', 'letter-spacing', + 'list-style', 'list-style-image', 'list-style-position', + 'list-style-type', 'margin-bottom', 'margin-left', 'margin-right', + 'margin-top', 'margin', 'marker-offset', 'marks', 'max-height', + 'max-width', 'min-height', 'min-width', 'orphans', 'outline', + 'outline-color', 'outline-style', 'outline-width', 'overflow', + 'padding-bottom', 'padding-left', 'padding-right', 'padding-top', + 'padding', 'page', 'page-break-after', 'page-break-before', + 'page-break-inside', 'pause-after', 'pause-before', 'pause', + 'pitch', 'pitch-range', 'play-during', 'position', 'quotes', + 'richness', 'right', 'size', 'speak-header', 'speak-numeral', + 'speak-punctuation', 'speak', 'speech-rate', 'stress', + 'table-layout', 'text-align', 'text-decoration', 'text-indent', + 'text-shadow', 'text-transform', 'top', 'unicode-bidi', + 'vertical-align', 'visibility', 'voice-family', 'volume', + 'white-space', 'widows', 'width', 'word-spacing', 'z-index', + 'bottom', 'left', 'height' + ), + 2 => array( + 'above', 'absolute', 'always', 'armenian', 'aural', 'auto', + 'avoid', 'baseline', 'behind', 'below', 'bidi-override', 'blink', + 'block', 'bold', 'bolder', 'both', 'capitalize', 'center-left', + 'center-right', 'center', 'circle', 'cjk-ideographic', + 'close-quote', 'collapse', 'condensed', 'continuous', 'crop', + 'crosshair', 'cross', 'cursive', 'dashed', 'decimal-leading-zero', + 'decimal', 'default', 'digits', 'disc', 'dotted', 'double', + 'e-resize', 'embed', 'extra-condensed', 'extra-expanded', + 'expanded', 'fantasy', 'far-left', 'far-right', 'faster', 'fast', + 'fixed', 'fuchsia', 'georgian', 'gray', 'green', 'groove', + 'hebrew', 'help', 'hidden', 'hide', 'higher', 'high', + 'hiragana-iroha', 'hiragana', 'icon', 'inherit', 'inline-table', + 'inline', 'inset', 'inside', 'invert', 'italic', 'justify', + 'katakana-iroha', 'katakana', 'landscape', 'larger', 'large', + 'left-side', 'leftwards', 'level', 'lighter', 'lime', + 'line-through', 'list-item', 'loud', 'lower-alpha', 'lower-greek', + 'lower-roman', 'lowercase', 'ltr', 'lower', 'low', 'maroon', + 'medium', 'message-box', 'middle', 'mix', 'monospace', 'n-resize', + 'narrower', 'navy', 'ne-resize', 'no-close-quote', + 'no-open-quote', 'no-repeat', 'none', 'normal', 'nowrap', + 'nw-resize', 'oblique', 'olive', 'once', 'open-quote', 'outset', + 'outside', 'overline', 'pointer', 'portrait', 'purple', 'px', + 'red', 'relative', 'repeat-x', 'repeat-y', 'repeat', 'rgb', + 'ridge', 'right-side', 'rightwards', 's-resize', 'sans-serif', + 'scroll', 'se-resize', 'semi-condensed', 'semi-expanded', + 'separate', 'serif', 'show', 'silent', 'silver', 'slow', 'slower', + 'small-caps', 'small-caption', 'smaller', 'soft', 'solid', + 'spell-out', 'square', 'static', 'status-bar', 'super', + 'sw-resize', 'table-caption', 'table-cell', 'table-column', + 'table-column-group', 'table-footer-group', 'table-header-group', + 'table-row', 'table-row-group', 'teal', 'text', 'text-bottom', + 'text-top', 'thick', 'thin', 'transparent', 'ultra-condensed', + 'ultra-expanded', 'underline', 'upper-alpha', 'upper-latin', + 'upper-roman', 'uppercase', 'url', 'visible', 'w-resize', 'wait', + 'white', 'wider', 'x-fast', 'x-high', 'x-large', 'x-loud', + 'x-low', 'x-small', 'x-soft', 'xx-large', 'xx-small', 'yellow', + 'yes' + ) + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', ':', ';' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight: bold;', + 2 => 'color: #993333;' + ), + 'COMMENTS' => array( + 1 => 'color: #a1a100;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + 0 => 'color: #cc00cc;', + 1 => 'color: #6666ff;', + 2 => 'color: #3333ff;', + 3 => 'color: #933;', + 4 => 'color: #933;', + ) + ), + 'URLS' => array( + 1 => '', + 2 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + 0 => '\#[a-zA-Z0-9\-_]+', + 1 => '\.[a-zA-Z0-9\-_]+', + 2 => ':[a-zA-Z0-9\-]+', + 3 => '(\d+|(\d*\.\d+))(em|ex|pt|px|cm|in|%)', + 4 => array( + GESHI_SEARCH => '(url\()([^)]+)(\))', + GESHI_REPLACE => '\\2', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3', + GESHI_MODIFIERS => 'si' + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + +if (isset($this) && is_a($this, 'GeSHi')) { + $language_data['STYLES']['NUMBERS'][0] = $language_data['STYLES']['REGEXPS'][3]; +} + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/d.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/d.php new file mode 100644 index 0000000..4850ab7 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/d.php @@ -0,0 +1,285 @@ + 'D', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"', "'", '`'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'while', + 'switch', + 'if', + 'foreach', + 'for', + 'goto', + 'return', + 'else', + 'do', + 'case', + 'continue', + 'break' + ), + 2 => array( + 'with', + 'union', + 'typeof', + 'typeid', + 'typedef', + 'try', + 'true', + 'throw', + 'this', + 'super', + 'pragma', + 'out', + 'null', + 'new', + 'module', + 'mixin', + 'is', + 'invariant', + 'interface', + 'inout', + 'in', + 'import', + 'function', + 'finally', + 'false', + 'extern', + 'delete', + 'delegate', + 'default', + 'catch', + 'cast', + 'body', + 'assert', + 'asm', + 'alias' + ), + 3 => array( + 'TypeInfo', + 'SwitchError', + 'OutOfMemoryException', + 'Object', + 'ModuleInfo', + 'Interface', + 'Exception', + 'Error', + 'ClassInfo', + 'ArrayBoundsError', + 'AssertError', + '_d_throw', + '_d_switch_ustring', + '_d_switch_string', + '_d_switch_dstring', + '_d_OutOfMemory', + '_d_obj_eq', + '_d_obj_cmp', + '_d_newclass', + '_d_newbitarray', + '_d_newarrayi', + '_d_new', + '_d_monitorrelease', + '_d_monitor_prolog', + '_d_monitor_handler', + '_d_monitorexit', + '_d_monitor_epilog', + '_d_monitorenter', + '_d_local_unwind', + '_d_isbaseof2', + '_d_isbaseof', + '_d_invariant', + '_d_interface_vtbl', + '_d_interface_cast', + '_d_framehandler', + '_d_exception_filter', + '_d_exception', + '_d_dynamic_cast', + '_d_delmemory', + '_d_delinterface', + '_d_delclass', + '_d_delarray', + '_d_criticalexit', + '_d_criticalenter', + '_d_create_exception_object', + '_d_callfinalizer', + '_d_arraysetlengthb', + '_d_arraysetlength', + '_d_arraysetbit2', + '_d_arraysetbit', + '_d_arraycopybit', + '_d_arraycopy', + '_d_arraycatn', + '_d_arraycatb', + '_d_arraycat', + '_d_arraycast_frombit', + '_d_arraycast', + '_d_arrayappendcb', + '_d_arrayappendc', + '_d_arrayappendb', + '_d_arrayappend', + ), + 4 => array( + 'wchar', + 'volatile', + 'void', + 'version', + 'ushort', + 'unittest', + 'ulong', + 'uint', + 'ucent', + 'ubyte', + 'template', + 'struct', + 'static', + 'synchronized', + 'size_t', + 'short', + 'real', + 'public', + 'protected', + 'private', + 'ptrdiff_t', + 'package', + 'override', + 'long', + 'int', + 'ireal', + 'ifloat', + 'idouble', + 'float', + 'final', + 'export', + 'enum', + 'double', + 'deprecated', + 'debug', + 'dchar', + 'creal', + 'const', + 'class', + 'char', + 'cfloat', + 'cent', + 'cdouble', + 'byte', + 'bool', + 'bit', + 'auto', + 'align', + 'abstract' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '?', '!', ';', ':', ',', '...', '..', + '+', '-', '*', '/', '%', '&', '|', '^', '<', '>', '=', '~', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => true, + 2 => true, + 3 => true, + 4 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #aaaadd; font-weight: bold;', + 4 => 'color: #993333;' + ), + 'COMMENTS' => array( + 1=> 'color: #808080; font-style: italic;', + 2=> 'color: #a1a100;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.', + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/delphi.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/delphi.php new file mode 100644 index 0000000..7f95859 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/delphi.php @@ -0,0 +1,280 @@ + 'Delphi', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('(*' => '*)', '{' => '}'), + 'CASE_KEYWORDS' => 0, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'Abstract', 'And', 'Array', 'As', 'Asm', 'At', 'Begin', 'Case', 'Class', + 'Const', 'Constructor', 'Contains', 'Destructor', 'DispInterface', 'Div', + 'Do', 'DownTo', 'Else', 'End', 'Except', 'File', 'Finalization', + 'Finally', 'For', 'Function', 'Goto', 'If', 'Implementation', 'In', + 'Inherited', 'Initialization', 'Inline', 'Interface', 'Is', 'Label', + 'Mod', 'Not', 'Object', 'Of', 'On', 'Or', 'Overload', 'Override', + 'Package', 'Packed', 'Private', 'Procedure', 'Program', 'Property', + 'Protected', 'Public', 'Published', 'Raise', 'Record', 'Repeat', + 'Requires', 'Resourcestring', 'Set', 'Shl', 'Shr', 'Then', 'ThreadVar', + 'To', 'Try', 'Type', 'Unit', 'Until', 'Uses', 'Var', 'Virtual', 'While', + 'With', 'Xor', 'assembler', 'cdecl', 'far', 'near', 'pascal', 'register', + 'safecall', 'stdcall', 'varargs' + ), + 2 => array( + 'nil', 'false', 'self', 'true', 'var', 'type', 'const' + ), + 3 => array( + 'Abs', 'AcquireExceptionObject', 'Addr', 'AnsiToUtf8', 'Append', 'ArcTan', + 'Assert', 'AssignFile', 'Assigned', 'BeginThread', 'BlockRead', + 'BlockWrite', 'Break', 'ChDir', 'Chr', 'Close', 'CloseFile', + 'CompToCurrency', 'CompToDouble', 'Concat', 'Continue', 'Copy', 'Cos', + 'Dec', 'Delete', 'Dispose', 'DoubleToComp', 'EndThread', 'EnumModules', + 'EnumResourceModules', 'Eof', 'Eoln', 'Erase', 'ExceptAddr', + 'ExceptObject', 'Exclude', 'Exit', 'Exp', 'FilePos', 'FileSize', + 'FillChar', 'Finalize', 'FindClassHInstance', 'FindHInstance', + 'FindResourceHInstance', 'Flush', 'Frac', 'FreeMem', 'Get8087CW', + 'GetDir', 'GetLastError', 'GetMem', 'GetMemoryManager', + 'GetModuleFileName', 'GetVariantManager', 'Halt', 'Hi', 'High', + 'IOResult', 'Inc', 'Include', 'Initialize', 'Insert', 'Int', + 'IsMemoryManagerSet', 'IsVariantManagerSet', 'Length', 'Ln', 'Lo', 'Low', + 'MkDir', 'Move', 'New', 'Odd', 'OleStrToStrVar', 'OleStrToString', 'Ord', + 'PUCS4Chars', 'ParamCount', 'ParamStr', 'Pi', 'Pos', 'Pred', 'Ptr', + 'Random', 'Randomize', 'Read', 'ReadLn', 'ReallocMem', + 'ReleaseExceptionObject', 'Rename', 'Reset', 'Rewrite', 'RmDir', 'Round', + 'RunError', 'Seek', 'SeekEof', 'SeekEoln', 'Set8087CW', 'SetLength', + 'SetLineBreakStyle', 'SetMemoryManager', 'SetString', 'SetTextBuf', + 'SetVariantManager', 'Sin', 'SizeOf', 'Slice', 'Sqr', 'Sqrt', 'Str', + 'StringOfChar', 'StringToOleStr', 'StringToWideChar', 'Succ', 'Swap', + 'Trunc', 'Truncate', 'TypeInfo', 'UCS4StringToWideString', 'UTF8Decode', + 'UTF8Encode', 'UnicodeToUtf8', 'UniqueString', 'UpCase', 'Utf8ToAnsi', + 'Utf8ToUnicode', 'Val', 'VarArrayRedim', 'VarClear', + 'WideCharLenToStrVar', 'WideCharLenToString', 'WideCharToStrVar', + 'WideCharToString', 'WideStringToUCS4String', 'Write', 'WriteLn', + + 'Abort', 'AddExitProc', 'AddTerminateProc', 'AdjustLineBreaks', 'AllocMem', + 'AnsiCompareFileName', 'AnsiCompareStr', 'AnsiCompareText', + 'AnsiDequotedStr', 'AnsiExtractQuotedStr', 'AnsiLastChar', + 'AnsiLowerCase', 'AnsiLowerCaseFileName', 'AnsiPos', 'AnsiQuotedStr', + 'AnsiSameStr', 'AnsiSameText', 'AnsiStrComp', 'AnsiStrIComp', + 'AnsiStrLComp', 'AnsiStrLIComp', 'AnsiStrLastChar', 'AnsiStrLower', + 'AnsiStrPos', 'AnsiStrRScan', 'AnsiStrScan', 'AnsiStrUpper', + 'AnsiUpperCase', 'AnsiUpperCaseFileName', 'AppendStr', 'AssignStr', + 'Beep', 'BoolToStr', 'ByteToCharIndex', 'ByteToCharLen', 'ByteType', + 'CallTerminateProcs', 'ChangeFileExt', 'CharLength', 'CharToByteIndex', + 'CharToByteLen', 'CompareMem', 'CompareStr', 'CompareText', 'CreateDir', + 'CreateGUID', 'CurrToStr', 'CurrToStrF', 'CurrentYear', 'Date', + 'DateTimeToFileDate', 'DateTimeToStr', 'DateTimeToString', + 'DateTimeToSystemTime', 'DateTimeToTimeStamp', 'DateToStr', 'DayOfWeek', + 'DecodeDate', 'DecodeDateFully', 'DecodeTime', 'DeleteFile', + 'DirectoryExists', 'DiskFree', 'DiskSize', 'DisposeStr', 'EncodeDate', + 'EncodeTime', 'ExceptionErrorMessage', 'ExcludeTrailingBackslash', + 'ExcludeTrailingPathDelimiter', 'ExpandFileName', 'ExpandFileNameCase', + 'ExpandUNCFileName', 'ExtractFileDir', 'ExtractFileDrive', + 'ExtractFileExt', 'ExtractFileName', 'ExtractFilePath', + 'ExtractRelativePath', 'ExtractShortPathName', 'FileAge', 'FileClose', + 'FileCreate', 'FileDateToDateTime', 'FileExists', 'FileGetAttr', + 'FileGetDate', 'FileIsReadOnly', 'FileOpen', 'FileRead', 'FileSearch', + 'FileSeek', 'FileSetAttr', 'FileSetDate', 'FileSetReadOnly', 'FileWrite', + 'FinalizePackage', 'FindClose', 'FindCmdLineSwitch', 'FindFirst', + 'FindNext', 'FloatToCurr', 'FloatToDateTime', 'FloatToDecimal', + 'FloatToStr', 'FloatToStrF', 'FloatToText', 'FloatToTextFmt', + 'FmtLoadStr', 'FmtStr', 'ForceDirectories', 'Format', 'FormatBuf', + 'FormatCurr', 'FormatDateTime', 'FormatFloat', 'FreeAndNil', + 'GUIDToString', 'GetCurrentDir', 'GetEnvironmentVariable', + 'GetFileVersion', 'GetFormatSettings', 'GetLocaleFormatSettings', + 'GetModuleName', 'GetPackageDescription', 'GetPackageInfo', 'GetTime', + 'IncAMonth', 'IncMonth', 'IncludeTrailingBackslash', + 'IncludeTrailingPathDelimiter', 'InitializePackage', 'IntToHex', + 'IntToStr', 'InterlockedDecrement', 'InterlockedExchange', + 'InterlockedExchangeAdd', 'InterlockedIncrement', 'IsDelimiter', + 'IsEqualGUID', 'IsLeapYear', 'IsPathDelimiter', 'IsValidIdent', + 'Languages', 'LastDelimiter', 'LoadPackage', 'LoadStr', 'LowerCase', + 'MSecsToTimeStamp', 'NewStr', 'NextCharIndex', 'Now', 'OutOfMemoryError', + 'QuotedStr', 'RaiseLastOSError', 'RaiseLastWin32Error', 'RemoveDir', + 'RenameFile', 'ReplaceDate', 'ReplaceTime', 'SafeLoadLibrary', + 'SameFileName', 'SameText', 'SetCurrentDir', 'ShowException', 'Sleep', + 'StrAlloc', 'StrBufSize', 'StrByteType', 'StrCat', 'StrCharLength', + 'StrComp', 'StrCopy', 'StrDispose', 'StrECopy', 'StrEnd', 'StrFmt', + 'StrIComp', 'StrLCat', 'StrLComp', 'StrLCopy', 'StrLFmt', 'StrLIComp', + 'StrLen', 'StrLower', 'StrMove', 'StrNew', 'StrNextChar', 'StrPCopy', + 'StrPLCopy', 'StrPas', 'StrPos', 'StrRScan', 'StrScan', 'StrToBool', + 'StrToBoolDef', 'StrToCurr', 'StrToCurrDef', 'StrToDate', 'StrToDateDef', + 'StrToDateTime', 'StrToDateTimeDef', 'StrToFloat', 'StrToFloatDef', + 'StrToInt', 'StrToInt64', 'StrToInt64Def', 'StrToIntDef', 'StrToTime', + 'StrToTimeDef', 'StrUpper', 'StringReplace', 'StringToGUID', 'Supports', + 'SysErrorMessage', 'SystemTimeToDateTime', 'TextToFloat', 'Time', + 'TimeStampToDateTime', 'TimeStampToMSecs', 'TimeToStr', 'Trim', + 'TrimLeft', 'TrimRight', 'TryEncodeDate', 'TryEncodeTime', + 'TryFloatToCurr', 'TryFloatToDateTime', 'TryStrToBool', 'TryStrToCurr', + 'TryStrToDate', 'TryStrToDateTime', 'TryStrToFloat', 'TryStrToInt', + 'TryStrToInt64', 'TryStrToTime', 'UnloadPackage', 'UpperCase', + 'WideCompareStr', 'WideCompareText', 'WideFmtStr', 'WideFormat', + 'WideFormatBuf', 'WideLowerCase', 'WideSameStr', 'WideSameText', + 'WideUpperCase', 'Win32Check', 'WrapText', + + 'ActivateClassGroup', 'AllocateHwnd', 'BinToHex', 'CheckSynchronize', + 'CollectionsEqual', 'CountGenerations', 'DeallocateHwnd', 'EqualRect', + 'ExtractStrings', 'FindClass', 'FindGlobalComponent', 'GetClass', + 'GroupDescendantsWith', 'HexToBin', 'IdentToInt', + 'InitInheritedComponent', 'IntToIdent', 'InvalidPoint', + 'IsUniqueGlobalComponentName', 'LineStart', 'ObjectBinaryToText', + 'ObjectResourceToText', 'ObjectTextToBinary', 'ObjectTextToResource', + 'PointsEqual', 'ReadComponentRes', 'ReadComponentResEx', + 'ReadComponentResFile', 'Rect', 'RegisterClass', 'RegisterClassAlias', + 'RegisterClasses', 'RegisterComponents', 'RegisterIntegerConsts', + 'RegisterNoIcon', 'RegisterNonActiveX', 'SmallPoint', 'StartClassGroup', + 'TestStreamFormat', 'UnregisterClass', 'UnregisterClasses', + 'UnregisterIntegerConsts', 'UnregisterModuleClasses', + 'WriteComponentResFile', + + 'ArcCos', 'ArcCosh', 'ArcCot', 'ArcCotH', 'ArcCsc', 'ArcCscH', 'ArcSec', + 'ArcSecH', 'ArcSin', 'ArcSinh', 'ArcTan2', 'ArcTanh', 'Ceil', + 'CompareValue', 'Cosecant', 'Cosh', 'Cot', 'CotH', 'Cotan', 'Csc', 'CscH', + 'CycleToDeg', 'CycleToGrad', 'CycleToRad', 'DegToCycle', 'DegToGrad', + 'DegToRad', 'DivMod', 'DoubleDecliningBalance', 'EnsureRange', 'Floor', + 'Frexp', 'FutureValue', 'GetExceptionMask', 'GetPrecisionMode', + 'GetRoundMode', 'GradToCycle', 'GradToDeg', 'GradToRad', 'Hypot', + 'InRange', 'IntPower', 'InterestPayment', 'InterestRate', + 'InternalRateOfReturn', 'IsInfinite', 'IsNan', 'IsZero', 'Ldexp', 'LnXP1', + 'Log10', 'Log2', 'LogN', 'Max', 'MaxIntValue', 'MaxValue', 'Mean', + 'MeanAndStdDev', 'Min', 'MinIntValue', 'MinValue', 'MomentSkewKurtosis', + 'NetPresentValue', 'Norm', 'NumberOfPeriods', 'Payment', 'PeriodPayment', + 'Poly', 'PopnStdDev', 'PopnVariance', 'Power', 'PresentValue', + 'RadToCycle', 'RadToDeg', 'RadToGrad', 'RandG', 'RandomRange', 'RoundTo', + 'SLNDepreciation', 'SYDDepreciation', 'SameValue', 'Sec', 'SecH', + 'Secant', 'SetExceptionMask', 'SetPrecisionMode', 'SetRoundMode', 'Sign', + 'SimpleRoundTo', 'SinCos', 'Sinh', 'StdDev', 'Sum', 'SumInt', + 'SumOfSquares', 'SumsAndSquares', 'Tan', 'Tanh', 'TotalVariance', + 'Variance' + ), + 4 => array( + 'AnsiChar', 'AnsiString', 'Bool', 'Boolean', 'Byte', 'ByteBool', 'Cardinal', 'Char', + 'Comp', 'Currency', 'DWORD', 'Double', 'Extended', 'Int64', 'Integer', 'IUnknown', + 'LongBool', 'LongInt', 'LongWord', 'PAnsiChar', 'PAnsiString', 'PBool', 'PBoolean', 'PByte', + 'PByteArray', 'PCardinal', 'PChar', 'PComp', 'PCurrency', 'PDWORD', 'PDate', 'PDateTime', + 'PDouble', 'PExtended', 'PInt64', 'PInteger', 'PLongInt', 'PLongWord', 'Pointer', 'PPointer', + 'PShortInt', 'PShortString', 'PSingle', 'PSmallInt', 'PString', 'PHandle', 'PVariant', 'PWord', + 'PWordArray', 'PWordBool', 'PWideChar', 'PWideString', 'Real', 'Real48', 'ShortInt', 'ShortString', + 'Single', 'SmallInt', 'String', 'TClass', 'TDate', 'TDateTime', 'TextFile', 'THandle', + 'TObject', 'TTime', 'Variant', 'WideChar', 'WideString', 'Word', 'WordBool' + ), + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'SYMBOLS' => array( + 0 => array('(', ')', '[', ']'), + 1 => array('.', ',', ':', ';'), + 2 => array('@', '^'), + 3 => array('=', '+', '-', '*', '/') + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight: bold;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;', + 4 => 'color: #993333;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;' + ), + 'REGEXPS' => array( + 0 => 'color: #9ac;', + 1 => 'color: #ff0000;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;', + 1 => 'color: #66cc66;', + 2 => 'color: #66cc66;', + 3 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + 0 => '\$[0-9a-fA-F]+', + 1 => '\#\$?[0-9]{1,3}' + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 2 +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/diff.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/diff.php new file mode 100644 index 0000000..6acd308 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/diff.php @@ -0,0 +1,184 @@ + 'Diff', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => ' ', + 'KEYWORDS' => array( + 1 => array( + '\ No newline at end of file' + ), + 2 => array( + '***************' /* This only seems to works in some cases? */ + ), + ), + 'SYMBOLS' => array( + ), + 'CASE_SENSITIVE' => array( + 1 => false, + 2 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #aaaaaa; font-style: italic;', + 2 => 'color: #dd6611;', + ), + 'COMMENTS' => array( + ), + 'ESCAPE_CHAR' => array( + 0 => '' + ), + 'BRACKETS' => array( + 0 => '' + ), + 'STRINGS' => array( + 0 => '' + ), + 'NUMBERS' => array( + 0 => '' + ), + 'METHODS' => array( + 0 => '' + ), + 'SYMBOLS' => array( + 0 => '' + ), + 'SCRIPT' => array( + 0 => '' + ), + 'REGEXPS' => array( + 0 => 'color: #440088;', + 1 => 'color: #991111;', + 2 => 'color: #00b000;', + 3 => 'color: #888822;', + 4 => 'color: #888822;', + 5 => 'color: #0011dd;', + 6 => 'color: #440088;', + 7 => 'color: #991111;', + 8 => 'color: #00b000;', + 9 => 'color: #888822;', + ), + ), + 'URLS' => array( + ), + 'OOLANG' => false, + 'OBJECT_SPLITTER' => '', + 'REGEXPS' => array( + 0 => "[0-9,]+[acd][0-9,]+", + 1 => array( + GESHI_SEARCH => '^\\<.*$', + GESHI_REPLACE => '\\0', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 2 => array( + GESHI_SEARCH => '^\\>.*$', + GESHI_REPLACE => '\\0', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 3 => array( + GESHI_SEARCH => '^[\\-]{3}\\s.*$', + GESHI_REPLACE => '\\0', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 4 => array( + GESHI_SEARCH => '^(\\+){3}\\s.*$', + GESHI_REPLACE => '\\0', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 5 => array( + GESHI_SEARCH => '^\\!.*$', + GESHI_REPLACE => '\\0', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 6 => array( + GESHI_SEARCH => '^[\\@]{2}.*$', + GESHI_REPLACE => '\\0', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 7 => array( + GESHI_SEARCH => '^\\-.*$', + GESHI_REPLACE => '\\0', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 8 => array( + GESHI_SEARCH => '^\\+.*$', + GESHI_REPLACE => '\\0', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 9 => array( + GESHI_SEARCH => '^(\\*){3}\\s.*$', + GESHI_REPLACE => '\\0', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/div.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/div.php new file mode 100644 index 0000000..2157787 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/div.php @@ -0,0 +1,126 @@ + 'DIV', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'while','until','to','switch','step','return','repeat','loop','if','from','frame','for','end','elseif', + 'else','default','debug','continue','clone','case','break','begin' + ), + 2 => array( + 'xor','whoami','type','sizeof','pointer','or','offset','not','neg','mod','id','dup','and','_ne','_lt', + '_le','_gt','_ge','_eq' + ), + 3 => array( + 'setup_program','program','process','private','local','import','global','function','const', + 'compiler_options' + ), + 4 => array( + 'word','struct','string','int','byte' + ), + ), + 'SYMBOLS' => array( + '(',')','[',']','=','+','-','*','/','!','%','^','&',':',';',',','<','>' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0040b1;', + 2 => 'color: #000000;', + 3 => 'color: #000066; font-weight: bold;', + 4 => 'color: #993333;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => '' + ), + 'BRACKETS' => array( + 0 => 'color: #44aa44;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 0 => 'color: #202020;', + ), + 'SYMBOLS' => array( + 0 => 'color: #44aa44;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTER' => '', + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/dos.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/dos.php new file mode 100644 index 0000000..b57e7bc --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/dos.php @@ -0,0 +1,185 @@ + 'DOS', + 'COMMENT_SINGLE' => array(1 =>'REM', 2 => '@REM'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /* Flow control keywords */ + 1 => array( + 'if', 'else', 'goto', + 'for', 'in', 'do', + 'call', 'exit' + ), + /* IF statement keywords */ + 2 => array( + 'not', 'exist', 'errorlevel', + 'defined', + 'equ', 'neq', 'lss', 'leq', 'gtr', 'geq' + ), + /* Internal commands */ + 3 => array( + 'shift', + 'cd', 'dir', 'echo', + 'setlocal', 'endlocal', 'set', + 'pause' + ), + /* Special files */ + + 4 => array( + 'prn', 'nul', 'lpt3', 'lpt2', 'lpt1', 'con', + 'com4', 'com3', 'com2', 'com1', 'aux' + ) + ), + 'SYMBOLS' => array( + '(', ')' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00b100; font-weight: bold;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #b1b100; font-weight: bold;', + 4 => 'color: #0000ff; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #33cc33;', + 1 => 'color: #33cc33;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + 0 => 'color: #b100b1; font-weight: bold;', + 1 => 'color: #448844;', + 2 => 'color: #448888;' + ) + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'URLS' => array( + 1 => 'http://www.ss64.com/nt/{FNAME}.html', + 2 => 'http://www.ss64.com/nt/{FNAME}.html', + 3 => 'http://www.ss64.com/nt/{FNAME}.html', + 4 => 'http://www.ss64.com/nt/{FNAME}.html' + ), + 'REGEXPS' => array( + /* Label */ + 0 => array( +/* GESHI_SEARCH => '((?si:[@\s]+GOTO\s+|\s+:)[\s]*)((? '((?si:[@\s]+GOTO\s+|\s+:)[\s]*)((? '\\2', + GESHI_MODIFIERS => 'si', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ), + /* Variable assignement */ + 1 => array( +/* GESHI_SEARCH => '(SET[\s]+(?si:/A[\s]+|/P[\s]+|))([^=\s\n]+)([\s]*=)',*/ + GESHI_SEARCH => '(SET[\s]+(?si:/A[\s]+|/P[\s]+|))([^=\n]+)([\s]*=)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'si', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3' + ), + /* Arguments or variable evaluation */ + 2 => array( +/* GESHI_SEARCH => '(%)([\d*]|[^%\s]*(?=%))((? '(%)([\d*]|[^%]*(?=%))((? '\\2', + GESHI_MODIFIERS => 'si', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3' + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/dot.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/dot.php new file mode 100644 index 0000000..15709b7 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/dot.php @@ -0,0 +1,158 @@ + 'dot', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array('URL', 'arrowhead', 'arrowsize', 'arrowtail', 'bb', 'bgcolor', 'bottomlabel', + 'center', 'clusterrank', 'color', 'comment', 'constraint', 'decorate', + 'dir', 'distortion', 'fillcolor', 'fixedsize', 'fontcolor', + 'fontname', 'fontsize', 'group', 'headclip', 'headlabel', 'headport', + 'height', 'id', 'label', 'labelangle', 'labeldistance', 'labelfontcolor', + 'labelfontname', 'labelfontsize', 'layer', 'layers', 'margin', 'mclimit', + 'minlen', 'nodesep', 'nslimit', 'ordering', 'orientation', 'page', + 'pagedir', 'peripheries', 'port_label_distance', 'quantum', 'rank', 'rankdir', + 'ranksep', 'ratio', 'regular', 'rotate', 'samehead', 'sametail', 'searchsize', + 'shape', 'shapefile', 'showboxes', 'sides', 'size', 'skew', 'style', + 'tailclip', 'taillabel', 'tailport', 'toplabel', 'weight', 'width' + ), + 2 => array('node', 'graph', 'digraph', 'strict', 'edge', 'subgraph'), + 3 => array('FALSE', 'Mcircle', 'Mdiamond', 'Mrecord', 'Msquare', 'TRUE', 'auto', 'back', + 'bold', 'both', 'box', 'circle', 'compress', 'dashed', 'diamond', 'dot', + 'dotted', 'doublecircle', 'doubleoctagon', 'egg', 'ellipse', 'epsf', 'false', + 'fill', 'filled', 'forward', 'global', 'hexagon', 'house', 'inv', 'invdot', + 'invhouse', 'invis', 'invodot', 'invtrapezium', 'invtriangle', 'local', 'max', + 'min', 'none', 'normal', 'octagon', 'odot', 'out', 'parallelogram', 'plaintext', + 'polygon', 'record', 'same', 'solid', 'trapezium', 'triangle', 'tripleoctagon', + 'true' + ), + 4 => array('aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'black', + 'blanchedalmond', 'blue', 'blueviolet', 'brown', 'burlywood', 'cadetblue', + 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', + 'cyan', 'darkgoldenrod', 'darkgreen', 'darkkhaki', 'darkolivegreen', + 'darkorange', 'darkorchid', 'darksalmon', 'darkseagreen', 'darkslateblue', + 'darkslategray', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', + 'dimgray', 'dodgerblue', 'firebrick', 'forestgreen', 'gainsboro', 'ghostwhite', + 'gold', 'goldenrod', 'gray', 'green', 'greenyellow', 'honeydew', 'hotpink', + 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', + 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcyan', 'lightgoldenrod', + 'lightgoldenrodyellow', 'lightgray', 'lightpink', 'lightsalmon', + 'lightseagreen', 'lightskyblue', 'lightslateblue', 'lightslategray', + 'lightyellow', 'limegreen', 'linen', 'magenta', 'maroon', 'mediumaquamarine', + 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', + 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', + 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'navy', + 'navyblue', 'oldlace', 'olivedrab', 'oralwhite', 'orange', 'orangered', + 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', + 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'purple', + 'red', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'salmon2', 'sandybrown', + 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'snow', + 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', + 'violetred', 'wheat', 'white', 'whitesmoke', 'yellow', 'yellowgreen' + ) + ), + 'SYMBOLS' => array( + '[', ']', '{', '}', '-', '+', '*', '/', '<', '>', '!', '~', '%', '&', '|', '=' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000066;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #993333;', + 4 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #339933;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #af624d; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'METHODS' => array( + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ), + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTER' => '', + 'REGEXPS' => array(), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + 1 => true, + 2 => true, + 3 => true + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/eiffel.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/eiffel.php new file mode 100644 index 0000000..a81d873 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/eiffel.php @@ -0,0 +1,394 @@ + 'Eiffel', + 'COMMENT_SINGLE' => array(1 => '--'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '%', + 'KEYWORDS' => array( + 1 => array( + 'separate', + 'invariant', + 'inherit', + 'indexing', + 'feature', + 'expanded', + 'deferred', + 'class' + ), + 2 => array( + 'xor', + 'when', + 'variant', + 'until', + 'unique', + 'undefine', + 'then', + 'strip', + 'select', + 'retry', + 'rescue', + 'require', + 'rename', + 'reference', + 'redefine', + 'prefix', + 'or', + 'once', + 'old', + 'obsolete', + 'not', + 'loop', + 'local', + 'like', + 'is', + 'inspect', + 'infix', + 'include', + 'implies', + 'if', + 'frozen', + 'from', + 'external', + 'export', + 'ensure', + 'end', + 'elseif', + 'else', + 'do', + 'creation', + 'create', + 'check', + 'as', + 'and', + 'alias', + 'agent' + ), + 3 => array( + 'Void', + 'True', + 'Result', + 'Precursor', + 'False', + 'Current' + ), + 4 => array( + 'UNIX_SIGNALS', + 'UNIX_FILE_INFO', + 'UNBOUNDED', + 'TWO_WAY_TREE_CURSOR', + 'TWO_WAY_TREE', + 'TWO_WAY_SORTED_SET', + 'TWO_WAY_LIST', + 'TWO_WAY_CURSOR_TREE', + 'TWO_WAY_CIRCULAR', + 'TWO_WAY_CHAIN_ITERATOR', + 'TUPLE', + 'TREE', + 'TRAVERSABLE', + 'TO_SPECIAL', + 'THREAD_CONTROL', + 'THREAD_ATTRIBUTES', + 'THREAD', + 'TABLE', + 'SUBSET', + 'STRING_HANDLER', + 'STRING', + 'STREAM', + 'STORABLE', + 'STD_FILES', + 'STACK', + 'SPECIAL', + 'SORTED_TWO_WAY_LIST', + 'SORTED_STRUCT', + 'SORTED_LIST', + 'SINGLE_MATH', + 'SET', + 'SEQUENCE', + 'SEQ_STRING', + 'SEMAPHORE', + 'ROUTINE', + 'RESIZABLE', + 'RECURSIVE_TREE_CURSOR', + 'RECURSIVE_CURSOR_TREE', + 'REAL_REF', + 'REAL', + 'RAW_FILE', + 'RANDOM', + 'QUEUE', + 'PROXY', + 'PROFILING_SETTING', + 'PROCEDURE', + 'PRIORITY_QUEUE', + 'PRIMES', + 'PRECOMP', + 'POINTER_REF', + 'POINTER', + 'PLATFORM', + 'PLAIN_TEXT_FILE', + 'PATH_NAME', + 'PART_SORTED_TWO_WAY_LIST', + 'PART_SORTED_SET', + 'PART_SORTED_LIST', + 'PART_COMPARABLE', + 'OPERATING_ENVIRONMENT', + 'ONCE_CONTROL', + 'OBJECT_OWNER', + 'OBJECT_CONTROL', + 'NUMERIC', + 'NONE', + 'MUTEX', + 'MULTI_ARRAY_LIST', + 'MULTAR_LIST_CURSOR', + 'MEMORY', + 'MEM_INFO', + 'MEM_CONST', + 'MATH_CONST', + 'LIST', + 'LINKED_TREE_CURSOR', + 'LINKED_TREE', + 'LINKED_STACK', + 'LINKED_SET', + 'LINKED_QUEUE', + 'LINKED_PRIORITY_QUEUE', + 'LINKED_LIST_CURSOR', + 'LINKED_LIST', + 'LINKED_CURSOR_TREE', + 'LINKED_CIRCULAR', + 'LINKABLE', + 'LINEAR_ITERATOR', + 'LINEAR', + 'ITERATOR', + 'IO_MEDIUM', + 'INTERNAL', + 'INTEGER_REF', + 'INTEGER_INTERVAL', + 'INTEGER', + 'INFINITE', + 'INDEXABLE', + 'IDENTIFIED_CONTROLLER', + 'IDENTIFIED', + 'HIERARCHICAL', + 'HEAP_PRIORITY_QUEUE', + 'HASHABLE', + 'HASH_TABLE_CURSOR', + 'HASH_TABLE', + 'GENERAL', + 'GC_INFO', + 'FUNCTION', + 'FORMAT_INTEGER', + 'FORMAT_DOUBLE', + 'FIXED_TREE', + 'FIXED_LIST', + 'FIXED', + 'FINITE', + 'FILE_NAME', + 'FILE', + 'FIBONACCI', + 'EXECUTION_ENVIRONMENT', + 'EXCEPTIONS', + 'EXCEP_CONST', + 'DYNAMIC_TREE', + 'DYNAMIC_LIST', + 'DYNAMIC_CIRCULAR', + 'DYNAMIC_CHAIN', + 'DOUBLE_REF', + 'DOUBLE_MATH', + 'DOUBLE', + 'DISPENSER', + 'DIRECTORY_NAME', + 'DIRECTORY', + 'DECLARATOR', + 'DEBUG_OUTPUT', + 'CURSOR_TREE_ITERATOR', + 'CURSOR_TREE', + 'CURSOR_STRUCTURE', + 'CURSOR', + 'COUNTABLE_SEQUENCE', + 'COUNTABLE', + 'CONTAINER', + 'CONSOLE', + 'CONDITION_VARIABLE', + 'COMPARABLE_STRUCT', + 'COMPARABLE_SET', + 'COMPARABLE', + 'COMPACT_TREE_CURSOR', + 'COMPACT_CURSOR_TREE', + 'COLLECTION', + 'CIRCULAR_CURSOR', + 'CIRCULAR', + 'CHARACTER_REF', + 'CHARACTER', + 'CHAIN', + 'CELL', + 'BOX', + 'BOUNDED_STACK', + 'BOUNDED_QUEUE', + 'BOUNDED', + 'BOOLEAN_REF', + 'BOOLEAN', + 'BOOL_STRING', + 'BIT_REF', + 'BINARY_TREE', + 'BINARY_SEARCH_TREE_SET', + 'BINARY_SEARCH_TREE', + 'BILINEAR', + 'BI_LINKABLE', + 'BASIC_ROUTINES', + 'BAG', + 'ASCII', + 'ARRAYED_TREE', + 'ARRAYED_STACK', + 'ARRAYED_QUEUE', + 'ARRAYED_LIST_CURSOR', + 'ARRAYED_LIST', + 'ARRAYED_CIRCULAR', + 'ARRAY2', + 'ARRAY', + 'ARGUMENTS', + 'ANY', + 'ACTIVE' + ), + 5 => array( + 'yes', + 'visible', + 'trace', + 'system', + 'root', + 'profile', + 'override_cluster', + 'object', + 'no', + 'multithreaded', + 'msil_generation_type', + 'line_generation', + 'library', + 'inlining_size', + 'inlining', + 'include_path', + 'il_verifiable', + 'exclude', + 'exception_trace', + 'dynamic_runtime', + 'dotnet_naming_convention', + 'disabled_debug', + 'default', + 'debug', + 'dead_code_removal', + 'console_application', + 'cluster', + 'cls_compliant', + 'check_vape', + 'assertion', + 'array_optimization', + 'all', + 'address_expression' + ), + ), + 'SYMBOLS' => array( + '+', '-', '*', '?', '=', '/', '%', '&', '>', '<', '^', '!', '|', ':', + '(', ')', '{', '}', '[', ']', '#' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + 4 => true, + 5 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0600FF; font-weight: bold;', + 2 => 'color: #0600FF; font-weight: bold;', + 3 => 'color: #800080;', + 4 => 'color: #800000', + 5 => 'color: #603000;' + ), + 'COMMENTS' => array( + 1 => 'color: #008000; font-style: italic;', + 'MULTI' => '' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #005070; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #FF0000;' + ), + 'STRINGS' => array( + 0 => 'color: #0080A0;' + ), + 'NUMBERS' => array( + 0 => 'color: #FF0000;' + ), + 'METHODS' => array( + 1 => 'color: #000060;', + 2 => 'color: #000050;' + ), + 'SYMBOLS' => array( + 0 => 'color: #600000;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => 'http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+{FNAME}&btnI=I%27m+Feeling+Lucky' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/fortran.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/fortran.php new file mode 100644 index 0000000..6b4e3c3 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/fortran.php @@ -0,0 +1,156 @@ +'Fortran', + 'COMMENT_SINGLE'=> array(1 =>'!',2=>'Cf2py'), + 'COMMENT_MULTI'=> array(), + 'CASE_KEYWORDS'=> GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS'=> array("'",'"'), + 'ESCAPE_CHAR'=>'\\', + 'KEYWORDS'=> array( + 1 => array( + 'allocate','block','call','case','contains','continue','cycle','deallocate', + 'default','do','else','elseif','elsewhere','end','enddo','endif','endwhere', + 'entry','exit','function','go','goto','if','interface','module','nullify','only', + 'operator','procedure','program','recursive','return','select','stop', + 'subroutine','then','to','where','while', + 'access','action','advance','blank','blocksize','carriagecontrol', + 'delim','direct','eor','err','exist','file','flen','fmt','form','formatted', + 'iostat','name','named','nextrec','nml','number','opened','pad','position', + 'readwrite','recl','sequential','status','unformatted','unit' + ), + 2 => array( + '.AND.','.EQ.','.EQV.','.GE.','.GT.','.LE.','.LT.','.NE.','.NEQV.','.NOT.', + '.OR.','.TRUE.','.FALSE.' + ), + 3 => array( + 'allocatable','character','common','complex','data','dimension','double', + 'equivalence','external','implicit','in','inout','integer','intent','intrinsic', + 'kind','logical','namelist','none','optional','out','parameter','pointer', + 'private','public','real','result','save','sequence','target','type','use' + ), + 4 => array( + 'abs','achar','acos','adjustl','adjustr','aimag','aint','all','allocated', + 'anint','any','asin','atan','atan2','bit_size','break','btest','carg', + 'ceiling','char','cmplx','conjg','cos','cosh','cpu_time','count','cshift', + 'date_and_time','dble','digits','dim','dot_product','dprod dvchk', + 'eoshift','epsilon','error','exp','exponent','floor','flush','fraction', + 'getcl','huge','iachar','iand','ibclr','ibits','ibset','ichar','ieor','index', + 'int','intrup','invalop','ior','iostat_msg','ishft','ishftc','lbound', + 'len','len_trim','lge','lgt','lle','llt','log','log10','matmul','max','maxexponent', + 'maxloc','maxval','merge','min','minexponent','minloc','minval','mod','modulo', + 'mvbits','nbreak','ndperr','ndpexc','nearest','nint','not','offset','ovefl', + 'pack','precfill','precision','present','product','prompt','radix', + 'random_number','random_seed','range','repeat','reshape','rrspacing', + 'scale','scan','segment','selected_int_kind','selected_real_kind', + 'set_exponent','shape','sign','sin','sinh','size','spacing','spread','sqrt', + 'sum system','system_clock','tan','tanh','timer','tiny','transfer','transpose', + 'trim','ubound','undfl','unpack','val','verify' + ), + ), + 'SYMBOLS'=> array( + '(',')','{','}','[',']','=','+','-','*','/','!','%','^','&',':' + ), + 'CASE_SENSITIVE'=> array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES'=> array( + 'KEYWORDS'=> array( + 1 =>'color: #b1b100;', + 2 =>'color: #000000; font-weight: bold;', + 3 =>'color: #000066;', + 4 =>'color: #993333;' + ), + 'COMMENTS'=> array( + 1 =>'color: #808080; font-style: italic;', + 2 =>'color: #339933;', + 'MULTI'=>'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR'=> array( + 0 =>'color: #000099; font-weight: bold;' + ), + 'BRACKETS'=> array( + 0 =>'color: #66cc66;' + ), + 'STRINGS'=> array( + 0 =>'color: #ff0000;' + ), + 'NUMBERS'=> array( + 0 =>'color: #cc66cc;' + ), + 'METHODS'=> array( + 1 =>'color: #202020;', + 2 =>'color: #202020;' + ), + 'SYMBOLS'=> array( + 0 =>'color: #66cc66;' + ), + 'REGEXPS'=> array( + ), + 'SCRIPT'=> array( + ) + ), + 'URLS'=> array( + 1 =>'', + 2 =>'', + 3 =>'', + 4 =>'' + ), + 'OOLANG'=> true, + 'OBJECT_SPLITTERS'=> array( + 1 =>'.', + 2 =>'::' + ), + 'REGEXPS'=> array( + ), + 'STRICT_MODE_APPLIES'=> GESHI_NEVER, + 'SCRIPT_DELIMITERS'=> array( + ), + 'HIGHLIGHT_STRICT_BLOCK'=> array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/freebasic.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/freebasic.php new file mode 100644 index 0000000..4276938 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/freebasic.php @@ -0,0 +1,137 @@ + 'FreeBasic', + 'COMMENT_SINGLE' => array(1 => "'", 2 => '#'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + "append", "as", "asc", "asin", "asm", "atan2", "atn", "beep", "bin", "binary", "bit", + "bitreset", "bitset", "bload", "bsave", "byref", "byte", "byval", "call", + "callocate", "case", "cbyte", "cdbl", "cdecl", "chain", "chdir", "chr", "cint", + "circle", "clear", "clng", "clngint", "close", "cls", "color", "command", + "common", "cons", "const", "continue", "cos", "cshort", "csign", "csng", + "csrlin", "cubyte", "cuint", "culngint", "cunsg", "curdir", "cushort", "custom", + "cvd", "cvi", "cvl", "cvlongint", "cvs", "cvshort", "data", "date", + "deallocate", "declare", "defbyte", "defdbl", "defined", "defint", "deflng", + "deflngint", "defshort", "defsng", "defstr", "defubyte", "defuint", + "defulngint", "defushort", "dim", "dir", "do", "double", "draw", "dylibload", + "dylibsymbol", "else", "elseif", "end", "enum", "environ", 'environ$', "eof", + "eqv", "erase", "err", "error", "exec", "exepath", "exit", "exp", "export", + "extern", "field", "fix", "flip", "for", "fre", "freefile", "function", "get", + "getjoystick", "getkey", "getmouse", "gosub", "goto", "hex", "hibyte", "hiword", + "if", "iif", "imagecreate", "imagedestroy", "imp", "inkey", "inp", "input", + "instr", "int", "integer", "is", "kill", "lbound", "lcase", "left", "len", + "let", "lib", "line", "lobyte", "loc", "local", "locate", "lock", "lof", "log", + "long", "longint", "loop", "loword", "lset", "ltrim", "mid", "mkd", "mkdir", + "mki", "mkl", "mklongint", "mks", "mkshort", "mod", "multikey", "mutexcreate", + "mutexdestroy", "mutexlock", "mutexunlock", "name", "next", "not", "oct", "on", + "once", "open", "option", "or", "out", "output", "overload", "paint", "palette", + "pascal", "pcopy", "peek", "peeki", "peeks", "pipe", "pmap", "point", "pointer", + "poke", "pokei", "pokes", "pos", "preserve", "preset", "print", "private", + "procptr", "pset", "ptr", "public", "put", "random", "randomize", "read", + "reallocate", "redim", "rem", "reset", "restore", "resume", "resume", "next", + "return", "rgb", "rgba", "right", "rmdir", "rnd", "rset", "rtrim", "run", + "sadd", "screen", "screencopy", "screeninfo", "screenlock", "screenptr", + "screenres", "screenset", "screensync", "screenunlock", "seek", "statement", + "seek", "function", "selectcase", "setdate", "setenviron", "setmouse", + "settime", "sgn", "shared", "shell", "shl", "short", "shr", "sin", "single", + "sizeof", "sleep", "space", "spc", "sqr", "static", "stdcall", "step", "stop", + "str", "string", "string", "strptr", "sub", "swap", "system", "tab", "tan", + "then", "threadcreate", "threadwait", "time", "time", "timer", "to", "trans", + "trim", "type", "ubound", "ubyte", "ucase", "uinteger", "ulongint", "union", + "unlock", "unsigned", "until", "ushort", "using", "va_arg", "va_first", + "va_next", "val", "val64", "valint", "varptr", "view", "viewprint", "wait", + "wend", "while", "width", "window", "windowtitle", "with", "write", "xor", + "zstring", "explicit", "escape", "true", "false" + ) + ), + 'SYMBOLS' => array( + '(', ')' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080;', + 2 => 'color: #339933;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 0 => 'color: #66cc66;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/genero.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/genero.php new file mode 100644 index 0000000..f20521b --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/genero.php @@ -0,0 +1,464 @@ + 'genero', + 'COMMENT_SINGLE' => array(1 => '--', 2 => '#'), + 'COMMENT_MULTI' => array('{' => '}'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + "ABSOLUTE", + "ACCEPT", + "ACTION", + "ADD", + "AFTER", + "ALL", + "ALTER", + "AND", + "ANY", + "APPEND", + "APPLICATION", + "AS", + "AT", + "ATTRIBUTE", + "ATTRIBUTES", + "AUDIT", + "AVG", + "BEFORE", + "BEGIN", + "BETWEEN", + "BORDER", + "BORDER", + "BOTTOM", + "BREAKPOINT", + "BUFFER", + "BUFFERED", + "BY", + "CALL", + "CANCEL", + "CASE", + "CENTURY", + "CHANGE", + "CHECK", + "CLEAR", + "CLIPPED", + "CLOSE", + "CLUSTER", + "COLUMN", + "COLUMNS", + "COMMAND", + "COMMENT", + "COMMIT", + "COMMITTED", + "CONCURRENT ", + "CONNECT", + "CONNECTION", + "CONSTANT", + "CONSTRAINED", + "CONSTRAINT", + "CONSTRUCT", + "CONTINUE", + "CONTROL", + "COUNT", + "CREATE", + "CROSS", + "CURRENT", + "DATABASE", + "DBA", + "DEC", + "DECLARE", + "DEFAULT", + "DEFAULTS", + "DEFER", + "DEFINE", + "DELETE", + "DELIMITER", + "DESCRIBE", + "DESTINATION", + "DIM", + "DIALOG", + "DIMENSION", + "DIRTY", + "DISCONNECT", + "DISPLAY", + "DISTINCT", + "DORMANT", + "DOWN", + "DROP", + "DYNAMIC", + "ELSE", + "END", + "ERROR", + "ESCAPE", + "EVERY", + "EXCLUSIVE", + "EXECUTE", + "EXISTS", + "EXIT", + "EXPLAIN", + "EXTEND", + "EXTENT", + "EXTERNAL", + "FETCH", + "FGL_DRAWBOX", + "FIELD", + "FIELD_TOUCHED", + "FILE", + "FILL", + "FINISH", + "FIRST", + "FLOAT", + "FLUSH", + "FOR", + "FOREACH", + "FORM", + "FORMAT", + "FOUND", + "FRACTION", + "FREE", + "FROM", + "FULL", + "FUNCTION", + "GET_FLDBUF", + "GLOBALS", + "GO", + "GOTO", + "GRANT", + "GROUP", + "HAVING", + "HEADER", + "HELP", + "HIDE", + "HOLD", + "HOUR", + "IDLE", + "IF", + "IMAGE", + "IMMEDIATE", + "IN", + "INDEX", + "INFIELD", + "INITIALIZE", + "INNER", + "INPUT", + "INSERT", + "INTERRUPT", + "INTERVAL", + "INTO", + "INVISIBLE", + "IS", + "ISOLATION", + "JOIN", + "KEEP", + "KEY", + "LABEL", + "LAST", + "LEFT", + "LENGTH", + "LET", + "LIKE", + "LINE", + "LINENO", + "LINES", + "LOAD", + "LOCATE", + "LOCK", + "LOG", + "LSTR", + "MAIN", + "MARGIN", + "MATCHES", + "MAX", + "MAXCOUNT", + "MDY", + "MEMORY", + "MENU", + "MESSAGE", + "MIN", + "MINUTE", + "MOD", + "MODE", + "MODIFY", + "MONEY", + "NAME", + "NEED", + "NEXT", + "NO", + "NORMAL", + "NOT", + "NOTFOUND", + "NULL", + "NUMERIC", + "OF", + "ON", + "OPEN", + "OPTION", + "OPTIONS", + "OR", + "ORDER", + "OTHERWISE", + "OUTER", + "OUTPUT", + "PAGE", + "PAGENO", + "PAUSE", + "PERCENT", + "PICTURE", + "PIPE", + "PRECISION", + "PREPARE", + "PREVIOUS", + "PRINT", + "PRINTER", + "PRINTX", + "PRIOR", + "PRIVILEGES", + "PROCEDURE", + "PROGRAM", + "PROMPT", + "PUBLIC", + "PUT", + "QUIT", + "READ", + "REAL", + "RECORD", + "RECOVER", + "RED ", + "RELATIVE", + "RENAME", + "REOPTIMIZATION", + "REPEATABLE", + "REPORT", + "RESOURCE", + "RETURN", + "RETURNING", + "REVERSE", + "REVOKE", + "RIGHT", + "ROLLBACK", + "ROLLFORWARD", + "ROW", + "ROWS", + "RUN", + "SCHEMA", + "SCREEN", + "SCROLL", + "SECOND", + "SELECT", + "SERIAL", + "SET", + "SFMT", + "SHARE", + "SHIFT", + "SHOW", + "SIGNAL ", + "SIZE", + "SKIP", + "SLEEP", + "SOME", + "SPACE", + "SPACES", + "SQL", + "SQLERRMESSAGE", + "SQLERROR", + "SQLSTATE", + "STABILITY", + "START", + "STATISTICS", + "STEP", + "STOP", + "STYLE", + "SUM", + "SYNONYM", + "TABLE", + "TEMP", + "TERMINATE", + "TEXT", + "THEN", + "THROUGH", + "THRU", + "TO", + "TODAY", + "TOP", + "TRAILER", + "TRANSACTION ", + "UNBUFFERED", + "UNCONSTRAINED", + "UNDERLINE", + "UNION", + "UNIQUE", + "UNITS", + "UNLOAD", + "UNLOCK", + "UP", + "UPDATE", + "USE", + "USER", + "USING", + "VALIDATE", + "VALUE", + "VALUES", + "VARCHAR", + "VIEW", + "WAIT", + "WAITING", + "WARNING", + "WHEN", + "WHENEVER", + "WHERE", + "WHILE", + "WINDOW", + "WITH", + "WITHOUT", + "WORDWRAP", + "WORK", + "WRAP" + ), + 2 => array( + '&IFDEF', '&ENDIF' + ), + 3 => array( + "ARRAY", + "BYTE", + "CHAR", + "CHARACTER", + "CURSOR", + "DATE", + "DATETIME", + "DECIMAL", + "DOUBLE", + "FALSE", + "INT", + "INTEGER", + "SMALLFLOAT", + "SMALLINT", + "STRING", + "TIME", + "TRUE" + ), + 4 => array( + "BLACK", + "BLINK", + "BLUE", + "BOLD", + "ANSI", + "ASC", + "ASCENDING", + "ASCII", + "CYAN", + "DESC", + "DESCENDING", + "GREEN", + "MAGENTA", + "OFF", + "WHITE", + "YELLOW", + "YEAR", + "DAY", + "MONTH", + "WEEKDAY" + ), + ), + 'SYMBOLS' => array( + '+', '-', '*', '?', '=', '/', '%', '>', '<', '^', '!', '|', ':', + '(', ')', '[', ']' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0600FF;', + 2 => 'color: #0000FF; font-weight: bold;', + 3 => 'color: #008000;', + 4 => 'color: #FF0000;', + ), + 'COMMENTS' => array( + 1 => 'color: #008080; font-style: italic;', + 2 => 'color: #008080;', + 'MULTI' => 'color: #008080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #008080; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #808080;' + ), + 'NUMBERS' => array( + 0 => 'color: #FF0000;' + ), + 'METHODS' => array( + 1 => 'color: #0000FF;', + 2 => 'color: #0000FF;' + ), + 'SYMBOLS' => array( + 0 => 'color: #008000;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/gml.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/gml.php new file mode 100644 index 0000000..199a0fd --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/gml.php @@ -0,0 +1,502 @@ +5 and KEYWORDS=>6 sections (actually, they were empty). + * I was planning of using those for the GML functions available only in the + * registered version of the program, but not anymore. + * + * 2005/06/26 (1.0.3) + * - First Release. + * + * TODO (updated 2005/11/11) + * ------------------------- + * - Test it for a while and make the appropiate corrections. + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi 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. + * + * GeSHi 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 GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'GML', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'"), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + // language keywords + 1 => array( + 'break', 'continue', 'do', 'until', 'if', 'else', + 'exit', 'for', 'for', 'repeat', 'return', 'switch', + 'case', 'default', 'var', 'while', 'with', 'div', 'mod', + // GML Language overview + 'self', 'other', 'all', 'noone', 'global', + ), + // modifiers and built-in variables + 2 => array( + // Game play + 'x','y','xprevious','yprevious','xstart','ystart','hspeed','vspeed','direction','speed', + 'friction','gravity','gravity_direction', + 'path_index','path_position','path_positionprevious','path_speed','path_orientation', + 'path_scale','path_endaction', + 'object_index','id','mask_index','solid','persistent','instance_count','instance_id', + 'room_speed','fps','current_time','current_year','current_month','current_day','current_weekday', + 'current_hour','current_minute','current_second','alarm','timeline_index','timeline_position', + 'timeline_speed', + 'room','room_first','room_last','room_width','room_height','room_caption','room_persistent', + 'score','lives','health','show_score','show_lives','show_health','caption_score','caption_lives', + 'caption_health', + 'event_type','event_number','event_object','event_action', + 'error_occurred','error_last', + // User interaction + 'keyboard_lastkey','keyboard_key','keyboard_lastchar','keyboard_string', + 'mouse_x','mouse_y','mouse_button','mouse_lastbutton', + // Game Graphics + 'visible','sprite_index','sprite_width','sprite_height','sprite_xoffset','sprite_yoffset', + 'image_number','image_index','image_speed','depth','image_xscale','image_yscale','image_angle', + 'image_alpha','image_blend','bbox_left','bbox_right','bbox_top','bbox_bottom', + 'background_color','background_showcolor','background_visible','background_foreground', + 'background_index','background_x','background_y','background_width','background_height', + 'background_htiled','background_vtiled','background_xscale','background_yscale', + 'background_hspeed','background_vspeed','background_blend','background_alpha', + 'background','left, top, width, height','x,y','depth','visible','xscale, yscale','blend','alpha', + 'view_enabled','view_current','view_visible','view_yview','view_wview','view_hview','view_xport', + 'view_yport','view_wport','view_hport','view_angle','view_hborder','view_vborder','view_hspeed', + 'view_vspeed','view_object', + 'transition_kind', + // Files, registry and executing programs + 'game_id','working_directory','temp_directory', + 'secure_mode', + // Creating particles + 'xmin', 'xmax', 'ymin', 'ymax','shape','distribution','particle type','number', + 'x', 'y', 'force','dist','kind','additive', 'friction', 'parttype1', 'parttype2' + ), + // functions + 3 => array( + // Computing things + 'random','choose','abs','sign','round','floor','ceil','frac','sqrt','sqr','power','exp','ln', + 'log2','log10','logn','sin','cos','tan','arcsin','arccos','arctan','arctan2','degtorad', + 'radtodeg','min','max','mean','median','point_distance','point_direction','lengthdir_x', + 'lengthdir_y','is_real','is_string', + 'chr','ord','real','string','string_format','string_length','string_pos','string_copy', + 'string_char_at','string_delete','string_insert','string_replace','string_replace_all', + 'string_count','string_lower','string_upper','string_repeat','string_letters','string_digits', + 'string_lettersdigits','clipboard_has_text','clipboard_get_text','clipboard_set_text', + 'date_current_datetime','date_current_date','date_current_time','date_create_datetime', + 'date_create_date','date_create_time','date_valid_datetime','date_valid_date','date_valid_time', + 'date_inc_year','date_inc_month','date_inc_week','date_inc_day','date_inc_hour', + 'date_inc_minute','date_inc_second','date_get_year','date_get_month','date_get_week', + 'date_get_day','date_get_hour', 'date_get_minute','date_get_second','date_get_weekday', + 'date_get_day_of_year','date_get_hour_of_year','date_get_minute_of_year', + 'date_get_second_of_year','date_year_span','date_month_span','date_week_span','date_day_span', + 'date_hour_span','date_minute_span','date_second_span','date_compare_datetime', + 'date_compare_date','date_compare_time','date_date_of','date_time_of','date_datetime_string', + 'date_date_string','date_time_string','date_days_in_month','date_days_in_year','date_leap_year', + 'date_is_today', + // Game play + 'motion_set','motion_add','place_free','place_empty','place_meeting','place_snapped', + 'move_random','move_snap','move_wrap','move_towards_point','move_bounce_solid','move_bounce_all', + 'move_contact_solid','move_contact_all','move_outside_solid','move_outside_all', + 'distance_to_point','distance_to_object','position_empty','position_meeting', + 'path_start','path_end', + 'mp_linear_step','mp_linear_step_object','mp_potential_step','mp_potential_step_object', + 'mp_potential_settings','mp_linear_path','mp_linear_path_object', 'mp_potential_path', + 'mp_potential_path_object','mp_grid_create','mp_grid_destroy','mp_grid_clear_all', + 'mp_grid_clear_cell','mp_grid_clear_rectangle','mp_grid_add_cell','mp_grid_add_rectangle', + 'mp_grid_add_instances','mp_grid_path','mp_grid_draw', + 'collision_point','collision_rectangle','collision_circle','collision_ellipse','collision_line', + 'instance_find','instance_exists','instance_number','instance_position','instance_nearest', + 'instance_furthest','instance_place','instance_create','instance_copy','instance_destroy', + 'instance_change','position_destroy','position_change', + 'instance_deactivate_all','instance_deactivate_object','instance_deactivate_region', + 'instance_activate_all','instance_activate_object','instance_activate_region', + 'sleep', + 'room_goto','room_goto_previous','room_goto_next','room_restart','room_previous','room_next', + 'game_end','game_restart','game_save','game_load', + 'event_perform', 'event_perform_object','event_user','event_inherited', + 'show_debug_message','variable_global_exists','variable_local_exists','variable_global_get', + 'variable_global_array_get','variable_global_array2_get','variable_local_get', + 'variable_local_array_get','variable_local_array2_get','variable_global_set', + 'variable_global_array_set','variable_global_array2_set','variable_local_set', + 'variable_local_array_set','variable_local_array2_set','set_program_priority', + // User interaction + 'keyboard_set_map','keyboard_get_map','keyboard_unset_map','keyboard_check', + 'keyboard_check_pressed','keyboard_check_released','keyboard_check_direct', + 'keyboard_get_numlock','keyboard_set_numlock','keyboard_key_press','keyboard_key_release', + 'keyboard_clear','io_clear','io_handle','keyboard_wait', + 'mouse_check_button','mouse_check_button_pressed','mouse_check_button_released','mouse_clear', + 'io_clear','io_handle','mouse_wait', + 'joystick_exists','joystick_name','joystick_axes','joystick_buttons','joystick_has_pov', + 'joystick_direction','joystick_check_button','joystick_xpos','joystick_ypos','joystick_zpos', + 'joystick_rpos','joystick_upos','joystick_vpos','joystick_pov', + // Game Graphics + 'draw_sprite','draw_sprite_stretched','draw_sprite_tiled','draw_sprite_part','draw_background', + 'draw_background_stretched','draw_background_tiled','draw_background_part','draw_sprite_ext', + 'draw_sprite_stretched_ext','draw_sprite_tiled_ext','draw_sprite_part_ext','draw_sprite_general', + 'draw_background_ext','draw_background_stretched_ext','draw_background_tiled_ext', + 'draw_background_part_ext','draw_background_general', + 'draw_clear','draw_clear_alpha','draw_point','draw_line','draw_rectangle','draw_roundrect', + 'draw_triangle','draw_circle','draw_ellipse','draw_arrow','draw_button','draw_path', + 'draw_healthbar','draw_set_color','draw_set_alpha','draw_get_color','draw_get_alpha', + 'make_color_rgb','make_color_hsv','color_get_red','color_get_green','color_get_blue', + 'color_get_hue','color_get_saturation','color_get_value','merge_color','draw_getpixel', + 'screen_save','screen_save_part', + 'draw_set_font','draw_set_halign','draw_set_valign','draw_text','draw_text_ext','string_width', + 'string_height','string_width_ext','string_height_ext','draw_text_transformed', + 'draw_text_ext_transformed','draw_text_color','draw_text_ext_color', + 'draw_text_transformed_color','draw_text_ext_transformed_color', + 'draw_point_color','draw_line_color','draw_rectangle_color','draw_roundrect_color', + 'draw_triangle_color','draw_circle_color','draw_ellipse_color','draw_primitive_begin', + 'draw_vertex','draw_vertex_color','draw_primitive_end','sprite_get_texture', + 'background_get_texture','texture_preload','texture_set_priority', + 'texture_get_width','texture_get_height','draw_primitive_begin_texture','draw_vertex_texture', + 'draw_vertex_texture_color','draw_primitive_end','texture_set_interpolation', + 'texture_set_blending','texture_set_repeat','draw_set_blend_mode','draw_set_blend_mode_ext', + 'surface_create','surface_free','surface_exists','surface_get_width','surface_get_height', + 'surface_get_texture','surface_set_target','surface_reset_target','surface_getpixel', + 'surface_save','surface_save_part','draw_surface','draw_surface_stretched','draw_surface_tiled', + 'draw_surface_part','draw_surface_ext','draw_surface_stretched_ext','draw_surface_tiled_ext', + 'draw_surface_part_ext','draw_surface_general','surface_copy','surface_copy_part', + 'tile_add','tile_delete','tile_exists','tile_get_x','tile_get_y','tile_get_left','tile_get_top', + 'tile_get_width','tile_get_height','tile_get_depth','tile_get_visible','tile_get_xscale', + 'tile_get_yscale','tile_get_background','tile_get_blend','tile_get_alpha','tile_set_position', + 'tile_set_region','tile_set_background','tile_set_visible','tile_set_depth','tile_set_scale', + 'tile_set_blend','tile_set_alpha','tile_layer_hide','tile_layer_show','tile_layer_delete', + 'tile_layer_shift','tile_layer_find','tile_layer_delete_at','tile_layer_depth', + 'display_get_width','display_get_height','display_get_colordepth','display_get_frequency', + 'display_set_size','display_set_colordepth','display_set_frequency','display_set_all', + 'display_test_all','display_reset','display_mouse_get_x','display_mouse_get_y','display_mouse_set', + 'window_set_visible','window_get_visible','window_set_fullscreen','window_get_fullscreen', + 'window_set_showborder','window_get_showborder','window_set_showicons','window_get_showicons', + 'window_set_stayontop','window_get_stayontop','window_set_sizeable','window_get_sizeable', + 'window_set_caption','window_get_caption','window_set_cursor', 'window_get_cursor', + 'window_set_color','window_get_color','window_set_region_scale','window_get_region_scale', + 'window_set_position','window_set_size','window_set_rectangle','window_center','window_default', + 'window_get_x','window_get_y','window_get_width','window_get_height','window_mouse_get_x', + 'window_mouse_get_y','window_mouse_set', + 'window_set_region_size','window_get_region_width','window_get_region_height', + 'window_view_mouse_get_x','window_view_mouse_get_y','window_view_mouse_set', + 'window_views_mouse_get_x','window_views_mouse_get_y','window_views_mouse_set', + 'screen_redraw','screen_refresh','set_automatic_draw','set_synchronization','screen_wait_vsync', + // Sound and music) + 'sound_play','sound_loop','sound_stop','sound_stop_all','sound_isplaying','sound_volume', + 'sound_global_volume','sound_fade','sound_pan','sound_background_tempo','sound_set_search_directory', + 'sound_effect_set','sound_effect_chorus','sound_effect_echo', 'sound_effect_flanger', + 'sound_effect_gargle','sound_effect_reverb','sound_effect_compressor','sound_effect_equalizer', + 'sound_3d_set_sound_position','sound_3d_set_sound_velocity','sound_3d_set_sound_distance', + 'sound_3d_set_sound_cone', + 'cd_init','cd_present','cd_number','cd_playing','cd_paused','cd_track','cd_length', + 'cd_track_length','cd_position','cd_track_position','cd_play','cd_stop','cd_pause','cd_resume', + 'cd_set_position','cd_set_track_position','cd_open_door','cd_close_door','MCI_command', + // Splash screens, highscores, and other pop-ups + 'show_text','show_image','show_video','show_info','load_info', + 'show_message','show_message_ext','show_question','get_integer','get_string', + 'message_background','message_alpha','message_button','message_text_font','message_button_font', + 'message_input_font','message_mouse_color','message_input_color','message_caption', + 'message_position','message_size','show_menu','show_menu_pos','get_color','get_open_filename', + 'get_save_filename','get_directory','get_directory_alt','show_error', + 'highscore_show','highscore_set_background','highscore_set_border','highscore_set_font', + 'highscore_set_colors','highscore_set_strings','highscore_show_ext','highscore_clear', + 'highscore_add','highscore_add_current','highscore_value','highscore_name','draw_highscore', + // Resources + 'sprite_exists','sprite_get_name','sprite_get_number','sprite_get_width','sprite_get_height', + 'sprite_get_transparent','sprite_get_smooth','sprite_get_preload','sprite_get_xoffset', + 'sprite_get_yoffset','sprite_get_bbox_left','sprite_get_bbox_right','sprite_get_bbox_top', + 'sprite_get_bbox_bottom','sprite_get_bbox_mode','sprite_get_precise', + 'sound_exists','sound_get_name','sound_get_kind','sound_get_preload','sound_discard', + 'sound_restore', + 'background_exists','background_get_name','background_get_width','background_get_height', + 'background_get_transparent','background_get_smooth','background_get_preload', + 'font_exists','font_get_name','font_get_fontname','font_get_bold','font_get_italic', + 'font_get_first','font_get_last', + 'path_exists','path_get_name','path_get_length','path_get_kind','path_get_closed', + 'path_get_precision','path_get_number','path_get_point_x','path_get_point_y', + 'path_get_point_speed','path_get_x','path_get_y','path_get_speed', + 'script_exists','script_get_name','script_get_text', + 'timeline_exists','timeline_get_name', + 'object_exists','object_get_name','object_get_sprite','object_get_solid','object_get_visible', + 'object_get_depth','object_get_persistent','object_get_mask','object_get_parent', + 'object_is_ancestor', + 'room_exists','room_get_name', + // Changing resources + 'sprite_set_offset','sprite_set_bbox_mode','sprite_set_bbox','sprite_set_precise', + 'sprite_duplicate','sprite_assign','sprite_merge','sprite_add','sprite_replace', + 'sprite_create_from_screen','sprite_add_from_screen','sprite_create_from_surface', + 'sprite_add_from_surface','sprite_delete','sprite_set_alpha_from_sprite', + 'sound_add','sound_replace','sound_delete', + 'background_duplicate','background_assign','background_add','background_replace', + 'background_create_color','background_create_gradient','background_create_from_screen', + 'background_create_from_surface','background_delete','background_set_alpha_from_background', + 'font_add','font_add_sprite','font_replace_sprite','font_delete', + 'path_set_kind','path_set_closed','path_set_precision','path_add','path_delete','path_duplicate', + 'path_assign','path_append','path_add_point','path_insert_point','path_change_point', + 'path_delete_point','path_clear_points','path_reverse','path_mirror','path_flip','path_rotate', + 'path_scale','path_shift', + 'execute_string','execute_file','script_execute', + 'timeline_add','timeline_delete','timeline_moment_add','timeline_moment_clear', + 'object_set_sprite','object_set_solid','object_set_visible','object_set_depth', + 'object_set_persistent','object_set_mask','object_set_parent','object_add','object_delete', + 'object_event_add','object_event_clear', + 'room_set_width','room_set_height','room_set_caption','room_set_persistent','room_set_code', + 'room_set_background_color','room_set_background','room_set_view','room_set_view_enabled', + 'room_add','room_duplicate','room_assign','room_instance_add','room_instance_clear', + 'room_tile_add','room_tile_add_ext','room_tile_clear', + // Files, registry and executing programs + 'file_text_open_read','file_text_open_write','file_text_open_append','file_text_close', + 'file_text_write_string','file_text_write_real','file_text_writeln','file_text_read_string', + 'file_text_read_real','file_text_readln','file_text_eof','file_exists','file_delete', + 'file_rename','file_copy','directory_exists','directory_create','file_find_first', + 'file_find_next','file_find_close','file_attributes', 'filename_name','filename_path', + 'filename_dir','filename_drive','filename_ext','filename_change_ext','file_bin_open', + 'file_bin_rewrite','file_bin_close','file_bin_size','file_bin_position','file_bin_seek', + 'file_bin_write_byte','file_bin_read_byte','parameter_count','parameter_string', + 'environment_get_variable', + 'registry_write_string','registry_write_real','registry_read_string','registry_read_real', + 'registry_exists','registry_write_string_ext','registry_write_real_ext', + 'registry_read_string_ext','registry_read_real_ext','registry_exists_ext','registry_set_root', + 'ini_open','ini_close','ini_read_string','ini_read_real','ini_write_string','ini_write_real', + 'ini_key_exists','ini_section_exists','ini_key_delete','ini_section_delete', + 'execute_program','execute_shell', + // Data structures + 'ds_stack_create','ds_stack_destroy','ds_stack_clear','ds_stack_size','ds_stack_empty', + 'ds_stack_push','ds_stack_pop','ds_stack_top', + 'ds_queue_create','ds_queue_destroy','ds_queue_clear','ds_queue_size','ds_queue_empty', + 'ds_queue_enqueue','ds_queue_dequeue','ds_queue_head','ds_queue_tail', + 'ds_list_create','ds_list_destroy','ds_list_clear','ds_list_size','ds_list_empty','ds_list_add', + 'ds_list_insert','ds_list_replace','ds_list_delete','ds_list_find_index','ds_list_find_value', + 'ds_list_sort', + 'ds_map_create','ds_map_destroy','ds_map_clear','ds_map_size','ds_map_empty','ds_map_add', + 'ds_map_replace','ds_map_delete','ds_map_exists','ds_map_find_value','ds_map_find_previous', + 'ds_map_find_next','ds_map_find_first','ds_map_find_last', + 'ds_priority_create','ds_priority_destroy','ds_priority_clear','ds_priority_size', + 'ds_priority_empty','ds_priority_add','ds_priority_change_priority','ds_priority_find_priority', + 'ds_priority_delete_value','ds_priority_delete_min','ds_priority_find_min', + 'ds_priority_delete_max','ds_priority_find_max', + 'ds_grid_create','ds_grid_destroy','ds_grid_resize','ds_grid_width','ds_grid_height', + 'ds_grid_clear','ds_grid_set','ds_grid_add','ds_grid_multiply','ds_grid_set_region', + 'ds_grid_add_region','ds_grid_multiply_region','ds_grid_set_disk','ds_grid_add_disk', + 'ds_grid_multiply_disk','ds_grid_get','ds_grid_get_sum','ds_grid_get_max','ds_grid_get_min', + 'ds_grid_get_mean','ds_grid_get_disk_sum','ds_grid_get_disk_min','ds_grid_get_disk_max', + 'ds_grid_get_disk_mean','ds_grid_value_exists','ds_grid_value_x','ds_grid_value_y', + 'ds_grid_value_disk_exists','ds_grid_value_disk_x','ds_grid_value_disk_y', + // Creating particles + 'effect_create_below','effect_create_above','effect_clear', + 'part_type_create','part_type_destroy','part_type_exists','part_type_clear','part_type_shape', + 'part_type_sprite','part_type_size','part_type_scale', + 'part_type_orientation','part_type_color1','part_type_color2','part_type_color3', + 'part_type_color_mix','part_type_color_rgb','part_type_color_hsv', + 'part_type_alpha1','part_type_alpha2','part_type_alpha3','part_type_blend','part_type_life', + 'part_type_step','part_type_death','part_type_speed','part_type_direction','part_type_gravity', + 'part_system_create','part_system_destroy','part_system_exists','part_system_clear', + 'part_system_draw_order','part_system_depth','part_system_position', + 'part_system_automatic_update','part_system_automatic_draw','part_system_update', + 'part_system_drawit','part_particles_create','part_particles_create_color', + 'part_particles_clear','part_particles_count', + 'part_emitter_create','part_emitter_destroy','part_emitter_destroy_all','part_emitter_exists', + 'part_emitter_clear','part_emitter_region','part_emitter_burst','part_emitter_stream', + 'part_attractor_create','part_attractor_destroy','part_attractor_destroy_all', + 'part_attractor_exists','part_attractor_clear','part_attractor_position','part_attractor_force', + 'part_destroyer_create','part_destroyer_destroy','part_destroyer_destroy_all', + 'part_destroyer_exists','part_destroyer_clear','part_destroyer_region', + 'part_deflector_create','part_deflector_destroy','part_deflector_destroy_all', + 'part_deflector_exists','part_deflector_clear','part_deflector_region','part_deflector_kind', + 'part_deflector_friction', + 'part_changer_create','part_changer_destroy','part_changer_destroy_all','part_changer_exists', + 'part_changer_clear','part_changer_region','part_changer_types','part_changer_kind', + // Multiplayer games + 'mplay_init_ipx','mplay_init_tcpip','mplay_init_modem','mplay_init_serial', + 'mplay_connect_status','mplay_end','mplay_ipaddress', + 'mplay_session_create','mplay_session_find','mplay_session_name','mplay_session_join', + 'mplay_session_mode','mplay_session_status','mplay_session_end', + 'mplay_player_find','mplay_player_name','mplay_player_id', + 'mplay_data_write','mplay_data_read','mplay_data_mode', + 'mplay_message_send','mplay_message_send_guaranteed','mplay_message_receive','mplay_message_id', + 'mplay_message_value','mplay_message_player','mplay_message_name','mplay_message_count', + 'mplay_message_clear', + // Using DLL's + 'external_define','external_call','external_free','execute_string','execute_file','window_handle', + // 3D Graphics + 'd3d_start','d3d_end','d3d_set_hidden','d3d_set_perspective', + 'd3d_set_depth', + 'd3d_primitive_begin','d3d_vertex','d3d_vertex_color','d3d_primitive_end', + 'd3d_primitive_begin_texture','d3d_vertex_texture','d3d_vertex_texture_color','d3d_set_culling', + 'd3d_draw_block','d3d_draw_cylinder','d3d_draw_cone','d3d_draw_ellipsoid','d3d_draw_wall', + 'd3d_draw_floor', + 'd3d_set_projection','d3d_set_projection_ext','d3d_set_projection_ortho', + 'd3d_set_projection_perspective', + 'd3d_transform_set_identity','d3d_transform_set_translation','d3d_transform_set_scaling', + 'd3d_transform_set_rotation_x','d3d_transform_set_rotation_y','d3d_transform_set_rotation_z', + 'd3d_transform_set_rotation_axis','d3d_transform_add_translation','d3d_transform_add_scaling', + 'd3d_transform_add_rotation_x','d3d_transform_add_rotation_y','d3d_transform_add_rotation_z', + 'd3d_transform_add_rotation_axis','d3d_transform_stack_clear','d3d_transform_stack_empty', + 'd3d_transform_stack_push','d3d_transform_stack_pop','d3d_transform_stack_top', + 'd3d_transform_stack_discard', + 'd3d_set_fog', + 'd3d_set_lighting','d3d_set_shading','d3d_light_define_direction','d3d_light_define_point', + 'd3d_light_enable','d3d_vertex_normal','d3d_vertex_normal_color','d3d_vertex_normal_texture', + 'd3d_vertex_normal_texture_color', + 'd3d_model_create','d3d_model_destroy','d3d_model_clear','d3d_model_save','d3d_model_load', + 'd3d_model_draw','d3d_model_primitive_begin','d3d_model_vertex','d3d_model_vertex_color', + 'd3d_model_vertex_texture','d3d_model_vertex_texture_color','d3d_model_vertex_normal', + 'd3d_model_vertex_normal_color','d3d_model_vertex_normal_texture', + 'd3d_model_vertex_normal_texture_color','d3d_model_primitive_end','d3d_model_block', + 'd3d_model_cylinder','d3d_model_cone','d3d_model_ellipsoid','d3d_model_wall','d3d_model_floor' + ), + // constants + 4 => array( + 'true', 'false', 'pi', + 'ev_destroy','ev_step','ev_alarm','ev_keyboard','ev_mouse','ev_collision','ev_other','ev_draw', + 'ev_keypress','ev_keyrelease','ev_left_button','ev_right_button','ev_middle_button', + 'ev_no_button','ev_left_press','ev_right_press','ev_middle_press','ev_left_release', + 'ev_right_release','ev_middle_release','ev_mouse_enter','ev_mouse_leave','ev_mouse_wheel_up', + 'ev_mouse_wheel_down','ev_global_left_button','ev_global_right_button','ev_global_middle_button', + 'ev_global_left_press','ev_global_right_press','ev_global_middle_press','ev_global_left_release', + 'ev_global_right_release','ev_global_middle_release','ev_joystick1_left','ev_joystick1_right', + 'ev_joystick1_up','ev_joystick1_down','ev_joystick1_button1','ev_joystick1_button2', + 'ev_joystick1_button3','ev_joystick1_button4','ev_joystick1_button5','ev_joystick1_button6', + 'ev_joystick1_button7','ev_joystick1_button8','ev_joystick2_left','ev_joystick2_right', + 'ev_joystick2_up','ev_joystick2_down','ev_joystick2_button1','ev_joystick2_button2', + 'ev_joystick2_button3','ev_joystick2_button4','ev_joystick2_button5','ev_joystick2_button6', + 'ev_joystick2_button7','ev_joystick2_button8', + 'ev_outside','ev_boundary','ev_game_start','ev_game_end','ev_room_start','ev_room_end', + 'ev_no_more_lives','ev_no_more_health','ev_animation_end','ev_end_of_path','ev_user0','ev_user1', + 'ev_user2','ev_user3','ev_user4','ev_user5','ev_user6','ev_user7','ev_user8','ev_user9', + 'ev_user10','ev_user11','ev_user12','ev_user13','ev_user14','ev_user15','ev_step_normal', + 'ev_step_begin','ev_step_end', + 'vk_nokey','vk_anykey','vk_left','vk_right','vk_up','vk_down','vk_enter','vk_escape','vk_space', + 'vk_shift','vk_control','vk_alt','vk_backspace','vk_tab','vk_home','vk_end','vk_delete', + 'vk_insert','vk_pageup','vk_pagedown','vk_pause','vk_printscreen', + 'vk_f1','vk_f2','vk_f3','vk_f4','vk_f5','vk_f6','vk_f7','vk_f8','vk_f9','vk_f10','vk_f11','vk_f12', + 'vk_numpad0','vk_numpad1','vk_numpad2','vk_numpad3','vk_numpad4','vk_numpad5','vk_numpad6', + 'vk_numpad7','vk_numpad8','vk_numpad9', 'vk_multiply','vk_divide','vk_add','vk_subtract', + 'vk_decimal','vk_lshift','vk_lcontrol','vk_lalt','vk_rshift','vk_rcontrol','vk_ralt', + 'c_aqua','c_black','c_blue','c_dkgray','c_fuchsia','c_gray','c_green','c_lime','c_ltgray', + 'c_maroon','c_navy','c_olive','c_purple','c_red','c_silver','c_teal','c_white','c_yellow', + 'fa_left', 'fa_center','fa_right','fa_top','fa_middle','fa_bottom', + 'pr_pointlist','pr_linelist','pr_linestrip','pr_trianglelist','pr_trianglestrip', + 'pr_trianglefan', + 'cr_none','cr_arrow','cr_cross','cr_beam','cr_size_nesw','cr_size_ns','cr_size_nwse', + 'cr_size_we','cr_uparrow','cr_hourglass','cr_drag','cr_nodrop','cr_hsplit','cr_vsplit', + 'cr_multidrag','cr_sqlwait','cr_no','cr_appstart','cr_help','cr_handpoint','cr_size_all', + 'se_chorus','se_echo','se_flanger','se_gargle','se_reverb','se_compressor','se_equalizer', + 'fa_readonly','fa_hidden','fa_sysfile','fa_volumeid','fa_directory','fa_archive', + 'pt_shape_pixel','pt_shape_disk','pt_shape_square','pt_shape_line','pt_shape_star', + 'pt_shape_circle','pt_shape_ring','pt_shape_sphere','pt_shape_flare','pt_shape_spark', + 'pt_shape_explosion','pt_shape_cloud','pt_shape_smoke','pt_shape_snow', + 'ps_shape_rectangle','ps_shape_ellipse ','ps_shape_diamond','ps_shape_line', + 'ps_distr_linear','ps_distr_gaussian','ps_force_constant','ps_force_linear','ps_force_quadratic', + 'ps_deflect_horizontal', 'ps_deflect_vertical', + 'ps_change_motion','ps_change_shape','ps_change_all' + ), + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '&&', '||', '^^', '<', '<=', '==', '!=', '>', '>=', + '|', '&', '^', '<<', '>>', '+', '-', '*', '/', '!', '-', '~' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'font-weight: bold; color: #000000;', + 2 => 'font-weight: bold; color: #000000;', + 3 => 'color: navy;', + 4 => 'color: #663300;', + ), + 'COMMENTS' => array( + 1 => 'font-style: italic; color: green;', + 'MULTI' => 'font-style: italic; color: green;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' //'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #202020;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66; font-weight: bold;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + // All GML functions have been indexed, but need some corrections. + 3 => 'http://www.zonamakers.com/gmlreference/{FNAME}.html', // (provisional, could change soon!) + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/groovy.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/groovy.php new file mode 100644 index 0000000..3ae006d --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/groovy.php @@ -0,0 +1,2117 @@ + 'Groovy', + 'COMMENT_SINGLE' => array(1 => '//', 2 => 'import', 3 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'''", '"""', "'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + '||', + 'while', + 'switch', + 'in', + 'if', + 'foreach', + 'for', + 'else', + 'do', + 'case', + '=>', + '--', + '++', + '<<', + '<<<', + '&&' + ), + 2 => array( + 'volatile', + 'try', + 'true', + 'transient', + 'throws', + 'throw', + 'this', + 'synchronized', + 'super', + 'strictfp', + 'static', + 'return', + 'public', + 'protected', + 'property', + 'private', + 'package', + 'null', + 'new', + 'native', + 'interface', + 'instanceof', + 'implements', + 'goto', + 'finally', + 'final', + 'false', + 'extends', + 'enum', + 'default', + 'def', + 'continue', + 'const', + 'class', + 'catch', + 'break', + 'assert', + 'abstract', + 'as' + ), + 3 => array( + '_Remote_Stub', + '_PolicyStub', + '_NamingContextStub', + '_NamingContextImplBase', + '_IDLTypeStub', + '_BindingIteratorStub', + '_BindingIteratorImplBase', + 'ZoneView', + 'ZipOutputStream', + 'ZipInputStream', + 'ZipFile', + 'ZipException', + 'ZipEntry', + 'X509Extension', + 'X509EncodedKeySpec', + 'X509Certificate', + 'X509CRLEntry', + 'X509CRL', + 'WrongTransaction', + 'Writer', + 'WriteAbortedException', + 'WritableRenderedImage', + 'WritableRaster', + 'WrappedPlainView', + 'WindowListener', + 'WindowEvent', + 'WindowConstants', + 'WindowAdapter', + 'Window', + 'WeakReference', + 'WeakHashMap', + 'WStringValueHelper', + 'WCharSeqHolder', + 'WCharSeqHelper', + 'Void', + 'VoiceStatus', + 'VisibilityHelper', + 'Visibility', + 'VirtualMachineError', + 'ViewportUI', + 'ViewportLayout', + 'ViewFactory', + 'View', + 'VetoableChangeSupport', + 'VetoableChangeListener', + 'VersionSpecHelper', + 'VerifyError', + 'Vector', + 'VariableHeightLayoutCache', + 'ValueMemberHelper', + 'ValueMember', + 'ValueHandler', + 'ValueFactory', + 'ValueBaseHolder', + 'ValueBaseHelper', + 'ValueBase', + 'VM_TRUNCATABLE', + 'VM_NONE', + 'VM_CUSTOM', + 'VM_ABSTRACT', + 'VMID', + 'Utilities', + 'UtilDelegate', + 'Util', + 'UserException', + 'UnsupportedOperationException', + 'UnsupportedLookAndFeelException', + 'UnsupportedFlavorException', + 'UnsupportedEncodingException', + 'UnsupportedClassVersionError', + 'UnsupportedAudioFileException', + 'UnsolicitedNotificationListener', + 'UnsolicitedNotificationEvent', + 'UnsolicitedNotification', + 'UnsatisfiedLinkError', + 'UnresolvedPermission', + 'Unreferenced', + 'UnrecoverableKeyException', + 'UnmarshalException', + 'UnknownUserException', + 'UnknownServiceException', + 'UnknownObjectException', + 'UnknownHostException', + 'UnknownHostException', + 'UnknownGroupException', + 'UnknownException', + 'UnknownError', + 'UnionMemberHelper', + 'UnionMember', + 'UnicastRemoteObject', + 'UnexpectedException', + 'UndoableEditSupport', + 'UndoableEditListener', + 'UndoableEditEvent', + 'UndoableEdit', + 'UndoManager', + 'UndeclaredThrowableException', + 'UTFDataFormatException', + 'UShortSeqHolder', + 'UShortSeqHelper', + 'URLStreamHandlerFactory', + 'URLStreamHandler', + 'URLEncoder', + 'URLDecoder', + 'URLConnection', + 'URLClassLoader', + 'URL', + 'UNSUPPORTED_POLICY_VALUE', + 'UNSUPPORTED_POLICY', + 'UNKNOWN', + 'ULongSeqHolder', + 'ULongSeqHelper', + 'ULongLongSeqHolder', + 'ULongLongSeqHelper', + 'UIResource', + 'UIManager.LookAndFeelInfo', + 'UIManager', + 'UIDefaults.ProxyLazyValue', + 'UIDefaults.LazyValue', + 'UIDefaults.LazyInputMap', + 'UIDefaults.ActiveValue', + 'UIDefaults', + 'UID', + 'Types', + 'TypeMismatch', + 'TypeCodeHolder', + 'TypeCode', + 'TreeWillExpandListener', + 'TreeUI', + 'TreeSet', + 'TreeSelectionModel', + 'TreeSelectionListener', + 'TreeSelectionEvent', + 'TreePath', + 'TreeNode', + 'TreeModelListener', + 'TreeModelEvent', + 'TreeModel', + 'TreeMap', + 'TreeExpansionListener', + 'TreeExpansionEvent', + 'TreeCellRenderer', + 'TreeCellEditor', + 'Transparency', + 'Transmitter', + 'TransformAttribute', + 'Transferable', + 'TransactionRolledbackException', + 'TransactionRequiredException', + 'Track', + 'Toolkit', + 'ToolTipUI', + 'ToolTipManager', + 'ToolBarUI', + 'TooManyListenersException', + 'TitledBorder', + 'Timestamp', + 'TimerTask', + 'Timer', + 'Timer', + 'TimeZone', + 'TimeLimitExceededException', + 'Time', + 'TileObserver', + 'Tie', + 'Throwable', + 'ThreadLocal', + 'ThreadGroup', + 'ThreadDeath', + 'Thread', + 'TexturePaint', + 'TextUI', + 'TextMeasurer', + 'TextListener', + 'TextLayout.CaretPolicy', + 'TextLayout', + 'TextHitInfo', + 'TextField', + 'TextEvent', + 'TextComponent', + 'TextAttribute', + 'TextArea', + 'TextAction', + 'TargetDataLine', + 'TagElement', + 'TableView', + 'TableUI', + 'TableModelListener', + 'TableModelEvent', + 'TableModel', + 'TableHeaderUI', + 'TableColumnModelListener', + 'TableColumnModelEvent', + 'TableColumnModel', + 'TableColumn', + 'TableCellRenderer', + 'TableCellEditor', + 'TabbedPaneUI', + 'TabableView', + 'TabStop', + 'TabSet', + 'TabExpander', + 'TRANSIENT', + 'TRANSACTION_ROLLEDBACK', + 'TRANSACTION_REQUIRED', + 'TCKind', + 'SystemFlavorMap', + 'SystemException', + 'SystemColor', + 'System', + 'SysexMessage', + 'Synthesizer', + 'SyncFailedException', + 'SwingUtilities', + 'SwingPropertyChangeSupport', + 'SwingConstants', + 'StyledEditorKit.UnderlineAction', + 'StyledEditorKit.StyledTextAction', + 'StyledEditorKit.ItalicAction', + 'StyledEditorKit.ForegroundAction', + 'StyledEditorKit.FontSizeAction', + 'StyledEditorKit.FontFamilyAction', + 'StyledEditorKit.BoldAction', + 'StyledEditorKit.AlignmentAction', + 'StyledEditorKit', + 'StyledDocument', + 'StyleSheet.ListPainter', + 'StyleSheet.BoxPainter', + 'StyleSheet', + 'StyleContext', + 'StyleConstants.ParagraphConstants', + 'StyleConstants.FontConstants', + 'StyleConstants.ColorConstants', + 'StyleConstants.CharacterConstants', + 'StyleConstants', + 'Style', + 'StubNotFoundException', + 'StubDelegate', + 'Stub', + 'StructMemberHelper', + 'StructMember', + 'Struct', + 'Stroke', + 'StringWriter', + 'StringValueHelper', + 'StringTokenizer', + 'StringSelection', + 'StringRefAddr', + 'StringReader', + 'StringIndexOutOfBoundsException', + 'StringHolder', + 'StringContent', + 'StringCharacterIterator', + 'StringBufferInputStream', + 'StringBuffer', + 'String', + 'StrictMath', + 'StreamableValue', + 'Streamable', + 'StreamTokenizer', + 'StreamCorruptedException', + 'Statement', + 'StateFactory', + 'StateEditable', + 'StateEdit', + 'StackOverflowError', + 'Stack', + 'SplitPaneUI', + 'SourceDataLine', + 'SoundbankResource', + 'SoundbankReader', + 'Soundbank', + 'SortedSet', + 'SortedMap', + 'SoftReference', + 'SoftBevelBorder', + 'SocketSecurityException', + 'SocketPermission', + 'SocketOptions', + 'SocketImplFactory', + 'SocketImpl', + 'SocketException', + 'Socket', + 'SliderUI', + 'SkeletonNotFoundException', + 'SkeletonMismatchException', + 'Skeleton', + 'SizeSequence', + 'SizeRequirements', + 'SizeLimitExceededException', + 'SingleSelectionModel', + 'SinglePixelPackedSampleModel', + 'SimpleTimeZone', + 'SimpleDateFormat', + 'SimpleBeanInfo', + 'SimpleAttributeSet', + 'Signer', + 'SignedObject', + 'SignatureSpi', + 'SignatureException', + 'Signature', + 'ShortSeqHolder', + 'ShortSeqHelper', + 'ShortMessage', + 'ShortLookupTable', + 'ShortHolder', + 'Short', + 'ShapeGraphicAttribute', + 'Shape', + 'SetOverrideTypeHelper', + 'SetOverrideType', + 'Set', + 'ServiceUnavailableException', + 'ServiceInformationHolder', + 'ServiceInformationHelper', + 'ServiceInformation', + 'ServiceDetailHelper', + 'ServiceDetail', + 'ServerSocket', + 'ServerRuntimeException', + 'ServerRequest', + 'ServerRef', + 'ServerNotActiveException', + 'ServerException', + 'ServerError', + 'ServerCloneException', + 'ServantObject', + 'SerializablePermission', + 'Serializable', + 'Sequencer.SyncMode', + 'Sequencer', + 'SequenceInputStream', + 'Sequence', + 'SeparatorUI', + 'Segment', + 'SecurityPermission', + 'SecurityManager', + 'SecurityException', + 'Security', + 'SecureRandomSpi', + 'SecureRandom', + 'SecureClassLoader', + 'SearchResult', + 'SearchControls', + 'Scrollbar', + 'Scrollable', + 'ScrollPaneUI', + 'ScrollPaneLayout.UIResource', + 'ScrollPaneLayout', + 'ScrollPaneConstants', + 'ScrollPane', + 'ScrollBarUI', + 'SchemaViolationException', + 'SampleModel', + 'SQLWarning', + 'SQLPermission', + 'SQLOutput', + 'SQLInput', + 'SQLException', + 'SQLData', + 'RuntimePermission', + 'RuntimeException', + 'Runtime', + 'Runnable', + 'RunTimeOperations', + 'RunTime', + 'RuleBasedCollator', + 'RowMapper', + 'RoundRectangle2D.Float', + 'RoundRectangle2D.Double', + 'RoundRectangle2D', + 'RootPaneUI', + 'RootPaneContainer', + 'Robot', + 'ReverbType', + 'ResultSetMetaData', + 'ResultSet', + 'ResponseHandler', + 'ResourceBundle', + 'Resolver', + 'ResolveResult', + 'RescaleOp', + 'Request', + 'RepositoryIdHelper', + 'Repository', + 'ReplicateScaleFilter', + 'RepaintManager', + 'RenderingHints.Key', + 'RenderingHints', + 'Renderer', + 'RenderedImageFactory', + 'RenderedImage', + 'RenderableImageProducer', + 'RenderableImageOp', + 'RenderableImage', + 'RenderContext', + 'RemoteStub', + 'RemoteServer', + 'RemoteRef', + 'RemoteObject', + 'RemoteException', + 'RemoteCall', + 'Remote', + 'RemarshalException', + 'RegistryHandler', + 'Registry', + 'ReflectPermission', + 'ReferralException', + 'Referenceable', + 'ReferenceQueue', + 'Reference', + 'RefAddr', + 'Ref', + 'RectangularShape', + 'Rectangle2D.Float', + 'Rectangle2D.Double', + 'Rectangle2D', + 'Rectangle', + 'Receiver', + 'Reader', + 'RasterOp', + 'RasterFormatException', + 'Raster', + 'RandomAccessFile', + 'Random', + 'RTFEditorKit', + 'RSAPublicKeySpec', + 'RSAPublicKey', + 'RSAPrivateKeySpec', + 'RSAPrivateKey', + 'RSAPrivateCrtKeySpec', + 'RSAPrivateCrtKey', + 'RSAKeyGenParameterSpec', + 'RSAKey', + 'RMISocketFactory', + 'RMIServerSocketFactory', + 'RMISecurityManager', + 'RMISecurityException', + 'RMIFailureHandler', + 'RMIClientSocketFactory', + 'RMIClassLoader', + 'RGBImageFilter', + 'QuadCurve2D.Float', + 'QuadCurve2D.Double', + 'QuadCurve2D', + 'PushbackReader', + 'PushbackInputStream', + 'PublicKey', + 'Proxy', + 'ProviderException', + 'Provider', + 'ProtocolException', + 'ProtectionDomain', + 'PropertyVetoException', + 'PropertyResourceBundle', + 'PropertyPermission', + 'PropertyEditorSupport', + 'PropertyEditorManager', + 'PropertyEditor', + 'PropertyDescriptor', + 'PropertyChangeSupport', + 'PropertyChangeListener', + 'PropertyChangeEvent', + 'Properties', + 'ProgressMonitorInputStream', + 'ProgressMonitor', + 'ProgressBarUI', + 'ProfileDataException', + 'Process', + 'PrivilegedExceptionAction', + 'PrivilegedActionException', + 'PrivilegedAction', + 'PrivateKey', + 'PrinterJob', + 'PrinterIOException', + 'PrinterGraphics', + 'PrinterException', + 'PrinterAbortException', + 'Printable', + 'PrintWriter', + 'PrintStream', + 'PrintJob', + 'PrintGraphics', + 'PrincipalHolder', + 'Principal', + 'Principal', + 'PreparedStatement', + 'Position.Bias', + 'Position', + 'PortableRemoteObjectDelegate', + 'PortableRemoteObject', + 'Port.Info', + 'Port', + 'PopupMenuUI', + 'PopupMenuListener', + 'PopupMenuEvent', + 'PopupMenu', + 'Polygon', + 'PolicyTypeHelper', + 'PolicyOperations', + 'PolicyListHolder', + 'PolicyListHelper', + 'PolicyHolder', + 'PolicyHelper', + 'PolicyError', + 'Policy', + 'Policy', + 'Point2D.Float', + 'Point2D.Double', + 'Point2D', + 'Point', + 'PlainView', + 'PlainDocument', + 'PixelInterleavedSampleModel', + 'PixelGrabber', + 'PipedWriter', + 'PipedReader', + 'PipedOutputStream', + 'PipedInputStream', + 'PhantomReference', + 'Permissions', + 'PermissionCollection', + 'Permission', + 'Permission', + 'PathIterator', + 'Patch', + 'PasswordView', + 'PasswordAuthentication', + 'PartialResultException', + 'ParserDelegator', + 'Parser', + 'ParsePosition', + 'ParseException', + 'ParameterDescriptor', + 'ParameterBlock', + 'ParagraphView', + 'ParagraphView', + 'Paper', + 'PanelUI', + 'Panel', + 'PaintEvent', + 'PaintContext', + 'Paint', + 'Pageable', + 'PageFormat', + 'PageAttributes.PrintQualityType', + 'PageAttributes.OriginType', + 'PageAttributes.OrientationRequestedType', + 'PageAttributes.MediaType', + 'PageAttributes.ColorType', + 'PageAttributes', + 'PackedColorModel', + 'Package', + 'PUBLIC_MEMBER', + 'PRIVATE_MEMBER', + 'PKCS8EncodedKeySpec', + 'PERSIST_STORE', + 'Owner', + 'OverlayLayout', + 'OutputStreamWriter', + 'OutputStream', + 'OutOfMemoryError', + 'OptionalDataException', + 'OptionPaneUI', + 'Option', + 'OperationNotSupportedException', + 'Operation', + 'OpenType', + 'OctetSeqHolder', + 'OctetSeqHelper', + 'Observer', + 'Observable', + 'ObjectView', + 'ObjectStreamField', + 'ObjectStreamException', + 'ObjectStreamConstants', + 'ObjectStreamClass', + 'ObjectOutputStream.PutField', + 'ObjectOutputStream', + 'ObjectOutput', + 'ObjectInputValidation', + 'ObjectInputStream.GetField', + 'ObjectInputStream', + 'ObjectInput', + 'ObjectImpl', + 'ObjectImpl', + 'ObjectHolder', + 'ObjectHelper', + 'ObjectFactoryBuilder', + 'ObjectFactory', + 'ObjectChangeListener', + 'Object', + 'ObjID', + 'ORB', + 'OMGVMCID', + 'OBJ_ADAPTER', + 'OBJECT_NOT_EXIST', + 'NumberFormatException', + 'NumberFormat', + 'Number', + 'NullPointerException', + 'NotSerializableException', + 'NotOwnerException', + 'NotFoundReasonHolder', + 'NotFoundReasonHelper', + 'NotFoundReason', + 'NotFoundHolder', + 'NotFoundHelper', + 'NotFound', + 'NotEmptyHolder', + 'NotEmptyHelper', + 'NotEmpty', + 'NotContextException', + 'NotBoundException', + 'NotActiveException', + 'NoninvertibleTransformException', + 'NoSuchProviderException', + 'NoSuchObjectException', + 'NoSuchMethodException', + 'NoSuchMethodError', + 'NoSuchFieldException', + 'NoSuchFieldError', + 'NoSuchElementException', + 'NoSuchAttributeException', + 'NoSuchAlgorithmException', + 'NoRouteToHostException', + 'NoPermissionException', + 'NoInitialContextException', + 'NoClassDefFoundError', + 'NetPermission', + 'NegativeArraySizeException', + 'NamingSecurityException', + 'NamingManager', + 'NamingListener', + 'NamingExceptionEvent', + 'NamingException', + 'NamingEvent', + 'NamingEnumeration', + 'NamingContextOperations', + 'NamingContextHolder', + 'NamingContextHelper', + 'NamingContext', + 'Naming', + 'NamespaceChangeListener', + 'NamedValue', + 'NameValuePairHelper', + 'NameValuePair', + 'NameParser', + 'NameNotFoundException', + 'NameHolder', + 'NameHelper', + 'NameComponentHolder', + 'NameComponentHelper', + 'NameComponent', + 'NameClassPair', + 'NameAlreadyBoundException', + 'Name', + 'NVList', + 'NO_RESPONSE', + 'NO_RESOURCES', + 'NO_PERMISSION', + 'NO_MEMORY', + 'NO_IMPLEMENT', + 'MutableTreeNode', + 'MutableComboBoxModel', + 'MutableAttributeSet', + 'MultipleMaster', + 'MulticastSocket', + 'MultiViewportUI', + 'MultiTreeUI', + 'MultiToolTipUI', + 'MultiToolBarUI', + 'MultiTextUI', + 'MultiTableUI', + 'MultiTableHeaderUI', + 'MultiTabbedPaneUI', + 'MultiSplitPaneUI', + 'MultiSliderUI', + 'MultiSeparatorUI', + 'MultiScrollPaneUI', + 'MultiScrollBarUI', + 'MultiProgressBarUI', + 'MultiPopupMenuUI', + 'MultiPixelPackedSampleModel', + 'MultiPanelUI', + 'MultiOptionPaneUI', + 'MultiMenuItemUI', + 'MultiMenuBarUI', + 'MultiLookAndFeel', + 'MultiListUI', + 'MultiLabelUI', + 'MultiInternalFrameUI', + 'MultiFileChooserUI', + 'MultiDesktopPaneUI', + 'MultiDesktopIconUI', + 'MultiComboBoxUI', + 'MultiColorChooserUI', + 'MultiButtonUI', + 'MouseMotionListener', + 'MouseMotionAdapter', + 'MouseListener', + 'MouseInputListener', + 'MouseInputAdapter', + 'MouseEvent', + 'MouseDragGestureRecognizer', + 'MouseAdapter', + 'Modifier', + 'ModificationItem', + 'MixerProvider', + 'Mixer.Info', + 'Mixer', + 'MissingResourceException', + 'MinimalHTMLWriter', + 'MimeTypeParseException', + 'MidiUnavailableException', + 'MidiSystem', + 'MidiMessage', + 'MidiFileWriter', + 'MidiFileReader', + 'MidiFileFormat', + 'MidiEvent', + 'MidiDeviceProvider', + 'MidiDevice.Info', + 'MidiDevice', + 'MidiChannel', + 'MethodDescriptor', + 'Method', + 'MetalTreeUI', + 'MetalToolTipUI', + 'MetalToolBarUI', + 'MetalToggleButtonUI', + 'MetalTheme', + 'MetalTextFieldUI', + 'MetalTabbedPaneUI', + 'MetalSplitPaneUI', + 'MetalSliderUI', + 'MetalSeparatorUI', + 'MetalScrollPaneUI', + 'MetalScrollButton', + 'MetalScrollBarUI', + 'MetalRadioButtonUI', + 'MetalProgressBarUI', + 'MetalPopupMenuSeparatorUI', + 'MetalLookAndFeel', + 'MetalLabelUI', + 'MetalInternalFrameUI', + 'MetalInternalFrameTitlePane', + 'MetalIconFactory.TreeLeafIcon', + 'MetalIconFactory.TreeFolderIcon', + 'MetalIconFactory.TreeControlIcon', + 'MetalIconFactory.PaletteCloseIcon', + 'MetalIconFactory.FolderIcon16', + 'MetalIconFactory.FileIcon16', + 'MetalIconFactory', + 'MetalFileChooserUI', + 'MetalDesktopIconUI', + 'MetalComboBoxUI', + 'MetalComboBoxIcon', + 'MetalComboBoxEditor.UIResource', + 'MetalComboBoxEditor', + 'MetalComboBoxButton', + 'MetalCheckBoxUI', + 'MetalCheckBoxIcon', + 'MetalButtonUI', + 'MetalBorders.ToolBarBorder', + 'MetalBorders.ToggleButtonBorder', + 'MetalBorders.TextFieldBorder', + 'MetalBorders.TableHeaderBorder', + 'MetalBorders.ScrollPaneBorder', + 'MetalBorders.RolloverButtonBorder', + 'MetalBorders.PopupMenuBorder', + 'MetalBorders.PaletteBorder', + 'MetalBorders.OptionDialogBorder', + 'MetalBorders.MenuItemBorder', + 'MetalBorders.MenuBarBorder', + 'MetalBorders.InternalFrameBorder', + 'MetalBorders.Flush3DBorder', + 'MetalBorders.ButtonBorder', + 'MetalBorders', + 'MetaMessage', + 'MetaEventListener', + 'MessageFormat', + 'MessageDigestSpi', + 'MessageDigest', + 'MenuShortcut', + 'MenuSelectionManager', + 'MenuListener', + 'MenuKeyListener', + 'MenuKeyEvent', + 'MenuItemUI', + 'MenuItem', + 'MenuEvent', + 'MenuElement', + 'MenuDragMouseListener', + 'MenuDragMouseEvent', + 'MenuContainer', + 'MenuComponent', + 'MenuBarUI', + 'MenuBar', + 'Menu', + 'MemoryImageSource', + 'Member', + 'MediaTracker', + 'MatteBorder', + 'Math', + 'MarshalledObject', + 'MarshalException', + 'Map.Entry', + 'Map', + 'Manifest', + 'MalformedURLException', + 'MalformedLinkException', + 'MARSHAL', + 'LookupTable', + 'LookupOp', + 'LookAndFeel', + 'LongSeqHolder', + 'LongSeqHelper', + 'LongLongSeqHolder', + 'LongLongSeqHelper', + 'LongHolder', + 'Long', + 'LogStream', + 'LocateRegistry', + 'Locale', + 'LoaderHandler', + 'ListView', + 'ListUI', + 'ListSelectionModel', + 'ListSelectionListener', + 'ListSelectionEvent', + 'ListResourceBundle', + 'ListModel', + 'ListIterator', + 'ListDataListener', + 'ListDataEvent', + 'ListCellRenderer', + 'List', + 'List', + 'LinkedList', + 'LinkageError', + 'LinkRef', + 'LinkLoopException', + 'LinkException', + 'LineUnavailableException', + 'LineNumberReader', + 'LineNumberInputStream', + 'LineMetrics', + 'LineListener', + 'LineEvent.Type', + 'LineEvent', + 'LineBreakMeasurer', + 'LineBorder', + 'Line2D.Float', + 'Line2D.Double', + 'Line2D', + 'Line.Info', + 'Line', + 'LimitExceededException', + 'Lease', + 'LdapReferralException', + 'LdapContext', + 'LayoutQueue', + 'LayoutManager2', + 'LayoutManager', + 'LayeredHighlighter.LayerPainter', + 'LayeredHighlighter', + 'LastOwnerException', + 'LabelView', + 'LabelUI', + 'Label', + 'Keymap', + 'KeyStroke', + 'KeyStoreSpi', + 'KeyStoreException', + 'KeyStore', + 'KeySpec', + 'KeyPairGeneratorSpi', + 'KeyPairGenerator', + 'KeyPair', + 'KeyManagementException', + 'KeyListener', + 'KeyFactorySpi', + 'KeyFactory', + 'KeyException', + 'KeyEvent', + 'KeyAdapter', + 'Key', + 'Kernel', + 'JobAttributes.SidesType', + 'JobAttributes.MultipleDocumentHandlingType', + 'JobAttributes.DialogType', + 'JobAttributes.DestinationType', + 'JobAttributes.DefaultSelectionType', + 'JobAttributes', + 'JarURLConnection', + 'JarOutputStream', + 'JarInputStream', + 'JarFile', + 'JarException', + 'JarEntry', + 'JWindow', + 'JViewport', + 'JTree.EmptySelectionModel', + 'JTree.DynamicUtilTreeNode', + 'JTree', + 'JToolTip', + 'JToolBar.Separator', + 'JToolBar', + 'JToggleButton.ToggleButtonModel', + 'JToggleButton', + 'JTextPane', + 'JTextField', + 'JTextComponent.KeyBinding', + 'JTextComponent', + 'JTextArea', + 'JTableHeader', + 'JTable', + 'JTabbedPane', + 'JSplitPane', + 'JSlider', + 'JSeparator', + 'JScrollPane', + 'JScrollBar', + 'JRootPane', + 'JRadioButtonMenuItem', + 'JRadioButton', + 'JProgressBar', + 'JPopupMenu.Separator', + 'JPopupMenu', + 'JPasswordField', + 'JPanel', + 'JOptionPane', + 'JMenuItem', + 'JMenuBar', + 'JMenu', + 'JList', + 'JLayeredPane', + 'JLabel', + 'JInternalFrame.JDesktopIcon', + 'JInternalFrame', + 'JFrame', + 'JFileChooser', + 'JEditorPane', + 'JDialog', + 'JDesktopPane', + 'JComponent', + 'JComboBox.KeySelectionManager', + 'JComboBox', + 'JColorChooser', + 'JCheckBoxMenuItem', + 'JCheckBox', + 'JButton', + 'JApplet', + 'Iterator', + 'ItemSelectable', + 'ItemListener', + 'ItemEvent', + 'IstringHelper', + 'InvokeHandler', + 'InvocationTargetException', + 'InvocationHandler', + 'InvocationEvent', + 'InvalidValue', + 'InvalidTransactionException', + 'InvalidSeq', + 'InvalidSearchFilterException', + 'InvalidSearchControlsException', + 'InvalidParameterSpecException', + 'InvalidParameterException', + 'InvalidObjectException', + 'InvalidNameHolder', + 'InvalidNameHelper', + 'InvalidNameException', + 'InvalidName', + 'InvalidName', + 'InvalidMidiDataException', + 'InvalidKeySpecException', + 'InvalidKeyException', + 'InvalidDnDOperationException', + 'InvalidClassException', + 'InvalidAttributesException', + 'InvalidAttributeValueException', + 'InvalidAttributeIdentifierException', + 'InvalidAlgorithmParameterException', + 'Invalid', + 'Introspector', + 'IntrospectionException', + 'InterruptedNamingException', + 'InterruptedIOException', + 'InterruptedException', + 'InternalFrameUI', + 'InternalFrameListener', + 'InternalFrameEvent', + 'InternalFrameAdapter', + 'InternalError', + 'Integer', + 'IntHolder', + 'InsufficientResourcesException', + 'Instrument', + 'InstantiationException', + 'InstantiationError', + 'InsetsUIResource', + 'Insets', + 'InputVerifier', + 'InputSubset', + 'InputStreamReader', + 'InputStream', + 'InputStream', + 'InputStream', + 'InputMethodRequests', + 'InputMethodListener', + 'InputMethodHighlight', + 'InputMethodEvent', + 'InputMethodDescriptor', + 'InputMethodContext', + 'InputMethod', + 'InputMapUIResource', + 'InputMap', + 'InputEvent', + 'InputContext', + 'InlineView', + 'Initializer', + 'InitialLdapContext', + 'InitialDirContext', + 'InitialContextFactoryBuilder', + 'InitialContextFactory', + 'InitialContext', + 'InheritableThreadLocal', + 'InflaterInputStream', + 'Inflater', + 'InetAddress', + 'IndirectionException', + 'IndexedPropertyDescriptor', + 'IndexOutOfBoundsException', + 'IndexColorModel', + 'InconsistentTypeCode', + 'IncompatibleClassChangeError', + 'ImagingOpException', + 'ImageProducer', + 'ImageObserver', + 'ImageIcon', + 'ImageGraphicAttribute', + 'ImageFilter', + 'ImageConsumer', + 'Image', + 'IllegalThreadStateException', + 'IllegalStateException', + 'IllegalPathStateException', + 'IllegalMonitorStateException', + 'IllegalComponentStateException', + 'IllegalArgumentException', + 'IllegalAccessException', + 'IllegalAccessError', + 'IdentityScope', + 'Identity', + 'IdentifierHelper', + 'IconView', + 'IconUIResource', + 'Icon', + 'IRObjectOperations', + 'IRObject', + 'IOException', + 'INV_POLICY', + 'INV_OBJREF', + 'INV_IDENT', + 'INV_FLAG', + 'INVALID_TRANSACTION', + 'INTF_REPOS', + 'INTERNAL', + 'INITIALIZE', + 'IMP_LIMIT', + 'IDLTypeOperations', + 'IDLTypeHelper', + 'IDLType', + 'IDLEntity', + 'ICC_ProfileRGB', + 'ICC_ProfileGray', + 'ICC_Profile', + 'ICC_ColorSpace', + 'HyperlinkListener', + 'HyperlinkEvent.EventType', + 'HyperlinkEvent', + 'HttpURLConnection', + 'Highlighter.HighlightPainter', + 'Highlighter.Highlight', + 'Highlighter', + 'HierarchyListener', + 'HierarchyEvent', + 'HierarchyBoundsListener', + 'HierarchyBoundsAdapter', + 'Hashtable', + 'HashSet', + 'HashMap', + 'HasControls', + 'HTMLWriter', + 'HTMLFrameHyperlinkEvent', + 'HTMLEditorKit.ParserCallback', + 'HTMLEditorKit.Parser', + 'HTMLEditorKit.LinkController', + 'HTMLEditorKit.InsertHTMLTextAction', + 'HTMLEditorKit.HTMLTextAction', + 'HTMLEditorKit.HTMLFactory', + 'HTMLEditorKit', + 'HTMLDocument.Iterator', + 'HTMLDocument', + 'HTML.UnknownTag', + 'HTML.Tag', + 'HTML.Attribute', + 'HTML', + 'GuardedObject', + 'Guard', + 'Group', + 'GridLayout', + 'GridBagLayout', + 'GridBagConstraints', + 'GregorianCalendar', + 'GrayFilter', + 'GraphicsEnvironment', + 'GraphicsDevice', + 'GraphicsConfiguration', + 'GraphicsConfigTemplate', + 'Graphics2D', + 'Graphics', + 'GraphicAttribute', + 'GradientPaint', + 'GlyphView.GlyphPainter', + 'GlyphView', + 'GlyphVector', + 'GlyphMetrics', + 'GlyphJustificationInfo', + 'GeneralSecurityException', + 'GeneralPath', + 'GapContent', + 'GZIPOutputStream', + 'GZIPInputStream', + 'Frame', + 'FormatConversionProvider', + 'Format', + 'FormView', + 'FontUIResource', + 'FontRenderContext', + 'FontMetrics', + 'FontFormatException', + 'Font', + 'FocusManager', + 'FocusListener', + 'FocusEvent', + 'FocusAdapter', + 'FlowView.FlowStrategy', + 'FlowView', + 'FlowLayout', + 'FloatSeqHolder', + 'FloatSeqHelper', + 'FloatHolder', + 'FloatControl.Type', + 'FloatControl', + 'Float', + 'FlavorMap', + 'FlatteningPathIterator', + 'FixedHolder', + 'FixedHeightLayoutCache', + 'FilteredImageSource', + 'FilterWriter', + 'FilterReader', + 'FilterOutputStream', + 'FilterInputStream', + 'FilenameFilter', + 'FileWriter', + 'FileView', + 'FileSystemView', + 'FileReader', + 'FilePermission', + 'FileOutputStream', + 'FileNotFoundException', + 'FileNameMap', + 'FileInputStream', + 'FileFilter', + 'FileFilter', + 'FileDialog', + 'FileDescriptor', + 'FileChooserUI', + 'File', + 'FieldView', + 'FieldPosition', + 'FieldNameHelper', + 'Field', + 'FeatureDescriptor', + 'FREE_MEM', + 'Externalizable', + 'ExtendedResponse', + 'ExtendedRequest', + 'ExportException', + 'ExpandVetoException', + 'ExceptionList', + 'ExceptionInInitializerError', + 'Exception', + 'EventSetDescriptor', + 'EventQueue', + 'EventObject', + 'EventListenerList', + 'EventListener', + 'EventDirContext', + 'EventContext', + 'Event', + 'EtchedBorder', + 'Error', + 'Environment', + 'Enumeration', + 'EnumControl.Type', + 'EnumControl', + 'Entity', + 'EncodedKeySpec', + 'EmptyStackException', + 'EmptyBorder', + 'Ellipse2D.Float', + 'Ellipse2D.Double', + 'Ellipse2D', + 'ElementIterator', + 'Element', + 'EditorKit', + 'EOFException', + 'DynamicImplementation', + 'DynValue', + 'DynUnion', + 'DynStruct', + 'DynSequence', + 'DynFixed', + 'DynEnum', + 'DynArray', + 'DynAny', + 'DropTargetListener', + 'DropTargetEvent', + 'DropTargetDropEvent', + 'DropTargetDragEvent', + 'DropTargetContext', + 'DropTarget.DropTargetAutoScroller', + 'DropTarget', + 'DriverPropertyInfo', + 'DriverManager', + 'Driver', + 'DragSourceListener', + 'DragSourceEvent', + 'DragSourceDropEvent', + 'DragSourceDragEvent', + 'DragSourceContext', + 'DragSource', + 'DragGestureRecognizer', + 'DragGestureListener', + 'DragGestureEvent', + 'DoubleSeqHolder', + 'DoubleSeqHelper', + 'DoubleHolder', + 'Double', + 'DomainManagerOperations', + 'DomainManager', + 'DomainCombiner', + 'DocumentParser', + 'DocumentListener', + 'DocumentEvent.EventType', + 'DocumentEvent.ElementChange', + 'DocumentEvent', + 'Document', + 'DnDConstants', + 'DirectoryManager', + 'DirectColorModel', + 'DirStateFactory.Result', + 'DirStateFactory', + 'DirObjectFactory', + 'DirContext', + 'DimensionUIResource', + 'Dimension2D', + 'Dimension', + 'DigestOutputStream', + 'DigestInputStream', + 'DigestException', + 'Dictionary', + 'Dialog', + 'DesktopPaneUI', + 'DesktopManager', + 'DesktopIconUI', + 'DesignMode', + 'Delegate', + 'DeflaterOutputStream', + 'Deflater', + 'DefinitionKindHelper', + 'DefinitionKind', + 'DefaultTreeSelectionModel', + 'DefaultTreeModel', + 'DefaultTreeCellRenderer', + 'DefaultTreeCellEditor', + 'DefaultTextUI', + 'DefaultTableModel', + 'DefaultTableColumnModel', + 'DefaultTableCellRenderer.UIResource', + 'DefaultTableCellRenderer', + 'DefaultStyledDocument.ElementSpec', + 'DefaultStyledDocument.AttributeUndoableEdit', + 'DefaultStyledDocument', + 'DefaultSingleSelectionModel', + 'DefaultMutableTreeNode', + 'DefaultMetalTheme', + 'DefaultMenuLayout', + 'DefaultListSelectionModel', + 'DefaultListModel', + 'DefaultListCellRenderer.UIResource', + 'DefaultListCellRenderer', + 'DefaultHighlighter.DefaultHighlightPainter', + 'DefaultHighlighter', + 'DefaultFocusManager', + 'DefaultEditorKit.PasteAction,', + 'DefaultEditorKit.InsertTabAction', + 'DefaultEditorKit.InsertContentAction', + 'DefaultEditorKit.InsertBreakAction', + 'DefaultEditorKit.DefaultKeyTypedAction', + 'DefaultEditorKit.CutAction', + 'DefaultEditorKit.CopyAction', + 'DefaultEditorKit.BeepAction', + 'DefaultEditorKit', + 'DefaultDesktopManager', + 'DefaultComboBoxModel', + 'DefaultColorSelectionModel', + 'DefaultCellEditor', + 'DefaultCaret', + 'DefaultButtonModel', + 'DefaultBoundedRangeModel', + 'DecimalFormatSymbols', + 'DecimalFormat', + 'DebugGraphics', + 'DateFormatSymbols', + 'DateFormat', + 'Date', + 'DatagramSocketImplFactory', + 'DatagramSocketImpl', + 'DatagramSocket', + 'DatagramPacket', + 'DatabaseMetaData', + 'DataTruncation', + 'DataOutputStream', + 'DataOutputStream', + 'DataOutput', + 'DataLine.Info', + 'DataLine', + 'DataInputStream', + 'DataInput', + 'DataFormatException', + 'DataFlavor', + 'DataBufferUShort', + 'DataBufferShort', + 'DataBufferInt', + 'DataBufferByte', + 'DataBuffer', + 'DTDConstants', + 'DTD', + 'DSAPublicKeySpec', + 'DSAPublicKey', + 'DSAPrivateKeySpec', + 'DSAPrivateKey', + 'DSAParams', + 'DSAParameterSpec', + 'DSAKeyPairGenerator', + 'DSAKey', + 'DGC', + 'DATA_CONVERSION', + 'Customizer', + 'CustomValue', + 'CustomMarshal', + 'Cursor', + 'CurrentOperations', + 'CurrentHolder', + 'CurrentHelper', + 'Current', + 'CubicCurve2D.Float', + 'CubicCurve2D.Double', + 'CubicCurve2D', + 'CropImageFilter', + 'ConvolveOp', + 'ControllerEventListener', + 'ControlFactory', + 'Control.Type', + 'Control', + 'ContextualRenderedImageFactory', + 'ContextNotEmptyException', + 'ContextList', + 'Context', + 'ContentModel', + 'ContentHandlerFactory', + 'ContentHandler', + 'ContainerListener', + 'ContainerEvent', + 'ContainerAdapter', + 'Container', + 'Constructor', + 'Connection', + 'ConnectIOException', + 'ConnectException', + 'ConnectException', + 'ConfigurationException', + 'ConcurrentModificationException', + 'CompoundName', + 'CompoundEdit', + 'CompoundControl.Type', + 'CompoundControl', + 'CompoundBorder', + 'CompositeView', + 'CompositeName', + 'CompositeContext', + 'Composite', + 'ComponentView', + 'ComponentUI', + 'ComponentSampleModel', + 'ComponentOrientation', + 'ComponentListener', + 'ComponentInputMapUIResource', + 'ComponentInputMap', + 'ComponentEvent', + 'ComponentColorModel', + 'ComponentAdapter', + 'Component', + 'CompletionStatusHelper', + 'CompletionStatus', + 'Compiler', + 'Comparator', + 'Comparable', + 'CommunicationException', + 'ComboPopup', + 'ComboBoxUI', + 'ComboBoxModel', + 'ComboBoxEditor', + 'ColorUIResource', + 'ColorSpace', + 'ColorSelectionModel', + 'ColorModel', + 'ColorConvertOp', + 'ColorChooserUI', + 'ColorChooserComponentFactory', + 'Color', + 'Collections', + 'Collection', + 'Collator', + 'CollationKey', + 'CollationElementIterator', + 'CodeSource', + 'Cloneable', + 'CloneNotSupportedException', + 'Clob', + 'ClipboardOwner', + 'Clipboard', + 'Clip', + 'ClassNotFoundException', + 'ClassLoader', + 'ClassFormatError', + 'ClassDesc', + 'ClassCircularityError', + 'ClassCastException', + 'Class', + 'ChoiceFormat', + 'Choice', + 'Checksum', + 'CheckedOutputStream', + 'CheckedInputStream', + 'CheckboxMenuItem', + 'CheckboxGroup', + 'Checkbox', + 'CharacterIterator', + 'Character.UnicodeBlock', + 'Character.Subset', + 'Character', + 'CharSeqHolder', + 'CharSeqHelper', + 'CharHolder', + 'CharConversionException', + 'CharArrayWriter', + 'CharArrayReader', + 'ChangedCharSetException', + 'ChangeListener', + 'ChangeEvent', + 'CertificateParsingException', + 'CertificateNotYetValidException', + 'CertificateFactorySpi', + 'CertificateFactory', + 'CertificateExpiredException', + 'CertificateException', + 'CertificateEncodingException', + 'Certificate.CertificateRep', + 'Certificate', + 'CellRendererPane', + 'CellEditorListener', + 'CellEditor', + 'CaretListener', + 'CaretEvent', + 'Caret', + 'CardLayout', + 'Canvas', + 'CannotUndoException', + 'CannotRedoException', + 'CannotProceedHolder', + 'CannotProceedHelper', + 'CannotProceedException', + 'CannotProceed', + 'CallableStatement', + 'Calendar', + 'CTX_RESTRICT_SCOPE', + 'CSS.Attribute', + 'CSS', + 'CRLException', + 'CRL', + 'CRC32', + 'COMM_FAILURE', + 'CMMException', + 'ByteLookupTable', + 'ByteHolder', + 'ByteArrayOutputStream', + 'ByteArrayInputStream', + 'Byte', + 'ButtonUI', + 'ButtonModel', + 'ButtonGroup', + 'Button', + 'BufferedWriter', + 'BufferedReader', + 'BufferedOutputStream', + 'BufferedInputStream', + 'BufferedImageOp', + 'BufferedImageFilter', + 'BufferedImage', + 'BreakIterator', + 'BoxedValueHelper', + 'BoxView', + 'BoxLayout', + 'Box.Filler', + 'Box', + 'Bounds', + 'BoundedRangeModel', + 'BorderUIResource.TitledBorderUIResource', + 'BorderUIResource.MatteBorderUIResource', + 'BorderUIResource.LineBorderUIResource', + 'BorderUIResource.EtchedBorderUIResource', + 'BorderUIResource.EmptyBorderUIResource', + 'BorderUIResource.CompoundBorderUIResource', + 'BorderUIResource.BevelBorderUIResource', + 'BorderUIResource', + 'BorderLayout', + 'BorderFactory', + 'Border', + 'BooleanSeqHolder', + 'BooleanSeqHelper', + 'BooleanHolder', + 'BooleanControl.Type', + 'BooleanControl', + 'Boolean', + 'Book', + 'BlockView', + 'Blob', + 'BitSet', + 'BindingTypeHolder', + 'BindingTypeHelper', + 'BindingType', + 'BindingListHolder', + 'BindingListHelper', + 'BindingIteratorOperations', + 'BindingIteratorHolder', + 'BindingIteratorHelper', + 'BindingIterator', + 'BindingHolder', + 'BindingHelper', + 'Binding', + 'BindException', + 'BinaryRefAddr', + 'BigInteger', + 'BigDecimal', + 'BevelBorder', + 'Beans', + 'BeanInfo', + 'BeanDescriptor', + 'BeanContextSupport.BCSIterator', + 'BeanContextSupport', + 'BeanContextServicesSupport.BCSSServiceProvider', + 'BeanContextServicesSupport', + 'BeanContextServicesListener', + 'BeanContextServices', + 'BeanContextServiceRevokedListener', + 'BeanContextServiceRevokedEvent', + 'BeanContextServiceProviderBeanInfo', + 'BeanContextServiceProvider', + 'BeanContextServiceAvailableEvent', + 'BeanContextProxy', + 'BeanContextMembershipListener', + 'BeanContextMembershipEvent', + 'BeanContextEvent', + 'BeanContextContainerProxy', + 'BeanContextChildSupport', + 'BeanContextChildComponentProxy', + 'BeanContextChild', + 'BeanContext', + 'BatchUpdateException', + 'BasicViewportUI', + 'BasicTreeUI', + 'BasicToolTipUI', + 'BasicToolBarUI', + 'BasicToolBarSeparatorUI', + 'BasicToggleButtonUI', + 'BasicTextUI.BasicHighlighter', + 'BasicTextUI.BasicCaret', + 'BasicTextUI', + 'BasicTextPaneUI', + 'BasicTextFieldUI', + 'BasicTextAreaUI', + 'BasicTableUI', + 'BasicTableHeaderUI', + 'BasicTabbedPaneUI', + 'BasicStroke', + 'BasicSplitPaneUI', + 'BasicSplitPaneDivider', + 'BasicSliderUI', + 'BasicSeparatorUI', + 'BasicScrollPaneUI', + 'BasicScrollBarUI', + 'BasicRootPaneUI', + 'BasicRadioButtonUI', + 'BasicRadioButtonMenuItemUI', + 'BasicProgressBarUI', + 'BasicPopupMenuUI', + 'BasicPopupMenuSeparatorUI', + 'BasicPermission', + 'BasicPasswordFieldUI', + 'BasicPanelUI', + 'BasicOptionPaneUI.ButtonAreaLayout', + 'BasicOptionPaneUI', + 'BasicMenuUI', + 'BasicMenuItemUI', + 'BasicMenuBarUI', + 'BasicLookAndFeel', + 'BasicListUI', + 'BasicLabelUI', + 'BasicInternalFrameUI', + 'BasicInternalFrameTitlePane', + 'BasicIconFactory', + 'BasicHTML', + 'BasicGraphicsUtils', + 'BasicFileChooserUI', + 'BasicEditorPaneUI', + 'BasicDirectoryModel', + 'BasicDesktopPaneUI', + 'BasicDesktopIconUI', + 'BasicComboPopup', + 'BasicComboBoxUI', + 'BasicComboBoxRenderer.UIResource', + 'BasicComboBoxRenderer', + 'BasicComboBoxEditor.UIResource', + 'BasicComboBoxEditor', + 'BasicColorChooserUI', + 'BasicCheckBoxUI', + 'BasicCheckBoxMenuItemUI', + 'BasicButtonUI', + 'BasicButtonListener', + 'BasicBorders.ToggleButtonBorder', + 'BasicBorders.SplitPaneBorder', + 'BasicBorders.RadioButtonBorder', + 'BasicBorders.MenuBarBorder', + 'BasicBorders.MarginBorder', + 'BasicBorders.FieldBorder', + 'BasicBorders.ButtonBorder', + 'BasicBorders', + 'BasicAttributes', + 'BasicAttribute', + 'BasicArrowButton', + 'BandedSampleModel', + 'BandCombineOp', + 'BadLocationException', + 'BadKind', + 'BAD_TYPECODE', + 'BAD_POLICY_VALUE', + 'BAD_POLICY_TYPE', + 'BAD_POLICY', + 'BAD_PARAM', + 'BAD_OPERATION', + 'BAD_INV_ORDER', + 'BAD_CONTEXT', + 'Autoscroll', + 'Authenticator', + 'AuthenticationNotSupportedException', + 'AuthenticationException', + 'AudioSystem', + 'AudioPermission', + 'AudioInputStream', + 'AudioFormat.Encoding', + 'AudioFormat', + 'AudioFileWriter', + 'AudioFileReader', + 'AudioFileFormat.Type', + 'AudioFileFormat', + 'AudioClip', + 'Attributes.Name', + 'Attributes', + 'AttributedString', + 'AttributedCharacterIterator.Attribute', + 'AttributedCharacterIterator', + 'AttributeSet.ParagraphAttribute', + 'AttributeSet.FontAttribute', + 'AttributeSet.ColorAttribute', + 'AttributeSet.CharacterAttribute', + 'AttributeSet', + 'AttributeModificationException', + 'AttributeList', + 'AttributeInUseException', + 'Attribute', + 'AsyncBoxView', + 'Arrays', + 'ArrayStoreException', + 'ArrayList', + 'ArrayIndexOutOfBoundsException', + 'Array', + 'ArithmeticException', + 'AreaAveragingScaleFilter', + 'Area', + 'Arc2D.Float', + 'Arc2D.Double', + 'Arc2D', + 'ApplicationException', + 'AppletStub', + 'AppletInitializer', + 'AppletContext', + 'Applet', + 'AnySeqHolder', + 'AnySeqHelper', + 'AnyHolder', + 'Any', + 'Annotation', + 'AncestorListener', + 'AncestorEvent', + 'AlreadyBoundHolder', + 'AlreadyBoundHelper', + 'AlreadyBoundException', + 'AlreadyBound', + 'AlphaComposite', + 'AllPermission', + 'AlgorithmParametersSpi', + 'AlgorithmParameters', + 'AlgorithmParameterSpec', + 'AlgorithmParameterGeneratorSpi', + 'AlgorithmParameterGenerator', + 'AffineTransformOp', + 'AffineTransform', + 'Adler32', + 'AdjustmentListener', + 'AdjustmentEvent', + 'Adjustable', + 'ActiveEvent', + 'Activator', + 'ActivationSystem', + 'ActivationMonitor', + 'ActivationInstantiator', + 'ActivationID', + 'ActivationGroupID', + 'ActivationGroupDesc.CommandEnvironment', + 'ActivationGroupDesc', + 'ActivationGroup', + 'ActivationException', + 'ActivationDesc', + 'ActivateFailedException', + 'Activatable', + 'ActionMapUIResource', + 'ActionMap', + 'ActionListener', + 'ActionEvent', + 'Action', + 'AclNotFoundException', + 'AclEntry', + 'Acl', + 'AccessibleValue', + 'AccessibleText', + 'AccessibleTableModelChange', + 'AccessibleTable', + 'AccessibleStateSet', + 'AccessibleState', + 'AccessibleSelection', + 'AccessibleRole', + 'AccessibleResourceBundle', + 'AccessibleRelationSet', + 'AccessibleRelation', + 'AccessibleObject', + 'AccessibleIcon', + 'AccessibleHypertext', + 'AccessibleHyperlink', + 'AccessibleContext', + 'AccessibleComponent', + 'AccessibleBundle', + 'AccessibleAction', + 'Accessible', + 'AccessException', + 'AccessController', + 'AccessControlException', + 'AccessControlContext', + 'AbstractWriter', + 'AbstractUndoableEdit', + 'AbstractTableModel', + 'AbstractSet', + 'AbstractSequentialList', + 'AbstractMethodError', + 'AbstractMap', + 'AbstractListModel', + 'AbstractList', + 'AbstractLayoutCache.NodeDimensions', + 'AbstractLayoutCache', + 'AbstractDocument.ElementEdit', + 'AbstractDocument.Content', + 'AbstractDocument.AttributeContext', + 'AbstractDocument', + 'AbstractColorChooserPanel', + 'AbstractCollection', + 'AbstractCellEditor', + 'AbstractButton', + 'AbstractBorder', + 'AbstractAction', + 'AWTPermission', + 'AWTException', + 'AWTEventMulticaster', + 'AWTEventListener', + 'AWTEvent', + 'AWTError', + 'ARG_OUT', + 'ARG_INOUT', + 'ARG_IN' + ), + 4 => array( + 'void', + 'short', + 'long', + 'int', + 'double', + 'char', + 'byte', + 'boolean', + 'float' + ), + 5 => array( + 'toList', + 'subMap', + 'sort', + 'size', + 'reverseEach', + 'reverse', + 'pop', + 'min', + 'max', + 'join', + 'intersect', + 'inject', + 'grep', + 'get', + 'flatten', + 'findIndexOf', + 'findAll', + 'find', + 'eachWithIndex', + 'eachPropertyName', + 'eachProperty', + 'each', + 'count', + 'collect', + 'asSynchronized', + 'asImmutable', + 'allProperties' + ), + 6 => array( + 'tokenize', + 'toURL', + 'toLong', + 'toList', + 'toCharacter', + 'padRight', + 'padLeft', + 'eachMatch', + 'contains', + 'center' + ), + 7 => array( + 'writeLine', + 'write', + 'withWriterAppend', + 'withWriter', + 'withStreams', + 'withStream', + 'withReader', + 'withPrintWriter', + 'withOutputStream', + 'transformLine', + 'transformChar', + 'splitEachLine', + 'getText', + 'filterLine', + 'encodeBase64', + 'eachLines', + 'eachLine', + 'eachFileRecurse', + 'eachFile', + 'eachByte', + 'append' + ), + 8 => array( + 'dump', + 'inspect', + 'invokeMethod', + 'print', + 'println', + 'step', + 'times', + 'upto', + 'use', + 'getText', + 'start', + 'startDaemon', + 'getLastMatcher' + ), + 9 => array( + 'Sql', + 'call', + 'eachRow', + 'execute', + 'executeUpdate', + 'close' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '*', '&', '%', '!', ';', '<', '>', '?', '|', '=' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true, + 9 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #aaaadd; font-weight: bold;', + 4 => 'color: #993333;', + 5 => 'color: #663399;', + 6 => 'color: #CC0099;', + 7 => 'color: #FFCC33;', + 8 => 'color: #993399;', + 9 => 'color: #993399; font-weight: bold;' + ), + 'COMMENTS' => array( + 1=> 'color: #808080; font-style: italic;', + 2=> 'color: #a1a100;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + 0 => 'color: #0000ff;' + ) + ), + 'URLS' => array( + 1 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}', + 2 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}', + 3 => 'http://www.google.de/search?as_q={FNAME}&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F', + 4 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}', + 5 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}', + 6 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}', + 7 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}', + 8 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}', + 9 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + 0 => '\\$\\{[a-zA-Z_][a-zA-Z0-9_]*\\}' + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/haskell.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/haskell.php new file mode 100644 index 0000000..2971d08 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/haskell.php @@ -0,0 +1,195 @@ + 'Haskell', + 'COMMENT_SINGLE' => array( 1 => '--'), + 'COMMENT_MULTI' => array('{-' => '-}'), + 'CASE_KEYWORDS' => 0, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => "\\", + 'KEYWORDS' => array( + /* main haskell keywords */ + 1 => array( + 'as', + 'case', 'of', 'class', 'data', 'default', + 'deriving', 'do', 'forall', 'hiding', 'if', 'then', + 'else', 'import', 'infix', 'infixl', 'infixr', + 'instance', 'let', 'in', 'module', 'newtype', + 'qualified', 'type', 'where' + ), + /* define names of main librarys, so we can link to it */ + 2 => array( + 'Foreign', 'Numeric', 'Prelude' + ), + /* just link to Prelude functions, cause it's the default opened library when starting Haskell */ + 3 => array( + 'not', 'otherwise', 'maybe', + 'either', 'fst', 'snd', 'curry', 'uncurry', + 'compare', + 'max', 'min', 'succ', 'pred', 'toEnum', 'fromEnum', + 'enumFrom', 'enumFromThen', 'enumFromTo', + 'enumFromThenTo', 'minBound', 'maxBound', + 'negate', 'abs', 'signum', + 'fromInteger', 'toRational', 'quot', 'rem', + 'div', 'mod', 'quotRem', 'divMod', 'toInteger', + 'recip', 'fromRational', 'pi', 'exp', + 'log', 'sqrt', 'logBase', 'sin', 'cos', + 'tan', 'asin', 'acos', 'atan', 'sinh', 'cosh', + 'tanh', 'asinh', 'acosh', 'atanh', + 'properFraction', 'truncate', 'round', 'ceiling', + 'floor', 'floatRadix', 'floatDigits', 'floatRange', + 'decodeFloat', 'encodeFloat', 'exponent', + 'significand', 'scaleFloat', 'isNaN', 'isInfinite', + 'isDenomalized', 'isNegativeZero', 'isIEEE', + 'atan2', 'subtract', 'even', 'odd', 'gcd', + 'lcm', 'fromIntegral', 'realToFrac', + 'return', 'fail', 'fmap', + 'mapM', 'mapM_', 'sequence', 'sequence_', + 'id', 'const','flip', + 'until', 'asTypeOf', 'error', 'undefined', + 'seq','map','filter', 'head', + 'last', 'tail', 'init', 'null', 'length', + 'reverse', 'foldl', 'foldl1', 'foldr', + 'foldr1', 'and', 'or', 'any', 'all', 'sum', + 'product', 'concat', 'concatMap', 'maximum', + 'minimum', 'scanl', 'scanl1', 'scanr', 'scanr1', + 'iterate', 'repeat', 'cycle', 'take', 'drop', + 'splitAt', 'teakWhile', 'dropWhile', 'span', + 'break', 'elem', 'notElem', 'lookup', 'zip', + 'zip3', 'zipWith', 'zipWith3', 'unzip', 'unzip3', + 'unzip', 'unzip3', 'lines', 'words', 'unlines', + 'unwords', 'showPrec', 'show', 'showList', + 'shows', 'showChar', 'showString', 'showParen', + 'readsPrec', 'readList', 'reads', 'readParen', + 'read', 'lex', 'putChar', 'putStr', 'putStrLn', + 'print', 'getChar', 'getLine', 'getContents', + 'interact', 'readFile', 'writeFile', 'appendFile', + 'readIO', 'readLn', 'ioError', 'userError', 'catch' + ), + /* here Prelude Types */ + 4 => array ( + 'Bool', 'Maybe', 'Either', 'Ord', 'Ordering', + 'Char', 'String', 'Eq', 'Enum', 'Bounded', + 'Int', 'Integer', 'Float', 'Double', 'Rational', + 'Num', 'Real', 'Integral', 'Fractional', + 'Floating', 'RealFrac', 'RealFloat', 'Monad', + 'Functor', 'Show', 'ShowS', 'Read', 'ReadS', + 'IO' + ), + /* finally Prelude Exceptions */ + 5 => array ( + 'IOError', 'IOException' + ) + ), + /* highlighting symbols is really important in Haskell */ + 'SYMBOLS' => array( + '|', '->', '<-', '@', '!', '::', '_', '~', '=', + '&&', '||', '==', '/=', '<', '<=', '>', + '>=','+', '-', '*','/', '**', '^', '^^', + '>>=', '>>', '=<<', '$', '.', '$!', + '++', '!!' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => true, + 2 => true, /* functions name are case seinsitive */ + 3 => true, /* types name too */ + 4 => true, /* finally exceptions too */ + 5 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #06c; font-weight: bold;', /* nice blue */ + 2 => 'color: #06c; font-weight: bold;', /* blue as well */ + 3 => 'font-weight: bold;', /* make the preduled functions bold */ + 4 => 'color: #cccc00; font-weight: bold;', /* give types a different bg */ + 5 => 'color: maroon;' + ), + 'COMMENTS' => array( + 1 => 'color: #5d478b; font-style: italic;', + 'MULTI' => 'color: #5d478b; font-style: italic;' /* light purpHle */ + ), + 'ESCAPE_CHAR' => array( + ), + 'BRACKETS' => array( + 0 => 'color: green;' + ), + 'STRINGS' => array( + 0 => 'background-color: #3cb371;' /* nice green */ + ), + 'NUMBERS' => array( + 0 => 'color: red;' /* pink */ + ), + 'METHODS' => array( + 1 => 'color: #060;' /* dark green */ + ), + 'REGEXPS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66; font-weight: bold;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + /* some of keywords are Prelude functions */ + 1 => '', + /* link to the wanted library */ + 2 => 'http://haskell.org/ghc/docs/latest/html/libraries/base/{FNAME}.html', + /* link to Prelude functions */ + 3 => 'http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:{FNAME}', + /* link to Prelude types */ + 4 => 'http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t:{FNAME}', + /* link to Prelude exceptions */ + 5 => 'http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t:{FNAME}', + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/html4strict.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/html4strict.php new file mode 100644 index 0000000..9915647 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/html4strict.php @@ -0,0 +1,255 @@ + 'HTML', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array(''), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + ), + 2 => array( + '<a>', '<abbr>', '<acronym>', '<address>', '<applet>', + '<a', '<abbr', '<acronym', '<address', '<applet', + '</a>', '</abbr>', '</acronym>', '</address>', '</applet>', + '</a', '</abbr', '</acronym', '</address', '</applet', + + '<base>', '<basefont>', '<bdo>', '<big>', '<blockquote>', '<body>', '<br>', '<button>', '<b>', + '<base', '<basefont', '<bdo', '<big', '<blockquote', '<body', '<br', '<button', '<b', + '</base>', '</basefont>', '</bdo>', '</big>', '</blockquote>', '</body>', '</br>', '</button>', '</b>', + '</base', '</basefont', '</bdo', '</big', '</blockquote', '</body', '</br', '</button', '</b', + + '<caption>', '<center>', '<cite>', '<code>', '<colgroup>', '<col>', + '<caption', '<center', '<cite', '<code', '<colgroup', '<col', + '</caption>', '</center>', '</cite>', '</code>', '</colgroup>', '</col>', + '</caption', '</center', '</cite', '</code', '</colgroup', '</col', + + '<dd>', '<del>', '<dfn>', '<dir>', '<div>', '<dl>', '<dt>', + '<dd', '<del', '<dfn', '<dir', '<div', '<dl', '<dt', + '</dd>', '</del>', '</dfn>', '</dir>', '</div>', '</dl>', '</dt>', + '</dd', '</del', '</dfn', '</dir', '</div', '</dl', '</dt', + + '<em>', + '<em', + '</em>', + '</em', + + '<fieldset>', '<font>', '<form>', '<frame>', '<frameset>', + '<fieldset', '<font', '<form', '<frame', '<frameset', + '</fieldset>', '</font>', '</form>', '</frame>', '</frameset>', + '</fieldset', '</font', '</form', '</frame', '</frameset', + + '<h1>', '<h2>', '<h3>', '<h4>', '<h5>', '<h6>', '<head>', '<hr>', '<html>', + '<h1', '<h2', '<h3', '<h4', '<h5', '<h6', '<head', '<hr', '<html', + '</h1>', '</h2>', '</h3>', '</h4>', '</h5>', '</h6>', '</head>', '</hr>', '</html>', + '</h1', '</h2', '</h3', '</h4', '</h5', '</h6', '</head', '</hr', '</html', + + '<iframe>', '<ilayer>', '<img>', '<input>', '<ins>', '<isindex>', '<i>', + '<iframe', '<ilayer', '<img', '<input', '<ins', '<isindex', '<i', + '</iframe>', '</ilayer>', '</img>', '</input>', '</ins>', '</isindex>', '</i>', + '</iframe', '</ilayer', '</img', '</input', '</ins', '</isindex', '</i', + + '<kbd>', + '<kbd', + '&t;/kbd>', + '</kbd', + + '<label>', '<legend>', '<link>', '<li>', + '<label', '<legend', '<link', '<li', + '</label>', '</legend>', '</link>', '</li>', + '</label', '</legend', '</link', '</li', + + '<map>', '<meta>', + '<map', '<meta', + '</map>', '</meta>', + '</map', '</meta', + + '<noframes>', '<noscript>', + '<noframes', '<noscript', + '</noframes>', '</noscript>', + '</noframes', '</noscript', + + '<object>', '<ol>', '<optgroup>', '<option>', + '<object', '<ol', '<optgroup', '<option', + '</object>', '</ol>', '</optgroup>', '</option>', + '</object', '</ol', '</optgroup', '</option', + + '<param>', '<pre>', '<p>', + '<param', '<pre', '<p', + '</param>', '</pre>', '</p>', + '</param', '</pre', '</p', + + '<q>', + '<q', + '</q>', + '</q', + + '<samp>', '<script>', '<select>', '<small>', '<span>', '<strike>', '<strong>', '<style>', '<sub>', '<sup>', '<s>', + '<samp', '<script', '<select', '<small', '<span', '<strike', '<strong', '<style', '<sub', '<sup', '<s', + '</samp>', '</script>', '</select>', '</small>', '</span>', '</strike>', '</strong>', '</style>', '</sub>', '</sup>', '</s>', + '</samp', '</script', '</select', '</small', '</span', '</strike', '</strong', '</style', '</sub', '</sup', '</s', + + '<table>', '<tbody>', '<td>', '<textarea>', '<text>', '<tfoot>', '<thead>', '<th>', '<title>', '<tr>', '<tt>', + '<table', '<tbody', '<td', '<textarea', '<text', '<tfoot', '<tfoot', '<thead', '<th', '<title', '<tr', '<tt', + '</table>', '</tbody>', '</td>', '</textarea>', '</text>', '</tfoot>', '</thead', '</tfoot', '</th>', '</title>', '</tr>', '</tt>', + '</table', '</tbody', '</td', '</textarea', '</text', '</tfoot', '</tfoot', '</thead', '</th', '</title', '</tr', '</tt', + + '<ul>', '<u>', + '<ul', '<u', + '</ul>', '</ul>', + '</ul', '</u', + + '<var>', + '<var', + '</var>', + '</var', + + '>', '<' + ), + 3 => array( + 'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis', + 'background', 'bgcolor', 'border', + 'cellpadding', 'cellspacing', 'char', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords', + 'data', 'datetime', 'declare', 'defer', 'dir', 'disabled', + 'enctype', + 'face', 'for', 'frame', 'frameborder', + 'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv', + 'id', 'ismap', + 'label', 'lang', 'language', 'link', 'longdesc', + 'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple', + 'name', 'nohref', 'noresize', 'noshade', 'nowrap', + 'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onreset', 'onselect', 'onsubmit', 'onunload', + 'profile', 'prompt', + 'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules', + 'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary', + 'tabindex', 'target', 'text', 'title', 'type', + 'usemap', + 'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace', + 'width' + ) + ), + 'SYMBOLS' => array( + '/', '=' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;' + ), + 'COMMENTS' => array( + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + 0 => 'color: #00bbdd;', + 1 => 'color: #ddbb00;', + 2 => 'color: #009900;' + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => 'http://december.com/html/4/element/{FNAME}.html', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, + 'SCRIPT_DELIMITERS' => array( + 0 => array( + ' '>' + ), + 1 => array( + '&' => ';' + ), + 2 => array( + '<' => '>' + ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => false, + 1 => false, + 2 => true + ), + 'TAB_WIDTH' => 4 +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/idl.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/idl.php new file mode 100644 index 0000000..fd6829b --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/idl.php @@ -0,0 +1,119 @@ + 'Uno Idl', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'published', 'get', 'set', 'service', 'singleton', 'type', 'module', 'interface', 'struct', + 'const', 'constants', 'exception', 'enum', 'raises', 'typedef' + ), + 2 => array( + 'bound', 'maybeambiguous', 'maybedefault', 'maybevoid', 'oneway', 'optional', + 'readonly', 'in', 'out', 'inout', 'attribute', 'transient', 'removable' + ), + 3 => array( + 'True', 'False', 'TRUE', 'FALSE' + ), + 4 => array( + 'string', 'long', 'byte', 'hyper', 'boolean', 'any', 'char', 'double', 'long', + 'void', 'sequence', 'unsigned', '...' + ), + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':', ';' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #990078; font-weight: bold', + 2 => 'color: #36dd1c;', + 3 => 'color: #990078; font-weight: bold', + 4 => 'color: #0000ec;' + ), + 'COMMENTS' => array( + 1 => 'color: #3f7f5f;', + 2 => 'color: #808080;', + 'MULTI' => 'color: #4080ff; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #666666; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #808080;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #0000dd;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + 1 => '::' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/ini.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/ini.php new file mode 100644 index 0000000..b7de9af --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/ini.php @@ -0,0 +1,123 @@ + 'INI', + 'COMMENT_SINGLE' => array(0 => ';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + ), + 'SYMBOLS' => array( + '[', ']', '=' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + ), + 'COMMENTS' => array( + 0 => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => '' + ), + 'BRACKETS' => array( + 0 => '' + ), + 'STRINGS' => array( + 0 => 'color: #933;' + ), + 'NUMBERS' => array( + 0 => '' + ), + 'METHODS' => array( + 0 => '' + ), + 'SYMBOLS' => array( + 0 => 'color: #000066; font-weight:bold;' + ), + 'REGEXPS' => array( + 0 => 'color: #000066; font-weight:bold;', + 1 => 'color: #000099;', + 2 => 'color: #660066;' + ), + 'SCRIPT' => array( + 0 => '' + ) + ), + 'URLS' => array( + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + 0 => '\[.+\]', + 1 => array( + GESHI_SEARCH => '([a-zA-Z0-9_]+\s*)=(.+)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '=\\2' + ), + 2 => array( + // Evil hackery to get around GeSHi bug: <>" and ; are added so s can be matched + // Explicit match on variable names because if a comment is before the first < of the span + // gets chewed up... + GESHI_SEARCH => '([<>";a-zA-Z0-9_]+\s*)=(.+)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1=', + GESHI_AFTER => '' + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/inno.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/inno.php new file mode 100644 index 0000000..3b8fc92 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/inno.php @@ -0,0 +1,213 @@ + 'Inno', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('(*' => '*)'), + 'CASE_KEYWORDS' => 0, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array('Setup','Types','Components','Tasks','Dirs','Files','Icons','INI','InstallDelete','Languages','Messages', + 'CustomMessage','LangOptions','Registry','RUN','UninstallDelete','UninstallRun' + ,'app','win','sys','syswow64','src','sd','pf','pf32','pf64','cf','cf32','cf64','tmp','fonts','dao', + 'group','localappdata','sendto','userappdata','commonappdata','userdesktop','commondesktop','userdocs', + 'commondocs','userfavorites','commonfavorites','userprograms','commonprograms','userstartmenu', + 'commonstartmenu','userstartup','commonstartup','usertemplates','commontemplates' + ), + 2 => array( + 'nil', 'false', 'true', 'var', 'type', 'const','And', 'Array', 'As', 'Begin', 'Case', 'Class', 'Constructor', 'Destructor', 'Div', 'Do', 'DownTo', 'Else', + 'End', 'Except', 'File', 'Finally', 'For', 'Function', 'Goto', 'If', 'Implementation', 'In', 'Inherited', 'Interface', + 'Is', 'Mod', 'Not', 'Object', 'Of', 'On', 'Or', 'Packed', 'Procedure', 'Property', 'Raise', 'Record', + 'Repeat', 'Set', 'Shl', 'Shr', 'Then', 'ThreadVar', 'To', 'Try', 'Unit', 'Until', 'Uses', 'While', 'With', 'Xor', + + 'HKCC','HKCR','HKCU','HKLM','HKU','alwaysoverwrite','alwaysskipifsameorolder','append', + 'binary','classic','closeonexit','comparetimestamp','confirmoverwrite', + 'createkeyifdoesntexist','createonlyiffileexists','createvalueifdoesntexist', + 'deleteafterinstall','deletekey','deletevalue','dirifempty','dontcloseonexit', + 'dontcopy','dontcreatekey','disablenouninstallwarning','dword','exclusive','expandsz', + 'external','files','filesandordirs','fixed','fontisnttruetype','ignoreversion','iscustom','isreadme', + 'modern','multisz','new','noerror','none','normal','nowait','onlyifdestfileexists', + 'onlyifdoesntexist','onlyifnewer','overwrite','overwritereadonly','postinstall', + 'preservestringtype','promptifolder','regserver','regtypelib','restart','restartreplace', + 'runhidden','runmaximized','runminimized','sharedfile','shellexec','showcheckbox', + 'skipifnotsilent','skipifsilent','silent','skipifdoesntexist', + 'skipifsourcedoesntexist','sortfilesbyextension','unchecked','uninsalwaysuninstall', + 'uninsclearvalue','uninsdeleteentry','uninsdeletekey','uninsdeletekeyifempty', + 'uninsdeletesection','uninsdeletesectionifempty','uninsdeletevalue', + 'uninsneveruninstall','useapppaths','verysilent','waituntilidle' + + + ), + 3 => array( + 'Abs', 'Addr', 'AnsiCompareStr', 'AnsiCompareText', 'AnsiContainsStr', 'AnsiEndsStr', 'AnsiIndexStr', 'AnsiLeftStr', + 'AnsiLowerCase', 'AnsiMatchStr', 'AnsiMidStr', 'AnsiPos', 'AnsiReplaceStr', 'AnsiReverseString', 'AnsiRightStr', + 'AnsiStartsStr', 'AnsiUpperCase', 'ArcCos', 'ArcSin', 'ArcTan', 'Assigned', 'BeginThread', 'Bounds', 'CelsiusToFahrenheit', + 'ChangeFileExt', 'Chr', 'CompareStr', 'CompareText', 'Concat', 'Convert', 'Copy', 'Cos', 'CreateDir', 'CurrToStr', + 'CurrToStrF', 'Date', 'DateTimeToFileDate', 'DateTimeToStr', 'DateToStr', 'DayOfTheMonth', 'DayOfTheWeek', 'DayOfTheYear', + 'DayOfWeek', 'DaysBetween', 'DaysInAMonth', 'DaysInAYear', 'DaySpan', 'DegToRad', 'DeleteFile', 'DiskFree', 'DiskSize', + 'DupeString', 'EncodeDate', 'EncodeDateTime', 'EncodeTime', 'EndOfADay', 'EndOfAMonth', 'Eof', 'Eoln', 'Exp', 'ExtractFileDir', + 'ExtractFileDrive', 'ExtractFileExt', 'ExtractFileName', 'ExtractFilePath', 'FahrenheitToCelsius', 'FileAge', + 'FileDateToDateTime', 'FileExists', 'FilePos', 'FileSearch', 'FileSetDate', 'FileSize', 'FindClose', 'FindCmdLineSwitch', + 'FindFirst', 'FindNext', 'FloatToStr', 'FloatToStrF', 'Format', 'FormatCurr', 'FormatDateTime', 'FormatFloat', 'Frac', + 'GetCurrentDir', 'GetLastError', 'GetMem', 'High', 'IncDay', 'IncMinute', 'IncMonth', 'IncYear', 'InputBox', + 'InputQuery', 'Int', 'IntToHex', 'IntToStr', 'IOResult', 'IsInfinite', 'IsLeapYear', 'IsMultiThread', 'IsNaN', + 'LastDelimiter', 'Length', 'Ln', 'Lo', 'Log10', 'Low', 'LowerCase', 'Max', 'Mean', 'MessageDlg', 'MessageDlgPos', + 'MonthOfTheYear', 'Now', 'Odd', 'Ord', 'ParamCount', 'ParamStr', 'Pi', 'Point', 'PointsEqual', 'Pos', 'Pred', + 'Printer', 'PromptForFileName', 'PtInRect', 'RadToDeg', 'Random', 'RandomRange', 'RecodeDate', 'RecodeTime', 'Rect', + 'RemoveDir', 'RenameFile', 'Round', 'SeekEof', 'SeekEoln', 'SelectDirectory', 'SetCurrentDir', 'Sin', 'SizeOf', + 'Slice', 'Sqr', 'Sqrt', 'StringOfChar', 'StringReplace', 'StringToWideChar', 'StrToCurr', 'StrToDate', 'StrToDateTime', + 'StrToFloat', 'StrToInt', 'StrToInt64', 'StrToInt64Def', 'StrToIntDef', 'StrToTime', 'StuffString', 'Succ', 'Sum', 'Tan', + 'Time', 'TimeToStr', 'Tomorrow', 'Trunc', 'UpCase', 'UpperCase', 'VarType', 'WideCharToString', 'WrapText', 'Yesterday', + 'Append', 'AppendStr', 'Assign', 'AssignFile', 'AssignPrn', 'Beep', 'BlockRead', 'BlockWrite', 'Break', + 'ChDir', 'Close', 'CloseFile', 'Continue', 'DateTimeToString', 'Dec', 'DecodeDate', 'DecodeDateTime', + 'DecodeTime', 'Delete', 'Dispose', 'EndThread', 'Erase', 'Exclude', 'Exit', 'FillChar', 'Flush', 'FreeAndNil', + 'FreeMem', 'GetDir', 'GetLocaleFormatSettings', 'Halt', 'Inc', 'Include', 'Insert', 'MkDir', 'Move', 'New', + 'ProcessPath', 'Randomize', 'Read', 'ReadLn', 'ReallocMem', 'Rename', 'ReplaceDate', 'ReplaceTime', + 'Reset', 'ReWrite', 'RmDir', 'RunError', 'Seek', 'SetLength', 'SetString', 'ShowMessage', 'ShowMessageFmt', + 'ShowMessagePos', 'Str', 'Truncate', 'Val', 'Write', 'WriteLn', + + 'AdminPrivilegesRequired','AfterInstall','AllowCancelDuringInstall','AllowNoIcons','AllowRootDirectory','AllowUNCPath','AlwaysRestart','AlwaysShowComponentsList','AlwaysShowDirOnReadyPage','AlwaysShowGroupOnReadyPage ','AlwaysUsePersonalGroup','AppComments','AppContact','AppCopyright','AppendDefaultDirName', + 'AppendDefaultGroupName','AppId','AppModifyPath','AppMutex','AppName','AppPublisher', + 'AppPublisherURL','AppReadmeFile','AppSupportURL','AppUpdatesURL','AppVerName','AppVersion', + 'Attribs','BackColor','BackColor2','BackColorDirection','BackSolid','BeforeInstall', + 'ChangesAssociations','ChangesEnvironment','Check','CodeFile','Comment','Components','Compression','CopyMode', + 'CreateAppDir','CreateUninstallRegKey','DefaultDirName','DefaultGroupName', + 'DefaultUserInfoName','DefaultUserInfoOrg','DefaultUserInfoSerial', + 'Description','DestDir','DestName','DirExistsWarning', + 'DisableDirPage','DisableFinishedPage', + 'DisableProgramGroupPage','DisableReadyMemo','DisableReadyPage', + 'DisableStartupPrompt','DiskClusterSize','DiskSliceSize','DiskSpaceMBLabel', + 'DiskSpanning','DontMergeDuplicateFiles','EnableDirDoesntExistWarning','Encryption', + 'Excludes','ExtraDiskSpaceRequired','Filename','Flags','FlatComponentsList','FontInstall', + 'GroupDescription','HotKey','IconFilename','IconIndex','InfoAfterFile','InfoBeforeFile', + 'InternalCompressLevel','Key','LanguageDetectionMethod','Languages', + 'LicenseFile','MergeDuplicateFiles','MessagesFile','MinVersion','Name', + 'OnlyBelowVersion','OutputBaseFilename','OutputManifestFile','OutputDir', + 'Parameters','Password','Permissions','PrivilegesRequired','ReserveBytes', + 'RestartIfNeededByRun','Root','RunOnceId','Section','SetupIconFile', + 'ShowComponentSizes','ShowLanguageDialog','ShowTasksTreeLines','SlicesPerDisk', + 'SolidCompression','Source','SourceDir','StatusMsg','Subkey','Tasks', + 'TimeStampRounding','TimeStampsInUTC','TouchDate','TouchTime','Type','Types', + 'UninstallDisplayIcon','UninstallDisplayName','UninstallFilesDir','UninstallIconFile', + 'UninstallLogMode','UninstallRestartComputer','UninstallStyle','Uninstallable', + 'UpdateUninstallLogAppName','UsePreviousAppDir','UsePreviousGroup', + 'UsePreviousTasks','UsePreviousSetupType','UsePreviousUserInfo', + 'UserInfoPage','UseSetupLdr','ValueData','ValueName','ValueType', + 'VersionInfoVersion','VersionInfoCompany','VersionInfoDescription','VersionInfoTextVersion', + 'WindowResizable','WindowShowCaption','WindowStartMaximized', + 'WindowVisible','WizardImageBackColor','WizardImageFile','WizardImageStretch','WizardSmallImageBackColor','WizardSmallImageFile','WizardStyle','WorkingDir' + + + ), + 4 => array( + 'AnsiChar', 'AnsiString', 'Boolean', 'Byte', 'Cardinal', 'Char', 'Comp', 'Currency', 'Double', 'Extended', + 'Int64', 'Integer', 'LongInt', 'LongWord', 'PAnsiChar', 'PAnsiString', 'PChar', 'PCurrency', 'PDateTime', + 'PExtended', 'PInt64', 'Pointer', 'PShortString', 'PString', 'PVariant', 'PWideChar', 'PWideString', + 'Real', 'Real48', 'ShortInt', 'ShortString', 'Single', 'SmallInt', 'String', 'TBits', 'TConvType', 'TDateTime', + 'Text', 'TextFile', 'TFloatFormat', 'TFormatSettings', 'TList', 'TObject', 'TOpenDialog', 'TPoint', + 'TPrintDialog', 'TRect', 'TReplaceFlags', 'TSaveDialog', 'TSearchRec', 'TStringList', 'TSysCharSet', + 'TThreadFunc', 'Variant', 'WideChar', 'WideString', 'Word' + ), + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '@', '%', '&', '*', '|', '/', '<', '>' + ), + + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight: bold;',/*bold Black*/ + 2 => 'color: #000000;font-style: italic;',/*Black*/ + 3 => 'color: #0000FF;',/*blue*/ + 4 => 'color: #CC0000;'/*red*/ + ), + 'COMMENTS' => array( + 1 => 'color: #33FF00; font-style: italic;', + 'MULTI' => 'color: #33FF00; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;' + ), + 'REGEXPS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #000000; font-weight: bold;', + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/io.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/io.php new file mode 100644 index 0000000..97c1c06 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/io.php @@ -0,0 +1,139 @@ + 'Io', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'and', 'break', 'else', 'elseif', 'exit', 'for', 'foreach', 'if', 'ifFalse', 'ifNil', + 'ifTrue', 'or', 'pass', 'raise', 'return', 'then', 'try', 'wait', 'while', 'yield' + ), + 2 => array( + 'activate', 'activeCoroCount', 'asString', 'block', 'catch', 'clone', 'collectGarbage', + 'compileString', 'continue', 'do', 'doFile', 'doMessage', 'doString', 'forward', + 'getSlot', 'getenv', 'hasSlot', 'isActive', 'isNil', 'isResumable', 'list', 'message', + 'method', 'parent', 'pause', 'perform', 'performWithArgList', 'print', 'proto', + 'raiseResumable', 'removeSlot', 'resend', 'resume', 'schedulerSleepSeconds', 'self', + 'sender', 'setSchedulerSleepSeconds', 'setSlot', 'shallowCopy', 'slotNames', 'super', + 'system', 'thisBlock', 'thisContext', 'thisMessage', 'type', 'uniqueId', 'updateSlot', + 'write' + ), + 3 => array( + 'Array', 'AudioDevice', 'AudioMixer', 'Block', 'Box', 'Buffer', 'CFunction', 'CGI', + 'Color', 'Curses', 'DBM', 'DNSResolver', 'DOConnection', 'DOProxy', 'DOServer', + 'Date', 'Directory', 'Duration', 'DynLib', 'Error', 'Exception', 'FFT', 'File', + 'Fnmatch', 'Font', 'Future', 'GL', 'GLE', 'GLScissor', 'GLU', 'GLUCylinder', + 'GLUQuadric', 'GLUSphere', 'GLUT', 'Host', 'Image', 'Importer', 'LinkList', 'List', + 'Lobby', 'Locals', 'MD5', 'MP3Decoder', 'MP3Encoder', 'Map', 'Message', 'Movie', + 'NULL', 'Nil', 'Nop', 'Notifiction', 'Number', 'Object', 'OpenGL', 'Point', 'Protos', + 'Regex', 'SGMLTag', 'SQLite', 'Server', 'ShowMessage', 'SleepyCat', 'SleepyCatCursor', + 'Socket', 'SocketManager', 'Sound', 'Soup', 'Store', 'String', 'Tree', 'UDPSender', + 'UDPReceiver', 'URL', 'User', 'Warning', 'WeakLink' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + 0 => 'color: #0000ff;' + ), + 'SCRIPT' => array( + 0 => '' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/java.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/java.php new file mode 100644 index 0000000..4c5689d --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/java.php @@ -0,0 +1,1388 @@ + 'Java', + 'COMMENT_SINGLE' => array(1 => '//', 2 => 'import'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'for', 'foreach', 'if', 'else', 'while', 'do', + 'switch', 'case' + ), + 2 => array( + 'null', 'return', 'false', 'final', 'true', 'public', + 'private', 'protected', 'extends', 'break', 'class', + 'new', 'try', 'catch', 'throws', 'finally', 'implements', + 'interface', 'throw', 'native', 'synchronized', 'this', + 'abstract', 'transient', 'instanceof', 'assert', 'continue', + 'default', 'enum', 'package', 'static', 'strictfp', 'super', + 'volatile', 'const', 'goto' + ), + 3 => array( + 'AbstractAction', 'AbstractBorder', 'AbstractButton', 'AbstractCellEditor', + 'AbstractCollection', 'AbstractColorChooserPanel', 'AbstractDocument', + 'AbstractDocument.AttributeContext', 'AbstractDocument.Content', + 'AbstractDocument.ElementEdit', 'AbstractLayoutCache', + 'AbstractLayoutCache.NodeDimensions', 'AbstractList', 'AbstractListModel', + 'AbstractMap', 'AbstractMethodError', 'AbstractSequentialList', + 'AbstractSet', 'AbstractTableModel', 'AbstractUndoableEdit', 'AbstractWriter', + 'AccessControlContext', 'AccessControlException', 'AccessController', + 'AccessException', 'Accessible', 'AccessibleAction', 'AccessibleBundle', + 'AccessibleComponent', 'AccessibleContext', 'AccessibleHyperlink', + 'AccessibleHypertext', 'AccessibleIcon', 'AccessibleObject', + 'AccessibleRelation', 'AccessibleRelationSet', 'AccessibleResourceBundle', + 'AccessibleRole', 'AccessibleSelection', 'AccessibleState', + 'AccessibleStateSet', 'AccessibleTable', 'AccessibleTableModelChange', + 'AccessibleText', 'AccessibleValue', 'Acl', 'AclEntry', 'AclNotFoundException', + 'Action', 'ActionEvent', 'ActionListener', 'ActionMap', 'ActionMapUIResource', + 'Activatable', 'ActivateFailedException', 'ActivationDesc', + 'ActivationException', 'ActivationGroup', 'ActivationGroupDesc', + 'ActivationGroupDesc.CommandEnvironment', 'ActivationGroupID', 'ActivationID', + 'ActivationInstantiator', 'ActivationMonitor', 'ActivationSystem', + 'Activator', 'ActiveEvent', 'Adjustable', 'AdjustmentEvent', 'AdjustmentListener', + 'Adler32', 'AffineTransform', 'AffineTransformOp', 'AlgorithmParameterGenerator', + 'AlgorithmParameterGeneratorSpi', 'AlgorithmParameters', 'AlgorithmParameterSpec', + 'AlgorithmParametersSpi', 'AllPermission', 'AlphaComposite', 'AlreadyBound', + 'AlreadyBoundException', 'AlreadyBoundHelper', 'AlreadyBoundHolder', + 'AncestorEvent', 'AncestorListener', 'Annotation', 'Any', 'AnyHolder', + 'AnySeqHelper', 'AnySeqHolder', 'Applet', 'AppletContext', 'AppletInitializer', + 'AppletStub', 'ApplicationException', 'Arc2D', 'Arc2D.Double', 'Arc2D.Float', + 'Area', 'AreaAveragingScaleFilter', 'ARG_IN', 'ARG_INOUT', 'ARG_OUT', + 'ArithmeticException', 'Array', 'ArrayIndexOutOfBoundsException', + 'ArrayList', 'Arrays', 'ArrayStoreException', 'AsyncBoxView', + 'Attribute', 'AttributedCharacterIterator', 'AttributedCharacterIterator.Attribute', + 'AttributedString', 'AttributeInUseException', 'AttributeList', + 'AttributeModificationException', 'Attributes', 'Attributes.Name', + 'AttributeSet', 'AttributeSet.CharacterAttribute', 'AttributeSet.ColorAttribute', + 'AttributeSet.FontAttribute', 'AttributeSet.ParagraphAttribute', + 'AudioClip', 'AudioFileFormat', 'AudioFileFormat.Type', 'AudioFileReader', + 'AudioFileWriter', 'AudioFormat', 'AudioFormat.Encoding', 'AudioInputStream', + 'AudioPermission', 'AudioSystem', 'AuthenticationException', + 'AuthenticationNotSupportedException', 'Authenticator', 'Autoscroll', + 'AWTError', 'AWTEvent', 'AWTEventListener', 'AWTEventMulticaster', + 'AWTException', 'AWTPermission', 'BAD_CONTEXT', 'BAD_INV_ORDER', 'BAD_OPERATION', + 'BAD_PARAM', 'BAD_POLICY', 'BAD_POLICY_TYPE', 'BAD_POLICY_VALUE', 'BAD_TYPECODE', + 'BadKind', 'BadLocationException', 'BandCombineOp', 'BandedSampleModel','BasicArrowButton', + 'BasicAttribute', 'BasicAttributes', 'BasicBorders', 'BasicBorders.ButtonBorder', + 'BasicBorders.FieldBorder', 'BasicBorders.MarginBorder', 'BasicBorders.MenuBarBorder', + 'BasicBorders.RadioButtonBorder', 'BasicBorders.SplitPaneBorder', + 'BasicBorders.ToggleButtonBorder', 'BasicButtonListener', 'BasicButtonUI', + 'BasicCheckBoxMenuItemUI', 'BasicCheckBoxUI', 'BasicColorChooserUI', 'BasicComboBoxEditor', + 'BasicComboBoxEditor.UIResource', 'BasicComboBoxRenderer', 'BasicComboBoxRenderer.UIResource', + 'BasicComboBoxUI', 'BasicComboPopup', 'BasicDesktopIconUI', 'BasicDesktopPaneUI', + 'BasicDirectoryModel', 'BasicEditorPaneUI', 'BasicFileChooserUI', + 'BasicGraphicsUtils', 'BasicHTML', 'BasicIconFactory', 'BasicInternalFrameTitlePane', + 'BasicInternalFrameUI', 'BasicLabelUI', 'BasicListUI', 'BasicLookAndFeel', + 'BasicMenuBarUI', 'BasicMenuItemUI', 'BasicMenuUI', 'BasicOptionPaneUI', + 'BasicOptionPaneUI.ButtonAreaLayout', 'BasicPanelUI', 'BasicPasswordFieldUI', + 'BasicPermission', 'BasicPopupMenuSeparatorUI', 'BasicPopupMenuUI', + 'BasicProgressBarUI', 'BasicRadioButtonMenuItemUI', 'BasicRadioButtonUI', + 'BasicRootPaneUI', 'BasicScrollBarUI', 'BasicScrollPaneUI', 'BasicSeparatorUI', + 'BasicSliderUI', 'BasicSplitPaneDivider', 'BasicSplitPaneUI', 'BasicStroke', + 'BasicTabbedPaneUI', 'BasicTableHeaderUI', 'BasicTableUI', 'BasicTextAreaUI', + 'BasicTextFieldUI', 'BasicTextPaneUI', 'BasicTextUI', 'BasicTextUI.BasicCaret', + 'BasicTextUI.BasicHighlighter', 'BasicToggleButtonUI', 'BasicToolBarSeparatorUI', + 'BasicToolBarUI', 'BasicToolTipUI', 'BasicTreeUI', 'BasicViewportUI', + 'BatchUpdateException', 'BeanContext', 'BeanContextChild', + 'BeanContextChildComponentProxy', 'BeanContextChildSupport', 'BeanContextContainerProxy', + 'BeanContextEvent', 'BeanContextMembershipEvent', 'BeanContextMembershipListener', + 'BeanContextProxy', 'BeanContextServiceAvailableEvent', 'BeanContextServiceProvider', + 'BeanContextServiceProviderBeanInfo', 'BeanContextServiceRevokedEvent', + 'BeanContextServiceRevokedListener', 'BeanContextServices', + 'BeanContextServicesListener', 'BeanContextServicesSupport', + 'BeanContextServicesSupport.BCSSServiceProvider', 'BeanContextSupport', + 'BeanContextSupport.BCSIterator', 'BeanDescriptor', 'BeanInfo', 'Beans', + 'BevelBorder', 'BigDecimal', 'BigInteger', 'BinaryRefAddr', 'BindException', + 'Binding', 'BindingHelper', 'BindingHolder', 'BindingIterator', + 'BindingIteratorHelper', 'BindingIteratorHolder', 'BindingIteratorOperations', + 'BindingListHelper', 'BindingListHolder', 'BindingType', 'BindingTypeHelper', + 'BindingTypeHolder', 'BitSet', 'Blob', 'BlockView', 'Book', 'Boolean', + 'BooleanControl', 'BooleanControl.Type', 'BooleanHolder', 'BooleanSeqHelper', + 'BooleanSeqHolder', 'Border', 'BorderFactory', 'BorderLayout', 'BorderUIResource', + 'BorderUIResource.BevelBorderUIResource', 'BorderUIResource.CompoundBorderUIResource', + 'BorderUIResource.EmptyBorderUIResource', 'BorderUIResource.EtchedBorderUIResource', + 'BorderUIResource.LineBorderUIResource', 'BorderUIResource.MatteBorderUIResource', + 'BorderUIResource.TitledBorderUIResource', 'BoundedRangeModel', 'Bounds', + 'Box', 'Box.Filler', 'BoxedValueHelper', 'BoxLayout', 'BoxView', + 'BreakIterator', 'BufferedImage', 'BufferedImageFilter', 'BufferedImageOp', + 'BufferedInputStream', 'BufferedOutputStream', 'BufferedReader', 'BufferedWriter', + 'Button', 'ButtonGroup', 'ButtonModel', 'ButtonUI', 'Byte', 'ByteArrayInputStream', + 'ByteArrayOutputStream', 'ByteHolder', 'ByteLookupTable', 'Calendar', + 'CallableStatement', 'CannotProceed', 'CannotProceedException', 'CannotProceedHelper', + 'CannotProceedHolder', 'CannotRedoException', 'CannotUndoException', + 'Canvas', 'CardLayout', 'Caret', 'CaretEvent', 'CaretListener', 'CellEditor', + 'CellEditorListener', 'CellRendererPane', 'Certificate', 'Certificate.CertificateRep', + 'CertificateEncodingException', 'CertificateException', 'CertificateExpiredException', + 'CertificateFactory', 'CertificateFactorySpi', 'CertificateNotYetValidException', + 'CertificateParsingException', 'ChangedCharSetException', 'ChangeEvent', + 'ChangeListener', 'Character', 'Character.Subset', 'Character.UnicodeBlock', + 'CharacterIterator', 'CharArrayReader', 'CharArrayWriter', 'CharConversionException', + 'CharHolder', 'CharSeqHelper', 'CharSeqHolder', 'Checkbox', 'CheckboxGroup', + 'CheckboxMenuItem', 'CheckedInputStream', 'CheckedOutputStream', 'Checksum', + 'Choice', 'ChoiceFormat', 'Class', 'ClassCastException', 'ClassCircularityError', + 'ClassDesc', 'ClassFormatError', 'ClassLoader', 'ClassNotFoundException', + 'Clip', 'Clipboard', 'ClipboardOwner', 'Clob', 'Cloneable', 'CloneNotSupportedException', + 'CMMException', 'CodeSource', 'CollationElementIterator', 'CollationKey', + 'Collator', 'Collection', 'Collections', 'Color', 'ColorChooserComponentFactory', + 'ColorChooserUI', 'ColorConvertOp', 'ColorModel', 'ColorSelectionModel', + 'ColorSpace', 'ColorUIResource', 'ComboBoxEditor', 'ComboBoxModel', 'ComboBoxUI', + 'ComboPopup', 'COMM_FAILURE', 'CommunicationException', 'Comparable', + 'Comparator', 'Compiler', 'CompletionStatus', 'CompletionStatusHelper', + 'Component', 'ComponentAdapter', 'ComponentColorModel', 'ComponentEvent', + 'ComponentInputMap', 'ComponentInputMapUIResource', 'ComponentListener', + 'ComponentOrientation', 'ComponentSampleModel', 'ComponentUI', 'ComponentView', + 'Composite', 'CompositeContext', 'CompositeName','CompositeView', 'CompoundBorder', + 'CompoundControl', 'CompoundControl.Type', 'CompoundEdit', 'CompoundName', + 'ConcurrentModificationException', 'ConfigurationException', 'ConnectException', + 'ConnectException', 'ConnectIOException', 'Connection', 'Constructor', + 'Container', 'ContainerAdapter', 'ContainerEvent', 'ContainerListener', + 'ContentHandler', 'ContentHandlerFactory', 'ContentModel', 'Context', 'ContextList', + 'ContextNotEmptyException', 'ContextualRenderedImageFactory', 'Control', + 'Control.Type', 'ControlFactory', 'ControllerEventListener', 'ConvolveOp', + 'CRC32', 'CRL', 'CRLException', 'CropImageFilter', 'CSS', 'CSS.Attribute', + 'CTX_RESTRICT_SCOPE', 'CubicCurve2D', 'CubicCurve2D.Double', 'CubicCurve2D.Float', + 'Current', 'CurrentHelper', 'CurrentHolder', 'CurrentOperations', 'Cursor', + 'Customizer', 'CustomMarshal', 'CustomValue', 'DATA_CONVERSION', 'DatabaseMetaData', + 'DataBuffer', 'DataBufferByte', 'DataBufferInt', 'DataBufferShort', 'DataBufferUShort', + 'DataFlavor', 'DataFormatException', 'DatagramPacket', 'DatagramSocket', + 'DatagramSocketImpl', 'DatagramSocketImplFactory', 'DataInput', 'DataInputStream', + 'DataLine', 'DataLine.Info', 'DataOutput', 'DataOutputStream', 'DataOutputStream', + 'DataTruncation', 'Date', 'DateFormat', 'DateFormatSymbols', 'DebugGraphics', + 'DecimalFormat', 'DecimalFormatSymbols', 'DefaultBoundedRangeModel', + 'DefaultButtonModel', 'DefaultCaret', 'DefaultCellEditor', 'DefaultColorSelectionModel', + 'DefaultComboBoxModel', 'DefaultDesktopManager', 'DefaultEditorKit', + 'DefaultEditorKit.BeepAction', 'DefaultEditorKit.CopyAction', + 'DefaultEditorKit.CutAction', 'DefaultEditorKit.DefaultKeyTypedAction', + 'DefaultEditorKit.InsertBreakAction', 'DefaultEditorKit.InsertContentAction', + 'DefaultEditorKit.InsertTabAction', 'DefaultEditorKit.PasteAction,', + 'DefaultFocusManager', 'DefaultHighlighter', 'DefaultHighlighter.DefaultHighlightPainter', + 'DefaultListCellRenderer', 'DefaultListCellRenderer.UIResource', 'DefaultListModel', + 'DefaultListSelectionModel', 'DefaultMenuLayout', 'DefaultMetalTheme', + 'DefaultMutableTreeNode', 'DefaultSingleSelectionModel', 'DefaultStyledDocument', + 'DefaultStyledDocument.AttributeUndoableEdit', 'DefaultStyledDocument.ElementSpec', + 'DefaultTableCellRenderer', 'DefaultTableCellRenderer.UIResource', 'DefaultTableColumnModel', + 'DefaultTableModel', 'DefaultTextUI', 'DefaultTreeCellEditor', 'DefaultTreeCellRenderer', + 'DefaultTreeModel', 'DefaultTreeSelectionModel', 'DefinitionKind', 'DefinitionKindHelper', + 'Deflater', 'DeflaterOutputStream', 'Delegate', 'DesignMode', 'DesktopIconUI', + 'DesktopManager', 'DesktopPaneUI', 'DGC', 'Dialog', 'Dictionary', 'DigestException', + 'DigestInputStream', 'DigestOutputStream', 'Dimension', 'Dimension2D', + 'DimensionUIResource', 'DirContext', 'DirectColorModel', 'DirectoryManager', + 'DirObjectFactory', 'DirStateFactory', 'DirStateFactory.Result', 'DnDConstants', + 'Document', 'DocumentEvent', 'DocumentEvent.ElementChange', 'DocumentEvent.EventType', + 'DocumentListener', 'DocumentParser', 'DomainCombiner', 'DomainManager', + 'DomainManagerOperations', 'Double', 'DoubleHolder', 'DoubleSeqHelper', + 'DoubleSeqHolder', 'DragGestureEvent', 'DragGestureListener', 'DragGestureRecognizer', + 'DragSource', 'DragSourceContext', 'DragSourceDragEvent', 'DragSourceDropEvent', + 'DragSourceEvent', 'DragSourceListener', 'Driver', 'DriverManager', + 'DriverPropertyInfo', 'DropTarget', 'DropTarget.DropTargetAutoScroller', + 'DropTargetContext', 'DropTargetDragEvent', 'DropTargetDropEvent', + 'DropTargetEvent', 'DropTargetListener', 'DSAKey', 'DSAKeyPairGenerator', + 'DSAParameterSpec', 'DSAParams', 'DSAPrivateKey', 'DSAPrivateKeySpec', + 'DSAPublicKey', 'DSAPublicKeySpec', 'DTD', 'DTDConstants', 'DynamicImplementation', + 'DynAny', 'DynArray', 'DynEnum', 'DynFixed', 'DynSequence', 'DynStruct', + 'DynUnion', 'DynValue', 'EditorKit', 'Element', 'ElementIterator', 'Ellipse2D', + 'Ellipse2D.Double', 'Ellipse2D.Float', 'EmptyBorder', 'EmptyStackException', + 'EncodedKeySpec', 'Entity', 'EnumControl', 'EnumControl.Type','Enumeration', + 'Environment', 'EOFException', 'Error', 'EtchedBorder', 'Event', 'EventContext', + 'EventDirContext', 'EventListener', 'EventListenerList', 'EventObject', 'EventQueue', + 'EventSetDescriptor', 'Exception', 'ExceptionInInitializerError', 'ExceptionList', + 'ExpandVetoException', 'ExportException', 'ExtendedRequest', 'ExtendedResponse', + 'Externalizable', 'FeatureDescriptor', 'Field', 'FieldNameHelper', + 'FieldPosition', 'FieldView', 'File', 'FileChooserUI', 'FileDescriptor', + 'FileDialog', 'FileFilter', 'FileFilter', 'FileInputStream', 'FilenameFilter', + 'FileNameMap', 'FileNotFoundException', 'FileOutputStream', 'FilePermission', + 'FileReader', 'FileSystemView', 'FileView', 'FileWriter', 'FilteredImageSource', + 'FilterInputStream', 'FilterOutputStream', 'FilterReader', 'FilterWriter', + 'FixedHeightLayoutCache', 'FixedHolder', 'FlatteningPathIterator', 'FlavorMap', + 'Float', 'FloatControl', 'FloatControl.Type', 'FloatHolder', 'FloatSeqHelper', + 'FloatSeqHolder', 'FlowLayout', 'FlowView', 'FlowView.FlowStrategy', 'FocusAdapter', + 'FocusEvent', 'FocusListener', 'FocusManager', 'Font', 'FontFormatException', + 'FontMetrics', 'FontRenderContext', 'FontUIResource', 'Format', 'FormatConversionProvider', + 'FormView', 'Frame', 'FREE_MEM', 'GapContent', 'GeneralPath', 'GeneralSecurityException', + 'GlyphJustificationInfo', 'GlyphMetrics', 'GlyphVector', 'GlyphView', 'GlyphView.GlyphPainter', + 'GradientPaint', 'GraphicAttribute', 'Graphics', 'Graphics2D', 'GraphicsConfigTemplate', + 'GraphicsConfiguration', 'GraphicsDevice', 'GraphicsEnvironment', 'GrayFilter', + 'GregorianCalendar', 'GridBagConstraints', 'GridBagLayout', 'GridLayout', 'Group', 'Guard', + 'GuardedObject', 'GZIPInputStream', 'GZIPOutputStream', + 'HasControls', + 'HashMap', + 'HashSet', + 'Hashtable', + 'HierarchyBoundsAdapter', + 'HierarchyBoundsListener', + 'HierarchyEvent', + 'HierarchyListener', + 'Highlighter', + 'Highlighter.Highlight', + 'Highlighter.HighlightPainter', + 'HTML', + 'HTML.Attribute', + 'HTML.Tag', + 'HTML.UnknownTag', + 'HTMLDocument', + 'HTMLDocument.Iterator', + 'HTMLEditorKit', + 'HTMLEditorKit.HTMLFactory', + 'HTMLEditorKit.HTMLTextAction', + 'HTMLEditorKit.InsertHTMLTextAction', + 'HTMLEditorKit.LinkController', + 'HTMLEditorKit.Parser', + 'HTMLEditorKit.ParserCallback', + 'HTMLFrameHyperlinkEvent', + 'HTMLWriter', + 'HttpURLConnection', + 'HyperlinkEvent', + 'HyperlinkEvent.EventType', + 'HyperlinkListener', + 'ICC_ColorSpace', + 'ICC_Profile', + 'ICC_ProfileGray', + 'ICC_ProfileRGB', + 'Icon', + 'IconUIResource', + 'IconView', + 'IdentifierHelper', + 'Identity', + 'IdentityScope', + 'IDLEntity', + 'IDLType', + 'IDLTypeHelper', 'IDLTypeOperations', + 'IllegalAccessError', + 'IllegalAccessException', + 'IllegalArgumentException', + 'IllegalComponentStateException', + 'IllegalMonitorStateException', + 'IllegalPathStateException', + 'IllegalStateException', + 'IllegalThreadStateException', + 'Image', + 'ImageConsumer', + 'ImageFilter', + 'ImageGraphicAttribute', + 'ImageIcon', + 'ImageObserver', + 'ImageProducer', + 'ImagingOpException', + 'IMP_LIMIT', + 'IncompatibleClassChangeError', + 'InconsistentTypeCode', + 'IndexColorModel', + 'IndexedPropertyDescriptor', + 'IndexOutOfBoundsException', + 'IndirectionException', + 'InetAddress', + 'Inflater', + 'InflaterInputStream', + 'InheritableThreadLocal', + 'InitialContext', + 'InitialContextFactory', + 'InitialContextFactoryBuilder', + 'InitialDirContext', + 'INITIALIZE', + 'Initializer', + 'InitialLdapContext', + 'InlineView', + 'InputContext', + 'InputEvent', + 'InputMap', + 'InputMapUIResource', + 'InputMethod', + 'InputMethodContext', + 'InputMethodDescriptor', + 'InputMethodEvent', + 'InputMethodHighlight', + 'InputMethodListener', + 'InputMethodRequests', + 'InputStream', + 'InputStream', + 'InputStream', + 'InputStreamReader', + 'InputSubset', + 'InputVerifier', + 'Insets', + 'InsetsUIResource', + 'InstantiationError', + 'InstantiationException', + 'Instrument', + 'InsufficientResourcesException', + 'Integer', + 'INTERNAL', + 'InternalError', 'InternalFrameAdapter', + 'InternalFrameEvent', + 'InternalFrameListener', + 'InternalFrameUI', + 'InterruptedException', + 'InterruptedIOException', + 'InterruptedNamingException', + 'INTF_REPOS', + 'IntHolder', + 'IntrospectionException', + 'Introspector', + 'INV_FLAG', + 'INV_IDENT', + 'INV_OBJREF', + 'INV_POLICY', + 'Invalid', + 'INVALID_TRANSACTION', + 'InvalidAlgorithmParameterException', + 'InvalidAttributeIdentifierException', + 'InvalidAttributesException', + 'InvalidAttributeValueException', + 'InvalidClassException', + 'InvalidDnDOperationException', + 'InvalidKeyException', + 'InvalidKeySpecException', + 'InvalidMidiDataException', + 'InvalidName', + 'InvalidName', + 'InvalidNameException', + 'InvalidNameHelper', + 'InvalidNameHolder', + 'InvalidObjectException', + 'InvalidParameterException', + 'InvalidParameterSpecException', + 'InvalidSearchControlsException', + 'InvalidSearchFilterException', + 'InvalidSeq', + 'InvalidTransactionException', + 'InvalidValue', + 'InvocationEvent', + 'InvocationHandler', + 'InvocationTargetException', + 'InvokeHandler', + 'IOException', + 'IRObject', + 'IRObjectOperations', 'IstringHelper', 'ItemEvent', 'ItemListener', + 'ItemSelectable', 'Iterator', 'JApplet', 'JarEntry', 'JarException', + 'JarFile', 'JarInputStream', 'JarOutputStream', 'JarURLConnection', + 'JButton', 'JCheckBox', 'JCheckBoxMenuItem', 'JColorChooser', + 'JComboBox', + 'JComboBox.KeySelectionManager', + 'JComponent', + 'JDesktopPane', + 'JDialog', + 'JEditorPane', + 'JFileChooser', + 'JFrame', + 'JInternalFrame', + 'JInternalFrame.JDesktopIcon', + 'JLabel', + 'JLayeredPane', + 'JList', + 'JMenu', + 'JMenuBar', + 'JMenuItem', + 'JobAttributes', + 'JobAttributes.DefaultSelectionType', + 'JobAttributes.DestinationType', + 'JobAttributes.DialogType', + 'JobAttributes.MultipleDocumentHandlingType', + 'JobAttributes.SidesType', + 'JOptionPane', + 'JPanel', + 'JPasswordField', + 'JPopupMenu', + 'JPopupMenu.Separator', + 'JProgressBar', + 'JRadioButton', + 'JRadioButtonMenuItem', + 'JRootPane', + 'JScrollBar', + 'JScrollPane', + 'JSeparator', + 'JSlider', + 'JSplitPane', + 'JTabbedPane', + 'JTable', + 'JTableHeader', + 'JTextArea', + 'JTextComponent', + 'JTextComponent.KeyBinding', 'JTextField', + 'JTextPane', + 'JToggleButton', + 'JToggleButton.ToggleButtonModel', + 'JToolBar', + 'JToolBar.Separator', + 'JToolTip', + 'JTree', + 'JTree.DynamicUtilTreeNode', + 'JTree.EmptySelectionModel', + 'JViewport', + 'JWindow', + 'Kernel', + 'Key', + 'KeyAdapter', + 'KeyEvent', + 'KeyException', + 'KeyFactory', + 'KeyFactorySpi', + 'KeyListener', + 'KeyManagementException', + 'Keymap', + 'KeyPair', + 'KeyPairGenerator', + 'KeyPairGeneratorSpi', + 'KeySpec', + 'KeyStore', + 'KeyStoreException', + 'KeyStoreSpi', + 'KeyStroke', + 'Label', + 'LabelUI', + 'LabelView', + 'LastOwnerException', + 'LayeredHighlighter', + 'LayeredHighlighter.LayerPainter', + 'LayoutManager', + 'LayoutManager2', + 'LayoutQueue', + 'LdapContext', + 'LdapReferralException', + 'Lease', + 'LimitExceededException', + 'Line', + 'Line.Info', + 'Line2D', + 'Line2D.Double', + 'Line2D.Float', + 'LineBorder', + 'LineBreakMeasurer', + 'LineEvent', + 'LineEvent.Type', + 'LineListener', + 'LineMetrics', + 'LineNumberInputStream', + 'LineNumberReader', + 'LineUnavailableException', + 'LinkageError', + 'LinkedList', + 'LinkException', + 'LinkLoopException', + 'LinkRef', + 'List', + 'List', + 'ListCellRenderer', + 'ListDataEvent', + 'ListDataListener', + 'ListIterator', + 'ListModel', + 'ListResourceBundle', + 'ListSelectionEvent', + 'ListSelectionListener', + 'ListSelectionModel', + 'ListUI', + 'ListView', + 'LoaderHandler', + 'Locale', + 'LocateRegistry', + 'LogStream', + 'Long', + 'LongHolder', + 'LongLongSeqHelper', + 'LongLongSeqHolder', + 'LongSeqHelper', + 'LongSeqHolder', + 'LookAndFeel', + 'LookupOp', + 'LookupTable', + 'MalformedLinkException', + 'MalformedURLException', + 'Manifest', 'Map', + 'Map.Entry', + 'MARSHAL', + 'MarshalException', + 'MarshalledObject', + 'Math', + 'MatteBorder', + 'MediaTracker', + 'Member', + 'MemoryImageSource', + 'Menu', + 'MenuBar', + 'MenuBarUI', + 'MenuComponent', + 'MenuContainer', + 'MenuDragMouseEvent', + 'MenuDragMouseListener', + 'MenuElement', + 'MenuEvent', + 'MenuItem', + 'MenuItemUI', + 'MenuKeyEvent', + 'MenuKeyListener', + 'MenuListener', + 'MenuSelectionManager', + 'MenuShortcut', + 'MessageDigest', + 'MessageDigestSpi', + 'MessageFormat', + 'MetaEventListener', + 'MetalBorders', + 'MetalBorders.ButtonBorder', + 'MetalBorders.Flush3DBorder', + 'MetalBorders.InternalFrameBorder', + 'MetalBorders.MenuBarBorder', + 'MetalBorders.MenuItemBorder', + 'MetalBorders.OptionDialogBorder', + 'MetalBorders.PaletteBorder', + 'MetalBorders.PopupMenuBorder', + 'MetalBorders.RolloverButtonBorder', + 'MetalBorders.ScrollPaneBorder', + 'MetalBorders.TableHeaderBorder', + 'MetalBorders.TextFieldBorder', + 'MetalBorders.ToggleButtonBorder', + 'MetalBorders.ToolBarBorder', + 'MetalButtonUI', + 'MetalCheckBoxIcon', + 'MetalCheckBoxUI', + 'MetalComboBoxButton', + 'MetalComboBoxEditor', + 'MetalComboBoxEditor.UIResource', + 'MetalComboBoxIcon', + 'MetalComboBoxUI', + 'MetalDesktopIconUI', + 'MetalFileChooserUI', + 'MetalIconFactory', + 'MetalIconFactory.FileIcon16', + 'MetalIconFactory.FolderIcon16', + 'MetalIconFactory.PaletteCloseIcon', + 'MetalIconFactory.TreeControlIcon', + 'MetalIconFactory.TreeFolderIcon', + 'MetalIconFactory.TreeLeafIcon', + 'MetalInternalFrameTitlePane', + 'MetalInternalFrameUI', + 'MetalLabelUI', + 'MetalLookAndFeel', + 'MetalPopupMenuSeparatorUI', + 'MetalProgressBarUI', + 'MetalRadioButtonUI', + 'MetalScrollBarUI', + 'MetalScrollButton', + 'MetalScrollPaneUI', + 'MetalSeparatorUI', + 'MetalSliderUI', + 'MetalSplitPaneUI', + 'MetalTabbedPaneUI', + 'MetalTextFieldUI', + 'MetalTheme', + 'MetalToggleButtonUI', + 'MetalToolBarUI', + 'MetalToolTipUI', + 'MetalTreeUI', + 'MetaMessage', + 'Method', + 'MethodDescriptor', + 'MidiChannel', + 'MidiDevice', + 'MidiDevice.Info', + 'MidiDeviceProvider', + 'MidiEvent', + 'MidiFileFormat', + 'MidiFileReader', + 'MidiFileWriter', + 'MidiMessage', + 'MidiSystem', + 'MidiUnavailableException', + 'MimeTypeParseException', + 'MinimalHTMLWriter', + 'MissingResourceException', + 'Mixer', + 'Mixer.Info', + 'MixerProvider', + 'ModificationItem', + 'Modifier', + 'MouseAdapter', + 'MouseDragGestureRecognizer', + 'MouseEvent', + 'MouseInputAdapter', + 'MouseInputListener', + 'MouseListener', + 'MouseMotionAdapter', + 'MouseMotionListener', + 'MultiButtonUI', + 'MulticastSocket', + 'MultiColorChooserUI', + 'MultiComboBoxUI', + 'MultiDesktopIconUI', + 'MultiDesktopPaneUI', + 'MultiFileChooserUI', + 'MultiInternalFrameUI', + 'MultiLabelUI', 'MultiListUI', + 'MultiLookAndFeel', + 'MultiMenuBarUI', + 'MultiMenuItemUI', + 'MultiOptionPaneUI', + 'MultiPanelUI', + 'MultiPixelPackedSampleModel', + 'MultipleMaster', + 'MultiPopupMenuUI', + 'MultiProgressBarUI', + 'MultiScrollBarUI', + 'MultiScrollPaneUI', + 'MultiSeparatorUI', + 'MultiSliderUI', + 'MultiSplitPaneUI', + 'MultiTabbedPaneUI', + 'MultiTableHeaderUI', + 'MultiTableUI', + 'MultiTextUI', + 'MultiToolBarUI', + 'MultiToolTipUI', + 'MultiTreeUI', + 'MultiViewportUI', + 'MutableAttributeSet', + 'MutableComboBoxModel', + 'MutableTreeNode', + 'Name', + 'NameAlreadyBoundException', + 'NameClassPair', + 'NameComponent', + 'NameComponentHelper', + 'NameComponentHolder', + 'NamedValue', + 'NameHelper', + 'NameHolder', + 'NameNotFoundException', + 'NameParser', + 'NamespaceChangeListener', + 'NameValuePair', + 'NameValuePairHelper', + 'Naming', + 'NamingContext', + 'NamingContextHelper', + 'NamingContextHolder', + 'NamingContextOperations', + 'NamingEnumeration', + 'NamingEvent', + 'NamingException', + 'NamingExceptionEvent', + 'NamingListener', + 'NamingManager', + 'NamingSecurityException', + 'NegativeArraySizeException', + 'NetPermission', + 'NO_IMPLEMENT', + 'NO_MEMORY', + 'NO_PERMISSION', + 'NO_RESOURCES', + 'NO_RESPONSE', + 'NoClassDefFoundError', + 'NoInitialContextException', 'NoninvertibleTransformException', + 'NoPermissionException', + 'NoRouteToHostException', + 'NoSuchAlgorithmException', + 'NoSuchAttributeException', + 'NoSuchElementException', + 'NoSuchFieldError', + 'NoSuchFieldException', + 'NoSuchMethodError', + 'NoSuchMethodException', + 'NoSuchObjectException', + 'NoSuchProviderException', + 'NotActiveException', + 'NotBoundException', + 'NotContextException', + 'NotEmpty', + 'NotEmptyHelper', + 'NotEmptyHolder', + 'NotFound', + 'NotFoundHelper', + 'NotFoundHolder', + 'NotFoundReason', + 'NotFoundReasonHelper', + 'NotFoundReasonHolder', + 'NotOwnerException', + 'NotSerializableException', + 'NullPointerException', + 'Number', + 'NumberFormat', 'NumberFormatException', 'NVList', + 'OBJ_ADAPTER', 'Object', 'OBJECT_NOT_EXIST', 'ObjectChangeListener', + 'ObjectFactory', + 'ObjectFactoryBuilder', + 'ObjectHelper', + 'ObjectHolder', + 'ObjectImpl', 'ObjectImpl', + 'ObjectInput', + 'ObjectInputStream', + 'ObjectInputStream.GetField', + 'ObjectInputValidation', + 'ObjectOutput', + 'ObjectOutputStream', + 'ObjectOutputStream.PutField', + 'ObjectStreamClass', + 'ObjectStreamConstants', + 'ObjectStreamException', + 'ObjectStreamField', + 'ObjectView', + 'ObjID', + 'Observable', + 'Observer', + 'OctetSeqHelper', + 'OctetSeqHolder', + 'OMGVMCID', + 'OpenType', + 'Operation', + 'OperationNotSupportedException', + 'Option', + 'OptionalDataException', + 'OptionPaneUI', + 'ORB', + 'OutOfMemoryError', + 'OutputStream', + 'OutputStreamWriter', + 'OverlayLayout', + 'Owner', + 'Package', + 'PackedColorModel', + 'Pageable', + 'PageAttributes', + 'PageAttributes.ColorType', + 'PageAttributes.MediaType', + 'PageAttributes.OrientationRequestedType', + 'PageAttributes.OriginType', + 'PageAttributes.PrintQualityType', + 'PageFormat', + 'Paint', + 'PaintContext', + 'PaintEvent', + 'Panel', + 'PanelUI', + 'Paper', + 'ParagraphView', + 'ParagraphView', + 'ParameterBlock', + 'ParameterDescriptor', + 'ParseException', + 'ParsePosition', + 'Parser', + 'ParserDelegator', + 'PartialResultException', + 'PasswordAuthentication', + 'PasswordView', + 'Patch', + 'PathIterator', + 'Permission', + 'Permission', + 'PermissionCollection', + 'Permissions', + 'PERSIST_STORE', + 'PhantomReference', + 'PipedInputStream', + 'PipedOutputStream', + 'PipedReader', + 'PipedWriter', + 'PixelGrabber', + 'PixelInterleavedSampleModel', + 'PKCS8EncodedKeySpec', + 'PlainDocument', + 'PlainView', + 'Point', + 'Point2D', + 'Point2D.Double', + 'Point2D.Float', + 'Policy', + 'Policy', + 'PolicyError', + 'PolicyHelper', + 'PolicyHolder', + 'PolicyListHelper', + 'PolicyListHolder', + 'PolicyOperations', 'PolicyTypeHelper', + 'Polygon', + 'PopupMenu', + 'PopupMenuEvent', + 'PopupMenuListener', + 'PopupMenuUI', + 'Port', + 'Port.Info', + 'PortableRemoteObject', + 'PortableRemoteObjectDelegate', + 'Position', + 'Position.Bias', + 'PreparedStatement', + 'Principal', + 'Principal', + 'PrincipalHolder', + 'Printable', + 'PrinterAbortException', + 'PrinterException', + 'PrinterGraphics', + 'PrinterIOException', + 'PrinterJob', + 'PrintGraphics', + 'PrintJob', + 'PrintStream', + 'PrintWriter', + 'PRIVATE_MEMBER', + 'PrivateKey', + 'PrivilegedAction', + 'PrivilegedActionException', + 'PrivilegedExceptionAction', + 'Process', + 'ProfileDataException', + 'ProgressBarUI', + 'ProgressMonitor', + 'ProgressMonitorInputStream', + 'Properties', + 'PropertyChangeEvent', + 'PropertyChangeListener', + 'PropertyChangeSupport', + 'PropertyDescriptor', + 'PropertyEditor', + 'PropertyEditorManager', + 'PropertyEditorSupport', + 'PropertyPermission', + 'PropertyResourceBundle', + 'PropertyVetoException', + 'ProtectionDomain', + 'ProtocolException', + 'Provider', + 'ProviderException', + 'Proxy', + 'PUBLIC_MEMBER', + 'PublicKey', + 'PushbackInputStream', + 'PushbackReader', + 'QuadCurve2D', + 'QuadCurve2D.Double', + 'QuadCurve2D.Float', + 'Random', + 'RandomAccessFile', 'Raster', 'RasterFormatException', 'RasterOp', + 'Reader', 'Receiver', 'Rectangle', 'Rectangle2D', 'Rectangle2D.Double', + 'Rectangle2D.Float', 'RectangularShape', 'Ref', 'RefAddr', 'Reference', + 'Referenceable', 'ReferenceQueue', 'ReferralException', + 'ReflectPermission', 'Registry', 'RegistryHandler', 'RemarshalException', + 'Remote', 'RemoteCall', 'RemoteException', 'RemoteObject', 'RemoteRef', + 'RemoteServer', + 'RemoteStub', + 'RenderableImage', + 'RenderableImageOp', + 'RenderableImageProducer', + 'RenderContext', + 'RenderedImage', + 'RenderedImageFactory', + 'Renderer', + 'RenderingHints', + 'RenderingHints.Key', + 'RepaintManager', + 'ReplicateScaleFilter', + 'Repository', + 'RepositoryIdHelper', + 'Request', + 'RescaleOp', + 'Resolver', + 'ResolveResult', + 'ResourceBundle', + 'ResponseHandler', + 'ResultSet', + 'ResultSetMetaData', + 'ReverbType', + 'RGBImageFilter', + 'RMIClassLoader', + 'RMIClientSocketFactory', + 'RMIFailureHandler', + 'RMISecurityException', + 'RMISecurityManager', + 'RMIServerSocketFactory', + 'RMISocketFactory', + 'Robot', + 'RootPaneContainer', + 'RootPaneUI', + 'RoundRectangle2D', + 'RoundRectangle2D.Double', + 'RoundRectangle2D.Float', + 'RowMapper', + 'RSAKey', + 'RSAKeyGenParameterSpec', + 'RSAPrivateCrtKey', + 'RSAPrivateCrtKeySpec', + 'RSAPrivateKey', + 'RSAPrivateKeySpec', + 'RSAPublicKey', + 'RSAPublicKeySpec', + 'RTFEditorKit', + 'RuleBasedCollator', + 'Runnable', + 'Runtime', + 'RunTime', + 'RuntimeException', + 'RunTimeOperations', + 'RuntimePermission', + 'SampleModel', + 'SchemaViolationException', + 'Scrollable', + 'Scrollbar', + 'ScrollBarUI', + 'ScrollPane', + 'ScrollPaneConstants', + 'ScrollPaneLayout', + 'ScrollPaneLayout.UIResource', + 'ScrollPaneUI', + 'SearchControls', + 'SearchResult', + 'SecureClassLoader', + 'SecureRandom', + 'SecureRandomSpi', + 'Security', + 'SecurityException', + 'SecurityManager', + 'SecurityPermission', + 'Segment', + 'SeparatorUI', + 'Sequence', + 'SequenceInputStream', + 'Sequencer', + 'Sequencer.SyncMode', + 'Serializable', + 'SerializablePermission', + 'ServantObject', + 'ServerCloneException', + 'ServerError', 'ServerException', + 'ServerNotActiveException', + 'ServerRef', + 'ServerRequest', + 'ServerRuntimeException', + 'ServerSocket', + 'ServiceDetail', + 'ServiceDetailHelper', + 'ServiceInformation', + 'ServiceInformationHelper', + 'ServiceInformationHolder', + 'ServiceUnavailableException', + 'Set', + 'SetOverrideType', + 'SetOverrideTypeHelper', + 'Shape', + 'ShapeGraphicAttribute', + 'Short', + 'ShortHolder', + 'ShortLookupTable', + 'ShortMessage', + 'ShortSeqHelper', + 'ShortSeqHolder', + 'Signature', + 'SignatureException', + 'SignatureSpi', + 'SignedObject', + 'Signer', + 'SimpleAttributeSet', + 'SimpleBeanInfo', + 'SimpleDateFormat', + 'SimpleTimeZone', + 'SinglePixelPackedSampleModel', + 'SingleSelectionModel', + 'SizeLimitExceededException', + 'SizeRequirements', + 'SizeSequence', + 'Skeleton', + 'SkeletonMismatchException', + 'SkeletonNotFoundException', + 'SliderUI', + 'Socket', + 'SocketException', + 'SocketImpl', + 'SocketImplFactory', + 'SocketOptions', + 'SocketPermission', + 'SocketSecurityException', + 'SoftBevelBorder', + 'SoftReference', + 'SortedMap', + 'SortedSet', + 'Soundbank', + 'SoundbankReader', + 'SoundbankResource', + 'SourceDataLine', + 'SplitPaneUI', + 'SQLData', + 'SQLException', + 'SQLInput', + 'SQLOutput', 'SQLPermission', + 'SQLWarning', + 'Stack', + 'StackOverflowError', + 'StateEdit', + 'StateEditable', + 'StateFactory', + 'Statement', + 'Streamable', + 'StreamableValue', + 'StreamCorruptedException', + 'StreamTokenizer', + 'StrictMath', + 'String', + 'StringBuffer', + 'StringBufferInputStream', + 'StringCharacterIterator', + 'StringContent', + 'StringHolder', + 'StringIndexOutOfBoundsException', + 'StringReader', + 'StringRefAddr', + 'StringSelection', + 'StringTokenizer', + 'StringValueHelper', + 'StringWriter', + 'Stroke', + 'Struct', + 'StructMember', + 'StructMemberHelper', + 'Stub', + 'StubDelegate', + 'StubNotFoundException', + 'Style', + 'StyleConstants', + 'StyleConstants.CharacterConstants', + 'StyleConstants.ColorConstants', + 'StyleConstants.FontConstants', + 'StyleConstants.ParagraphConstants', + 'StyleContext', + 'StyledDocument', + 'StyledEditorKit', + 'StyledEditorKit.AlignmentAction', + 'StyledEditorKit.BoldAction', + 'StyledEditorKit.FontFamilyAction', + 'StyledEditorKit.FontSizeAction', + 'StyledEditorKit.ForegroundAction', + 'StyledEditorKit.ItalicAction', + 'StyledEditorKit.StyledTextAction', + 'StyledEditorKit.UnderlineAction', + 'StyleSheet', + 'StyleSheet.BoxPainter', + 'StyleSheet.ListPainter', + 'SwingConstants', + 'SwingPropertyChangeSupport', + 'SwingUtilities', + 'SyncFailedException', + 'Synthesizer', + 'SysexMessage', + 'System', + 'SystemColor', 'SystemException', + 'SystemFlavorMap', + 'TabableView', + 'TabbedPaneUI', + 'TabExpander', + 'TableCellEditor', + 'TableCellRenderer', + 'TableColumn', + 'TableColumnModel', + 'TableColumnModelEvent', + 'TableColumnModelListener', + 'TableHeaderUI', + 'TableModel', + 'TableModelEvent', + 'TableModelListener', + 'TableUI', + 'TableView', + 'TabSet', + 'TabStop', + 'TagElement', + 'TargetDataLine', + 'TCKind', + 'TextAction', + 'TextArea', + 'TextAttribute', + 'TextComponent', + 'TextEvent', + 'TextField', + 'TextHitInfo', + 'TextLayout', + 'TextLayout.CaretPolicy', + 'TextListener', + 'TextMeasurer', + 'TextUI', + 'TexturePaint', + 'Thread', + 'ThreadDeath', + 'ThreadGroup', + 'ThreadLocal', + 'Throwable', + 'Tie', + 'TileObserver', + 'Time', + 'TimeLimitExceededException', + 'Timer', + 'Timer', + 'TimerTask', + 'Timestamp', + 'TimeZone', + 'TitledBorder', + 'ToolBarUI', + 'Toolkit', + 'ToolTipManager', + 'ToolTipUI', + 'TooManyListenersException', + 'Track', + 'TRANSACTION_REQUIRED', + 'TRANSACTION_ROLLEDBACK', + 'TransactionRequiredException', + 'TransactionRolledbackException', + 'Transferable', + 'TransformAttribute', + 'TRANSIENT', + 'Transmitter', + 'Transparency', + 'TreeCellEditor', + 'TreeCellRenderer', + 'TreeExpansionEvent', + 'TreeExpansionListener', + 'TreeMap', + 'TreeModel', + 'TreeModelEvent', + 'TreeModelListener', + 'TreeNode', + 'TreePath', + 'TreeSelectionEvent', + 'TreeSelectionListener', + 'TreeSelectionModel', + 'TreeSet', + 'TreeUI', + 'TreeWillExpandListener', + 'TypeCode', + 'TypeCodeHolder', + 'TypeMismatch', + 'Types', + 'UID', + 'UIDefaults', + 'UIDefaults.ActiveValue', + 'UIDefaults.LazyInputMap', + 'UIDefaults.LazyValue', + 'UIDefaults.ProxyLazyValue', 'UIManager', + 'UIManager.LookAndFeelInfo', + 'UIResource', + 'ULongLongSeqHelper', + 'ULongLongSeqHolder', + 'ULongSeqHelper', + 'ULongSeqHolder', + 'UndeclaredThrowableException', + 'UndoableEdit', + 'UndoableEditEvent', + 'UndoableEditListener', + 'UndoableEditSupport', + 'UndoManager', + 'UnexpectedException', + 'UnicastRemoteObject', + 'UnionMember', + 'UnionMemberHelper', + 'UNKNOWN', + 'UnknownError', + 'UnknownException', + 'UnknownGroupException', + 'UnknownHostException', + 'UnknownHostException', + 'UnknownObjectException', + 'UnknownServiceException', + 'UnknownUserException', + 'UnmarshalException', + 'UnrecoverableKeyException', + 'Unreferenced', + 'UnresolvedPermission', + 'UnsatisfiedLinkError', + 'UnsolicitedNotification', + 'UnsolicitedNotificationEvent', + 'UnsolicitedNotificationListener', + 'UNSUPPORTED_POLICY', + 'UNSUPPORTED_POLICY_VALUE', + 'UnsupportedAudioFileException', + 'UnsupportedClassVersionError', + 'UnsupportedEncodingException', + 'UnsupportedFlavorException', + 'UnsupportedLookAndFeelException', + 'UnsupportedOperationException', + 'URL', + 'URLClassLoader', + 'URLConnection', + 'URLDecoder', + 'URLEncoder', + 'URLStreamHandler', + 'URLStreamHandlerFactory', + 'UserException', + 'UShortSeqHelper', + 'UShortSeqHolder', + 'UTFDataFormatException', + 'Util', + 'UtilDelegate', + 'Utilities', + 'ValueBase', + 'ValueBaseHelper', + 'ValueBaseHolder', + 'ValueFactory', + 'ValueHandler', + 'ValueMember', + 'ValueMemberHelper', + 'VariableHeightLayoutCache', + 'Vector', + 'VerifyError', + 'VersionSpecHelper', + 'VetoableChangeListener', + 'VetoableChangeSupport', + 'View', + 'ViewFactory', + 'ViewportLayout', + 'ViewportUI', + 'VirtualMachineError', + 'Visibility', + 'VisibilityHelper', + 'VM_ABSTRACT', + 'VM_CUSTOM', + 'VM_NONE', + 'VM_TRUNCATABLE', + 'VMID', + 'VoiceStatus', + 'Void', + 'WCharSeqHelper', + 'WCharSeqHolder', + 'WeakHashMap', + 'WeakReference', + 'Window', + 'WindowAdapter', + 'WindowConstants', + 'WindowEvent', 'WindowListener', + 'WrappedPlainView', + 'WritableRaster', + 'WritableRenderedImage', + 'WriteAbortedException', + 'Writer', + 'WrongTransaction', + 'WStringValueHelper', + 'X509Certificate', + 'X509CRL', + 'X509CRLEntry', + 'X509EncodedKeySpec', + 'X509Extension', + 'ZipEntry', + 'ZipException', + 'ZipFile', + 'ZipInputStream', + 'ZipOutputStream', + 'ZoneView', + '_BindingIteratorImplBase', + '_BindingIteratorStub', + '_IDLTypeStub', + '_NamingContextImplBase', + '_NamingContextStub', + '_PolicyStub', + '_Remote_Stub ' + ), + 4 => array( + 'void', 'double', 'int', 'boolean', 'byte', 'short', 'long', 'char', 'float' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '*', '&', '%', '!', ';', '<', '>', '?' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => true, + 4 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #aaaadd; font-weight: bold;', + 4 => 'color: #993333;' + ), + 'COMMENTS' => array( + 1=> 'color: #808080; font-style: italic;', + 2=> 'color: #a1a100;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://www.google.com/search?hl=en&q=allinurl%3A{FNAME}+java.sun.com&btnI=I%27m%20Feeling%20Lucky', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/java5.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/java5.php new file mode 100644 index 0000000..d1699de --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/java5.php @@ -0,0 +1,1021 @@ + 'Java(TM) 2 Platform Standard Edition 5.0', + 'COMMENT_SINGLE' => array(1 => '//'), /* import statements are not comments! */ + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + /* see the authoritative list of all 50 Java keywords at */ + /* http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#229308 */ + + /* java keywords, part 1: control flow */ + 'case', 'default', 'do', 'else', 'for', + 'goto', 'if', 'switch', 'while' + + /* IMO 'break', 'continue', 'return' and 'throw' */ + /* should also be added to this group, as they */ + /* also manage the control flow, */ + /* arguably 'try'/'catch'/'finally' as well */ + ), + 2 => array( + /* java keywords, part 2 */ + + 'break', 'continue', 'return', 'throw', + 'try', 'catch', 'finally', + + 'abstract', 'assert', 'class', 'const', 'enum', 'extends', + 'final', 'implements', 'import', 'instanceof', 'interface', + 'native', 'new', 'package', 'private', 'protected', + 'public', 'static', 'strictfp', 'super', 'synchronized', + 'this', 'throws', 'transient', 'volatile' + ), + 3 => array( + /* Java keywords, part 3: primitive data types and 'void' */ + 'boolean', 'byte', 'char', 'double', + 'float', 'int', 'long', 'short', 'void' + ), + 4 => array( + /* other reserved words in Java: literals */ + /* should be styled to look similar to numbers and Strings */ + 'false', 'null', 'true' + ), + 5 => array ( + 'Applet', 'AppletContext', 'AppletStub', 'AudioClip' + ), + 6 => array ( + 'AWTError', 'AWTEvent', 'AWTEventMulticaster', 'AWTException', 'AWTKeyStroke', 'AWTPermission', 'ActiveEvent', 'Adjustable', 'AlphaComposite', 'BasicStroke', 'BorderLayout', 'BufferCapabilities', 'BufferCapabilities.FlipContents', 'Button', 'Canvas', 'CardLayout', 'Checkbox', 'CheckboxGroup', 'CheckboxMenuItem', 'Choice', 'Color', 'Component', 'ComponentOrientation', 'Composite', 'CompositeContext', 'Container', 'ContainerOrderFocusTraversalPolicy', 'Cursor', 'DefaultFocusTraversalPolicy', 'DefaultKeyboardFocusManager', 'Dialog', 'Dimension', 'DisplayMode', 'EventQueue', 'FileDialog', 'FlowLayout', 'FocusTraversalPolicy', 'Font', 'FontFormatException', 'FontMetrics', 'Frame', 'GradientPaint', 'Graphics', 'Graphics2D', 'GraphicsConfigTemplate', 'GraphicsConfiguration', 'GraphicsDevice', 'GraphicsEnvironment', 'GridBagConstraints', 'GridBagLayout', 'GridLayout', 'HeadlessException', 'IllegalComponentStateException', 'Image', 'ImageCapabilities', 'Insets', 'ItemSelectable', 'JobAttributes', + 'JobAttributes.DefaultSelectionType', 'JobAttributes.DestinationType', 'JobAttributes.DialogType', 'JobAttributes.MultipleDocumentHandlingType', 'JobAttributes.SidesType', 'KeyEventDispatcher', 'KeyEventPostProcessor', 'KeyboardFocusManager', 'Label', 'LayoutManager', 'LayoutManager2', 'MediaTracker', 'Menu', 'MenuBar', 'MenuComponent', 'MenuContainer', 'MenuItem', 'MenuShortcut', 'MouseInfo', 'PageAttributes', 'PageAttributes.ColorType', 'PageAttributes.MediaType', 'PageAttributes.OrientationRequestedType', 'PageAttributes.OriginType', 'PageAttributes.PrintQualityType', 'Paint', 'PaintContext', 'Panel', 'Point', 'PointerInfo', 'Polygon', 'PopupMenu', 'PrintGraphics', 'PrintJob', 'Rectangle', 'RenderingHints', 'RenderingHints.Key', 'Robot', 'ScrollPane', 'ScrollPaneAdjustable', 'Scrollbar', 'Shape', 'Stroke', 'SystemColor', 'TextArea', 'TextComponent', 'TextField', 'TexturePaint', 'Toolkit', 'Transparency', 'Window' + ), + 7 => array ( + 'CMMException', 'ColorSpace', 'ICC_ColorSpace', 'ICC_Profile', 'ICC_ProfileGray', 'ICC_ProfileRGB', 'ProfileDataException' + ), + 8 => array ( + 'Clipboard', 'ClipboardOwner', 'DataFlavor', 'FlavorEvent', 'FlavorListener', 'FlavorMap', 'FlavorTable', 'MimeTypeParseException', 'StringSelection', 'SystemFlavorMap', 'Transferable', 'UnsupportedFlavorException' + ), + 9 => array ( + 'Autoscroll', 'DnDConstants', 'DragGestureEvent', 'DragGestureListener', 'DragGestureRecognizer', 'DragSource', 'DragSourceAdapter', 'DragSourceContext', 'DragSourceDragEvent', 'DragSourceDropEvent', 'DragSourceEvent', 'DragSourceListener', 'DragSourceMotionListener', 'DropTarget', 'DropTarget.DropTargetAutoScroller', 'DropTargetAdapter', 'DropTargetContext', 'DropTargetDragEvent', 'DropTargetDropEvent', 'DropTargetEvent', 'DropTargetListener', 'InvalidDnDOperationException', 'MouseDragGestureRecognizer' + ), + 10 => array ( + 'AWTEventListener', 'AWTEventListenerProxy', 'ActionEvent', 'ActionListener', 'AdjustmentEvent', 'AdjustmentListener', 'ComponentAdapter', 'ComponentEvent', 'ComponentListener', 'ContainerAdapter', 'ContainerEvent', 'ContainerListener', 'FocusAdapter', 'FocusEvent', 'FocusListener', 'HierarchyBoundsAdapter', 'HierarchyBoundsListener', 'HierarchyEvent', 'HierarchyListener', 'InputEvent', 'InputMethodEvent', 'InputMethodListener', 'InvocationEvent', 'ItemEvent', 'ItemListener', 'KeyAdapter', 'KeyEvent', 'KeyListener', 'MouseAdapter', 'MouseListener', 'MouseMotionAdapter', 'MouseMotionListener', 'MouseWheelEvent', 'MouseWheelListener', 'PaintEvent', 'TextEvent', 'TextListener', 'WindowAdapter', 'WindowEvent', 'WindowFocusListener', 'WindowListener', 'WindowStateListener' + ), + 11 => array ( + 'FontRenderContext', 'GlyphJustificationInfo', 'GlyphMetrics', 'GlyphVector', 'GraphicAttribute', 'ImageGraphicAttribute', 'LineBreakMeasurer', 'LineMetrics', 'MultipleMaster', 'NumericShaper', 'ShapeGraphicAttribute', 'TextAttribute', 'TextHitInfo', 'TextLayout', 'TextLayout.CaretPolicy', 'TextMeasurer', 'TransformAttribute' + ), + 12 => array ( + 'AffineTransform', 'Arc2D', 'Arc2D.Double', 'Arc2D.Float', 'Area', 'CubicCurve2D', 'CubicCurve2D.Double', 'CubicCurve2D.Float', 'Dimension2D', 'Ellipse2D', 'Ellipse2D.Double', 'Ellipse2D.Float', 'FlatteningPathIterator', 'GeneralPath', 'IllegalPathStateException', 'Line2D', 'Line2D.Double', 'Line2D.Float', 'NoninvertibleTransformException', 'PathIterator', 'Point2D', 'Point2D.Double', 'Point2D.Float', 'QuadCurve2D', 'QuadCurve2D.Double', 'QuadCurve2D.Float', 'Rectangle2D', 'Rectangle2D.Double', 'Rectangle2D.Float', 'RectangularShape', 'RoundRectangle2D', 'RoundRectangle2D.Double', 'RoundRectangle2D.Float' + ), + 13 => array ( + 'InputContext', 'InputMethodHighlight', 'InputMethodRequests', 'InputSubset' + ), + 14 => array ( + 'InputMethod', 'InputMethodContext', 'InputMethodDescriptor' + ), + 15 => array ( + 'AffineTransformOp', 'AreaAveragingScaleFilter', 'BandCombineOp', 'BandedSampleModel', 'BufferStrategy', 'BufferedImage', 'BufferedImageFilter', 'BufferedImageOp', 'ByteLookupTable', 'ColorConvertOp', 'ColorModel', 'ComponentColorModel', 'ComponentSampleModel', 'ConvolveOp', 'CropImageFilter', 'DataBuffer', 'DataBufferByte', 'DataBufferDouble', 'DataBufferFloat', 'DataBufferInt', 'DataBufferShort', 'DataBufferUShort', 'DirectColorModel', 'FilteredImageSource', 'ImageConsumer', 'ImageFilter', 'ImageObserver', 'ImageProducer', 'ImagingOpException', 'IndexColorModel', 'Kernel', 'LookupOp', 'LookupTable', 'MemoryImageSource', 'MultiPixelPackedSampleModel', 'PackedColorModel', 'PixelGrabber', 'PixelInterleavedSampleModel', 'RGBImageFilter', 'Raster', 'RasterFormatException', 'RasterOp', 'RenderedImage', 'ReplicateScaleFilter', 'RescaleOp', 'SampleModel', 'ShortLookupTable', 'SinglePixelPackedSampleModel', 'TileObserver', 'VolatileImage', 'WritableRaster', 'WritableRenderedImage' + ), + 16 => array ( + 'ContextualRenderedImageFactory', 'ParameterBlock', 'RenderContext', 'RenderableImage', 'RenderableImageOp', 'RenderableImageProducer', 'RenderedImageFactory' + ), + 17 => array ( + 'Book', 'PageFormat', 'Pageable', 'Paper', 'Printable', 'PrinterAbortException', 'PrinterException', 'PrinterGraphics', 'PrinterIOException', 'PrinterJob' + ), + 18 => array ( + 'AppletInitializer', 'BeanDescriptor', 'BeanInfo', 'Beans', 'Customizer', 'DefaultPersistenceDelegate', 'DesignMode', 'Encoder', 'EventHandler', 'EventSetDescriptor', 'ExceptionListener', 'Expression', 'FeatureDescriptor', 'IndexedPropertyChangeEvent', 'IndexedPropertyDescriptor', 'Introspector', 'MethodDescriptor', 'ParameterDescriptor', 'PersistenceDelegate', 'PropertyChangeEvent', 'PropertyChangeListener', 'PropertyChangeListenerProxy', 'PropertyChangeSupport', 'PropertyDescriptor', 'PropertyEditor', 'PropertyEditorManager', 'PropertyEditorSupport', 'PropertyVetoException', 'SimpleBeanInfo', 'VetoableChangeListener', 'VetoableChangeListenerProxy', 'VetoableChangeSupport', 'Visibility', 'XMLDecoder', 'XMLEncoder' + ), + 19 => array ( + 'BeanContext', 'BeanContextChild', 'BeanContextChildComponentProxy', 'BeanContextChildSupport', 'BeanContextContainerProxy', 'BeanContextEvent', 'BeanContextMembershipEvent', 'BeanContextMembershipListener', 'BeanContextProxy', 'BeanContextServiceAvailableEvent', 'BeanContextServiceProvider', 'BeanContextServiceProviderBeanInfo', 'BeanContextServiceRevokedEvent', 'BeanContextServiceRevokedListener', 'BeanContextServices', 'BeanContextServicesListener', 'BeanContextServicesSupport', 'BeanContextServicesSupport.BCSSServiceProvider', 'BeanContextSupport', 'BeanContextSupport.BCSIterator' + ), + 20 => array ( + 'BufferedInputStream', 'BufferedOutputStream', 'BufferedReader', 'BufferedWriter', 'ByteArrayInputStream', 'ByteArrayOutputStream', 'CharArrayReader', 'CharArrayWriter', 'CharConversionException', 'Closeable', 'DataInput', 'DataOutput', 'EOFException', 'Externalizable', 'File', 'FileDescriptor', 'FileInputStream', 'FileNotFoundException', 'FileOutputStream', 'FilePermission', 'FileReader', 'FileWriter', 'FilenameFilter', 'FilterInputStream', 'FilterOutputStream', 'FilterReader', 'FilterWriter', 'Flushable', 'IOException', 'InputStreamReader', 'InterruptedIOException', 'InvalidClassException', 'InvalidObjectException', 'LineNumberInputStream', 'LineNumberReader', 'NotActiveException', 'NotSerializableException', 'ObjectInput', 'ObjectInputStream', 'ObjectInputStream.GetField', 'ObjectInputValidation', 'ObjectOutput', 'ObjectOutputStream', 'ObjectOutputStream.PutField', 'ObjectStreamClass', 'ObjectStreamConstants', 'ObjectStreamException', 'ObjectStreamField', 'OptionalDataException', 'OutputStreamWriter', + 'PipedInputStream', 'PipedOutputStream', 'PipedReader', 'PipedWriter', 'PrintStream', 'PrintWriter', 'PushbackInputStream', 'PushbackReader', 'RandomAccessFile', 'Reader', 'SequenceInputStream', 'Serializable', 'SerializablePermission', 'StreamCorruptedException', 'StreamTokenizer', 'StringBufferInputStream', 'StringReader', 'StringWriter', 'SyncFailedException', 'UTFDataFormatException', 'UnsupportedEncodingException', 'WriteAbortedException', 'Writer' + ), + 21 => array ( + 'AbstractMethodError', 'Appendable', 'ArithmeticException', 'ArrayIndexOutOfBoundsException', 'ArrayStoreException', 'AssertionError', 'Boolean', 'Byte', 'CharSequence', 'Character', 'Character.Subset', 'Character.UnicodeBlock', 'Class', 'ClassCastException', 'ClassCircularityError', 'ClassFormatError', 'ClassLoader', 'ClassNotFoundException', 'CloneNotSupportedException', 'Cloneable', 'Comparable', 'Compiler', 'Deprecated', 'Double', 'Enum', 'EnumConstantNotPresentException', 'Error', 'Exception', 'ExceptionInInitializerError', 'Float', 'IllegalAccessError', 'IllegalAccessException', 'IllegalArgumentException', 'IllegalMonitorStateException', 'IllegalStateException', 'IllegalThreadStateException', 'IncompatibleClassChangeError', 'IndexOutOfBoundsException', 'InheritableThreadLocal', 'InstantiationError', 'InstantiationException', 'Integer', 'InternalError', 'InterruptedException', 'Iterable', 'LinkageError', 'Long', 'Math', 'NegativeArraySizeException', 'NoClassDefFoundError', 'NoSuchFieldError', + 'NoSuchFieldException', 'NoSuchMethodError', 'NoSuchMethodException', 'NullPointerException', 'Number', 'NumberFormatException', 'OutOfMemoryError', 'Override', 'Package', 'Process', 'ProcessBuilder', 'Readable', 'Runnable', 'Runtime', 'RuntimeException', 'RuntimePermission', 'SecurityException', 'SecurityManager', 'Short', 'StackOverflowError', 'StackTraceElement', 'StrictMath', 'String', 'StringBuffer', 'StringBuilder', 'StringIndexOutOfBoundsException', 'SuppressWarnings', 'System', 'Thread', 'Thread.State', 'Thread.UncaughtExceptionHandler', 'ThreadDeath', 'ThreadGroup', 'ThreadLocal', 'Throwable', 'TypeNotPresentException', 'UnknownError', 'UnsatisfiedLinkError', 'UnsupportedClassVersionError', 'UnsupportedOperationException', 'VerifyError', 'VirtualMachineError', 'Void' + ), + 22 => array ( + 'AnnotationFormatError', 'AnnotationTypeMismatchException', 'Documented', 'ElementType', 'IncompleteAnnotationException', 'Inherited', 'Retention', 'RetentionPolicy', 'Target' + ), + 23 => array ( + 'ClassDefinition', 'ClassFileTransformer', 'IllegalClassFormatException', 'Instrumentation', 'UnmodifiableClassException' + ), + 24 => array ( + 'ClassLoadingMXBean', 'CompilationMXBean', 'GarbageCollectorMXBean', 'ManagementFactory', 'ManagementPermission', 'MemoryMXBean', 'MemoryManagerMXBean', 'MemoryNotificationInfo', 'MemoryPoolMXBean', 'MemoryType', 'MemoryUsage', 'OperatingSystemMXBean', 'RuntimeMXBean', 'ThreadInfo', 'ThreadMXBean' + ), + 25 => array ( + 'PhantomReference', 'ReferenceQueue', 'SoftReference', 'WeakReference' + ), + 26 => array ( + 'AccessibleObject', 'AnnotatedElement', 'Constructor', 'Field', 'GenericArrayType', 'GenericDeclaration', 'GenericSignatureFormatError', 'InvocationHandler', 'InvocationTargetException', 'MalformedParameterizedTypeException', 'Member', 'Method', 'Modifier', 'ParameterizedType', 'ReflectPermission', 'Type', 'TypeVariable', 'UndeclaredThrowableException', 'WildcardType' + ), + 27 => array ( + 'BigDecimal', 'BigInteger', 'MathContext', 'RoundingMode' + ), + 28 => array ( + 'Authenticator', 'Authenticator.RequestorType', 'BindException', 'CacheRequest', 'CacheResponse', 'ContentHandlerFactory', 'CookieHandler', 'DatagramPacket', 'DatagramSocket', 'DatagramSocketImpl', 'DatagramSocketImplFactory', 'FileNameMap', 'HttpRetryException', 'HttpURLConnection', 'Inet4Address', 'Inet6Address', 'InetAddress', 'InetSocketAddress', 'JarURLConnection', 'MalformedURLException', 'MulticastSocket', 'NetPermission', 'NetworkInterface', 'NoRouteToHostException', 'PasswordAuthentication', 'PortUnreachableException', 'ProtocolException', 'Proxy.Type', 'ProxySelector', 'ResponseCache', 'SecureCacheResponse', 'ServerSocket', 'Socket', 'SocketAddress', 'SocketException', 'SocketImpl', 'SocketImplFactory', 'SocketOptions', 'SocketPermission', 'SocketTimeoutException', 'URI', 'URISyntaxException', 'URL', 'URLClassLoader', 'URLConnection', 'URLDecoder', 'URLEncoder', 'URLStreamHandler', 'URLStreamHandlerFactory', 'UnknownServiceException' + ), + 29 => array ( + 'Buffer', 'BufferOverflowException', 'BufferUnderflowException', 'ByteBuffer', 'ByteOrder', 'CharBuffer', 'DoubleBuffer', 'FloatBuffer', 'IntBuffer', 'InvalidMarkException', 'LongBuffer', 'MappedByteBuffer', 'ReadOnlyBufferException', 'ShortBuffer' + ), + 30 => array ( + 'AlreadyConnectedException', 'AsynchronousCloseException', 'ByteChannel', 'CancelledKeyException', 'Channel', 'Channels', 'ClosedByInterruptException', 'ClosedChannelException', 'ClosedSelectorException', 'ConnectionPendingException', 'DatagramChannel', 'FileChannel', 'FileChannel.MapMode', 'FileLock', 'FileLockInterruptionException', 'GatheringByteChannel', 'IllegalBlockingModeException', 'IllegalSelectorException', 'InterruptibleChannel', 'NoConnectionPendingException', 'NonReadableChannelException', 'NonWritableChannelException', 'NotYetBoundException', 'NotYetConnectedException', 'OverlappingFileLockException', 'Pipe', 'Pipe.SinkChannel', 'Pipe.SourceChannel', 'ReadableByteChannel', 'ScatteringByteChannel', 'SelectableChannel', 'SelectionKey', 'Selector', 'ServerSocketChannel', 'SocketChannel', 'UnresolvedAddressException', 'UnsupportedAddressTypeException', 'WritableByteChannel' + ), + 31 => array ( + 'AbstractInterruptibleChannel', 'AbstractSelectableChannel', 'AbstractSelectionKey', 'AbstractSelector', 'SelectorProvider' + ), + 32 => array ( + 'CharacterCodingException', 'Charset', 'CharsetDecoder', 'CharsetEncoder', 'CoderMalfunctionError', 'CoderResult', 'CodingErrorAction', 'IllegalCharsetNameException', 'MalformedInputException', 'UnmappableCharacterException', 'UnsupportedCharsetException' + ), + 33 => array ( + 'CharsetProvider' + ), + 34 => array ( + 'AccessException', 'AlreadyBoundException', 'ConnectIOException', 'MarshalException', 'MarshalledObject', 'Naming', 'NoSuchObjectException', 'NotBoundException', 'RMISecurityException', 'RMISecurityManager', 'Remote', 'RemoteException', 'ServerError', 'ServerException', 'ServerRuntimeException', 'StubNotFoundException', 'UnexpectedException', 'UnmarshalException' + ), + 35 => array ( + 'Activatable', 'ActivateFailedException', 'ActivationDesc', 'ActivationException', 'ActivationGroup', 'ActivationGroupDesc', 'ActivationGroupDesc.CommandEnvironment', 'ActivationGroupID', 'ActivationGroup_Stub', 'ActivationID', 'ActivationInstantiator', 'ActivationMonitor', 'ActivationSystem', 'Activator', 'UnknownGroupException', 'UnknownObjectException' + ), + 36 => array ( + 'DGC', 'Lease', 'VMID' + ), + 37 => array ( + 'LocateRegistry', 'Registry', 'RegistryHandler' + ), + 38 => array ( + 'ExportException', 'LoaderHandler', 'LogStream', 'ObjID', 'Operation', 'RMIClassLoader', 'RMIClassLoaderSpi', 'RMIClientSocketFactory', 'RMIFailureHandler', 'RMIServerSocketFactory', 'RMISocketFactory', 'RemoteCall', 'RemoteObject', 'RemoteObjectInvocationHandler', 'RemoteRef', 'RemoteServer', 'RemoteStub', 'ServerCloneException', 'ServerNotActiveException', 'ServerRef', 'Skeleton', 'SkeletonMismatchException', 'SkeletonNotFoundException', 'SocketSecurityException', 'UID', 'UnicastRemoteObject', 'Unreferenced' + ), + 39 => array ( + 'AccessControlContext', 'AccessControlException', 'AccessController', 'AlgorithmParameterGenerator', 'AlgorithmParameterGeneratorSpi', 'AlgorithmParameters', 'AlgorithmParametersSpi', 'AllPermission', 'AuthProvider', 'BasicPermission', 'CodeSigner', 'CodeSource', 'DigestException', 'DigestInputStream', 'DigestOutputStream', 'DomainCombiner', 'GeneralSecurityException', 'Guard', 'GuardedObject', 'Identity', 'IdentityScope', 'InvalidAlgorithmParameterException', 'InvalidParameterException', 'Key', 'KeyException', 'KeyFactory', 'KeyFactorySpi', 'KeyManagementException', 'KeyPair', 'KeyPairGenerator', 'KeyPairGeneratorSpi', 'KeyRep', 'KeyRep.Type', 'KeyStore', 'KeyStore.Builder', 'KeyStore.CallbackHandlerProtection', 'KeyStore.Entry', 'KeyStore.LoadStoreParameter', 'KeyStore.PasswordProtection', 'KeyStore.PrivateKeyEntry', 'KeyStore.ProtectionParameter', 'KeyStore.SecretKeyEntry', 'KeyStore.TrustedCertificateEntry', 'KeyStoreException', 'KeyStoreSpi', 'MessageDigest', 'MessageDigestSpi', + 'NoSuchAlgorithmException', 'NoSuchProviderException', 'PermissionCollection', 'Permissions', 'PrivateKey', 'PrivilegedAction', 'PrivilegedActionException', 'PrivilegedExceptionAction', 'ProtectionDomain', 'Provider', 'Provider.Service', 'ProviderException', 'PublicKey', 'SecureClassLoader', 'SecureRandom', 'SecureRandomSpi', 'Security', 'SecurityPermission', 'Signature', 'SignatureException', 'SignatureSpi', 'SignedObject', 'Signer', 'UnrecoverableEntryException', 'UnrecoverableKeyException', 'UnresolvedPermission' + ), + 40 => array ( + 'Acl', 'AclEntry', 'AclNotFoundException', 'Group', 'LastOwnerException', 'NotOwnerException', 'Owner' + ), + 41 => array ( + 'CRL', 'CRLException', 'CRLSelector', 'CertPath', 'CertPath.CertPathRep', 'CertPathBuilder', 'CertPathBuilderException', 'CertPathBuilderResult', 'CertPathBuilderSpi', 'CertPathParameters', 'CertPathValidator', 'CertPathValidatorException', 'CertPathValidatorResult', 'CertPathValidatorSpi', 'CertSelector', 'CertStore', 'CertStoreException', 'CertStoreParameters', 'CertStoreSpi', 'Certificate.CertificateRep', 'CertificateFactory', 'CertificateFactorySpi', 'CollectionCertStoreParameters', 'LDAPCertStoreParameters', 'PKIXBuilderParameters', 'PKIXCertPathBuilderResult', 'PKIXCertPathChecker', 'PKIXCertPathValidatorResult', 'PKIXParameters', 'PolicyNode', 'PolicyQualifierInfo', 'TrustAnchor', 'X509CRL', 'X509CRLEntry', 'X509CRLSelector', 'X509CertSelector', 'X509Extension' + ), + 42 => array ( + 'DSAKey', 'DSAKeyPairGenerator', 'DSAParams', 'DSAPrivateKey', 'DSAPublicKey', 'ECKey', 'ECPrivateKey', 'ECPublicKey', 'RSAKey', 'RSAMultiPrimePrivateCrtKey', 'RSAPrivateCrtKey', 'RSAPrivateKey', 'RSAPublicKey' + ), + 43 => array ( + 'AlgorithmParameterSpec', 'DSAParameterSpec', 'DSAPrivateKeySpec', 'DSAPublicKeySpec', 'ECField', 'ECFieldF2m', 'ECFieldFp', 'ECGenParameterSpec', 'ECParameterSpec', 'ECPoint', 'ECPrivateKeySpec', 'ECPublicKeySpec', 'EllipticCurve', 'EncodedKeySpec', 'InvalidKeySpecException', 'InvalidParameterSpecException', 'KeySpec', 'MGF1ParameterSpec', 'PKCS8EncodedKeySpec', 'PSSParameterSpec', 'RSAKeyGenParameterSpec', 'RSAMultiPrimePrivateCrtKeySpec', 'RSAOtherPrimeInfo', 'RSAPrivateCrtKeySpec', 'RSAPrivateKeySpec', 'RSAPublicKeySpec', 'X509EncodedKeySpec' + ), + 44 => array ( + 'BatchUpdateException', 'Blob', 'CallableStatement', 'Clob', 'Connection', 'DataTruncation', 'DatabaseMetaData', 'Driver', 'DriverManager', 'DriverPropertyInfo', 'ParameterMetaData', 'PreparedStatement', 'Ref', 'ResultSet', 'ResultSetMetaData', 'SQLData', 'SQLException', 'SQLInput', 'SQLOutput', 'SQLPermission', 'SQLWarning', 'Savepoint', 'Struct', 'Time', 'Types' + ), + 45 => array ( + 'AttributedCharacterIterator', 'AttributedCharacterIterator.Attribute', 'AttributedString', 'Bidi', 'BreakIterator', 'CharacterIterator', 'ChoiceFormat', 'CollationElementIterator', 'CollationKey', 'Collator', 'DateFormat', 'DateFormat.Field', 'DateFormatSymbols', 'DecimalFormat', 'DecimalFormatSymbols', 'FieldPosition', 'Format', 'Format.Field', 'MessageFormat', 'MessageFormat.Field', 'NumberFormat', 'NumberFormat.Field', 'ParseException', 'ParsePosition', 'RuleBasedCollator', 'SimpleDateFormat', 'StringCharacterIterator' + ), + 46 => array ( + 'AbstractCollection', 'AbstractList', 'AbstractMap', 'AbstractQueue', 'AbstractSequentialList', 'AbstractSet', 'ArrayList', 'Arrays', 'BitSet', 'Calendar', 'Collection', 'Collections', 'Comparator', 'ConcurrentModificationException', 'Currency', 'Dictionary', 'DuplicateFormatFlagsException', 'EmptyStackException', 'EnumMap', 'EnumSet', 'Enumeration', 'EventListenerProxy', 'EventObject', 'FormatFlagsConversionMismatchException', 'Formattable', 'FormattableFlags', 'Formatter.BigDecimalLayoutForm', 'FormatterClosedException', 'GregorianCalendar', 'HashMap', 'HashSet', 'Hashtable', 'IdentityHashMap', 'IllegalFormatCodePointException', 'IllegalFormatConversionException', 'IllegalFormatException', 'IllegalFormatFlagsException', 'IllegalFormatPrecisionException', 'IllegalFormatWidthException', 'InputMismatchException', 'InvalidPropertiesFormatException', 'Iterator', 'LinkedHashMap', 'LinkedHashSet', 'LinkedList', 'ListIterator', 'ListResourceBundle', 'Locale', 'Map', 'Map.Entry', 'MissingFormatArgumentException', + 'MissingFormatWidthException', 'MissingResourceException', 'NoSuchElementException', 'Observable', 'Observer', 'PriorityQueue', 'Properties', 'PropertyPermission', 'PropertyResourceBundle', 'Queue', 'Random', 'RandomAccess', 'ResourceBundle', 'Scanner', 'Set', 'SimpleTimeZone', 'SortedMap', 'SortedSet', 'Stack', 'StringTokenizer', 'TimeZone', 'TimerTask', 'TooManyListenersException', 'TreeMap', 'TreeSet', 'UUID', 'UnknownFormatConversionException', 'UnknownFormatFlagsException', 'Vector', 'WeakHashMap' + ), + 47 => array ( + 'AbstractExecutorService', 'ArrayBlockingQueue', 'BlockingQueue', 'BrokenBarrierException', 'Callable', 'CancellationException', 'CompletionService', 'ConcurrentHashMap', 'ConcurrentLinkedQueue', 'ConcurrentMap', 'CopyOnWriteArrayList', 'CopyOnWriteArraySet', 'CountDownLatch', 'CyclicBarrier', 'DelayQueue', 'Delayed', 'Exchanger', 'ExecutionException', 'Executor', 'ExecutorCompletionService', 'ExecutorService', 'Executors', 'Future', 'FutureTask', 'LinkedBlockingQueue', 'PriorityBlockingQueue', 'RejectedExecutionException', 'RejectedExecutionHandler', 'ScheduledExecutorService', 'ScheduledFuture', 'ScheduledThreadPoolExecutor', 'Semaphore', 'SynchronousQueue', 'ThreadFactory', 'ThreadPoolExecutor', 'ThreadPoolExecutor.AbortPolicy', 'ThreadPoolExecutor.CallerRunsPolicy', 'ThreadPoolExecutor.DiscardOldestPolicy', 'ThreadPoolExecutor.DiscardPolicy', 'TimeUnit', 'TimeoutException' + ), + 48 => array ( + 'AtomicBoolean', 'AtomicInteger', 'AtomicIntegerArray', 'AtomicIntegerFieldUpdater', 'AtomicLong', 'AtomicLongArray', 'AtomicLongFieldUpdater', 'AtomicMarkableReference', 'AtomicReference', 'AtomicReferenceArray', 'AtomicReferenceFieldUpdater', 'AtomicStampedReference' + ), + 49 => array ( + 'AbstractQueuedSynchronizer', 'Condition', 'Lock', 'LockSupport', 'ReadWriteLock', 'ReentrantLock', 'ReentrantReadWriteLock', 'ReentrantReadWriteLock.ReadLock', 'ReentrantReadWriteLock.WriteLock' + ), + 50 => array ( + 'Attributes.Name', 'JarEntry', 'JarException', 'JarFile', 'JarInputStream', 'JarOutputStream', 'Manifest', 'Pack200', 'Pack200.Packer', 'Pack200.Unpacker' + ), + 51 => array ( + 'ConsoleHandler', 'ErrorManager', 'FileHandler', 'Filter', 'Handler', 'Level', 'LogManager', 'LogRecord', 'Logger', 'LoggingMXBean', 'LoggingPermission', 'MemoryHandler', 'SimpleFormatter', 'SocketHandler', 'StreamHandler', 'XMLFormatter' + ), + 52 => array ( + 'AbstractPreferences', 'BackingStoreException', 'InvalidPreferencesFormatException', 'NodeChangeEvent', 'NodeChangeListener', 'PreferenceChangeEvent', 'PreferenceChangeListener', 'Preferences', 'PreferencesFactory' + ), + 53 => array ( + 'MatchResult', 'Matcher', 'Pattern', 'PatternSyntaxException' + ), + 54 => array ( + 'Adler32', 'CRC32', 'CheckedInputStream', 'CheckedOutputStream', 'Checksum', 'DataFormatException', 'Deflater', 'DeflaterOutputStream', 'GZIPInputStream', 'GZIPOutputStream', 'Inflater', 'InflaterInputStream', 'ZipEntry', 'ZipException', 'ZipFile', 'ZipInputStream', 'ZipOutputStream' + ), + 55 => array ( + 'Accessible', 'AccessibleAction', 'AccessibleAttributeSequence', 'AccessibleBundle', 'AccessibleComponent', 'AccessibleContext', 'AccessibleEditableText', 'AccessibleExtendedComponent', 'AccessibleExtendedTable', 'AccessibleExtendedText', 'AccessibleHyperlink', 'AccessibleHypertext', 'AccessibleIcon', 'AccessibleKeyBinding', 'AccessibleRelation', 'AccessibleRelationSet', 'AccessibleResourceBundle', 'AccessibleRole', 'AccessibleSelection', 'AccessibleState', 'AccessibleStateSet', 'AccessibleStreamable', 'AccessibleTable', 'AccessibleTableModelChange', 'AccessibleText', 'AccessibleTextSequence', 'AccessibleValue' + ), + 56 => array ( + 'ActivityCompletedException', 'ActivityRequiredException', 'InvalidActivityException' + ), + 57 => array ( + 'BadPaddingException', 'Cipher', 'CipherInputStream', 'CipherOutputStream', 'CipherSpi', 'EncryptedPrivateKeyInfo', 'ExemptionMechanism', 'ExemptionMechanismException', 'ExemptionMechanismSpi', 'IllegalBlockSizeException', 'KeyAgreement', 'KeyAgreementSpi', 'KeyGenerator', 'KeyGeneratorSpi', 'Mac', 'MacSpi', 'NoSuchPaddingException', 'NullCipher', 'SealedObject', 'SecretKey', 'SecretKeyFactory', 'SecretKeyFactorySpi', 'ShortBufferException' + ), + 58 => array ( + 'DHKey', 'DHPrivateKey', 'DHPublicKey', 'PBEKey' + ), + 59 => array ( + 'DESKeySpec', 'DESedeKeySpec', 'DHGenParameterSpec', 'DHParameterSpec', 'DHPrivateKeySpec', 'DHPublicKeySpec', 'IvParameterSpec', 'OAEPParameterSpec', 'PBEKeySpec', 'PBEParameterSpec', 'PSource', 'PSource.PSpecified', 'RC2ParameterSpec', 'RC5ParameterSpec', 'SecretKeySpec' + ), + 60 => array ( + 'IIOException', 'IIOImage', 'IIOParam', 'IIOParamController', 'ImageIO', 'ImageReadParam', 'ImageReader', 'ImageTranscoder', 'ImageTypeSpecifier', 'ImageWriteParam', 'ImageWriter' + ), + 61 => array ( + 'IIOReadProgressListener', 'IIOReadUpdateListener', 'IIOReadWarningListener', 'IIOWriteProgressListener', 'IIOWriteWarningListener' + ), + 62 => array ( + 'IIOInvalidTreeException', 'IIOMetadata', 'IIOMetadataController', 'IIOMetadataFormat', 'IIOMetadataFormatImpl', 'IIOMetadataNode' + ), + 63 => array ( + 'BMPImageWriteParam' + ), + 64 => array ( + 'JPEGHuffmanTable', 'JPEGImageReadParam', 'JPEGImageWriteParam', 'JPEGQTable' + ), + 65 => array ( + 'IIORegistry', 'IIOServiceProvider', 'ImageInputStreamSpi', 'ImageOutputStreamSpi', 'ImageReaderSpi', 'ImageReaderWriterSpi', 'ImageTranscoderSpi', 'ImageWriterSpi', 'RegisterableService', 'ServiceRegistry', 'ServiceRegistry.Filter' + ), + 66 => array ( + 'FileCacheImageInputStream', 'FileCacheImageOutputStream', 'FileImageInputStream', 'FileImageOutputStream', 'IIOByteBuffer', 'ImageInputStream', 'ImageInputStreamImpl', 'ImageOutputStream', 'ImageOutputStreamImpl', 'MemoryCacheImageInputStream', 'MemoryCacheImageOutputStream' + ), + 67 => array ( + 'AttributeChangeNotification', 'AttributeChangeNotificationFilter', 'AttributeNotFoundException', 'AttributeValueExp', 'BadAttributeValueExpException', 'BadBinaryOpValueExpException', 'BadStringOperationException', 'Descriptor', 'DescriptorAccess', 'DynamicMBean', 'InstanceAlreadyExistsException', 'InstanceNotFoundException', 'InvalidApplicationException', 'JMException', 'JMRuntimeException', 'ListenerNotFoundException', 'MBeanAttributeInfo', 'MBeanConstructorInfo', 'MBeanException', 'MBeanFeatureInfo', 'MBeanInfo', 'MBeanNotificationInfo', 'MBeanOperationInfo', 'MBeanParameterInfo', 'MBeanPermission', 'MBeanRegistration', 'MBeanRegistrationException', 'MBeanServer', 'MBeanServerBuilder', 'MBeanServerConnection', 'MBeanServerDelegate', 'MBeanServerDelegateMBean', 'MBeanServerFactory', 'MBeanServerInvocationHandler', 'MBeanServerNotification', 'MBeanServerPermission', 'MBeanTrustPermission', 'MalformedObjectNameException', 'NotCompliantMBeanException', 'Notification', 'NotificationBroadcaster', + 'NotificationBroadcasterSupport', 'NotificationEmitter', 'NotificationFilter', 'NotificationFilterSupport', 'NotificationListener', 'ObjectInstance', 'ObjectName', 'OperationsException', 'PersistentMBean', 'Query', 'QueryEval', 'QueryExp', 'ReflectionException', 'RuntimeErrorException', 'RuntimeMBeanException', 'RuntimeOperationsException', 'ServiceNotFoundException', 'StandardMBean', 'StringValueExp', 'ValueExp' + ), + 68 => array ( + 'ClassLoaderRepository', 'MLet', 'MLetMBean', 'PrivateClassLoader', 'PrivateMLet' + ), + 69 => array ( + 'DescriptorSupport', 'InvalidTargetObjectTypeException', 'ModelMBean', 'ModelMBeanAttributeInfo', 'ModelMBeanConstructorInfo', 'ModelMBeanInfo', 'ModelMBeanInfoSupport', 'ModelMBeanNotificationBroadcaster', 'ModelMBeanNotificationInfo', 'ModelMBeanOperationInfo', 'RequiredModelMBean', 'XMLParseException' + ), + 70 => array ( + 'CounterMonitor', 'CounterMonitorMBean', 'GaugeMonitor', 'GaugeMonitorMBean', 'Monitor', 'MonitorMBean', 'MonitorNotification', 'MonitorSettingException', 'StringMonitor', 'StringMonitorMBean' + ), + 71 => array ( + 'ArrayType', 'CompositeData', 'CompositeDataSupport', 'CompositeType', 'InvalidOpenTypeException', 'KeyAlreadyExistsException', 'OpenDataException', 'OpenMBeanAttributeInfo', 'OpenMBeanAttributeInfoSupport', 'OpenMBeanConstructorInfo', 'OpenMBeanConstructorInfoSupport', 'OpenMBeanInfo', 'OpenMBeanInfoSupport', 'OpenMBeanOperationInfo', 'OpenMBeanOperationInfoSupport', 'OpenMBeanParameterInfo', 'OpenMBeanParameterInfoSupport', 'SimpleType', 'TabularData', 'TabularDataSupport', 'TabularType' + ), + 72 => array ( + 'InvalidRelationIdException', 'InvalidRelationServiceException', 'InvalidRelationTypeException', 'InvalidRoleInfoException', 'InvalidRoleValueException', 'MBeanServerNotificationFilter', 'Relation', 'RelationException', 'RelationNotFoundException', 'RelationNotification', 'RelationService', 'RelationServiceMBean', 'RelationServiceNotRegisteredException', 'RelationSupport', 'RelationSupportMBean', 'RelationType', 'RelationTypeNotFoundException', 'RelationTypeSupport', 'Role', 'RoleInfo', 'RoleInfoNotFoundException', 'RoleList', 'RoleNotFoundException', 'RoleResult', 'RoleStatus', 'RoleUnresolved', 'RoleUnresolvedList' + ), + 73 => array ( + 'JMXAuthenticator', 'JMXConnectionNotification', 'JMXConnector', 'JMXConnectorFactory', 'JMXConnectorProvider', 'JMXConnectorServer', 'JMXConnectorServerFactory', 'JMXConnectorServerMBean', 'JMXConnectorServerProvider', 'JMXPrincipal', 'JMXProviderException', 'JMXServerErrorException', 'JMXServiceURL', 'MBeanServerForwarder', 'NotificationResult', 'SubjectDelegationPermission', 'TargetedNotification' + ), + 74 => array ( + 'RMIConnection', 'RMIConnectionImpl', 'RMIConnectionImpl_Stub', 'RMIConnector', 'RMIConnectorServer', 'RMIIIOPServerImpl', 'RMIJRMPServerImpl', 'RMIServer', 'RMIServerImpl', 'RMIServerImpl_Stub' + ), + 75 => array ( + 'TimerAlarmClockNotification', 'TimerMBean', 'TimerNotification' + ), + 76 => array ( + 'AuthenticationNotSupportedException', 'BinaryRefAddr', 'CannotProceedException', 'CommunicationException', 'CompositeName', 'CompoundName', 'ConfigurationException', 'ContextNotEmptyException', 'InitialContext', 'InsufficientResourcesException', 'InterruptedNamingException', 'InvalidNameException', 'LimitExceededException', 'LinkException', 'LinkLoopException', 'LinkRef', 'MalformedLinkException', 'Name', 'NameAlreadyBoundException', 'NameClassPair', 'NameNotFoundException', 'NameParser', 'NamingEnumeration', 'NamingException', 'NamingSecurityException', 'NoInitialContextException', 'NoPermissionException', 'NotContextException', 'OperationNotSupportedException', 'PartialResultException', 'RefAddr', 'Referenceable', 'ReferralException', 'ServiceUnavailableException', 'SizeLimitExceededException', 'StringRefAddr', 'TimeLimitExceededException' + ), + 77 => array ( + 'AttributeInUseException', 'AttributeModificationException', 'BasicAttribute', 'BasicAttributes', 'DirContext', 'InitialDirContext', 'InvalidAttributeIdentifierException', 'InvalidAttributesException', 'InvalidSearchControlsException', 'InvalidSearchFilterException', 'ModificationItem', 'NoSuchAttributeException', 'SchemaViolationException', 'SearchControls', 'SearchResult' + ), + 78 => array ( + 'EventContext', 'EventDirContext', 'NamespaceChangeListener', 'NamingEvent', 'NamingExceptionEvent', 'NamingListener', 'ObjectChangeListener' + ), + 79 => array ( + 'BasicControl', 'ControlFactory', 'ExtendedRequest', 'ExtendedResponse', 'HasControls', 'InitialLdapContext', 'LdapContext', 'LdapName', 'LdapReferralException', 'ManageReferralControl', 'PagedResultsControl', 'PagedResultsResponseControl', 'Rdn', 'SortControl', 'SortKey', 'SortResponseControl', 'StartTlsRequest', 'StartTlsResponse', 'UnsolicitedNotification', 'UnsolicitedNotificationEvent', 'UnsolicitedNotificationListener' + ), + 80 => array ( + 'DirObjectFactory', 'DirStateFactory', 'DirStateFactory.Result', 'DirectoryManager', 'InitialContextFactory', 'InitialContextFactoryBuilder', 'NamingManager', 'ObjectFactory', 'ObjectFactoryBuilder', 'ResolveResult', 'Resolver', 'StateFactory' + ), + 81 => array ( + 'ServerSocketFactory', 'SocketFactory' + ), + 82 => array ( + 'CertPathTrustManagerParameters', 'HandshakeCompletedEvent', 'HandshakeCompletedListener', 'HostnameVerifier', 'HttpsURLConnection', 'KeyManager', 'KeyManagerFactory', 'KeyManagerFactorySpi', 'KeyStoreBuilderParameters', 'ManagerFactoryParameters', 'SSLContext', 'SSLContextSpi', 'SSLEngine', 'SSLEngineResult', 'SSLEngineResult.HandshakeStatus', 'SSLEngineResult.Status', 'SSLException', 'SSLHandshakeException', 'SSLKeyException', 'SSLPeerUnverifiedException', 'SSLPermission', 'SSLProtocolException', 'SSLServerSocket', 'SSLServerSocketFactory', 'SSLSession', 'SSLSessionBindingEvent', 'SSLSessionBindingListener', 'SSLSessionContext', 'SSLSocket', 'SSLSocketFactory', 'TrustManager', 'TrustManagerFactory', 'TrustManagerFactorySpi', 'X509ExtendedKeyManager', 'X509KeyManager', 'X509TrustManager' + ), + 83 => array ( + 'AttributeException', 'CancelablePrintJob', 'Doc', 'DocFlavor', 'DocFlavor.BYTE_ARRAY', 'DocFlavor.CHAR_ARRAY', 'DocFlavor.INPUT_STREAM', 'DocFlavor.READER', 'DocFlavor.SERVICE_FORMATTED', 'DocFlavor.STRING', 'DocFlavor.URL', 'DocPrintJob', 'FlavorException', 'MultiDoc', 'MultiDocPrintJob', 'MultiDocPrintService', 'PrintException', 'PrintService', 'PrintServiceLookup', 'ServiceUI', 'ServiceUIFactory', 'SimpleDoc', 'StreamPrintService', 'StreamPrintServiceFactory', 'URIException' + ), + 84 => array ( + 'AttributeSetUtilities', 'DateTimeSyntax', 'DocAttribute', 'DocAttributeSet', 'EnumSyntax', 'HashAttributeSet', 'HashDocAttributeSet', 'HashPrintJobAttributeSet', 'HashPrintRequestAttributeSet', 'HashPrintServiceAttributeSet', 'IntegerSyntax', 'PrintJobAttribute', 'PrintJobAttributeSet', 'PrintRequestAttribute', 'PrintRequestAttributeSet', 'PrintServiceAttribute', 'PrintServiceAttributeSet', 'ResolutionSyntax', 'SetOfIntegerSyntax', 'Size2DSyntax', 'SupportedValuesAttribute', 'TextSyntax', 'URISyntax', 'UnmodifiableSetException' + ), + 85 => array ( + 'Chromaticity', 'ColorSupported', 'Compression', 'Copies', 'CopiesSupported', 'DateTimeAtCompleted', 'DateTimeAtCreation', 'DateTimeAtProcessing', 'Destination', 'DocumentName', 'Fidelity', 'Finishings', 'JobHoldUntil', 'JobImpressions', 'JobImpressionsCompleted', 'JobImpressionsSupported', 'JobKOctets', 'JobKOctetsProcessed', 'JobKOctetsSupported', 'JobMediaSheets', 'JobMediaSheetsCompleted', 'JobMediaSheetsSupported', 'JobMessageFromOperator', 'JobName', 'JobOriginatingUserName', 'JobPriority', 'JobPrioritySupported', 'JobSheets', 'JobState', 'JobStateReason', 'JobStateReasons', 'Media', 'MediaName', 'MediaPrintableArea', 'MediaSize', 'MediaSize.Engineering', 'MediaSize.ISO', 'MediaSize.JIS', 'MediaSize.NA', 'MediaSize.Other', 'MediaSizeName', 'MediaTray', 'MultipleDocumentHandling', 'NumberOfDocuments', 'NumberOfInterveningJobs', 'NumberUp', 'NumberUpSupported', 'OrientationRequested', 'OutputDeviceAssigned', 'PDLOverrideSupported', 'PageRanges', 'PagesPerMinute', 'PagesPerMinuteColor', + 'PresentationDirection', 'PrintQuality', 'PrinterInfo', 'PrinterIsAcceptingJobs', 'PrinterLocation', 'PrinterMakeAndModel', 'PrinterMessageFromOperator', 'PrinterMoreInfo', 'PrinterMoreInfoManufacturer', 'PrinterName', 'PrinterResolution', 'PrinterState', 'PrinterStateReason', 'PrinterStateReasons', 'PrinterURI', 'QueuedJobCount', 'ReferenceUriSchemesSupported', 'RequestingUserName', 'Severity', 'SheetCollate', 'Sides' + ), + 86 => array ( + 'PrintEvent', 'PrintJobAdapter', 'PrintJobAttributeEvent', 'PrintJobAttributeListener', 'PrintJobEvent', 'PrintJobListener', 'PrintServiceAttributeEvent', 'PrintServiceAttributeListener' + ), + 87 => array ( + 'PortableRemoteObject' + ), + 88 => array ( + 'ClassDesc', 'PortableRemoteObjectDelegate', 'Stub', 'StubDelegate', 'Tie', 'Util', 'UtilDelegate', 'ValueHandler', 'ValueHandlerMultiFormat' + ), + 89 => array ( + 'SslRMIClientSocketFactory', 'SslRMIServerSocketFactory' + ), + 90 => array ( + 'AuthPermission', 'DestroyFailedException', 'Destroyable', 'PrivateCredentialPermission', 'RefreshFailedException', 'Refreshable', 'Subject', 'SubjectDomainCombiner' + ), + 91 => array ( + 'Callback', 'CallbackHandler', 'ChoiceCallback', 'ConfirmationCallback', 'LanguageCallback', 'NameCallback', 'PasswordCallback', 'TextInputCallback', 'TextOutputCallback', 'UnsupportedCallbackException' + ), + 92 => array ( + 'DelegationPermission', 'KerberosKey', 'KerberosPrincipal', 'KerberosTicket', 'ServicePermission' + ), + 93 => array ( + 'AccountException', 'AccountExpiredException', 'AccountLockedException', 'AccountNotFoundException', 'AppConfigurationEntry', 'AppConfigurationEntry.LoginModuleControlFlag', 'Configuration', 'CredentialException', 'CredentialExpiredException', 'CredentialNotFoundException', 'FailedLoginException', 'LoginContext', 'LoginException' + ), + 94 => array ( + 'LoginModule' + ), + 95 => array ( + 'X500Principal', 'X500PrivateCredential' + ), + 96 => array ( + 'AuthorizeCallback', 'RealmCallback', 'RealmChoiceCallback', 'Sasl', 'SaslClient', 'SaslClientFactory', 'SaslException', 'SaslServer', 'SaslServerFactory' + ), + 97 => array ( + 'ControllerEventListener', 'Instrument', 'InvalidMidiDataException', 'MetaEventListener', 'MetaMessage', 'MidiChannel', 'MidiDevice', 'MidiDevice.Info', 'MidiEvent', 'MidiFileFormat', 'MidiMessage', 'MidiSystem', 'MidiUnavailableException', 'Patch', 'Receiver', 'Sequence', 'Sequencer', 'Sequencer.SyncMode', 'ShortMessage', 'Soundbank', 'SoundbankResource', 'Synthesizer', 'SysexMessage', 'Track', 'Transmitter', 'VoiceStatus' + ), + 98 => array ( + 'MidiDeviceProvider', 'MidiFileReader', 'MidiFileWriter', 'SoundbankReader' + ), + 99 => array ( + 'AudioFileFormat', 'AudioFileFormat.Type', 'AudioFormat', 'AudioFormat.Encoding', 'AudioInputStream', 'AudioPermission', 'AudioSystem', 'BooleanControl', 'BooleanControl.Type', 'Clip', 'CompoundControl', 'CompoundControl.Type', 'Control.Type', 'DataLine', 'DataLine.Info', 'EnumControl', 'EnumControl.Type', 'FloatControl', 'FloatControl.Type', 'Line', 'Line.Info', 'LineEvent', 'LineEvent.Type', 'LineListener', 'LineUnavailableException', 'Mixer', 'Mixer.Info', 'Port', 'Port.Info', 'ReverbType', 'SourceDataLine', 'TargetDataLine', 'UnsupportedAudioFileException' + ), + 100 => array ( + 'AudioFileReader', 'AudioFileWriter', 'FormatConversionProvider', 'MixerProvider' + ), + 101 => array ( + 'ConnectionEvent', 'ConnectionEventListener', 'ConnectionPoolDataSource', 'DataSource', 'PooledConnection', 'RowSet', 'RowSetEvent', 'RowSetInternal', 'RowSetListener', 'RowSetMetaData', 'RowSetReader', 'RowSetWriter', 'XAConnection', 'XADataSource' + ), + 102 => array ( + 'BaseRowSet', 'CachedRowSet', 'FilteredRowSet', 'JdbcRowSet', 'JoinRowSet', 'Joinable', 'Predicate', 'RowSetMetaDataImpl', 'RowSetWarning', 'WebRowSet' + ), + 103 => array ( + 'SQLInputImpl', 'SQLOutputImpl', 'SerialArray', 'SerialBlob', 'SerialClob', 'SerialDatalink', 'SerialException', 'SerialJavaObject', 'SerialRef', 'SerialStruct' + ), + 104 => array ( + 'SyncFactory', 'SyncFactoryException', 'SyncProvider', 'SyncProviderException', 'SyncResolver', 'TransactionalWriter', 'XmlReader', 'XmlWriter' + ), + 105 => array ( + 'AbstractAction', 'AbstractButton', 'AbstractCellEditor', 'AbstractListModel', 'AbstractSpinnerModel', 'Action', 'ActionMap', 'BorderFactory', 'BoundedRangeModel', 'Box', 'Box.Filler', 'BoxLayout', 'ButtonGroup', 'ButtonModel', 'CellEditor', 'CellRendererPane', 'ComboBoxEditor', 'ComboBoxModel', 'ComponentInputMap', 'DebugGraphics', 'DefaultBoundedRangeModel', 'DefaultButtonModel', 'DefaultCellEditor', 'DefaultComboBoxModel', 'DefaultDesktopManager', 'DefaultFocusManager', 'DefaultListCellRenderer', 'DefaultListCellRenderer.UIResource', 'DefaultListModel', 'DefaultListSelectionModel', 'DefaultSingleSelectionModel', 'DesktopManager', 'FocusManager', 'GrayFilter', 'Icon', 'ImageIcon', 'InputMap', 'InputVerifier', 'InternalFrameFocusTraversalPolicy', 'JApplet', 'JButton', 'JCheckBox', 'JCheckBoxMenuItem', 'JColorChooser', 'JComboBox', 'JComboBox.KeySelectionManager', 'JComponent', 'JDesktopPane', 'JDialog', 'JEditorPane', 'JFileChooser', 'JFormattedTextField', 'JFormattedTextField.AbstractFormatter', + 'JFormattedTextField.AbstractFormatterFactory', 'JFrame', 'JInternalFrame', 'JInternalFrame.JDesktopIcon', 'JLabel', 'JLayeredPane', 'JList', 'JMenu', 'JMenuBar', 'JMenuItem', 'JOptionPane', 'JPanel', 'JPasswordField', 'JPopupMenu', 'JPopupMenu.Separator', 'JProgressBar', 'JRadioButton', 'JRadioButtonMenuItem', 'JRootPane', 'JScrollBar', 'JScrollPane', 'JSeparator', 'JSlider', 'JSpinner', 'JSpinner.DateEditor', 'JSpinner.DefaultEditor', 'JSpinner.ListEditor', 'JSpinner.NumberEditor', 'JSplitPane', 'JTabbedPane', 'JTable', 'JTable.PrintMode', 'JTextArea', 'JTextField', 'JTextPane', 'JToggleButton', 'JToggleButton.ToggleButtonModel', 'JToolBar', 'JToolBar.Separator', 'JToolTip', 'JTree', 'JTree.DynamicUtilTreeNode', 'JTree.EmptySelectionModel', 'JViewport', 'JWindow', 'KeyStroke', 'LayoutFocusTraversalPolicy', 'ListCellRenderer', 'ListModel', 'ListSelectionModel', 'LookAndFeel', 'MenuElement', 'MenuSelectionManager', 'MutableComboBoxModel', 'OverlayLayout', 'Popup', 'PopupFactory', 'ProgressMonitor', + 'ProgressMonitorInputStream', 'Renderer', 'RepaintManager', 'RootPaneContainer', 'ScrollPaneConstants', 'ScrollPaneLayout', 'ScrollPaneLayout.UIResource', 'Scrollable', 'SingleSelectionModel', 'SizeRequirements', 'SizeSequence', 'SortingFocusTraversalPolicy', 'SpinnerDateModel', 'SpinnerListModel', 'SpinnerModel', 'SpinnerNumberModel', 'Spring', 'SpringLayout', 'SpringLayout.Constraints', 'SwingConstants', 'SwingUtilities', 'ToolTipManager', 'TransferHandler', 'UIDefaults', 'UIDefaults.ActiveValue', 'UIDefaults.LazyInputMap', 'UIDefaults.LazyValue', 'UIDefaults.ProxyLazyValue', 'UIManager', 'UIManager.LookAndFeelInfo', 'UnsupportedLookAndFeelException', 'ViewportLayout', 'WindowConstants' + ), + 106 => array ( + 'AbstractBorder', 'BevelBorder', 'Border', 'CompoundBorder', 'EmptyBorder', 'EtchedBorder', 'LineBorder', 'MatteBorder', 'SoftBevelBorder', 'TitledBorder' + ), + 107 => array ( + 'AbstractColorChooserPanel', 'ColorChooserComponentFactory', 'ColorSelectionModel', 'DefaultColorSelectionModel' + ), + 108 => array ( + 'AncestorEvent', 'AncestorListener', 'CaretEvent', 'CaretListener', 'CellEditorListener', 'ChangeEvent', 'ChangeListener', 'DocumentEvent.ElementChange', 'DocumentEvent.EventType', 'DocumentListener', 'EventListenerList', 'HyperlinkEvent', 'HyperlinkEvent.EventType', 'HyperlinkListener', 'InternalFrameAdapter', 'InternalFrameEvent', 'InternalFrameListener', 'ListDataEvent', 'ListDataListener', 'ListSelectionEvent', 'ListSelectionListener', 'MenuDragMouseEvent', 'MenuDragMouseListener', 'MenuEvent', 'MenuKeyEvent', 'MenuKeyListener', 'MenuListener', 'MouseInputAdapter', 'MouseInputListener', 'PopupMenuEvent', 'PopupMenuListener', 'SwingPropertyChangeSupport', 'TableColumnModelEvent', 'TableColumnModelListener', 'TableModelEvent', 'TableModelListener', 'TreeExpansionEvent', 'TreeExpansionListener', 'TreeModelEvent', 'TreeModelListener', 'TreeSelectionEvent', 'TreeSelectionListener', 'TreeWillExpandListener', 'UndoableEditEvent', 'UndoableEditListener' + ), + 109 => array ( + 'FileSystemView', 'FileView' + ), + 110 => array ( + 'ActionMapUIResource', 'BorderUIResource', 'BorderUIResource.BevelBorderUIResource', 'BorderUIResource.CompoundBorderUIResource', 'BorderUIResource.EmptyBorderUIResource', 'BorderUIResource.EtchedBorderUIResource', 'BorderUIResource.LineBorderUIResource', 'BorderUIResource.MatteBorderUIResource', 'BorderUIResource.TitledBorderUIResource', 'ButtonUI', 'ColorChooserUI', 'ColorUIResource', 'ComboBoxUI', 'ComponentInputMapUIResource', 'ComponentUI', 'DesktopIconUI', 'DesktopPaneUI', 'DimensionUIResource', 'FileChooserUI', 'FontUIResource', 'IconUIResource', 'InputMapUIResource', 'InsetsUIResource', 'InternalFrameUI', 'LabelUI', 'ListUI', 'MenuBarUI', 'MenuItemUI', 'OptionPaneUI', 'PanelUI', 'PopupMenuUI', 'ProgressBarUI', 'RootPaneUI', 'ScrollBarUI', 'ScrollPaneUI', 'SeparatorUI', 'SliderUI', 'SpinnerUI', 'SplitPaneUI', 'TabbedPaneUI', 'TableHeaderUI', 'TableUI', 'TextUI', 'ToolBarUI', 'ToolTipUI', 'TreeUI', 'UIResource', 'ViewportUI' + ), + 111 => array ( + 'BasicArrowButton', 'BasicBorders', 'BasicBorders.ButtonBorder', 'BasicBorders.FieldBorder', 'BasicBorders.MarginBorder', 'BasicBorders.MenuBarBorder', 'BasicBorders.RadioButtonBorder', 'BasicBorders.RolloverButtonBorder', 'BasicBorders.SplitPaneBorder', 'BasicBorders.ToggleButtonBorder', 'BasicButtonListener', 'BasicButtonUI', 'BasicCheckBoxMenuItemUI', 'BasicCheckBoxUI', 'BasicColorChooserUI', 'BasicComboBoxEditor', 'BasicComboBoxEditor.UIResource', 'BasicComboBoxRenderer', 'BasicComboBoxRenderer.UIResource', 'BasicComboBoxUI', 'BasicComboPopup', 'BasicDesktopIconUI', 'BasicDesktopPaneUI', 'BasicDirectoryModel', 'BasicEditorPaneUI', 'BasicFileChooserUI', 'BasicFormattedTextFieldUI', 'BasicGraphicsUtils', 'BasicHTML', 'BasicIconFactory', 'BasicInternalFrameTitlePane', 'BasicInternalFrameUI', 'BasicLabelUI', 'BasicListUI', 'BasicLookAndFeel', 'BasicMenuBarUI', 'BasicMenuItemUI', 'BasicMenuUI', 'BasicOptionPaneUI', 'BasicOptionPaneUI.ButtonAreaLayout', 'BasicPanelUI', 'BasicPasswordFieldUI', + 'BasicPopupMenuSeparatorUI', 'BasicPopupMenuUI', 'BasicProgressBarUI', 'BasicRadioButtonMenuItemUI', 'BasicRadioButtonUI', 'BasicRootPaneUI', 'BasicScrollBarUI', 'BasicScrollPaneUI', 'BasicSeparatorUI', 'BasicSliderUI', 'BasicSpinnerUI', 'BasicSplitPaneDivider', 'BasicSplitPaneUI', 'BasicTabbedPaneUI', 'BasicTableHeaderUI', 'BasicTableUI', 'BasicTextAreaUI', 'BasicTextFieldUI', 'BasicTextPaneUI', 'BasicTextUI', 'BasicTextUI.BasicCaret', 'BasicTextUI.BasicHighlighter', 'BasicToggleButtonUI', 'BasicToolBarSeparatorUI', 'BasicToolBarUI', 'BasicToolTipUI', 'BasicTreeUI', 'BasicViewportUI', 'ComboPopup', 'DefaultMenuLayout' + ), + 112 => array ( + 'DefaultMetalTheme', 'MetalBorders', 'MetalBorders.ButtonBorder', 'MetalBorders.Flush3DBorder', 'MetalBorders.InternalFrameBorder', 'MetalBorders.MenuBarBorder', 'MetalBorders.MenuItemBorder', 'MetalBorders.OptionDialogBorder', 'MetalBorders.PaletteBorder', 'MetalBorders.PopupMenuBorder', 'MetalBorders.RolloverButtonBorder', 'MetalBorders.ScrollPaneBorder', 'MetalBorders.TableHeaderBorder', 'MetalBorders.TextFieldBorder', 'MetalBorders.ToggleButtonBorder', 'MetalBorders.ToolBarBorder', 'MetalButtonUI', 'MetalCheckBoxIcon', 'MetalCheckBoxUI', 'MetalComboBoxButton', 'MetalComboBoxEditor', 'MetalComboBoxEditor.UIResource', 'MetalComboBoxIcon', 'MetalComboBoxUI', 'MetalDesktopIconUI', 'MetalFileChooserUI', 'MetalIconFactory', 'MetalIconFactory.FileIcon16', 'MetalIconFactory.FolderIcon16', 'MetalIconFactory.PaletteCloseIcon', 'MetalIconFactory.TreeControlIcon', 'MetalIconFactory.TreeFolderIcon', 'MetalIconFactory.TreeLeafIcon', 'MetalInternalFrameTitlePane', 'MetalInternalFrameUI', 'MetalLabelUI', + 'MetalLookAndFeel', 'MetalMenuBarUI', 'MetalPopupMenuSeparatorUI', 'MetalProgressBarUI', 'MetalRadioButtonUI', 'MetalRootPaneUI', 'MetalScrollBarUI', 'MetalScrollButton', 'MetalScrollPaneUI', 'MetalSeparatorUI', 'MetalSliderUI', 'MetalSplitPaneUI', 'MetalTabbedPaneUI', 'MetalTextFieldUI', 'MetalTheme', 'MetalToggleButtonUI', 'MetalToolBarUI', 'MetalToolTipUI', 'MetalTreeUI', 'OceanTheme' + ), + 113 => array ( + 'MultiButtonUI', 'MultiColorChooserUI', 'MultiComboBoxUI', 'MultiDesktopIconUI', 'MultiDesktopPaneUI', 'MultiFileChooserUI', 'MultiInternalFrameUI', 'MultiLabelUI', 'MultiListUI', 'MultiLookAndFeel', 'MultiMenuBarUI', 'MultiMenuItemUI', 'MultiOptionPaneUI', 'MultiPanelUI', 'MultiPopupMenuUI', 'MultiProgressBarUI', 'MultiRootPaneUI', 'MultiScrollBarUI', 'MultiScrollPaneUI', 'MultiSeparatorUI', 'MultiSliderUI', 'MultiSpinnerUI', 'MultiSplitPaneUI', 'MultiTabbedPaneUI', 'MultiTableHeaderUI', 'MultiTableUI', 'MultiTextUI', 'MultiToolBarUI', 'MultiToolTipUI', 'MultiTreeUI', 'MultiViewportUI' + ), + 114 => array ( + 'ColorType', 'Region', 'SynthConstants', 'SynthContext', 'SynthGraphicsUtils', 'SynthLookAndFeel', 'SynthPainter', 'SynthStyle', 'SynthStyleFactory' + ), + 115 => array ( + 'AbstractTableModel', 'DefaultTableCellRenderer', 'DefaultTableCellRenderer.UIResource', 'DefaultTableColumnModel', 'DefaultTableModel', 'JTableHeader', 'TableCellEditor', 'TableCellRenderer', 'TableColumn', 'TableColumnModel', 'TableModel' + ), + 116 => array ( + 'AbstractDocument', 'AbstractDocument.AttributeContext', 'AbstractDocument.Content', 'AbstractDocument.ElementEdit', 'AbstractWriter', 'AsyncBoxView', 'AttributeSet.CharacterAttribute', 'AttributeSet.ColorAttribute', 'AttributeSet.FontAttribute', 'AttributeSet.ParagraphAttribute', 'BadLocationException', 'BoxView', 'Caret', 'ChangedCharSetException', 'ComponentView', 'CompositeView', 'DateFormatter', 'DefaultCaret', 'DefaultEditorKit', 'DefaultEditorKit.BeepAction', 'DefaultEditorKit.CopyAction', 'DefaultEditorKit.CutAction', 'DefaultEditorKit.DefaultKeyTypedAction', 'DefaultEditorKit.InsertBreakAction', 'DefaultEditorKit.InsertContentAction', 'DefaultEditorKit.InsertTabAction', 'DefaultEditorKit.PasteAction', 'DefaultFormatter', 'DefaultFormatterFactory', 'DefaultHighlighter', 'DefaultHighlighter.DefaultHighlightPainter', 'DefaultStyledDocument', 'DefaultStyledDocument.AttributeUndoableEdit', 'DefaultStyledDocument.ElementSpec', 'DefaultTextUI', 'DocumentFilter', 'DocumentFilter.FilterBypass', + 'EditorKit', 'ElementIterator', 'FieldView', 'FlowView', 'FlowView.FlowStrategy', 'GapContent', 'GlyphView', 'GlyphView.GlyphPainter', 'Highlighter', 'Highlighter.Highlight', 'Highlighter.HighlightPainter', 'IconView', 'InternationalFormatter', 'JTextComponent', 'JTextComponent.KeyBinding', 'Keymap', 'LabelView', 'LayeredHighlighter', 'LayeredHighlighter.LayerPainter', 'LayoutQueue', 'MaskFormatter', 'MutableAttributeSet', 'NavigationFilter', 'NavigationFilter.FilterBypass', 'NumberFormatter', 'PasswordView', 'PlainDocument', 'PlainView', 'Position', 'Position.Bias', 'Segment', 'SimpleAttributeSet', 'StringContent', 'Style', 'StyleConstants', 'StyleConstants.CharacterConstants', 'StyleConstants.ColorConstants', 'StyleConstants.FontConstants', 'StyleConstants.ParagraphConstants', 'StyleContext', 'StyledDocument', 'StyledEditorKit', 'StyledEditorKit.AlignmentAction', 'StyledEditorKit.BoldAction', 'StyledEditorKit.FontFamilyAction', 'StyledEditorKit.FontSizeAction', 'StyledEditorKit.ForegroundAction', + 'StyledEditorKit.ItalicAction', 'StyledEditorKit.StyledTextAction', 'StyledEditorKit.UnderlineAction', 'TabExpander', 'TabSet', 'TabStop', 'TabableView', 'TableView', 'TextAction', 'Utilities', 'View', 'ViewFactory', 'WrappedPlainView', 'ZoneView' + ), + 117 => array ( + 'BlockView', 'CSS', 'CSS.Attribute', 'FormSubmitEvent', 'FormSubmitEvent.MethodType', 'FormView', 'HTML', 'HTML.Attribute', 'HTML.Tag', 'HTML.UnknownTag', 'HTMLDocument', 'HTMLDocument.Iterator', 'HTMLEditorKit', 'HTMLEditorKit.HTMLFactory', 'HTMLEditorKit.HTMLTextAction', 'HTMLEditorKit.InsertHTMLTextAction', 'HTMLEditorKit.LinkController', 'HTMLEditorKit.Parser', 'HTMLEditorKit.ParserCallback', 'HTMLFrameHyperlinkEvent', 'HTMLWriter', 'ImageView', 'InlineView', 'ListView', 'MinimalHTMLWriter', 'ObjectView', 'Option', 'StyleSheet', 'StyleSheet.BoxPainter', 'StyleSheet.ListPainter' + ), + 118 => array ( + 'ContentModel', 'DTD', 'DTDConstants', 'DocumentParser', 'ParserDelegator', 'TagElement' + ), + 119 => array ( + 'RTFEditorKit' + ), + 120 => array ( + 'AbstractLayoutCache', 'AbstractLayoutCache.NodeDimensions', 'DefaultMutableTreeNode', 'DefaultTreeCellEditor', 'DefaultTreeCellRenderer', 'DefaultTreeModel', 'DefaultTreeSelectionModel', 'ExpandVetoException', 'FixedHeightLayoutCache', 'MutableTreeNode', 'RowMapper', 'TreeCellEditor', 'TreeCellRenderer', 'TreeModel', 'TreeNode', 'TreePath', 'TreeSelectionModel', 'VariableHeightLayoutCache' + ), + 121 => array ( + 'AbstractUndoableEdit', 'CannotRedoException', 'CannotUndoException', 'CompoundEdit', 'StateEdit', 'StateEditable', 'UndoManager', 'UndoableEdit', 'UndoableEditSupport' + ), + 122 => array ( + 'InvalidTransactionException', 'TransactionRequiredException', 'TransactionRolledbackException' + ), + 123 => array ( + 'XAException', 'XAResource', 'Xid' + ), + 124 => array ( + 'XMLConstants' + ), + 125 => array ( + 'DatatypeConfigurationException', 'DatatypeConstants', 'DatatypeConstants.Field', 'DatatypeFactory', 'Duration', 'XMLGregorianCalendar' + ), + 126 => array ( + 'NamespaceContext', 'QName' + ), + 127 => array ( + 'DocumentBuilder', 'DocumentBuilderFactory', 'FactoryConfigurationError', 'ParserConfigurationException', 'SAXParser', 'SAXParserFactory' + ), + 128 => array ( + 'ErrorListener', 'OutputKeys', 'Result', 'Source', 'SourceLocator', 'Templates', 'Transformer', 'TransformerConfigurationException', 'TransformerException', 'TransformerFactory', 'TransformerFactoryConfigurationError', 'URIResolver' + ), + 129 => array ( + 'DOMResult', 'DOMSource' + ), + 130 => array ( + 'SAXResult', 'SAXSource', 'SAXTransformerFactory', 'TemplatesHandler', 'TransformerHandler' + ), + 131 => array ( + 'StreamResult', 'StreamSource' + ), + 132 => array ( + 'Schema', 'SchemaFactory', 'SchemaFactoryLoader', 'TypeInfoProvider', 'Validator', 'ValidatorHandler' + ), + 133 => array ( + 'XPath', 'XPathConstants', 'XPathException', 'XPathExpression', 'XPathExpressionException', 'XPathFactory', 'XPathFactoryConfigurationException', 'XPathFunction', 'XPathFunctionException', 'XPathFunctionResolver', 'XPathVariableResolver' + ), + 134 => array ( + 'ChannelBinding', 'GSSContext', 'GSSCredential', 'GSSException', 'GSSManager', 'GSSName', 'MessageProp', 'Oid' + ), + 135 => array ( + 'ACTIVITY_COMPLETED', 'ACTIVITY_REQUIRED', 'ARG_IN', 'ARG_INOUT', 'ARG_OUT', 'Any', 'AnyHolder', 'AnySeqHolder', 'BAD_CONTEXT', 'BAD_INV_ORDER', 'BAD_OPERATION', 'BAD_PARAM', 'BAD_POLICY', 'BAD_POLICY_TYPE', 'BAD_POLICY_VALUE', 'BAD_QOS', 'BAD_TYPECODE', 'BooleanHolder', 'BooleanSeqHelper', 'BooleanSeqHolder', 'ByteHolder', 'CODESET_INCOMPATIBLE', 'COMM_FAILURE', 'CTX_RESTRICT_SCOPE', 'CharHolder', 'CharSeqHelper', 'CharSeqHolder', 'CompletionStatus', 'CompletionStatusHelper', 'ContextList', 'CurrentHolder', 'CustomMarshal', 'DATA_CONVERSION', 'DefinitionKind', 'DefinitionKindHelper', 'DomainManager', 'DomainManagerOperations', 'DoubleHolder', 'DoubleSeqHelper', 'DoubleSeqHolder', 'Environment', 'ExceptionList', 'FREE_MEM', 'FixedHolder', 'FloatHolder', 'FloatSeqHelper', 'FloatSeqHolder', 'IDLType', 'IDLTypeHelper', 'IDLTypeOperations', 'IMP_LIMIT', 'INITIALIZE', 'INTERNAL', 'INTF_REPOS', 'INVALID_ACTIVITY', 'INVALID_TRANSACTION', 'INV_FLAG', 'INV_IDENT', 'INV_OBJREF', 'INV_POLICY', 'IRObject', + 'IRObjectOperations', 'IdentifierHelper', 'IntHolder', 'LocalObject', 'LongHolder', 'LongLongSeqHelper', 'LongLongSeqHolder', 'LongSeqHelper', 'LongSeqHolder', 'MARSHAL', 'NO_IMPLEMENT', 'NO_MEMORY', 'NO_PERMISSION', 'NO_RESOURCES', 'NO_RESPONSE', 'NVList', 'NamedValue', 'OBJECT_NOT_EXIST', 'OBJ_ADAPTER', 'OMGVMCID', 'ObjectHelper', 'ObjectHolder', 'OctetSeqHelper', 'OctetSeqHolder', 'PERSIST_STORE', 'PRIVATE_MEMBER', 'PUBLIC_MEMBER', 'ParameterMode', 'ParameterModeHelper', 'ParameterModeHolder', 'PolicyError', 'PolicyErrorCodeHelper', 'PolicyErrorHelper', 'PolicyErrorHolder', 'PolicyHelper', 'PolicyHolder', 'PolicyListHelper', 'PolicyListHolder', 'PolicyOperations', 'PolicyTypeHelper', 'PrincipalHolder', 'REBIND', 'RepositoryIdHelper', 'Request', 'ServerRequest', 'ServiceDetail', 'ServiceDetailHelper', 'ServiceInformation', 'ServiceInformationHelper', 'ServiceInformationHolder', 'SetOverrideType', 'SetOverrideTypeHelper', 'ShortHolder', 'ShortSeqHelper', 'ShortSeqHolder', 'StringHolder', + 'StringSeqHelper', 'StringSeqHolder', 'StringValueHelper', 'StructMember', 'StructMemberHelper', 'SystemException', 'TCKind', 'TIMEOUT', 'TRANSACTION_MODE', 'TRANSACTION_REQUIRED', 'TRANSACTION_ROLLEDBACK', 'TRANSACTION_UNAVAILABLE', 'TRANSIENT', 'TypeCode', 'TypeCodeHolder', 'ULongLongSeqHelper', 'ULongLongSeqHolder', 'ULongSeqHelper', 'ULongSeqHolder', 'UNSUPPORTED_POLICY', 'UNSUPPORTED_POLICY_VALUE', 'UShortSeqHelper', 'UShortSeqHolder', 'UnionMember', 'UnionMemberHelper', 'UnknownUserException', 'UnknownUserExceptionHelper', 'UnknownUserExceptionHolder', 'UserException', 'VM_ABSTRACT', 'VM_CUSTOM', 'VM_NONE', 'VM_TRUNCATABLE', 'ValueBaseHelper', 'ValueBaseHolder', 'ValueMember', 'ValueMemberHelper', 'VersionSpecHelper', 'VisibilityHelper', 'WCharSeqHelper', 'WCharSeqHolder', 'WStringSeqHelper', 'WStringSeqHolder', 'WStringValueHelper', 'WrongTransaction', 'WrongTransactionHelper', 'WrongTransactionHolder', '_IDLTypeStub', '_PolicyStub' + ), + 136 => array ( + 'Invalid', 'InvalidSeq' + ), + 137 => array ( + 'BadKind' + ), + 138 => array ( + 'ApplicationException', 'BoxedValueHelper', 'CustomValue', 'IDLEntity', 'IndirectionException', 'InvokeHandler', 'RemarshalException', 'ResponseHandler', 'ServantObject', 'Streamable', 'StreamableValue', 'UnknownException', 'ValueBase', 'ValueFactory', 'ValueInputStream', 'ValueOutputStream' + ), + 139 => array ( + 'BindingHelper', 'BindingHolder', 'BindingIterator', 'BindingIteratorHelper', 'BindingIteratorHolder', 'BindingIteratorOperations', 'BindingIteratorPOA', 'BindingListHelper', 'BindingListHolder', 'BindingType', 'BindingTypeHelper', 'BindingTypeHolder', 'IstringHelper', 'NameComponent', 'NameComponentHelper', 'NameComponentHolder', 'NameHelper', 'NameHolder', 'NamingContext', 'NamingContextExt', 'NamingContextExtHelper', 'NamingContextExtHolder', 'NamingContextExtOperations', 'NamingContextExtPOA', 'NamingContextHelper', 'NamingContextHolder', 'NamingContextOperations', 'NamingContextPOA', '_BindingIteratorImplBase', '_BindingIteratorStub', '_NamingContextExtStub', '_NamingContextImplBase', '_NamingContextStub' + ), + 140 => array ( + 'AddressHelper', 'InvalidAddress', 'InvalidAddressHelper', 'InvalidAddressHolder', 'StringNameHelper', 'URLStringHelper' + ), + 141 => array ( + 'AlreadyBound', 'AlreadyBoundHelper', 'AlreadyBoundHolder', 'CannotProceed', 'CannotProceedHelper', 'CannotProceedHolder', 'InvalidNameHolder', 'NotEmpty', 'NotEmptyHelper', 'NotEmptyHolder', 'NotFound', 'NotFoundHelper', 'NotFoundHolder', 'NotFoundReason', 'NotFoundReasonHelper', 'NotFoundReasonHolder' + ), + 142 => array ( + 'Parameter' + ), + 143 => array ( + 'DynAnyFactory', 'DynAnyFactoryHelper', 'DynAnyFactoryOperations', 'DynAnyHelper', 'DynAnyOperations', 'DynAnySeqHelper', 'DynArrayHelper', 'DynArrayOperations', 'DynEnumHelper', 'DynEnumOperations', 'DynFixedHelper', 'DynFixedOperations', 'DynSequenceHelper', 'DynSequenceOperations', 'DynStructHelper', 'DynStructOperations', 'DynUnionHelper', 'DynUnionOperations', 'DynValueBox', 'DynValueBoxOperations', 'DynValueCommon', 'DynValueCommonOperations', 'DynValueHelper', 'DynValueOperations', 'NameDynAnyPair', 'NameDynAnyPairHelper', 'NameDynAnyPairSeqHelper', 'NameValuePairSeqHelper', '_DynAnyFactoryStub', '_DynAnyStub', '_DynArrayStub', '_DynEnumStub', '_DynFixedStub', '_DynSequenceStub', '_DynStructStub', '_DynUnionStub', '_DynValueStub' + ), + 144 => array ( + 'InconsistentTypeCodeHelper' + ), + 145 => array ( + 'InvalidValueHelper' + ), + 146 => array ( + 'CodeSets', 'Codec', 'CodecFactory', 'CodecFactoryHelper', 'CodecFactoryOperations', 'CodecOperations', 'ComponentIdHelper', 'ENCODING_CDR_ENCAPS', 'Encoding', 'ExceptionDetailMessage', 'IOR', 'IORHelper', 'IORHolder', 'MultipleComponentProfileHelper', 'MultipleComponentProfileHolder', 'ProfileIdHelper', 'RMICustomMaxStreamFormat', 'ServiceContext', 'ServiceContextHelper', 'ServiceContextHolder', 'ServiceContextListHelper', 'ServiceContextListHolder', 'ServiceIdHelper', 'TAG_ALTERNATE_IIOP_ADDRESS', 'TAG_CODE_SETS', 'TAG_INTERNET_IOP', 'TAG_JAVA_CODEBASE', 'TAG_MULTIPLE_COMPONENTS', 'TAG_ORB_TYPE', 'TAG_POLICIES', 'TAG_RMI_CUSTOM_MAX_STREAM_FORMAT', 'TaggedComponent', 'TaggedComponentHelper', 'TaggedComponentHolder', 'TaggedProfile', 'TaggedProfileHelper', 'TaggedProfileHolder', 'TransactionService' + ), + 147 => array ( + 'UnknownEncoding', 'UnknownEncodingHelper' + ), + 148 => array ( + 'FormatMismatch', 'FormatMismatchHelper', 'InvalidTypeForEncoding', 'InvalidTypeForEncodingHelper' + ), + 149 => array ( + 'SYNC_WITH_TRANSPORT', 'SyncScopeHelper' + ), + 150 => array ( + 'ACTIVE', 'AdapterManagerIdHelper', 'AdapterNameHelper', 'AdapterStateHelper', 'ClientRequestInfo', 'ClientRequestInfoOperations', 'ClientRequestInterceptor', 'ClientRequestInterceptorOperations', 'DISCARDING', 'HOLDING', 'INACTIVE', 'IORInfo', 'IORInfoOperations', 'IORInterceptor', 'IORInterceptorOperations', 'IORInterceptor_3_0', 'IORInterceptor_3_0Helper', 'IORInterceptor_3_0Holder', 'IORInterceptor_3_0Operations', 'Interceptor', 'InterceptorOperations', 'InvalidSlot', 'InvalidSlotHelper', 'LOCATION_FORWARD', 'NON_EXISTENT', 'ORBIdHelper', 'ORBInitInfo', 'ORBInitInfoOperations', 'ORBInitializer', 'ORBInitializerOperations', 'ObjectReferenceFactory', 'ObjectReferenceFactoryHelper', 'ObjectReferenceFactoryHolder', 'ObjectReferenceTemplate', 'ObjectReferenceTemplateHelper', 'ObjectReferenceTemplateHolder', 'ObjectReferenceTemplateSeqHelper', 'ObjectReferenceTemplateSeqHolder', 'PolicyFactory', 'PolicyFactoryOperations', 'RequestInfo', 'RequestInfoOperations', 'SUCCESSFUL', 'SYSTEM_EXCEPTION', + 'ServerIdHelper', 'ServerRequestInfo', 'ServerRequestInfoOperations', 'ServerRequestInterceptor', 'ServerRequestInterceptorOperations', 'TRANSPORT_RETRY', 'USER_EXCEPTION' + ), + 151 => array ( + 'DuplicateName', 'DuplicateNameHelper' + ), + 152 => array ( + 'AdapterActivator', 'AdapterActivatorOperations', 'ID_ASSIGNMENT_POLICY_ID', 'ID_UNIQUENESS_POLICY_ID', 'IMPLICIT_ACTIVATION_POLICY_ID', 'IdAssignmentPolicy', 'IdAssignmentPolicyOperations', 'IdAssignmentPolicyValue', 'IdUniquenessPolicy', 'IdUniquenessPolicyOperations', 'IdUniquenessPolicyValue', 'ImplicitActivationPolicy', 'ImplicitActivationPolicyOperations', 'ImplicitActivationPolicyValue', 'LIFESPAN_POLICY_ID', 'LifespanPolicy', 'LifespanPolicyOperations', 'LifespanPolicyValue', 'POA', 'POAHelper', 'POAManager', 'POAManagerOperations', 'POAOperations', 'REQUEST_PROCESSING_POLICY_ID', 'RequestProcessingPolicy', 'RequestProcessingPolicyOperations', 'RequestProcessingPolicyValue', 'SERVANT_RETENTION_POLICY_ID', 'Servant', 'ServantActivator', 'ServantActivatorHelper', 'ServantActivatorOperations', 'ServantActivatorPOA', 'ServantLocator', 'ServantLocatorHelper', 'ServantLocatorOperations', 'ServantLocatorPOA', 'ServantManager', 'ServantManagerOperations', 'ServantRetentionPolicy', + 'ServantRetentionPolicyOperations', 'ServantRetentionPolicyValue', 'THREAD_POLICY_ID', 'ThreadPolicy', 'ThreadPolicyOperations', 'ThreadPolicyValue', '_ServantActivatorStub', '_ServantLocatorStub' + ), + 153 => array ( + 'NoContext', 'NoContextHelper' + ), + 154 => array ( + 'AdapterInactive', 'AdapterInactiveHelper', 'State' + ), + 155 => array ( + 'AdapterAlreadyExists', 'AdapterAlreadyExistsHelper', 'AdapterNonExistent', 'AdapterNonExistentHelper', 'InvalidPolicy', 'InvalidPolicyHelper', 'NoServant', 'NoServantHelper', 'ObjectAlreadyActive', 'ObjectAlreadyActiveHelper', 'ObjectNotActive', 'ObjectNotActiveHelper', 'ServantAlreadyActive', 'ServantAlreadyActiveHelper', 'ServantNotActive', 'ServantNotActiveHelper', 'WrongAdapter', 'WrongAdapterHelper', 'WrongPolicy', 'WrongPolicyHelper' + ), + 156 => array ( + 'CookieHolder' + ), + 157 => array ( + 'RunTime', 'RunTimeOperations' + ), + 158 => array ( + '_Remote_Stub' + ), + 159 => array ( + 'Attr', 'CDATASection', 'CharacterData', 'Comment', 'DOMConfiguration', 'DOMError', 'DOMErrorHandler', 'DOMException', 'DOMImplementation', 'DOMImplementationList', 'DOMImplementationSource', 'DOMStringList', 'DocumentFragment', 'DocumentType', 'EntityReference', 'NameList', 'NamedNodeMap', 'Node', 'NodeList', 'Notation', 'ProcessingInstruction', 'Text', 'TypeInfo', 'UserDataHandler' + ), + 160 => array ( + 'DOMImplementationRegistry' + ), + 161 => array ( + 'EventException', 'EventTarget', 'MutationEvent', 'UIEvent' + ), + 162 => array ( + 'DOMImplementationLS', 'LSException', 'LSInput', 'LSLoadEvent', 'LSOutput', 'LSParser', 'LSParserFilter', 'LSProgressEvent', 'LSResourceResolver', 'LSSerializer', 'LSSerializerFilter' + ), + 163 => array ( + 'DTDHandler', 'DocumentHandler', 'EntityResolver', 'ErrorHandler', 'HandlerBase', 'InputSource', 'Locator', 'SAXException', 'SAXNotRecognizedException', 'SAXNotSupportedException', 'SAXParseException', 'XMLFilter', 'XMLReader' + ), + 164 => array ( + 'Attributes2', 'Attributes2Impl', 'DeclHandler', 'DefaultHandler2', 'EntityResolver2', 'LexicalHandler', 'Locator2', 'Locator2Impl' + ), + 165 => array ( + 'AttributeListImpl', 'AttributesImpl', 'DefaultHandler', 'LocatorImpl', 'NamespaceSupport', 'ParserAdapter', 'ParserFactory', 'XMLFilterImpl', 'XMLReaderAdapter', 'XMLReaderFactory' + ), + /* ambiguous class names (appear in more than one package) */ + 166 => array ( + 'Annotation', 'AnySeqHelper', 'Array', 'Attribute', 'AttributeList', 'AttributeSet', 'Attributes', 'AuthenticationException', 'Binding', 'Bounds', 'Certificate', 'CertificateEncodingException', 'CertificateException', 'CertificateExpiredException', 'CertificateNotYetValidException', 'CertificateParsingException', 'ConnectException', 'ContentHandler', 'Context', 'Control', 'Current', 'CurrentHelper', 'CurrentOperations', 'DOMLocator', 'DataInputStream', 'DataOutputStream', 'Date', 'DefaultLoaderRepository', 'Delegate', 'Document', 'DocumentEvent', 'DynAny', 'DynArray', 'DynEnum', 'DynFixed', 'DynSequence', 'DynStruct', 'DynUnion', 'DynValue', 'DynamicImplementation', 'Element', 'Entity', 'Event', 'EventListener', 'FieldNameHelper', 'FileFilter', 'Formatter', 'ForwardRequest', 'ForwardRequestHelper', 'InconsistentTypeCode', 'InputStream', 'IntrospectionException', 'InvalidAttributeValueException', 'InvalidKeyException', 'InvalidName', 'InvalidNameHelper', 'InvalidValue', 'List', 'MouseEvent', + 'NameValuePair', 'NameValuePairHelper', 'ORB', 'Object', 'ObjectIdHelper', 'ObjectImpl', 'OpenType', 'OutputStream', 'ParagraphView', 'Parser', 'Permission', 'Policy', 'Principal', 'Proxy', 'Reference', 'Statement', 'Timer', 'Timestamp', 'TypeMismatch', 'TypeMismatchHelper', 'UNKNOWN', 'UnknownHostException', 'X509Certificate' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '*', '&', '%', '!', ';', '<', '>', '?' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + /* all Java keywords are case sensitive */ + 1 => true, 2 => true, 3 => true, 4 => true, + 5 => true, 6 => true, 7 => true, 8 => true, 9 => true, + 10 => true, 11 => true, 12 => true, 13 => true, 14 => true, + 15 => true, 16 => true, 17 => true, 18 => true, 19 => true, + 20 => true, 21 => true, 22 => true, 23 => true, 24 => true, + 25 => true, 26 => true, 27 => true, 28 => true, 29 => true, + 30 => true, 31 => true, 32 => true, 33 => true, 34 => true, + 35 => true, 36 => true, 37 => true, 38 => true, 39 => true, + 40 => true, 41 => true, 42 => true, 43 => true, 44 => true, + 45 => true, 46 => true, 47 => true, 48 => true, 49 => true, + 50 => true, 51 => true, 52 => true, 53 => true, 54 => true, + 55 => true, 56 => true, 57 => true, 58 => true, 59 => true, + 60 => true, 61 => true, 62 => true, 63 => true, 64 => true, + 65 => true, 66 => true, 67 => true, 68 => true, 69 => true, + 70 => true, 71 => true, 72 => true, 73 => true, 74 => true, + 75 => true, 76 => true, 77 => true, 78 => true, 79 => true, + 80 => true, 81 => true, 82 => true, 83 => true, 84 => true, + 85 => true, 86 => true, 87 => true, 88 => true, 89 => true, + 90 => true, 91 => true, 92 => true, 93 => true, 94 => true, + 95 => true, 96 => true, 97 => true, 98 => true, 99 => true, + 100 => true, 101 => true, 102 => true, 103 => true, 104 => true, + 105 => true, 106 => true, 107 => true, 108 => true, 109 => true, + 110 => true, 111 => true, 112 => true, 113 => true, 114 => true, + 115 => true, 116 => true, 117 => true, 118 => true, 119 => true, + 120 => true, 121 => true, 122 => true, 123 => true, 124 => true, + 125 => true, 126 => true, 127 => true, 128 => true, 129 => true, + 130 => true, 131 => true, 132 => true, 133 => true, 134 => true, + 135 => true, 136 => true, 137 => true, 138 => true, 139 => true, + 140 => true, 141 => true, 142 => true, 143 => true, 144 => true, + 145 => true, 146 => true, 147 => true, 148 => true, 149 => true, + 150 => true, 151 => true, 152 => true, 153 => true, 154 => true, + 155 => true, 156 => true, 157 => true, 158 => true, 159 => true, + 160 => true, 161 => true, 162 => true, 163 => true, 164 => true, + 165 => true, 166 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #993333;', + 4 => 'color: #b13366;', + 5 => 'color: #aaaadd; font-weight: bold;', + 6 => 'color: #aaaadd; font-weight: bold;', + 7 => 'color: #aaaadd; font-weight: bold;', + 8 => 'color: #aaaadd; font-weight: bold;', + 9 => 'color: #aaaadd; font-weight: bold;', + 10 => 'color: #aaaadd; font-weight: bold;', + 11 => 'color: #aaaadd; font-weight: bold;', + 12 => 'color: #aaaadd; font-weight: bold;', + 13 => 'color: #aaaadd; font-weight: bold;', + 14 => 'color: #aaaadd; font-weight: bold;', + 15 => 'color: #aaaadd; font-weight: bold;', + 16 => 'color: #aaaadd; font-weight: bold;', + 17 => 'color: #aaaadd; font-weight: bold;', + 18 => 'color: #aaaadd; font-weight: bold;', + 19 => 'color: #aaaadd; font-weight: bold;', + 20 => 'color: #aaaadd; font-weight: bold;', + 21 => 'color: #aaaadd; font-weight: bold;', + 22 => 'color: #aaaadd; font-weight: bold;', + 23 => 'color: #aaaadd; font-weight: bold;', + 24 => 'color: #aaaadd; font-weight: bold;', + 25 => 'color: #aaaadd; font-weight: bold;', + 26 => 'color: #aaaadd; font-weight: bold;', + 27 => 'color: #aaaadd; font-weight: bold;', + 28 => 'color: #aaaadd; font-weight: bold;', + 29 => 'color: #aaaadd; font-weight: bold;', + 30 => 'color: #aaaadd; font-weight: bold;', + 31 => 'color: #aaaadd; font-weight: bold;', + 32 => 'color: #aaaadd; font-weight: bold;', + 33 => 'color: #aaaadd; font-weight: bold;', + 34 => 'color: #aaaadd; font-weight: bold;', + 35 => 'color: #aaaadd; font-weight: bold;', + 36 => 'color: #aaaadd; font-weight: bold;', + 37 => 'color: #aaaadd; font-weight: bold;', + 38 => 'color: #aaaadd; font-weight: bold;', + 39 => 'color: #aaaadd; font-weight: bold;', + 40 => 'color: #aaaadd; font-weight: bold;', + 41 => 'color: #aaaadd; font-weight: bold;', + 42 => 'color: #aaaadd; font-weight: bold;', + 43 => 'color: #aaaadd; font-weight: bold;', + 44 => 'color: #aaaadd; font-weight: bold;', + 45 => 'color: #aaaadd; font-weight: bold;', + 46 => 'color: #aaaadd; font-weight: bold;', + 47 => 'color: #aaaadd; font-weight: bold;', + 48 => 'color: #aaaadd; font-weight: bold;', + 49 => 'color: #aaaadd; font-weight: bold;', + 50 => 'color: #aaaadd; font-weight: bold;', + 51 => 'color: #aaaadd; font-weight: bold;', + 52 => 'color: #aaaadd; font-weight: bold;', + 53 => 'color: #aaaadd; font-weight: bold;', + 54 => 'color: #aaaadd; font-weight: bold;', + 55 => 'color: #aaaadd; font-weight: bold;', + 56 => 'color: #aaaadd; font-weight: bold;', + 57 => 'color: #aaaadd; font-weight: bold;', + 58 => 'color: #aaaadd; font-weight: bold;', + 59 => 'color: #aaaadd; font-weight: bold;', + 60 => 'color: #aaaadd; font-weight: bold;', + 61 => 'color: #aaaadd; font-weight: bold;', + 62 => 'color: #aaaadd; font-weight: bold;', + 63 => 'color: #aaaadd; font-weight: bold;', + 64 => 'color: #aaaadd; font-weight: bold;', + 65 => 'color: #aaaadd; font-weight: bold;', + 66 => 'color: #aaaadd; font-weight: bold;', + 67 => 'color: #aaaadd; font-weight: bold;', + 68 => 'color: #aaaadd; font-weight: bold;', + 69 => 'color: #aaaadd; font-weight: bold;', + 70 => 'color: #aaaadd; font-weight: bold;', + 71 => 'color: #aaaadd; font-weight: bold;', + 72 => 'color: #aaaadd; font-weight: bold;', + 73 => 'color: #aaaadd; font-weight: bold;', + 74 => 'color: #aaaadd; font-weight: bold;', + 75 => 'color: #aaaadd; font-weight: bold;', + 76 => 'color: #aaaadd; font-weight: bold;', + 77 => 'color: #aaaadd; font-weight: bold;', + 78 => 'color: #aaaadd; font-weight: bold;', + 79 => 'color: #aaaadd; font-weight: bold;', + 80 => 'color: #aaaadd; font-weight: bold;', + 81 => 'color: #aaaadd; font-weight: bold;', + 82 => 'color: #aaaadd; font-weight: bold;', + 83 => 'color: #aaaadd; font-weight: bold;', + 84 => 'color: #aaaadd; font-weight: bold;', + 85 => 'color: #aaaadd; font-weight: bold;', + 86 => 'color: #aaaadd; font-weight: bold;', + 87 => 'color: #aaaadd; font-weight: bold;', + 88 => 'color: #aaaadd; font-weight: bold;', + 89 => 'color: #aaaadd; font-weight: bold;', + 90 => 'color: #aaaadd; font-weight: bold;', + 91 => 'color: #aaaadd; font-weight: bold;', + 92 => 'color: #aaaadd; font-weight: bold;', + 93 => 'color: #aaaadd; font-weight: bold;', + 94 => 'color: #aaaadd; font-weight: bold;', + 95 => 'color: #aaaadd; font-weight: bold;', + 96 => 'color: #aaaadd; font-weight: bold;', + 97 => 'color: #aaaadd; font-weight: bold;', + 98 => 'color: #aaaadd; font-weight: bold;', + 99 => 'color: #aaaadd; font-weight: bold;', + 100 => 'color: #aaaadd; font-weight: bold;', + 101 => 'color: #aaaadd; font-weight: bold;', + 102 => 'color: #aaaadd; font-weight: bold;', + 103 => 'color: #aaaadd; font-weight: bold;', + 104 => 'color: #aaaadd; font-weight: bold;', + 105 => 'color: #aaaadd; font-weight: bold;', + 106 => 'color: #aaaadd; font-weight: bold;', + 107 => 'color: #aaaadd; font-weight: bold;', + 108 => 'color: #aaaadd; font-weight: bold;', + 109 => 'color: #aaaadd; font-weight: bold;', + 110 => 'color: #aaaadd; font-weight: bold;', + 111 => 'color: #aaaadd; font-weight: bold;', + 112 => 'color: #aaaadd; font-weight: bold;', + 113 => 'color: #aaaadd; font-weight: bold;', + 114 => 'color: #aaaadd; font-weight: bold;', + 115 => 'color: #aaaadd; font-weight: bold;', + 116 => 'color: #aaaadd; font-weight: bold;', + 117 => 'color: #aaaadd; font-weight: bold;', + 118 => 'color: #aaaadd; font-weight: bold;', + 119 => 'color: #aaaadd; font-weight: bold;', + 120 => 'color: #aaaadd; font-weight: bold;', + 121 => 'color: #aaaadd; font-weight: bold;', + 122 => 'color: #aaaadd; font-weight: bold;', + 123 => 'color: #aaaadd; font-weight: bold;', + 124 => 'color: #aaaadd; font-weight: bold;', + 125 => 'color: #aaaadd; font-weight: bold;', + 126 => 'color: #aaaadd; font-weight: bold;', + 127 => 'color: #aaaadd; font-weight: bold;', + 128 => 'color: #aaaadd; font-weight: bold;', + 129 => 'color: #aaaadd; font-weight: bold;', + 130 => 'color: #aaaadd; font-weight: bold;', + 131 => 'color: #aaaadd; font-weight: bold;', + 132 => 'color: #aaaadd; font-weight: bold;', + 133 => 'color: #aaaadd; font-weight: bold;', + 134 => 'color: #aaaadd; font-weight: bold;', + 135 => 'color: #aaaadd; font-weight: bold;', + 136 => 'color: #aaaadd; font-weight: bold;', + 137 => 'color: #aaaadd; font-weight: bold;', + 138 => 'color: #aaaadd; font-weight: bold;', + 139 => 'color: #aaaadd; font-weight: bold;', + 140 => 'color: #aaaadd; font-weight: bold;', + 141 => 'color: #aaaadd; font-weight: bold;', + 142 => 'color: #aaaadd; font-weight: bold;', + 143 => 'color: #aaaadd; font-weight: bold;', + 144 => 'color: #aaaadd; font-weight: bold;', + 145 => 'color: #aaaadd; font-weight: bold;', + 146 => 'color: #aaaadd; font-weight: bold;', + 147 => 'color: #aaaadd; font-weight: bold;', + 148 => 'color: #aaaadd; font-weight: bold;', + 149 => 'color: #aaaadd; font-weight: bold;', + 150 => 'color: #aaaadd; font-weight: bold;', + 151 => 'color: #aaaadd; font-weight: bold;', + 152 => 'color: #aaaadd; font-weight: bold;', + 153 => 'color: #aaaadd; font-weight: bold;', + 154 => 'color: #aaaadd; font-weight: bold;', + 155 => 'color: #aaaadd; font-weight: bold;', + 156 => 'color: #aaaadd; font-weight: bold;', + 157 => 'color: #aaaadd; font-weight: bold;', + 158 => 'color: #aaaadd; font-weight: bold;', + 159 => 'color: #aaaadd; font-weight: bold;', + 160 => 'color: #aaaadd; font-weight: bold;', + 161 => 'color: #aaaadd; font-weight: bold;', + 162 => 'color: #aaaadd; font-weight: bold;', + 163 => 'color: #aaaadd; font-weight: bold;', + 164 => 'color: #aaaadd; font-weight: bold;', + 165 => 'color: #aaaadd; font-weight: bold;', + 166 => 'color: #aaaadd; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/applet/{FNAME}.html', + 6 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/awt/{FNAME}.html', + 7 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/awt/color/{FNAME}.html', + 8 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/awt/datatransfer/{FNAME}.html', + 9 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/awt/dnd/{FNAME}.html', + 10 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/awt/event/{FNAME}.html', + 11 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/awt/font/{FNAME}.html', + 12 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/awt/geom/{FNAME}.html', + 13 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/awt/im/{FNAME}.html', + 14 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/awt/im/spi/{FNAME}.html', + 15 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/awt/image/{FNAME}.html', + 16 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/awt/image/renderable/{FNAME}.html', + 17 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/awt/print/{FNAME}.html', + 18 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/beans/{FNAME}.html', + 19 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/beans/beancontext/{FNAME}.html', + 20 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/io/{FNAME}.html', + 21 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/lang/{FNAME}.html', + 22 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/lang/annotation/{FNAME}.html', + 23 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/lang/instrument/{FNAME}.html', + 24 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/lang/management/{FNAME}.html', + 25 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ref/{FNAME}.html', + 26 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/lang/reflect/{FNAME}.html', + 27 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/math/{FNAME}.html', + 28 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/net/{FNAME}.html', + 29 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/nio/{FNAME}.html', + 30 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/nio/channels/{FNAME}.html', + 31 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/nio/channels/spi/{FNAME}.html', + 32 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/nio/charset/{FNAME}.html', + 33 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/nio/charset/spi/{FNAME}.html', + 34 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/rmi/{FNAME}.html', + 35 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/rmi/activation/{FNAME}.html', + 36 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/rmi/dgc/{FNAME}.html', + 37 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/rmi/registry/{FNAME}.html', + 38 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/rmi/server/{FNAME}.html', + 39 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/security/{FNAME}.html', + 40 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/security/acl/{FNAME}.html', + 41 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/security/cert/{FNAME}.html', + 42 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/security/interfaces/{FNAME}.html', + 43 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/security/spec/{FNAME}.html', + 44 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/sql/{FNAME}.html', + 45 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/text/{FNAME}.html', + 46 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/util/{FNAME}.html', + 47 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/{FNAME}.html', + 48 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/atomic/{FNAME}.html', + 49 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/locks/{FNAME}.html', + 50 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/util/jar/{FNAME}.html', + 51 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/util/logging/{FNAME}.html', + 52 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/util/prefs/{FNAME}.html', + 53 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/{FNAME}.html', + 54 => 'http://java.sun.com/j2se/1.5.0/docs/api/java/util/zip/{FNAME}.html', + 55 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/accessibility/{FNAME}.html', + 56 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/activity/{FNAME}.html', + 57 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/crypto/{FNAME}.html', + 58 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/crypto/interfaces/{FNAME}.html', + 59 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/crypto/spec/{FNAME}.html', + 60 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/imageio/{FNAME}.html', + 61 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/imageio/event/{FNAME}.html', + 62 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/imageio/metadata/{FNAME}.html', + 63 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/imageio/plugins/bmp/{FNAME}.html', + 64 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/imageio/plugins/jpeg/{FNAME}.html', + 65 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/imageio/spi/{FNAME}.html', + 66 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/imageio/stream/{FNAME}.html', + 67 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/management/{FNAME}.html', + 68 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/management/loading/{FNAME}.html', + 69 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/management/modelmbean/{FNAME}.html', + 70 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/management/monitor/{FNAME}.html', + 71 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/management/openmbean/{FNAME}.html', + 72 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/management/relation/{FNAME}.html', + 73 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/management/remote/{FNAME}.html', + 74 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/management/remote/rmi/{FNAME}.html', + 75 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/management/timer/{FNAME}.html', + 76 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/naming/{FNAME}.html', + 77 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/naming/directory/{FNAME}.html', + 78 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/naming/event/{FNAME}.html', + 79 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/naming/ldap/{FNAME}.html', + 80 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/naming/spi/{FNAME}.html', + 81 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/net/{FNAME}.html', + 82 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/net/ssl/{FNAME}.html', + 83 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/print/{FNAME}.html', + 84 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/print/attribute/{FNAME}.html', + 85 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/print/attribute/standard/{FNAME}.html', + 86 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/print/event/{FNAME}.html', + 87 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/rmi/{FNAME}.html', + 88 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/rmi/CORBA/{FNAME}.html', + 89 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/rmi/ssl/{FNAME}.html', + 90 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/security/auth/{FNAME}.html', + 91 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/security/auth/callback/{FNAME}.html', + 92 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/security/auth/kerberos/{FNAME}.html', + 93 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/security/auth/login/{FNAME}.html', + 94 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/security/auth/spi/{FNAME}.html', + 95 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/security/auth/x500/{FNAME}.html', + 96 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/security/sasl/{FNAME}.html', + 97 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/sound/midi/{FNAME}.html', + 98 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/sound/midi/spi/{FNAME}.html', + 99 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/sound/sampled/{FNAME}.html', + 100 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/sound/sampled/spi/{FNAME}.html', + 101 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/sql/{FNAME}.html', + 102 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/sql/rowset/{FNAME}.html', + 103 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/sql/rowset/serial/{FNAME}.html', + 104 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/sql/rowset/spi/{FNAME}.html', + 105 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/{FNAME}.html', + 106 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/border/{FNAME}.html', + 107 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/colorchooser/{FNAME}.html', + 108 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/event/{FNAME}.html', + 109 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/filechooser/{FNAME}.html', + 110 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/plaf/{FNAME}.html', + 111 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/plaf/basic/{FNAME}.html', + 112 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/plaf/metal/{FNAME}.html', + 113 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/plaf/multi/{FNAME}.html', + 114 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/plaf/synth/{FNAME}.html', + 115 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/table/{FNAME}.html', + 116 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/text/{FNAME}.html', + 117 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/text/html/{FNAME}.html', + 118 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/text/html/parser/{FNAME}.html', + 119 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/text/rtf/{FNAME}.html', + 120 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/tree/{FNAME}.html', + 121 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/undo/{FNAME}.html', + 122 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/transaction/{FNAME}.html', + 123 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/transaction/xa/{FNAME}.html', + 124 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/{FNAME}.html', + 125 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/datatype/{FNAME}.html', + 126 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/namespace/{FNAME}.html', + 127 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/parsers/{FNAME}.html', + 128 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/transform/{FNAME}.html', + 129 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/transform/dom/{FNAME}.html', + 130 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/transform/sax/{FNAME}.html', + 131 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/transform/stream/{FNAME}.html', + 132 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/validation/{FNAME}.html', + 133 => 'http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/xpath/{FNAME}.html', + 134 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/ietf/jgss/{FNAME}.html', + 135 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/omg/CORBA/{FNAME}.html', + 136 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/omg/CORBA/DynAnyPackage/{FNAME}.html', + 137 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/omg/CORBA/TypeCodePackage/{FNAME}.html', + 138 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/omg/CORBA/portable/{FNAME}.html', + 139 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/omg/CosNaming/{FNAME}.html', + 140 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/omg/CosNaming/NamingContextExtPackage/{FNAME}.html', + 141 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/omg/CosNaming/NamingContextPackage/{FNAME}.html', + 142 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/omg/Dynamic/{FNAME}.html', + 143 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/omg/DynamicAny/{FNAME}.html', + 144 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/omg/DynamicAny/DynAnyFactoryPackage/{FNAME}.html', + 145 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/omg/DynamicAny/DynAnyPackage/{FNAME}.html', + 146 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/omg/IOP/{FNAME}.html', + 147 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/omg/IOP/CodecFactoryPackage/{FNAME}.html', + 148 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/omg/IOP/CodecPackage/{FNAME}.html', + 149 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/omg/Messaging/{FNAME}.html', + 150 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/omg/PortableInterceptor/{FNAME}.html', + 151 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/omg/PortableInterceptor/ORBInitInfoPackage/{FNAME}.html', + 152 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/omg/PortableServer/{FNAME}.html', + 153 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/omg/PortableServer/CurrentPackage/{FNAME}.html', + 154 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/omg/PortableServer/POAManagerPackage/{FNAME}.html', + 155 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/omg/PortableServer/POAPackage/{FNAME}.html', + 156 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/omg/PortableServer/ServantLocatorPackage/{FNAME}.html', + 157 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/omg/SendingContext/{FNAME}.html', + 158 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/omg/stub/java/rmi/{FNAME}.html', + 159 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/w3c/dom/{FNAME}.html', + 160 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/w3c/dom/bootstrap/{FNAME}.html', + 161 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/w3c/dom/events/{FNAME}.html', + 162 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/w3c/dom/ls/{FNAME}.html', + 163 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/xml/sax/{FNAME}.html', + 164 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/xml/sax/ext/{FNAME}.html', + 165 => 'http://java.sun.com/j2se/1.5.0/docs/api/org/xml/sax/helpers/{FNAME}.html', + /* ambiguous class names (appear in more than one package) */ + 166 => 'http://www.google.com/search?sitesearch=java.sun.com&q=allinurl%3Aj2se%2F1+5+0%2Fdocs%2Fapi+{FNAME}' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + /* Java does not use '::' */ + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/javascript.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/javascript.php new file mode 100644 index 0000000..9135ef4 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/javascript.php @@ -0,0 +1,144 @@ + 'Javascript', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do', + 'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item', + 'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void', + 'while', 'write', 'with' + ), + 2 => array( + 'class', 'const', 'default', 'debugger', 'export', 'extends', 'false', + 'function', 'import', 'namespace', 'new', 'null', 'package', 'private', + 'protected', 'public', 'super', 'true', 'use', 'var' + ), + 3 => array( + + // common functions for Window object + 'alert', 'back', 'blur', 'close', 'confirm', 'focus', 'forward', 'home', + 'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove', + 'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'status', + 'stop', + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000066; font-weight: bold;', + 2 => 'color: #003366; font-weight: bold;', + 3 => 'color: #000066;' + ), + 'COMMENTS' => array( + 1 => 'color: #009900; font-style: italic;', + 'MULTI' => 'color: #009900; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #3366CC;' + ), + 'NUMBERS' => array( + 0 => 'color: #CC0000;' + ), + 'METHODS' => array( + 1 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + 0 => 'color: #0066FF;' + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + 3 => '' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + 0 => "/.*/([igm]*)?" // matches js reg exps + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + 0 => array( + '' + ), + 1 => array( + '' + ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + 1 => true + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/latex.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/latex.php new file mode 100644 index 0000000..3638efd --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/latex.php @@ -0,0 +1,203 @@ +set_symbols_highlighting(false); + $this->set_numbers_highlighting(false); +} + +$language_data = array ( + 'LANG_NAME' => 'LaTeX', + 'COMMENT_SINGLE' => array(1 => '%'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + ), + 'SYMBOLS' => array( + '.', ',','\\',"~", "{", "}", "[", "]", "$" + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + ), + 'BRACKETS' => array( + ), + 'STRINGS' => array( + ), + 'NUMBERS' => array( + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + ), + 'REGEXPS' => array( + 1 => 'color: #00A000; font-weight: bold;', // Math inner + 2 => 'color: #800000; font-weight: normal;', // \keyword #202020 + 3 => 'color: #2222D0; font-weight: normal;', // {...} + 4 => 'color: #2222D0; font-weight: normal;', // [Option] + 5 => 'color: #00A000; font-weight: normal;', // Mathe #CCF020 + 6 => 'color: #F00000; font-weight: normal;', // Structure \begin + 7 => 'color: #F00000; font-weight: normal;', // Structure \end + 8 => 'color: #F00000; font-weight: normal;', // Structure: Labels + //9 => 'color: #F00000; font-weight: normal;', // Structure + 10 => 'color: #0000D0; font-weight: bold;', // Environment + 11 => 'color: #0000D0; font-weight: bold;', // Environment + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + // Math inner + 1 => array( + GESHI_SEARCH => "(\\\\begin\\{)(equation|displaymath|eqnarray|subeqnarray|math|multline|gather|align|alignat|flalign )(\\})(.*)(\\\\end\\{)(equation|displaymath|eqnarray|subeqnarray|math|multline|gather|align|alignat|flalign)(\\})", + GESHI_REPLACE => '\\4', + GESHI_MODIFIERS => 's', + GESHI_BEFORE => '\1\2\3', + GESHI_AFTER => '\5\6\7' + ), + // \keywords + 2 => array( + GESHI_SEARCH => "(\\\\)([a-zA-Z]+)", + GESHI_REPLACE => '\1\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + // {parameters} + 3 => array( + GESHI_SEARCH => "(\\{)(.*)(\\})", + GESHI_REPLACE => '\2', + GESHI_MODIFIERS => 'U', + GESHI_BEFORE => '\1', + GESHI_AFTER => '\3' + ), + // [Option] + 4 => array( + GESHI_SEARCH => "(\[)(.+)(\])", + GESHI_REPLACE => '\2', + GESHI_MODIFIERS => 'U', + GESHI_BEFORE => '\1', + GESHI_AFTER => '\3' + ), + // Mathe mit $ ... $ + 5 => array( + GESHI_SEARCH => "(\\$)(.+)(\\$)", + GESHI_REPLACE => '\1\2\3', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + // Structure begin + 6 => array( + GESHI_SEARCH => "(\\\\begin)(?=[^a-zA-Z])", + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '\\2' + ), + // Structure end + 7 => array( + GESHI_SEARCH => "(\\\\end)(?=[^a-zA-Z])", + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '\\2' + ), + //Structure: Label + 8 => array( + GESHI_SEARCH => "(\\\\)(label|pageref|ref|cite)(?=[^a-zA-Z])", + GESHI_REPLACE => '\\1\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '\\3' + ), +// Structure: sections +/*9 => array( + GESHI_SEARCH => "(\\\\)(part|chapter|section|subsection|subsubsection|paragraph|subparagraph)(?=[^a-zA-Z])", + GESHI_REPLACE => '\1\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '\\3' + ),*/ +// environment begin +10 => array( + GESHI_SEARCH => "(\\\\begin)(\\{)(.*)(\\})", + GESHI_REPLACE => '\\3', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), +// environment end +11 => array( + GESHI_SEARCH => "(\\\\end)(\\{)(.*)(\\})", + GESHI_REPLACE => '\\3', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + +// --------------------------------------------- + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/lisp.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/lisp.php new file mode 100644 index 0000000..7d96b9d --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/lisp.php @@ -0,0 +1,133 @@ + 'Lisp', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(';|' => '|;'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'not','defun','princ', + 'eval','apply','funcall','quote','identity','function', + 'complement','backquote','lambda','set','setq','setf', + 'defun','defmacro','gensym','make','symbol','intern', + 'symbol','name','symbol','value','symbol','plist','get', + 'getf','putprop','remprop','hash','make','array','aref', + 'car','cdr','caar','cadr','cdar','cddr','caaar','caadr','cadar', + 'caddr','cdaar','cdadr','cddar','cdddr','caaaar','caaadr', + 'caadar','caaddr','cadaar','cadadr','caddar','cadddr', + 'cdaaar','cdaadr','cdadar','cdaddr','cddaar','cddadr', + 'cdddar','cddddr','cons','list','append','reverse','last','nth', + 'nthcdr','member','assoc','subst','sublis','nsubst', + 'nsublis','remove','length','list','length', + 'mapc','mapcar','mapl','maplist','mapcan','mapcon','rplaca', + 'rplacd','nconc','delete','atom','symbolp','numberp', + 'boundp','null','listp','consp','minusp','zerop','plusp', + 'evenp','oddp','eq','eql','equal','cond','case','and','or', + 'let','l','if','prog','prog1','prog2','progn','go','return', + 'do','dolist','dotimes','catch','throw','error','cerror','break', + 'continue','errset','baktrace','evalhook','truncate','float', + 'rem','min','max','abs','sin','cos','tan','expt','exp','sqrt', + 'random','logand','logior','logxor','lognot','bignums','logeqv', + 'lognand','lognor','logorc2','logtest','logbitp','logcount', + 'integer','length','nil' + ) + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '!', '%', '^', '&', '/','+','-','*','=','<','>',';','|' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 0 => 'color: #555;', + 1 => 'color: #555;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + '::', ':' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/lua.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/lua.php new file mode 100644 index 0000000..6ae651d --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/lua.php @@ -0,0 +1,134 @@ + 'Lua', + 'COMMENT_SINGLE' => array(1 => "--"), + 'COMMENT_MULTI' => array('--[[' => ']]'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'and','break','do','else','elseif','end','false','for','function','if', + 'in','local','nil','not','or','repeat','return','then','true','until','while', + '_VERSION','assert','collectgarbage','dofile','error','gcinfo','loadfile','loadstring', + 'print','tonumber','tostring','type','unpack', + '_ALERT','_ERRORMESSAGE','_INPUT','_PROMPT','_OUTPUT', + '_STDERR','_STDIN','_STDOUT','call','dostring','foreach','foreachi','getn','globals','newtype', + 'rawget','rawset','require','sort','tinsert','tremove', + 'abs','acos','asin','atan','atan2','ceil','cos','deg','exp', + 'floor','format','frexp','gsub','ldexp','log','log10','max','min','mod','rad','random','randomseed', + 'sin','sqrt','strbyte','strchar','strfind','strlen','strlower','strrep','strsub','strupper','tan', + 'openfile','closefile','readfrom','writeto','appendto', + 'remove','rename','flush','seek','tmpfile','tmpname','read','write', + 'clock','date','difftime','execute','exit','getenv','setlocale','time', + '_G','getfenv','getmetatable','ipairs','loadlib','next','pairs','pcall', + 'rawegal','rawget','rawset','require','setfenv','setmetatable','xpcall', + 'string.byte','string.char','string.dump','string.find','string.len', + 'string.lower','string.rep','string.sub','string.upper','string.format','string.gfind','string.gsub', + 'table.concat','table.foreach','table.foreachi','table.getn','table.sort','table.insert','table.remove','table.setn', + 'math.abs','math.acos','math.asin','math.atan','math.atan2','math.ceil','math.cos','math.deg','math.exp', + 'math.floor','math.frexp','math.ldexp','math.log','math.log10','math.max','math.min','math.mod', + 'math.pi','math.rad','math.random','math.randomseed','math.sin','math.sqrt','math.tan', + 'coroutine.create','coroutine.resume','coroutine.status', + 'coroutine.wrap','coroutine.yield', + 'io.close','io.flush','io.input','io.lines','io.open','io.output','io.read','io.tmpfile','io.type','io.write', + 'io.stdin','io.stdout','io.stderr', + 'os.clock','os.date','os.difftime','os.execute','os.exit','os.getenv','os.remove','os.rename', + 'os.setlocale','os.time','os.tmpname', + 'string','table','math','coroutine','io','os','debug' + ) + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>', '=', ';' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 0 => 'color: #b1b100;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/m68k.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/m68k.php new file mode 100644 index 0000000..27cf48b --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/m68k.php @@ -0,0 +1,135 @@ + 'Motorola 68000 Assembler', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /*CPU*/ + 1 => array( + 'adc','add','ais','aix','and','asl','asr','bcc','bclr','bcs','beq', + 'bge','bgt','bhcc','bhcs','bhi','bhs','bih','bil','bit','ble','blo', + 'bls','blt','bmc','bmi','bms','bne','bpl','bra','brclr','brn', + 'brset','bset','bsr','cbeq','clc','cli','clr','cmp','com','cphx', + 'cpx','daa','dbnz','dec','div','eor','inc','jmp','jsr','lda','ldhx', + 'ldx','lsl','lsr','mov','mul','neg','nop','nsa','ora','psha','pshh', + 'pshx','pula','pulh','pulx','rol','ror','rsp','rti','rts','sbc', + 'sec','sei','sta','sthx','stop','stx','sub','swi','tap','tax','tpa', + 'tst','tsx','txa','txs','wait' + ), + /*registers*/ + 2 => array( + 'a','h','x', + 'hx','sp' + ), + /*Directive*/ + 3 => array( + '#define','#endif','#else','#ifdef','#ifndef','#include','#undef', + '.db','.dd','.df','.dq','.dt','.dw','.end','.org','equ' + ), + ), + 'SYMBOLS' => array( + ',' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000ff; font-weight:bold;', + 2 => 'color: #0000ff;', + 3 => 'color: #46aa03; font-weight:bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #adadad; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #0000ff;' + ), + 'STRINGS' => array( + 0 => 'color: #7f007f;' + ), + 'NUMBERS' => array( + 0 => 'color: #dd22dd;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #008000;' + ), + 'REGEXPS' => array( + 0 => 'color: #22bbff;', + 1 => 'color: #22bbff;', + 2 => 'color: #993333;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + 0 => '#?0[0-9a-fA-F]{1,32}[hH]', + 1 => '\%[01]{1,64}[bB]', + 2 => '^[_a-zA-Z][_a-zA-Z0-9]{0,50}\:' + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 8 +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/matlab.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/matlab.php new file mode 100644 index 0000000..32ccabd --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/matlab.php @@ -0,0 +1,867 @@ + 'Matlab M', + 'COMMENT_SINGLE' => array(1 => '%'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'break', 'case', 'catch', 'continue', 'elseif', 'else', 'end', 'for', + 'function', 'global', 'if', 'otherwise', 'persistent', 'return', + 'switch', 'try', 'while','...' + ), + 2 => array( + 'all', + 'any', + 'exist', + 'find', + 'is', + 'isa', + 'logical', + 'mislocked', + + 'builtin', + 'eval', + 'evalc', + 'evalin', + 'feval', + 'function', + 'global', + 'nargchk', + 'persistent', + 'script', + 'break', + 'case', + 'catch', + 'else', + 'elseif', + 'end', + 'error', + 'for', + 'if', + 'otherwise', + 'return', + 'switch', + 'try', + 'warning', + 'while', + 'input', + 'keyboard', + 'menu', + 'pause', + 'class', + 'double', + 'inferiorto', + 'inline', + 'int8', + 'int16', + 'int32', + 'isa', + 'loadobj', + 'saveobj', + 'single', + 'superiorto', + 'uint8', + 'int16', + 'uint32', + 'dbclear', + 'dbcont', + 'dbdown', + 'dbmex', + 'dbquit', + 'dbstack', + 'dbstatus', + 'dbstep', + 'dbstop', + 'dbtype', + 'dbup', + + 'blkdiag', + 'eye', + 'linspace', + 'logspace', + 'ones', + 'rand', + 'randn', + 'zeros', + 'ans', + 'computer', + 'eps', + 'flops', + 'i', + 'Inf', + 'inputname', + 'j', + 'NaN', + 'nargin', + 'nargout', + 'pi', + 'realmax', + 'realmin', + 'varargin', + 'varargout', + 'calendar', + 'clock', + 'cputime', + 'date', + 'datenum', + 'datestr', + 'datevec', + 'eomday', + 'etime', + 'now', + 'tic', + 'toc', + 'weekday', + 'cat', + 'diag', + 'fliplr', + 'flipud', + 'repmat', + 'reshape', + 'rot90', + 'tril', + 'triu', + 'compan', + 'gallery', + 'hadamard', + 'hankel', + 'hilb', + 'invhilb', + 'magic', + 'pascal', + 'toeplitz', + 'wilkinson', + 'abs', + 'acos', + 'acosh', + 'acot', + 'acoth', + 'acsc', + 'acsch', + 'angle', + 'asec', + 'asech', + 'asin', + 'asinh', + 'atan', + 'atanh', + 'atan2', + 'ceil', + 'complex', + 'conj', + 'cos', + 'cosh', + 'cot', + 'coth', + 'csc', + 'csch', + 'exp', + 'fix', + 'floor', + 'gcd', + 'imag', + 'lcm', + 'log', + 'log2', + 'log10', + 'mod', + 'nchoosek', + 'real', + 'rem', + 'round', + 'sec', + 'sech', + 'sign', + 'sin', + 'sinh', + 'sqrt', + 'tan', + 'tanh', + 'airy', + 'besselh', + 'besseli', + 'besselk', + 'besselj', + 'Bessely', + 'beta', + 'betainc', + 'betaln', + 'ellipj', + 'ellipke', + 'erf', + 'erfc', + 'erfcx', + 'erfiny', + 'expint', + 'factorial', + 'gamma', + 'gammainc', + 'gammaln', + 'legendre', + 'pow2', + 'rat', + 'rats', + 'cart2pol', + 'cart2sph', + 'pol2cart', + 'sph2cart', + 'abs', + 'eval', + 'real', + 'strings', + 'deblank', + 'findstr', + 'lower', + 'strcat', + 'strcmp', + 'strcmpi', + 'strjust', + 'strmatch', + 'strncmp', + 'strrep', + 'strtok', + 'strvcat', + 'symvar', + 'texlabel', + 'upper', + 'char', + 'int2str', + 'mat2str', + 'num2str', + 'sprintf', + 'sscanf', + 'str2double', + 'str2num', + 'bin2dec', + 'dec2bin', + 'dec2hex', + 'hex2dec', + 'hex2num', + 'fclose', + 'fopen', + 'fread', + 'fwrite', + 'fgetl', + 'fgets', + 'fprintf', + 'fscanf', + 'feof', + 'ferror', + 'frewind', + 'fseek', + 'ftell', + 'sprintf', + 'sscanf', + 'dlmread', + 'dlmwrite', + 'hdf', + 'imfinfo', + 'imread', + 'imwrite', + 'textread', + 'wk1read', + 'wk1write', + 'bitand', + 'bitcmp', + 'bitor', + 'bitmax', + 'bitset', + 'bitshift', + 'bitget', + 'bitxor', + 'fieldnames', + 'getfield', + 'rmfield', + 'setfield', + 'struct', + 'struct2cell', + 'class', + 'isa', + 'cell', + 'cellfun', + 'cellstr', + 'cell2struct', + 'celldisp', + 'cellplot', + 'num2cell', + 'cat', + 'flipdim', + 'ind2sub', + 'ipermute', + 'ndgrid', + 'ndims', + 'permute', + 'reshape', + 'shiftdim', + 'squeeze', + 'sub2ind', + 'cond', + 'condeig', + 'det', + 'norm', + 'null', + 'orth', + 'rank', + 'rcond', + 'rref', + 'rrefmovie', + 'subspace', + 'trace', + 'chol', + 'inv', + 'lscov', + 'lu', + 'nnls', + 'pinv', + 'qr', + 'balance', + 'cdf2rdf', + 'eig', + 'gsvd', + 'hess', + 'poly', + 'qz', + 'rsf2csf', + 'schur', + 'svd', + 'expm', + 'funm', + 'logm', + 'sqrtm', + 'qrdelete', + 'qrinsert', + 'bar', + 'barh', + 'hist', + 'hold', + 'loglog', + 'pie', + 'plot', + 'polar', + 'semilogx', + 'semilogy', + 'subplot', + 'bar3', + 'bar3h', + 'comet3', + 'cylinder', + 'fill3', + 'plot3', + 'quiver3', + 'slice', + 'sphere', + 'stem3', + 'waterfall', + 'clabel', + 'datetick', + 'grid', + 'gtext', + 'legend', + 'plotyy', + 'title', + 'xlabel', + 'ylabel', + 'zlabel', + 'contour', + 'contourc', + 'contourf', + 'hidden', + 'meshc', + 'mesh', + 'peaks', + 'surf', + 'surface', + 'surfc', + 'surfl', + 'trimesh', + 'trisurf', + 'coneplot', + 'contourslice', + 'isocaps', + 'isonormals', + 'isosurface', + 'reducepatch', + 'reducevolume', + 'shrinkfaces', + 'smooth3', + 'stream2', + 'stream3', + 'streamline', + 'surf2patch', + 'subvolume', + 'griddata', + 'meshgrid', + 'area', + 'box', + 'comet', + 'compass', + 'errorbar', + 'ezcontour', + 'ezcontourf', + 'ezmesh', + 'ezmeshc', + 'ezplot', + 'ezplot3', + 'ezpolar', + 'ezsurf', + 'ezsurfc', + 'feather', + 'fill', + 'fplot', + 'pareto', + 'pie3', + 'plotmatrix', + 'pcolor', + 'rose', + 'quiver', + 'ribbon', + 'stairs', + 'scatter', + 'scatter3', + 'stem', + 'convhull', + 'delaunay', + 'dsearch', + 'inpolygon', + 'polyarea', + 'tsearch', + 'voronoi', + 'camdolly', + 'camlookat', + 'camorbit', + 'campan', + 'campos', + 'camproj', + 'camroll', + 'camtarget', + 'camup', + 'camva', + 'camzoom', + 'daspect', + 'pbaspect', + 'view', + 'viewmtx', + 'xlim', + 'ylim', + 'zlim', + 'camlight', + 'diffuse', + 'lighting', + 'lightingangle', + 'material', + 'specular', + 'brighten', + 'bwcontr', + 'caxis', + 'colorbar', + 'colorcube', + 'colordef', + 'colormap', + 'graymon', + 'hsv2rgb', + 'rgb2hsv', + 'rgbplot', + 'shading', + 'spinmap', + 'surfnorm', + 'whitebg', + 'autumn', + 'bone', + 'contrast', + 'cool', + 'copper', + 'flag', + 'gray', + 'hot', + 'hsv', + 'jet', + 'lines', + 'prism', + 'spring', + 'summer', + 'winter', + 'orient', + 'print', + 'printopt', + 'saveas', + 'copyobj', + 'findobj', + 'gcbo', + 'gco', + 'get', + 'rotate', + 'ishandle', + 'set', + 'axes', + 'figure', + 'image', + 'light', + 'line', + 'patch', + 'rectangle', + 'surface', + 'text Create', + 'uicontext Create', + 'capture', + 'clc', + 'clf', + 'clg', + 'close', + 'gcf', + 'newplot', + 'refresh', + 'saveas', + 'axis', + 'cla', + 'gca', + 'propedit', + 'reset', + 'rotate3d', + 'selectmoveresize', + 'shg', + 'ginput', + 'zoom', + 'dragrect', + 'drawnow', + 'rbbox', + 'dialog', + 'errordlg', + 'helpdlg', + 'inputdlg', + 'listdlg', + 'msgbox', + 'pagedlg', + 'printdlg', + 'questdlg', + 'uigetfile', + 'uiputfile', + 'uisetcolor', + 'uisetfont', + 'warndlg', + 'menu', + 'menuedit', + 'uicontextmenu', + 'uicontrol', + 'uimenu', + 'dragrect', + 'findfigs', + 'gcbo', + 'rbbox', + 'selectmoveresize', + 'textwrap', + 'uiresume', + 'uiwait Used', + 'waitbar', + 'waitforbuttonpress', + 'convhull', + 'cumprod', + 'cumsum', + 'cumtrapz', + 'delaunay', + 'dsearch', + 'factor', + 'inpolygon', + 'max', + 'mean', + 'median', + 'min', + 'perms', + 'polyarea', + 'primes', + 'prod', + 'sort', + 'sortrows', + 'std', + 'sum', + 'trapz', + 'tsearch', + 'var', + 'voronoi', + 'del2', + 'diff', + 'gradient', + 'corrcoef', + 'cov', + 'conv', + 'conv2', + 'deconv', + 'filter', + 'filter2', + 'abs', + 'angle', + 'cplxpair', + 'fft', + 'fft2', + 'fftshift', + 'ifft', + 'ifft2', + 'ifftn', + 'ifftshift', + 'nextpow2', + 'unwrap', + 'cross', + 'intersect', + 'ismember', + 'setdiff', + 'setxor', + 'union', + 'unique', + 'conv', + 'deconv', + 'poly', + 'polyder', + 'polyeig', + 'polyfit', + 'polyval', + 'polyvalm', + 'residue', + 'roots', + 'griddata', + 'interp1', + 'interp2', + 'interp3', + 'interpft', + 'interpn', + 'meshgrid', + 'ndgrid', + 'spline', + 'dblquad', + 'fmin', + 'fmins', + 'fzero', + 'ode45,', + 'ode113,', + 'ode15s,', + 'ode23s,', + 'ode23t,', + 'ode23tb', + 'odefile', + 'odeget', + 'odeset', + 'quad,', + 'vectorize', + 'spdiags', + 'speye', + 'sprand', + 'sprandn', + 'sprandsym', + 'find', + 'full', + 'sparse', + 'spconvert', + 'nnz', + 'nonzeros', + 'nzmax', + 'spalloc', + 'spfun', + 'spones', + 'colmmd', + 'colperm', + 'dmperm', + 'randperm', + 'symmmd', + 'symrcm', + 'condest', + 'normest', + 'bicg', + 'bicgstab', + 'cgs', + 'cholinc', + 'cholupdate', + 'gmres', + 'luinc', + 'pcg', + 'qmr', + 'qr', + 'qrdelete', + 'qrinsert', + 'qrupdate', + 'eigs', + 'svds', + 'spparms', + 'lin2mu', + 'mu2lin', + 'sound', + 'soundsc', + 'auread', + 'auwrite', + 'wavread', + 'wavwrite', + '[Keywords 6]', + 'addpath', + 'doc', + 'docopt', + 'help', + 'helpdesk', + 'helpwin', + 'lasterr', + 'lastwarn', + 'lookfor', + 'partialpath', + 'path', + 'pathtool', + 'profile', + 'profreport', + 'rmpath', + 'type', + 'ver', + 'version', + 'web', + 'what', + 'whatsnew', + 'which', + 'clear', + 'disp', + 'length', + 'load', + 'mlock', + 'munlock', + 'openvar', + 'pack', + 'save', + 'saveas', + 'size', + 'who', + 'whos', + 'workspace', + 'clc', + 'echo', + 'format', + 'home', + 'more', + 'cd', + 'copyfile', + 'delete', + 'diary', + 'dir', + 'edit', + 'fileparts', + 'fullfile', + 'inmem', + 'ls', + 'matlabroot', + 'mkdir', + 'open', + 'pwd', + 'tempdir', + 'tempname', + 'matlabrc', + 'quit', +) + ), + 'SYMBOLS' => array( + '...' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + //3 => false, + //4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000FF;', + 2 => 'color: #0000FF;' + ), + 'COMMENTS' => array( + 1 => 'color: #228B22;', + ), + 'ESCAPE_CHAR' => array( + 0 => '' + ), + 'BRACKETS' => array( + 0 => 'color: #080;' + ), + 'STRINGS' => array( + //0 => 'color: #A020F0;' + ), + 'NUMBERS' => array( + 0 => 'color: #33f;' + ), + 'METHODS' => array( + 1 => '', + 2 => '' + ), + 'SYMBOLS' => array( + 0 => 'color: #080;' + ), + 'REGEXPS' => array( + 0 => 'color:#A020F0;' + ), + 'SCRIPT' => array( + 0 => '' + ) + ), + 'URLS' => array( + 1 => '', + 2 => 'http://www.mathworks.com/access/helpdesk/help/techdoc/ref/{FNAME}.html', + 3 => '', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.', + 2 => '::' + ), + 'REGEXPS' => array( + 0 => array( + GESHI_SEARCH => "([^\w])'([^\\n\\r']*)'", + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => "\\1'", + GESHI_AFTER => "'" + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/mirc.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/mirc.php new file mode 100644 index 0000000..29faac2 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/mirc.php @@ -0,0 +1,156 @@ + 'mIRC Scripting', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'alias', 'menu', 'dialog', + ), + 2 => array( + 'if', 'elseif', 'else', 'while', 'return', 'goto', + ), + 3 => array( + 'action','ajinvite','alias','amsg','ame','anick','aop','auser', + 'avoice','auto','autojoin','away','background','ban','beep', + 'channel','clear','clearall','clipboard','close','closemsg','color', + 'copy','creq','ctcp','ctcpreply','ctcps','dcc','dde','ddeserver', + 'debug','describe','disable','disconnect','dlevel','dll','dns', + 'dqwindow','ebeeps','echo','editbox','emailaddr','enable','events', + 'exit','filter','findtext','finger','flash','flood','flush', + 'flushini', 'font','fsend','fserve','fullname','ghide','gload', + 'gmove','gopts','gplay','gpoint','gqreq','groups','gshow','gsize', + 'gstop','gtalk','gunload','guser','help','hop','ignore','invite', + 'join','kick','linesep','links','list','load','loadbuf','localinfo', + 'log','me','mdi','mkdir','mnick','mode','msg','names','nick','noop', + 'notice','notify','omsg','onotice','part','partall','pdcc', + 'perform','ping','play','pop','protect','pvoice','qmsg','qme', + 'query','queryrn','quit','raw','remini','remote','remove','rename', + 'enwin','resetidle','rlevel','rmdir','run','ruser','save','savebuf', + 'saveini','say','server','showmirc','sline','sound','speak','splay', + 'sreq','strip','time', + //'timer[N/name]', //Handled as a regular expression below ... + 'timers','timestamp','titlebar','tnick','tokenize','topic','ulist', + 'unload','updatenl','url','uwho','window','winhelp','write', + 'writeini','who','whois','whowas' + ) + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #994444;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #990000; font-weight: bold;', + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + ), + 'BRACKETS' => array( + 0 => 'color: #FF0000;', + ), + 'STRINGS' => array( + ), + 'NUMBERS' => array( + 0 => '', + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #FF0000;', + ), + 'REGEXPS' => array( + 0 => 'color: #000099;', + 1 => 'color: #990000;', + 2 => 'color: #888800;', + 3 => 'color: #888800;', + 4 => 'color: #000099;', + 5 => 'color: #000099;', + 6 => 'color: #990000; font-weight: bold;', + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://www.mirc.com/{FNAME}', + 4 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + 0 => '\$[a-zA-Z0-9]+', + 1 => '(%|&)[a-zA-Z0-9]+', + 2 => '(#|@)[a-zA-Z0-9]+', + 3 => '-[a-z\d]+', + 4 => '(on|ctcp) (!|@|&)?(\d|\*):[a-zA-Z]+:', + /*4 => array( + GESHI_SEARCH => '((on|ctcp) (!|@|&)?(\d|\*):(Action|Active|Agent|AppActive|Ban|Chat|Close|Connect|Ctcp|CtcpReply|DccServer|DeHelp|DeOp|DeVoice|Dialog|Dns|Error|Exit|FileRcvd|FileSent|GetFail|Help|Hotlink|Input|Invite|Join|KeyDown|KeyUp|Kick|Load|Logon|MidiEnd|Mode|Mp3End|Nick|NoSound|Notice|Notify|Op|Open|Part|Ping|Pong|PlayEnd|Quit|Raw|RawMode|SendFail|Serv|ServerMode|ServerOp|Signal|Snotice|Start|Text|Topic|UnBan|Unload|Unotify|User|Mode|Voice|Wallops|WaveEnd):)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'i', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ),*/ + 5 => 'raw (\d|\*):', + 6 => '/timer(?!s\b)[0-9a-zA-Z_]+', + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +if (isset($this) && is_a($this, 'GeSHi')) { + $this->set_numbers_highlighting(false); +} +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/mpasm.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/mpasm.php new file mode 100644 index 0000000..6c5f425 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/mpasm.php @@ -0,0 +1,158 @@ + 'Microchip Assembler', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /*Directive Language*/ + 4 => array( + 'CONSTANT', '#DEFINE', 'END', 'EQU', 'ERROR', 'ERROR-LEVEL', '#INCLUDE', 'LIST', + 'MESSG', 'NOLIST', 'ORG', 'PAGE', 'PROCESSOR', 'RADIX', 'SET', 'SPACE', 'SUBTITLE', + 'TITLE', '#UNDEFINE', 'VARIABLE', 'ELSE', 'ENDIF', 'ENDW', 'IF', 'IFDEF', 'IFNDEF', + 'WHILE', '__BADRAM', 'CBLOCK', '__CONFIG', 'DA', 'DATA', 'DB', 'DE', 'DT', 'DW', + 'ENDC', 'FILL', '__IDLOCS', '__MAXRAM', 'RES', 'ENDM', 'EXITM', 'EXPAND', 'LOCAL', + 'MACRO', 'NOEXPAND', 'BANKISEL', 'BANKSEL', 'CODE', 'EXTERN', 'GLOBAL', 'IDATA', + 'PAGESEL', 'UDATA', 'UDATA_ACS', 'UDATA_OVR', 'UDATA_SHR' + ), + /* 12&14-bit Specific Instruction Set*/ + 1 => array( + 'andlw', 'call', 'clrwdt', 'goto', 'iorlw', 'movlw', 'option', 'retlw', 'sleep', + 'tris', 'xorlw', 'addwf', 'andwf', 'clrf', 'clrw', 'comf', 'decf', 'decfsz', 'incf', + 'incfsz', 'iorwf', 'movf', 'movwf', 'nop', 'rlf', 'rrf', 'subwf', 'swapf', 'xorwf', + 'bcf', 'bsf', 'btfsc', 'btfss', + 'addlw', 'iorlw', 'retfie', 'return', 'sublw', 'xorlw', 'addcf', 'adddcf', 'b', 'bc', 'bdc', + 'bnc', 'bndc', 'bnz', 'bz', 'clrc', 'clrdc', 'clrz', 'lcall', 'lgoto', 'movfw', + 'negf', 'setc', 'setdc', 'setz', 'skpc', 'skpdc', 'skpnc', 'skpndc', 'skpnz', 'skpz', + 'subcf', 'subdcf', 'tstf' + ), + /* 16-bit Specific Instructiob Set */ + 2 => array ( + 'movfp', 'movlb', 'movlp', 'movpf', 'movwf', 'tablrd', 'tablwt', 'tlrd', 'tlwt', + 'addwfc', 'daw', 'mullw', 'negw', 'rlcf', 'rlncf', 'rrcf', 'rrncf', 'setf', 'subwfb', + 'btg', 'cpfseq', 'cpfsgt', 'cpfslt', 'dcfsnz', 'infsnz', 'tstfsz', 'lfsr', 'bnn', + 'bnov', 'bra', 'pop', 'push', 'rcall', 'reset' + ), + /* Registers */ + 3 => array( + 'INDF', 'TMR0', 'PCL', 'STATUS', 'FSR', 'PORTA', 'PORTB', 'PORTC', 'PORTD', 'PORTE', + 'PCLATH', 'INTCON', 'PIR1', 'PIR2', 'TMR1L', 'TMR1H', 'T1CON', 'TMR2', 'T2CON', 'TMR2L', + 'TMR2H', 'TMR0H', 'TMR0L', 'SSPBUF', 'SSPCON', 'CCPR1L', 'CCPR1H', 'CCP1CON', 'RCSTA', + 'TXREG', 'RCREG', 'CCPR2L', 'CCPR2H', 'CCP2CON', 'OPTION', 'TRISA', 'TRISB', 'TRISC', + 'TRISD', 'TRISE', 'PIE2', 'PIE1', 'PR2', 'SSPADD', 'SSPSTAT', 'TXSTA', 'SPBRG' + ), + /*Operands*/ + 5 => array( + 'high','low' + ) + ), + 'SYMBOLS' => array( + '[', ']', '(', ')' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00007f;', + 2 => 'color: #0000ff;', + 3 => 'color: #007f00;', + 4 => 'color: #46aa03; font-weight:bold;', + 5 => 'color: #7f0000;', + 6 => 'color: #7f0000;' + ), + 'COMMENTS' => array( + 1 => 'color: #adadad; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #7f007f;' + ), + 'NUMBERS' => array( + 0 => 'color: #ff0000;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + 0 => 'color: #ff0000;', + 1 => 'color: #ff0000;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + 0 => '[0-9a-fA-F]{1,32}[hH]', + 1 => '[01]{1,64}[bB]' + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/mysql.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/mysql.php new file mode 100644 index 0000000..143c532 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/mysql.php @@ -0,0 +1,181 @@ + 'MySQL', + 'COMMENT_SINGLE' => array(1 =>'--', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => 1, + 'QUOTEMARKS' => array("'", '"', ''), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + /* Mix */ + 'ALTER DATABASE', 'ALTER TABLE', 'CREATE DATABASE', 'CREATE INDEX', 'CREATE TABLE', 'DROP DATABASE', + 'DROP INDEX', 'DROP TABLE', 'RENAME TABLE', 'DELETE', 'DO', 'HANDLER', 'INSERT', 'LOAD DATA INFILE', + 'REPLACE', 'SELECT', 'TRUNCATE', 'UPDATE', 'DESCRIBE', 'USE', 'START TRANSACTION', 'COMMIT', 'ROLLBACK', + 'SAVEPOINT', 'ROLLBACK TO SAVEPOINT', 'LOCK TABLES', 'UNLOCK_TABLES', 'SET TRANACTIONS', 'SET', 'SHOW', + 'CREATE PROCEDURE', 'CREATE FUNCTION', 'ALTER PROCEDURE', 'ALTER FUNCTION', 'DROP PROCEDURE', 'DROP FUNCTION', + 'SHOW CREATE PROCEDURE', 'SHOW CREATE FUNCTION', 'SHOW PROCEDURE STATUS', 'SHOW FUNCTION STATUS', + 'CALL', 'BEGIN', 'END', 'DECLARE', 'CREATE ROUTINE', 'ALTER ROUTINE', 'CREATE', 'ALTER', 'DROP', + 'PRIMARY KEY', 'VALUES', 'INTO', 'FROM', + 'ANALYZE', 'BDB', 'BERKELEYDB', 'BTREE', 'BY', 'CASCADE', 'CHECK', 'COLUMN', 'COLUMNS', 'CONSTRAINT', + 'CROSS', 'DATABASES', 'DELAYED', 'DISTINCT', 'DISTINCTROW', 'ENCLOSED', 'ERRORS', 'ESCAPED', 'EXISTS', + 'EXPLAIN', 'FALSE', 'FIELDS', 'FORCE', 'FOREIGN', 'FULLTEXT', 'GEOMETRY', 'GRANT', 'GROUP', 'HASH', + 'HAVING', 'HELP', 'HIGH_PRIORITY', 'IGNORE', 'INNER', 'INNODB', 'INTERVAL', 'JOIN', 'KEYS', 'KILL', + 'LINES', 'LOW_PRIORITY', 'MASTER_SERVER_ID', 'MATCH', 'MIDDLEINT', 'MRG_MYISAM', 'NATURAL', 'OPTIMIZE', + 'OPTION', 'OPTIONALLY', 'ORDER', 'OUTER', 'OUTFILE', 'PRIVILEGES', 'PURGE', 'READ', 'REFERENCES', + 'REQUIRE', 'RESTRICT', 'RETURNS', 'REVOKE', 'RLIKE', 'RTREE', 'SOME', 'SONAME', 'SPATIAL', 'SQL_BIG_RESULT', + 'SQL_CALC_FOUND_ROWS', 'SQL_SMALL_RESULT', 'SSL', 'STARTING', 'STRAIGHT_JOIN', 'STRIPED', 'TERMINATED', + 'TRUE', 'TYPES', 'UNION', 'USAGE', 'USER_RESOURCES', 'USING', 'VARCHARACTER', 'WARNINGS', 'WHERE', 'WRITE', + /* Control Flow Functions */ + 'CASE', 'WHEN', 'THEN', 'ELSE', 'END', + /* String Functions */ + 'UNHEX', 'BIN', 'BIT_LENGTH', 'CHAR_LENGTH', 'CHARACTER_LENGTH', 'COMPRESS', 'CONCAT', + 'CONCAT_WS', 'CONV', 'ELT', 'EXPORT_SET', 'FIELD', 'FIND_IN_SET', 'FORMAT', 'HEX', + 'INSERT', 'INSTR', 'LCASE', 'LEFT', 'LENGTH', 'LOAD_FILE', 'LOCATE', 'LOWER', 'LPAD', + 'LTRIM', 'MAKE_SET', 'MID', 'OCT', 'OCTET_LENGTH', 'ORD', 'POSITION', 'QUOTE', 'REPEAT', + 'REPLACE', 'REVERSE', 'RIGHT', 'RPAD', 'RTRIM', 'SOUNDEX', 'SPACE', 'SUBSTRING', + 'SUBSTRING_INDEX', 'TRIM', 'UCASE', 'UPPER', 'UNCOMPRESS', 'UNCOMPRESSD_LENGTH', + 'MD5', 'SHA1', + /* Numeric Functions */ + 'ABS', 'ACOS', 'ASIN', 'ATAN', 'ATAN2', 'CEILING', 'CEIL', 'COS', 'COT', 'CRC32', 'DEGREES', + 'EXP', 'FLOOR', 'LN', 'LOG', 'LOG2', 'LOG10', 'MOD', 'PI', 'POW', 'POWER', 'RADIANS', 'RAND', + 'ROUND', 'SIGN', 'SIN', 'SQRT', 'TAN', 'TRUNCATE', + /* Date and Time Functions */ + 'ADDDATE', 'ADDTIME', 'CONVERT_TZ', 'CURDATE', 'CURRENT_DATE', 'CURTIME', 'CURRENT_TIME', + 'CURRENT_TIMESTAMP', 'DATEDIFF', 'DATE_ADD', 'DATE_SUB', 'DATE_FORMAT', 'DAY', + 'DAYNAME', 'DAYOFMONTH', 'DAYOFWEEK', 'DAYOFYEAR', 'EXTRACT', 'FROM_DAYS', 'FROM_UNIXTIME', + 'GET_FORMAT', 'LAST_DAY', 'LOCALTIME', 'LOCALTIMESTAMP', 'MAKEDATE', 'MAKETIME', + 'MICROSECOND', 'MONTHNAME', 'NOW', 'PERIOD_ADD', 'PERIOD_DIFF', 'QUARTER', + 'SECOND', 'SEC_TO_TIME', 'STR_TO_DATE', 'SUBDATE', 'SUBTIME', 'SYSDATE', 'TIME', 'TIMEDIFF', + 'TIMESTAMP', 'TIMESTAMPADD', 'TIMESTAMPDIFF', 'TIME_FORMAT', 'TIME_TO_SEC', 'TO_DAYS', + 'UNIX_TIMESTAMP', 'UTC_DATE', 'UTC_TIME', 'UTC_TIMESTAMP', 'WEEKDAY', 'WEEKOFYEAR', + 'YEARWEEK', + + ), + 2 => array( + 'INTEGER', 'SMALLINT', 'DECIMAL', 'NUMERIC', 'FLOAT', 'REAL', 'DOUBLE PRECISION', + 'DOUBLE', 'INT', 'DEC', 'BIT' ,'TINYINT', 'SMALLINT', 'MEDIUMINT', 'BIGINT', + 'DATETIME', 'DATE', 'TIMESTAMP', 'TIME', 'YEAR', + 'CHAR', 'VARCHAR', 'BINARY', 'CHARACTER VARYING', 'VARBINARY', 'TINYBLOB', 'TINYTEXT', + 'BLOB', 'TEXT','MEDIUMBLOB', 'MEDIUMTEXT', 'LONGBLOB', 'LONGTEXT', 'ENUM', 'SET', + 'SERIAL DEFAULT VALUE', 'SERIAL', 'FIXED' + ), + 3 => array( + 'ZEROFILL', 'NOT NULL', 'UNSIGNED', 'AUTO_INCREMENT', 'UNIQUE', 'NOT', 'NULL', 'CHARACTER SET', 'CHARSET', + 'ASCII', 'UNICODE', 'NATIONAL', 'BOTH', 'LEADING', 'TRAILING','DEFAULT' + ), + 4 => array( + 'MICROSECOND', 'SECOND', 'MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR', 'SECOND_MICROSECOND', + 'MINUTE_MICROSECOND', 'MINUTE_SECOND', 'HOUR_MICROSECOND', 'HOUR_SECOND', 'HOUR_MINUTE', 'DAY_MICROSECOND', + 'DAY_SECOND', 'DAY_MINUTE', 'DAY_HOUR', 'YEAR_MONTH' + ), + 5 => array( + 'OR', 'XOR', 'AND', 'NOT', 'BETWEEN', 'IS', 'LIKE', 'REGEXP', 'IN', 'DIV', + 'MOD', 'BINARY', 'COLLATE', 'LIMIT', 'OFFSET' + ), + ), + 'SYMBOLS' => array( + ':=', + '||', 'OR', 'XOR', + '&&', 'AND', + 'NOT', + 'BETWEEN', 'CASE', 'WHEN', 'THEN', 'ELSE', + '=', '<=>', '>=', '>', '<=', '<', '<>', '!=', 'IS', 'LIKE', 'REGEXP', 'IN', + '|', + '&', + '<<', '>>', + '-', '+', + '*', '/', 'DIV', '%', 'MOD', + '^', + '-', '~', + '!', + 'BINARY', 'COLLATE', + '(', ')', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #993333; font-weight: bold;', + 2 => 'color: #aa9933; font-weight: bold;', + 3 => 'color: #aa3399; font-weight: bold;', + 4 => 'color: #33aa99; font-weight: bold;', + 5 => 'color: #993333; font-weight: bold;' + ), + 'COMMENTS' => array( + 'MULTI' => 'color: #808080; font-style: italic;', + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/nsis.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/nsis.php new file mode 100644 index 0000000..bf8345a --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/nsis.php @@ -0,0 +1,352 @@ + 'NSIS', + 'COMMENT_SINGLE' => array(1 => ';', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'",'"','`'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + '!appendfile', '!addIncludeDir', '!addplugindir', '!cd', '!define', '!delfile', '!echo', '!else', + '!endif', '!error', '!execute', '!ifdef', '!ifmacrodef', '!ifmacrondef', '!ifndef', '!include', + '!insertmacro', '!macro', '!macroend', '!packhdr', '!tempfile', '!system', '!undef', '!verbose', + '!warning' + ), + 2 => array( + 'AddBrandingImage', 'AllowRootDirInstall', 'AutoCloseWindow', 'BGFont', + 'BGGradient', 'BrandingText', 'Caption', 'ChangeUI', 'CheckBitmap', 'CompletedText', 'ComponentText', + 'CRCCheck', 'DetailsButtonText', 'DirShow', 'DirText', 'DirVar', 'DirVerify', 'FileErrorText', + 'Function', 'FunctionEnd', 'Icon', 'InstallButtonText', 'InstallColors', 'InstallDir', + 'InstallDirRegKey', 'InstProgressFlags', 'InstType', 'LangString', 'LangStringUP', 'LicenseBkColor', + 'LicenseData', 'LicenseForceSelection', 'LicenseLangString', 'LicenseText', 'LoadLanguageFile', + 'MiscButtonText', 'Name', 'OutFile', 'Page', 'PageEx', 'PageExEnd', 'Section', + 'SectionEnd', 'SectionGroup', 'SectionGroupEnd', 'SetCompressor', 'SetFont', 'ShowInstDetails', + 'ShowUninstDetails', 'SilentInstall', 'SilentUnInstall', 'SpaceTexts', 'SubCaption', 'SubSection', + 'SubSectionEnd', 'UninstallButtonText', 'UninstallCaption', 'UninstallIcon', 'UninstallSubCaption', + 'UninstallText', 'UninstPage', 'Var', 'VIAddVersionKey', 'VIProductVersion', 'WindowIcon', 'XPStyle' + ), + 3 => array( + 'AddSize', 'AllowSkipFiles', 'AutoCloseWindow', 'FileBufSize', 'GetInstDirError', 'PageCallbacks', + 'SectionIn', 'SetCompress', 'SetCompressionLevel', 'SetCompressorDictSize', + 'SetDatablockOptimize', 'SetDateSave', 'SetOverwrite', 'SetPluginUnload' + ), + 4 => array( + 'Abort', 'BringToFront', 'Call', 'CallInstDLL', 'ClearErrors', 'CopyFiles','CreateDirectory', + 'CreateFont', 'CreateShortCut', 'Delete', 'DeleteINISec', 'DeleteINIStr', 'DeleteRegKey', + 'DeleteRegValue', 'DetailPrint', 'EnableWindow', 'EnumRegKey', 'EnumRegValue', 'Exch', 'Exec', + 'ExecShell', 'ExecWait', 'ExpandEnvStrings', 'File', 'FileClose', 'FileOpen', 'FileRead', + 'FileReadByte', 'FileSeek', 'FileWrite', 'FileWriteByte', 'FindClose', 'FindFirst', 'FindNext', + 'FindWindow', 'FlushINI', 'GetCurInstType', 'GetCurrentAddress', 'GetDlgItem', 'GetDLLVersion', + 'GetDLLVersionLocal', 'GetErrorLevel', 'GetFileTime', 'GetFileTimeLocal', 'GetFullPathName', + 'GetFunctionAddress', 'GetLabelAddress', 'GetTempFileName', 'GetWindowText', 'Goto', 'HideWindow', + 'IfAbort', 'IfErrors', 'IfFileExists', 'IfRebootFlag', 'IfSilent', 'InitPluginsDir', 'InstTypeGetText', + 'InstTypeSetText', 'IntCmp', 'IntCmpU', 'IntFmt', 'IntOp', 'IsWindow', 'LockWindow', 'LogSet', 'LogText', + 'MessageBox', 'Nop', 'Pop', 'Push', 'Quit', 'ReadEnvStr', 'ReadIniStr', 'ReadRegDWORD', 'ReadRegStr', + 'Reboot', 'RegDLL', 'Rename', 'ReserveFile', 'Return', 'RMDir', 'SearchPath', 'SectionGetFlags', + 'SectionGetInstTypes', 'SectionGetSize', 'SectionGetText', 'SectionSetFlags', 'SectionSetInstTypes', + 'SectionSetSize', 'SectionSetText', 'SendMessage', 'SetAutoClose', 'SetBrandingImage', 'SetCtlColors', + 'SetCurInstType', 'SetDetailsPrint', 'SetDetailsView', 'SetErrorLevel', 'SetErrors', 'SetFileAttributes', + 'SetOutPath', 'SetRebootFlag', 'SetShellVarContext', 'SetSilent', 'ShowWindow', 'Sleep', 'StrCmp', + 'StrCpy', 'StrLen', 'UnRegDLL', 'WriteINIStr', 'WriteRegBin', 'WriteRegDWORD', 'WriteRegExpandStr', + 'WriteRegStr', 'WriteUninstaller' + ), + 5 => array( + 'all', 'alwaysoff', 'ARCHIVE', 'auto', 'both', 'bzip2', 'checkbox', 'components', 'current', + 'custom', 'directory', 'false', 'FILE_ATTRIBUTE_ARCHIVE', 'FILE_ATTRIBUTE_HIDDEN', 'FILE_ATTRIBUTE_NORMAL', + 'FILE_ATTRIBUTE_OFFLINE', 'FILE_ATTRIBUTE_READONLY', 'FILE_ATTRIBUTE_SYSTEM,TEMPORARY', + 'FILE_ATTRIBUTE_TEMPORARY', 'force', 'HIDDEN', 'hide', 'HKCC', 'HKCR', 'HKCU', 'HKDD', 'HKEY_CLASSES_ROOT', + 'HKEY_CURRENT_CONFIG', 'HKEY_CURRENT_USER', 'HKEY_DYN_DATA', 'HKEY_LOCAL_MACHINE', 'HKEY_PERFORMANCE_DATA', + 'HKEY_USERS', 'HKLM', 'HKPD', 'HKU', 'IDABORT', 'IDCANCEL', 'IDIGNORE', 'IDNO', 'IDOK', 'IDRETRY', 'IDYES', + 'ifdiff', 'ifnewer', 'instfiles', 'lastused', 'leave', 'license', 'listonly', 'lzma', 'manual', + 'MB_ABORTRETRYIGNORE', 'MB_DEFBUTTON1', 'MB_DEFBUTTON2', 'MB_DEFBUTTON3', 'MB_DEFBUTTON4', + 'MB_ICONEXCLAMATION', 'MB_ICONINFORMATION', 'MB_ICONQUESTION', 'MB_ICONSTOP', 'MB_OK', 'MB_OKCANCEL', + 'MB_RETRYCANCEL', 'MB_RIGHT', 'MB_SETFOREGROUND', 'MB_TOPMOST', 'MB_YESNO', 'MB_YESNOCANCEL', 'nevershow', + 'none', 'normal', 'off', 'OFFLINE', 'on', 'radiobuttons', 'READONLY', 'RO', 'SHCTX', 'SHELL_CONTEXT', 'show', + 'silent', 'silentlog', 'SW_HIDE', 'SW_SHOWMAXIMIZED', 'SW_SHOWMINIMIZED', 'SW_SHOWNORMAL', 'SYSTEM', + 'textonly', 'true', 'try', 'uninstConfirm', 'zlib' + ), + 6 => array( + '/a', '/components', '/COMPONENTSONLYONCUSTOM', '/CUSTOMSTRING', '/e', '/FILESONLY', '/FINAL', '/gray', '/GLOBAL', + '/ifempty', '/IMGID', '/ITALIC', '/lang', '/NOCUSTOM', '/nonfatal', '/NOUNLOAD', '/oname', '/r', '/REBOOTOK', + '/RESIZETOFIT', '/SOLID', '/SD', '/SHORT', '/silent', '/SOLID', '/STRIKE', '/TIMEOUT', '/TRIMCENTER', '/TRIMLEFT', + '/TRIMRIGHT', '/UNDERLINE', '/windows', '/x' + ), + 7 => array( + '.onGUIEnd', '.onGUIInit', '.onInit', '.onInstFailed', '.onInstSuccess', '.onMouseOverSection', + '.onRebootFailed', '.onSelChange', '.onUserAbort', '.onVerifyInstDir', 'un.onGUIEnd', 'un.onGUIInit', + 'un.onInit', 'un.onRebootFailed', 'un.onUninstFailed', 'un.onUninstSuccess', 'un.onUserAbort' + ), + 8 => array( + 'MUI.nsh', '"${NSISDIR}\Contrib\Modern UI\System.nsh"', 'MUI_SYSVERSION', 'MUI_ICON', 'MUI_UNICON', + 'MUI_HEADERIMAGE', 'MUI_HEADERIMAGE_BITMAP', 'MUI_HEADERIMAGE_BITMAP_NOSTRETCH', 'MUI_HEADERIMAGE_BITMAP_RTL', + 'MUI_HEADERIMAGE_BITMAP_RTL_NOSTRETCH', 'MUI_HEADERIMAGE_UNBITMAP', 'MUI_HEADERIMAGE_UNBITMAP_NOSTRETCH', + 'MUI_HEADERIMAGE_UNBITMAP_RTL', 'MUI_HEADERIMAGE_UNBITMAP_RTL_NOSTRETCH', 'MUI_HEADERIMAGE_RIGHT', 'MUI_BGCOLOR', + 'MUI_UI', 'MUI_UI_HEADERIMAGE', 'MUI_UI_HEADERIMAGE_RIGHT', 'MUI_UI_COMPONENTSPAGE_SMALLDESC', + 'MUI_UI_COMPONENTSPAGE_NODESC', 'MUI_WELCOMEFINISHPAGE_BITMAP', 'MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH', + 'MUI_WELCOMEFINISHPAGE_INI', 'MUI_UNWELCOMEFINISHPAGE_BITMAP', 'MUI_UNWELCOMEFINISHPAGE_BITMAP_NOSTRETCH', + 'MUI_UNWELCOMEFINISHPAGE_INI', 'MUI_LICENSEPAGE_BGCOLOR', 'MUI_COMPONENTSPAGE_CHECKBITMAP', + 'MUI_COMPONENTSPAGE_SMALLDESC', 'MUI_COMPONENTSPAGE_NODESC', 'MUI_INSTFILESPAGE_COLORS', + 'MUI_INSTFILESPAGE_PROGRESSBAR', 'MUI_FINISHPAGE_NOAUTOCLOSE', 'MUI_UNFINISHPAGE_NOAUTOCLOSE', + 'MUI_ABORTWARNING', 'MUI_ABORTWARNING_TEXT', 'MUI_UNABORTWARNING', 'MUI_UNABORTWARNING_TEXT', + 'MUI_PAGE_WELCOME', 'MUI_PAGE_LICENSE', 'MUI_PAGE_COMPONENTS', 'MUI_PAGE_DIRECTORY', + 'MUI_PAGE_STARTMENU', 'MUI_PAGE_INSTFILES', 'MUI_PAGE_FINISH', 'MUI_UNPAGE_WELCOME', + 'MUI_UNPAGE_CONFIRM', 'MUI_UNPAGE_LICENSE', 'MUI_UNPAGE_COMPONENTS', 'MUI_UNPAGE_DIRECTORY', + 'MUI_UNPAGE_INSTFILES', 'MUI_UNPAGE_FINISH', 'MUI_PAGE_HEADER_TEXT', 'MUI_PAGE_HEADER_SUBTEXT', + 'MUI_WELCOMEPAGE_TITLE', 'MUI_WELCOMEPAGE_TITLE_3LINES', 'MUI_WELCOMEPAGE_TEXT', + 'MUI_LICENSEPAGE_TEXT_TOP', 'MUI_LICENSEPAGE_TEXT_BOTTOM', 'MUI_LICENSEPAGE_BUTTON', + 'MUI_LICENSEPAGE_CHECKBOX', 'MUI_LICENSEPAGE_CHECKBOX_TEXT', 'MUI_LICENSEPAGE_RADIOBUTTONS', + 'MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT', 'MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE', + 'MUI_COMPONENTSPAGE_TEXT_TOP', 'MUI_COMPONENTSPAGE_TEXT_COMPLIST', 'MUI_COMPONENTSPAGE_TEXT_INSTTYPE', + 'MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE', 'MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO', + 'MUI_DIRECTORYPAGE_TEXT_TOP', 'MUI_DIRECTORYPAGE_TEXT_DESTINATION', 'MUI_DIRECTORYPAGE_VARIABLE', + 'MUI_DIRECTORYPAGE_VERIFYONLEAVE', 'MUI_STARTMENU_WRITE_BEGIN', 'MUI_STARTMENU_WRITE_END', + 'MUI_STARTMENUPAGE_TEXT_TOP', 'MUI_STARTMENUPAGE_TEXT_CHECKBOX', 'MUI_STARTMENUPAGE_DEFAULTFOLDER', + 'MUI_STARTMENUPAGE_NODISABLE', 'MUI_STARTMENUPAGE_REGISTRY_ROOT', 'MUI_STARTMENUPAGE_REGISTRY_KEY', + 'MUI_STARTMENUPAGE_REGISTRY_VALUENAME', 'MUI_INSTFILESPAGE_FINISHHEADER_TEXT', + 'MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT', 'MUI_INSTFILESPAGE_ABORTHEADER_TEXT', + 'MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT', 'MUI_FINISHPAGE_TITLE', 'MUI_FINISHPAGE_TITLE_3LINES', + 'MUI_FINISHPAGE_TEXT', 'MUI_FINISHPAGE_TEXT_LARGE', 'MUI_FINISHPAGE_BUTTON', + 'MUI_FINISHPAGE_TEXT_REBOOT', 'MUI_FINISHPAGE_TEXT_REBOOTNOW', 'MUI_FINISHPAGE_TEXT_REBOOTLATER', + 'MUI_FINISHPAGE_RUN', 'MUI_FINISHPAGE_RUN_TEXT', 'MUI_FINISHPAGE_RUN_PARAMETERS', + 'MUI_FINISHPAGE_RUN_NOTCHECKED', 'MUI_FINISHPAGE_RUN_FUNCTION', 'MUI_FINISHPAGE_SHOWREADME', + 'MUI_FINISHPAGE_SHOWREADME_TEXT', 'MUI_FINISHPAGE_SHOWREADME_NOTCHECKED', + 'MUI_FINISHPAGE_SHOWREADME_FUNCTION', 'MUI_FINISHPAGE_LINK', 'MUI_FINISHPAGE_LINK_LOCATION', + 'MUI_FINISHPAGE_LINK_COLOR', 'MUI_FINISHPAGE_NOREBOOTSUPPORT', 'MUI_UNCONFIRMPAGE_TEXT_TOP', + 'MUI_UNCONFIRMPAGE_TEXT_LOCATION', 'MUI_LANGUAGE', 'MUI_LANGDLL_DISPLAY', + 'MUI_LANGDLL_REGISTRY_ROOT', 'MUI_LANGDLL_REGISTRY_KEY', 'MUI_LANGDLL_REGISTRY_VALUENAME', + 'MUI_LANGDLL_WINDOWTITLE', 'MUI_LANGDLL_INFO', 'MUI_LANGDLL_ALWAYSSHOW', + 'MUI_RESERVEFILE_INSTALLOPTIONS', 'MUI_RESERVEFILE_LANGDLL', 'MUI_FUNCTION_DESCRIPTION_BEGIN', + 'MUI_DESCRIPTION_TEXT', 'MUI_FUNCTION_DESCRIPTION_END', 'MUI_INSTALLOPTIONS_EXTRACT', + 'MUI_INSTALLOPTIONS_EXTRACT_AS', 'MUI_HEADER_TEXT', 'MUI_INSTALLOPTIONS_DISPLAY', + 'MUI_INSTALLOPTIONS_INITDIALOG', 'MUI_INSTALLOPTIONS_SHOW', + 'MUI_INSTALLOPTIONS_DISPLAY_RETURN', 'MUI_INSTALLOPTIONS_SHOW_RETURN', + 'MUI_INSTALLOPTIONS_READ', 'MUI_INSTALLOPTIONS_WRITE', + 'MUI_CUSTOMFUNCTION_GUIINIT', 'MUI_CUSTOMFUNCTION_GUIINIT', + 'MUI_CUSTOMFUNCTION_UNGUIINIT', 'MUI_CUSTOMFUNCTION_ABORT', 'MUI_CUSTOMFUNCTION_UNABORT', + 'MUI_PAGE_CUSTOMFUNCTION_PRE', 'MUI_PAGE_CUSTOMFUNCTION_SHOW', 'MUI_PAGE_CUSTOMFUNCTION_LEAVE', + 'MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INIT' + ), + 9 => array( + 'LogicLib.nsh', '${LOGICLIB}', 'LOGICLIB_STRCMP', 'LOGICLIB_INT64CMP', 'LOGICLIB_SECTIONCMP', '${If}', '${Unless}', + '${ElseIf}', '${ElseUnless}', '${Else}', '${EndIf}', '${EndUnless}', '${AndIf}', '${AndUnless}', + '${OrIf}', '${OrUnless}', '${IfThen}', '${IfCmd}', '${Select}', '${Case2}', '${Case3}', + '${Case4}', '${Case5}', '${CaseElse}', '${Default}', '${EndSelect}', '${Switch}', + '${Case}', '${EndSwitch}', '${Do}', '${DoWhile}', '${UntilWhile}', '${Continue}', '${Break}', + '${Loop}', '${LoopWhile}', '${LoopUntil}', '${While}', '${ExitWhile}', '${EndWhile}', '${For}', + '${ForEach}', '${ExitFor}', '${Next}', '${Abort}', '${Errors}', '${RebootFlag}', '${Silent}', + '${FileExists}', '${Cmd}', '${SectionIsSelected}', '${SectionIsSectionGroup}', + '${SectionIsSectionGroupEnd}', '${SectionIsBold}', '${SectionIsReadOnly}', + '${SectionIsExpanded}', '${SectionIsPartiallySelected}' + ), + 10 => array( + 'StrFunc.nsh', '${STRFUNC}', '${StrCase}', '${StrClb}', '${StrIOToNSIS}', '${StrLoc}', '${StrNSISToIO}', '${StrRep}', + '${StrSort}', '${StrStr}', '${StrStrAdv}', '${StrTok}', '${StrTrimNewLines}' + ), + 11 => array( + 'UpgradeDLL.nsh', 'UPGRADEDLL_INCLUDED', 'UpgradeDLL' + ), + 12 => array( + 'Sections.nsh', 'SECTIONS_INCLUDED', '${SF_SELECTED}', '${SF_SECGRP}', '${SF_SUBSEC}', '${SF_SECGRPEND}', + '${SF_SUBSECEND}', '${SF_BOLD}', '${SF_RO}', '${SF_EXPAND}', '${SF_PSELECTED}', '${SF_TOGGLED}', + '${SF_NAMECHG}', '${SECTION_OFF}', 'SelectSection', 'UnselectSection', 'ReverseSection', + 'StartRadioButtons', 'RadioButton', 'EndRadioButtons', '${INSTTYPE_1}', '${INSTTYPE_1}', '${INSTTYPE_2}', + '${INSTTYPE_3}', '${INSTTYPE_4}', '${INSTTYPE_5}', '${INSTTYPE_6}', '${INSTTYPE_7}', '${INSTTYPE_8}', + '${INSTTYPE_9}', '${INSTTYPE_10}', '${INSTTYPE_11}', '${INSTTYPE_12}', '${INSTTYPE_13}', '${INSTTYPE_14}', + '${INSTTYPE_15}', '${INSTTYPE_16}', '${INSTTYPE_17}', '${INSTTYPE_18}', '${INSTTYPE_19}', '${INSTTYPE_20}', + '${INSTTYPE_21}', '${INSTTYPE_22}', '${INSTTYPE_23}', '${INSTTYPE_24}', '${INSTTYPE_25}', '${INSTTYPE_26}', + '${INSTTYPE_27}', '${INSTTYPE_28}', '${INSTTYPE_29}', '${INSTTYPE_30}', '${INSTTYPE_31}', '${INSTTYPE_32}', + 'SetSectionInInstType', 'ClearSectionInInstType', 'SetSectionFlag', 'ClearSectionFlag', 'SectionFlagIsSet' + ), + 13 => array( + 'Colors.nsh', 'WHITE', 'BLACK', 'YELLOW', 'RED', 'GREEN', 'BLUE', 'MAGENTA', 'CYAN', 'rgb2hex' + ), + 14 => array( + 'FileFunc.nsh', '${Locate}', '${GetSize}', '${DriveSpace}', '${GetDrives}', '${GetTime}', '${GetFileAttributes}', '${GetFileVersion}', '${GetExeName}', '${GetExePath}', '${GetParameters}', '${GetOptions}', '${GetRoot}', '${GetParent}', '${GetFileName}', '${GetBaseName}', '${GetFileExt}', '${BannerTrimPath}', '${DirState}', '${RefreshShellIcons}' + ), + 15 => array( + 'TextFunc.nsh', '${LineFind}', '${LineRead}', '${FileReadFromEnd}', '${LineSum}', '${FileJoin}', '${TextCompare}', '${ConfigRead}', '${ConfigWrite}', '${FileRecode}', '${TrimNewLines}' + ), + 16 => array( + 'WordFunc.nsh', '${WordFind}', '${WordFind2X}', '${WordFind3X}', '${WordReplace}', '${WordAdd}', '${WordInsert}', '${StrFilter}', '${VersionCompare}', '${VersionConvert}' + ) + ), + 'SYMBOLS' => array( + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false, + 8 => false, + 9 => false, + 10 => false, + 11 => false, + 12 => false, + 13 => false, + 14 => false, + 15 => false, + 16 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000066; font-weight:bold;', + 2 => 'color: #000066;', + 3 => 'color: #003366;', + 4 => 'color: #000099;', + 5 => 'color: #ff6600;', + 6 => 'color: #ff6600;', + 7 => 'color: #006600;', + 8 => 'color: #006600;', + 9 => 'color: #006600;', + 10 => 'color: #006600;', + 11 => 'color: #006600;', + 12 => 'color: #006600;', + 13 => 'color: #006600;', + 14 => 'color: #006600;', + 15 => 'color: #006600;', + 16 => 'color: #006600;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 2 => 'color: #666666; font-style: italic;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #660066; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => '' + ), + 'STRINGS' => array( + 0 => 'color: #660066;' + ), + 'NUMBERS' => array( + 0 => '' + ), + 'METHODS' => array( + 0 => '' + ), + 'SYMBOLS' => array( + 0 => '' + ), + 'REGEXPS' => array( + 0 => 'color: #660000;', + 1 => 'color: #660000;', + 2 => 'color: #660000;', + 3 => 'color: #660000;', + 4 => 'color: #660000;', + 5 => 'color: #660000;', + 6 => 'color: #660000;', + 7 => 'color: #000099;', + 8 => 'color: #003399;' + ), + 'SCRIPT' => array( + 0 => '' + ) + ), + 'URLS' => array( + 0 => '', + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '', + 9 => '', + 10 => '', + 11 => '', + 12 => '', + 13 => '', + 14 => '', + 15 => '', + 16 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + 0 => '\$\$', + 1 => '\$\\r', + 2 => '\$\\n', + 3 => '\$\\t', + 4 => '\$[a-zA-Z0-9_]+', + 5 => '\$\{.{1,256}\}', + 6 => '\$\\\(.{1,256}\\\)', + 7 => array( + GESHI_SEARCH => '([^:/\\\*\?\"\<\>\|\s]*?)(::)([^:/\\\*\?\"\<\>\|\s]*?)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '\\2\\3' + ), + 8 => array( + GESHI_SEARCH => '([^:/\\\*\?\"\<\>\|\s]*?)(::)([^:/\\\*\?\"\<\>\|]*?\s)', + GESHI_REPLACE => '\\3', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1\\2', + GESHI_AFTER => '' + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/objc.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/objc.php new file mode 100644 index 0000000..9adf732 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/objc.php @@ -0,0 +1,239 @@ + 'Objective C', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'if', 'return', 'while', 'case', 'continue', 'default', + 'do', 'else', 'for', 'switch', 'goto' + ), + 2 => array( + 'NULL', 'false', 'break', 'true', 'enum', 'nil', 'Nil', 'errno', 'EDOM', + 'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG', + 'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG', + 'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP', + 'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP', + 'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN', + 'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN', + 'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT', + 'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR', + 'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam', 'NULL', + 'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX', 'stdin', 'stdout', 'stderr', + 'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC' + ), + 3 => array( + 'printf', 'fprintf', 'snprintf', 'sprintf', 'assert', + 'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint', + 'ispunct', 'isspace', 'ispunct', 'isupper', 'isxdigit', 'tolower', 'toupper', + 'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp', + 'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2', + 'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp', 'asin', 'acos', 'atan', 'atan2', + 'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen', + 'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf', + 'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf', + 'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc', + 'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind', + 'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs', + 'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc', + 'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv', + 'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat', + 'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn', + 'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy', + 'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime', + 'asctime', 'ctime', 'gmtime', 'localtime', 'strftime' + ), + 4 => array( // Data types: + 'auto', 'char', 'const', 'double', 'float', 'int', 'long', + 'register', 'short', 'signed', 'sizeof', 'static', 'string', 'struct', + 'typedef', 'union', 'unsigned', 'void', 'volatile', 'extern', 'jmp_buf', + 'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t', + 'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm', + // OpenStep/GNUstep/Cocoa: + 'SEL', 'id', 'NSRect', 'NSRange', 'NSPoint', 'NSZone', 'Class', 'IMP', 'BOOL', + // OpenStep/GNUstep/Cocoa @identifiers + '@selector', '@class', '@protocol', '@interface', '@implementation', '@end', + '@private', '@protected', '@public', '@try', '@throw', '@catch', '@finally', + '@encode', '@defs', '@synchronized' + ), + 5 => array( // OpenStep/GNUstep/Cocoa Foundation + 'NSAppleEventDescriptor', 'NSNetService', 'NSAppleEventManager', + 'NSNetServiceBrowser', 'NSAppleScript', 'NSNotification', 'NSArchiver', + 'NSNotificationCenter', 'NSArray', 'NSNotificationQueue', 'NSAssertionHandler', + 'NSNull', 'NSAttributedString', 'NSNumber', 'NSAutoreleasePool', + 'NSNumberFormatter', 'NSBundle', 'NSObject', 'NSCachedURLResponse', + 'NSOutputStream', 'NSCalendarDate', 'NSPipe', 'NSCharacterSet', 'NSPort', + 'NSClassDescription', 'NSPortCoder', 'NSCloneCommand', 'NSPortMessage', + 'NSCloseCommand', 'NSPortNameServer', 'NSCoder', 'NSPositionalSpecifier', + 'NSConditionLock', 'NSProcessInfo', 'NSConnection', 'NSPropertyListSerialization', + 'NSCountCommand', 'NSPropertySpecifier', 'NSCountedSet', 'NSProtocolChecker', + 'NSCreateCommand', 'NSProxy', 'NSData', 'NSQuitCommand', 'NSDate', + 'NSRandomSpecifier', 'NSDateFormatter', 'NSRangeSpecifier', 'NSDecimalNumber', + 'NSRecursiveLock', 'NSDecimalNumberHandler', 'NSRelativeSpecifier', + 'NSDeleteCommand', 'NSRunLoop', 'NSDeserializer', 'NSScanner', 'NSDictionary', + 'NSScriptClassDescription', 'NSDirectoryEnumerator', 'NSScriptCoercionHandler', + 'NSDistantObject', 'NSScriptCommand', 'NSDistantObjectRequest', + 'NSScriptCommandDescription', 'NSDistributedLock', 'NSScriptExecutionContext', + 'NSDistributedNotificationCenter', 'NSScriptObjectSpecifier', 'NSEnumerator', + 'NSScriptSuiteRegistry', 'NSError', 'NSScriptWhoseTest', 'NSException', + 'NSSerializer', 'NSExistsCommand', 'NSSet', 'NSFileHandle', 'NSSetCommand', + 'NSFileManager', 'NSSocketPort', 'NSFormatter', 'NSSocketPortNameServer', + 'NSGetCommand', 'NSSortDescriptor', 'NSHost', 'NSSpecifierTest', 'NSHTTPCookie', + 'NSSpellServer', 'NSHTTPCookieStorage', 'NSStream', 'NSHTTPURLResponse', + 'NSString', 'NSIndexSet', 'NSTask', 'NSIndexSpecifier', 'NSThread', + 'NSInputStream', 'NSTimer', 'NSInvocation', 'NSTimeZone', 'NSKeyedArchiver', + 'NSUnarchiver', 'NSKeyedUnarchiver', 'NSUndoManager', 'NSLock', + 'NSUniqueIDSpecifier', 'NSLogicalTest', 'NSURL', 'NSMachBootstrapServer', + 'NSURLAuthenticationChallenge', 'NSMachPort', 'NSURLCache', 'NSMessagePort', + 'NSURLConnection', 'NSMessagePortNameServer', 'NSURLCredential', + 'NSMethodSignature', 'NSURLCredentialStorage', 'NSMiddleSpecifier', + 'NSURLDownload', 'NSMoveCommand', 'NSURLHandle', 'NSMutableArray', + 'NSURLProtectionSpace', 'NSMutableAttributedString', 'NSURLProtocol', + 'NSMutableCharacterSet', 'NSURLRequest', 'NSMutableData', 'NSURLResponse', + 'NSMutableDictionary', 'NSUserDefaults', 'NSMutableIndexSet', 'NSValue', + 'NSMutableSet', 'NSValueTransformer', 'NSMutableString', 'NSWhoseSpecifier', + 'NSMutableURLRequest', 'NSXMLParser', 'NSNameSpecifier' + ), + 6 => array( // OpenStep/GNUstep/Cocoa AppKit + 'NSActionCell', 'NSOpenGLPixelFormat', 'NSAffineTransform', 'NSOpenGLView', + 'NSAlert', 'NSOpenPanel', 'NSAppleScript Additions', 'NSOutlineView', + 'NSApplication', 'NSPageLayout', 'NSArrayController', 'NSPanel', + 'NSATSTypesetter', 'NSParagraphStyle', 'NSPasteboard', 'NSBezierPath', + 'NSPDFImageRep', 'NSBitmapImageRep', 'NSPICTImageRep', 'NSBox', 'NSPopUpButton', + 'NSBrowser', 'NSPopUpButtonCell', 'NSBrowserCell', 'NSPrinter', 'NSPrintInfo', + 'NSButton', 'NSPrintOperation', 'NSButtonCell', 'NSPrintPanel', 'NSCachedImageRep', + 'NSProgressIndicator', 'NSCell', 'NSQuickDrawView', 'NSClipView', 'NSResponder', + 'NSRulerMarker', 'NSColor', 'NSRulerView', 'NSColorList', 'NSSavePanel', + 'NSColorPanel', 'NSScreen', 'NSColorPicker', 'NSScroller', 'NSColorWell', + 'NSScrollView', 'NSComboBox', 'NSSearchField', 'NSComboBoxCell', + 'NSSearchFieldCell', 'NSControl', 'NSSecureTextField', 'NSController', + 'NSSecureTextFieldCell', 'NSCursor', 'NSSegmentedCell', 'NSCustomImageRep', + 'NSSegmentedControl', 'NSDocument', 'NSShadow', 'NSDocumentController', + 'NSSimpleHorizontalTypesetter', 'NSDrawer', 'NSSlider', 'NSEPSImageRep', + 'NSSliderCell', 'NSEvent', 'NSSound', 'NSFileWrapper', 'NSSpeechRecognizer', + 'NSFont', 'NSSpeechSynthesizer', 'NSFontDescriptor', 'NSSpellChecker', + 'NSFontManager', 'NSSplitView', 'NSFontPanel', 'NSStatusBar', 'NSForm', + 'NSStatusItem', 'NSFormCell', 'NSStepper', 'NSGlyphGenerator', 'NSStepperCell', + 'NSGlyphInfo', 'NSGraphicsContext', 'NSTableColumn', 'NSHelpManager', + 'NSTableHeaderCell', 'NSImage', 'NSTableHeaderView', 'NSImageCell', 'NSTableView', + 'NSImageRep', 'NSTabView', 'NSImageView', 'NSTabViewItem', 'NSInputManager', + 'NSText', 'NSInputServer', 'NSTextAttachment', 'NSLayoutManager', + 'NSTextAttachmentCell', 'NSMatrix', 'NSTextContainer', 'NSMenu', 'NSTextField', + 'NSMenuItem', 'NSTextFieldCell', 'NSMenuItemCell', 'NSTextStorage', 'NSMenuView', + 'NSTextTab', 'NSMovie', 'NSTextView', 'NSMovieView', 'NSToolbar', 'NSToolbarItem', + 'NSMutableParagraphStyle', 'NSTypesetter', 'NSNib', 'NSNibConnector', + 'NSUserDefaultsController', 'NSNibControlConnector', 'NSView', + 'NSNibOutletConnector', 'NSWindow', 'NSObjectController', 'NSWindowController', + 'NSOpenGLContext', 'NSWorkspace', 'NSOpenGLPixelBuffer' + ) + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000ff;', + 2 => 'color: #0000ff;', + 3 => 'color: #0000dd;', + 4 => 'color: #0000ff;', + 5 => 'color: #0000ff;', + 6 => 'color: #0000ff;' + ), + 'COMMENTS' => array( + 1 => 'color: #ff0000;', + 2 => 'color: #339900;', + 'MULTI' => 'color: #ff0000; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #666666; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #002200;' + ), + 'STRINGS' => array( + 0 => 'color: #666666;' + ), + 'NUMBERS' => array( + 0 => 'color: #0000dd;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #002200;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAME}.html', + 4 => '', + 5 => 'http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ObjC_classic/Classes/{FNAME}.html', + 6 => 'http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/Classes/{FNAME}.html' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/ocaml-brief.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/ocaml-brief.php new file mode 100644 index 0000000..13d90c9 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/ocaml-brief.php @@ -0,0 +1,112 @@ + 'OCaml', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array('(*' => '*)'), + 'CASE_KEYWORDS' => 0, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => "", + 'KEYWORDS' => array( + /* main OCaml keywords */ + 1 => array( + 'and', 'As', 'asr', 'begin', 'Class', 'Closed', 'constraint', 'do', 'done', 'downto', 'else', + 'end', 'exception', 'external', 'failwith', 'false', 'flush', 'for', 'fun', 'function', 'functor', + 'if', 'in', 'include', 'inherit', 'incr', 'land', 'let', 'load', 'los', 'lsl', 'lsr', 'lxor', + 'match', 'method', 'mod', 'module', 'mutable', 'new', 'not', 'of', 'open', 'option', 'or', 'parser', + 'private', 'ref', 'rec', 'raise', 'regexp', 'sig', 'struct', 'stdout', 'stdin', 'stderr', 'then', + 'to', 'true', 'try', 'type', 'val', 'virtual', 'when', 'while', 'with' + ) + ), + /* highlighting symbols is really important in OCaml */ + 'SYMBOLS' => array( + ';', '!', ':', '.', '=', '%', '^', '*', '-', '/', '+', + '>', '<', '(', ')', '[', ']', '&', '|', '#', "'" + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #06c; font-weight: bold;' /* nice blue */ + ), + 'COMMENTS' => array( + 'MULTI' => 'color: #5d478b; font-style: italic;' /* light purple */ + ), + 'ESCAPE_CHAR' => array( + ), + 'BRACKETS' => array( + 0 => 'color: #6c6;' + ), + 'STRINGS' => array( + 0 => 'color: #3cb371;' /* nice green */ + ), + 'NUMBERS' => array( + 0 => 'color: #c6c;' /* pink */ + ), + 'METHODS' => array( + 1 => 'color: #060;' /* dark green */ + ), + 'REGEXPS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #a52a2a;' /* maroon */ + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/ocaml.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/ocaml.php new file mode 100644 index 0000000..70a9928 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/ocaml.php @@ -0,0 +1,161 @@ + 'OCaml', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array('(*' => '*)'), + 'CASE_KEYWORDS' => 0, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => "", + 'KEYWORDS' => array( + /* main OCaml keywords */ + 1 => array( + 'and', 'As', 'asr', 'begin', 'Class', 'Closed', 'constraint', 'do', 'done', 'downto', 'else', + 'end', 'exception', 'external', 'failwith', 'false', 'flush', 'for', 'fun', 'function', 'functor', + 'if', 'in', 'include', 'inherit', 'incr', 'land', 'let', 'load', 'los', 'lsl', 'lsr', 'lxor', + 'match', 'method', 'mod', 'module', 'mutable', 'new', 'not', 'of', 'open', 'option', 'or', 'parser', + 'private', 'ref', 'rec', 'raise', 'regexp', 'sig', 'struct', 'stdout', 'stdin', 'stderr', 'then', + 'to', 'true', 'try', 'type', 'val', 'virtual', 'when', 'while', 'with' + ), + /* define names of main librarys, so we can link to it */ + 2 => array( + 'Arg', 'Arith_status', 'Array', 'ArrayLabels', 'Big_int', 'Bigarray', 'Buffer', 'Callback', + 'CamlinternalOO', 'Char', 'Complex', 'Condition', 'Dbm', 'Digest', 'Dynlink', 'Event', + 'Filename', 'Format', 'Gc', 'Genlex', 'Graphics', 'GraphicsX11', 'Hashtbl', 'Int32', 'Int64', + 'Lazy', 'Lexing', 'List', 'ListLabels', 'Map', 'Marshal', 'MoreLabels', 'Mutex', 'Nativeint', + 'Num', 'Obj', 'Oo', 'Parsing', 'Pervasives', 'Printexc', 'Printf', 'Queue', 'Random', 'Scanf', + 'Set', 'Sort', 'Stack', 'StdLabels', 'Str', 'Stream', 'String', 'StringLabels', 'Sys', 'Thread', + 'ThreadUnix', 'Tk' + ), + /* just link to the Pervasives functions library, cause it's the default opened library when starting OCaml */ + 3 => array( + 'raise', 'invalid_arg', 'failwith', 'compare', 'min', 'max', 'succ', 'pred', 'mod', 'abs', + 'max_int', 'min_int', 'sqrt', 'exp', 'log', 'log10', 'cos', 'sin', 'tan', 'acos', 'asin', + 'atan', 'atan2', 'cosh', 'sinh', 'tanh', 'ceil', 'floor', 'abs_float', 'mod_float', 'frexp', + 'ldexp', 'modf', 'float', 'float_of_int', 'truncate', 'int_of_float', 'infinity', 'nan', + 'max_float', 'min_float', 'epsilon_float', 'classify_float', 'int_of_char', 'char_of_int', + 'ignore', 'string_of_bool', 'bool_of_string', 'string_of_int', 'int_of_string', + 'string_of_float', 'float_of_string', 'fst', 'snd', 'stdin', 'stdout', 'stderr', 'print_char', + 'print_string', 'print_int', 'print_float', 'print_endline', 'print_newline', 'prerr_char', + 'prerr_string', 'prerr_int', 'prerr_float', 'prerr_endline', 'prerr_newline', 'read_line', + 'read_int', 'read_float', 'open_out', 'open_out_bin', 'open_out_gen', 'flush', 'flush_all', + 'output_char', 'output_string', 'output', 'output_byte', 'output_binary_int', 'output_value', + 'seek_out', 'pos_out', 'out_channel_length', 'close_out', 'close_out_noerr', 'set_binary_mode_out', + 'open_in', 'open_in_bin', 'open_in_gen', 'input_char', 'input_line', 'input', 'really_input', + 'input_byte', 'input_binary_int', 'input_value', 'seek_in', 'pos_in', 'in_channel_length', + 'close_in', 'close_in_noerr', 'set_binary_mode_in', 'incr', 'decr', 'string_of_format', + 'format_of_string', 'exit', 'at_exit' + ), + /* here Pervasives Types */ + 4 => array ( + 'fpclass', 'in_channel', 'out_channel', 'open_flag', 'Sys_error', 'ref', 'format' + ), + /* finally Pervasives Exceptions */ + 5 => array ( + 'Exit', 'Invalid_Argument', 'Failure', 'Division_by_zero' + ) + ), + /* highlighting symbols is really important in OCaml */ + 'SYMBOLS' => array( + ';', '!', ':', '.', '=', '%', '^', '*', '-', '/', '+', + '>', '<', '(', ')', '[', ']', '&', '|', '#', "'" + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => true, /* functions name are case seinsitive */ + 3 => true, /* types name too */ + 4 => true /* finally exceptions too */ + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #06c; font-weight: bold;' /* nice blue */ + ), + 'COMMENTS' => array( + 'MULTI' => 'color: #5d478b; font-style: italic;' /* light purple */ + ), + 'ESCAPE_CHAR' => array( + ), + 'BRACKETS' => array( + 0 => 'color: #6c6;' + ), + 'STRINGS' => array( + 0 => 'color: #3cb371;' /* nice green */ + ), + 'NUMBERS' => array( + 0 => 'color: #c6c;' /* pink */ + ), + 'METHODS' => array( + 1 => 'color: #060;' /* dark green */ + ), + 'REGEXPS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #a52a2a;' /* maroon */ + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + /* some of keywords are Pervasives functions (land, lxor, asr, ...) */ + 1 => '', + /* link to the wanted library */ + 2 => 'http://caml.inria.fr/pub/docs/manual-ocaml/libref/{FNAME}.html', + /* link to Pervasives functions */ + 3 => 'http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html#VAL{FNAME}', + /* link to Pervasives type */ + 4 => 'http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html#TYPE{FNAME}', + /* link to Pervasives exceptions */ + 5 => 'http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html#EXCEPTION{FNAME}' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/oobas.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/oobas.php new file mode 100644 index 0000000..f3e5973 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/oobas.php @@ -0,0 +1,130 @@ + 'OpenOffice.org Basic', + 'COMMENT_SINGLE' => array(1 => "'"), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'dim','private','public','global','as','if','redim','true','set', + 'byval', + 'false','bool','double','integer','long','object','single','variant', + 'msgbox','print','inputbox','green','blue','red','qbcolor', + 'rgb','open','close','reset','freefile','get','input','line', + 'put','write','loc','seek','eof','lof','chdir','chdrive', + 'curdir','dir','fileattr','filecopy','filedatetime','fileexists', + 'filelen','getattr','kill','mkdir','name','rmdir','setattr', + 'dateserial','datevalue','day','month','weekday','year','cdatetoiso', + 'cdatefromiso','hour','minute','second','timeserial','timevalue', + 'date','now','time','timer','erl','err','error','on','error','goto','resume', + 'and','eqv','imp','not','or','xor','mod','','atn','cos','sin','tan','log', + 'exp','rnd','randomize','sqr','fix','int','abs','sgn','hex','oct', + 'it','then','else','select','case','iif','do','loop','for','next', + 'while','wend','gosub','return','goto','on','goto','call','choose','declare', + 'end','exit','freelibrary','function','rem','stop','sub','switch','with', + 'cbool','cdate','cdbl','cint','clng','const','csng','cstr','defbool', + 'defdate','defdbl','defint','deflng','asc','chr','str','val','cbyte', + 'space','string','format','lcase','left','lset','ltrim','mid','right', + 'rset','rtrim','trim','ucase','split','join','converttourl','convertfromurl', + 'instr','len','strcomp','beep','shell','wait','getsystemticks','environ', + 'getsolarversion','getguitype','twipsperpixelx','twipsperpixely', + 'createunostruct','createunoservice','getprocessservicemanager', + 'createunodialog','createunolistener','createunovalue','thiscomponent', + 'globalscope' + ) + ), + 'SYMBOLS' => array( + '(', ')', '=' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/oracle8.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/oracle8.php new file mode 100644 index 0000000..e2a6dd3 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/oracle8.php @@ -0,0 +1,487 @@ + 'Oracle 8 SQL', + 'COMMENT_SINGLE' => array(1 => '--'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, + 'QUOTEMARKS' => array("'", '"', '`'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( +//Put your package names here - e.g. select distinct ''''|| lower(name) || ''',' from user_source; + 6 => array( + ), + +//Put your table names here - e.g. select distinct ''''|| lower(table_name) || ''',' from user_tables; + 5 => array( + ), + +//Put your view names here - e.g. select distinct ''''|| lower(view_name) || ''',' from user_views; + 4 => array( + ), + +//Put your table field names here - e.g. select distinct ''''|| lower(column_name) || ''',' from user_tab_columns; + 3 => array( + ), +//Put ORACLE reserved keywords here (8.1.7). I like mine uppercase. + 1 => array( + 'ABS', + 'ACCESS', + 'ACOS', + 'ADD', + 'ADD_MONTHS', + 'ALL', + 'ALTER', + 'ANALYZE', + 'AND', + 'ANY', + 'ARRAY', + 'AS', + 'ASC', + 'ASCII', + 'ASIN', + 'ASSOCIATE', + 'AT', + 'ATAN', + 'ATAN2', + 'AUDIT', + 'AUTHID', + 'AVG', + 'BEGIN', + 'BETWEEN', + 'BFILENAME', + 'BINARY_INTEGER', + 'BITAND', + 'BODY', + 'BOOLEAN', + 'BULK', + 'BY', + 'CALL', + 'CASCADE', + 'CASE', + 'CEIL', + 'CHAR', + 'CHAR_BASE', + 'CHARTOROWID', + 'CHECK', + 'CHR', + 'CLOSE', + 'CLUSTER', + 'COALESCE', + 'COLLECT', + 'COLUMN', + 'COMMENT', + 'COMMIT', + 'COMPRESS', + 'CONCAT', + 'CONNECT', + 'CONSTANT', + 'CONSTRAINT', + 'CONSTRAINTS', + 'CONTEXT', + 'CONTROLFILE', + 'CONVERT', + 'CORR', + 'COS', + 'COSH', + 'COST', + 'COUNT', + 'COVAR_POP', + 'COVAR_SAMP', + 'CREATE', + 'CUME_DIST', + 'CURRENT', + 'CURRVAL', + 'CURSOR', + 'DATABASE', + 'DATE', + 'DAY', + 'DECIMAL', + 'DECLARE', + 'DECODE', + 'DEFAULT', + 'DELETE', + 'DENSE_RANK', + 'DEREF', + 'DESC', + 'DIMENSION', + 'DIRECTORY', + 'DISASSOCIATE', + 'DISTINCT', + 'DO', + 'DROP', + 'DUMP', + 'ELSE', + 'ELSIF', + 'EMPTY_BLOB', + 'EMPTY_CLOB', + 'END', + 'EXCEPTION', + 'EXCLUSIVE', + 'EXEC', + 'EXECUTE', + 'EXISTS', + 'EXIT', + 'EXP', + 'EXPLAIN', + 'EXTENDS', + 'EXTRACT', + 'FALSE', + 'FETCH', + 'FILE', + 'FIRST_VALUE', + 'FLOAT', + 'FLOOR', + 'FOR', + 'FORALL', + 'FROM', + 'FUNCTION', + 'GOTO', + 'GRANT', + 'GREATEST', + 'GROUP', + 'GROUPING', + 'HAVING', + 'HEAP', + 'HEXTORAW', + 'HOUR', + 'IDENTIFIED', + 'IF', + 'IMMEDIATE', + 'IN', + 'INCREMENT', + 'INDEX', + 'INDEXTYPE', + 'INDICATOR', + 'INITCAP', + 'INITIAL', + 'INSERT', + 'INSTR', + 'INSTRB', + 'INTEGER', + 'INTERFACE', + 'INTERSECT', + 'INTERVAL', + 'INTO', + 'IS', + 'ISOLATION', + 'JAVA', + 'KEY', + 'LAG', + 'LAST_DAY', + 'LAST_VALUE', + 'LEAD', + 'LEAST', + 'LENGTH', + 'LENGTHB', + 'LEVEL', + 'LIBRARY', + 'LIKE', + 'LIMITED', + 'LINK', + 'LN', + 'LOCK', + 'LOG', + 'LONG', + 'LOOP', + 'LOWER', + 'LPAD', + 'LTRIM', + 'MAKE_REF', + 'MATERIALIZED', + 'MAX', + 'MAXEXTENTS', + 'MIN', + 'MINUS', + 'MINUTE', + 'MLSLABEL', + 'MOD', + 'MODE', + 'MODIFY', + 'MONTH', + 'MONTHS_BETWEEN', + 'NATURAL', + 'NATURALN', + 'NEW', + 'NEW_TIME', + 'NEXT_DAY', + 'NEXTVAL', + 'NLS_CHARSET_DECL_LEN', + 'NLS_CHARSET_ID', + 'NLS_CHARSET_NAME', + 'NLS_INITCAP', + 'NLS_LOWER', + 'NLS_UPPER', + 'NLSSORT', + 'NOAUDIT', + 'NOCOMPRESS', + 'NOCOPY', + 'NOT', + 'NOWAIT', + 'NTILE', + 'NULL', + 'NULLIF', + 'NUMBER', + 'NUMBER_BASE', + 'NUMTODSINTERVAL', + 'NUMTOYMINTERVAL', + 'NVL', + 'NVL2', + 'OCIROWID', + 'OF', + 'OFFLINE', + 'ON', + 'ONLINE', + 'OPAQUE', + 'OPEN', + 'OPERATOR', + 'OPTION', + 'OR', + 'ORDER', + 'ORGANIZATION', + 'OTHERS', + 'OUT', + 'OUTLINE', + 'PACKAGE', + 'PARTITION', + 'PCTFREE', + 'PERCENT_RANK', + 'PLAN', + 'PLS_INTEGER', + 'POSITIVE', + 'POSITIVEN', + 'POWER', + 'PRAGMA', + 'PRIMARY', + 'PRIOR', + 'PRIVATE', + 'PRIVILEGES', + 'PROCEDURE', + 'PROFILE', + 'PUBLIC', + 'RAISE', + 'RANGE', + 'RANK', + 'RATIO_TO_REPORT', + 'RAW', + 'RAWTOHEX', + 'REAL', + 'RECORD', + 'REF', + 'REFTOHEX', + 'REGR_AVGX', + 'REGR_AVGY', + 'REGR_COUNT', + 'REGR_INTERCEPT', + 'REGR_R2', + 'REGR_SLOPE', + 'REGR_SXX', + 'REGR_SXY', + 'REGR_SYY', + 'RELEASE', + 'RENAME', + 'REPLACE', + 'RESOURCE', + 'RETURN', + 'RETURNING', + 'REVERSE', + 'REVOKE', + 'ROLE', + 'ROLLBACK', + 'ROUND', + 'ROW', + 'ROW_NUMBER', + 'ROWID', + 'ROWIDTOCHAR', + 'ROWNUM', + 'ROWS', + 'ROWTYPE', + 'RPAD', + 'RTRIM', + 'SAVEPOINT', + 'SCHEMA', + 'SECOND', + 'SEGMENT', + 'SELECT', + 'SEPERATE', + 'SEQUENCE', + 'SESSION', + 'SET', + 'SHARE', + 'SIGN', + 'SIN', + 'SINH', + 'SIZE', + 'SMALLINT', + 'SOUNDEX', + 'SPACE', + 'SQL', + 'SQLCODE', + 'SQLERRM', + 'SQRT', + 'START', + 'STATISTICS', + 'STDDEV', + 'STDDEV_POP', + 'STDDEV_SAMP', + 'STOP', + 'SUBSTR', + 'SUBSTRB', + 'SUBTYPE', + 'SUCCESSFUL', + 'SUM', + 'SYNONYM', + 'SYS_CONTEXT', + 'SYS_GUID', + 'SYSDATE', + 'SYSTEM', + 'TABLE', + 'TABLESPACE', + 'TAN', + 'TANH', + 'TEMPORARY', + 'THEN', + 'TIME', + 'TIMESTAMP', + 'TIMEZONE_ABBR', + 'TIMEZONE_HOUR', + 'TIMEZONE_MINUTE', + 'TIMEZONE_REGION', + 'TIMING', + 'TO', + 'TO_CHAR', + 'TO_DATE', + 'TO_LOB', + 'TO_MULTI_BYTE', + 'TO_NUMBER', + 'TO_SINGLE_BYTE', + 'TRANSACTION', + 'TRANSLATE', + 'TRIGGER', + 'TRIM', + 'TRUE', + 'TRUNC', + 'TRUNCATE', + 'TYPE', + 'UI', + 'UID', + 'UNION', + 'UNIQUE', + 'UPDATE', + 'UPPER', + 'USE', + 'USER', + 'USERENV', + 'USING', + 'VALIDATE', + 'VALUE', + 'VALUES', + 'VAR_POP', + 'VAR_SAMP', + 'VARCHAR', + 'VARCHAR2', + 'VARIANCE', + 'VIEW', + 'VSIZE', + 'WHEN', + 'WHENEVER', + 'WHERE', + 'WHILE', + 'WITH', + 'WORK', + 'WRITE', + 'YEAR', + 'ZONE' + ) + ), + 'SYMBOLS' => array( + '(', ')', '=', '<', '>', '|' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #993333; font-weight: bold; text-transform: uppercase;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #ff0000;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + ), + + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/pascal.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/pascal.php new file mode 100644 index 0000000..9256c22 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/pascal.php @@ -0,0 +1,144 @@ + 'Pascal', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('{' => '}','(*' => '*)'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'if', 'while', 'until', 'repeat', 'default', + 'do', 'else', 'for', 'switch', 'goto','label','asm','begin','end', + 'assembler','case', 'downto', 'to','div','mod','far','forward','in','inherited', + 'inline','interrupt','label','library','not','var','of','then','stdcall', + 'cdecl','end.','raise','try','except','name','finally','resourcestring','override','overload', + 'default','public','protected','private','property','published','stored','catch' + ), + 2 => array( + 'nil', 'false', 'break', 'true', 'function', 'procedure','implementation','interface', + 'unit','program','initialization','finalization','uses' + ), + 3 => array( + 'abs', 'absolute','and','arc','arctan','chr','constructor','destructor', + 'dispose','cos','eof','eoln','exp','get','index','ln','new','xor','write','writeln', + 'shr','sin','sqrt','succ','pred','odd','read','readln','ord','ordinal','blockread','blockwrite' + ), + 4 => array( + 'array', 'char', 'const', 'boolean', 'real', 'integer', 'longint', + 'word', 'shortint', 'record','byte','bytebool','string', + 'type','object','export','exports','external','file','longbool','pointer','set', + 'packed','ansistring','union' + ), + ), + 'SYMBOLS' => array( + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => '', + 4 => 'color: #993333;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #339933;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #202020;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/per.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/per.php new file mode 100644 index 0000000..9e7627e --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/per.php @@ -0,0 +1,302 @@ + 'per', + 'COMMENT_SINGLE' => array(1 => '--', 2 => '#'), + 'COMMENT_MULTI' => array('{' => '}'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + "ACCELERATOR", + "ACCELERATOR2", + "ACTION", + "ALT", + "AND", + "AUTO", + "AUTONEXT", + "AUTOSCALE", + "BETWEEN", + "BOTH", + "BUTTON", + "BUTTONEDIT", + "BUTTONTEXTHIDDEN", + "BY", + "BYTE", + "CANVAS", + "CENTER", + "CHECKBOX", + "CLASS", + "COLOR", + "COLUMNS", + "COMBOBOX", + "COMMAND", + "COMMENT", + "COMMENTS", + "COMPACT", + "COMPRESS", + "CONFIG", + "CONTROL", + "CURRENT", + "DATABASE", + "DATEEDIT", + "DEC", + "DEFAULT", + "DEFAULTS", + "DELIMITERS", + "DISPLAY", + "DISPLAYONLY", + "DOWNSHIFT", + "DYNAMIC", + "EDIT", + "FIXED", + "FOLDER", + "FONTPITCH", + "FORMAT", + "FORMONLY", + "GRID", + "GRIDCHILDRENINPARENT", + "GROUP", + "HBOX", + "HEIGHT", + "HIDDEN", + "HORIZONTAL", + "INCLUDE", + "INITIAL", + "INITIALIZER", + "INPUT", + "INSTRUCTIONS", + "INTERVAL", + "INVISIBLE", + "IS", + "ITEM", + "ITEMS", + "JUSTIFY", + "KEY", + "KEYS", + "LABEL", + "LEFT", + "LIKE", + "LINES", + "MATCHES", + "NAME", + "NOENTRY", + "NONCOMPRESS", + "NORMAL", + "NOT", + "NOUPDATE", + "OPTIONS", + "OR", + "ORIENTATION", + "PACKED", + "PAGE", + "PICTURE", + "PIXELHEIGHT", + "PIXELS", + "PIXELWIDTH", + "POINTS", + "PROGRAM", + "PROGRESSBAR", + "QUERYCLEAR", + "QUERYEDITABLE", + "RADIOGROUP", + "RECORD", + "REQUIRED", + "REVERSE", + "RIGHT", + "SAMPLE", + "SCREEN", + "SCROLL", + "SCROLLBARS", + "SCROLLGRID", + "SECOND", + "SEPARATOR", + "SHIFT", + "SIZE", + "SIZEPOLICY", + "SMALLFLOAT", + "SMALLINT", + "SPACING", + "STRETCH", + "STYLE", + "TABINDEX", + "TABLE", + "TAG", + "TEXT", + "TEXTEDIT", + "THROUGH", + "THRU", + "TITLE", + "TO", + "TOOLBAR", + "TOPMENU", + "TYPE", + "UNHIDABLE", + "UNHIDABLECOLUMNS", + "UNMOVABLE", + "UNMOVABLECOLUMNS", + "UNSIZABLE", + "UNSIZABLECOLUMNS", + "UNSORTABLE", + "UNSORTABLECOLUMNS", + "UPSHIFT", + "USER", + "VALIDATE", + "VALUECHECKED", + "VALUEMAX", + "VALUEMIN", + "VALUEUNCHECKED", + "VARCHAR", + "VARIABLE", + "VBOX", + "VERIFY", + "VERSION", + "VERTICAL", + "TIMESTAMP", + "WANTCOLUMNSANCHORED", /* to be removed! */ + "WANTFIXEDPAGESIZE", + "WANTNORETURNS", + "WANTTABS", + "WHERE", + "WIDGET", + "WIDTH", + "WINDOWSTYLE", + "WITHOUT", + "WORDWRAP", + "X", + "Y", + "ZEROFILL", + "SCHEMA", + "ATTRIBUTES", + "TABLES", + "LAYOUT", + "END" + ), + 2 => array( + "YEAR", + "BLACK", + "BLINK", + "BLUE", + "YELLOW", + "WHITE", + "UNDERLINE", + "CENTURY", + "FRACTION", + "CHAR", + "CHARACTER", + "CHARACTERS", + "CYAN", + "DATE", + "DATETIME", + "DAY", + "DECIMAL", + "FALSE", + "FLOAT", + "GREEN", + "HOUR", + "INT", + "INTEGER", + "MAGENTA", + "MINUTE", + "MONEY", + "NONE", + "NULL", + "REAL", + "RED", + "TRUE", + "TODAY", + "MONTH", + "IMAGE" + ), + ), + 'SYMBOLS' => array( + '+', '-', '*', '?', '=', '/', '%', '>', '<', '^', '!', '|', ':', + '(', ')', '[', ']' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0600FF;', + 2 => 'color: #0000FF; font-weight: bold;', + ), + 'COMMENTS' => array( + 1 => 'color: #008080; font-style: italic;', + 2 => 'color: #008080;', + 'MULTI' => 'color: green' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #008080; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #808080;' + ), + 'NUMBERS' => array( + 0 => 'color: #FF0000;' + ), + 'METHODS' => array( + 1 => 'color: #0000FF;', + 2 => 'color: #0000FF;' + ), + 'SYMBOLS' => array( + 0 => 'color: #008000;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/perl.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/perl.php new file mode 100644 index 0000000..0ac9e08 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/perl.php @@ -0,0 +1,179 @@ + 'Perl', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array( + '=back' => '=cut', + '=head' => '=cut', + '=item' => '=cut', + '=over' => '=cut', + '=begin' => '=cut', + '=end' => '=cut', + '=for' => '=cut', + '=encoding' => '=cut', + '=pod' => '=cut' + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'HARDQUOTE' => array("'", "'"), // An optional 2-element array defining the beginning and end of a hard-quoted string + 'HARDESCAPE' => array('\\\'', "\\\\"), // Things that must still be escaped inside a hard-quoted string + // If HARDQUOTE is defined, HARDESCAPE must be defined + // This will not work unless the first character of each element is either in the + // QUOTEMARKS array or is the ESCAPE_CHAR + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'case', 'do', 'else', 'elsif', 'for', 'if', 'then', 'until', 'while', 'foreach', 'my', + 'or', 'and', 'unless', 'next', 'last', 'redo', 'not', 'our', + 'reset', 'continue','and', 'cmp', 'ne' + ), + 2 => array( + 'use', 'sub', 'new', '__END__', '__DATA__', '__DIE__', '__WARN__', 'BEGIN', + 'STDIN', 'STDOUT', 'STDERR' + ), + 3 => array( + 'abs', 'accept', 'alarm', 'atan2', 'bind', 'binmode', 'bless', + 'caller', 'chdir', 'chmod', 'chomp', 'chop', 'chown', 'chr', + 'chroot', 'close', 'closedir', 'connect', 'continue', 'cos', + 'crypt', 'dbmclose', 'dbmopen', 'defined', 'delete', 'die', + 'dump', 'each', 'endgrent', 'endhostent', 'endnetent', 'endprotoent', + 'endpwent', 'endservent', 'eof', 'eval', 'exec', 'exists', 'exit', + 'exp', 'fcntl', 'fileno', 'flock', 'fork', 'format', 'formline', + 'getc', 'getgrent', 'getgrgid', 'getgrnam', 'gethostbyaddr', + 'gethostbyname', 'gethostent', 'getlogin', 'getnetbyaddr', 'getnetbyname', + 'getnetent', 'getpeername', 'getpgrp', 'getppid', 'getpriority', + 'getprotobyname', 'getprotobynumber', 'getprotoent', 'getpwent', + 'getpwnam', 'getpwuid', 'getservbyname', 'getservbyport', 'getservent', + 'getsockname', 'getsockopt', 'glob', 'gmtime', 'goto', 'grep', + 'hex', 'import', 'index', 'int', 'ioctl', 'join', 'keys', 'kill', + 'last', 'lc', 'lcfirst', 'length', 'link', 'listen', 'local', + 'localtime', 'log', 'lstat', 'm', 'map', 'mkdir', 'msgctl', 'msgget', + 'msgrcv', 'msgsnd', 'my', 'next', 'no', 'oct', 'open', 'opendir', + 'ord', 'our', 'pack', 'package', 'pipe', 'pop', 'pos', 'print', + 'printf', 'prototype', 'push', 'qq', 'qr', 'quotemeta', 'qw', + 'qx', 'q', 'rand', 'read', 'readdir', 'readline', 'readlink', 'readpipe', + 'recv', 'redo', 'ref', 'rename', 'require', 'return', + 'reverse', 'rewinddir', 'rindex', 'rmdir', 's', 'scalar', 'seek', + 'seekdir', 'select', 'semctl', 'semget', 'semop', 'send', 'setgrent', + 'sethostent', 'setnetent', 'setpgrp', 'setpriority', 'setprotoent', + 'setpwent', 'setservent', 'setsockopt', 'shift', 'shmctl', 'shmget', + 'shmread', 'shmwrite', 'shutdown', 'sin', 'sleep', 'socket', 'socketpair', + 'sort', 'splice', 'split', 'sprintf', 'sqrt', 'srand', 'stat', + 'study', 'substr', 'symlink', 'syscall', 'sysopen', 'sysread', + 'sysseek', 'system', 'syswrite', 'tell', 'telldir', 'tie', 'tied', + 'time', 'times', 'tr', 'truncate', 'uc', 'ucfirst', 'umask', 'undef', + 'unlink', 'unpack', 'unshift', 'untie', 'utime', 'values', + 'vec', 'wait', 'waitpid', 'wantarray', 'warn', 'write', 'y' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => true, + 2 => true, + 3 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + 0 => 'color: #0000ff;', + 4 => 'color: #009999;', + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 3 => 'http://perldoc.perl.org/functions/{FNAME}.html' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '->', + 2 => '::' + ), + 'REGEXPS' => array( + 0 => '[\\$%@]+[a-zA-Z_][a-zA-Z0-9_]*', + 4 => '<[a-zA-Z_][a-zA-Z0-9_]*>', + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/php-brief.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/php-brief.php new file mode 100644 index 0000000..66c5b46 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/php-brief.php @@ -0,0 +1,166 @@ + 'PHP', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'include', 'require', 'include_once', 'require_once', + 'for', 'as', 'foreach', 'if', 'elseif', 'else', 'while', 'do', 'endwhile', 'endif', 'switch', 'case', 'endswitch', + 'return', 'break' + ), + 2 => array( + 'null', '__LINE__', '__FILE__', + 'false', '<?php', '?>', + 'true', 'var', 'default', + 'function', 'class', 'new', '&new', 'public', 'private', 'interface', 'extends', + ), + 3 => array( + 'func_num_args', 'func_get_arg', 'func_get_args', 'strlen', 'strcmp', 'strncmp', 'strcasecmp', 'strncasecmp', 'each', 'error_reporting', 'define', 'defined', + 'trigger_error', 'user_error', 'set_error_handler', 'restore_error_handler', 'get_declared_classes', 'get_loaded_extensions', + 'extension_loaded', 'get_extension_funcs', 'debug_backtrace', + 'constant', 'bin2hex', 'sleep', 'usleep', 'time', 'mktime', 'gmmktime', 'strftime', 'gmstrftime', 'strtotime', 'date', 'gmdate', 'getdate', 'localtime', 'checkdate', 'flush', 'wordwrap', 'htmlspecialchars', 'htmlentities', 'html_entity_decode', 'md5', 'md5_file', 'crc32', 'getimagesize', 'image_type_to_mime_type', 'phpinfo', 'phpversion', 'phpcredits', 'strnatcmp', 'strnatcasecmp', 'substr_count', 'strspn', 'strcspn', 'strtok', 'strtoupper', 'strtolower', 'strpos', 'strrpos', 'strrev', 'hebrev', 'hebrevc', 'nl2br', 'basename', 'dirname', 'pathinfo', 'stripslashes', 'stripcslashes', 'strstr', 'stristr', 'strrchr', 'str_shuffle', 'str_word_count', 'strcoll', 'substr', 'substr_replace', 'quotemeta', 'ucfirst', 'ucwords', 'strtr', 'addslashes', 'addcslashes', 'rtrim', 'str_replace', 'str_repeat', 'count_chars', 'chunk_split', 'trim', 'ltrim', 'strip_tags', 'similar_text', 'explode', 'implode', 'setlocale', 'localeconv', + 'parse_str', 'str_pad', 'chop', 'strchr', 'sprintf', 'printf', 'vprintf', 'vsprintf', 'sscanf', 'fscanf', 'parse_url', 'urlencode', 'urldecode', 'rawurlencode', 'rawurldecode', 'readlink', 'linkinfo', 'link', 'unlink', 'exec', 'system', 'escapeshellcmd', 'escapeshellarg', 'passthru', 'shell_exec', 'proc_open', 'proc_close', 'rand', 'srand', 'getrandmax', 'mt_rand', 'mt_srand', 'mt_getrandmax', 'base64_decode', 'base64_encode', 'abs', 'ceil', 'floor', 'round', 'is_finite', 'is_nan', 'is_infinite', 'bindec', 'hexdec', 'octdec', 'decbin', 'decoct', 'dechex', 'base_convert', 'number_format', 'fmod', 'ip2long', 'long2ip', 'getenv', 'putenv', 'getopt', 'microtime', 'gettimeofday', 'getrusage', 'uniqid', 'quoted_printable_decode', 'set_time_limit', 'get_cfg_var', 'magic_quotes_runtime', 'set_magic_quotes_runtime', 'get_magic_quotes_gpc', 'get_magic_quotes_runtime', + 'import_request_variables', 'error_log', 'serialize', 'unserialize', 'memory_get_usage', 'var_dump', 'var_export', 'debug_zval_dump', 'print_r','highlight_file', 'show_source', 'highlight_string', 'ini_get', 'ini_get_all', 'ini_set', 'ini_alter', 'ini_restore', 'get_include_path', 'set_include_path', 'restore_include_path', 'setcookie', 'header', 'headers_sent', 'connection_aborted', 'connection_status', 'ignore_user_abort', 'parse_ini_file', 'is_uploaded_file', 'move_uploaded_file', 'intval', 'floatval', 'doubleval', 'strval', 'gettype', 'settype', 'is_null', 'is_resource', 'is_bool', 'is_long', 'is_float', 'is_int', 'is_integer', 'is_double', 'is_real', 'is_numeric', 'is_string', 'is_array', 'is_object', 'is_scalar', + 'ereg', 'ereg_replace', 'eregi', 'eregi_replace', 'split', 'spliti', 'join', 'sql_regcase', 'dl', 'pclose', 'popen', 'readfile', 'rewind', 'rmdir', 'umask', 'fclose', 'feof', 'fgetc', 'fgets', 'fgetss', 'fread', 'fopen', 'fpassthru', 'ftruncate', 'fstat', 'fseek', 'ftell', 'fflush', 'fwrite', 'fputs', 'mkdir', 'rename', 'copy', 'tempnam', 'tmpfile', 'file', 'file_get_contents', 'stream_select', 'stream_context_create', 'stream_context_set_params', 'stream_context_set_option', 'stream_context_get_options', 'stream_filter_prepend', 'stream_filter_append', 'fgetcsv', 'flock', 'get_meta_tags', 'stream_set_write_buffer', 'set_file_buffer', 'set_socket_blocking', 'stream_set_blocking', 'socket_set_blocking', 'stream_get_meta_data', 'stream_register_wrapper', 'stream_wrapper_register', 'stream_set_timeout', 'socket_set_timeout', 'socket_get_status', 'realpath', 'fnmatch', 'fsockopen', 'pfsockopen', 'pack', 'unpack', 'get_browser', 'crypt', 'opendir', 'closedir', 'chdir', 'getcwd', 'rewinddir', 'readdir', 'dir', 'glob', 'fileatime', 'filectime', 'filegroup', 'fileinode', 'filemtime', 'fileowner', 'fileperms', 'filesize', 'filetype', 'file_exists', 'is_writable', 'is_writeable', 'is_readable', 'is_executable', 'is_file', 'is_dir', 'is_link', 'stat', 'lstat', 'chown', + 'touch', 'clearstatcache', 'mail', 'ob_start', 'ob_flush', 'ob_clean', 'ob_end_flush', 'ob_end_clean', 'ob_get_flush', 'ob_get_clean', 'ob_get_length', 'ob_get_level', 'ob_get_status', 'ob_get_contents', 'ob_implicit_flush', 'ob_list_handlers', 'ksort', 'krsort', 'natsort', 'natcasesort', 'asort', 'arsort', 'sort', 'rsort', 'usort', 'uasort', 'uksort', 'shuffle', 'array_walk', 'count', 'end', 'prev', 'next', 'reset', 'current', 'key', 'min', 'max', 'in_array', 'array_search', 'extract', 'compact', 'array_fill', 'range', 'array_multisort', 'array_push', 'array_pop', 'array_shift', 'array_unshift', 'array_splice', 'array_slice', 'array_merge', 'array_merge_recursive', 'array_keys', 'array_values', 'array_count_values', 'array_reverse', 'array_reduce', 'array_pad', 'array_flip', 'array_change_key_case', 'array_rand', 'array_unique', 'array_intersect', 'array_intersect_assoc', 'array_diff', 'array_diff_assoc', 'array_sum', 'array_filter', 'array_map', 'array_chunk', 'array_key_exists', 'pos', 'sizeof', 'key_exists', 'assert', 'assert_options', 'version_compare', 'ftok', 'str_rot13', 'aggregate', + 'session_name', 'session_module_name', 'session_save_path', 'session_id', 'session_regenerate_id', 'session_decode', 'session_register', 'session_unregister', 'session_is_registered', 'session_encode', + 'session_start', 'session_destroy', 'session_unset', 'session_set_save_handler', 'session_cache_limiter', 'session_cache_expire', 'session_set_cookie_params', 'session_get_cookie_params', 'session_write_close', 'preg_match', 'preg_match_all', 'preg_replace', 'preg_replace_callback', 'preg_split', 'preg_quote', 'preg_grep', 'overload', 'ctype_alnum', 'ctype_alpha', 'ctype_cntrl', 'ctype_digit', 'ctype_lower', 'ctype_graph', 'ctype_print', 'ctype_punct', 'ctype_space', 'ctype_upper', 'ctype_xdigit', 'virtual', 'apache_request_headers', 'apache_note', 'apache_lookup_uri', 'apache_child_terminate', 'apache_setenv', 'apache_response_headers', 'apache_get_version', 'getallheaders', 'mysql_connect', 'mysql_pconnect', 'mysql_close', 'mysql_select_db', 'mysql_create_db', 'mysql_drop_db', 'mysql_query', 'mysql_unbuffered_query', 'mysql_db_query', 'mysql_list_dbs', 'mysql_list_tables', 'mysql_list_fields', 'mysql_list_processes', 'mysql_error', 'mysql_errno', 'mysql_affected_rows', 'mysql_insert_id', 'mysql_result', 'mysql_num_rows', 'mysql_num_fields', 'mysql_fetch_row', 'mysql_fetch_array', 'mysql_fetch_assoc', 'mysql_fetch_object', 'mysql_data_seek', 'mysql_fetch_lengths', 'mysql_fetch_field', 'mysql_field_seek', 'mysql_free_result', 'mysql_field_name', 'mysql_field_table', 'mysql_field_len', 'mysql_field_type', 'mysql_field_flags', 'mysql_escape_string', 'mysql_real_escape_string', 'mysql_stat', + 'mysql_thread_id', 'mysql_client_encoding', 'mysql_get_client_info', 'mysql_get_host_info', 'mysql_get_proto_info', 'mysql_get_server_info', 'mysql_info', 'mysql', 'mysql_fieldname', 'mysql_fieldtable', 'mysql_fieldlen', 'mysql_fieldtype', 'mysql_fieldflags', 'mysql_selectdb', 'mysql_createdb', 'mysql_dropdb', 'mysql_freeresult', 'mysql_numfields', 'mysql_numrows', 'mysql_listdbs', 'mysql_listtables', 'mysql_listfields', 'mysql_db_name', 'mysql_dbname', 'mysql_tablename', 'mysql_table_name', 'pg_connect', 'pg_pconnect', 'pg_close', 'pg_connection_status', 'pg_connection_busy', 'pg_connection_reset', 'pg_host', 'pg_dbname', 'pg_port', 'pg_tty', 'pg_options', 'pg_ping', 'pg_query', 'pg_send_query', 'pg_cancel_query', 'pg_fetch_result', 'pg_fetch_row', 'pg_fetch_assoc', 'pg_fetch_array', 'pg_fetch_object', 'pg_fetch_all', 'pg_affected_rows', 'pg_get_result', 'pg_result_seek', 'pg_result_status', 'pg_free_result', 'pg_last_oid', 'pg_num_rows', 'pg_num_fields', 'pg_field_name', 'pg_field_num', 'pg_field_size', 'pg_field_type', 'pg_field_prtlen', 'pg_field_is_null', 'pg_get_notify', 'pg_get_pid', 'pg_result_error', 'pg_last_error', 'pg_last_notice', 'pg_put_line', 'pg_end_copy', 'pg_copy_to', 'pg_copy_from', + 'pg_trace', 'pg_untrace', 'pg_lo_create', 'pg_lo_unlink', 'pg_lo_open', 'pg_lo_close', 'pg_lo_read', 'pg_lo_write', 'pg_lo_read_all', 'pg_lo_import', 'pg_lo_export', 'pg_lo_seek', 'pg_lo_tell', 'pg_escape_string', 'pg_escape_bytea', 'pg_unescape_bytea', 'pg_client_encoding', 'pg_set_client_encoding', 'pg_meta_data', 'pg_convert', 'pg_insert', 'pg_update', 'pg_delete', 'pg_select', 'pg_exec', 'pg_getlastoid', 'pg_cmdtuples', 'pg_errormessage', 'pg_numrows', 'pg_numfields', 'pg_fieldname', 'pg_fieldsize', 'pg_fieldtype', 'pg_fieldnum', 'pg_fieldprtlen', 'pg_fieldisnull', 'pg_freeresult', 'pg_result', 'pg_loreadall', 'pg_locreate', 'pg_lounlink', 'pg_loopen', 'pg_loclose', 'pg_loread', 'pg_lowrite', 'pg_loimport', 'pg_loexport', + 'echo', 'print', 'global', 'static', 'exit', 'array', 'empty', 'eval', 'isset', 'unset', 'die' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', + '!', '@', '%', '&', '|', '/', + '<', '>', + '=', '-', '+', '*', + '.', ':', ',', ';' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + 0 => 'color: #0000ff;' + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + 3 => '' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://www.php.net/{FNAME}', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '->', + 2 => '::' + ), + 'REGEXPS' => array( + 0 => "[\\$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*" + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + ' '?>', + ' '?>', + '<%' => '%>', + '' + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + 1 => true, + 2 => true, + 3 => true + ), + 'TAB_WIDTH' => 4 +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/php.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/php.php new file mode 100644 index 0000000..1e9bb49 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/php.php @@ -0,0 +1,359 @@ + 'PHP', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'include', 'require', 'include_once', 'require_once', + 'for', 'foreach', 'as', 'if', 'elseif', 'else', 'while', 'do', 'endwhile', + 'endif', 'switch', 'case', 'endswitch', 'endfor', 'endforeach', + 'return', 'break', 'continue' + ), + 2 => array( + 'null', '__LINE__', '__FILE__', + 'false', '<?php', '?>', '<?', + '<script language', '</script>', + 'true', 'var', 'default', + 'function', 'class', 'new', '&new', 'public', 'private', 'interface', 'extends', + '__FUNCTION__', '__CLASS__', '__METHOD__', 'PHP_VERSION', + 'PHP_OS', 'DEFAULT_INCLUDE_PATH', 'PEAR_INSTALL_DIR', 'PEAR_EXTENSION_DIR', + 'PHP_EXTENSION_DIR', 'PHP_BINDIR', 'PHP_LIBDIR', 'PHP_DATADIR', 'PHP_SYSCONFDIR', + 'PHP_LOCALSTATEDIR', 'PHP_CONFIG_FILE_PATH', 'PHP_OUTPUT_HANDLER_START', 'PHP_OUTPUT_HANDLER_CONT', + 'PHP_OUTPUT_HANDLER_END', 'E_ERROR', 'E_WARNING', 'E_PARSE', 'E_NOTICE', + 'E_CORE_ERROR', 'E_CORE_WARNING', 'E_COMPILE_ERROR', 'E_COMPILE_WARNING', 'E_USER_ERROR', + 'E_USER_WARNING', 'E_USER_NOTICE', 'E_ALL' + ), + 3 => array( + 'zlib_get_coding_type','zend_version','zend_logo_guid','yp_order','yp_next', + 'yp_match','yp_master','yp_get_default_domain','yp_first','yp_errno','yp_err_string', + 'yp_cat','yp_all','xml_set_unparsed_entity_decl_handler','xml_set_start_namespace_decl_handler','xml_set_processing_instruction_handler','xml_set_object', + 'xml_set_notation_decl_handler','xml_set_external_entity_ref_handler','xml_set_end_namespace_decl_handler','xml_set_element_handler','xml_set_default_handler','xml_set_character_data_handler', + 'xml_parser_set_option','xml_parser_get_option','xml_parser_free','xml_parser_create_ns','xml_parser_create','xml_parse_into_struct', + 'xml_parse','xml_get_error_code','xml_get_current_line_number','xml_get_current_column_number','xml_get_current_byte_index','xml_error_string', + 'wordwrap','wddx_serialize_vars','wddx_serialize_value','wddx_packet_start','wddx_packet_end','wddx_deserialize', + 'wddx_add_vars','vsprintf','vprintf','virtual','version_compare','var_export', + 'var_dump','utf8_encode','utf8_decode','usort','usleep','user_error', + 'urlencode','urldecode','unserialize','unregister_tick_function','unpack','unlink', + 'unixtojd','uniqid','umask','uksort','ucwords','ucfirst', + 'uasort','trim','trigger_error','touch','token_name','token_get_all', + 'tmpfile','time','textdomain','tempnam','tanh','tan', + 'system','syslog','symlink','substr_replace','substr_count','substr', + 'strval','strtr','strtoupper','strtotime','strtolower','strtok', + 'strstr','strspn','strrpos','strrev','strrchr','strpos', + 'strncmp','strncasecmp','strnatcmp','strnatcasecmp','strlen','stristr', + 'stripslashes','stripcslashes','strip_tags','strftime','stream_wrapper_register','stream_set_write_buffer', + 'stream_set_timeout','stream_set_blocking','stream_select','stream_register_wrapper','stream_get_meta_data','stream_filter_prepend', + 'stream_filter_append','stream_context_set_params','stream_context_set_option','stream_context_get_options','stream_context_create','strcspn', + 'strcoll','strcmp','strchr','strcasecmp','str_word_count','str_shuffle', + 'str_rot13','str_replace','str_repeat','str_pad','stat','sscanf', + 'srand','sqrt','sql_regcase','sprintf','spliti','split', + 'soundex','sort','socket_writev','socket_write','socket_strerror','socket_shutdown', + 'socket_setopt','socket_set_timeout','socket_set_option','socket_set_nonblock','socket_set_blocking','socket_set_block', + 'socket_sendto','socket_sendmsg','socket_send','socket_select','socket_recvmsg','socket_recvfrom', + 'socket_recv','socket_readv','socket_read','socket_listen','socket_last_error','socket_iovec_set', + 'socket_iovec_free','socket_iovec_fetch','socket_iovec_delete','socket_iovec_alloc','socket_iovec_add','socket_getsockname', + 'socket_getpeername','socket_getopt','socket_get_status','socket_get_option','socket_create_pair','socket_create_listen', + 'socket_create','socket_connect','socket_close','socket_clear_error','socket_bind','socket_accept', + 'sleep','sizeof','sinh','sin','similar_text','shuffle', + 'show_source','shmop_write','shmop_size','shmop_read','shmop_open','shmop_delete', + 'shmop_close','shm_remove_var','shm_remove','shm_put_var','shm_get_var','shm_detach', + 'shm_attach','shell_exec','sha1_file','sha1','settype','setlocale', + 'setcookie','set_time_limit','set_socket_blocking','set_magic_quotes_runtime','set_include_path','set_file_buffer', + 'set_error_handler','session_write_close','session_unset','session_unregister','session_start','session_set_save_handler', + 'session_set_cookie_params','session_save_path','session_register','session_regenerate_id','session_name','session_module_name', + 'session_is_registered','session_id','session_get_cookie_params','session_encode','session_destroy','session_decode', + 'session_cache_limiter','session_cache_expire','serialize','sem_remove','sem_release','sem_get', + 'sem_acquire','rtrim','rsort','round','rmdir','rewinddir', + 'rewind','restore_include_path','restore_error_handler','reset','rename','register_tick_function', + 'register_shutdown_function','realpath','readlink','readgzfile','readfile','readdir', + 'read_exif_data','rawurlencode','rawurldecode','range','rand','rad2deg', + 'quotemeta','quoted_printable_decode','putenv','proc_open','proc_close','printf', + 'print_r','prev','preg_split','preg_replace_callback','preg_replace','preg_quote', + 'preg_match_all','preg_match','preg_grep','pow','posix_uname','posix_ttyname', + 'posix_times','posix_strerror','posix_setuid','posix_setsid','posix_setpgid','posix_setgid', + 'posix_seteuid','posix_setegid','posix_mkfifo','posix_kill','posix_isatty','posix_getuid', + 'posix_getsid','posix_getrlimit','posix_getpwuid','posix_getpwnam','posix_getppid','posix_getpid', + 'posix_getpgrp','posix_getpgid','posix_getlogin','posix_getgroups','posix_getgrnam','posix_getgrgid', + 'posix_getgid','posix_geteuid','posix_getegid','posix_getcwd','posix_get_last_error','posix_errno', + 'posix_ctermid','pos','popen','pi','phpversion','phpinfo', + 'phpcredits','php_uname','php_sapi_name','php_logo_guid','php_ini_scanned_files','pg_update', + 'pg_untrace','pg_unescape_bytea','pg_tty','pg_trace','pg_setclientencoding','pg_set_client_encoding', + 'pg_send_query','pg_select','pg_result_status','pg_result_seek','pg_result_error','pg_result', + 'pg_query','pg_put_line','pg_port','pg_ping','pg_pconnect','pg_options', + 'pg_numrows','pg_numfields','pg_num_rows','pg_num_fields','pg_meta_data','pg_lowrite', + 'pg_lounlink','pg_loreadall','pg_loread','pg_loopen','pg_loimport','pg_loexport', + 'pg_locreate','pg_loclose','pg_lo_write','pg_lo_unlink','pg_lo_tell','pg_lo_seek', + 'pg_lo_read_all','pg_lo_read','pg_lo_open','pg_lo_import','pg_lo_export','pg_lo_create', + 'pg_lo_close','pg_last_oid','pg_last_notice','pg_last_error','pg_insert','pg_host', + 'pg_getlastoid','pg_get_result','pg_get_pid','pg_get_notify','pg_freeresult','pg_free_result', + 'pg_fieldtype','pg_fieldsize','pg_fieldprtlen','pg_fieldnum','pg_fieldname','pg_fieldisnull', + 'pg_field_type','pg_field_size','pg_field_prtlen','pg_field_num','pg_field_name','pg_field_is_null', + 'pg_fetch_row','pg_fetch_result','pg_fetch_object','pg_fetch_assoc','pg_fetch_array','pg_fetch_all', + 'pg_exec','pg_escape_string','pg_escape_bytea','pg_errormessage','pg_end_copy','pg_delete', + 'pg_dbname','pg_copy_to','pg_copy_from','pg_convert','pg_connection_status','pg_connection_reset', + 'pg_connection_busy','pg_connect','pg_cmdtuples','pg_close','pg_clientencoding','pg_client_encoding', + 'pg_cancel_query','pg_affected_rows','pfsockopen','pclose','pathinfo','passthru', + 'parse_url','parse_str','parse_ini_file','pack','overload','output_reset_rewrite_vars', + 'output_add_rewrite_var','ord','openssl_x509_read','openssl_x509_parse','openssl_x509_free','openssl_x509_export_to_file', + 'openssl_x509_export','openssl_x509_checkpurpose','openssl_x509_check_private_key','openssl_verify','openssl_sign','openssl_seal', + 'openssl_public_encrypt','openssl_public_decrypt','openssl_private_encrypt','openssl_private_decrypt','openssl_pkey_new','openssl_pkey_get_public', + 'openssl_pkey_get_private','openssl_pkey_free','openssl_pkey_export_to_file','openssl_pkey_export','openssl_pkcs7_verify','openssl_pkcs7_sign', + 'openssl_pkcs7_encrypt','openssl_pkcs7_decrypt','openssl_open','openssl_get_publickey','openssl_get_privatekey','openssl_free_key', + 'openssl_error_string','openssl_csr_sign','openssl_csr_new','openssl_csr_export_to_file','openssl_csr_export','openlog', + 'opendir','octdec','ob_start','ob_list_handlers','ob_implicit_flush','ob_iconv_handler', + 'ob_gzhandler','ob_get_status','ob_get_level','ob_get_length','ob_get_flush','ob_get_contents', + 'ob_get_clean','ob_flush','ob_end_flush','ob_end_clean','ob_clean','number_format', + 'nl_langinfo','nl2br','ngettext','next','natsort','natcasesort', + 'mysql_unbuffered_query','mysql_thread_id','mysql_tablename','mysql_table_name','mysql_stat','mysql_selectdb', + 'mysql_select_db','mysql_result','mysql_real_escape_string','mysql_query','mysql_ping','mysql_pconnect', + 'mysql_numrows','mysql_numfields','mysql_num_rows','mysql_num_fields','mysql_listtables','mysql_listfields', + 'mysql_listdbs','mysql_list_tables','mysql_list_processes','mysql_list_fields','mysql_list_dbs','mysql_insert_id', + 'mysql_info','mysql_get_server_info','mysql_get_proto_info','mysql_get_host_info','mysql_get_client_info','mysql_freeresult', + 'mysql_free_result','mysql_fieldtype','mysql_fieldtable','mysql_fieldname','mysql_fieldlen','mysql_fieldflags', + 'mysql_field_type','mysql_field_table','mysql_field_seek','mysql_field_name','mysql_field_len','mysql_field_flags', + 'mysql_fetch_row','mysql_fetch_object','mysql_fetch_lengths','mysql_fetch_field','mysql_fetch_assoc','mysql_fetch_array', + 'mysql_escape_string','mysql_error','mysql_errno','mysql_dropdb','mysql_drop_db','mysql_dbname', + 'mysql_db_query','mysql_db_name','mysql_data_seek','mysql_createdb','mysql_create_db','mysql_connect', + 'mysql_close','mysql_client_encoding','mysql_affected_rows','mysql','mt_srand','mt_rand', + 'mt_getrandmax','move_uploaded_file','money_format','mktime','mkdir','min', + 'microtime','method_exists','metaphone','memory_get_usage','md5_file','md5', + 'mbsubstr','mbstrrpos','mbstrpos','mbstrlen','mbstrcut','mbsplit', + 'mbregex_encoding','mberegi_replace','mberegi','mbereg_search_setpos','mbereg_search_regs','mbereg_search_pos', + 'mbereg_search_init','mbereg_search_getregs','mbereg_search_getpos','mbereg_search','mbereg_replace','mbereg_match', + 'mbereg','mb_substr_count','mb_substr','mb_substitute_character','mb_strwidth','mb_strtoupper', + 'mb_strtolower','mb_strrpos','mb_strpos','mb_strlen','mb_strimwidth','mb_strcut', + 'mb_split','mb_send_mail','mb_regex_set_options','mb_regex_encoding','mb_preferred_mime_name','mb_parse_str', + 'mb_output_handler','mb_language','mb_internal_encoding','mb_http_output','mb_http_input','mb_get_info', + 'mb_eregi_replace','mb_eregi','mb_ereg_search_setpos','mb_ereg_search_regs','mb_ereg_search_pos','mb_ereg_search_init', + 'mb_ereg_search_getregs','mb_ereg_search_getpos','mb_ereg_search','mb_ereg_replace','mb_ereg_match','mb_ereg', + 'mb_encode_numericentity','mb_encode_mimeheader','mb_detect_order','mb_detect_encoding','mb_decode_numericentity','mb_decode_mimeheader', + 'mb_convert_variables','mb_convert_kana','mb_convert_encoding','mb_convert_case','max','mail', + 'magic_quotes_runtime','ltrim','lstat','long2ip','log1p','log10', + 'log','localtime','localeconv','linkinfo','link','levenshtein', + 'lcg_value','ksort','krsort','key_exists','key','juliantojd', + 'join','jewishtojd','jdtounix','jdtojulian','jdtojewish','jdtogregorian', + 'jdtofrench','jdmonthname','jddayofweek','is_writeable','is_writable','is_uploaded_file', + 'is_subclass_of','is_string','is_scalar','is_resource','is_real','is_readable', + 'is_object','is_numeric','is_null','is_nan','is_long','is_link', + 'is_integer','is_int','is_infinite','is_float','is_finite','is_file', + 'is_executable','is_double','is_dir','is_callable','is_bool','is_array', + 'is_a','iptcparse','iptcembed','ip2long','intval','ini_set', + 'ini_restore','ini_get_all','ini_get','ini_alter','in_array','import_request_variables', + 'implode','image_type_to_mime_type','ignore_user_abort','iconv_set_encoding','iconv_get_encoding','iconv', + 'i18n_mime_header_encode','i18n_mime_header_decode','i18n_ja_jp_hantozen','i18n_internal_encoding','i18n_http_output','i18n_http_input', + 'i18n_discover_encoding','i18n_convert','hypot','htmlspecialchars','htmlentities','html_entity_decode', + 'highlight_string','highlight_file','hexdec','hebrevc','hebrev','headers_sent', + 'header','gzwrite','gzuncompress','gztell','gzseek','gzrewind', + 'gzread','gzputs','gzpassthru','gzopen','gzinflate','gzgetss', + 'gzgets','gzgetc','gzfile','gzeof','gzencode','gzdeflate', + 'gzcompress','gzclose','gregoriantojd','gmstrftime','gmmktime','gmdate', + 'glob','gettype','gettimeofday','gettext','getservbyport','getservbyname', + 'getrusage','getrandmax','getprotobynumber','getprotobyname','getopt','getmyuid', + 'getmypid','getmyinode','getmygid','getmxrr','getlastmod','getimagesize', + 'gethostbynamel','gethostbyname','gethostbyaddr','getenv','getdate','getcwd', + 'getallheaders','get_resource_type','get_required_files','get_parent_class','get_object_vars','get_meta_tags', + 'get_magic_quotes_runtime','get_magic_quotes_gpc','get_loaded_extensions','get_included_files','get_include_path','get_html_translation_table', + 'get_extension_funcs','get_defined_vars','get_defined_functions','get_defined_constants','get_declared_classes','get_current_user', + 'get_class_vars','get_class_methods','get_class','get_cfg_var','get_browser','fwrite', + 'function_exists','func_num_args','func_get_args','func_get_arg','ftruncate','ftp_systype', + 'ftp_ssl_connect','ftp_size','ftp_site','ftp_set_option','ftp_rmdir','ftp_rename', + 'ftp_rawlist','ftp_quit','ftp_pwd','ftp_put','ftp_pasv','ftp_nlist', + 'ftp_nb_put','ftp_nb_get','ftp_nb_fput','ftp_nb_fget','ftp_nb_continue','ftp_mkdir', + 'ftp_mdtm','ftp_login','ftp_get_option','ftp_get','ftp_fput','ftp_fget', + 'ftp_exec','ftp_delete','ftp_connect','ftp_close','ftp_chdir','ftp_cdup', + 'ftok','ftell','fstat','fsockopen','fseek','fscanf', + 'frenchtojd','fread','fputs','fpassthru','fopen','fnmatch', + 'fmod','flush','floor','flock','floatval','filetype', + 'filesize','filepro_rowcount','filepro_retrieve','filepro_fieldwidth','filepro_fieldtype','filepro_fieldname', + 'filepro_fieldcount','filepro','fileperms','fileowner','filemtime','fileinode', + 'filegroup','filectime','fileatime','file_get_contents','file_exists','file', + 'fgetss','fgets','fgetcsv','fgetc','fflush','feof', + 'fclose','ezmlm_hash','extract','extension_loaded','expm1','explode', + 'exp','exif_thumbnail','exif_tagname','exif_read_data','exif_imagetype','exec', + 'escapeshellcmd','escapeshellarg','error_reporting','error_log','eregi_replace','eregi', + 'ereg_replace','ereg','end','easter_days','easter_date','each', + 'doubleval','dngettext','dl','diskfreespace','disk_total_space','disk_free_space', + 'dirname','dir','dgettext','deg2rad','defined','define_syslog_variables', + 'define','decoct','dechex','decbin','debug_zval_dump','debug_backtrace', + 'deaggregate','dcngettext','dcgettext','dba_sync','dba_replace','dba_popen', + 'dba_optimize','dba_open','dba_nextkey','dba_list','dba_insert','dba_handlers', + 'dba_firstkey','dba_fetch','dba_exists','dba_delete','dba_close','date', + 'current','ctype_xdigit','ctype_upper','ctype_space','ctype_punct','ctype_print', + 'ctype_lower','ctype_graph','ctype_digit','ctype_cntrl','ctype_alpha','ctype_alnum', + 'crypt','create_function','crc32','count_chars','count','cosh', + 'cos','copy','convert_cyr_string','constant','connection_status','connection_aborted', + 'compact','closelog','closedir','clearstatcache','class_exists','chunk_split', + 'chr','chown','chop','chmod','chgrp','checkdnsrr', + 'checkdate','chdir','ceil','call_user_method_array','call_user_method','call_user_func_array', + 'call_user_func','cal_to_jd','cal_info','cal_from_jd','cal_days_in_month','bzwrite', + 'bzread','bzopen','bzflush','bzerrstr','bzerror','bzerrno', + 'bzdecompress','bzcompress','bzclose','bindtextdomain','bindec','bind_textdomain_codeset', + 'bin2hex','bcsub','bcsqrt','bcscale','bcpow','bcmul', + 'bcmod','bcdiv','bccomp','bcadd','basename','base_convert', + 'base64_encode','base64_decode','atanh','atan2','atan','assert_options', + 'assert','asort','asinh','asin','arsort','array_walk', + 'array_values','array_unshift','array_unique','array_sum','array_splice','array_slice', + 'array_shift','array_search','array_reverse','array_reduce','array_rand','array_push', + 'array_pop','array_pad','array_multisort','array_merge_recursive','array_merge','array_map', + 'array_keys','array_key_exists','array_intersect_assoc','array_intersect','array_flip','array_filter', + 'array_fill','array_diff_assoc','array_diff','array_count_values','array_chunk','array_change_key_case', + 'apache_setenv','apache_response_headers','apache_request_headers','apache_note','apache_lookup_uri','apache_get_version', + 'apache_child_terminate','aggregation_info','aggregate_properties_by_regexp','aggregate_properties_by_list','aggregate_properties','aggregate_methods_by_regexp', + 'aggregate_methods_by_list','aggregate_methods','aggregate','addslashes','addcslashes','acosh', + 'acos','abs','_','echo', 'print', 'global', 'static', 'exit', 'array', 'empty', + 'eval', 'isset', 'unset', 'die', 'list' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', + '!', '@', '%', '&', '|', '/', + '<', '>', + '=', '-', '+', '*', + '.', ':', ',', ';' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + 0 => 'color: #0000ff;', + 1 => 'color: #ff0000' + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + 3 => '' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://www.php.net/{FNAME}', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '->', + 2 => '::' + ), + 'REGEXPS' => array( + 0 => array( + GESHI_SEARCH => "([a-zA-Z]+)(\\n)(.*?)(\\n)(\\1[^a-zA-Z0-9])", + GESHI_REPLACE => '\3', + GESHI_BEFORE => '\1\2', + GESHI_AFTER => '\4\5', + GESHI_MODIFIERS => 'siU' + ), + 1 => "[\\$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*" + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + 0 => array( + ' '?>' + ), + 1 => array( + ' '?>' + ), + 2 => array( + '<%' => '%>' + ), + 3 => array( + '' + ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + 1 => true, + 2 => true, + 3 => true + ), + 'TAB_WIDTH' => 4 +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/plsql.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/plsql.php new file mode 100644 index 0000000..3611930 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/plsql.php @@ -0,0 +1,256 @@ + + * Copyright: (c) 2006 Victor Engmark (http://l0b0.net/) + * Release Version: 1.0.7.21 + * Date Started: 2006/10/26 + * + * Oracle 9.2 PL/SQL language file for GeSHi. + * Formatting is based on the default setup of TOAD 8.6. + * + * CHANGES + * ------- + * 2006/10/27 (1.0.0) + * - First Release + * + * TODO (updated 2006/10/27) + * ------------------------- + * * Add < and > to brackets + * * Remove symbols which are also comment delimiters / quote marks? + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi 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. + * + * GeSHi 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 GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'PL/SQL', + 'COMMENT_SINGLE' => array(1 =>'--'), //http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/02_funds.htm#2930 + 'COMMENT_MULTI' => array('/*' => '*/'), //http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/02_funds.htm#2950 + 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, + 'QUOTEMARKS' => array("'", '"'), //http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/02_funds.htm + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + //PL/SQL reserved keywords (http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/f_words.htm#LNPLS019) + 1 => array('ZONE', 'YEAR', 'WRITE', 'WORK', 'WITH', 'WHILE', 'WHERE', + 'WHENEVER', 'WHEN', 'VIEW', 'VARCHAR2', 'VARCHAR', 'VALUES', + 'VALIDATE', 'USE', 'UPDATE', 'UNIQUE', 'UNION', 'TYPE', 'TRUE', + 'TRIGGER', 'TO', 'TIMEZONE_REGION', 'TIMEZONE_MINUTE', 'TIMEZONE_HOUR', + 'TIMEZONE_ABBR', 'TIMESTAMP', 'TIME', 'THEN', 'TABLE', 'SYNONYM', + 'SUCCESSFUL', 'SUBTYPE', 'START', 'SQLERRM', 'SQLCODE', 'SQL', 'SPACE', + 'SMALLINT', 'SHARE', 'SET', 'SEPARATE', 'SELECT', 'SECOND', + 'SAVEPOINT', 'ROWTYPE', 'ROWNUM', 'ROWID', 'ROW', 'ROLLBACK', + 'REVERSE', 'RETURN', 'RELEASE', 'RECORD', 'REAL', 'RAW', 'RANGE', + 'RAISE', 'PUBLIC', 'PROCEDURE', 'PRIVATE', 'PRIOR', 'PRAGMA', + 'POSITIVEN', 'POSITIVE', 'PLS_INTEGER', 'PCTFREE', 'PARTITION', + 'PACKAGE', 'OUT', 'OTHERS', 'ORGANIZATION', 'ORDER', 'OR', 'OPTION', + 'OPERATOR', 'OPEN', 'OPAQUE', 'ON', 'OF', 'OCIROWID', 'NUMBER_BASE', + 'NUMBER', 'NULL', 'NOWAIT', 'NOT', 'NOCOPY', 'NEXTVAL', 'NEW', + 'NATURALN', 'NATURAL', 'MONTH', 'MODE', 'MLSLABEL', 'MINUTE', 'MINUS', + 'LOOP', 'LONG', 'LOCK', 'LIMITED', 'LIKE', 'LEVEL', 'JAVA', + 'ISOLATION', 'IS', 'INTO', 'INTERVAL', 'INTERSECT', 'INTERFACE', + 'INTEGER', 'INSERT', 'INDICATOR', 'INDEX', 'IN', 'IMMEDIATE', 'IF', + 'HOUR', 'HEAP', 'HAVING', 'GROUP', 'GOTO', 'FUNCTION', 'FROM', + 'FORALL', 'FOR', 'FLOAT', 'FETCH', 'FALSE', 'EXTENDS', 'EXIT', + 'EXISTS', 'EXECUTE', 'EXCLUSIVE', 'EXCEPTION', 'END', 'ELSIF', 'ELSE', + 'DROP', 'DO', 'DISTINCT', 'DESC', 'DELETE', 'DEFAULT', 'DECLARE', + 'DECIMAL', 'DAY', 'DATE', 'CURSOR', 'CURRVAL', 'CURRENT', 'CREATE', + 'CONSTANT', 'CONNECT', 'COMPRESS', 'COMMIT', 'COMMENT', 'COLLECT', + 'CLUSTER', 'CLOSE', 'CHECK', 'CHAR_BASE', 'CHAR', 'CASE', 'BY', 'BULK', + 'BOOLEAN', 'BODY', 'BINARY_INTEGER', 'BETWEEN', 'BEGIN', 'AUTHID', + 'AT', 'ASC', 'AS', 'ARRAY', 'ANY', 'AND', 'ALTER', 'ALL'), + //SQL functions (http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96540/toc.htm & http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96540/functions101a.htm#85925) + 2 => array('XMLTRANSFORM', 'XMLSEQUENCE', 'XMLFOREST', 'XMLELEMENT', + 'XMLCONCAT', 'XMLCOLATTVAL', 'XMLAGG', 'WIDTH_BUCKET', 'VSIZE', + 'VARIANCE', 'VAR_SAMP', 'VAR_POP', 'VALUE', 'USERENV', 'USER', 'UPPER', + 'UPDATEXML', 'UNISTR', 'UID', 'TZ_OFFSET', 'TRUNC', 'TRIM', 'TREAT', + 'TRANSLATE', 'TO_YMINTERVAL', 'TO_TIMESTAMP_TZ', 'TO_TIMESTAMP', + 'TO_SINGLE_BYTE', 'TO_NUMBER', 'TO_NCLOB', 'TO_NCHAR', 'TO_MULTI_BYTE', + 'TO_LOB', 'TO_DSINTERVAL', 'TO_DATE', 'TO_CLOB', 'TO_CHAR', 'TANH', + 'TAN', 'SYSTIMESTAMP', 'SYSDATE', 'SYS_XMLGEN', 'SYS_XMLAGG', + 'SYS_TYPEID', 'SYS_GUID', 'SYS_EXTRACT_UTC', 'SYS_DBURIGEN', + 'SYS_CONTEXT', 'SYS_CONNECT_BY_PATH', 'SUM', 'SUBSTR', 'STDDEV_SAMP', + 'STDDEV_POP', 'STDDEV', 'SQRT', 'SOUNDEX', 'SINH', 'SIN', 'SIGN', + 'SESSIONTIMEZONE', 'RTRIM', 'RPAD', 'ROWIDTONCHAR', 'ROWIDTOCHAR', + 'ROW_NUMBER', 'ROUND', 'REPLACE', 'REGR_SYY', 'REGR_SXY', 'REGR_SXX', + 'REGR_SLOPE', 'REGR_R2', 'REGR_INTERCEPT', 'REGR_COUNT', 'REGR_AVGY', + 'REGR_AVGX', 'REFTOHEX', 'REF', 'RAWTONHEX', 'RAWTOHEX', + 'RATIO_TO_REPORT', 'RANK', 'POWER', 'PERCENTILE_DISC', + 'PERCENTILE_CONT', 'PERCENT_RANK', 'PATH', 'NVL2', 'NVL', + 'NUMTOYMINTERVAL', 'NUMTODSINTERVAL', 'NULLIF', 'NTILE', 'NLSSORT', + 'NLS_UPPER', 'NLS_LOWER', 'NLS_INITCAP', 'NLS_CHARSET_NAME', + 'NLS_CHARSET_ID', 'NLS_CHARSET_DECL_LEN', 'NEXT_DAY', 'NEW_TIME', + 'NCHR', 'MONTHS_BETWEEN', 'MOD', 'MIN', 'MAX', 'MAKE_REF', 'LTRIM', + 'LPAD', 'LOWER', 'LOG', 'LOCALTIMESTAMP', 'LN', 'LENGTH', 'LEAST', + 'LEAD', 'LAST_VALUE', 'LAST_DAY', 'LAST', 'LAG', 'INSTR', 'INITCAP', + 'HEXTORAW', 'GROUPING_ID', 'GROUPING', 'GROUP_ID', 'GREATEST', + 'FROM_TZ', 'FLOOR', 'FIRST_VALUE', 'FIRST', 'EXTRACTVALUE', 'EXTRACT', + 'EXP', 'EXISTSNODE', 'EMPTY_CLOB', 'EMPTY_BLOB', 'DUMP', 'DEREF', + 'DEPTH', 'DENSE_RANK', 'DECOMPOSE', 'DECODE', 'DBTIMEZONE', + 'CURRENT_TIMESTAMP', 'CURRENT_DATE', 'CUME_DIST', 'COVAR_SAMP', + 'COVAR_POP', 'COUNT', 'COSH', 'COS', 'CORR', 'CONVERT', 'CONCAT', + 'COMPOSE', 'COALESCE', 'CHR', 'CHARTOROWID', 'CEIL', 'CAST', 'BITAND', + 'BIN_TO_NUM', 'BFILENAME', 'AVG', 'ATAN2', 'ATAN', 'ASIN', 'ASCIISTR', + 'ASCII', 'ADD_MONTHS', 'ACOS', 'ABS'), + //PL/SQL packages (http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96612/intro2.htm#1025672) + 3 => array('UTL_URL', 'UTL_TCP', 'UTL_SMTP', 'UTL_REF', 'UTL_RAW', + 'UTL_PG', 'UTL_INADDR', 'UTL_HTTP', 'UTL_FILE', 'UTL_ENCODE', + 'UTL_COLL', 'SDO_UTIL', 'SDO_TUNE', 'SDO_MIGRATE', 'SDO_LRS', + 'SDO_GEOM', 'SDO_CS', 'DMBS_XMLQUERY', 'DMBS_FLASHBACK', + 'DMBS_DEFER_SYS', 'DEBUG_EXTPROC', 'DBMS_XSLPROCESSOR', 'DBMS_XPLAN', + 'DBMS_XMLSCHEMA', 'DBMS_XMLSAVE', 'DBMS_XMLPARSER', 'DBMS_XMLGEN', + 'DBMS_XMLDOM', 'DBMS_XDBT', 'DBMS_XDB_VERSION', 'DBMS_XDB', 'DBMS_WM', + 'DBMS_UTILITY', 'DBMS_TYPES', 'DBMS_TTS', 'DBMS_TRANSFORM', + 'DBMS_TRANSACTION', 'DBMS_TRACE', 'DBMS_STRM_A', 'DBMS_STRM', + 'DBMS_STORAGE_MAP', 'DBMS_STATS', 'DBMS_SQL', 'DBMS_SPACE_ADMIN', + 'DBMS_SPACE', 'DBMS_SHARED_POOL', 'DBMS_SESSION', 'DBMS_RULE_ADM', + 'DBMS_RULE', 'DBMS_ROWID', 'DBMS_RLS', 'DBMS_RESUMABLE', + 'DBMS_RESOURCE_MANAGER_PRIVS', 'DBMS_RESOURCE_MANAGER', 'DBMS_REPUTIL', + 'DBMS_REPCAT_RGT', 'DBMS_REPCAT_INSTATIATE', 'DBMS_REPCAT_ADMIN', + 'DBMS_REPCAT', 'DBMS_REPAIR', 'DBMS_REFRESH', 'DBMS_REDEFINITION', + 'DBMS_RECTIFIER_DIFF', 'DBMS_RANDOM', 'DBMS_PROPAGATION_ADM', + 'DBMS_PROFILER', 'DBMS_PIPE', 'DBMS_PCLXUTIL', 'DBMS_OUTPUT', + 'DBMS_OUTLN_EDIT', 'DBMS_OUTLN', 'DBMS_ORACLE_TRACE_USER', + 'DBMS_ORACLE_TRACE_AGENT', 'DBMS_OLAP', 'DBMS_OFFLINE_SNAPSHOT', + 'DBMS_OFFLINE_OG', 'DBMS_ODCI', 'DBMS_OBFUSCATION_TOOLKIT', + 'DBMS_MVIEW', 'DBMS_MGWMSG', 'DBMS_MGWADM', 'DBMS_METADATA', + 'DBMS_LOGSTDBY', 'DBMS_LOGMNR_D', 'DBMS_LOGMNR_CDC_SUBSCRIBE', + 'DBMS_LOGMNR_CDC_PUBLISH', 'DBMS_LOGMNR', 'DBMS_LOCK', 'DBMS_LOB', + 'DBMS_LIBCACHE', 'DBMS_LDAP', 'DBMS_JOB', 'DBMS_IOT', + 'DBMS_HS_PASSTHROUGH', 'DBMS_FGA', 'DBMS_DISTRIBUTED_TRUST_ADMIN', + 'DBMS_DESCRIBE', 'DBMS_DEFER_QUERY', 'DBMS_DEFER', 'DBMS_DEBUG', + 'DBMS_DDL', 'DBMS_CAPTURE_ADM', 'DBMS_AW', 'DBMS_AQELM', 'DBMS_AQADM', + 'DBMS_AQ', 'DBMS_APPLY_ADM', 'DBMS_APPLICATION_INFO', 'DBMS_ALERT', + 'CWM2_OLAP_AW_ACCESS'), + //PL/SQL predefined exceptions (http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/07_errs.htm#784) + 4 => array('ZERO_DIVIDE', 'VALUE_ERROR', 'TOO_MANY_ROWS', + 'TIMEOUT_ON_RESOURCE', 'SYS_INVALID_ROWID', 'SUBSCRIPT_OUTSIDE_LIMIT', + 'SUBSCRIPT_BEYOND_COUNT', 'STORAGE_ERROR', 'SELF_IS_NULL', + 'ROWTYPE_MISMATCH', 'PROGRAM_ERROR', 'NOT_LOGGED_ON', 'NO_DATA_FOUND', + 'LOGIN_DENIED', 'INVALID_NUMBER', 'INVALID_CURSOR', 'DUP_VAL_ON_INDEX', + 'CURSOR_ALREADY_OPEN', 'COLLECTION_IS_NULL', 'CASE_NOT_FOUND', + 'ACCESS_INTO_NULL'), + //Static data dictionary views (http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96536/ch2.htm) + 5 => array('USER_REPSITES', 'USER_REPSCHEMA', + 'USER_REPRESOLUTION_STATISTICS', 'USER_REPRESOLUTION_METHOD', + 'USER_REPRESOLUTION', 'USER_REPRESOL_STATS_CONTROL', 'USER_REPPROP', + 'USER_REPPRIORITY_GROUP', 'USER_REPPRIORITY', + 'USER_REPPARAMETER_COLUMN', 'USER_REPOBJECT', 'USER_REPKEY_COLUMNS', + 'USER_REPGROUPED_COLUMN', 'USER_REPGROUP_PRIVILEGES', 'USER_REPGROUP', + 'USER_REPGENOBJECTS', 'USER_REPGENERATED', 'USER_REPFLAVORS', + 'USER_REPFLAVOR_OBJECTS', 'USER_REPFLAVOR_COLUMNS', 'USER_REPDDL', + 'USER_REPCONFLICT', 'USER_REPCOLUMN_GROUP', 'USER_REPCOLUMN', + 'USER_REPCATLOG', 'USER_REPCAT_USER_PARM_VALUES', + 'USER_REPCAT_USER_AUTHORIZATIONS', 'USER_REPCAT_TEMPLATE_SITES', + 'USER_REPCAT_TEMPLATE_PARMS', 'USER_REPCAT_TEMPLATE_OBJECTS', + 'USER_REPCAT_REFRESH_TEMPLATES', 'USER_REPCAT', 'USER_REPAUDIT_COLUMN', + 'USER_REPAUDIT_ATTRIBUTE', 'DBA_REPSITES_NEW', 'DBA_REPSITES', + 'DBA_REPSCHEMA', 'DBA_REPRESOLUTION_STATISTICS', + 'DBA_REPRESOLUTION_METHOD', 'DBA_REPRESOLUTION', + 'DBA_REPRESOL_STATS_CONTROL', 'DBA_REPPROP', 'DBA_REPPRIORITY_GROUP', + 'DBA_REPPRIORITY', 'DBA_REPPARAMETER_COLUMN', 'DBA_REPOBJECT', + 'DBA_REPKEY_COLUMNS', 'DBA_REPGROUPED_COLUMN', + 'DBA_REPGROUP_PRIVILEGES', 'DBA_REPGROUP', 'DBA_REPGENOBJECTS', + 'DBA_REPGENERATED', 'DBA_REPFLAVORS', 'DBA_REPFLAVOR_OBJECTS', + 'DBA_REPFLAVOR_COLUMNS', 'DBA_REPEXTENSIONS', 'DBA_REPDDL', + 'DBA_REPCONFLICT', 'DBA_REPCOLUMN_GROUP', 'DBA_REPCOLUMN', + 'DBA_REPCATLOG', 'DBA_REPCAT_USER_PARM_VALUES', + 'DBA_REPCAT_USER_AUTHORIZATIONS', 'DBA_REPCAT_TEMPLATE_SITES', + 'DBA_REPCAT_TEMPLATE_PARMS', 'DBA_REPCAT_TEMPLATE_OBJECTS', + 'DBA_REPCAT_REFRESH_TEMPLATES', 'DBA_REPCAT_EXCEPTIONS', 'DBA_REPCAT', + 'DBA_REPAUDIT_COLUMN', 'DBA_REPAUDIT_ATTRIBUTE', 'ALL_REPSITES', + 'ALL_REPSCHEMA', 'ALL_REPRESOLUTION_STATISTICS', + 'ALL_REPRESOLUTION_METHOD', 'ALL_REPRESOLUTION', + 'ALL_REPRESOL_STATS_CONTROL', 'ALL_REPPROP', 'ALL_REPPRIORITY_GROUP', + 'ALL_REPPRIORITY', 'ALL_REPPARAMETER_COLUMN', 'ALL_REPOBJECT', + 'ALL_REPKEY_COLUMNS', 'ALL_REPGROUPED_COLUMN', + 'ALL_REPGROUP_PRIVILEGES', 'ALL_REPGROUP', 'ALL_REPGENOBJECTS', + 'ALL_REPGENERATED', 'ALL_REPFLAVORS', 'ALL_REPFLAVOR_OBJECTS', + 'ALL_REPFLAVOR_COLUMNS', 'ALL_REPDDL', 'ALL_REPCONFLICT', + 'ALL_REPCOLUMN_GROUP', 'ALL_REPCOLUMN', 'ALL_REPCATLOG', + 'ALL_REPCAT_USER_PARM_VALUES', 'ALL_REPCAT_USER_AUTHORIZATIONS', + 'ALL_REPCAT_TEMPLATE_SITES', 'ALL_REPCAT_TEMPLATE_PARMS', + 'ALL_REPCAT_TEMPLATE_OBJECTS', 'ALL_REPCAT_REFRESH_TEMPLATES', + 'ALL_REPCAT', 'ALL_REPAUDIT_COLUMN', 'ALL_REPAUDIT_ATTRIBUTE') + ), + 'SYMBOLS' => array( + //PL/SQL delimiters (http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/02_funds.htm#2732) + '+', '%', "'", '.', '/', '(', ')', ':', ',', '*', '"', '=', '<', '>', '@', ';', '-', ':=', '=>', '||', '**', '<<', '>>', '/*', '*/', '..', '<>', '!=', '~=', '^=', '<=', '>=' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00F;', + 2 => 'color: #000;', + 3 => 'color: #00F;', + 4 => 'color: #F00;', + 5 => 'color: #800;' + ), + 'COMMENTS' => array( + 1 => 'color: #080; font-style: italic;', + 'MULTI' => 'color: #080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #00F;' + ), + 'STRINGS' => array( + 0 => 'color: #F00;' + ), + 'NUMBERS' => array( + 0 => 'color: #800;' + ), + 'METHODS' => array( + 0 => 'color: #0F0;' + ), + 'SYMBOLS' => array( + 0 => 'color: #00F;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + 0 => 'color: #0F0;' + ) + ), + 'URLS' => array( + 1 => 'http://www.oracle.com/pls/db92/db92.drilldown?word={FNAME}', + 2 => 'http://www.oracle.com/pls/db92/db92.drilldown?word={FNAME}', + 3 => 'http://www.oracle.com/pls/db92/db92.drilldown?word={FNAME}', + 4 => 'http://www.oracle.com/pls/db92/db92.drilldown?word={FNAME}', + 5 => 'http://www.oracle.com/pls/db92/db92.drilldown?word={FNAME}' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array(), + 'REGEXPS' => array(), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array() +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/python.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/python.php new file mode 100644 index 0000000..96b99d8 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/python.php @@ -0,0 +1,227 @@ + 'Python', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"', "'", '"""'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + + /* + ** Set 1: reserved words + ** http://python.org/doc/current/ref/keywords.html + */ + 1 => array( + 'and', 'del', 'for', 'is', 'raise', 'assert', 'elif', 'from', 'lambda', 'return', 'break', + 'else', 'global', 'not', 'try', 'class', 'except', 'if', 'or', 'while', 'continue', 'exec', + 'import', 'pass', 'yield', 'def', 'finally', 'in', 'print' + ), + + /* + ** Set 2: builtins + ** http://python.org/doc/current/lib/built-in-funcs.html + */ + 2 => array( + '__import__', 'abs', 'basestring', 'bool', 'callable', 'chr', 'classmethod', 'cmp', + 'compile', 'complex', 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'execfile', + 'file', 'filter', 'float', 'frozenset', 'getattr', 'globals', 'hasattr', 'hash', 'help', + 'hex', 'id', 'input', 'int', 'isinstance', 'issubclass', 'iter', 'len', 'list', 'locals', + 'long', 'map', 'max', 'min', 'object', 'oct', 'open', 'ord', 'pow', 'property', 'range', + 'raw_input', 'reduce', 'reload', 'repr', 'reversed', 'round', 'set', 'setattr', 'slice', + 'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type', 'unichr', 'unicode', + 'vars', 'xrange', 'zip', + // Built-in constants: http://python.org/doc/current/lib/node35.html + 'False', 'True', 'None', 'NotImplemented', 'Ellipsis', + // Built-in Exceptions: http://python.org/doc/current/lib/module-exceptions.html + 'Exception', 'StandardError', 'ArithmeticError', 'LookupError', 'EnvironmentError', + 'AssertionError', 'AttributeError', 'EOFError', 'FloatingPointError', 'IOError', + 'ImportError', 'IndexError', 'KeyError', 'KeyboardInterrupt', 'MemoryError', 'NameError', + 'NotImplementedError', 'OSError', 'OverflowError', 'ReferenceError', 'RuntimeError', + 'StopIteration', 'SyntaxError', 'SystemError', 'SystemExit', 'TypeError', + 'UnboundlocalError', 'UnicodeError', 'UnicodeEncodeError', 'UnicodeDecodeError', + 'UnicodeTranslateError', 'ValueError', 'WindowsError', 'ZeroDivisionError', 'Warning', + 'UserWarning', 'DeprecationWarning', 'PendingDeprecationWarning', 'SyntaxWarning', + 'RuntimeWarning', 'FutureWarning', + // self: this is a common python convention (but not a reserved word) + 'self' + ), + + /* + ** Set 3: standard library + ** http://python.org/doc/current/lib/modindex.html + */ + 3 => array( + '__builtin__', '__future__', '__main__', '_winreg', 'aifc', 'AL', 'al', 'anydbm', + 'array', 'asynchat', 'asyncore', 'atexit', 'audioop', 'base64', 'BaseHTTPServer', + 'Bastion', 'binascii', 'binhex', 'bisect', 'bsddb', 'bz2', 'calendar', 'cd', 'cgi', + 'CGIHTTPServer', 'cgitb', 'chunk', 'cmath', 'cmd', 'code', 'codecs', 'codeop', + 'collections', 'colorsys', 'commands', 'compileall', 'compiler', 'compiler', + 'ConfigParser', 'Cookie', 'cookielib', 'copy', 'copy_reg', 'cPickle', 'crypt', + 'cStringIO', 'csv', 'curses', 'datetime', 'dbhash', 'dbm', 'decimal', 'DEVICE', + 'difflib', 'dircache', 'dis', 'distutils', 'dl', 'doctest', 'DocXMLRPCServer', 'dumbdbm', + 'dummy_thread', 'dummy_threading', 'email', 'encodings', 'errno', 'exceptions', 'fcntl', + 'filecmp', 'fileinput', 'FL', 'fl', 'flp', 'fm', 'fnmatch', 'formatter', 'fpectl', + 'fpformat', 'ftplib', 'gc', 'gdbm', 'getopt', 'getpass', 'gettext', 'GL', 'gl', 'glob', + 'gopherlib', 'grp', 'gzip', 'heapq', 'hmac', 'hotshot', 'htmlentitydefs', 'htmllib', + 'HTMLParser', 'httplib', 'imageop', 'imaplib', 'imgfile', 'imghdr', 'imp', 'inspect', + 'itertools', 'jpeg', 'keyword', 'linecache', 'locale', 'logging', 'mailbox', 'mailcap', + 'marshal', 'math', 'md5', 'mhlib', 'mimetools', 'mimetypes', 'MimeWriter', 'mimify', + 'mmap', 'msvcrt', 'multifile', 'mutex', 'netrc', 'new', 'nis', 'nntplib', 'operator', + 'optparse', 'os', 'ossaudiodev', 'parser', 'pdb', 'pickle', 'pickletools', 'pipes', + 'pkgutil', 'platform', 'popen2', 'poplib', 'posix', 'posixfile', 'pprint', 'profile', + 'pstats', 'pty', 'pwd', 'py_compile', 'pyclbr', 'pydoc', 'Queue', 'quopri', 'random', + 're', 'readline', 'repr', 'resource', 'rexec', 'rfc822', 'rgbimg', 'rlcompleter', + 'robotparser', 'sched', 'ScrolledText', 'select', 'sets', 'sgmllib', 'sha', 'shelve', + 'shlex', 'shutil', 'signal', 'SimpleHTTPServer', 'SimpleXMLRPCServer', 'site', 'smtpd', + 'smtplib', 'sndhdr', 'socket', 'SocketServer', 'stat', 'statcache', 'statvfs', 'string', + 'StringIO', 'stringprep', 'struct', 'subprocess', 'sunau', 'SUNAUDIODEV', 'sunaudiodev', + 'symbol', 'sys', 'syslog', 'tabnanny', 'tarfile', 'telnetlib', 'tempfile', 'termios', + 'test', 'textwrap', 'thread', 'threading', 'time', 'timeit', 'Tix', 'Tkinter', 'token', + 'tokenize', 'traceback', 'tty', 'turtle', 'types', 'unicodedata', 'unittest', 'urllib2', + 'urllib', 'urlparse', 'user', 'UserDict', 'UserList', 'UserString', 'uu', 'warnings', + 'wave', 'weakref', 'webbrowser', 'whichdb', 'whrandom', 'winsound', 'xdrlib', 'xml', + 'xmllib', 'xmlrpclib', 'zipfile', 'zipimport', 'zlib' + ), + + /* + ** Set 4: special methods + ** http://python.org/doc/current/ref/specialnames.html + */ + 4 => array( + /* + // Iterator types: http://python.org/doc/current/lib/typeiter.html + '__iter__', 'next', + // String types: http://python.org/doc/current/lib/string-methods.html + 'capitalize', 'center', 'count', 'decode', 'encode', 'endswith', 'expandtabs', + 'find', 'index', 'isalnum', 'isalpha', 'isdigit', 'islower', 'isspace', 'istitle', + 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'replace', 'rfind', 'rindex', 'rjust', + 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', + 'translate', 'upper', 'zfill', + */ + // Basic customization: http://python.org/doc/current/ref/customization.html + '__new__', '__init__', '__del__', '__repr__', '__str__', + '__lt__', '__le__', '__eq__', '__ne__', '__gt__', '__ge__', '__cmp__', '__rcmp__', + '__hash__', '__nonzero__', '__unicode__', '__dict__', + // Attribute access: http://python.org/doc/current/ref/attribute-access.html + '__setattr__', '__delattr__', '__getattr__', '__getattribute__', '__get__', '__set__', + '__delete__', '__slots__', + // Class creation, callable objects + '__metaclass__', '__call__', + // Container types: http://python.org/doc/current/ref/sequence-types.html + '__len__', '__getitem__', '__setitem__', '__delitem__', '__iter__', '__contains__', + '__getslice__', '__setslice__', '__delslice__', + // Numeric types: http://python.org/doc/current/ref/numeric-types.html + '__abs__','__add__','__and__','__coerce__','__div__','__divmod__','__float__', + '__hex__','__iadd__','__isub__','__imod__','__idiv__','__ipow__','__iand__', + '__ior__','__ixor__', '__ilshift__','__irshift__','__invert__','__int__', + '__long__','__lshift__', + '__mod__','__mul__','__neg__','__oct__','__or__','__pos__','__pow__', + '__radd__','__rdiv__','__rdivmod__','__rmod__','__rpow__','__rlshift__','__rrshift__', + '__rshift__','__rsub__','__rmul__','__repr__','__rand__','__rxor__','__ror__', + '__sub__','__xor__' + ) + + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '*', '&', '%', '!', ';', '<', '>', '?', '`' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => true, + 2 => true, + 3 => true, + 4 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #ff7700;font-weight:bold;', // Reserved + 2 => 'color: #008000;', // Built-ins + self + 3 => 'color: #dc143c;', // Standard lib + 4 => 'color: #0000cd;' // Special methods + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: black;' + ), + 'STRINGS' => array( + 0 => 'color: #483d8b;' + ), + 'NUMBERS' => array( + 0 => 'color: #ff4500;' + ), + 'METHODS' => array( + 1 => 'color: black;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/qbasic.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/qbasic.php new file mode 100644 index 0000000..61dacfc --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/qbasic.php @@ -0,0 +1,146 @@ + 'QBasic/QuickBASIC', + 'COMMENT_SINGLE' => array(1 => "'", 2 => ' REM', 3 => "\tREM"), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'DO', 'LOOP', 'WHILE', 'WEND', 'THEN', 'ELSE', 'ELSEIF', 'IF', + 'FOR', 'TO', 'NEXT', 'STEP', 'GOTO', 'GOSUB', 'RETURN', 'RESUME', 'SELECT', + 'CASE', 'UNTIL' + ), + 3 => array( + 'ABS', 'ABSOLUTE', 'ACCESS', 'ALIAS', 'AND', 'ANY', 'APPEND', 'AS', 'ASC', 'ATN', + 'BASE', 'BEEP', 'BINARY', 'BLOAD', 'BSAVE', 'BYVAL', 'CALL', 'CALLS', 'CASE', + 'CDBL', 'CDECL', 'CHAIN', 'CHDIR', 'CHDIR', 'CHR$', 'CINT', 'CIRCLE', 'CLEAR', + 'CLNG', 'CLOSE', 'CLS', 'COM', 'COMMAND$', 'COMMON', 'CONST', 'COS', 'CSNG', + 'CSRLIN', 'CVD', 'CVDMBF', 'CVI', 'CVL', 'CVS', 'CVSMDF', 'DATA', 'DATE$', + 'DECLARE', 'DEF', 'FN', 'SEG', 'DEFDBL', 'DEFINT', 'DEFLNG', 'DEFSNG', 'DEFSTR', + 'DIM', 'DOUBLE', 'DRAW', 'END', 'ENVIRON', 'ENVIRON$', 'EOF', 'EQV', 'ERASE', + 'ERDEV', 'ERDEV$', 'ERL', 'ERR', 'ERROR', 'EXIT', 'EXP', 'FIELD', 'FILEATTR', + 'FILES', 'FIX', 'FRE', 'FREEFILE', 'FUNCTION', 'GET', 'HEX$', 'IMP', 'INKEY$', + 'INP', 'INPUT', 'INPUT$', 'INSTR', 'INT', 'INTEGER', 'IOCTL', 'IOCTL$', 'IS', + 'KEY', 'KILL', 'LBOUND', 'LCASE$', 'LEFT$', 'LEN', 'LET', 'LINE', 'LIST', 'LOC', + 'LOCAL', 'LOCATE', 'LOCK', 'LOF', 'LOG', 'UNLOCK', 'LONG', 'LPOS', 'LPRINT', + 'LSET', 'LTRIM$', 'MID$', 'MKD$', 'MKDIR', 'MKDMBF$', 'MKI$', 'MKL$', + 'MKS$', 'MKSMBF$', 'MOD', 'NAME', 'NOT', 'OCT$', 'OFF', 'ON', 'PEN', 'PLAY', + 'STRIG', 'TIMER', 'UEVENT', 'OPEN', 'OPTION', 'BASE', 'OR', 'OUT', 'OUTPUT', + 'PAINT', 'PALETTE', 'PCOPY', 'PEEK', 'PMAP', 'POINT', 'POKE', 'POS', 'PRESET', + 'PRINT', 'USING', 'PSET', 'PUT', 'RANDOM', 'RANDOMIZE', 'READ', 'REDIM', 'RESET', + 'RESTORE', 'RIGHT$', 'RMDIR', 'RND', 'RSET', 'RTRIM$', 'RUN', 'SADD', 'SCREEN', + 'SEEK', 'SETMEM', 'SGN', 'SHARED', 'SHELL', 'SIGNAL', 'SIN', 'SINGLE', 'SLEEP', + 'SOUND', 'SPACE$', 'SPC', 'SQR', 'STATIC', 'STICK', 'STOP', 'STR$', 'STRIG', + 'STRING', 'STRING$', 'SUB', 'SWAP', 'SYSTEM', 'TAB', 'TAN', 'TIME$', 'TIMER', + 'TROFF', 'TRON', 'TYPE', 'UBOUND', 'UCASE$', 'UEVENT', 'UNLOCK', 'USING', 'VAL', + 'VARPTR', 'VARPTR$', 'VARSEG', 'VIEW', 'WAIT', 'WIDTH', 'WINDOW', 'WRITE', 'XOR' + ) + ), + 'SYMBOLS' => array( + '(', ')' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 3 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #a1a100;', + 3 => 'color: #000066;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080;', + 2 => 'color: #808080;', + 3 => 'color: #808080;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 3 => 'http://www.qbasicnews.com/qboho/qck{FNAMEL}.shtml' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 8 +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/rails.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/rails.php new file mode 100644 index 0000000..c7e3960 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/rails.php @@ -0,0 +1,404 @@ + 'Rails', + 'COMMENT_SINGLE' => array(1 => "#"), + 'COMMENT_MULTI' => array("=begin" => "=end"), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"', '`','\''), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'alias', 'and', 'begin', 'break', 'case', 'class', + 'def', 'defined', 'do', 'else', 'elsif', 'end', + 'ensure', 'for', 'if', 'in', 'module', 'while', + 'next', 'not', 'or', 'redo', 'rescue', 'yield', + 'retry', 'super', 'then', 'undef', 'unless', + 'until', 'when', 'BEGIN', 'END', 'include' + ), + 2 => array( + '__FILE__', '__LINE__', 'false', 'nil', 'self', 'true', + 'return' + ), + 3 => array( + 'Array', 'Float', 'Integer', 'String', 'at_exit', + 'autoload', 'binding', 'caller', 'catch', 'chop', 'chop!', + 'chomp', 'chomp!', 'eval', 'exec', 'exit', 'exit!', 'fail', + 'fork', 'format', 'gets', 'global_variables', 'gsub', 'gsub!', + 'iterator?', 'lambda', 'load', 'local_variables', 'loop', + 'open', 'p', 'print', 'printf', 'proc', 'putc', 'puts', + 'raise', 'rand', 'readline', 'readlines', 'require', 'select', + 'sleep', 'split', 'sprintf', 'srand', 'sub', 'sub!', 'syscall', + 'system', 'trace_var', 'trap', 'untrace_var' + ), + 4 => array( + 'Abbrev', 'ArgumentError', 'Base64', 'Benchmark', + 'Benchmark::Tms', 'Bignum', 'Binding', 'CGI', 'CGI::Cookie', + 'CGI::HtmlExtension', 'CGI::QueryExtension', + 'CGI::Session', 'CGI::Session::FileStore', + 'CGI::Session::MemoryStore', 'Class', 'Comparable', 'Complex', + 'ConditionVariable', 'Continuation', 'Data', + 'Date', 'DateTime', 'Delegator', 'Dir', 'EOFError', 'ERB', + 'ERB::Util', 'Enumerable', 'Enumerable::Enumerator', 'Errno', + 'Exception', 'FalseClass', 'File', + 'File::Constants', 'File::Stat', 'FileTest', 'FileUtils', + 'FileUtils::DryRun', 'FileUtils::NoWrite', + 'FileUtils::StreamUtils_', 'FileUtils::Verbose', 'Find', + 'Fixnum', 'FloatDomainError', 'Forwardable', 'GC', 'Generator', + 'Hash', 'IO', 'IOError', 'Iconv', 'Iconv::BrokenLibrary', + 'Iconv::Failure', 'Iconv::IllegalSequence', + 'Iconv::InvalidCharacter', 'Iconv::InvalidEncoding', + 'Iconv::OutOfRange', 'IndexError', 'Interrupt', 'Kernel', + 'LoadError', 'LocalJumpError', 'Logger', 'Logger::Application', + 'Logger::Error', 'Logger::Formatter', 'Logger::LogDevice', + 'Logger::LogDevice::LogDeviceMutex', 'Logger::Severity', + 'Logger::ShiftingError', 'Marshal', 'MatchData', + 'Math', 'Matrix', 'Method', 'Module', 'Mutex', 'NameError', + 'NameError::message', 'NilClass', 'NoMemoryError', + 'NoMethodError', 'NotImplementedError', 'Numeric', 'Object', + 'ObjectSpace', 'Observable', 'PStore', 'PStore::Error', + 'Pathname', 'Precision', 'Proc', 'Process', 'Process::GID', + 'Process::Status', 'Process::Sys', 'Process::UID', 'Queue', + 'Range', 'RangeError', 'Rational', 'Regexp', 'RegexpError', + 'RuntimeError', 'ScriptError', 'SecurityError', 'Set', + 'Shellwords', 'Signal', 'SignalException', 'SimpleDelegator', + 'SingleForwardable', 'Singleton', 'SingletonClassMethods', + 'SizedQueue', 'SortedSet', 'StandardError', 'StringIO', + 'StringScanner', 'StringScanner::Error', 'Struct', 'Symbol', + 'SyncEnumerator', 'SyntaxError', 'SystemCallError', + 'SystemExit', 'SystemStackError', 'Tempfile', + 'Test::Unit::TestCase', 'Test::Unit', 'Test', 'Thread', + 'ThreadError', 'ThreadGroup', + 'ThreadsWait', 'Time', 'TrueClass', 'TypeError', 'URI', + 'URI::BadURIError', 'URI::Error', 'URI::Escape', 'URI::FTP', + 'URI::Generic', 'URI::HTTP', 'URI::HTTPS', + 'URI::InvalidComponentError', 'URI::InvalidURIError', + 'URI::LDAP', 'URI::MailTo', 'URI::REGEXP', + 'URI::REGEXP::PATTERN', 'UnboundMethod', 'Vector', 'YAML', + 'ZeroDivisionError', 'Zlib', + 'Zlib::BufError', 'Zlib::DataError', 'Zlib::Deflate', + 'Zlib::Error', 'Zlib::GzipFile', 'Zlib::GzipFile::CRCError', + 'Zlib::GzipFile::Error', 'Zlib::GzipFile::LengthError', + 'Zlib::GzipFile::NoFooter', 'Zlib::GzipReader', + 'Zlib::GzipWriter', 'Zlib::Inflate', 'Zlib::MemError', + 'Zlib::NeedDict', 'Zlib::StreamEnd', 'Zlib::StreamError', + 'Zlib::VersionError', + 'Zlib::ZStream', + 'ActionController::AbstractRequest', + 'ActionController::Assertions::DomAssertions', + 'ActionController::Assertions::ModelAssertions', + 'ActionController::Assertions::ResponseAssertions', + 'ActionController::Assertions::RoutingAssertions', + 'ActionController::Assertions::SelectorAssertions', + 'ActionController::Assertions::TagAssertions', + 'ActionController::Base', + 'ActionController::Benchmarking::ClassMethods', + 'ActionController::Caching', + 'ActionController::Caching::Actions', + 'ActionController::Caching::Actions::ActionCachePath', + 'ActionController::Caching::Fragments', + 'ActionController::Caching::Pages', + 'ActionController::Caching::Pages::ClassMethods', + 'ActionController::Caching::Sweeping', + 'ActionController::Components', + 'ActionController::Components::ClassMethods', + 'ActionController::Components::InstanceMethods', + 'ActionController::Cookies', + 'ActionController::Filters::ClassMethods', + 'ActionController::Flash', + 'ActionController::Flash::FlashHash', + 'ActionController::Helpers::ClassMethods', + 'ActionController::Integration::Session', + 'ActionController::IntegrationTest', + 'ActionController::Layout::ClassMethods', + 'ActionController::Macros', + 'ActionController::Macros::AutoComplete::ClassMethods', + 'ActionController::Macros::InPlaceEditing::ClassMethods', + 'ActionController::MimeResponds::InstanceMethods', + 'ActionController::Pagination', + 'ActionController::Pagination::ClassMethods', + 'ActionController::Pagination::Paginator', + 'ActionController::Pagination::Paginator::Page', + 'ActionController::Pagination::Paginator::Window', + 'ActionController::Rescue', 'ActionController::Resources', + 'ActionController::Routing', + 'ActionController::Scaffolding::ClassMethods', + 'ActionController::SessionManagement::ClassMethods', + 'ActionController::Streaming', 'ActionController::TestProcess', + 'ActionController::TestUploadedFile', + 'ActionController::UrlWriter', + 'ActionController::Verification::ClassMethods', + 'ActionMailer::Base', 'ActionView::Base', + 'ActionView::Helpers::ActiveRecordHelper', + 'ActionView::Helpers::AssetTagHelper', + 'ActionView::Helpers::BenchmarkHelper', + 'ActionView::Helpers::CacheHelper', + 'ActionView::Helpers::CaptureHelper', + 'ActionView::Helpers::DateHelper', + 'ActionView::Helpers::DebugHelper', + 'ActionView::Helpers::FormHelper', + 'ActionView::Helpers::FormOptionsHelper', + 'ActionView::Helpers::FormTagHelper', + 'ActionView::Helpers::JavaScriptHelper', + 'ActionView::Helpers::JavaScriptMacrosHelper', + 'ActionView::Helpers::NumberHelper', + 'ActionView::Helpers::PaginationHelper', + 'ActionView::Helpers::PrototypeHelper', + 'ActionView::Helpers::PrototypeHelper::JavaScriptGenerator::GeneratorMethods', + 'ActionView::Helpers::ScriptaculousHelper', + 'ActionView::Helpers::TagHelper', + 'ActionView::Helpers::TextHelper', + 'ActionView::Helpers::UrlHelper', 'ActionView::Partials', + 'ActionWebService::API::Method', 'ActionWebService::Base', + 'ActionWebService::Client::Soap', + 'ActionWebService::Client::XmlRpc', + 'ActionWebService::Container::ActionController::ClassMethods', + 'ActionWebService::Container::Delegated::ClassMethods', + 'ActionWebService::Container::Direct::ClassMethods', + 'ActionWebService::Invocation::ClassMethods', + 'ActionWebService::Scaffolding::ClassMethods', + 'ActionWebService::SignatureTypes', 'ActionWebService::Struct', + 'ActiveRecord::Acts::List::ClassMethods', + 'ActiveRecord::Acts::List::InstanceMethods', + 'ActiveRecord::Acts::NestedSet::ClassMethods', + 'ActiveRecord::Acts::NestedSet::InstanceMethods', + 'ActiveRecord::Acts::Tree::ClassMethods', + 'ActiveRecord::Acts::Tree::InstanceMethods', + 'ActiveRecord::Aggregations::ClassMethods', + 'ActiveRecord::Associations::ClassMethods', + 'ActiveRecord::AttributeMethods::ClassMethods', + 'ActiveRecord::Base', + 'ActiveRecord::Calculations::ClassMethods', + 'ActiveRecord::Callbacks', + 'ActiveRecord::ConnectionAdapters::AbstractAdapter', + 'ActiveRecord::ConnectionAdapters::Column', + 'ActiveRecord::ConnectionAdapters::DB2Adapter', + 'ActiveRecord::ConnectionAdapters::DatabaseStatements', + 'ActiveRecord::ConnectionAdapters::FirebirdAdapter', + 'ActiveRecord::ConnectionAdapters::FrontBaseAdapter', + 'ActiveRecord::ConnectionAdapters::MysqlAdapter', + 'ActiveRecord::ConnectionAdapters::OpenBaseAdapter', + 'ActiveRecord::ConnectionAdapters::OracleAdapter', + 'ActiveRecord::ConnectionAdapters::PostgreSQLAdapter', + 'ActiveRecord::ConnectionAdapters::Quoting', + 'ActiveRecord::ConnectionAdapters::SQLServerAdapter', + 'ActiveRecord::ConnectionAdapters::SQLiteAdapter', + 'ActiveRecord::ConnectionAdapters::SchemaStatements', + 'ActiveRecord::ConnectionAdapters::SybaseAdapter::ColumnWithIdentity', + 'ActiveRecord::ConnectionAdapters::SybaseAdapterContext', + 'ActiveRecord::ConnectionAdapters::TableDefinition', + 'ActiveRecord::Errors', 'ActiveRecord::Locking', + 'ActiveRecord::Locking::Optimistic', + 'ActiveRecord::Locking::Optimistic::ClassMethods', + 'ActiveRecord::Locking::Pessimistic', + 'ActiveRecord::Migration', 'ActiveRecord::Observer', + 'ActiveRecord::Observing::ClassMethods', + 'ActiveRecord::Reflection::ClassMethods', + 'ActiveRecord::Reflection::MacroReflection', + 'ActiveRecord::Schema', 'ActiveRecord::Timestamp', + 'ActiveRecord::Transactions::ClassMethods', + 'ActiveRecord::Validations', + 'ActiveRecord::Validations::ClassMethods', + 'ActiveRecord::XmlSerialization', + 'ActiveSupport::CachingTools::HashCaching', + 'ActiveSupport::CoreExtensions::Array::Conversions', + 'ActiveSupport::CoreExtensions::Array::Grouping', + 'ActiveSupport::CoreExtensions::Date::Conversions', + 'ActiveSupport::CoreExtensions::Hash::Conversions', + 'ActiveSupport::CoreExtensions::Hash::Conversions::ClassMethods', + 'ActiveSupport::CoreExtensions::Hash::Diff', + 'ActiveSupport::CoreExtensions::Hash::Keys', + 'ActiveSupport::CoreExtensions::Hash::ReverseMerge', + 'ActiveSupport::CoreExtensions::Integer::EvenOdd', + 'ActiveSupport::CoreExtensions::Integer::Inflections', + 'ActiveSupport::CoreExtensions::Numeric::Bytes', + 'ActiveSupport::CoreExtensions::Numeric::Time', + 'ActiveSupport::CoreExtensions::Pathname::CleanWithin', + 'ActiveSupport::CoreExtensions::Range::Conversions', + 'ActiveSupport::CoreExtensions::String::Access', + 'ActiveSupport::CoreExtensions::String::Conversions', + 'ActiveSupport::CoreExtensions::String::Inflections', + 'ActiveSupport::CoreExtensions::String::Iterators', + 'ActiveSupport::CoreExtensions::String::StartsEndsWith', + 'ActiveSupport::CoreExtensions::String::Unicode', + 'ActiveSupport::CoreExtensions::Time::Calculations', + 'ActiveSupport::CoreExtensions::Time::Calculations::ClassMethods', + 'ActiveSupport::CoreExtensions::Time::Conversions', + 'ActiveSupport::Multibyte::Chars', + 'ActiveSupport::Multibyte::Handlers::UTF8Handler', 'Binding', + 'Breakpoint', 'Builder::BlankSlate', 'Builder::XmlMarkup', + 'Enumerable', 'Fixtures', + 'HTML::Selector', 'HashWithIndifferentAccess', 'Inflector', + 'Inflector::Inflections', 'Mime', 'Mime::Type', + 'OCI8AutoRecover', 'Symbol', 'TimeZone', 'XmlSimple' + ), + 5 => array( + 'image_tag', 'link_to', 'link_to_remote', 'javascript_include_tag', + 'assert_equal', 'assert_not_equal', 'before_filter', + 'after_filter', 'render', 'redirect_to', 'hide_action', + 'render_to_string', 'url_for', 'controller_name', + 'controller_class_name', 'controller_path', 'session', + 'render_component', 'render_component_as_string', 'cookie', + 'layout', 'flash', 'auto_complete_for', 'in_place_editor_for', + 'respond_to', 'paginate', 'current_page', 'each', 'first', + 'first_page', 'last_page', 'last', 'length', 'new', 'page_count', + 'previous', 'next', 'scaffold', 'session', 'send_data', + 'send_file', 'deliver', 'receive', 'error_messages_for', + 'error_message_on', 'form', 'input', 'stylesheet_link_tag', + 'stylesheet_path', 'content_for', 'select_date', 'select', 'ago', + 'month', 'day', 'check_box', 'fields_for', 'file_field', + 'form_for', 'hidden_field', 'text_area', 'password_field', + 'collection_select', 'options_for_select', + 'options_from_collection_for_select', 'file_field_tag', + 'form_for_tag', 'hidden_field_tag', 'text_area_tag', + 'password_field_tag', 'link_to_function', 'javascript_tag', + 'human_size', 'number_to_currency', 'pagination_links', + 'form_remote_tag', 'form_remote_for', 'link_to_remote', + 'submit_to_remote', 'remote_function', 'observe_form', + 'observe_field', 'remote_form_for', 'options_for_ajax', 'alert', + 'call', 'assign', 'show', 'hide', 'insert_html', 'sortable', + 'toggle', 'visual_effect', 'replace', 'replace_html', 'remove', + 'save', 'save!', 'draggable', 'drop_receiving', 'literal', + 'draggable_element', 'drop_receiving_element', 'sortable_element', + 'content_tag', 'tag', 'link_to_image', 'link_to_if', + 'link_to_unless', 'mail_to', 'link_image_to', 'button_to', + 'current_page?', 'act_as_list', 'act_as_nested', 'act_as_tree', + 'has_many', 'has_one', 'belongs_to', 'has_many_and_belogns_to', + 'delete', 'destroy', 'destroy_all', 'clone', 'deep_clone', 'copy', + 'update', 'table_name', 'primary_key', 'sum', 'maximun', 'minimum', + 'count', 'size', 'after_save', 'after_create', 'before_save', + 'before_create', 'add_to_base', 'errors', 'add', 'validate', + 'validate', 'validates_presence_of', 'validates_format_of', + 'validates_numericality_of', 'validates_uniqueness_of', + 'validates_length_of', 'validates_format_of', 'validates_size_of', + 'to_a', 'to_s', 'to_xml', 'to_i' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '%', '&', '*', '|', '/', '<', '>', + '+', '-', '=>', '=>', '<<' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color:#9966CC; font-weight:bold;', + 2 => 'color:#0000FF; font-weight:bold;', + 3 => 'color:#CC0066; font-weight:bold;', + 4 => 'color:#CC00FF; font-weight:bold;', + 5 => 'color:#5A0A0A; font-weight:bold;' + ), + 'COMMENTS' => array( + 1 => 'color:#008000; font-style:italic;', + 'MULTI' => 'color:#000080; font-style:italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color:#000099;' + ), + 'BRACKETS' => array( + 0 => 'color:#006600; font-weight:bold;' + ), + 'STRINGS' => array( + 0 => 'color:#996600;' + ), + 'NUMBERS' => array( + 0 => 'color:#006666;' + ), + 'METHODS' => array( + 1 => 'color:#9900CC;' + ), + 'SYMBOLS' => array( + 0 => 'color:#006600; font-weight:bold;' + ), + 'REGEXPS' => array( + 0 => 'color:#ff6633; font-weight:bold;', + 1 => 'color:#0066ff; font-weight:bold;', + 2 => 'color:#6666ff; font-weight:bold;', + 3 => 'color:#ff3333; font-weight:bold;' + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + 0 => array( + GESHI_SEARCH => "([[:space:]])(\\$[a-zA-Z_][a-zA-Z0-9_]*)", + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ), + 1 => array( + GESHI_SEARCH => "([[:space:]])(@[a-zA-Z_][a-zA-Z0-9_]*)", + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ), + 2 => "([A-Z][a-zA-Z0-9_]*::)+[A-Z][a-zA-Z0-9_]*", + 3 => array( + GESHI_SEARCH => "([[:space:]]|\[|\()(:[a-zA-Z_][a-zA-Z0-9_]*)", + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + 0 => array( + '<%' => '%>' + ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/reg.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/reg.php new file mode 100644 index 0000000..3957f3b --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/reg.php @@ -0,0 +1,214 @@ + 'Microsoft Registry', + 'COMMENT_SINGLE' => array(1 =>';'), + 'COMMENT_MULTI' => array( ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array(), + 2 => array() + /* Registry Key Constants Not Used + 3 => array( + 'HKEY_LOCAL_MACHINE', + 'HKEY_CLASSES_ROOT', + 'HKEY_CURRENT_USER', + 'HKEY_USERS', + 'HKEY_CURRENT_CONFIG', + 'HKEY_DYN_DATA', + 'HKLM', 'HKCR', 'HKCU', 'HKU', 'HKCC', 'HKDD' + )/***/ + ), + 'SYMBOLS' => array( ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( 1 => 'color: #00CCFF;', + 2 => 'color: #0000FF;' ), + 'COMMENTS' => array( 1 => 'color: #009900;' ), + 'ESCAPE_CHAR' => array(), + 'BRACKETS' => array(0 => 'color: #000000;'), + 'STRINGS' => array( 0 => 'color: #009900;' ), + 'NUMBERS' => array(), + 'METHODS' => array(), + 'SYMBOLS' => array(0 => 'color: #000000;'), + 'SCRIPT' => array(), + 'REGEXPS' => array( + 0 => '', + 1 => 'color: #0000FF;', + 2 => '', + 3 => '', + 4 => 'color: #0000FF;', + 5 => '', + 6 => '', + 7 => '', + 8 => '', + 9 => 'color: #FF6600;', + ) + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + // Highlight Key Delimiters + 0 => array( + GESHI_SEARCH => '((^|\\n)\\s*)(\\\\\\[(.*)\\\\\\])(\\s*(\\n|$))', + GESHI_REPLACE => '\\3', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\5', + GESHI_CLASS => 'kw1' + ), + // Highlight File Format Header Version 5 + 1 => array( + GESHI_SEARCH => '((\\n|^)\\s*)(Windows Registry Editor Version [0-9]+(.)+([0-9]+))((\\n|$)\\s*)', + GESHI_REPLACE => '\\3', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\6', + GESHI_CLASS => 'geshi_registry_header' + ), + // Highlight File Format Header Version 4 + 2 => array( + GESHI_SEARCH => '((\\n|^)\\s*)(REGEDIT [0-9]+)(\\s*(\\n|$))', + GESHI_REPLACE => '\\3', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\4', + GESHI_CLASS => 'geshi_registry_header' + ), + // Highlight dword: 32 bit integer values + 3 => array( + GESHI_SEARCH => '(=\\s*)(dword:[0-9]{8})(\\s*(\\n|$))', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3', + GESHI_CLASS => 'kw2' + ), + // Highlight variable names + 4 => array( + GESHI_SEARCH => '((\\n|^)\\s*\\"\\;)(.*)(\\"\\;\\s*=)', + GESHI_REPLACE => '\\3', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\4', + GESHI_CLASS => 'geshi_variable' + ), + // Highlight String Values + 5 => array( + GESHI_SEARCH => '(=\\s*)(\\"\\;.*\\"\\;)(\\s*(\\n|$))', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3', + GESHI_CLASS => 'st0' + ), + // Highlight Hexadecimal Values + 6 => array( + GESHI_SEARCH => '(=\\s*)(hex((\\\\\\([0-9]{1,2}\\\\\\))|()):(([0-9a-fA-F]{2},)|(\\s))*(([0-9a-fA-F]{2})|(\\\\\\\\)))(\\s*(\\n|$))', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\12', + GESHI_CLASS => 'kw2' + ), + // Highlight Hexadecimal Values (Multi-Line) + 7 => array( + GESHI_SEARCH => '((\\n|^)\\s*)((([0-9a-fA-F]{2},)|(\\s))*(([0-9a-fA-F]{2})|(\\\\\\\\)))', + GESHI_REPLACE => '\\3', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\10', + GESHI_CLASS => 'kw2' + ), + // Highlight Default Variable + 8 => array( + GESHI_SEARCH => '((\\n|^)\\s*)(@)(\\s*=)', + GESHI_REPLACE => '\\3', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\4', + GESHI_CLASS => 'geshi_variable' + ), + // Highlight GUID's found anywhere. + 9 => array( + GESHI_SEARCH => '(\\{[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}\\})', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '', + GESHI_CLASS => 'geshi_guid' + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); +if (isset($this) && is_a($this, 'GeSHi')) { + $this->set_numbers_highlighting(false); +} +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/robots.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/robots.php new file mode 100644 index 0000000..5746a56 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/robots.php @@ -0,0 +1,98 @@ + 'robots.txt', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'User-agent', 'Disallow' + ) + ), + 'SYMBOLS' => array( + ':' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => 'http://www.robotstxt.org/wc/norobots.html' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/ruby.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/ruby.php new file mode 100644 index 0000000..1c00787 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/ruby.php @@ -0,0 +1,219 @@ + 'Ruby', + 'COMMENT_SINGLE' => array(1 => "#"), + 'COMMENT_MULTI' => array("=begin" => "=end"), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"', '`','\''), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'alias', 'and', 'begin', 'break', 'case', 'class', + 'def', 'defined', 'do', 'else', 'elsif', 'end', + 'ensure', 'for', 'if', 'in', 'module', 'while', + 'next', 'not', 'or', 'redo', 'rescue', 'yield', + 'retry', 'super', 'then', 'undef', 'unless', + 'until', 'when', 'BEGIN', 'END', 'include' + ), + 2 => array( + '__FILE__', '__LINE__', 'false', 'nil', 'self', 'true', + 'return' + ), + 3 => array( + 'Array', 'Float', 'Integer', 'String', 'at_exit', + 'autoload', 'binding', 'caller', 'catch', 'chop', 'chop!', + 'chomp', 'chomp!', 'eval', 'exec', 'exit', 'exit!', 'fail', + 'fork', 'format', 'gets', 'global_variables', 'gsub', 'gsub!', + 'iterator?', 'lambda', 'load', 'local_variables', 'loop', + 'open', 'p', 'print', 'printf', 'proc', 'putc', 'puts', + 'raise', 'rand', 'readline', 'readlines', 'require', 'select', + 'sleep', 'split', 'sprintf', 'srand', 'sub', 'sub!', 'syscall', + 'system', 'trace_var', 'trap', 'untrace_var' + ), + 4 => array( + 'Abbrev', 'ArgumentError', 'Base64', 'Benchmark', + 'Benchmark::Tms', 'Bignum', 'Binding', 'CGI', 'CGI::Cookie', + 'CGI::HtmlExtension', 'CGI::QueryExtension', + 'CGI::Session', 'CGI::Session::FileStore', + 'CGI::Session::MemoryStore', 'Class', 'Comparable', 'Complex', + 'ConditionVariable', 'Continuation', 'Data', + 'Date', 'DateTime', 'Delegator', 'Dir', 'EOFError', 'ERB', + 'ERB::Util', 'Enumerable', 'Enumerable::Enumerator', 'Errno', + 'Exception', 'FalseClass', 'File', + 'File::Constants', 'File::Stat', 'FileTest', 'FileUtils', + 'FileUtils::DryRun', 'FileUtils::NoWrite', + 'FileUtils::StreamUtils_', 'FileUtils::Verbose', 'Find', + 'Fixnum', 'FloatDomainError', 'Forwardable', 'GC', 'Generator', + 'Hash', 'IO', 'IOError', 'Iconv', 'Iconv::BrokenLibrary', + 'Iconv::Failure', 'Iconv::IllegalSequence', + 'Iconv::InvalidCharacter', 'Iconv::InvalidEncoding', + 'Iconv::OutOfRange', 'IndexError', 'Interrupt', 'Kernel', + 'LoadError', 'LocalJumpError', 'Logger', 'Logger::Application', + 'Logger::Error', 'Logger::Formatter', 'Logger::LogDevice', + 'Logger::LogDevice::LogDeviceMutex', 'Logger::Severity', + 'Logger::ShiftingError', 'Marshal', 'MatchData', + 'Math', 'Matrix', 'Method', 'Module', 'Mutex', 'NameError', + 'NameError::message', 'NilClass', 'NoMemoryError', + 'NoMethodError', 'NotImplementedError', 'Numeric', 'Object', + 'ObjectSpace', 'Observable', 'PStore', 'PStore::Error', + 'Pathname', 'Precision', 'Proc', 'Process', 'Process::GID', + 'Process::Status', 'Process::Sys', 'Process::UID', 'Queue', + 'Range', 'RangeError', 'Rational', 'Regexp', 'RegexpError', + 'RuntimeError', 'ScriptError', 'SecurityError', 'Set', + 'Shellwords', 'Signal', 'SignalException', 'SimpleDelegator', + 'SingleForwardable', 'Singleton', 'SingletonClassMethods', + 'SizedQueue', 'SortedSet', 'StandardError', 'StringIO', + 'StringScanner', 'StringScanner::Error', 'Struct', 'Symbol', + 'SyncEnumerator', 'SyntaxError', 'SystemCallError', + 'SystemExit', 'SystemStackError', 'Tempfile', + 'Test::Unit::TestCase', 'Test::Unit', 'Test', 'Thread', + 'ThreadError', 'ThreadGroup', + 'ThreadsWait', 'Time', 'TrueClass', 'TypeError', 'URI', + 'URI::BadURIError', 'URI::Error', 'URI::Escape', 'URI::FTP', + 'URI::Generic', 'URI::HTTP', 'URI::HTTPS', + 'URI::InvalidComponentError', 'URI::InvalidURIError', + 'URI::LDAP', 'URI::MailTo', 'URI::REGEXP', + 'URI::REGEXP::PATTERN', 'UnboundMethod', 'Vector', 'YAML', + 'ZeroDivisionError', 'Zlib', + 'Zlib::BufError', 'Zlib::DataError', 'Zlib::Deflate', + 'Zlib::Error', 'Zlib::GzipFile', 'Zlib::GzipFile::CRCError', + 'Zlib::GzipFile::Error', 'Zlib::GzipFile::LengthError', + 'Zlib::GzipFile::NoFooter', 'Zlib::GzipReader', + 'Zlib::GzipWriter', 'Zlib::Inflate', 'Zlib::MemError', + 'Zlib::NeedDict', 'Zlib::StreamEnd', 'Zlib::StreamError', + 'Zlib::VersionError', + 'Zlib::ZStream', + 'Enumerable', + 'HTML::Selector', 'HashWithIndifferentAccess', 'Inflector', + 'Inflector::Inflections', 'Mime', 'Mime::Type', + 'OCI8AutoRecover', 'Symbol', 'TimeZone', 'XmlSimple' + ), + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '%', '&', '*', '|', '/', '<', '>', + '+', '-', '=>', '=>', '<<' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color:#9966CC; font-weight:bold;', + 2 => 'color:#0000FF; font-weight:bold;', + 3 => 'color:#CC0066; font-weight:bold;', + 4 => 'color:#CC00FF; font-weight:bold;', + ), + 'COMMENTS' => array( + 1 => 'color:#008000; font-style:italic;', + 'MULTI' => 'color:#000080; font-style:italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color:#000099;' + ), + 'BRACKETS' => array( + 0 => 'color:#006600; font-weight:bold;' + ), + 'STRINGS' => array( + 0 => 'color:#996600;' + ), + 'NUMBERS' => array( + 0 => 'color:#006666;' + ), + 'METHODS' => array( + 1 => 'color:#9900CC;' + ), + 'SYMBOLS' => array( + 0 => 'color:#006600; font-weight:bold;' + ), + 'REGEXPS' => array( + 0 => 'color:#ff6633; font-weight:bold;', + 1 => 'color:#0066ff; font-weight:bold;', + 2 => 'color:#6666ff; font-weight:bold;', + 3 => 'color:#ff3333; font-weight:bold;' + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + 0 => array( + GESHI_SEARCH => "([[:space:]])(\\$[a-zA-Z_][a-zA-Z0-9_]*)", + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ), + 1 => array( + GESHI_SEARCH => "([[:space:]])(@[a-zA-Z_][a-zA-Z0-9_]*)", + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ), + 2 => "([A-Z][a-zA-Z0-9_]*::)+[A-Z][a-zA-Z0-9_]*", + 3 => array( + GESHI_SEARCH => "([[:space:]]|\[|\()(:[a-zA-Z_][a-zA-Z0-9_]*)", + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + 0 => array( + '<%' => '%>' + ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + ), + 'TAB_WIDTH' => 2 +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/sas.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/sas.php new file mode 100644 index 0000000..12c9642 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/sas.php @@ -0,0 +1,357 @@ + 'SAS', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + '_NULL_', '_INFILE_', '_N_', '_WEBOUT_', '_NUMERIC_', '_CHARACTER_', '_ALL_' + ), + 2 => array( + '%BQUOTE', '%NRBQUOTE', '%CMPRES', '%QCMPRES', + + '%COMPSTOR', '%DATATYP', '%DISPLAY', '%DO', + '%ELSE', '%END', '%EVAL', '%GLOBAL', + '%GOTO', '%IF', '%INDEX', '%INPUT', + '%KEYDEF', '%LABEL', '%LEFT', '%LENGTH', + '%LET', '%LOCAL', '%LOWCASE', '%MACRO', + '%MEND', '%NRBQUOTE', '%NRQUOTE', '%NRSTR', + + '%PUT', '%QCMPRES', '%QLEFT', '%QLOWCASE', + '%QSCAN', '%QSUBSTR', '%QSYSFUNC', '%QTRIM', + '%QUOTE', '%QUPCASE', '%SCAN', '%STR', + '%SUBSTR', '%SUPERQ', '%SYSCALL', '%SYSEVALF', + '%SYSEXEC', '%SYSFUNC', '%SYSGET', '%SYSLPUT', + '%SYSPROD', '%SYSRC', '%SYSRPUT', '%THEN', + + '%TO', '%TRIM', '%UNQUOTE', '%UNTIL', + '%UPCASE', '%VERIFY', '%WHILE', '%WINDOW' + ), + 3 => array( + 'ABS', 'ADDR', 'AIRY', 'ARCOS', 'ARSIN', 'ATAN', 'ATTRC', 'ATTRN', + + 'BAND', 'BETAINV', 'BLSHIFT', 'BNOT', 'BOR', 'BRSHIFT', 'BXOR', + 'BYTE', 'CDF', 'CEIL', 'CEXIST', 'CINV', 'CLOSE', 'CNONCT', 'COLLATE', + 'COMPBL', 'COMPOUND', 'COMPRESS', 'COSH', 'COS', 'CSS', 'CUROBS', + 'CV', 'DACCDBSL', 'DACCDB', 'DACCSL', 'DACCSYD', 'DACCTAB', + 'DAIRY', 'DATETIME', 'DATEJUL', 'DATEPART', 'DATE', 'DAY', + 'DCLOSE', 'DEPDBSL', 'DEPDB', 'DEPSL', + + 'DEPSYD', 'DEPSYD', 'DEPTAB', 'DEPTAB', 'DEQUOTE', 'DHMS', + 'DIF', 'DIGAMMA', 'DIM', 'DINFO', 'DNUM', 'DOPEN', 'DOPTNAME', + 'DOPTNUM', 'DREAD', 'DROPNOTE', 'DSNAME', 'ERFC', 'ERF', 'EXIST', + 'EXP', 'FAPPEND', 'FCLOSE', 'FCOL', 'FDELETE', 'FETCHOBS', 'FETCH', + 'FEXIST', 'FGET', 'FILEEXIST', 'FILENAME', 'FILEREF', 'FINFO', + 'FINV', 'FIPNAMEL', 'FIPNAME', 'FIPSTATE', 'FLOOR', 'FNONCT', + + 'FNOTE', 'FOPEN', 'FOPTNAME', 'FOPTNUM', 'FPOINT', 'FPOS', + 'FPUT', 'FREAD', 'FREWIND', 'FRLEN', 'FSEP', 'FUZZ', 'FWRITE', + 'GAMINV', 'GAMMA', 'GETOPTION', 'GETVARC', 'GETVARN', 'HBOUND', + 'HMS', 'HOSTHELP', 'HOUR', 'IBESSEL', 'INDEXW', 'INDEXC', + 'INDEX', 'INPUTN', 'INPUTC', 'INPUT', 'INTRR', 'INTCK', 'INTNX', + 'INT', 'IRR', 'JBESSEL', 'JULDATE', 'KURTOSIS', 'LAG', 'LBOUND', + + 'LEFT', 'LENGTH', 'LGAMMA', 'LIBNAME', 'LIBREF', 'LOG10', + 'LOG2', 'LOGPDF', 'LOGPMF', 'LOGSDF', 'LOG', 'LOWCASE', 'MAX', 'MDY', + 'MEAN', 'MINUTE', 'MIN', 'MOD', 'MONTH', 'MOPEN', 'MORT', + 'NETPV', 'NMISS', 'NORMAL', 'NPV', 'N', 'OPEN', 'ORDINAL', + 'PATHNAME', 'PDF', 'PEEKC', 'PEEK', 'PMF', 'POINT', 'POISSON', 'POKE', + 'PROBBETA', 'PROBBNML', 'PROBCHI', 'PROBF', 'PROBGAM', + + 'PROBHYPR', 'PROBIT', 'PROBNEGB', 'PROBNORM', 'PROBT', 'PUTN', + 'PUTC', 'PUT', 'QTR', 'QUOTE', 'RANBIN', 'RANCAU', 'RANEXP', + 'RANGAM', 'RANGE', 'RANK', 'RANNOR', 'RANPOI', 'RANTBL', 'RANTRI', + 'RANUNI', 'REPEAT', 'RESOLVE', 'REVERSE', 'REWIND', 'RIGHT', + 'ROUND', 'SAVING', 'SCAN', 'SDF', 'SECOND', 'SIGN', 'SINH', 'SIN', + 'SKEWNESS', 'SOUNDEX', 'SPEDIS', 'SQRT', 'STDERR', 'STD', 'STFIPS', + + 'STNAME', 'STNAMEL', 'SUBSTR', 'SUM', 'SYMGET', 'SYSGET', 'SYSMSG', + 'SYSPROD', 'SYSRC', 'SYSTEM', 'TANH', 'TAN', 'TIMEPART', 'TIME', + 'TINV', 'TNONCT', 'TODAY', 'TRANSLATE', 'TRANWRD', 'TRIGAMMA', + 'TRIMN', 'TRIM', 'TRUNC', 'UNIFORM', 'UPCASE', 'USS', + 'VARFMT', 'VARINFMT', 'VARLABEL', 'VARLEN', 'VARNAME', + 'VARNUM', 'VARRAYX', 'VARRAY', 'VARTYPE', 'VAR', 'VERIFY', 'VFORMATX', + + 'VFORMATDX', 'VFORMATD', 'VFORMATNX', 'VFORMATN', 'VFORMATWX', + 'VFORMATW', 'VFORMAT', 'VINARRAYX', 'VINARRAY', 'VINFORMATX', + 'VINFORMATDX', 'VINFORMATD', 'VINFORMATNX', 'VINFORMATN', + 'VINFORMATWX', 'VINFORMATW', 'VINFORMAT', 'VLABELX', + 'VLABEL', 'VLENGTHX', 'VLENGTH', 'VNAMEX', 'VNAME', 'VTYPEX', + 'VTYPE', 'WEEKDAY', 'YEAR', 'YYQ', 'ZIPFIPS', 'ZIPNAME', 'ZIPNAMEL', + + 'ZIPSTATE' + ), + 4 => array( + 'ABORT', 'ARRAY', 'ATTRIB', 'BY', 'CALL', 'CARDS4', 'CATNAME', + 'CONTINUE', 'DATALINES4', 'DELETE', 'DISPLAY', + + 'DM', 'DROP', 'ENDSAS', 'FILENAME', 'FILE', 'FOOTNOTE', + 'FORMAT', 'GOTO', 'INFILE', 'INFORMAT', 'INPUT', 'KEEP', + 'LABEL', 'LEAVE', 'LENGTH', 'LIBNAME', 'LINK', 'LIST', 'LOSTCARD', + 'MERGE', 'MISSING', 'MODIFY', 'OPTIONS', 'OUTPUT', 'PAGE', + 'PUT', 'REDIRECT', 'REMOVE', 'RENAME', 'REPLACE', 'RETAIN', + 'RETURN', 'SELECT', 'SET', 'SKIP', 'STARTSAS', 'STOP', 'TITLE', + + 'UPDATE', 'WAITSAS', 'WHERE', 'WINDOW', 'X', 'SYSTASK', + 'ADD', 'AND', 'ALTER', 'AS', 'CASCADE', 'CHECK', 'CREATE', + 'DELETE', 'DESCRIBE', 'DISTINCT', 'DROP', 'FOREIGN', + 'FROM', 'GROUP', 'HAVING', 'INDEX', 'INSERT', 'INTO', 'IN', + 'KEY', 'LIKE', 'MESSAGE', 'MODIFY', 'MSGTYPE', 'NOT', + 'NULL', 'ON', 'OR', 'ORDER', 'PRIMARY', 'REFERENCES', + + 'RESET', 'RESTRICT', 'SELECT', 'SET', 'TABLE', + 'UNIQUE', 'UPDATE', 'VALIDATE', 'VIEW', 'WHERE' + ), + 5 => array( + 'DO', 'ELSE', 'END', 'IF', 'THEN', 'UNTIL', 'WHILE' + + ), + 6 => array( + 'RUN', 'QUIT', 'DATA' + ), + 7 => array( + + 'ERROR' + ), + 8 => array( + 'WARNING' + ), + + 9 => array( + 'NOTE' + ) + ), + 'SYMBOLS' => array( + + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + + 2 => false, + 3 => false, + 4 => false, + 5 => false, + + 6 => false, + 7 => false, + 8 => false, + 9 => false + + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000ff;', + + 2 => 'color: #0000ff;', + 3 => 'color: #0000ff;', + 4 => 'color: #0000ff;', + 5 => 'color: #0000ff;', + + 6 => 'color: #000080; font-weight: bold;', + 7 => 'color: #ff0000;', + 8 => 'color: #00ff00;', + 9 => 'color: #0000ff;' + + ), + 'COMMENTS' => array( + 1 => 'color: #006400; font-style: italic;', + 'MULTI' => 'color: #006400; font-style: italic;' + + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #a020f0;' + + ), + 'NUMBERS' => array( + 0 => 'color: #2e8b57; font-weight: bold;' + ), + 'METHODS' => array( + + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + + 0 => '', + 1 => '', + 2 => '', + 3 => '' + + ), + 'REGEXPS' => array( + 0 => 'color: #0000ff; font-weight: bold;', + 1 => 'color: #000080; font-weight: bold;', + + 2 => 'color: #006400; font-style: italic;', + 3 => 'color: #006400; font-style: italic;', + 4 => 'color: #006400; font-style: italic;', + 5 => 'color: #ff0000; font-weight: bold;', + + 6 => 'color: #00ff00; font-style: italic;', + 7 => 'color: #0000ff; font-style: normal;', + 8 => 'color: #b218b2; font-weight: bold;', + 9 => 'color: #b218b2; font-weight: bold;' + + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + + 3 => '', + 4 => '', + 5 => '', + 6 => '', + + 7 => '', + 8 => '', + 9 => '' + ), + + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + + 0 => "&[a-zA-Z_][a-zA-Z0-9_]*", + 1 => array( + GESHI_SEARCH => '(^\\s*)(PROC \\w+)', + GESHI_REPLACE => '\\2', + + GESHI_MODIFIERS => 'im', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ), + + 2 => array( + GESHI_SEARCH => '(^\\s*)(\\*.*;)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'im', + + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ), + 3 => array( + + GESHI_SEARCH => '(.*;\\s*)(\\*.*;)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'im', + GESHI_BEFORE => '\\1', + + GESHI_AFTER => '' + ), + 4 => array( + GESHI_SEARCH => '(^\\s*)(%\\*.*;)', + + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'im', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + + ), + 5 => array( + GESHI_SEARCH => '(^ERROR.*)', + GESHI_REPLACE => '\\1', + + GESHI_MODIFIERS => 'im', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + + 6 => array( + GESHI_SEARCH => '(^WARNING.*)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'im', + + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 7 => array( + + GESHI_SEARCH => '(^NOTE.*)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'im', + GESHI_BEFORE => '', + + GESHI_AFTER => '' + ), + 8 => array( + GESHI_SEARCH => '(^\\s*)(CARDS.*)(^\\s*;\\s*$)', + + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'sim', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3' + + ), + 9 => array( + GESHI_SEARCH => '(^\\s*)(DATALINES.*)(^\\s*;\\s*$)', + GESHI_REPLACE => '\\2', + + GESHI_MODIFIERS => 'sim', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3' + ) + + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/scheme.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/scheme.php new file mode 100644 index 0000000..70be0ce --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/scheme.php @@ -0,0 +1,170 @@ + 'Scheme', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(';|' => '|;'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'abs', 'acos', 'and', 'angle', 'append', 'appply', 'approximate', + 'asin', 'assoc', 'assq', 'assv', 'atan', + + 'begin', 'boolean?', 'bound-identifier=?', + + 'caar', 'caddr', 'cadr', 'call-with-current-continuation', + 'call-with-input-file', 'call-with-output-file', 'call/cc', 'car', + 'case', 'catch', 'cdddar', 'cddddr', 'cdr', 'ceiling', 'char->integer', + 'char-alphabetic?', 'char-ci<=?', 'char-ci=?', + 'char-ci>?', 'char-ci=?', 'char-downcase', 'char-lower-case?', + 'char-numeric', 'char-ready', 'char-ready?', 'char-upcase', + 'char-upper-case?', 'char-whitespace?', 'char<=?', 'char=?', 'char>?', 'char?', 'close-input-port', 'close-output-port', + 'complex?', 'cond', 'cons', 'construct-identifier', 'cos', + 'current-input-port', 'current-output-port', + + 'd', 'define', 'define-syntax', 'delay', 'denominator', 'display', 'do', + + 'e', 'eof-object?', 'eq?', 'equal?', 'eqv?', 'even?', 'exact->inexact', + 'exact?', 'exp', 'expt', 'else', + + 'f', 'floor', 'for-each', 'force', 'free-identifer=?', + + 'gcd', 'gen-counter', 'gen-loser', 'generate-identifier', + + 'identifier->symbol', 'identifier', 'if', 'imag-part', 'inexact->exact', + 'inexact?', 'input-port?', 'integer->char', 'integer?', 'integrate-system', + + 'l', 'lambda', 'last-pair', 'lcm', 'length', 'let', 'let*', 'letrec', + 'list', 'list->string', 'list->vector', 'list-ref', 'list-tail', 'list?', + 'load', 'log', + + 'magnitude', 'make-polar', 'make-promise', 'make-rectangular', + 'make-string', 'make-vector', 'map', 'map-streams', 'max', 'member', + 'memq', 'memv', 'min', 'modulo', + + 'negative', 'newline', 'nil', 'not', 'null?', 'number->string', 'number?', + 'numerator', + + 'odd?', 'open-input-file', 'open-output-file', 'or', 'output-port', + + 'pair?', 'peek-char', 'positive?', 'procedure?', + + 'quasiquote', 'quote', 'quotient', + + 'rational', 'rationalize', 'read', 'read-char', 'real-part', 'real?', + 'remainder', 'return', 'reverse', + + 's', 'sequence', 'set!', 'set-char!', 'set-cdr!', 'sin', 'sqrt', 'string', + 'string->list', 'string->number', 'string->symbol', 'string-append', + 'string-ci<=?', 'string-ci=?', + 'string-ci>?', 'string-copy', 'string-fill!', 'string-length', + 'string-ref', 'string-set!', 'string<=?', 'string=?', 'string>?', 'string?', 'substring', 'symbol->string', + 'symbol?', 'syntax', 'syntax-rules', + + 't', 'tan', 'template', 'transcript-off', 'transcript-on', 'truncate', + + 'unquote', 'unquote-splicing', 'unwrap-syntax', + + 'vector', 'vector->list', 'vector-fill!', 'vector-length', 'vector-ref', + 'vector-set!', 'vector?', + + 'with-input-from-file', 'with-output-to-file', 'write', 'write-char', + + 'zero?' + + ) + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '!', '%', '^', '&', '/','+','-','*','=','<','>',';','|' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 0 => 'color: #202020;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/sdlbasic.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/sdlbasic.php new file mode 100644 index 0000000..f71721e --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/sdlbasic.php @@ -0,0 +1,161 @@ + 'sdlBasic', + 'COMMENT_SINGLE' => array(1 => "'", 2 => "rem", 3 => "!", 4 => "#"), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'const', 'option', 'explicit', 'option', 'qbasic', 'include', 'argc', + 'argv', 'command', 'command$', 'run', 'shell', 'end', 'os', 'declare', + 'sub', 'function', 'return', 'while', 'wend', 'exit', 'while', 'end', + 'while', 'continue', 'if', 'then', 'else', 'elseif', 'end', 'if', + 'select', 'case', 'case', 'else', 'end', 'case', 'for', 'each', 'step', + 'next', 'to', 'continue', 'dim', 'shared', 'common', 'lbound', 'bound', + 'erase', 'asc', 'chr', 'chr$', 'insert', 'insert$', 'instr', 'lcase', + 'lcase$', 'left', 'left$', 'len', 'length', 'ltrim', 'ltrim$', 'mid', + 'mid$', 'replace', 'replace$', 'replacesubstr', 'replacesubstr$', + 'reverse', 'reverse$', 'right', 'right$', 'rinstr', 'rtrim', 'rtrim$', + 'space', 'space$', 'str', 'str$', 'strf', 'strf$', 'string', 'string$', + 'tally', 'trim', 'trim$', 'typeof', 'typeof$', 'ucase', 'ucase$', 'val', + 'abs', 'acos', 'andbit', 'asin', 'atan', 'bitwiseand', 'bitwiseor', + 'bitwisexor', 'cos', 'exp', 'fix', 'floor', 'frac', 'hex', 'hex$', 'int', + 'log', 'min', 'max', 'orbit', 'randomize', 'rnd', 'round', 'sgn', 'sin', + 'sqr', 'tan', 'xorbit', 'open', 'as', 'file', 'input', 'close', 'output', + 'append', 'eof', 'fileexists', 'filecopy', 'filemove', 'filerename', + 'freefile', 'kill', 'loc', 'lof', 'readbyte', 'rename', 'seek', + 'writebyte', 'chdir', 'dir', 'dir$', 'direxists', 'dirfirst', 'dirnext', + 'mkdir', 'rmdir', 'print', 'date', 'date$', 'time', 'time$', 'ticks', + 'data', 'read', 'reservebank', 'freebank', 'copybank', 'loadbank', + 'savebank', 'setbank', 'sizebank', 'poke', 'doke', 'loke', 'peek', 'deek', + 'leek', 'memcopy', 'setdisplay', 'setcaption', 'caption', 'displaywidth', + 'displayheight', 'displaybpp', 'screen', 'directscreen', 'screenopen', + 'screenclose', 'screenclone', 'screencopy', 'screenfade', 'screenfadein', + 'screencrossfade', 'screenalpha', 'screenlock', 'screenunlock', + 'screenrect', 'xscreenrect', 'yscreenrect', 'wscreenrect', 'hscreenrect', + 'flagscreenrect', 'screenwidth', 'screenheight', 'offset', 'xoffset', + 'yoffset', 'cls', 'screenswap', 'autoback', 'setautoback', + 'dualplayfield', 'waitvbl', 'fps', 'rgb', 'enablepalette', 'color', + 'palette', 'colorcycling', 'ink', 'point', 'dot', 'plot', 'line', 'box', + 'bar', 'circle', 'fillcircle', 'ellipse', 'fillellipse', 'paint', + 'loadimage', 'saveimage', 'loadsound', 'savesound', 'loadmusic', + 'hotspot', 'setcolorkey', 'imageexists', 'imagewidth', 'imageheight', + 'deleteimage', 'copyimage', 'setalpha', 'zoomimage', 'rotateimage', + 'rotozoomimage', 'blt', 'pastebob', 'pasteicon', 'grab', 'spriteclip', + 'sprite', 'deletesprite', 'xsprite', 'ysprite', 'spritewidth', + 'spriteheight', 'frsprite', 'livesprite', 'spritehit', 'autoupdatesprite', + 'updatesprite', 'setbob', 'bob', 'deletebob', 'xbob', 'ybob', 'bobwidth', + 'bobheight', 'frbob', 'livebob', 'bobhit', 'autoupdatebob', 'updatebob', + 'text', 'setfont', 'textrender', 'pen', 'paper', 'prints', 'locate', + 'atx', 'aty', 'curson', 'cursoff', 'inputs', 'zoneinputs', + 'isenabledsound', 'soundexists', 'deletesound', 'copysound', + 'musicexists', 'playsound', 'volumesound', 'stopsound', 'pausesound', + 'resumesound', 'vumetersound', 'positionsound', 'soundchannels', + 'playmusic', 'positionmusic', 'stopmusic', 'fademusic', 'pausemusic', + 'resumemusic', 'rewindmusic', 'volumemusic', 'speedmusic', 'numdrivescd', + 'namecd', 'getfreecd', 'opencd', 'indrivecd', 'trackscd', 'curtrackcd', + 'curframecd', 'playcd', 'playtrackscd', 'playtrackscd', 'playtrackscd', + 'pausecd', 'resumecd', 'stopcd', 'ejectcd', 'closecd', 'tracktypecd', + 'tracklengthcd', 'trackoffsetcd', 'key', 'inkey', 'waitkey', 'xmouse', + 'ymouse', 'xmousescreen', 'ymousescreen', 'bmouse', 'changemouse', + 'locatemouse', 'mouseshow', 'mousehide', 'mousezone', 'numjoysticks', + 'namejoystick', 'numaxesjoystick', 'numballsjoystick', 'numhatsjoystick', + 'numbuttonsjoystick', 'getaxisjoystick', 'gethatjoystick', + 'getbuttonjoystick', 'xgetballjoystick', 'ygetballjoystick', 'joy', + 'bjoy', 'wait', 'timer', 'isenabledsock', 'getfreesock', 'opensock', + 'acceptsock', 'isserverready', 'connectsock', 'connectionreadysock', + 'isclientready', 'losesock', 'peeksock', 'readsock', 'readbytesock', + 'readlinesock', 'writesock', 'writebytesock', 'writelinesock', + 'getremoteip', 'getremoteport', 'getlocalip' + ) + ), + 'SYMBOLS' => array( + '(', ')' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080;', + 2 => 'color: #808080;', + 3 => 'color: #808080;', + 4 => 'color: #808080;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 0 => 'color: #66cc66;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/smalltalk.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/smalltalk.php new file mode 100644 index 0000000..4e7e337 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/smalltalk.php @@ -0,0 +1,159 @@ + 'Smalltalk', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array('"' => '"'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'"), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array('self','super','true','false','nil') + ), + 'SYMBOLS' => array( + '[', ']', '=' , ':=', '(', ')', '#' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #7f007f;' + ), + 'COMMENTS' => array( + 'MULTI' => 'color: #007f00; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => '' + ), + 'BRACKETS' => array( + 0 => '' + ), + 'STRINGS' => array( + 0 => 'color: #7f0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #7f0000;' + ), + 'METHODS' => array( + 0 => '' + ), + 'SYMBOLS' => array( + 0 => 'color: #000066; font-weight:bold;' + ), + 'REGEXPS' => array( + 0 => 'color: #0000ff;', + 1 => 'color: #7f0000;', + 2 => 'color: #7f0000;', + 3 => 'color: #00007f;', + 4 => 'color: #7f007f;', + 5 => 'color: #00007f;', + 6 => 'color: #00007f;' + ), + 'SCRIPT' => array( + 0 => '' + ) + ), + 'URLS' => array( + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + 0 => array( + GESHI_SEARCH => '([^a-zA-Z0-9_#])([A-Z]+[a-zA-Z0-9_]*)', //class names + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ), + 1 => array( + GESHI_SEARCH => '(#+)([a-zA-Z0-9_]+)', //symbols + GESHI_REPLACE => '\\1\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 2 => array( + GESHI_SEARCH => '(#\s*\([^)]*\))', //array symbols + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 3 => array( + GESHI_SEARCH => '\|([a-zA-Z0-9_\s]+)\|', //temporary variables + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '|', + GESHI_AFTER => '|' + ), + 4 => array( + GESHI_SEARCH => '(self|super|true|false|nil)', //keywords again (to avoid matching in next regexp) + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 5 => array( + GESHI_SEARCH => '([:(,=[.*/+-]\s*)([a-zA-Z0-9_]+)', //message parameters, message receivers + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 's', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ), + 6 => array( + GESHI_SEARCH => '([a-zA-Z0-9_]+)(\s*:=)', //assignment targets + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '\\2' + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/smarty.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/smarty.php new file mode 100644 index 0000000..02613a0 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/smarty.php @@ -0,0 +1,172 @@ + 'Smarty', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array('{*' => '*}'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + '$smarty', 'now', 'const', 'capture', 'config', 'section', 'foreach', 'template', 'version', 'ldelim', 'rdelim', + 'config_load', 'foreachelse', 'include', 'include_php', 'insert', 'if', 'elseif', 'else', 'php', + 'sectionelse', 'clear_all_cache', 'clear_cache', 'is_cached', + ), + 2 => array( + 'capitalize', 'count_characters', 'cat', 'count_paragraphs', 'count_sentences', 'count_words', 'date_format', + 'default', 'escape', 'indent', 'lower', 'nl2br', 'regex_replace', 'replace', 'spacify', 'string_format', + 'strip', 'strip_tags', 'truncate', 'upper', 'wordwrap' + ), + 3 => array( + 'assign', 'counter', 'cycle', 'debug', 'eval', 'fetch', 'html_checkboxes', 'html_image', 'html_options', + 'html_radios', 'html_select_date', 'html_select_time', 'html_table', 'math', 'mailto', 'popup_init', + 'popup', 'textformat' + ), + 4 => array( + '$template_dir', '$compile_dir', '$config_dir', '$plugins_dir', '$debugging', '$debug_tpl', + '$debugging_ctrl', '$autoload_filters', '$compile_check', '$force_compile', '$caching', '$cache_dir', + '$cache_lifetime', '$cache_handler_func', '$cache_modified_check', '$config_overwrite', + '$config_booleanize', '$config_read_hidden', '$config_fix_newlines', '$default_template_handler_func', + '$php_handling', '$security', '$secure_dir', '$security_settings', '$trusted_dir', '$left_delimiter', + '$right_delimiter', '$compiler_class', '$request_vars_order', '$request_use_auto_globals', + '$error_reporting', '$compile_id', '$use_sub_dirs', '$default_modifiers', '$default_resource_type' + ), + 5 => array( + 'append', 'append_by_ref', 'assign', 'assign_by_ref', 'clear_all_assign', 'clear_all_cache', + 'clear_assign', 'clear_cache', 'clear_compiled_tpl', 'clear_config', 'config_load', 'display', + 'fetch', 'get_config_vars', 'get_registered_object', 'get_template_vars', 'is_cached', + 'load_filter', 'register_block', 'register_compiler_function', 'register_function', + 'register_modifier', 'register_object', 'register_outputfilter', 'register_postfilter', + 'register_prefilter', 'register_resource', 'trigger_error', 'template_exists', 'unregister_block', + 'unregister_compiler_function', 'unregister_function', 'unregister_modifier', 'unregister_object', + 'unregister_outputfilter', 'unregister_postfilter', 'unregister_prefilter', 'unregister_resource' + ), + 6 => array( + 'name', 'assign', 'file', 'scope', 'global', 'key', 'once', 'script', + 'loop', 'start', 'step', 'max', 'show', 'values', 'value', 'from', 'item' + ), + 7 => array( + 'eq', 'neq', 'ne', 'lte', 'gte', 'ge', 'le', 'not', 'mod' + ), + ), + 'SYMBOLS' => array( + '/', '=', '==', '!=', '>', '<', '>=', '<=', '!', '%' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0600FF;', //Functions + 2 => 'color: #008000;', //Modifiers + 3 => 'color: #0600FF;', //Custom Functions + 4 => 'color: #804040;', //Variables + 5 => 'color: #008000;', //Methods + 6 => 'color: #6A0A0A;', //Attributes + 7 => 'color: #D36900;' //Text-based symbols + ), + 'COMMENTS' => array( + 'MULTI' => 'color: #008080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #D36900;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #D36900;' + ), + 'SCRIPT' => array( + 0 => '' + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => 'http://smarty.php.net/{FNAME}', + 2 => 'http://smarty.php.net/{FNAME}', + 3 => 'http://smarty.php.net/{FNAME}', + 4 => 'http://smarty.php.net/{FNAME}', + 5 => 'http://smarty.php.net/{FNAME}', + 6 => '', + 7 => 'http://smarty.php.net/{FNAME}' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, + 'SCRIPT_DELIMITERS' => array( + 0 => array( + '{' => '}' + ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true + ), + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => "a-zA-Z0-9\$_\|\#;>|^", + 'DISALLOWED_AFTER' => "a-zA-Z0-9_<\|%\\-&" + ) + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/sql.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/sql.php new file mode 100644 index 0000000..b21298e --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/sql.php @@ -0,0 +1,135 @@ + 'SQL', + 'COMMENT_SINGLE' => array(1 =>'--', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => 1, + 'QUOTEMARKS' => array("'", '"', '`'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'ALL', 'ASC', 'AS', 'ALTER', 'AND', 'ADD', 'AUTO_INCREMENT', + 'BETWEEN', 'BINARY', 'BOTH', 'BY', 'BOOLEAN', + 'CHANGE', 'CHECK', 'COLUMNS', 'COLUMN', 'CROSS','CREATE', + 'DATABASES', 'DATABASE', 'DATA', 'DELAYED', 'DESCRIBE', 'DESC', 'DISTINCT', 'DELETE', 'DROP', 'DEFAULT', + 'ENCLOSED', 'ESCAPED', 'EXISTS', 'EXPLAIN', + 'FIELDS', 'FIELD', 'FLUSH', 'FOR', 'FOREIGN', 'FUNCTION', 'FROM', + 'GROUP', 'GRANT', + 'HAVING', + 'IGNORE', 'INDEX', 'INFILE', 'INSERT', 'INNER', 'INTO', 'IDENTIFIED', 'IN', 'IS', 'IF', + 'JOIN', + 'KEYS', 'KILL','KEY', + 'LEADING', 'LIKE', 'LIMIT', 'LINES', 'LOAD', 'LOCAL', 'LOCK', 'LOW_PRIORITY', 'LEFT', 'LANGUAGE', + 'MODIFY', + 'NATURAL', 'NOT', 'NULL', 'NEXTVAL', + 'OPTIMIZE', 'OPTION', 'OPTIONALLY', 'ORDER', 'OUTFILE', 'OR', 'OUTER', 'ON', + 'PROCEEDURE','PROCEDURAL', 'PRIMARY', + 'READ', 'REFERENCES', 'REGEXP', 'RENAME', 'REPLACE', 'RETURN', 'REVOKE', 'RLIKE', 'RIGHT', + 'SHOW', 'SONAME', 'STATUS', 'STRAIGHT_JOIN', 'SELECT', 'SETVAL', 'SET', + 'TABLES', 'TEMINATED', 'TO', 'TRAILING','TRUNCATE', 'TABLE', 'TEMPORARY', 'TRIGGER', 'TRUSTED', + 'UNIQUE', 'UNLOCK', 'USE', 'USING', 'UPDATE', 'UNSIGNED', + 'VALUES', 'VARIABLES', 'VIEW', + 'WITH', 'WRITE', 'WHERE', + 'ZEROFILL', + 'XOR', + ) + ), + 'SYMBOLS' => array( + '(', ')', '=', '<', '>', '|' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #993333; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/tcl.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/tcl.php new file mode 100644 index 0000000..697ce8d --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/tcl.php @@ -0,0 +1,181 @@ + 'TCL', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"', "'"), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + + /* + ** Set 1: reserved words + ** http://python.org/doc/current/ref/keywords.html + */ + 1 => array( + 'proc', 'global', 'upvar', 'if', 'then', 'else', 'elseif', 'for', 'foreach', + 'break', 'continue', 'while', 'set', 'eval', 'case', 'in', 'switch', + 'default', 'exit', 'error', 'proc', 'return', 'uplevel', 'loop', + 'for_array_keys', 'for_recursive_glob', 'for_file', 'unwind_protect', + 'expr', 'catch', 'namespace', 'rename', 'variable', + // itcl + 'method', 'itcl_class', 'public', 'protected'), + + /* + ** Set 2: builtins + ** http://asps.activatestate.com/ASPN/docs/ActiveTcl/8.4/tcl/tcl_2_contents.htm + */ + 2 => array( + // string handling + 'append', 'binary', 'format', 're_syntax', 'regexp', 'regsub', + 'scan', 'string', 'subst', + // list handling + 'concat', 'join', 'lappend', 'lindex', 'list', 'llength', 'lrange', + 'lreplace', 'lsearch', 'lset', 'lsort', 'split', + // math + 'expr', + // procedures and output + 'incr', 'close', 'eof', 'fblocked', 'fconfigure', 'fcopy', 'file', + 'fileevent', 'flush', 'gets', 'open', 'puts', 'read', 'seek', + 'socket', 'tell', + // packages and source files + 'load', 'loadTk', 'package', 'pgk::create', 'pgk_mkIndex', 'source', + // interpreter routines + 'bgerror', 'history', 'info', 'interp', 'memory', 'unknown', + // library routines + 'enconding', 'http', 'msgcat', + // system related + 'cd', 'clock', 'exec', 'exit', 'glob', 'pid', 'pwd', 'time', + // platform specified + 'dde', 'registry', 'resource', + // special variables + '$argc', '$argv', '$errorCode', '$errorInfo', '$argv0', + '$auto_index', '$auto_oldpath', '$auto_path', '$env', + '$tcl_interactive', '$tcl_libpath', '$tcl_library', + '$tcl_pkgPath', '$tcl_platform', '$tcl_precision', '$tcl_traceExec', + ), + + /* + ** Set 3: standard library + */ + 3 => array( + 'comment', 'dde', 'filename', 'http', 'library', 'memory', + 'packagens', 'registry', 'resource', 'tcltest', 'tclvars', + ), + + /* + ** Set 4: special methods + */ + 4 => array( + ) + + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '$', '*', '&', '%', '!', ';', '<', '>', '?' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => true, + 2 => true, + 3 => true, + 4 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #ff7700;font-weight:bold;', // Reserved + 2 => 'color: #008000;', // Built-ins + self + 3 => 'color: #dc143c;', // Standard lib + 4 => 'color: #0000cd;' // Special methods + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: black;' + ), + 'STRINGS' => array( + 0 => 'color: #483d8b;' + ), + 'NUMBERS' => array( + 0 => 'color: #ff4500;' + ), + 'METHODS' => array( + 1 => 'color: black;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + 0 => 'color: #ff3333;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '::' + ), + 'REGEXPS' => array( + 0 => '[\\$]+[a-zA-Z_][a-zA-Z0-9_]*', + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/text.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/text.php new file mode 100644 index 0000000..8388696 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/text.php @@ -0,0 +1,81 @@ + 'Text', + 'COMMENT_SINGLE' => array( ), + 'COMMENT_MULTI' => array( ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( ), + 'SYMBOLS' => array( ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false + ), + 'STYLES' => array( + 'KEYWORDS' => array(), + 'COMMENTS' => array(), + 'ESCAPE_CHAR' => array(), + 'BRACKETS' => array(), + 'STRINGS' => array(), + 'NUMBERS' => array(), + 'METHODS' => array(), + 'SYMBOLS' => array(), + 'SCRIPT' => array(), + 'REGEXPS' => array() + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array(), + 'REGEXPS' => array( ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( ), + 'HIGHLIGHT_STRICT_BLOCK' => array( ) +); +if (isset($this) && is_a($this, 'GeSHi')) { + $this->set_numbers_highlighting(false); + $this->set_brackets_highlighting(false); + $this->disable_highlighting(); +} +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/thinbasic.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/thinbasic.php new file mode 100644 index 0000000..aa79ec6 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/thinbasic.php @@ -0,0 +1,864 @@ + 'thinBasic', + 'COMMENT_SINGLE' => array(1 => "'"), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'XOR','XML_TREETOSTRING','XML_PARSEFILE','XML_PARSE','XML_PARENT','XML_NODETYPE','XML_NODETOSTRING','XML_NEXTSIBLING', + 'XML_LASTERROR','XML_GETTAG','XML_FREE','XML_FINDNODE','XML_DECODEPARAM','XML_CHILDDATA','XML_CHILD','XML_ATTRIBVALUE', + 'XML_ATTRIBNAME','XML_ATTRIBCOUNT','WORD','WITH','WIN_SHOW','WIN_SETTITLE','WIN_SETFOREGROUND','WIN_ISZOOMED', + 'WIN_ISVISIBLE','WIN_ISICONIC','WIN_GETTITLE','WIN_GETFOREGROUND','WIN_GETCLASS','WIN_GETACTIVE','WIN_FLASH','WIN_FINDBYTITLE', + 'WIN_FINDBYCLASS','WHILE','WEND','VERIFY','VARPTR','VARIANTVT$','VARIANTVT','VARIANT', + 'VARIABLE_GETINFO','VARIABLE_EXISTS','VARIABLE_EXIST','VALUE','VAL','USING$','USING','USES', + 'USER','UNTIL','UNITS','UNION','UNICODE2ASCII','UDP_SEND','UDP_RECV','UDP_OPENSERVER', + 'UDP_OPEN','UDP_FREEFILE','UDP_CLOSE','UCODE$','UCASE$','UBOUND','TYPE','TRIMFULL$', + 'TRIM$','TOOLTIP','TOKENIZER_MOVETOEOL','TOKENIZER_KEYSETUSERSTRING','TOKENIZER_KEYSETUSERNUMBER','TOKENIZER_KEYGETUSERSTRING','TOKENIZER_KEYGETUSERNUMBER','TOKENIZER_KEYGETSUBTYPE', + 'TOKENIZER_KEYGETNAME','TOKENIZER_KEYGETMAINTYPE','TOKENIZER_KEYFIND','TOKENIZER_KEYADD','TOKENIZER_GETNEXTTOKEN','TOKENIZER_DEFAULT_SET','TOKENIZER_DEFAULT_GET','TOKENIZER_DEFAULT_CODE', + 'TOKENIZER_DEFAULT_CHAR','TO','TIMER','TIME$','THEN','TEXTBOX','TEXT','TCP_SEND', + 'TCP_RECV','TCP_PRINT','TCP_OPEN','TCP_LINEINPUT','TCP_FREEFILE','TCP_CLOSE','TB_IMGCTX_SETIMAGEADJUSTMENT','TB_IMGCTX_LOADIMAGE', + 'TB_IMGCTX_GETIMAGEADJUSTMENT','TBGL_VIEWPORT','TBGL_VERTEX','TBGL_USETEXTUREFLAG','TBGL_USETEXTURE','TBGL_USELINESTIPPLEFLAG','TBGL_USELINESTIPPLE','TBGL_USELIGHTSOURCEFLAG', + 'TBGL_USELIGHTSOURCE','TBGL_USELIGHTINGFLAG','TBGL_USELIGHTING','TBGL_USEFOGFLAG','TBGL_USEFOG','TBGL_USEDEPTHMASK','TBGL_USEDEPTHFLAG','TBGL_USEDEPTH', + 'TBGL_USECLIPPLANEFLAG','TBGL_USECLIPPLANE','TBGL_USEBLENDFLAG','TBGL_USEBLEND','TBGL_USEALPHATEST','TBGL_TRANSLATE','TBGL_TORUS','TBGL_TEXCOORD2D', + 'TBGL_SPHERE','TBGL_SHOWWINDOW','TBGL_SHOWCURSOR','TBGL_SETWINDOWTITLE','TBGL_SETUPLIGHTSOURCE','TBGL_SETUPFOG','TBGL_SETUPCLIPPLANE','TBGL_SETPRIMITIVEQUALITY', + 'TBGL_SETLIGHTPARAMETER','TBGL_SETDRAWDISTANCE','TBGL_SCALE','TBGL_SAVESCREENSHOT','TBGL_ROTATEXYZ','TBGL_ROTATE','TBGL_RESETMATRIX','TBGL_RENDERTOTEXTURE', + 'TBGL_RENDERMATRIX3D','TBGL_RENDERMATRIX2D','TBGL_PUSHMATRIX','TBGL_PRINTFONT','TBGL_PRINTBMP','TBGL_PRINT','TBGL_POS3DTOPOS2D','TBGL_POPMATRIX', + 'TBGL_POLYGONLOOK','TBGL_POINTSIZE','TBGL_POINTINSIDE3D','TBGL_NORMAL','TBGL_NEWLIST','TBGL_MOUSEGETWHEELDELTA','TBGL_MOUSEGETRBUTTON','TBGL_MOUSEGETPOSY', + 'TBGL_MOUSEGETPOSX','TBGL_MOUSEGETMBUTTON','TBGL_MOUSEGETLBUTTON','TBGL_M15SETVERTEXZ','TBGL_M15SETVERTEXY','TBGL_M15SETVERTEXXYZ','TBGL_M15SETVERTEXX','TBGL_M15SETVERTEXTEXY', + 'TBGL_M15SETVERTEXTEXXY','TBGL_M15SETVERTEXTEXX','TBGL_M15SETVERTEXTEXN','TBGL_M15SETVERTEXRGB','TBGL_M15SETVERTEXR','TBGL_M15SETVERTEXPSTOP','TBGL_M15SETVERTEXPARAM','TBGL_M15SETVERTEXLAYER', + 'TBGL_M15SETVERTEXG','TBGL_M15SETVERTEXB','TBGL_M15SETMODELVERTEXCOUNT','TBGL_M15SETBONECHILD','TBGL_M15ROTBONEZ','TBGL_M15ROTBONEY','TBGL_M15ROTBONEX','TBGL_M15ROTBONE', + 'TBGL_M15RESETBONES','TBGL_M15RECALCNORMALS','TBGL_M15LOADMODEL','TBGL_M15INITMODELBUFFERS','TBGL_M15GETVERTEXZ','TBGL_M15GETVERTEXY','TBGL_M15GETVERTEXXYZ','TBGL_M15GETVERTEXX', + 'TBGL_M15GETVERTEXTEXY','TBGL_M15GETVERTEXTEXXY','TBGL_M15GETVERTEXTEXX','TBGL_M15GETVERTEXTEXN','TBGL_M15GETVERTEXRGB','TBGL_M15GETVERTEXR','TBGL_M15GETVERTEXPSTOP','TBGL_M15GETVERTEXPARAM', + 'TBGL_M15GETVERTEXLAYER','TBGL_M15GETVERTEXG','TBGL_M15GETVERTEXB','TBGL_M15GETMODELVERTEXCOUNT','TBGL_M15GETMODELPOLYCOUNT','TBGL_M15ERASECHILDBONES','TBGL_M15DRAWMODEL','TBGL_M15DEFBONERESET', + 'TBGL_M15DEFBONELAYER','TBGL_M15DEFBONEBOX','TBGL_M15DEFBONEANCHOR','TBGL_M15DEFBONEADDVERTEX','TBGL_M15CLEARMODEL','TBGL_M15APPLYBONES','TBGL_M15ADDBONETREEITEM','TBGL_LOADTEXTURE', + 'TBGL_LOADFONT','TBGL_LOADBMPFONT','TBGL_LINEWIDTH','TBGL_LINESTIPPLE','TBGL_KILLFONT','TBGL_ISWINDOW','TBGL_ISPOINTVISIBLE','TBGL_ISPOINTBEHINDVIEW', + 'TBGL_GETWINDOWMULTIKEYSTATE','TBGL_GETWINDOWKEYSTATE','TBGL_GETWINDOWKEYONCE','TBGL_GETWINDOWCLIENT','TBGL_GETTEXTURENAME','TBGL_GETTEXTURELIST','TBGL_GETPIXELINFO','TBGL_GETMULTIASYNCKEYSTATE', + 'TBGL_GETLASTGLERROR','TBGL_GETFRAMERATE','TBGL_GETDESKTOPINFO','TBGL_GETASYNCKEYSTATE','TBGL_ERRORMESSAGES','TBGL_ENDPOLY','TBGL_ENDLIST','TBGL_DRAWFRAME', + 'TBGL_DESTROYWINDOW','TBGL_DELETELIST','TBGL_CYLINDER','TBGL_CREATEWINDOWEX','TBGL_CREATEWINDOW','TBGL_COLORALPHA','TBGL_COLOR','TBGL_CLEARFRAME', + 'TBGL_CAMERA','TBGL_CALLLIST','TBGL_BUILDFONT','TBGL_BOX','TBGL_BLENDFUNC','TBGL_BINDTEXTURE','TBGL_BEGINPOLY','TBGL_BACKCOLOR', + 'TBGL_ALPHAFUNC','TBDI_JOYZ','TBDI_JOYY','TBDI_JOYX','TBDI_JOYSTOPEFFECT','TBDI_JOYSLIDER','TBDI_JOYSETRANGEZ','TBDI_JOYSETRANGEY', + 'TBDI_JOYSETRANGEXYZ','TBDI_JOYSETRANGEX','TBDI_JOYSETDEADZONEZ','TBDI_JOYSETDEADZONEY','TBDI_JOYSETDEADZONEXYZ','TBDI_JOYSETDEADZONEX','TBDI_JOYSETAUTOCENTER','TBDI_JOYRZ', + 'TBDI_JOYRY','TBDI_JOYRX','TBDI_JOYPOV','TBDI_JOYPLAYEFFECT','TBDI_JOYLOADEFFECT','TBDI_JOYHASFF','TBDI_JOYHASEFFECT','TBDI_JOYGETEFFECTNAME', + 'TBDI_JOYGETEFFECTGUID','TBDI_JOYCREATEEFFECT','TBDI_JOYCOUNTPOV','TBDI_JOYCOUNTEFFECTS','TBDI_JOYCOUNTBTN','TBDI_JOYCOUNTAXES','TBDI_JOYBUTTON','TBDI_JOYAVAIL', + 'TBDI_INIT','TBASS_STREAMFREE','TBASS_STREAMCREATEFILE','TBASS_SETVOLUME','TBASS_SETEAXPRESET','TBASS_SETEAXPARAMETERS','TBASS_SETCONFIG','TBASS_SET3DPOSITION', + 'TBASS_SET3DFACTORS','TBASS_SAMPLELOAD','TBASS_SAMPLEGETCHANNEL','TBASS_MUSICLOAD','TBASS_MUSICFREE','TBASS_INIT','TBASS_GETVOLUME','TBASS_GETVERSION', + 'TBASS_GETCONFIG','TBASS_FREE','TBASS_ERRORGETCODE','TBASS_CHANNELSTOP','TBASS_CHANNELSETPOSITION','TBASS_CHANNELSETATTRIBUTES','TBASS_CHANNELSET3DPOSITION','TBASS_CHANNELPLAY', + 'TBASS_CHANNELPAUSE','TBASS_CHANNELISACTIVE','TBASS_CHANNELGETPOSITION','TBASS_CHANNELGETLENGTH','TBASS_CHANNELGETATTRIBUTES','TBASS_APPLY3D','TANH','TANGENT', + 'TAN','TALLY','TABCTRL_ONNOTIFY','TABCTRL_INSERTITEM','TABCTRL_GETCURSEL','SWAP','SUB','STRZIP$', + 'STRUNZIP$','STRREVERSE$','STRPTRLEN','STRPTR','STRINSERT$','STRING$','STRING','STRDELETE$', + 'STR$','STOP','STEP','STDOUT','STDIN','STAT_SUM','STAT_STDERROR','STAT_STDDEVIATION', + 'STAT_RANDOM','STAT_PRODUCT','STAT_MIN','STAT_MEDIAN','STAT_MEANHARMONIC','STAT_MEANGEOMETRIC','STAT_MEANARITHMETIC','STAT_MAX', + 'STAT_INVERSESUM','STAT_HISTOGRAM','STAT_FILLARRAY','STAT_COUNT','STAT_COPYARRAY','STAT_CLONEARRAY','STAT_CHISQUARE','STATIC', + 'STATE','SQR','SPLIT','SORT','SMTP_STATISTICS','SMTP_SETOPTION','SMTP_SETLOGFILE','SMTP_SENDHTML', + 'SMTP_SENDEMAIL','SMTP_GETERROR','SMTP_FINISHED','SMTP_DEBUG','SMTP_CONNECT','SMTP_CLOSE','SLEEP','SIZEOF', + 'SIZE','SINH','SINGLE','SIN','SIGNED','SHOW','SHIFT','SHAPETOBMP', + 'SGN','SETAT','SET','SENDMESSAGE','SENDKEYSBULK','SENDKEYS','SEND','SELECTEXPRESSION', + 'SELECT','SECH','SEC','SCAN','SAPI_SPEAK','SAPI_SETVOLUME','SAPI_SETRATE','SAPI_MODULELOADED', + 'SAPI_GETVOLUME','SAPI_GETRATE','RTRIM$','RTF_SETTEXT','RTF_SETFONTSIZE','RTF_SETFONTNAME','RTF_SETFGCOLOR','RTF_SETEFFECT', + 'RTF_SETBGCOLOR','RTF_SETALIGN','RTF_SAVETOFILE','RTF_LOADFROMFILE','RTF_GETTEXT','RTF_GETFONTSIZE','RTF_GETFONTNAME','RTF_GETEFFECT', + 'RTF_GETCLASS','RTF_APPENDTEXT','RSET$','ROUND','RNDF','RND','RIGHT$','RIGHT', + 'RGB','RESOURCE','RESIZE','RESET','REPLACE$','REPEAT$','REMOVE$','REM', + 'REGISTRY_SETVALUE','REGISTRY_SETTXTNUM','REGISTRY_SETTXTBOOL','REGISTRY_SETDWORD','REGISTRY_GETVALUE','REGISTRY_GETTXTNUM','REGISTRY_GETTXTBOOL','REGISTRY_GETDWORD', + 'REGISTRY_GETALLKEYS','REGISTRY_DELVALUE','REGISTRY_DELKEY','REFERENCE','REF','REDRAW','REDIM','RAS_SETPARAMS', + 'RAS_OPENDIALUPDIALOG','RAS_LOADENTRIES','RAS_HANGUPALL','RAS_HANGUP','RAS_GETENTRY','RAS_BEGINDIAL','RANDOMIZE','RADTODEG', + 'QUERYPERFORMANCEFREQUENCY','QUERYPERFORMANCECOUNTER','QUAD','PTR','PRESERVE','POST','POPUP','POKE$', + 'POKE','PIXELS','PI','PERMUTATIONS','PEEKMESSAGE','PEEK$','PEEK','PC_SYSTEMUPFROM', + 'PC_SUSPENDSTATE','PC_SHUTDOWN','PC_SHOWCARET','PC_SETCARETBLINKTIME','PC_RESTARTDIALOG','PC_PREVENTSHUTDOWN','PC_LOCK','PC_INSERTCD', + 'PC_HIDECARET','PC_GETSTATEONOFF','PC_GETSCROLLLOCKKEYSTATE','PC_GETNUMLOCKKEYSTATE','PC_GETCARETBLINKTIME','PC_GETCAPSLOCKKEYSTATE','PC_EMPTYBIN','PC_EJECTCD', + 'PC_DECODECDERROR','PCT','PARSESET$','PARSECOUNT','PARSE$','PARSE','PARAMETERS','OUTSIDE', + 'OS_WINVERSIONTEXT','OS_WINGETVERSIONTIMELINE','OS_SHELLEXECUTE','OS_SHELLABOUT','OS_SHELL','OS_SETLASTCALLDLLERROR','OS_SERVICESTOP','OS_SERVICESTATUSDESCRIPTION', + 'OS_SERVICESTARTTYPEDESCRIPTION','OS_SERVICESTART','OS_SERVICESETSTARTTYPE','OS_SERVICEQUERY','OS_SERVICEGETSTARTTYPE','OS_SERVICEGETLIST','OS_PROCESSKILLBYNAME','OS_PROCESSKILLBYID', + 'OS_PROCESSISRUNNING','OS_PROCESSGETLIST','OS_PROCESSGETID','OS_PROCESSARERUNNING','OS_MESSAGEBEEP','OS_ISWOW64','OS_ISFEATUREPRESENT','OS_IEVERSION', + 'OS_GETWINDOWSDIR','OS_GETUSERNAME','OS_GETTEMPDIR','OS_GETSYSTEMDIR','OS_GETSPECIALFOLDER','OS_GETLASTCALLDLLSTATUS','OS_GETLASTCALLDLLERROR','OS_GETCURRENTTHREADID', + 'OS_GETCURRENTPROCESSID','OS_GETCOMPUTERNAME','OS_GETCOMMANDS','OS_GETCOMMAND','OS_FLASHWINDOW','OS_FATALAPPEXIT','OS_ENVIRON','OS_CALLDLL', + 'OR','OPTIONAL','OPTION','OPT','ONCE','ON','OFF','NUMBER', + 'NOT','NEXT','NEW','MSGBOX','MOUSEPTR','MODULE','MODELESS','MODAL', + 'MOD','MKWRD$','MKS$','MKQ$','MKL$','MKI$','MKE$','MKDWD$', + 'MKD$','MKCUX$','MKCUR$','MKBYT$','MIN$','MIN','MID$','MENU', + 'MDI_CREATE','MCASE$','MAX$','MAX','MAKWRD','MAKLNG','MAKINT','MAKDWR', + 'LTRIM$','LSET$','LOWRD','LOOP','LONG','LOINT','LOG_WRITE','LOGB', + 'LOG2','LOG10','LOG','LOCAL','LOC','LL_UPDATEBYNAME','LL_UPDATE','LL_TOSTRING', + 'LL_TOFILE','LL_NAME','LL_GETITEM','LL_GETBYNUMBER','LL_FROMFILE','LL_FREE','LL_FINDLAST','LL_FINDBYNAME', + 'LL_FINDBYDATA','LL_DELETELIKE','LL_DELETEBYNAME','LL_DELETE','LL_DATABYNAME','LL_DATA','LL_COUNT','LL_ADD', + 'LISTBOX','LINE','LIBRARY_EXISTS','LIB','LEN','LEFT$','LEFT','LCASE$', + 'LBOUND','LABEL','KILL','JOIN$','ITERATE','ISWINDOW','ISUNICODE','ISTRUE', + 'ISODD','ISLIKE','ISFALSE','ISEVEN','IP_TOSTRING','IP_ADDR','INTERNALINFO','INTEGER', + 'INT','INSTR','INSIDE','INPUTBOX$','INI_SETKEY','INI_GETSECTIONSLIST','INI_GETSECTIONKEYLIST','INI_GETKEY', + 'INET_URLDOWNLOAD','INET_PING','INET_OPENDIALUPDIALOG','INET_GETSTATE','INET_GETREMOTEMACADDRESS','INET_GETIP','INET_GETCONNECTIONMODE','INCR', + 'IN','IMAGE','IIF$','IIF','IF','ICRYPTO_TESTSHA1','ICRYPTO_TESTMD5','ICRYPTO_TESTCRC32', + 'ICRYPTO_TESTCRC16','ICRYPTO_STRING2ASCII','ICRYPTO_SHA1','ICRYPTO_MD5','ICRYPTO_ENCRYPTRIJNDAEL','ICRYPTO_ENCRYPTRC4','ICRYPTO_DECRYPTRIJNDAEL','ICRYPTO_DECRYPTRC4', + 'ICRYPTO_CRC32','ICRYPTO_CRC16','ICRYPTO_BYTEXOR','ICRYPTO_BIN2ASCII','ICRYPTO_ASCII2STRING','ICRYPTO_ASCII2BIN','HOST_ADDR','HOSTNAME_TOIP', + 'HOSTIP_TONAME','HIWRD','HIINT','HEX$','HASH','HANDLE','GUIDTXT$','GUID$', + 'GRAPHIC','GLVOID','GLUSHORT','GLUINT','GLUBYTE','GLSIZEI','GLSHORT','GLOBAL', + 'GLINT','GLFLOAT','GLENUM','GLDOUBLE','GLCLAMPF','GLCLAMPD','GLBYTE','GLBOOLEAN', + 'GLBITFIELD','GETWINDOWMULTIKEYSTATE','GETWINDOWKEYSTATE','GETTICKCOUNT','GETS','GETMULTIASYNCKEYSTATE','GETMESSAGE','GETCURRENTINSTANCE', + 'GETAT','GETASYNCKEYSTATE','GET','FUNCTION_NPARAMS','FUNCTION_EXISTS','FUNCTION_CPARAMS','FUNCTION','FTP_SETSTRING', + 'FTP_SETSERVERDIR','FTP_SETNUMBER','FTP_SETMODE','FTP_SETLOGFILE','FTP_SETLOCALDIR','FTP_QUIT','FTP_PUTFILE','FTP_GETSTRING', + 'FTP_GETSERVERDIR','FTP_GETNUMBER','FTP_GETLOCALDIR','FTP_GETLIST','FTP_GETFILE','FTP_GETERRORSTRING','FTP_GETERRORNUMBER','FTP_FINISHED', + 'FTP_EXTRACT','FTP_DELFILE','FTP_CONNECT','FTP_COMMAND','FRAME','FRAC','FORMAT$','FOR', + 'FONT_LIST','FONT_CREATE','FONT','FOCUS','FLUSH','FIX','FILE_SIZE','FILE_SHELLDELETE', + 'FILE_SHELLCOPY','FILE_SETDATETIME','FILE_SEEK','FILE_SAVE','FILE_RENAME','FILE_PUT','FILE_PATHSPLIT','FILE_OPEN', + 'FILE_LOF','FILE_LOAD','FILE_LINEPRINT','FILE_LINEINPUT','FILE_KILL','FILE_GETVERSIONSTRING','FILE_GETVERSION','FILE_GETTIME', + 'FILE_GETDATETIMESTAMP','FILE_GETDATETIME','FILE_GETDATE','FILE_GET','FILE_EXISTS','FILE_EOF','FILE_COPY','FILE_CLOSE', + 'FILE_CHANGED','FILE_APPEND','FACTORIAL','EXTRACT$','EXT','EXPORT','EXP2','EXP10', + 'EXP','EXIT','EVAL_STRING','EVAL_SETSTRING','EVAL_SETNUMBER','EVAL_MATH','EVAL_LINKEXT','EVAL_GETSTRING', + 'EVAL_GETNUMBER','EVAL_ERRORGETTOKEN','EVAL_ERRORDESCRIPTION','EVAL_ERRORCLEAR','EVAL','ERRCLEAR','ERR','ENGINE_GETCURRENTTOKEN', + 'ENDIF','END','ENABLE','ELSEIF','ELSE','ECHO','DWORD','DT_YEAR', + 'DT_TIMETOSEC','DT_TIMESUBSECONDS','DT_TIMEFORMAT','DT_TIMEADDSECONDS','DT_SETTIMESEPARATOR','DT_SETDATESEPARATOR','DT_SETDATECENTURY','DT_SECTOTIME', + 'DT_SECTODATE','DT_SECOND','DT_MONTH','DT_MINUTE','DT_LASTDAYOFMONTH','DT_ISVALIDDATE','DT_ISLEAPYEAR','DT_HOUR', + 'DT_GETWEEKDAYNAME','DT_GETWEEKDAY','DT_GETTIMESTAMP','DT_GETTIMESEPARATOR','DT_GETMONTHNAME','DT_GETDATESEPARATOR','DT_GETDATECENTURY','DT_DAY', + 'DT_DATETOSEC','DT_DATETIMESUBSECONDS','DT_DATETIMEADDSECONDS','DT_DATESUBDAYS','DT_DATEFORMAT','DT_DATEDIFF','DT_DATEADDDAYS','DT_COOKIEDATE', + 'DRAW','DOUBLE','DOEVENTS','DO','DISABLE','DIR_REMOVE','DIR_MAKEALL','DIR_MAKE', + 'DIR_LISTARRAY','DIR_LIST','DIR_ISEMPTY','DIR_ISDIR','DIR_GETCURRENT','DIR_EXISTS','DIR_CHANGEDRIVE','DIR_CHANGE', + 'DIM','DICTIONARY_MEMINFO','DICTIONARY_LISTKEYS','DICTIONARY_FREE','DICTIONARY_FIND','DICTIONARY_EXISTS','DICTIONARY_CREATE','DICTIONARY_COUNT', + 'DICTIONARY_ADD','DIALOG_STOPEVENTS','DIALOG_SAVEFILE','DIALOG_OPENFILE','DIALOG_GETCONTROL','DIALOG_CHOOSECOLOR','DIALOG_BROWSEFORFOLDER','DIALOG', + 'DESKTOP','DESCENDING','DESCEND','DELETEOBJECT','DELETE','DEGTORAD','DECR','DECLARE', + 'DATE$','CVWRD','CVS','CVQ','CVL','CVI','CVE','CVDWD', + 'CVD','CVCUX','CVCUR','CVBYT','CURRENCY','CUR','CSET$','CSCH', + 'CSC','CRYPTO_GETPROVIDERTYPESCOUNT','CRYPTO_GETPROVIDERSCOUNT','CRYPTO_GETDEFAULTPROVIDER','CRYPTO_GENRANDOMSTRING','CRYPTO_ENUMPROVIDERTYPES','CRYPTO_ENUMPROVIDERS','CRYPTO_ENCRYPT', + 'CRYPTO_DECRYPT','CREATEFONT','COTH','COTAN','COSH','COS','CONTROL_SETTEXT','CONTROL_GETTEXT', + 'CONTROL_GETNUMBER','CONTROL','CONST','CONSOLE_WRITELINE','CONSOLE_WRITE','CONSOLE_WAITKEY','CONSOLE_SHOWWINDOW','CONSOLE_SHOWCURSOR', + 'CONSOLE_SETTITLE','CONSOLE_SETTEXTATTRIBUTE','CONSOLE_SETSTDHANDLE','CONSOLE_SETSCREENBUFFERSIZE','CONSOLE_SETPROGRESSBARCHAR','CONSOLE_SETOUTPUTMODE','CONSOLE_SETOUTPUTCP','CONSOLE_SETINPUTMODE', + 'CONSOLE_SETFILEAPISTOOEM','CONSOLE_SETFILEAPISTOANSI','CONSOLE_SETCURSORSIZE','CONSOLE_SETCURSORPOSITION','CONSOLE_SETCP','CONSOLE_SETACTIVESCREENBUFFER','CONSOLE_SCROLLWINDOW','CONSOLE_SCROLLBUFFERONEROW', + 'CONSOLE_SCROLLBUFFER','CONSOLE_SAVESCREEN','CONSOLE_RESTORESCREEN','CONSOLE_READLINE','CONSOLE_READ','CONSOLE_PROGRESSBAR','CONSOLE_PRINTLINE','CONSOLE_PRINTAT', + 'CONSOLE_PRINT','CONSOLE_NORMALSCREEN','CONSOLE_LINE','CONSOLE_INKEYB','CONSOLE_INKEY','CONSOLE_HIDECURSOR','CONSOLE_GETTITLE','CONSOLE_GETTEXTATTRIBUTE', + 'CONSOLE_GETSTDHANDLE','CONSOLE_GETSIZEY','CONSOLE_GETSIZEX','CONSOLE_GETPROGRESSBARCHAR','CONSOLE_GETOUTPUTMODE','CONSOLE_GETOUTPUTCP','CONSOLE_GETNUMBEROFMOUSEBUTTONS','CONSOLE_GETINPUTMODE', + 'CONSOLE_GETCURSORY','CONSOLE_GETCURSORX','CONSOLE_GETCURSORSIZE','CONSOLE_GETCURRENTFONTINDEX','CONSOLE_GETCP','CONSOLE_GENERATECTRLEVENT','CONSOLE_FULLSCREEN','CONSOLE_FREE', + 'CONSOLE_FOREGROUNDRGB','CONSOLE_ENABLECTRLC','CONSOLE_DISABLECTRLC','CONSOLE_CREATESCREENBUFFER','CONSOLE_COLORAT','CONSOLE_CLS','CONSOLE_BOX','CONSOLE_BACKGROUNDRGB', + 'CONSOLE_ATTACH','CONSOLE_AREFILEAPISANSI','CONSOLE_ALLOC','COM_VARIANTINIT','COM_VARIANTCOPY','COM_VARIANTCLEAR','COM_SUCCEEDED','COM_STRINGFROMCLSID', + 'COM_RELEASE','COM_QUERYINTERFACE','COM_PROGIDFROMCLSID','COM_ISEQUALIID','COM_ISEQUALGUID','COM_ISEQUALCLSID','COM_GETOBJECT','COM_GETENGINEGUID', + 'COM_EXECUTE','COM_DISPLAYERROR','COM_CREATEOBJECT','COM_CLSIDFROMSTRING','COM_CLSIDFROMPROGID','COM_BUILDVARIANT','COMBOBOX','COMBINATIONS', + 'COLOR','CLIPBOARD_SETTEXT','CLIPBOARD_GETTEXT','CLIENT','CLEARMESSAGES','CHR$','CHOOSE$','CHOOSE', + 'CHECKBOX','CHECK3STATE','CHECK','CGI_WRITELOGFILE','CGI_WRITE','CGI_URLDECODESTRING','CGI_UPLOADFILESTIME','CGI_UPLOADFILESNUMBER', + 'CGI_UPLOADFILESIZE','CGI_STARTSESSION','CGI_SETSESSIONVARIABLE','CGI_RESETDEFAULTSETTINGS','CGI_REMOVESPECIALCHARSPREFIX','CGI_REMOVEQUOTE','CGI_READ','CGI_LOADCONFIGFILE', + 'CGI_HEADER','CGI_GETSESSIONVARIABLE','CGI_GETREQUESTMETHOD','CGI_GETQUERYVALUE','CGI_GETCURRENTSESSION','CGI_GETCURRENTGUID','CGI_ENVIRON','CGI_CFGSETOPTION', + 'CGI_CFGGETOPTION','CGI_ADDSPECIALCHARSPREFIX','CGI_ADDQUOTE','CEIL','CASE','CALL','BYVAL','BYTE', + 'BYREF','BYCMD','BUTTON','BUNDLE_SETSCRIPTPARAMETERS','BUNDLE_SETSCRIPTNAME','BUNDLE_SETFLAGOBFUSCATEMAINSCRIPT','BUNDLE_SETFLAGDELETEAFTERRUN','BUNDLE_SETFLAGCOMPRESSALLFILES', + 'BUNDLE_SETFLAGASKBEFOREEXTRACT','BUNDLE_SETEXTRACTIONFOLDER','BUNDLE_SETCREATIONFOLDER','BUNDLE_SETBUNDLENAME','BUNDLE_RESET','BUNDLE_MAKE','BUNDLE_BUILDER','BUNDLE_ADDFOLDER', + 'BUNDLE_ADDFILE','BOUNDCHECK','BIN$','BIFF_WRITETEXT','BIFF_WRITENUMBER','BIFF_WRITEDATE','BIFF_SETROWHEIGHT','BIFF_SETCOLWIDTH', + 'BIFF_SETBUFFER','BIFF_CREATEFILE','BIFF_CLOSEFILE','BETWEEN','BEEP','BAR','ATTACH','ATN', + 'AT','ASSIGN','ASCIZ','ASCIIZ','ASCII2UNICODE','ASCENDING','ASCEND','ASC', + 'AS','ARRAY','ARCTANH','ARCSINH','ARCSIN','ARCSECH','ARCSEC','ARCCSCH', + 'ARCCSC','ARCCOTH','ARCCOT','ARCCOSH','ARCCOS','APP_TIMER','APP_SOURCEPATH','APP_SOURCENAME', + 'APP_SOURCEFULLNAME','APP_PATH','APP_NAME','APP_LISTVARIABLES','APP_LISTKEYWORDS','APP_LISTFUNCTIONS','APP_LISTEQUATES','APP_INCLUDEPATH', + 'APP_GETMODULEFULLPATH','APP_COUNTER','APPEND','ANY','ANIMATE_STOP','ANIMATE_PLAY','ANIMATE_OPEN','AND', + 'ALIAS','ALERT','ADD','ACODE$','ABS','%DEF','#MINVERSION','#IF', + '#ENDIF','#ELSEIF','#ELSE','#DEFAULT','#DEF','SQLWRITEPRIVATEPROFILESTRING','SQLWRITEFILEDSN','SQLWRITEDSNTOINI', + 'SQLVALIDDSN','SQLTRANSACT','SQLTABLES','SQLTABLEPRIVILEGES','SQLSTATISTICS','SQLSPECIALCOLUMNS','SQLSETSTMTOPTION','SQLSETSTMTATTR', + 'SQLSETSCROLLOPTIONS','SQLSETPOS','SQLSETPARAM','SQLSETENVATTR','SQLSETDESCREC','SQLSETDESCFIELD','SQLSETCURSORNAME','SQLSETCONNECTOPTION', + 'SQLSETCONNECTATTR','SQLSETCONFIGMODE','SQLROWCOUNT','SQLREMOVETRANSLATOR','SQLREMOVEDSNFROMINI','SQLREMOVEDRIVERMANAGER','SQLREMOVEDRIVER','SQLREADFILEDSN', + 'SQLPUTDATA','SQLPROCEDURES','SQLPROCEDURECOLUMNS','SQLPRIMARYKEYS','SQLPREPARE','SQLPOSTINSTALLERERROR','SQLPARAMOPTIONS','SQLPARAMDATA', + 'SQLNUMRESULTCOLS','SQLNUMPARAMS','SQLNATIVESQL','SQLMORERESULTS','SQLMANAGEDATASOURCES','SQLINSTALLTRANSLATOREX','SQLINSTALLERERROR','SQLINSTALLDRIVERMANAGER', + 'SQLINSTALLDRIVEREX','SQLGETTYPEINFO','SQLGETTRANSLATOR','SQLGETSTMTOPTION','SQLGETSTMTATTR','SQLGETPRIVATEPROFILESTRING','SQLGETINSTALLEDDRIVERS','SQLGETINFO', + 'SQLGETFUNCTIONS','SQLGETENVATTR','SQLGETDIAGREC','SQLGETDIAGFIELD','SQLGETDESCREC','SQLGETDESCFIELD','SQLGETDATA','SQLGETCURSORNAME', + 'SQLGETCONNECTOPTION','SQLGETCONNECTATTR','SQLGETCONFIGMODE','SQLFREESTMT','SQLFREEHANDLE','SQLFREEENV','SQLFREECONNECT','SQLFOREIGNKEYS', + 'SQLFETCHSCROLL','SQLFETCH','SQLEXTENDEDFETCH','SQLEXECUTE','SQLEXECDIRECT','SQLERROR','SQLENDTRAN','SQLDRIVERS', + 'SQLDRIVERCONNECT','SQLDISCONNECT','SQLDESCRIBEPARAM','SQLDESCRIBECOL','SQLDATASOURCES','SQLCREATEDATASOURCE','SQLCOPYDESC','SQLCONNECT', + 'SQLCONFIGDRIVER','SQLCONFIGDATASOURCE','SQLCOLUMNS','SQLCOLUMNPRIVILEGES','SQLCOLATTRIBUTES','SQLCOLATTRIBUTE','SQLCLOSECURSOR','SQLCANCEL', + 'SQLBULKOPERATIONS','SQLBROWSECONNECT','SQLBINDPARAMETER','SQLBINDPARAM','SQLBINDCOL','SQLALLOCSTMT','SQLALLOCHANDLE','SQLALLOCENV', + 'SQLALLOCCONNECT','ODBCWRONGDRIVER','ODBCWRITEPRIVATEPROFILESTRING','ODBCWRITEFILEDSN','ODBCWRITEDSNTOINI','ODBCVALIDDSN','ODBCUPDATERECORD','ODBCUPDATEBYBOOKMARK', + 'ODBCUNLOCKRECORD','ODBCUNBINDCOLUMNS','ODBCUNBINDCOL','ODBCTABLESCOUNT','ODBCTABLES','ODBCTABLEPRIVILEGESCOUNT','ODBCTABLEPRIVILEGES','ODBCSUPPORTS', + 'ODBCSTATTABLESCHEMANAME','ODBCSTATTABLEPAGES','ODBCSTATTABLECATALOGNAME','ODBCSTATTABLECARDINALITY','ODBCSTATISTICSCOUNT','ODBCSTATISTICS','ODBCSTATINDEXSORTSEQUENCE','ODBCSTATINDEXSCHEMANAME', + 'ODBCSTATINDEXQUALIFIER','ODBCSTATINDEXPAGES','ODBCSTATINDEXFILTERCONDITION','ODBCSTATINDEXCOLUMNORDINALPOSITION','ODBCSTATINDEXCOLUMNNAME','ODBCSTATINDEXCATALOGNAME','ODBCSTATINDEXCARDINALITY','ODBCSTATINDEXALLOWDUPLICATES', + 'ODBCSPECIALCOLUMNSCOUNT','ODBCSPECIALCOLUMNS','ODBCSETTXNISOLATION','ODBCSETTRANSLATELIB','ODBCSETTRACEFILE','ODBCSETTRACE','ODBCSETSTMTUSEBOOKMARKS','ODBCSETSTMTSIMULATECURSOR', + 'ODBCSETSTMTROWSTATUSPTR','ODBCSETSTMTROWSFETCHEDPTR','ODBCSETSTMTROWOPERATIONPTR','ODBCSETSTMTROWBINDTYPE','ODBCSETSTMTROWBINDOFFSETPTR','ODBCSETSTMTROWARRAYSIZE','ODBCSETSTMTRETRIEVEDATA','ODBCSETSTMTQUERYTIMEOUT', + 'ODBCSETSTMTPARAMSTATUSPTR','ODBCSETSTMTPARAMSPROCESSEDPTR','ODBCSETSTMTPARAMSETSIZE','ODBCSETSTMTPARAMOPERATIONPTR','ODBCSETSTMTPARAMBINDTYPE','ODBCSETSTMTPARAMBINDOFFSETPTR','ODBCSETSTMTNOSCAN','ODBCSETSTMTMETADATAID', + 'ODBCSETSTMTMAXROWS','ODBCSETSTMTMAXLENGTH','ODBCSETSTMTKEYSETSIZE','ODBCSETSTMTFETCHBOOKMARKPTR','ODBCSETSTMTENABLEAUTOIPD','ODBCSETSTMTCURSORTYPE','ODBCSETSTMTCURSORSENSITIVITY','ODBCSETSTMTCURSORSCROLLABLE', + 'ODBCSETSTMTCONCURRENCY','ODBCSETSTMTATTR','ODBCSETSTMTASYNCENABLE','ODBCSETSTMTAPPROWDESC','ODBCSETSTMTAPPPARAMDESC','ODBCSETSTATICCURSOR','ODBCSETROWVERCONCURRENCY','ODBCSETRESULT', + 'ODBCSETRELATIVEPOSITION','ODBCSETREADONLYCONCURRENCY','ODBCSETQUIETMODE','ODBCSETPOSITION','ODBCSETPOS','ODBCSETPACKETMODE','ODBCSETOPTIMISTICCONCURRENCY','ODBCSETODBCCURSORS', + 'ODBCSETMULTIUSERKEYSETCURSOR','ODBCSETMETADATAID','ODBCSETLOGINTIMEOUT','ODBCSETLOCKCONCURRENCY','ODBCSETKEYSETDRIVENCURSOR','ODBCSETFORWARDONLYCURSOR','ODBCSETENVOUTPUTNTS','ODBCSETENVODBCVERSION', + 'ODBCSETENVCPMATCH','ODBCSETENVCONNECTIONPOOLING','ODBCSETENVATTR','ODBCSETDYNAMICCURSOR','ODBCSETDESCREC','ODBCSETDESCFIELD','ODBCSETCURSORTYPE','ODBCSETCURSORSENSITIVITY', + 'ODBCSETCURSORSCROLLABILITY','ODBCSETCURSORNAME','ODBCSETCURSORLOCKTYPE','ODBCSETCURSORKEYSETSIZE','ODBCSETCURSORCONCURRENCY','ODBCSETCURRENTCATALOG','ODBCSETCONNECTIONTIMEOUT','ODBCSETCONNECTATTR', + 'ODBCSETCONFIGMODE','ODBCSETCONCURVALUESCONCURRENCY','ODBCSETAUTOCOMMITON','ODBCSETAUTOCOMMITOFF','ODBCSETAUTOCOMMIT','ODBCSETASYNCENABLE','ODBCSETACCESSMODE','ODBCSETABSOLUTEPOSITION', + 'ODBCROWCOUNT','ODBCROLLBACKTRAN','ODBCROLLBACKENVTRAN','ODBCROLLBACKDBCTRAN','ODBCRESULT','ODBCRESETPARAMS','ODBCREMOVETRANSLATOR','ODBCREMOVEDSNFROMINI', + 'ODBCREMOVEDRIVERMANAGER','ODBCREMOVEDRIVER','ODBCREFRESHRECORD','ODBCRECORDCOUNT','ODBCREADFILEDSN','ODBCQUOTEDIDENTIFIERCASE','ODBCPUTDATA','ODBCPROCEDURESCOUNT', + 'ODBCPROCEDURES','ODBCPROCEDURECOLUMNSCOUNT','ODBCPROCEDURECOLUMNS','ODBCPRIMARYKEYSCOUNT','ODBCPRIMARYKEYS','ODBCPREPARE','ODBCPOSTINSTALLERERROR','ODBCPARAMDATA', + 'ODBCOPENSTMT','ODBCOPENCONNECTION','ODBCNUMRESULTCOLS','ODBCNUMPARAMS','ODBCNATIVESQL','ODBCMOVEPREVIOUS','ODBCMOVENEXT','ODBCMOVELAST', + 'ODBCMOVEFIRST','ODBCMOVE','ODBCMORERESULTS','ODBCMANAGEDATASOURCES','ODBCLOCKRECORD','ODBCINSTALLTRANSLATOREX','ODBCINSTALLERERROR','ODBCINSTALLDRIVERMANAGER', + 'ODBCINSTALLDRIVEREX','ODBCGETXOPENCLIYEAR','ODBCGETUSERNAME','ODBCGETUNION','ODBCGETTYPEINFOCOUNT','ODBCGETTYPEINFO','ODBCGETTXNISOLATIONOPTION','ODBCGETTXNISOLATION', + 'ODBCGETTXNCAPABLE','ODBCGETTRANSLATOR','ODBCGETTRANSLATELIB','ODBCGETTRACEFILE','ODBCGETTRACE','ODBCGETTIMEDATEFUNCTIONS','ODBCGETTIMEDATEDIFFINTERVALS','ODBCGETTIMEDATEADDINTERVALS', + 'ODBCGETTABLETERM','ODBCGETSYSTEMFUNCTIONS','ODBCGETSUBQUERIES','ODBCGETSTRINGFUNCTIONS','ODBCGETSTMTUSEBOOKMARKS','ODBCGETSTMTSQLSTATE','ODBCGETSTMTSIMULATECURSOR','ODBCGETSTMTROWSTATUSPTR', + 'ODBCGETSTMTROWSFETCHEDPTR','ODBCGETSTMTROWOPERATIONPTR','ODBCGETSTMTROWNUMBER','ODBCGETSTMTROWBINDTYPE','ODBCGETSTMTROWBINDOFFSETPTR','ODBCGETSTMTROWARRAYSIZE','ODBCGETSTMTRETRIEVEDATA','ODBCGETSTMTQUERYTIMEOUT', + 'ODBCGETSTMTPARAMSTATUSPTR','ODBCGETSTMTPARAMSPROCESSEDPTR','ODBCGETSTMTPARAMSETSIZE','ODBCGETSTMTPARAMOPERATIONPTR','ODBCGETSTMTPARAMBINDTYPE','ODBCGETSTMTPARAMBINDOFFSETPTR','ODBCGETSTMTNOSCAN','ODBCGETSTMTMETADATAID', + 'ODBCGETSTMTMAXROWS','ODBCGETSTMTMAXLENGTH','ODBCGETSTMTKEYSETSIZE','ODBCGETSTMTIMPROWDESC','ODBCGETSTMTIMPPARAMDESC','ODBCGETSTMTFETCHBOOKMARKPTR','ODBCGETSTMTERRORINFO','ODBCGETSTMTENABLEAUTOIPD', + 'ODBCGETSTMTCURSORTYPE','ODBCGETSTMTCURSORSENSITIVITY','ODBCGETSTMTCURSORSCROLLABLE','ODBCGETSTMTCONCURRENCY','ODBCGETSTMTATTR','ODBCGETSTMTASYNCENABLE','ODBCGETSTMTAPPROWDESC','ODBCGETSTMTAPPPARAMDESC', + 'ODBCGETSTATICCURSORATTRIBUTES2','ODBCGETSTATICCURSORATTRIBUTES1','ODBCGETSTATEMENTSQLSTATE','ODBCGETSTATEMENTERRORINFO','ODBCGETSTANDARDCLICONFORMANCE','ODBCGETSQLSTATE','ODBCGETSQLCONFORMANCE','ODBCGETSQL92VALUEEXPRESSIONS', + 'ODBCGETSQL92STRINGFUNCTIONS','ODBCGETSQL92ROWVALUECONSTRUCTOR','ODBCGETSQL92REVOKE','ODBCGETSQL92RELATIONALJOINOPERATORS','ODBCGETSQL92PREDICATES','ODBCGETSQL92NUMERICVALUEFUNCTIONS','ODBCGETSQL92GRANT','ODBCGETSQL92FOREIGNKEYUPDATERULE', + 'ODBCGETSQL92FOREIGNKEYDELETERULE','ODBCGETSQL92DATETIMEFUNCTIONS','ODBCGETSPECIALCHARACTERS','ODBCGETSERVERNAME','ODBCGETSEARCHPATTERNESCAPE','ODBCGETSCROLLOPTIONS','ODBCGETSCHEMAUSAGE','ODBCGETSCHEMATERM', + 'ODBCGETROWUPDATES','ODBCGETQUIETMODE','ODBCGETPROCEDURETERM','ODBCGETPROCEDURESSUPPORT','ODBCGETPRIVATEPROFILESTRING','ODBCGETPOSOPERATIONS','ODBCGETPARAMARRAYSELECTS','ODBCGETPARAMARRAYROWCOUNTS', + 'ODBCGETPACKETMODE','ODBCGETOUTERJOINS','ODBCGETORDERBYCOLUMNSINSELECT','ODBCGETOJCAPABILITIES','ODBCGETODBCVER','ODBCGETODBCINTERFACECONFORMANCE','ODBCGETODBCCURSORS','ODBCGETNUMERICFUNCTIONS', + 'ODBCGETNULLCOLLATION','ODBCGETNONNULLABLECOLUMNS','ODBCGETNEEDLONGDATALEN','ODBCGETMULTRESULTSETS','ODBCGETMULTIPLEACTIVETXN','ODBCGETMETADATAID','ODBCGETMAXUSERNAMELEN','ODBCGETMAXTABLESINSELECT', + 'ODBCGETMAXTABLENAMELEN','ODBCGETMAXSTATEMENTLEN','ODBCGETMAXSCHEMANAMELEN','ODBCGETMAXROWSIZEINCLUDESLONG','ODBCGETMAXROWSIZE','ODBCGETMAXPROCEDURENAMELEN','ODBCGETMAXINDEXSIZE','ODBCGETMAXIDENTIFIERLEN', + 'ODBCGETMAXDRIVERCONNECTIONS','ODBCGETMAXCURSORNAMELEN','ODBCGETMAXCONCURRENTACTIVITIES','ODBCGETMAXCOLUMNSINTABLE','ODBCGETMAXCOLUMNSINSELECT','ODBCGETMAXCOLUMNSINORDERBY','ODBCGETMAXCOLUMNSININDEX','ODBCGETMAXCOLUMNSINGROUPBY', + 'ODBCGETMAXCOLUMNNAMELEN','ODBCGETMAXCHARLITERALLEN','ODBCGETMAXCATALOGNAMELEN','ODBCGETMAXBINARYLITERALLEN','ODBCGETMAXASYNCCONCURRENTSTATEMENTS','ODBCGETLONGVARCHARDATABYCOLNAME','ODBCGETLONGVARCHARDATA','ODBCGETLOGINTIMEOUT', + 'ODBCGETLIKEESCAPECLAUSE','ODBCGETKEYWORDS','ODBCGETKEYSETCURSORATTRIBUTES2','ODBCGETKEYSETCURSORATTRIBUTES1','ODBCGETINTEGRITY','ODBCGETINSTALLERERRORMESSAGE','ODBCGETINSTALLERERRORCODE','ODBCGETINSTALLEDDRIVERS', + 'ODBCGETINSERTSTATEMENT','ODBCGETINFOSTR','ODBCGETINFOSCHEMAVIEWS','ODBCGETINFOLONG','ODBCGETINFOINT','ODBCGETINFO','ODBCGETINDEXKEYWORDS','ODBCGETIMPROWDESCREC', + 'ODBCGETIMPROWDESCFIELDTYPE','ODBCGETIMPROWDESCFIELDSCALE','ODBCGETIMPROWDESCFIELDPRECISION','ODBCGETIMPROWDESCFIELDOCTETLENGTH','ODBCGETIMPROWDESCFIELDNULLABLE','ODBCGETIMPROWDESCFIELDNAME','ODBCGETIMPROWDESCFIELD','ODBCGETIMPPARAMDESCREC', + 'ODBCGETIMPPARAMDESCFIELDTYPE','ODBCGETIMPPARAMDESCFIELDSCALE','ODBCGETIMPPARAMDESCFIELDPRECISION','ODBCGETIMPPARAMDESCFIELDOCTETLENGTH','ODBCGETIMPPARAMDESCFIELDNULLABLE','ODBCGETIMPPARAMDESCFIELDNAME','ODBCGETIMPPARAMDESCFIELD','ODBCGETIDENTIFIERQUOTECHAR', + 'ODBCGETIDENTIFIERCASE','ODBCGETGROUPBY','ODBCGETFUNCTIONS','ODBCGETFORWARDONLYCURSORATTRIBUTES2','ODBCGETFORWARDONLYCURSORATTRIBUTES1','ODBCGETFILEUSAGE','ODBCGETEXPRESSIONSINORDERBY','ODBCGETERRORINFO', + 'ODBCGETENVSQLSTATE','ODBCGETENVOUTPUTNTS','ODBCGETENVODBCVERSION','ODBCGETENVIRONMENTSQLSTATE','ODBCGETENVIRONMENTERRORINFO','ODBCGETENVERRORINFO','ODBCGETENVCPMATCH','ODBCGETENVCONNECTIONPOOLING', + 'ODBCGETENVATTR','ODBCGETDYNAMICCURSORATTRIBUTES2','ODBCGETDYNAMICCURSORATTRIBUTES1','ODBCGETDROPVIEW','ODBCGETDROPTRANSLATION','ODBCGETDROPTABLE','ODBCGETDROPSCHEMA','ODBCGETDROPDOMAIN', + 'ODBCGETDROPCOLLATION','ODBCGETDROPCHARACTERSET','ODBCGETDROPASSERTION','ODBCGETDRIVERVER','ODBCGETDRIVERODBCVER','ODBCGETDRIVERNAME','ODBCGETDRIVERMANAGERINSTALLPATH','ODBCGETDRIVERHLIB', + 'ODBCGETDRIVERHENV','ODBCGETDRIVERHDBC','ODBCGETDMVERMINOR','ODBCGETDMVERMAJOR','ODBCGETDMVER','ODBCGETDIAGREC','ODBCGETDIAGFIELD','ODBCGETDESCSQLSTATE', + 'ODBCGETDESCRIPTORSQLSTATE','ODBCGETDESCRIPTORERRORINFO','ODBCGETDESCRIBEPARAMETER','ODBCGETDESCREC','ODBCGETDESCFIELD','ODBCGETDESCERRORINFO','ODBCGETDEFAULTTXNISOLATION','ODBCGETDDLINDEX', + 'ODBCGETDBMSVER','ODBCGETDBMSNAME','ODBCGETDBCSQLSTATE','ODBCGETDBCERRORINFO','ODBCGETDATETIMELITERALS','ODBCGETDATASTRINGBYCOLNAME','ODBCGETDATASTRING','ODBCGETDATASOURCEREADONLY', + 'ODBCGETDATASOURCENAME','ODBCGETDATAEXTENSIONS','ODBCGETDATABASENAME','ODBCGETDATA','ODBCGETCURSORTYPE','ODBCGETCURSORSENSITIVITYSUPPORT','ODBCGETCURSORSENSITIVITY','ODBCGETCURSORSCROLLABILITY', + 'ODBCGETCURSORROLLBACKBEHAVIOR','ODBCGETCURSORNAME','ODBCGETCURSORLOCKTYPE','ODBCGETCURSORKEYSETSIZE','ODBCGETCURSORCONCURRENCY','ODBCGETCURSORCOMMITBEHAVIOR','ODBCGETCURRENTCATALOG','ODBCGETCREATEVIEW', + 'ODBCGETCREATETRANSLATION','ODBCGETCREATETABLE','ODBCGETCREATESCHEMA','ODBCGETCREATEDOMAIN','ODBCGETCREATECOLLATION','ODBCGETCREATECHARACTERSET','ODBCGETCREATEASSERTION','ODBCGETCORRELATIONNAME', + 'ODBCGETCONVERTVARCHAR','ODBCGETCONVERTVARBINARY','ODBCGETCONVERTTINYINT','ODBCGETCONVERTTIMESTAMP','ODBCGETCONVERTTIME','ODBCGETCONVERTSMALLINT','ODBCGETCONVERTREAL','ODBCGETCONVERTNUMERIC', + 'ODBCGETCONVERTLONGVARCHAR','ODBCGETCONVERTLONGVARBINARY','ODBCGETCONVERTINTERVALYEARMONTH','ODBCGETCONVERTINTERVALDAYTIME','ODBCGETCONVERTINTEGER','ODBCGETCONVERTFUNCTIONS','ODBCGETCONVERTFLOAT','ODBCGETCONVERTDOUBLE', + 'ODBCGETCONVERTDECIMAL','ODBCGETCONVERTDATE','ODBCGETCONVERTCHAR','ODBCGETCONVERTBIT','ODBCGETCONVERTBINARY','ODBCGETCONVERTBIGINT','ODBCGETCONNECTIONTIMEOUT','ODBCGETCONNECTIONSQLSTATE', + 'ODBCGETCONNECTIONERRORINFO','ODBCGETCONNECTIONDEAD','ODBCGETCONNECTATTR','ODBCGETCONFIGMODE','ODBCGETCONCATNULLBEHAVIOR','ODBCGETCOLUMNALIAS','ODBCGETCOLLATIONSEQ','ODBCGETCATALOGUSAGE', + 'ODBCGETCATALOGTERM','ODBCGETCATALOGNAMESEPARATOR','ODBCGETCATALOGNAME','ODBCGETCATALOGLOCATION','ODBCGETBOOKMARKPERSISTENCE','ODBCGETBATCHSUPPORT','ODBCGETBATCHROWCOUNT','ODBCGETAUTOIPD', + 'ODBCGETAUTOCOMMIT','ODBCGETASYNCMODE','ODBCGETASYNCENABLE','ODBCGETALTERTABLE','ODBCGETALTERDOMAIN','ODBCGETAGGREGATEFUNCTIONS','ODBCGETACTIVEENVIRONMENTS','ODBCGETACCESSMODE', + 'ODBCGETACCESSIBLETABLES','ODBCGETACCESSIBLEPROCEDURES','ODBCFREESTMT','ODBCFREEHANDLE','ODBCFREEENV','ODBCFREEDESC','ODBCFREEDBC','ODBCFREECONNECT', + 'ODBCFOREIGNKEYSCOUNT','ODBCFOREIGNKEYS','ODBCFETCHSCROLL','ODBCFETCHBYBOOKMARK','ODBCFETCH','ODBCEXTENDEDFETCH','ODBCEXECUTE','ODBCEXECDIRECT', + 'ODBCERROR','ODBCEOF','ODBCENDTRAN','ODBCDRIVERSCOUNT','ODBCDRIVERS','ODBCDRIVERCONNECT','ODBCDISCONNECT','ODBCDESCRIBEPARAM', + 'ODBCDESCRIBECOL','ODBCDELETERECORD','ODBCDELETEBYBOOKMARK','ODBCDATASOURCES','ODBCCREATEDATASOURCE','ODBCCOPYDESC','ODBCCONNECTIONISDEAD','ODBCCONNECTIONISALIVE', + 'ODBCCONNECT','ODBCCONFIGDRIVER','ODBCCONFIGDATASOURCE','ODBCCOMMITTRAN','ODBCCOMMITENVTRAN','ODBCCOMMITDBCTRAN','ODBCCOLUPDATABLE','ODBCCOLUNSIGNED', + 'ODBCCOLUNNAMED','ODBCCOLUMNSCOUNT','ODBCCOLUMNS','ODBCCOLUMNPRIVILEGESCOUNT','ODBCCOLUMNPRIVILEGES','ODBCCOLUMN','ODBCCOLTYPENAME','ODBCCOLTYPE', + 'ODBCCOLTABLENAME','ODBCCOLSEARCHABLE','ODBCCOLSCHEMANAME','ODBCCOLSCALE','ODBCCOLPRECISION','ODBCCOLOCTETLENGTH','ODBCCOLNUMPRECRADIX','ODBCCOLNULLABLE', + 'ODBCCOLNAME','ODBCCOLLOCALTYPENAME','ODBCCOLLITERALSUFFIX','ODBCCOLLITERALPREFIX','ODBCCOLLENGTH','ODBCCOLLABEL','ODBCCOLISNULL','ODBCCOLFIXEDPRECSCALE', + 'ODBCCOLDISPLAYSIZE','ODBCCOLCOUNT','ODBCCOLCONCISETYPE','ODBCCOLCATALOGNAME','ODBCCOLCASESENSITIVE','ODBCCOLBASETABLENAME','ODBCCOLBASECOLUMNNAME','ODBCCOLAUTOUNIQUEVALUE', + 'ODBCCOLATTRIBUTE','ODBCCLOSESTMTCURSOR','ODBCCLOSESTMT','ODBCCLOSECURSOR','ODBCCLOSECONNECTION','ODBCCLEARRESULT','ODBCCANCEL','ODBCBULKOPERATIONS', + 'ODBCBROWSECONNECT','ODBCBINDPARAMETER','ODBCBINDCOLTOWORD','ODBCBINDCOLTOTIMESTAMP','ODBCBINDCOLTOTIME','ODBCBINDCOLTOSTRING','ODBCBINDCOLTOSINGLE','ODBCBINDCOLTOQUAD', + 'ODBCBINDCOLTONUMERIC','ODBCBINDCOLTOLONG','ODBCBINDCOLTOINTEGER','ODBCBINDCOLTODWORD','ODBCBINDCOLTODOUBLE','ODBCBINDCOLTODECIMAL','ODBCBINDCOLTODATE','ODBCBINDCOLTOCURRENCY', + 'ODBCBINDCOLTOBYTE','ODBCBINDCOLTOBIT','ODBCBINDCOLTOBINARY','ODBCBINDCOL','ODBCALLOCSTMT','ODBCALLOCHANDLE','ODBCALLOCENV','ODBCALLOCDESC', + 'ODBCALLOCDBC','ODBCALLOCCONNECT','ODBCADDRECORD','GLVIEWPORT','GLVERTEXPOINTER','GLVERTEX4SV','GLVERTEX4S','GLVERTEX4IV', + 'GLVERTEX4I','GLVERTEX4FV','GLVERTEX4F','GLVERTEX4DV','GLVERTEX4D','GLVERTEX3SV','GLVERTEX3S','GLVERTEX3IV', + 'GLVERTEX3I','GLVERTEX3FV','GLVERTEX3F','GLVERTEX3DV','GLVERTEX3D','GLVERTEX2SV','GLVERTEX2S','GLVERTEX2IV', + 'GLVERTEX2I','GLVERTEX2FV','GLVERTEX2F','GLVERTEX2DV','GLVERTEX2D','GLUUNPROJECT','GLUTESSVERTEX','GLUTESSPROPERTY', + 'GLUTESSNORMAL','GLUTESSENDPOLYGON','GLUTESSENDCONTOUR','GLUTESSCALLBACK','GLUTESSBEGINPOLYGON','GLUTESSBEGINCONTOUR','GLUSPHERE','GLUSCALEIMAGE', + 'GLUQUADRICTEXTURE','GLUQUADRICORIENTATION','GLUQUADRICNORMALS','GLUQUADRICDRAWSTYLE','GLUQUADRICCALLBACK','GLUPWLCURVE','GLUPROJECT','GLUPICKMATRIX', + 'GLUPERSPECTIVE','GLUPARTIALDISK','GLUORTHO2D','GLUNURBSSURFACE','GLUNURBSPROPERTY','GLUNURBSCURVE','GLUNURBSCALLBACK','GLUNEXTCONTOUR', + 'GLUNEWTESS','GLUNEWQUADRIC','GLUNEWNURBSRENDERER','GLULOOKAT','GLULOADSAMPLINGMATRICES','GLUGETTESSPROPERTY','GLUGETSTRING','GLUGETNURBSPROPERTY', + 'GLUERRORSTRING','GLUENDTRIM','GLUENDSURFACE','GLUENDPOLYGON','GLUENDCURVE','GLUDISK','GLUDELETETESS','GLUDELETEQUADRIC', + 'GLUDELETENURBSRENDERER','GLUCYLINDER','GLUBUILD2DMIPMAPS','GLUBUILD1DMIPMAPS','GLUBEGINTRIM','GLUBEGINSURFACE','GLUBEGINPOLYGON','GLUBEGINCURVE', + 'GLTRANSLATEF','GLTRANSLATED','GLTEXSUBIMAGE2D','GLTEXSUBIMAGE1D','GLTEXPARAMETERIV','GLTEXPARAMETERI','GLTEXPARAMETERFV','GLTEXPARAMETERF', + 'GLTEXIMAGE2D','GLTEXIMAGE1D','GLTEXGENIV','GLTEXGENI','GLTEXGENFV','GLTEXGENF','GLTEXGENDV','GLTEXGEND', + 'GLTEXENVIV','GLTEXENVI','GLTEXENVFV','GLTEXENVF','GLTEXCOORDPOINTER','GLTEXCOORD4SV','GLTEXCOORD4S','GLTEXCOORD4IV', + 'GLTEXCOORD4I','GLTEXCOORD4FV','GLTEXCOORD4F','GLTEXCOORD4DV','GLTEXCOORD4D','GLTEXCOORD3SV','GLTEXCOORD3S','GLTEXCOORD3IV', + 'GLTEXCOORD3I','GLTEXCOORD3FV','GLTEXCOORD3F','GLTEXCOORD3DV','GLTEXCOORD3D','GLTEXCOORD2SV','GLTEXCOORD2S','GLTEXCOORD2IV', + 'GLTEXCOORD2I','GLTEXCOORD2FV','GLTEXCOORD2F','GLTEXCOORD2DV','GLTEXCOORD2D','GLTEXCOORD1SV','GLTEXCOORD1S','GLTEXCOORD1IV', + 'GLTEXCOORD1I','GLTEXCOORD1FV','GLTEXCOORD1F','GLTEXCOORD1DV','GLTEXCOORD1D','GLSTENCILOP','GLSTENCILMASK','GLSTENCILFUNC', + 'GLSHADEMODEL','GLSELECTBUFFER','GLSCISSOR','GLSCALEF','GLSCALED','GLROTATEF','GLROTATED','GLRENDERMODE', + 'GLRECTSV','GLRECTS','GLRECTIV','GLRECTI','GLRECTFV','GLRECTF','GLRECTDV','GLRECTD', + 'GLREADPIXELS','GLREADBUFFER','GLRASTERPOS4SV','GLRASTERPOS4S','GLRASTERPOS4IV','GLRASTERPOS4I','GLRASTERPOS4FV','GLRASTERPOS4F', + 'GLRASTERPOS4DV','GLRASTERPOS4D','GLRASTERPOS3SV','GLRASTERPOS3S','GLRASTERPOS3IV','GLRASTERPOS3I','GLRASTERPOS3FV','GLRASTERPOS3F', + 'GLRASTERPOS3DV','GLRASTERPOS3D','GLRASTERPOS2SV','GLRASTERPOS2S','GLRASTERPOS2IV','GLRASTERPOS2I','GLRASTERPOS2FV','GLRASTERPOS2F', + 'GLRASTERPOS2DV','GLRASTERPOS2D','GLPUSHNAME','GLPUSHMATRIX','GLPUSHCLIENTATTRIB','GLPUSHATTRIB','GLPRIORITIZETEXTURES','GLPOPNAME', + 'GLPOPMATRIX','GLPOPCLIENTATTRIB','GLPOPATTRIB','GLPOLYGONSTIPPLE','GLPOLYGONOFFSET','GLPOLYGONMODE','GLPOINTSIZE','GLPIXELZOOM', + 'GLPIXELTRANSFERI','GLPIXELTRANSFERF','GLPIXELSTOREI','GLPIXELSTOREF','GLPIXELMAPUSV','GLPIXELMAPUIV','GLPIXELMAPFV','GLPASSTHROUGH', + 'GLORTHO','GLNORMALPOINTER','GLNORMAL3SV','GLNORMAL3S','GLNORMAL3IV','GLNORMAL3I','GLNORMAL3FV','GLNORMAL3F', + 'GLNORMAL3DV','GLNORMAL3D','GLNORMAL3BV','GLNORMAL3B','GLNEWLIST','GLMULTMATRIXF','GLMULTMATRIXD','GLMATRIXMODE', + 'GLMATERIALIV','GLMATERIALI','GLMATERIALFV','GLMATERIALF','GLMAPGRID2F','GLMAPGRID2D','GLMAPGRID1F','GLMAPGRID1D', + 'GLMAP2F','GLMAP2D','GLMAP1F','GLMAP1D','GLLOGICOP','GLLOADNAME','GLLOADMATRIXF','GLLOADMATRIXD', + 'GLLOADIDENTITY','GLLISTBASE','GLLINEWIDTH','GLLINESTIPPLE','GLLIGHTMODELIV','GLLIGHTMODELI','GLLIGHTMODELFV','GLLIGHTMODELF', + 'GLLIGHTIV','GLLIGHTI','GLLIGHTFV','GLLIGHTF','GLISTEXTURE','GLISLIST','GLISENABLED','GLINTERLEAVEDARRAYS', + 'GLINITNAMES','GLINDEXUBV','GLINDEXUB','GLINDEXSV','GLINDEXS','GLINDEXPOINTER','GLINDEXMASK','GLINDEXIV', + 'GLINDEXI','GLINDEXFV','GLINDEXF','GLINDEXDV','GLINDEXD','GLHINT','GLGETTEXPARAMETERIV','GLGETTEXPARAMETERFV', + 'GLGETTEXLEVELPARAMETERIV','GLGETTEXLEVELPARAMETERFV','GLGETTEXIMAGE','GLGETTEXGENIV','GLGETTEXGENFV','GLGETTEXGENDV','GLGETTEXENVIV','GLGETTEXENVFV', + 'GLGETSTRING','GLGETPOLYGONSTIPPLE','GLGETPOINTERV','GLGETPIXELMAPUSV','GLGETPIXELMAPUIV','GLGETPIXELMAPFV','GLGETMATERIALIV','GLGETMATERIALFV', + 'GLGETMAPIV','GLGETMAPFV','GLGETMAPDV','GLGETLIGHTIV','GLGETLIGHTFV','GLGETINTEGERV','GLGETFLOATV','GLGETERROR', + 'GLGETDOUBLEV','GLGETCLIPPLANE','GLGETBOOLEANV','GLGENTEXTURES','GLGENLISTS','GLFRUSTUM','GLFRONTFACE','GLFOGIV', + 'GLFOGI','GLFOGFV','GLFOGF','GLFLUSH','GLFINISH','GLFEEDBACKBUFFER','GLEVALPOINT2','GLEVALPOINT1', + 'GLEVALMESH2','GLEVALMESH1','GLEVALCOORD2FV','GLEVALCOORD2F','GLEVALCOORD2DV','GLEVALCOORD2D','GLEVALCOORD1FV','GLEVALCOORD1F', + 'GLEVALCOORD1DV','GLEVALCOORD1D','GLENDLIST','GLEND','GLENABLECLIENTSTATE','GLENABLE','GLEDGEFLAGV','GLEDGEFLAGPOINTER', + 'GLEDGEFLAG','GLDRAWPIXELS','GLDRAWELEMENTS','GLDRAWBUFFER','GLDRAWARRAYS','GLDISABLECLIENTSTATE','GLDISABLE','GLDEPTHRANGE', + 'GLDEPTHMASK','GLDEPTHFUNC','GLDELETETEXTURES','GLDELETELISTS','GLCULLFACE','GLCOPYTEXSUBIMAGE2D','GLCOPYTEXSUBIMAGE1D','GLCOPYTEXIMAGE2D', + 'GLCOPYTEXIMAGE1D','GLCOPYPIXELS','GLCOLORPOINTER','GLCOLORMATERIAL','GLCOLORMASK','GLCOLOR4USV','GLCOLOR4US','GLCOLOR4UIV', + 'GLCOLOR4UI','GLCOLOR4UBV','GLCOLOR4UB','GLCOLOR4SV','GLCOLOR4S','GLCOLOR4IV','GLCOLOR4I','GLCOLOR4FV', + 'GLCOLOR4F','GLCOLOR4DV','GLCOLOR4D','GLCOLOR4BV','GLCOLOR4B','GLCOLOR3USV','GLCOLOR3US','GLCOLOR3UIV', + 'GLCOLOR3UI','GLCOLOR3UBV','GLCOLOR3UB','GLCOLOR3SV','GLCOLOR3S','GLCOLOR3IV','GLCOLOR3I','GLCOLOR3FV', + 'GLCOLOR3F','GLCOLOR3DV','GLCOLOR3D','GLCOLOR3BV','GLCOLOR3B','GLCLIPPLANE','GLCLEARSTENCIL','GLCLEARINDEX', + 'GLCLEARDEPTH','GLCLEARCOLOR','GLCLEARACCUM','GLCLEAR','GLCALLLISTS','GLCALLLIST','GLBLENDFUNC','GLBITMAP', + 'GLBINDTEXTURE','GLBEGIN','GLARRAYELEMENT','GLARETEXTURESRESIDENT','GLALPHAFUNC','GLACCUM'), + 2 => array( + '$BEL','$BS','$CR','$CRLF','$DQ','$DT_DATE_SEPARATOR','$DT_LANGUAGE','$DT_TIME_SEPARATOR', + '$ESC','$FF','$LF','$NUL','$PC_SD_MY_PC','$SPC','$SQL_OPT_TRACE_FILE_DEFAULT','$SQL_SPEC_STRING', + '$TAB','$TRACKBAR_CLASS','$VT','%ACM_OPEN','%ACM_OPENW','%ACM_PLAY','%ACM_STOP','%ACN_START', + '%ACN_STOP','%ACS_AUTOPLAY','%ACS_CENTER','%ACS_TIMER','%ACS_TRANSPARENT','%APP_COUNTER_FUNLOOKUP','%APP_COUNTER_KEYLOOKUP','%APP_COUNTER_LOOKUP', + '%APP_COUNTER_TESTALPHA','%APP_COUNTER_UDTLOOKUP','%APP_COUNTER_VARLOOKUP','%APP_TIMER_EXECTOTAL','%APP_TIMER_INIT','%APP_TIMER_LOAD','%APP_TIMER_PREPROCESSOR','%AW_ACTIVATE', + '%AW_BLEND','%AW_CENTER','%AW_HIDE','%AW_HOR_NEGATIVE','%AW_HOR_POSITIVE','%AW_SLIDE','%AW_VER_NEGATIVE','%AW_VER_POSITIVE', + '%BCM_FIRST','%BLACK','%BLUE','%BM_GETCHECK','%BM_SETCHECK','%BST_CHECKED','%BST_UNCHECKED','%BS_AUTOCHECKBOX', + '%BS_BOTTOM','%BS_CENTER','%BS_DEFAULT','%BS_DEFPUSHBUTTON','%BS_FLAT','%BS_LEFT','%BS_LEFTTEXT','%BS_MULTILINE', + '%BS_NOTIFY','%BS_OWNERDRAW','%BS_PUSHLIKE','%BS_RIGHT','%BS_TOP','%BS_VCENTER','%BUNDLE_BUILDER_CANCELLED','%CBM_FIRST', + '%CBN_CLOSEUP','%CBN_DBLCLK','%CBN_DROPDOWN','%CBN_EDITCHANGE','%CBN_EDITUPDATE','%CBN_ERRSPACE','%CBN_KILLFOCUS','%CBN_SELCANCEL', + '%CBN_SELCHANGE','%CBN_SELENDCANCEL','%CBN_SELENDOK','%CBN_SETFOCUS','%CBS_AUTOHSCROLL','%CBS_DISABLENOSCROLL','%CBS_DROPDOWN','%CBS_DROPDOWNLIST', + '%CBS_HASSTRINGS','%CBS_LOWERCASE','%CBS_NOINTEGRALHEIGHT','%CBS_SIMPLE','%CBS_SORT','%CBS_UPPERCASE','%CB_SELECTSTRING','%CCM_FIRST', + '%CC_ANYCOLOR','%CC_ENABLEHOOK','%CC_ENABLETEMPLATE','%CC_ENABLETEMPLATEHANDLE','%CC_FULLOPEN','%CC_PREVENTFULLOPEN','%CC_RGBINIT','%CC_SHOWHELP', + '%CC_SOLIDCOLOR','%CFE_BOLD','%CFE_ITALIC','%CFE_LINK','%CFE_PROTECTED','%CFE_STRIKEOUT','%CFE_UNDERLINE','%CFM_ANIMATION', + '%CFM_BACKCOLOR','%CFM_BOLD','%CFM_CHARSET','%CFM_COLOR','%CFM_FACE','%CFM_ITALIC','%CFM_KERNING','%CFM_LCID', + '%CFM_LINK','%CFM_OFFSET','%CFM_PROTECTED','%CFM_REVAUTHOR','%CFM_SIZE','%CFM_SPACING','%CFM_STRIKEOUT','%CFM_STYLE', + '%CFM_UNDERLINE','%CFM_UNDERLINETYPE','%CFM_WEIGHT','%CGI_ACCEPT_FILE_UPLOAD','%CGI_AUTO_ADD_SPECIAL_CHARS_PREFIX','%CGI_AUTO_CREATE_VARS','%CGI_BUFFERIZE_OUTPUT','%CGI_DOUBLE_QUOTE', + '%CGI_FILE_UPLOAD_BASEPATH','%CGI_FORCE_SESSION_VALIDATION','%CGI_MAX_BYTE_FROM_STD_IN','%CGI_REQUEST_METHOD_GET','%CGI_REQUEST_METHOD_POST','%CGI_SESSION_FILE_BASEPATH','%CGI_SINGLE_QUOTE','%CGI_SPECIAL_CHARS_PREFIX', + '%CGI_TEMPORARY_UPLOAD_PATH','%CGI_UPLOAD_CAN_OVERWRITE','%CGI_WRITE_LOG_FILE','%CGI_WRITE_VARS_INTO_LOG_FILE','%CONOLE_ATTACH_PARENT_PROCESS','%CONSOLE_BACKGROUND_BLUE','%CONSOLE_BACKGROUND_GREEN','%CONSOLE_BACKGROUND_INTENSITY', + '%CONSOLE_BACKGROUND_RED','%CONSOLE_BOX_FLAG_3DOFF','%CONSOLE_BOX_FLAG_3DON','%CONSOLE_BOX_FLAG_SHADOW','%CONSOLE_COMMON_LVB_GRID_HORIZONTAL','%CONSOLE_COMMON_LVB_GRID_LVERTICAL','%CONSOLE_COMMON_LVB_GRID_RVERTICAL','%CONSOLE_COMMON_LVB_LEADING_BYTE', + '%CONSOLE_COMMON_LVB_REVERSE_VIDEO','%CONSOLE_COMMON_LVB_TRAILING_BYTE','%CONSOLE_COMMON_LVB_UNDERSCORE','%CONSOLE_CTRL_BREAK_EVENT','%CONSOLE_CTRL_C_EVENT','%CONSOLE_DOUBLE_CLICK','%CONSOLE_ENABLE_AUTO_POSITION','%CONSOLE_ENABLE_ECHO_INPUT', + '%CONSOLE_ENABLE_EXTENDED_FLAGS','%CONSOLE_ENABLE_INSERT_MODE','%CONSOLE_ENABLE_LINE_INPUT','%CONSOLE_ENABLE_MOUSE_INPUT','%CONSOLE_ENABLE_PROCESSED_INPUT','%CONSOLE_ENABLE_PROCESSED_OUTPUT','%CONSOLE_ENABLE_QUICK_EDIT_MODE','%CONSOLE_ENABLE_WINDOW_INPUT', + '%CONSOLE_ENABLE_WRAP_AT_EOL_OUTPUT','%CONSOLE_FOREGROUND_BLUE','%CONSOLE_FOREGROUND_GREEN','%CONSOLE_FOREGROUND_INTENSITY','%CONSOLE_FOREGROUND_RED','%CONSOLE_LBUTTON','%CONSOLE_LINE_HORIZONTAL','%CONSOLE_LINE_VERTICAL', + '%CONSOLE_MBUTTON','%CONSOLE_MOUSE_MOVED','%CONSOLE_MOUSE_WHEELED','%CONSOLE_RBUTTON','%CONSOLE_SCROLLBUF_DOWN','%CONSOLE_SCROLLBUF_UP','%CONSOLE_SCROLLWND_ABSOLUTE','%CONSOLE_SCROLLWND_RELATIVE', + '%CONSOLE_STD_ERROR_HANDLE','%CONSOLE_STD_INPUT_HANDLE','%CONSOLE_STD_OUTPUT_HANDLE','%CONSOLE_SW_FORCEMINIMIZE','%CONSOLE_SW_HIDE','%CONSOLE_SW_MAXIMIZE','%CONSOLE_SW_MINIMIZE','%CONSOLE_SW_RESTORE', + '%CONSOLE_SW_SHOW','%CONSOLE_SW_SHOWDEFAULT','%CONSOLE_SW_SHOWMAXIMIZED','%CONSOLE_SW_SHOWMINIMIZED','%CONSOLE_SW_SHOWMINNOACTIVE','%CONSOLE_SW_SHOWNA','%CONSOLE_SW_SHOWNOACTIVATE','%CONSOLE_SW_SHOWNORMAL', + '%CONSOLE_UNAVAILABLE','%CRYPTO_CALG_DES','%CRYPTO_CALG_RC2','%CRYPTO_CALG_RC4','%CRYPTO_PROV_DH_SCHANNEL','%CRYPTO_PROV_DSS','%CRYPTO_PROV_DSS_DH','%CRYPTO_PROV_FORTEZZA', + '%CRYPTO_PROV_MS_EXCHANGE','%CRYPTO_PROV_RSA_FULL','%CRYPTO_PROV_RSA_SCHANNEL','%CRYPTO_PROV_RSA_SIG','%CRYPTO_PROV_SSL','%CSIDL_ADMINTOOLS','%CSIDL_ALTSTARTUP','%CSIDL_APPDATA', + '%CSIDL_BITBUCKET','%CSIDL_CDBURN_AREA','%CSIDL_COMMON_ADMINTOOLS','%CSIDL_COMMON_ALTSTARTUP','%CSIDL_COMMON_APPDATA','%CSIDL_COMMON_DESKTOPDIRECTORY','%CSIDL_COMMON_DOCUMENTS','%CSIDL_COMMON_FAVORITES', + '%CSIDL_COMMON_MUSIC','%CSIDL_COMMON_PICTURES','%CSIDL_COMMON_PROGRAMS','%CSIDL_COMMON_STARTMENU','%CSIDL_COMMON_STARTUP','%CSIDL_COMMON_TEMPLATES','%CSIDL_COMMON_VIDEO','%CSIDL_CONTROLS', + '%CSIDL_COOKIES','%CSIDL_DESKTOP','%CSIDL_DESKTOPDIRECTORY','%CSIDL_DRIVES','%CSIDL_FAVORITES','%CSIDL_FLAG_CREATE','%CSIDL_FONTS','%CSIDL_HISTORY', + '%CSIDL_INTERNET','%CSIDL_INTERNET_CACHE','%CSIDL_LOCAL_APPDATA','%CSIDL_MYDOCUMENTS','%CSIDL_MYMUSIC','%CSIDL_MYPICTURES','%CSIDL_MYVIDEO','%CSIDL_NETHOOD', + '%CSIDL_NETWORK','%CSIDL_PERSONAL','%CSIDL_PRINTERS','%CSIDL_PRINTHOOD','%CSIDL_PROFILE','%CSIDL_PROGRAMS','%CSIDL_PROGRAM_FILES','%CSIDL_PROGRAM_FILES_COMMON', + '%CSIDL_RECENT','%CSIDL_SENDTO','%CSIDL_STARTMENU','%CSIDL_STARTUP','%CSIDL_SYSTEM','%CSIDL_TEMPLATES','%CSIDL_WINDOWS','%CW_USEDEFAULT', + '%CYAN','%DATE_TIME_FILE_CREATION','%DATE_TIME_LAST_FILE_ACCESS','%DATE_TIME_LAST_FILE_WRITE','%DICTIONARY_MEMINFO_DATA','%DICTIONARY_MEMINFO_KEYS','%DICTIONARY_MEMINFO_TOTAL','%DICTIONARY_SORTDESCENDING', + '%DICTIONARY_SORTKEYS','%DSCAPS_CERTIFIED','%DSCAPS_CONTINUOUSRATE','%DSCAPS_EMULDRIVER','%DSCAPS_SECONDARY16BIT','%DSCAPS_SECONDARY8BIT','%DSCAPS_SECONDARYMONO','%DSCAPS_SECONDARYSTEREO', + '%DSCCAPS_CERTIFIED','%DSCCAPS_EMULDRIVER','%DS_3DLOOK','%DS_ABSALIGN','%DS_CENTER','%DS_CENTERMOUSE','%DS_CONTEXTHELP','%DS_CONTROL', + '%DS_MODALFRAME','%DS_NOFAILCREATE','%DS_SETFONT','%DS_SETFOREGROUND','%DS_SYSMODAL','%DTM_FIRST','%DTM_GETMCCOLOR','%DTM_GETMCFONT', + '%DTM_GETMONTHCAL','%DTM_GETRANGE','%DTM_GETSYSTEMTIME','%DTM_SETFORMAT','%DTM_SETFORMATW','%DTM_SETMCCOLOR','%DTM_SETMCFONT','%DTM_SETRANGE', + '%DTM_SETSYSTEMTIME','%DTN_CLOSEUP','%DTN_DATETIMECHANGE','%DTN_DROPDOWN','%DTN_FORMAT','%DTN_FORMATQUERY','%DTN_FORMATQUERYW','%DTN_FORMATW', + '%DTN_USERSTRING','%DTN_USERSTRINGW','%DTN_WMKEYDOWN','%DTN_WMKEYDOWNW','%DTS_APPCANPARSE','%DTS_LONGDATEFORMAT','%DTS_RIGHTALIGN','%DTS_SHORTDATECENTURYFORMAT', + '%DTS_SHORTDATEFORMAT','%DTS_SHOWNONE','%DTS_TIMEFORMAT','%DTS_UPDOWN','%DT_DATE_CENTURY','%DT_DATE_OK','%DT_DAY_IN_YEAR','%DT_DIFF_IN_DAYS', + '%DT_DIFF_IN_HOURS','%DT_DIFF_IN_MINUTES','%DT_DIFF_IN_SECONDS','%DT_HOURS_IN_DAY','%DT_MINUTES_IN_HOUR','%DT_SECONDS_IN_DAY','%DT_SECONDS_IN_HOUR','%DT_SECONDS_IN_MINUTE', + '%DT_SECONDS_IN_YEAR','%DT_USE_LONG_FORM','%DT_USE_SHORT_FORM','%DT_WRONG_DATE','%DT_WRONG_DAY','%DT_WRONG_MONTH','%ECM_FIRST','%ECOOP_AND', + '%ECOOP_OR','%ECOOP_SET','%ECOOP_XOR','%ECO_AUTOHSCROLL','%ECO_AUTOVSCROLL','%ECO_AUTOWORDSELECTION','%ECO_NOHIDESEL','%ECO_READONLY', + '%ECO_SELECTIONBAR','%ECO_WANTRETURN','%EM_AUTOURLDETECT','%EM_CANPASTE','%EM_CANREDO','%EM_CANUNDO','%EM_CHARFROMPOS','%EM_DISPLAYBAND', + '%EM_EMPTYUNDOBUFFER','%EM_EXGETSEL','%EM_EXLIMITTEXT','%EM_EXLINEFROMCHAR','%EM_EXSETSEL','%EM_FINDTEXT','%EM_FINDTEXTEX','%EM_FINDWORDBREAK', + '%EM_FMTLINES','%EM_FORMATRANGE','%EM_GETAUTOURLDETECT','%EM_GETCHARFORMAT','%EM_GETEDITSTYLE','%EM_GETEVENTMASK','%EM_GETFIRSTVISIBLELINE','%EM_GETHANDLE', + '%EM_GETIMESTATUS','%EM_GETLIMITTEXT','%EM_GETLINE','%EM_GETLINECOUNT','%EM_GETMARGINS','%EM_GETMODIFY','%EM_GETOLEINTERFACE','%EM_GETOPTIONS', + '%EM_GETPARAFORMAT','%EM_GETPASSWORDCHAR','%EM_GETRECT','%EM_GETREDONAME','%EM_GETSCROLLPOS','%EM_GETSEL','%EM_GETSELTEXT','%EM_GETTEXTMODE', + '%EM_GETTEXTRANGE','%EM_GETTHUMB','%EM_GETUNDONAME','%EM_GETWORDBREAKPROC','%EM_GETWORDBREAKPROCEX','%EM_HIDESELECTION','%EM_LIMITTEXT','%EM_LINEFROMCHAR', + '%EM_LINEINDEX','%EM_LINELENGTH','%EM_LINESCROLL','%EM_PASTESPECIAL','%EM_POSFROMCHAR','%EM_REDO','%EM_REPLACESEL','%EM_REQUESTRESIZE', + '%EM_SCROLL','%EM_SCROLLCARET','%EM_SELECTIONTYPE','%EM_SETBKGNDCOLOR','%EM_SETCHARFORMAT','%EM_SETEDITSTYLE','%EM_SETEVENTMASK','%EM_SETHANDLE', + '%EM_SETIMESTATUS','%EM_SETLIMITTEXT','%EM_SETMARGINS','%EM_SETMODIFY','%EM_SETOLECALLBACK','%EM_SETOPTIONS','%EM_SETPARAFORMAT','%EM_SETPASSWORDCHAR', + '%EM_SETREADONLY','%EM_SETRECT','%EM_SETRECTNP','%EM_SETSCROLLPOS','%EM_SETSEL','%EM_SETTABSTOPS','%EM_SETTARGETDEVICE','%EM_SETTEXTMODE', + '%EM_SETUNDOLIMIT','%EM_SETWORDBREAKPROC','%EM_SETWORDBREAKPROCEX','%EM_SETWORDWRAPMODE','%EM_SETZOOM','%EM_STOPGROUPTYPING','%EM_STREAMIN','%EM_STREAMOUT', + '%EM_UNDO','%ENM_CHANGE','%ENM_CORRECTTEXT','%ENM_DRAGDROPDONE','%ENM_DROPFILES','%ENM_KEYEVENTS','%ENM_MOUSEEVENTS','%ENM_NONE', + '%ENM_PARAGRAPHEXPANDED','%ENM_PROTECTED','%ENM_REQUESTRESIZE','%ENM_SCROLL','%ENM_SCROLLEVENTS','%ENM_SELCHANGE','%ENM_UPDATE','%EN_CHANGE', + '%EN_MSGFILTER','%EN_SELCHANGE','%EN_UPDATE','%ES_AUTOHSCROLL','%ES_AUTOVSCROLL','%ES_CENTER','%ES_DISABLENOSCROLL','%ES_EX_NOCALLOLEINIT', + '%ES_LEFT','%ES_LOWERCASE','%ES_MULTILINE','%ES_NOHIDESEL','%ES_NOOLEDRAGDROP','%ES_NUMBER','%ES_OEMCONVERT','%ES_PASSWORD', + '%ES_READONLY','%ES_RIGHT','%ES_SAVESEL','%ES_SELECTIONBAR','%ES_SUNKEN','%ES_UPPERCASE','%ES_WANTRETURN','%EVAL_EXEC_STRING', + '%FALSE','%FILE_ADDPATH','%FILE_ARCHIVE','%FILE_BUILDVERSION','%FILE_HIDDEN','%FILE_MAJORVERSION','%FILE_MINORVERSION','%FILE_NORMAL', + '%FILE_READONLY','%FILE_REVISIONVERSION','%FILE_SUBDIR','%FILE_SYSTEM','%FILE_VLABEL','%FTP_GET_CONNECT_STATUS','%FTP_GET_FILE_BYTES_RCVD','%FTP_GET_FILE_BYTES_SENT', + '%FTP_GET_LAST_RESPONSE','%FTP_GET_LOCAL_IP','%FTP_GET_SERVER_IP','%FTP_GET_TOTAL_BYTES_RCVD','%FTP_GET_TOTAL_BYTES_SENT','%FTP_LIST_FULLLIST','%FTP_LIST_FULLLISTDIR','%FTP_LIST_FULLLISTFILE', + '%FTP_SET_ASYNC','%FTP_SET_CONNECT_WAIT','%FTP_SET_MAX_LISTEN_WAIT','%FTP_SET_MAX_RESPONSE_WAIT','%FTP_SET_PASSIVE','%FTP_SET_SYNC','%FW_BLACK','%FW_BOLD', + '%FW_DEMIBOLD','%FW_DONTCARE','%FW_EXTRABOLD','%FW_EXTRALIGHT','%FW_HEAVY','%FW_LIGHT','%FW_MEDIUM','%FW_NORMAL', + '%FW_REGULAR','%FW_SEMIBOLD','%FW_THIN','%FW_ULTRABOLD','%FW_ULTRALIGHT','%GDTR_MAX','%GDTR_MIN','%GLU_AUTO_LOAD_MATRIX', + '%GLU_BEGIN','%GLU_CCW','%GLU_CULLING','%GLU_CW','%GLU_DISPLAY_MODE','%GLU_DOMAIN_DISTANCE','%GLU_EDGE_FLAG','%GLU_END', + '%GLU_ERROR','%GLU_EXTENSIONS','%GLU_EXTERIOR','%GLU_FALSE','%GLU_FILL','%GLU_FLAT','%GLU_INCOMPATIBLE_GL_VERSION','%GLU_INSIDE', + '%GLU_INTERIOR','%GLU_INVALID_ENUM','%GLU_INVALID_VALUE','%GLU_LINE','%GLU_MAP1_TRIM_2','%GLU_MAP1_TRIM_3','%GLU_NONE','%GLU_NURBS_ERROR1', + '%GLU_NURBS_ERROR10','%GLU_NURBS_ERROR11','%GLU_NURBS_ERROR12','%GLU_NURBS_ERROR13','%GLU_NURBS_ERROR14','%GLU_NURBS_ERROR15','%GLU_NURBS_ERROR16','%GLU_NURBS_ERROR17', + '%GLU_NURBS_ERROR18','%GLU_NURBS_ERROR19','%GLU_NURBS_ERROR2','%GLU_NURBS_ERROR20','%GLU_NURBS_ERROR21','%GLU_NURBS_ERROR22','%GLU_NURBS_ERROR23','%GLU_NURBS_ERROR24', + '%GLU_NURBS_ERROR25','%GLU_NURBS_ERROR26','%GLU_NURBS_ERROR27','%GLU_NURBS_ERROR28','%GLU_NURBS_ERROR29','%GLU_NURBS_ERROR3','%GLU_NURBS_ERROR30','%GLU_NURBS_ERROR31', + '%GLU_NURBS_ERROR32','%GLU_NURBS_ERROR33','%GLU_NURBS_ERROR34','%GLU_NURBS_ERROR35','%GLU_NURBS_ERROR36','%GLU_NURBS_ERROR37','%GLU_NURBS_ERROR4','%GLU_NURBS_ERROR5', + '%GLU_NURBS_ERROR6','%GLU_NURBS_ERROR7','%GLU_NURBS_ERROR8','%GLU_NURBS_ERROR9','%GLU_OUTLINE_PATCH','%GLU_OUTLINE_POLYGON','%GLU_OUTSIDE','%GLU_OUT_OF_MEMORY', + '%GLU_PARAMETRIC_ERROR','%GLU_PARAMETRIC_TOLERANCE','%GLU_PATH_LENGTH','%GLU_POINT','%GLU_SAMPLING_METHOD','%GLU_SAMPLING_TOLERANCE','%GLU_SILHOUETTE','%GLU_SMOOTH', + '%GLU_TESS_BEGIN','%GLU_TESS_BEGIN_DATA','%GLU_TESS_BOUNDARY_ONLY','%GLU_TESS_COMBINE','%GLU_TESS_COMBINE_DATA','%GLU_TESS_COORD_TOO_LARGE','%GLU_TESS_EDGE_FLAG','%GLU_TESS_EDGE_FLAG_DATA', + '%GLU_TESS_END','%GLU_TESS_END_DATA','%GLU_TESS_ERROR','%GLU_TESS_ERROR1','%GLU_TESS_ERROR2','%GLU_TESS_ERROR3','%GLU_TESS_ERROR4','%GLU_TESS_ERROR5', + '%GLU_TESS_ERROR6','%GLU_TESS_ERROR7','%GLU_TESS_ERROR8','%GLU_TESS_ERROR_DATA','%GLU_TESS_MISSING_BEGIN_CONTOUR','%GLU_TESS_MISSING_BEGIN_POLYGON','%GLU_TESS_MISSING_END_CONTOUR','%GLU_TESS_MISSING_END_POLYGON', + '%GLU_TESS_NEED_COMBINE_CALLBACK','%GLU_TESS_TOLERANCE','%GLU_TESS_VERTEX','%GLU_TESS_VERTEX_DATA','%GLU_TESS_WINDING_ABS_GEQ_TWO','%GLU_TESS_WINDING_NEGATIVE','%GLU_TESS_WINDING_NONZERO','%GLU_TESS_WINDING_ODD', + '%GLU_TESS_WINDING_POSITIVE','%GLU_TESS_WINDING_RULE','%GLU_TRUE','%GLU_UNKNOWN','%GLU_U_STEP','%GLU_VERSION','%GLU_VERSION_1_1','%GLU_VERSION_1_2', + '%GLU_VERTEX','%GLU_V_STEP','%GL_2D','%GL_2_BYTES','%GL_3D','%GL_3D_COLOR','%GL_3D_COLOR_TEXTURE','%GL_3_BYTES', + '%GL_4D_COLOR_TEXTURE','%GL_4_BYTES','%GL_ABGR_EXT','%GL_ACCUM','%GL_ACCUM_ALPHA_BITS','%GL_ACCUM_BLUE_BITS','%GL_ACCUM_BUFFER_BIT','%GL_ACCUM_CLEAR_VALUE', + '%GL_ACCUM_GREEN_BITS','%GL_ACCUM_RED_BITS','%GL_ADD','%GL_ALL_ATTRIB_BITS','%GL_ALPHA','%GL_ALPHA12','%GL_ALPHA16','%GL_ALPHA4', + '%GL_ALPHA8','%GL_ALPHA_BIAS','%GL_ALPHA_BITS','%GL_ALPHA_SCALE','%GL_ALPHA_TEST','%GL_ALPHA_TEST_FUNC','%GL_ALPHA_TEST_REF','%GL_ALWAYS', + '%GL_AMBIENT','%GL_AMBIENT_AND_DIFFUSE','%GL_AND','%GL_AND_INVERTED','%GL_AND_REVERSE','%GL_ARRAY_ELEMENT_LOCK_COUNT_EXT','%GL_ARRAY_ELEMENT_LOCK_FIRST_EXT','%GL_ATTRIB_STACK_DEPTH', + '%GL_AUTO_NORMAL','%GL_AUX0','%GL_AUX1','%GL_AUX2','%GL_AUX3','%GL_AUX_BUFFERS','%GL_BACK','%GL_BACK_LEFT', + '%GL_BACK_RIGHT','%GL_BGRA_EXT','%GL_BGR_EXT','%GL_BITMAP','%GL_BITMAP_TOKEN','%GL_BLEND','%GL_BLEND_COLOR_EXT','%GL_BLEND_DST', + '%GL_BLEND_EQUATION_EXT','%GL_BLEND_SRC','%GL_BLUE','%GL_BLUE_BIAS','%GL_BLUE_BITS','%GL_BLUE_SCALE','%GL_BYTE','%GL_C3F_V3F', + '%GL_C4F_N3F_V3F','%GL_C4UB_V2F','%GL_C4UB_V3F','%GL_CCW','%GL_CLAMP','%GL_CLEAR','%GL_CLIENT_ALL_ATTRIB_BITS','%GL_CLIENT_ATTRIB_STACK_DEPTH', + '%GL_CLIENT_PIXEL_STORE_BIT','%GL_CLIENT_VERTEX_ARRAY_BIT','%GL_CLIP_PLANE0','%GL_CLIP_PLANE1','%GL_CLIP_PLANE2','%GL_CLIP_PLANE3','%GL_CLIP_PLANE4','%GL_CLIP_PLANE5', + '%GL_CLIP_VOLUME_CLIPPING_HINT_EXT','%GL_COEFF','%GL_COLOR','%GL_COLOR_ARRAY','%GL_COLOR_ARRAY_COUNT_EXT','%GL_COLOR_ARRAY_EXT','%GL_COLOR_ARRAY_POINTER','%GL_COLOR_ARRAY_POINTER_EXT', + '%GL_COLOR_ARRAY_SIZE','%GL_COLOR_ARRAY_SIZE_EXT','%GL_COLOR_ARRAY_STRIDE','%GL_COLOR_ARRAY_STRIDE_EXT','%GL_COLOR_ARRAY_TYPE','%GL_COLOR_ARRAY_TYPE_EXT','%GL_COLOR_BUFFER_BIT','%GL_COLOR_CLEAR_VALUE', + '%GL_COLOR_INDEX','%GL_COLOR_INDEX12_EXT','%GL_COLOR_INDEX16_EXT','%GL_COLOR_INDEX1_EXT','%GL_COLOR_INDEX2_EXT','%GL_COLOR_INDEX4_EXT','%GL_COLOR_INDEX8_EXT','%GL_COLOR_INDEXES', + '%GL_COLOR_LOGIC_OP','%GL_COLOR_MATERIAL','%GL_COLOR_MATERIAL_FACE','%GL_COLOR_MATERIAL_PARAMETER','%GL_COLOR_SUM_EXT','%GL_COLOR_TABLE_ALPHA_SIZE_EXT','%GL_COLOR_TABLE_BIAS_EXT','%GL_COLOR_TABLE_BLUE_SIZE_EXT', + '%GL_COLOR_TABLE_EXT','%GL_COLOR_TABLE_FORMAT_EXT','%GL_COLOR_TABLE_GREEN_SIZE_EXT','%GL_COLOR_TABLE_INTENSITY_SIZE_EXT','%GL_COLOR_TABLE_LUMINANCE_SIZE_EXT','%GL_COLOR_TABLE_RED_SIZE_EXT','%GL_COLOR_TABLE_SCALE_EXT','%GL_COLOR_TABLE_WIDTH_EXT', + '%GL_COLOR_WRITEMASK','%GL_COMPILE','%GL_COMPILE_AND_EXECUTE','%GL_CONSTANT_ALPHA_EXT','%GL_CONSTANT_ATTENUATION','%GL_CONSTANT_COLOR_EXT','%GL_CONVOLUTION_1D_EXT','%GL_CONVOLUTION_2D_EXT', + '%GL_CONVOLUTION_BORDER_MODE_EXT','%GL_CONVOLUTION_FILTER_BIAS_EXT','%GL_CONVOLUTION_FILTER_SCALE_EXT','%GL_CONVOLUTION_FORMAT_EXT','%GL_CONVOLUTION_HEIGHT_EXT','%GL_CONVOLUTION_WIDTH_EXT','%GL_COPY','%GL_COPY_INVERTED', + '%GL_COPY_PIXEL_TOKEN','%GL_CULL_FACE','%GL_CULL_FACE_MODE','%GL_CULL_VERTEX_EXT','%GL_CULL_VERTEX_EYE_POSITION_EXT','%GL_CULL_VERTEX_OBJECT_POSITION_EXT','%GL_CURRENT_BIT','%GL_CURRENT_COLOR', + '%GL_CURRENT_INDEX','%GL_CURRENT_NORMAL','%GL_CURRENT_RASTER_COLOR','%GL_CURRENT_RASTER_DISTANCE','%GL_CURRENT_RASTER_INDEX','%GL_CURRENT_RASTER_POSITION','%GL_CURRENT_RASTER_POSITION_VALID','%GL_CURRENT_RASTER_TEXTURE_COORDS', + '%GL_CURRENT_SECONDARY_COLOR_EXT','%GL_CURRENT_TEXTURE_COORDS','%GL_CW','%GL_DECAL','%GL_DECR','%GL_DEPTH','%GL_DEPTH_BIAS','%GL_DEPTH_BITS', + '%GL_DEPTH_BUFFER_BIT','%GL_DEPTH_CLEAR_VALUE','%GL_DEPTH_COMPONENT','%GL_DEPTH_FUNC','%GL_DEPTH_RANGE','%GL_DEPTH_SCALE','%GL_DEPTH_TEST','%GL_DEPTH_WRITEMASK', + '%GL_DIFFUSE','%GL_DITHER','%GL_DOMAIN','%GL_DONT_CARE','%GL_DOUBLE','%GL_DOUBLEBUFFER','%GL_DOUBLE_EXT','%GL_DRAW_BUFFER', + '%GL_DRAW_PIXEL_TOKEN','%GL_DST_ALPHA','%GL_DST_COLOR','%GL_EDGE_FLAG','%GL_EDGE_FLAG_ARRAY','%GL_EDGE_FLAG_ARRAY_COUNT_EXT','%GL_EDGE_FLAG_ARRAY_EXT','%GL_EDGE_FLAG_ARRAY_POINTER', + '%GL_EDGE_FLAG_ARRAY_POINTER_EXT','%GL_EDGE_FLAG_ARRAY_STRIDE','%GL_EDGE_FLAG_ARRAY_STRIDE_EXT','%GL_EMISSION','%GL_ENABLE_BIT','%GL_EQUAL','%GL_EQUIV','%GL_EVAL_BIT', + '%GL_EXP','%GL_EXP2','%GL_EXTENSIONS','%GL_EXT_ABGR','%GL_EXT_BGRA','%GL_EXT_BLEND_COLOR','%GL_EXT_BLEND_MINMAX','%GL_EXT_BLEND_SUBTRACT', + '%GL_EXT_CLIP_VOLUME_HINT','%GL_EXT_COLOR_TABLE','%GL_EXT_COMPILED_VERTEX_ARRAY','%GL_EXT_CONVOLUTION','%GL_EXT_CULL_VERTEX','%GL_EXT_HISTOGRAM','%GL_EXT_PACKED_PIXELS','%GL_EXT_PALETTED_TEXTURE', + '%GL_EXT_POLYGON_OFFSET','%GL_EXT_SECONDARY_COLOR','%GL_EXT_SEPARATE_SPECULAR_COLOR','%GL_EXT_VERTEX_ARRAY','%GL_EYE_LINEAR','%GL_EYE_PLANE','%GL_FALSE','%GL_FASTEST', + '%GL_FEEDBACK','%GL_FEEDBACK_BUFFER_POINTER','%GL_FEEDBACK_BUFFER_SIZE','%GL_FEEDBACK_BUFFER_TYPE','%GL_FILL','%GL_FLAT','%GL_FLOAT','%GL_FOG', + '%GL_FOG_BIT','%GL_FOG_COLOR','%GL_FOG_DENSITY','%GL_FOG_END','%GL_FOG_HINT','%GL_FOG_INDEX','%GL_FOG_MODE','%GL_FOG_START', + '%GL_FRONT','%GL_FRONT_AND_BACK','%GL_FRONT_FACE','%GL_FRONT_LEFT','%GL_FRONT_RIGHT','%GL_FUNC_ADD_EXT','%GL_FUNC_REVERSE_SUBTRACT_EXT','%GL_FUNC_SUBTRACT_EXT', + '%GL_GEQUAL','%GL_GREATER','%GL_GREEN','%GL_GREEN_BIAS','%GL_GREEN_BITS','%GL_GREEN_SCALE','%GL_HINT_BIT','%GL_HISTOGRAM_ALPHA_SIZE_EXT', + '%GL_HISTOGRAM_BLUE_SIZE_EXT','%GL_HISTOGRAM_EXT','%GL_HISTOGRAM_FORMAT_EXT','%GL_HISTOGRAM_GREEN_SIZE_EXT','%GL_HISTOGRAM_LUMINANCE_SIZE_EXT','%GL_HISTOGRAM_RED_SIZE_EXT','%GL_HISTOGRAM_SINK_EXT','%GL_HISTOGRAM_WIDTH_EXT', + '%GL_INCR','%GL_INDEX_ARRAY','%GL_INDEX_ARRAY_COUNT_EXT','%GL_INDEX_ARRAY_EXT','%GL_INDEX_ARRAY_POINTER','%GL_INDEX_ARRAY_POINTER_EXT','%GL_INDEX_ARRAY_STRIDE','%GL_INDEX_ARRAY_STRIDE_EXT', + '%GL_INDEX_ARRAY_TYPE','%GL_INDEX_ARRAY_TYPE_EXT','%GL_INDEX_BITS','%GL_INDEX_CLEAR_VALUE','%GL_INDEX_LOGIC_OP','%GL_INDEX_MODE','%GL_INDEX_OFFSET','%GL_INDEX_SHIFT', + '%GL_INDEX_WRITEMASK','%GL_INT','%GL_INTENSITY','%GL_INTENSITY12','%GL_INTENSITY16','%GL_INTENSITY4','%GL_INTENSITY8','%GL_INVALID_ENUM', + '%GL_INVALID_OPERATION','%GL_INVALID_VALUE','%GL_INVERT','%GL_KEEP','%GL_LEFT','%GL_LEQUAL','%GL_LESS','%GL_LIGHT0', + '%GL_LIGHT1','%GL_LIGHT2','%GL_LIGHT3','%GL_LIGHT4','%GL_LIGHT5','%GL_LIGHT6','%GL_LIGHT7','%GL_LIGHTING', + '%GL_LIGHTING_BIT','%GL_LIGHT_MODEL_AMBIENT','%GL_LIGHT_MODEL_COLOR_CONTROL_EXT','%GL_LIGHT_MODEL_LOCAL_VIEWER','%GL_LIGHT_MODEL_TWO_SIDE','%GL_LINE','%GL_LINEAR','%GL_LINEAR_ATTENUATION', + '%GL_LINEAR_MIPMAP_LINEAR','%GL_LINEAR_MIPMAP_NEAREST','%GL_LINES','%GL_LINE_BIT','%GL_LINE_LOOP','%GL_LINE_RESET_TOKEN','%GL_LINE_SMOOTH','%GL_LINE_SMOOTH_HINT', + '%GL_LINE_STIPPLE','%GL_LINE_STIPPLE_PATTERN','%GL_LINE_STIPPLE_REPEAT','%GL_LINE_STRIP','%GL_LINE_TOKEN','%GL_LINE_WIDTH','%GL_LINE_WIDTH_GRANULARITY','%GL_LINE_WIDTH_RANGE', + '%GL_LIST_BASE','%GL_LIST_BIT','%GL_LIST_INDEX','%GL_LIST_MODE','%GL_LOAD','%GL_LOGIC_OP','%GL_LOGIC_OP_MODE','%GL_LUMINANCE', + '%GL_LUMINANCE12','%GL_LUMINANCE12_ALPHA12','%GL_LUMINANCE12_ALPHA4','%GL_LUMINANCE16','%GL_LUMINANCE16_ALPHA16','%GL_LUMINANCE4','%GL_LUMINANCE4_ALPHA4','%GL_LUMINANCE6_ALPHA2', + '%GL_LUMINANCE8','%GL_LUMINANCE8_ALPHA8','%GL_LUMINANCE_ALPHA','%GL_MAP1_COLOR_4','%GL_MAP1_GRID_DOMAIN','%GL_MAP1_GRID_SEGMENTS','%GL_MAP1_INDEX','%GL_MAP1_NORMAL', + '%GL_MAP1_TEXTURE_COORD_1','%GL_MAP1_TEXTURE_COORD_2','%GL_MAP1_TEXTURE_COORD_3','%GL_MAP1_TEXTURE_COORD_4','%GL_MAP1_VERTEX_3','%GL_MAP1_VERTEX_4','%GL_MAP2_COLOR_4','%GL_MAP2_GRID_DOMAIN', + '%GL_MAP2_GRID_SEGMENTS','%GL_MAP2_INDEX','%GL_MAP2_NORMAL','%GL_MAP2_TEXTURE_COORD_1','%GL_MAP2_TEXTURE_COORD_2','%GL_MAP2_TEXTURE_COORD_3','%GL_MAP2_TEXTURE_COORD_4','%GL_MAP2_VERTEX_3', + '%GL_MAP2_VERTEX_4','%GL_MAP_COLOR','%GL_MAP_STENCIL','%GL_MATRIX_MODE','%GL_MAX_ATTRIB_STACK_DEPTH','%GL_MAX_CLIENT_ATTRIB_STACK_DEPTH','%GL_MAX_CLIP_PLANES','%GL_MAX_CONVOLUTION_HEIGHT_EXT', + '%GL_MAX_CONVOLUTION_WIDTH_EXT','%GL_MAX_EVAL_ORDER','%GL_MAX_EXT','%GL_MAX_LIGHTS','%GL_MAX_LIST_NESTING','%GL_MAX_MODELVIEW_STACK_DEPTH','%GL_MAX_NAME_STACK_DEPTH','%GL_MAX_PIXEL_MAP_TABLE', + '%GL_MAX_PROJECTION_STACK_DEPTH','%GL_MAX_TEXTURE_SIZE','%GL_MAX_TEXTURE_STACK_DEPTH','%GL_MAX_VIEWPORT_DIMS','%GL_MINMAX_EXT','%GL_MINMAX_FORMAT_EXT','%GL_MINMAX_SINK_EXT','%GL_MIN_EXT', + '%GL_MODELVIEW','%GL_MODELVIEW_MATRIX','%GL_MODELVIEW_STACK_DEPTH','%GL_MODULATE','%GL_MULT','%GL_N3F_V3F','%GL_NAME_STACK_DEPTH','%GL_NAND', + '%GL_NEAREST','%GL_NEAREST_MIPMAP_LINEAR','%GL_NEAREST_MIPMAP_NEAREST','%GL_NEVER','%GL_NICEST','%GL_NONE','%GL_NOOP','%GL_NOR', + '%GL_NORMALIZE','%GL_NORMAL_ARRAY','%GL_NORMAL_ARRAY_COUNT_EXT','%GL_NORMAL_ARRAY_EXT','%GL_NORMAL_ARRAY_POINTER','%GL_NORMAL_ARRAY_POINTER_EXT','%GL_NORMAL_ARRAY_STRIDE','%GL_NORMAL_ARRAY_STRIDE_EXT', + '%GL_NORMAL_ARRAY_TYPE','%GL_NORMAL_ARRAY_TYPE_EXT','%GL_NOTEQUAL','%GL_NO_ERROR','%GL_OBJECT_LINEAR','%GL_OBJECT_PLANE','%GL_ONE','%GL_ONE_MINUS_CONSTANT_ALPHA_EXT', + '%GL_ONE_MINUS_CONSTANT_COLOR_EXT','%GL_ONE_MINUS_DST_ALPHA','%GL_ONE_MINUS_DST_COLOR','%GL_ONE_MINUS_SRC_ALPHA','%GL_ONE_MINUS_SRC_COLOR','%GL_OR','%GL_ORDER','%GL_OR_INVERTED', + '%GL_OR_REVERSE','%GL_OUT_OF_MEMORY','%GL_PACK_ALIGNMENT','%GL_PACK_LSB_FIRST','%GL_PACK_ROW_LENGTH','%GL_PACK_SKIP_PIXELS','%GL_PACK_SKIP_ROWS','%GL_PACK_SWAP_BYTES', + '%GL_PASS_THROUGH_TOKEN','%GL_PERSPECTIVE_CORRECTION_HINT','%GL_PIXEL_MAP_A_TO_A','%GL_PIXEL_MAP_A_TO_A_SIZE','%GL_PIXEL_MAP_B_TO_B','%GL_PIXEL_MAP_B_TO_B_SIZE','%GL_PIXEL_MAP_G_TO_G','%GL_PIXEL_MAP_G_TO_G_SIZE', + '%GL_PIXEL_MAP_I_TO_A','%GL_PIXEL_MAP_I_TO_A_SIZE','%GL_PIXEL_MAP_I_TO_B','%GL_PIXEL_MAP_I_TO_B_SIZE','%GL_PIXEL_MAP_I_TO_G','%GL_PIXEL_MAP_I_TO_G_SIZE','%GL_PIXEL_MAP_I_TO_I','%GL_PIXEL_MAP_I_TO_I_SIZE', + '%GL_PIXEL_MAP_I_TO_R','%GL_PIXEL_MAP_I_TO_R_SIZE','%GL_PIXEL_MAP_R_TO_R','%GL_PIXEL_MAP_R_TO_R_SIZE','%GL_PIXEL_MAP_S_TO_S','%GL_PIXEL_MAP_S_TO_S_SIZE','%GL_PIXEL_MODE_BIT','%GL_POINT', + '%GL_POINTS','%GL_POINT_BIT','%GL_POINT_SIZE','%GL_POINT_SIZE_GRANULARITY','%GL_POINT_SIZE_RANGE','%GL_POINT_SMOOTH','%GL_POINT_SMOOTH_HINT','%GL_POINT_TOKEN', + '%GL_POLYGON','%GL_POLYGON_BIT','%GL_POLYGON_MODE','%GL_POLYGON_OFFSET_BIAS_EXT','%GL_POLYGON_OFFSET_EXT','%GL_POLYGON_OFFSET_FACTOR','%GL_POLYGON_OFFSET_FACTOR_EXT','%GL_POLYGON_OFFSET_FILL', + '%GL_POLYGON_OFFSET_LINE','%GL_POLYGON_OFFSET_POINT','%GL_POLYGON_OFFSET_UNITS','%GL_POLYGON_SMOOTH','%GL_POLYGON_SMOOTH_HINT','%GL_POLYGON_STIPPLE','%GL_POLYGON_STIPPLE_BIT','%GL_POLYGON_TOKEN', + '%GL_POSITION','%GL_POST_COLOR_MATRIX_COLOR_TABLE_EXT','%GL_POST_CONVOLUTION_ALPHA_BIAS_EXT','%GL_POST_CONVOLUTION_ALPHA_SCALE_EXT','%GL_POST_CONVOLUTION_BLUE_BIAS_EXT','%GL_POST_CONVOLUTION_BLUE_SCALE_EXT','%GL_POST_CONVOLUTION_COLOR_TABLE_EXT','%GL_POST_CONVOLUTION_GREEN_BIAS_EXT', + '%GL_POST_CONVOLUTION_GREEN_SCALE_EXT','%GL_POST_CONVOLUTION_RED_BIAS_EXT','%GL_POST_CONVOLUTION_RED_SCALE_EXT','%GL_PROJECTION','%GL_PROJECTION_MATRIX','%GL_PROJECTION_STACK_DEPTH','%GL_PROXY_COLOR_TABLE_EXT','%GL_PROXY_HISTOGRAM_EXT', + '%GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_EXT','%GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_EXT','%GL_PROXY_TEXTURE_1D','%GL_PROXY_TEXTURE_2D','%GL_Q','%GL_QUADRATIC_ATTENUATION','%GL_QUADS','%GL_QUAD_STRIP', + '%GL_R','%GL_R3_G3_B2','%GL_READ_BUFFER','%GL_RED','%GL_REDUCE_EXT','%GL_RED_BIAS','%GL_RED_BITS','%GL_RED_SCALE', + '%GL_RENDER','%GL_RENDERER','%GL_RENDER_MODE','%GL_REPEAT','%GL_REPLACE','%GL_RETURN','%GL_RGB','%GL_RGB10', + '%GL_RGB10_A2','%GL_RGB12','%GL_RGB16','%GL_RGB4','%GL_RGB5','%GL_RGB5_A1','%GL_RGB8','%GL_RGBA', + '%GL_RGBA12','%GL_RGBA16','%GL_RGBA2','%GL_RGBA4','%GL_RGBA8','%GL_RGBA_MODE','%GL_RIGHT','%GL_S', + '%GL_SCISSOR_BIT','%GL_SCISSOR_BOX','%GL_SCISSOR_TEST','%GL_SECONDARY_COLOR_ARRAY_EXT','%GL_SECONDARY_COLOR_ARRAY_POINTER_EXT','%GL_SECONDARY_COLOR_ARRAY_SIZE_EXT','%GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT','%GL_SECONDARY_COLOR_ARRAY_TYPE_EXT', + '%GL_SELECT','%GL_SELECTION_BUFFER_POINTER','%GL_SELECTION_BUFFER_SIZE','%GL_SEPARABLE_2D_EXT','%GL_SEPARATE_SPECULAR_COLOR_EXT','%GL_SET','%GL_SHADE_MODEL','%GL_SHININESS', + '%GL_SHORT','%GL_SINGLE_COLOR_EXT','%GL_SMOOTH','%GL_SPECULAR','%GL_SPHERE_MAP','%GL_SPOT_CUTOFF','%GL_SPOT_DIRECTION','%GL_SPOT_EXPONENT', + '%GL_SRC_ALPHA','%GL_SRC_ALPHA_SATURATE','%GL_SRC_COLOR','%GL_STACK_OVERFLOW','%GL_STACK_UNDERFLOW','%GL_STENCIL','%GL_STENCIL_BITS','%GL_STENCIL_BUFFER_BIT', + '%GL_STENCIL_CLEAR_VALUE','%GL_STENCIL_FAIL','%GL_STENCIL_FUNC','%GL_STENCIL_INDEX','%GL_STENCIL_PASS_DEPTH_FAIL','%GL_STENCIL_PASS_DEPTH_PASS','%GL_STENCIL_REF','%GL_STENCIL_TEST', + '%GL_STENCIL_VALUE_MASK','%GL_STENCIL_WRITEMASK','%GL_STEREO','%GL_SUBPIXEL_BITS','%GL_T','%GL_T2F_C3F_V3F','%GL_T2F_C4F_N3F_V3F','%GL_T2F_C4UB_V3F', + '%GL_T2F_N3F_V3F','%GL_T2F_V3F','%GL_T4F_C4F_N3F_V4F','%GL_T4F_V4F','%GL_TABLE_TOO_LARGE_EXT','%GL_TEXTURE','%GL_TEXTURE_1D','%GL_TEXTURE_2D', + '%GL_TEXTURE_ALPHA_SIZE','%GL_TEXTURE_BINDING_1D','%GL_TEXTURE_BINDING_2D','%GL_TEXTURE_BIT','%GL_TEXTURE_BLUE_SIZE','%GL_TEXTURE_BORDER','%GL_TEXTURE_BORDER_COLOR','%GL_TEXTURE_COMPONENTS', + '%GL_TEXTURE_COORD_ARRAY','%GL_TEXTURE_COORD_ARRAY_COUNT_EXT','%GL_TEXTURE_COORD_ARRAY_EXT','%GL_TEXTURE_COORD_ARRAY_POINTER','%GL_TEXTURE_COORD_ARRAY_POINTER_EXT','%GL_TEXTURE_COORD_ARRAY_SIZE','%GL_TEXTURE_COORD_ARRAY_SIZE_EXT','%GL_TEXTURE_COORD_ARRAY_STRIDE', + '%GL_TEXTURE_COORD_ARRAY_STRIDE_EXT','%GL_TEXTURE_COORD_ARRAY_TYPE','%GL_TEXTURE_COORD_ARRAY_TYPE_EXT','%GL_TEXTURE_ENV','%GL_TEXTURE_ENV_COLOR','%GL_TEXTURE_ENV_MODE','%GL_TEXTURE_GEN_MODE','%GL_TEXTURE_GEN_Q', + '%GL_TEXTURE_GEN_R','%GL_TEXTURE_GEN_S','%GL_TEXTURE_GEN_T','%GL_TEXTURE_GREEN_SIZE','%GL_TEXTURE_HEIGHT','%GL_TEXTURE_INTENSITY_SIZE','%GL_TEXTURE_INTERNAL_FORMAT','%GL_TEXTURE_LUMINANCE_SIZE', + '%GL_TEXTURE_MAG_FILTER','%GL_TEXTURE_MATRIX','%GL_TEXTURE_MIN_FILTER','%GL_TEXTURE_PRIORITY','%GL_TEXTURE_RED_SIZE','%GL_TEXTURE_RESIDENT','%GL_TEXTURE_STACK_DEPTH','%GL_TEXTURE_WIDTH', + '%GL_TEXTURE_WRAP_S','%GL_TEXTURE_WRAP_T','%GL_TRANSFORM_BIT','%GL_TRIANGLES','%GL_TRIANGLE_FAN','%GL_TRIANGLE_STRIP','%GL_TRUE','%GL_UNPACK_ALIGNMENT', + '%GL_UNPACK_LSB_FIRST','%GL_UNPACK_ROW_LENGTH','%GL_UNPACK_SKIP_PIXELS','%GL_UNPACK_SKIP_ROWS','%GL_UNPACK_SWAP_BYTES','%GL_UNSIGNED_BYTE','%GL_UNSIGNED_BYTE_3_3_2_EXT','%GL_UNSIGNED_INT', + '%GL_UNSIGNED_INT_10_10_10_2_EXT','%GL_UNSIGNED_INT_8_8_8_8_EXT','%GL_UNSIGNED_SHORT','%GL_UNSIGNED_SHORT_4_4_4_4_EXT','%GL_UNSIGNED_SHORT_5_5_5_1_EXT','%GL_V2F','%GL_V3F','%GL_VENDOR', + '%GL_VERSION','%GL_VERSION_1_1','%GL_VERTEX_ARRAY','%GL_VERTEX_ARRAY_COUNT_EXT','%GL_VERTEX_ARRAY_EXT','%GL_VERTEX_ARRAY_POINTER','%GL_VERTEX_ARRAY_POINTER_EXT','%GL_VERTEX_ARRAY_SIZE', + '%GL_VERTEX_ARRAY_SIZE_EXT','%GL_VERTEX_ARRAY_STRIDE','%GL_VERTEX_ARRAY_STRIDE_EXT','%GL_VERTEX_ARRAY_TYPE','%GL_VERTEX_ARRAY_TYPE_EXT','%GL_VIEWPORT','%GL_VIEWPORT_BIT','%GL_WIN_SWAP_HINT', + '%GL_XOR','%GL_ZERO','%GL_ZOOM_X','%GL_ZOOM_Y','%GRAY','%GREEN','%GWLP_HINSTANCE','%GWLP_HWNDPARENT', + '%GWLP_ID','%GWLP_USERDATA','%GWLP_WNDPROC','%GWL_EXSTYLE','%GWL_HINSTANCE','%GWL_HWNDPARENT','%GWL_ID','%GWL_STYLE', + '%GWL_USERDATA','%GWL_WNDPROC','%HDM_FIRST','%HTCAPTION','%HWND_BOTTOM','%HWND_DESKTOP','%HWND_MESSAGE','%HWND_NOTOPMOST', + '%HWND_TOP','%HWND_TOPMOST','%ICRYPTO_XOR_DECREASE','%ICRYPTO_XOR_INCREASE','%ICRYPTO_XOR_NORMAL','%IDABORT','%IDCANCEL','%IDCONTINUE', + '%IDIGNORE','%IDNO','%IDOK','%IDRETRY','%IDTIMEOUT','%IDTRYAGAIN','%IDYES','%INTERNET_CONNECTION_CONFIGURED', + '%INTERNET_CONNECTION_LAN','%INTERNET_CONNECTION_MODEM','%INTERNET_CONNECTION_MODEM_BUSY','%INTERNET_CONNECTION_OFFLINE','%INTERNET_CONNECTION_PROXY','%INTERNET_RAS_INSTALLED','%LBN_DBLCLK','%LBN_KILLFOCUS', + '%LBN_SELCANCEL','%LBN_SELCHANGE','%LBN_SETFOCUS','%LBS_DISABLENOSCROLL','%LBS_EXTENDEDSEL','%LBS_MULTICOLUMN','%LBS_MULTIPLESEL','%LBS_NOINTEGRALHEIGHT', + '%LBS_NOSEL','%LBS_NOTIFY','%LBS_SORT','%LBS_STANDARD','%LBS_USETABSTOPS','%LB_ADDFILE','%LB_ADDSTRING','%LB_DELETESTRING', + '%LB_DIR','%LB_FINDSTRING','%LB_FINDSTRINGEXACT','%LB_GETANCHORINDEX','%LB_GETCARETINDEX','%LB_GETCOUNT','%LB_GETCURSEL','%LB_GETHORIZONTALEXTENT', + '%LB_GETITEMDATA','%LB_GETITEMHEIGHT','%LB_GETITEMRECT','%LB_GETLISTBOXINFO','%LB_GETLOCALE','%LB_GETSEL','%LB_GETSELCOUNT','%LB_GETSELITEMS', + '%LB_GETTEXT','%LB_GETTEXTLEN','%LB_GETTOPINDEX','%LB_INITSTORAGE','%LB_INSERTSTRING','%LB_ITEMFROMPOINT','%LB_MULTIPLEADDSTRING','%LB_RESETCONTENT', + '%LB_SELECTSTRING','%LB_SELITEMRANGE','%LB_SELITEMRANGEEX','%LB_SETANCHORINDEX','%LB_SETCARETINDEX','%LB_SETCOLUMNWIDTH','%LB_SETCOUNT','%LB_SETCURSEL', + '%LB_SETHORIZONTALEXTENT','%LB_SETITEMDATA','%LB_SETITEMHEIGHT','%LB_SETLOCALE','%LB_SETSEL','%LB_SETTABSTOPS','%LB_SETTOPINDEX','%LF_FACESIZE', + '%LTGRAY','%LVM_FIRST','%LWA_ALPHA','%LWA_COLORKEY','%MAGENTA','%MAXBYTE','%MAXCHAR','%MAXDWORD', + '%MAXSHORT','%MAXWORD','%MAX_PATH','%MB_ABORTRETRYIGNORE','%MB_APPLMODAL','%MB_CANCELTRYCONTINUE','%MB_DEFBUTTON1','%MB_DEFBUTTON2', + '%MB_DEFBUTTON3','%MB_HELP','%MB_ICONASTERISK','%MB_ICONERROR','%MB_ICONEXCLAMATION','%MB_ICONHAND','%MB_ICONINFORMATION','%MB_ICONQUESTION', + '%MB_ICONSTOP','%MB_ICONWARNING','%MB_OK','%MB_OKCANCEL','%MB_RETRYCANCEL','%MB_SIMPLE','%MB_SYSTEMMODAL','%MB_TOPMOST', + '%MB_YESNO','%MB_YESNOCANCEL','%MF_CHECKED','%MF_DISABLED','%MF_ENABLED','%MF_GRAYED','%MF_SEPARATOR','%MF_UNCHECKED', + '%MINCHAR','%MINLONG','%MINSHORT','%NULL','%ODBC352_INC','%ODBCVER','%ODBC_ADD_DSN','%ODBC_ADD_SYS_DSN', + '%ODBC_BOTH_DSN','%ODBC_CONFIG_DRIVER','%ODBC_CONFIG_DRIVER_MAX','%ODBC_CONFIG_DSN','%ODBC_CONFIG_SYS_DSN','%ODBC_DRIVER_VERSION','%ODBC_ERROR_COMPONENT_NOT_FOUND','%ODBC_ERROR_CREATE_DSN_FAILED', + '%ODBC_ERROR_GENERAL_ERR','%ODBC_ERROR_INVALID_BUFF_LEN','%ODBC_ERROR_INVALID_DSN','%ODBC_ERROR_INVALID_HWND','%ODBC_ERROR_INVALID_INF','%ODBC_ERROR_INVALID_KEYWORD_VALUE','%ODBC_ERROR_INVALID_LOG_FILE','%ODBC_ERROR_INVALID_NAME', + '%ODBC_ERROR_INVALID_PARAM_SEQUENCE','%ODBC_ERROR_INVALID_PATH','%ODBC_ERROR_INVALID_REQUEST_TYPE','%ODBC_ERROR_INVALID_STR','%ODBC_ERROR_LOAD_LIB_FAILED','%ODBC_ERROR_OUTPUT_STRING_TRUNCATED','%ODBC_ERROR_OUT_OF_MEM','%ODBC_ERROR_REMOVE_DSN_FAILED', + '%ODBC_ERROR_REQUEST_FAILED','%ODBC_ERROR_USAGE_UPDATE_FAILED','%ODBC_ERROR_USER_CANCELED','%ODBC_ERROR_WRITING_SYSINFO_FAILED','%ODBC_INSTALL_COMPLETE','%ODBC_INSTALL_DRIVER','%ODBC_INSTALL_INQUIRY','%ODBC_REMOVE_DEFAULT_DSN', + '%ODBC_REMOVE_DRIVER','%ODBC_REMOVE_DSN','%ODBC_REMOVE_SYS_DSN','%ODBC_SYSTEM_DSN','%ODBC_USER_DSN','%OFN_ALLOWMULTISELECT','%OFN_CREATEPROMPT','%OFN_ENABLEHOOK', + '%OFN_ENABLEINCLUDENOTIFY','%OFN_ENABLESIZING','%OFN_ENABLETEMPLATE','%OFN_ENABLETEMPLATEHANDLE','%OFN_EXPLORER','%OFN_EXTENSIONDIFFERENT','%OFN_FILEMUSTEXIST','%OFN_HIDEREADONLY', + '%OFN_LONGNAMES','%OFN_NOCHANGEDIR','%OFN_NODEREFERENCELINKS','%OFN_NOLONGNAMES','%OFN_NONETWORKBUTTON','%OFN_NOREADONLYRETURN','%OFN_NOTESTFILECREATE','%OFN_NOVALIDATE', + '%OFN_OVERWRITEPROMPT','%OFN_PATHMUSTEXIST','%OFN_READONLY','%OFN_SHAREAWARE','%OFN_SHOWHELP','%OS_ERROR_CALLFUNCTION','%OS_ERROR_EMPTYSTRING','%OS_ERROR_LOADLIBRARY', + '%OS_ERROR_SUCCESS','%OS_ERROR_WRONGPARAMETER','%OS_SHELL_ASYNC','%OS_SHELL_SYNC','%OS_WINDOWS_2K','%OS_WINDOWS_95','%OS_WINDOWS_95_OSR2','%OS_WINDOWS_98', + '%OS_WINDOWS_98_SE','%OS_WINDOWS_ME','%OS_WINDOWS_NT','%OS_WINDOWS_SERVER_2003','%OS_WINDOWS_SERVER_LONGHORN','%OS_WINDOWS_SERVER_LONGHORN_DC','%OS_WINDOWS_VISTA','%OS_WINDOWS_XP', + '%OS_WNDSTYLE_HIDE','%OS_WNDSTYLE_MAXIMIZED','%OS_WNDSTYLE_MINIMIZED','%OS_WNDSTYLE_MINIMIZEDNOFOCUS','%OS_WNDSTYLE_NORMAL','%OS_WNDSTYLE_NORMALNOFOCUS','%PATH_EXT','%PATH_FILE', + '%PATH_FILEEXT','%PATH_ROOT','%PATH_ROOTPATH','%PATH_ROOTPATHPROG','%PATH_ROOTPATHPROGEXT','%PBM_DELTAPOS','%PBM_GETPOS','%PBM_GETRANGE', + '%PBM_SETBARCOLOR','%PBM_SETBKCOLOR','%PBM_SETPOS','%PBM_SETRANGE','%PBM_SETRANGE32','%PBM_SETSTEP','%PBM_STEPIT','%PBS_SMOOTH', + '%PBS_VERTICAL','%PC_DISABLEWAKEEVENT_OFF','%PC_DISABLEWAKEEVENT_ON','%PC_EB_NOCONFIRMATION','%PC_EB_NOPROGRESSUI','%PC_EB_NORMAL','%PC_EB_NOSOUND','%PC_FORCECRITICAL_OFF', + '%PC_FORCECRITICAL_ON','%PC_HIBERNATE_OFF','%PC_HIBERNATE_ON','%PC_RD_FORCE','%PC_RD_FORCEIFHUNG','%PC_RD_LOGOFF','%PC_RD_POWEROFF','%PC_RD_REBOOT', + '%PC_RD_SHUTDOWN','%PC_SD_DONOT_FORCE','%PC_SD_DONOT_REBOOT','%PC_SD_FORCE','%PC_SD_REBOOT','%PFA_CENTER','%PFA_LEFT','%PFA_RIGHT', + '%PF_3DNOW_INSTRUCTIONS_AVAILABLE','%PF_CHANNELS_ENABLED','%PF_COMPARE64_EXCHANGE128','%PF_COMPARE_EXCHANGE128','%PF_COMPARE_EXCHANGE_DOUBLE','%PF_FLOATING_POINT_EMULATED','%PF_FLOATING_POINT_PRECISION_ERRATA','%PF_MMX_INSTRUCTIONS_AVAILABLE', + '%PF_NX_ENABLED','%PF_PAE_ENABLED','%PF_RDTSC_INSTRUCTION_AVAILABLE','%PF_SSE3_INSTRUCTIONS_AVAILABLE','%PF_XMMI64_INSTRUCTIONS_AVAILABLE','%PF_XMMI_INSTRUCTIONS_AVAILABLE','%PGM_FIRST','%RED', + '%RTF_UBB','%SAPI_SVSFDEFAULT','%SAPI_SVSFISFILENAME','%SAPI_SVSFISNOTXML','%SAPI_SVSFISXML','%SAPI_SVSFLAGSASYNC','%SAPI_SVSFNLPMASK','%SAPI_SVSFNLPSPEAKPUNC', + '%SAPI_SVSFPERSISTXML','%SAPI_SVSFPURGEBEFORESPEAK','%SAPI_SVSFUNUSEDFLAGS','%SAPI_SVSFVOICEMASK','%SBS_SIZEGRIP','%SB_BOTTOM','%SB_ENDSCROLL','%SB_LEFT', + '%SB_LINEDOWN','%SB_LINELEFT','%SB_LINERIGHT','%SB_LINEUP','%SB_PAGEDOWN','%SB_PAGELEFT','%SB_PAGERIGHT','%SB_PAGEUP', + '%SB_RIGHT','%SB_SETPARTS','%SB_SETTEXT','%SB_THUMBPOSITION','%SB_THUMBTRACK','%SB_TOP','%SCF_ALL','%SCF_ASSOCIATEFONT', + '%SCF_DEFAULT','%SCF_NOKBUPDATE','%SCF_SELECTION','%SCF_USEUIRULES','%SCF_WORD','%SC_CLOSE','%SC_CONTEXTHELP','%SC_HOTKEY', + '%SC_HSCROLL','%SC_KEYMENU','%SC_MAXIMIZE','%SC_MINIMIZE','%SC_MONITORPOWER','%SC_MOUSEMENU','%SC_MOVE','%SC_NEXTWINDOW', + '%SC_PREVWINDOW','%SC_RESTORE','%SC_SCREENSAVE','%SC_SIZE','%SC_TASKLIST','%SC_VSCROLL','%SERVICE_ACTIVE','%SERVICE_AUTO_START', + '%SERVICE_BOOT_START','%SERVICE_CONTINUE_PENDING','%SERVICE_DEMAND_START','%SERVICE_DISABLED','%SERVICE_DRIVER','%SERVICE_INACTIVE','%SERVICE_INFO_DISPLAY_NAME','%SERVICE_INFO_NAME', + '%SERVICE_PAUSED','%SERVICE_PAUSE_PENDING','%SERVICE_RUNNING','%SERVICE_START_PENDING','%SERVICE_STATE_ALL','%SERVICE_STOPPED','%SERVICE_STOP_PENDING','%SERVICE_SYSTEM_START', + '%SERVICE_TYPE_ALL','%SERVICE_WIN32','%SES_ALLOWBEEPS','%SES_BEEPONMAXTEXT','%SES_BIDI','%SES_EMULATE10','%SES_EMULATESYSEDIT','%SES_EXTENDBACKCOLOR', + '%SES_LOWERCASE','%SES_MAPCPS','%SES_NOIME','%SES_NOINPUTSEQUENCECHK','%SES_SCROLLONKILLFOCUS','%SES_UPPERCASE','%SES_USEAIMM','%SES_USECRLF', + '%SES_XLTCRCRLFTOCR','%SF_RTF','%SF_TEXT','%SMTP_SET_ATTACH_CONTENT_TYPE','%SMTP_SET_CONTENT_TYPE_PREFIX','%SQL_AA_FALSE','%SQL_AA_TRUE','%SQL_ACCESSIBLE_PROCEDURES', + '%SQL_ACCESSIBLE_TABLES','%SQL_ACCESS_MODE','%SQL_ACTIVE_CONNECTIONS','%SQL_ACTIVE_ENVIRONMENTS','%SQL_ACTIVE_STATEMENTS','%SQL_ADD','%SQL_AD_ADD_CONSTRAINT_DEFERRABLE','%SQL_AD_ADD_CONSTRAINT_INITIALLY_DEFERRED', + '%SQL_AD_ADD_CONSTRAINT_INITIALLY_IMMEDIATE','%SQL_AD_ADD_CONSTRAINT_NON_DEFERRABLE','%SQL_AD_ADD_DOMAIN_CONSTRAINT','%SQL_AD_ADD_DOMAIN_DEFAULT','%SQL_AD_CONSTRAINT_NAME_DEFINITION','%SQL_AD_DROP_DOMAIN_CONSTRAINT','%SQL_AD_DROP_DOMAIN_DEFAULT','%SQL_AF_ALL', + '%SQL_AF_AVG','%SQL_AF_COUNT','%SQL_AF_DISTINCT','%SQL_AF_MAX','%SQL_AF_MIN','%SQL_AF_SUM','%SQL_AGGREGATE_FUNCTIONS','%SQL_ALL_EXCEPT_LIKE', + '%SQL_ALL_TYPES','%SQL_ALTER_DOMAIN','%SQL_ALTER_TABLE','%SQL_AM_CONNECTION','%SQL_AM_NONE','%SQL_AM_STATEMENT','%SQL_API_ALL_FUNCTIONS','%SQL_API_LOADBYORDINAL', + '%SQL_API_ODBC3_ALL_FUNCTIONS','%SQL_API_ODBC3_ALL_FUNCTIONS_SIZE','%SQL_API_SQLALLOCCONNECT','%SQL_API_SQLALLOCENV','%SQL_API_SQLALLOCHANDLE','%SQL_API_SQLALLOCHANDLESTD','%SQL_API_SQLALLOCSTMT','%SQL_API_SQLBINDCOL', + '%SQL_API_SQLBINDPARAM','%SQL_API_SQLBINDPARAMETER','%SQL_API_SQLBROWSECONNECT','%SQL_API_SQLBULKOPERATIONS','%SQL_API_SQLCANCEL','%SQL_API_SQLCLOSECURSOR','%SQL_API_SQLCOLATTRIBUTE','%SQL_API_SQLCOLATTRIBUTES', + '%SQL_API_SQLCOLUMNPRIVILEGES','%SQL_API_SQLCOLUMNS','%SQL_API_SQLCONNECT','%SQL_API_SQLCOPYDESC','%SQL_API_SQLDATASOURCES','%SQL_API_SQLDESCRIBECOL','%SQL_API_SQLDESCRIBEPARAM','%SQL_API_SQLDISCONNECT', + '%SQL_API_SQLDRIVERCONNECT','%SQL_API_SQLDRIVERS','%SQL_API_SQLENDTRAN','%SQL_API_SQLERROR','%SQL_API_SQLEXECDIRECT','%SQL_API_SQLEXECUTE','%SQL_API_SQLEXTENDEDFETCH','%SQL_API_SQLFETCH', + '%SQL_API_SQLFETCHSCROLL','%SQL_API_SQLFOREIGNKEYS','%SQL_API_SQLFREECONNECT','%SQL_API_SQLFREEENV','%SQL_API_SQLFREEHANDLE','%SQL_API_SQLFREESTMT','%SQL_API_SQLGETCONNECTATTR','%SQL_API_SQLGETCONNECTOPTION', + '%SQL_API_SQLGETCURSORNAME','%SQL_API_SQLGETDATA','%SQL_API_SQLGETDESCFIELD','%SQL_API_SQLGETDESCREC','%SQL_API_SQLGETDIAGFIELD','%SQL_API_SQLGETDIAGREC','%SQL_API_SQLGETENVATTR','%SQL_API_SQLGETFUNCTIONS', + '%SQL_API_SQLGETINFO','%SQL_API_SQLGETSTMTATTR','%SQL_API_SQLGETSTMTOPTION','%SQL_API_SQLGETTYPEINFO','%SQL_API_SQLMORERESULTS','%SQL_API_SQLNATIVESQL','%SQL_API_SQLNUMPARAMS','%SQL_API_SQLNUMRESULTCOLS', + '%SQL_API_SQLPARAMDATA','%SQL_API_SQLPARAMOPTIONS','%SQL_API_SQLPREPARE','%SQL_API_SQLPRIMARYKEYS','%SQL_API_SQLPROCEDURECOLUMNS','%SQL_API_SQLPROCEDURES','%SQL_API_SQLPUTDATA','%SQL_API_SQLROWCOUNT', + '%SQL_API_SQLSETCONNECTATTR','%SQL_API_SQLSETCONNECTOPTION','%SQL_API_SQLSETCURSORNAME','%SQL_API_SQLSETDESCFIELD','%SQL_API_SQLSETDESCREC','%SQL_API_SQLSETENVATTR','%SQL_API_SQLSETPARAM','%SQL_API_SQLSETPOS', + '%SQL_API_SQLSETSCROLLOPTIONS','%SQL_API_SQLSETSTMTATTR','%SQL_API_SQLSETSTMTOPTION','%SQL_API_SQLSPECIALCOLUMNS','%SQL_API_SQLSTATISTICS','%SQL_API_SQLTABLEPRIVILEGES','%SQL_API_SQLTABLES','%SQL_API_SQLTRANSACT', + '%SQL_ARD_TYPE','%SQL_ASYNC_ENABLE','%SQL_ASYNC_ENABLE_DEFAULT','%SQL_ASYNC_ENABLE_OFF','%SQL_ASYNC_ENABLE_ON','%SQL_ASYNC_MODE','%SQL_ATTR_ACCESS_MODE','%SQL_ATTR_ANSI_APP', + '%SQL_ATTR_APP_PARAM_DESC','%SQL_ATTR_APP_ROW_DESC','%SQL_ATTR_ASYNC_ENABLE','%SQL_ATTR_AUTOCOMMIT','%SQL_ATTR_AUTO_IPD','%SQL_ATTR_CONCURRENCY','%SQL_ATTR_CONNECTION_DEAD','%SQL_ATTR_CONNECTION_POOLING', + '%SQL_ATTR_CONNECTION_TIMEOUT','%SQL_ATTR_CP_MATCH','%SQL_ATTR_CURRENT_CATALOG','%SQL_ATTR_CURSOR_SCROLLABLE','%SQL_ATTR_CURSOR_SENSITIVITY','%SQL_ATTR_CURSOR_TYPE','%SQL_ATTR_DISCONNECT_BEHAVIOR','%SQL_ATTR_ENABLE_AUTO_IPD', + '%SQL_ATTR_ENLIST_IN_DTC','%SQL_ATTR_ENLIST_IN_XA','%SQL_ATTR_FETCH_BOOKMARK_PTR','%SQL_ATTR_IMP_PARAM_DESC','%SQL_ATTR_IMP_ROW_DESC','%SQL_ATTR_KEYSET_SIZE','%SQL_ATTR_LOGIN_TIMEOUT','%SQL_ATTR_MAX_LENGTH', + '%SQL_ATTR_MAX_ROWS','%SQL_ATTR_METADATA_ID','%SQL_ATTR_NOSCAN','%SQL_ATTR_ODBC_CURSORS','%SQL_ATTR_ODBC_VERSION','%SQL_ATTR_OUTPUT_NTS','%SQL_ATTR_PACKET_SIZE','%SQL_ATTR_PARAMSET_SIZE', + '%SQL_ATTR_PARAMS_PROCESSED_PTR','%SQL_ATTR_PARAM_BIND_OFFSET_PTR','%SQL_ATTR_PARAM_BIND_TYPE','%SQL_ATTR_PARAM_OPERATION_PTR','%SQL_ATTR_PARAM_STATUS_PTR','%SQL_ATTR_QUERY_TIMEOUT','%SQL_ATTR_QUIET_MODE','%SQL_ATTR_READONLY', + '%SQL_ATTR_READWRITE_UNKNOWN','%SQL_ATTR_RETRIEVE_DATA','%SQL_ATTR_ROWS_FETCHED_PTR','%SQL_ATTR_ROW_ARRAY_SIZE','%SQL_ATTR_ROW_BIND_OFFSET_PTR','%SQL_ATTR_ROW_BIND_TYPE','%SQL_ATTR_ROW_NUMBER','%SQL_ATTR_ROW_OPERATION_PTR', + '%SQL_ATTR_ROW_STATUS_PTR','%SQL_ATTR_SIMULATE_CURSOR','%SQL_ATTR_TRACE','%SQL_ATTR_TRACEFILE','%SQL_ATTR_TRANSLATE_LIB','%SQL_ATTR_TRANSLATE_OPTION','%SQL_ATTR_TXN_ISOLATION','%SQL_ATTR_USE_BOOKMARKS', + '%SQL_ATTR_WRITE','%SQL_AT_ADD_COLUMN','%SQL_AT_ADD_COLUMN_COLLATION','%SQL_AT_ADD_COLUMN_DEFAULT','%SQL_AT_ADD_COLUMN_SINGLE','%SQL_AT_ADD_CONSTRAINT','%SQL_AT_ADD_TABLE_CONSTRAINT','%SQL_AT_CONSTRAINT_DEFERRABLE', + '%SQL_AT_CONSTRAINT_INITIALLY_DEFERRED','%SQL_AT_CONSTRAINT_INITIALLY_IMMEDIATE','%SQL_AT_CONSTRAINT_NAME_DEFINITION','%SQL_AT_CONSTRAINT_NON_DEFERRABLE','%SQL_AT_DROP_COLUMN','%SQL_AT_DROP_COLUMN_CASCADE','%SQL_AT_DROP_COLUMN_DEFAULT','%SQL_AT_DROP_COLUMN_RESTRICT', + '%SQL_AT_DROP_TABLE_CONSTRAINT_CASCADE','%SQL_AT_DROP_TABLE_CONSTRAINT_RESTRICT','%SQL_AT_SET_COLUMN_DEFAULT','%SQL_AUTOCOMMIT','%SQL_AUTOCOMMIT_DEFAULT','%SQL_AUTOCOMMIT_OFF','%SQL_AUTOCOMMIT_ON','%SQL_BATCH_ROW_COUNT', + '%SQL_BATCH_SUPPORT','%SQL_BEST_ROWID','%SQL_BIGINT','%SQL_BINARY','%SQL_BIND_BY_COLUMN','%SQL_BIND_TYPE','%SQL_BIND_TYPE_DEFAULT','%SQL_BIT', + '%SQL_BOOKMARK_PERSISTENCE','%SQL_BP_CLOSE','%SQL_BP_DELETE','%SQL_BP_DROP','%SQL_BP_OTHER_HSTMT','%SQL_BP_SCROLL','%SQL_BP_TRANSACTION','%SQL_BP_UPDATE', + '%SQL_BRC_EXPLICIT','%SQL_BRC_PROCEDURES','%SQL_BRC_ROLLED_UP','%SQL_BS_ROW_COUNT_EXPLICIT','%SQL_BS_ROW_COUNT_PROC','%SQL_BS_SELECT_EXPLICIT','%SQL_BS_SELECT_PROC','%SQL_CA1_ABSOLUTE', + '%SQL_CA1_BOOKMARK','%SQL_CA1_BULK_ADD','%SQL_CA1_BULK_DELETE_BY_BOOKMARK','%SQL_CA1_BULK_FETCH_BY_BOOKMARK','%SQL_CA1_BULK_UPDATE_BY_BOOKMARK','%SQL_CA1_LOCK_EXCLUSIVE','%SQL_CA1_LOCK_NO_CHANGE','%SQL_CA1_LOCK_UNLOCK', + '%SQL_CA1_NEXT','%SQL_CA1_POSITIONED_DELETE','%SQL_CA1_POSITIONED_UPDATE','%SQL_CA1_POS_DELETE','%SQL_CA1_POS_POSITION','%SQL_CA1_POS_REFRESH','%SQL_CA1_POS_UPDATE','%SQL_CA1_RELATIVE', + '%SQL_CA1_SELECT_FOR_UPDATE','%SQL_CA2_CRC_APPROXIMATE','%SQL_CA2_CRC_EXACT','%SQL_CA2_LOCK_CONCURRENCY','%SQL_CA2_MAX_ROWS_AFFECTS_ALL','%SQL_CA2_MAX_ROWS_CATALOG','%SQL_CA2_MAX_ROWS_DELETE','%SQL_CA2_MAX_ROWS_INSERT', + '%SQL_CA2_MAX_ROWS_SELECT','%SQL_CA2_MAX_ROWS_UPDATE','%SQL_CA2_OPT_ROWVER_CONCURRENCY','%SQL_CA2_OPT_VALUES_CONCURRENCY','%SQL_CA2_READ_ONLY_CONCURRENCY','%SQL_CA2_SENSITIVITY_ADDITIONS','%SQL_CA2_SENSITIVITY_DELETIONS','%SQL_CA2_SENSITIVITY_UPDATES', + '%SQL_CA2_SIMULATE_NON_UNIQUE','%SQL_CA2_SIMULATE_TRY_UNIQUE','%SQL_CA2_SIMULATE_UNIQUE','%SQL_CASCADE','%SQL_CATALOG_LOCATION','%SQL_CATALOG_NAME','%SQL_CATALOG_NAME_SEPARATOR','%SQL_CATALOG_TERM', + '%SQL_CATALOG_USAGE','%SQL_CA_CONSTRAINT_DEFERRABLE','%SQL_CA_CONSTRAINT_INITIALLY_DEFERRED','%SQL_CA_CONSTRAINT_INITIALLY_IMMEDIATE','%SQL_CA_CONSTRAINT_NON_DEFERRABLE','%SQL_CA_CREATE_ASSERTION','%SQL_CB_CLOSE','%SQL_CB_DELETE', + '%SQL_CB_NON_NULL','%SQL_CB_NULL','%SQL_CB_PRESERVE','%SQL_CCOL_CREATE_COLLATION','%SQL_CCS_COLLATE_CLAUSE','%SQL_CCS_CREATE_CHARACTER_SET','%SQL_CCS_LIMITED_COLLATION','%SQL_CC_CLOSE', + '%SQL_CC_DELETE','%SQL_CC_PRESERVE','%SQL_CDO_COLLATION','%SQL_CDO_CONSTRAINT','%SQL_CDO_CONSTRAINT_DEFERRABLE','%SQL_CDO_CONSTRAINT_INITIALLY_DEFERRED','%SQL_CDO_CONSTRAINT_INITIALLY_IMMEDIATE','%SQL_CDO_CONSTRAINT_NAME_DEFINITION', + '%SQL_CDO_CONSTRAINT_NON_DEFERRABLE','%SQL_CDO_CREATE_DOMAIN','%SQL_CDO_DEFAULT','%SQL_CD_FALSE','%SQL_CD_TRUE','%SQL_CHAR','%SQL_CLOSE','%SQL_CL_END', + '%SQL_CL_START','%SQL_CN_ANY','%SQL_CN_DIFFERENT','%SQL_CN_NONE','%SQL_CODE_DATE','%SQL_CODE_DAY','%SQL_CODE_DAY_TO_HOUR','%SQL_CODE_DAY_TO_MINUTE', + '%SQL_CODE_DAY_TO_SECOND','%SQL_CODE_HOUR','%SQL_CODE_HOUR_TO_MINUTE','%SQL_CODE_HOUR_TO_SECOND','%SQL_CODE_MINUTE','%SQL_CODE_MINUTE_TO_SECOND','%SQL_CODE_MONTH','%SQL_CODE_SECOND', + '%SQL_CODE_TIME','%SQL_CODE_TIMESTAMP','%SQL_CODE_YEAR','%SQL_CODE_YEAR_TO_MONTH','%SQL_COLATT_OPT_MAX','%SQL_COLATT_OPT_MIN','%SQL_COLLATION_SEQ','%SQL_COLUMN_ALIAS', + '%SQL_COLUMN_AUTO_INCREMENT','%SQL_COLUMN_CASE_SENSITIVE','%SQL_COLUMN_COUNT','%SQL_COLUMN_DISPLAY_SIZE','%SQL_COLUMN_IGNORE','%SQL_COLUMN_LABEL','%SQL_COLUMN_LENGTH','%SQL_COLUMN_MONEY', + '%SQL_COLUMN_NAME','%SQL_COLUMN_NULLABLE','%SQL_COLUMN_NUMBER_UNKNOWN','%SQL_COLUMN_OWNER_NAME','%SQL_COLUMN_PRECISION','%SQL_COLUMN_QUALIFIER_NAME','%SQL_COLUMN_SCALE','%SQL_COLUMN_SEARCHABLE', + '%SQL_COLUMN_TABLE_NAME','%SQL_COLUMN_TYPE','%SQL_COLUMN_TYPE_NAME','%SQL_COLUMN_UNSIGNED','%SQL_COLUMN_UPDATABLE','%SQL_COL_PRED_BASIC','%SQL_COL_PRED_CHAR','%SQL_COMMIT', + '%SQL_CONCAT_NULL_BEHAVIOR','%SQL_CONCURRENCY','%SQL_CONCUR_DEFAULT','%SQL_CONCUR_LOCK','%SQL_CONCUR_READ_ONLY','%SQL_CONCUR_ROWVER','%SQL_CONCUR_TIMESTAMP','%SQL_CONCUR_VALUES', + '%SQL_CONVERT_BIGINT','%SQL_CONVERT_BINARY','%SQL_CONVERT_BIT','%SQL_CONVERT_CHAR','%SQL_CONVERT_DATE','%SQL_CONVERT_DECIMAL','%SQL_CONVERT_DOUBLE','%SQL_CONVERT_FLOAT', + '%SQL_CONVERT_FUNCTIONS','%SQL_CONVERT_GUID','%SQL_CONVERT_INTEGER','%SQL_CONVERT_INTERVAL_DAY_TIME','%SQL_CONVERT_INTERVAL_YEAR_MONTH','%SQL_CONVERT_LONGVARBINARY','%SQL_CONVERT_LONGVARCHAR','%SQL_CONVERT_NUMERIC', + '%SQL_CONVERT_REAL','%SQL_CONVERT_SMALLINT','%SQL_CONVERT_TIME','%SQL_CONVERT_TIMESTAMP','%SQL_CONVERT_TINYINT','%SQL_CONVERT_VARBINARY','%SQL_CONVERT_VARCHAR','%SQL_CONVERT_WCHAR', + '%SQL_CONVERT_WLONGVARCHAR','%SQL_CONVERT_WVARCHAR','%SQL_CORRELATION_NAME','%SQL_CP_DEFAULT','%SQL_CP_MATCH_DEFAULT','%SQL_CP_OFF','%SQL_CP_ONE_PER_DRIVER','%SQL_CP_ONE_PER_HENV', + '%SQL_CP_RELAXED_MATCH','%SQL_CP_STRICT_MATCH','%SQL_CREATE_ASSERTION','%SQL_CREATE_CHARACTER_SET','%SQL_CREATE_COLLATION','%SQL_CREATE_DOMAIN','%SQL_CREATE_SCHEMA','%SQL_CREATE_TABLE', + '%SQL_CREATE_TRANSLATION','%SQL_CREATE_VIEW','%SQL_CR_CLOSE','%SQL_CR_DELETE','%SQL_CR_PRESERVE','%SQL_CS_AUTHORIZATION','%SQL_CS_CREATE_SCHEMA','%SQL_CS_DEFAULT_CHARACTER_SET', + '%SQL_CTR_CREATE_TRANSLATION','%SQL_CT_COLUMN_COLLATION','%SQL_CT_COLUMN_CONSTRAINT','%SQL_CT_COLUMN_DEFAULT','%SQL_CT_COMMIT_DELETE','%SQL_CT_COMMIT_PRESERVE','%SQL_CT_CONSTRAINT_DEFERRABLE','%SQL_CT_CONSTRAINT_INITIALLY_DEFERRED', + '%SQL_CT_CONSTRAINT_INITIALLY_IMMEDIATE','%SQL_CT_CONSTRAINT_NAME_DEFINITION','%SQL_CT_CONSTRAINT_NON_DEFERRABLE','%SQL_CT_CREATE_TABLE','%SQL_CT_GLOBAL_TEMPORARY','%SQL_CT_LOCAL_TEMPORARY','%SQL_CT_TABLE_CONSTRAINT','%SQL_CURRENT_QUALIFIER', + '%SQL_CURSOR_COMMIT_BEHAVIOR','%SQL_CURSOR_DYNAMIC','%SQL_CURSOR_FORWARD_ONLY','%SQL_CURSOR_KEYSET_DRIVEN','%SQL_CURSOR_ROLLBACK_BEHAVIOR','%SQL_CURSOR_SENSITIVITY','%SQL_CURSOR_STATIC','%SQL_CURSOR_TYPE', + '%SQL_CURSOR_TYPE_DEFAULT','%SQL_CUR_DEFAULT','%SQL_CUR_USE_DRIVER','%SQL_CUR_USE_IF_NEEDED','%SQL_CUR_USE_ODBC','%SQL_CU_DML_STATEMENTS','%SQL_CU_INDEX_DEFINITION','%SQL_CU_PRIVILEGE_DEFINITION', + '%SQL_CU_PROCEDURE_INVOCATION','%SQL_CU_TABLE_DEFINITION','%SQL_CVT_BIGINT','%SQL_CVT_BINARY','%SQL_CVT_BIT','%SQL_CVT_CHAR','%SQL_CVT_DATE','%SQL_CVT_DECIMAL', + '%SQL_CVT_DOUBLE','%SQL_CVT_FLOAT','%SQL_CVT_GUID','%SQL_CVT_INTEGER','%SQL_CVT_INTERVAL_DAY_TIME','%SQL_CVT_INTERVAL_YEAR_MONTH','%SQL_CVT_LONGVARBINARY','%SQL_CVT_LONGVARCHAR', + '%SQL_CVT_NUMERIC','%SQL_CVT_REAL','%SQL_CVT_SMALLINT','%SQL_CVT_TIME','%SQL_CVT_TIMESTAMP','%SQL_CVT_TINYINT','%SQL_CVT_VARBINARY','%SQL_CVT_VARCHAR', + '%SQL_CVT_WCHAR','%SQL_CVT_WLONGVARCHAR','%SQL_CVT_WVARCHAR','%SQL_CV_CASCADED','%SQL_CV_CHECK_OPTION','%SQL_CV_CREATE_VIEW','%SQL_CV_LOCAL','%SQL_C_BINARY', + '%SQL_C_BIT','%SQL_C_BOOKMARK','%SQL_C_CHAR','%SQL_C_DATE','%SQL_C_DEFAULT','%SQL_C_DOUBLE','%SQL_C_FLOAT','%SQL_C_GUID', + '%SQL_C_INTERVAL_DAY','%SQL_C_INTERVAL_DAY_TO_HOUR','%SQL_C_INTERVAL_DAY_TO_MINUTE','%SQL_C_INTERVAL_DAY_TO_SECOND','%SQL_C_INTERVAL_HOUR','%SQL_C_INTERVAL_HOUR_TO_MINUTE','%SQL_C_INTERVAL_HOUR_TO_SECOND','%SQL_C_INTERVAL_MINUTE', + '%SQL_C_INTERVAL_MINUTE_TO_SECOND','%SQL_C_INTERVAL_MONTH','%SQL_C_INTERVAL_SECOND','%SQL_C_INTERVAL_YEAR','%SQL_C_INTERVAL_YEAR_TO_MONTH','%SQL_C_LONG','%SQL_C_NUMERIC','%SQL_C_SBIGINT', + '%SQL_C_SHORT','%SQL_C_SLONG','%SQL_C_SSHORT','%SQL_C_STINYINT','%SQL_C_TIME','%SQL_C_TIMESTAMP','%SQL_C_TINYINT','%SQL_C_TYPE_DATE', + '%SQL_C_TYPE_TIME','%SQL_C_TYPE_TIMESTAMP','%SQL_C_UBIGINT','%SQL_C_ULONG','%SQL_C_USHORT','%SQL_C_UTINYINT','%SQL_C_VARBOOKMARK','%SQL_DATABASE_NAME', + '%SQL_DATA_AT_EXEC','%SQL_DATA_SOURCE_NAME','%SQL_DATA_SOURCE_READ_ONLY','%SQL_DATE','%SQL_DATETIME','%SQL_DATETIME_LITERALS','%SQL_DATE_LEN','%SQL_DAY', + '%SQL_DAY_TO_HOUR','%SQL_DAY_TO_MINUTE','%SQL_DAY_TO_SECOND','%SQL_DA_DROP_ASSERTION','%SQL_DBMS_NAME','%SQL_DBMS_VER','%SQL_DB_DEFAULT','%SQL_DB_DISCONNECT', + '%SQL_DB_RETURN_TO_POOL','%SQL_DCS_DROP_CHARACTER_SET','%SQL_DC_DROP_COLLATION','%SQL_DDL_INDEX','%SQL_DD_CASCADE','%SQL_DD_DROP_DOMAIN','%SQL_DD_RESTRICT','%SQL_DECIMAL', + '%SQL_DEFAULT','%SQL_DEFAULT_PARAM','%SQL_DEFAULT_TXN_ISOLATION','%SQL_DELETE','%SQL_DELETE_BY_BOOKMARK','%SQL_DESCRIBE_PARAMETER','%SQL_DESC_ALLOC_AUTO','%SQL_DESC_ALLOC_TYPE', + '%SQL_DESC_ALLOC_USER','%SQL_DESC_ARRAY_SIZE','%SQL_DESC_ARRAY_STATUS_PTR','%SQL_DESC_AUTO_UNIQUE_VALUE','%SQL_DESC_BASE_COLUMN_NAME','%SQL_DESC_BASE_TABLE_NAME','%SQL_DESC_BIND_OFFSET_PTR','%SQL_DESC_BIND_TYPE', + '%SQL_DESC_CASE_SENSITIVE','%SQL_DESC_CATALOG_NAME','%SQL_DESC_CONCISE_TYPE','%SQL_DESC_COUNT','%SQL_DESC_DATA_PTR','%SQL_DESC_DATETIME_INTERVAL_CODE','%SQL_DESC_DATETIME_INTERVAL_PRECISION','%SQL_DESC_DISPLAY_SIZE', + '%SQL_DESC_FIXED_PREC_SCALE','%SQL_DESC_INDICATOR_PTR','%SQL_DESC_LABEL','%SQL_DESC_LENGTH','%SQL_DESC_LITERAL_PREFIX','%SQL_DESC_LITERAL_SUFFIX','%SQL_DESC_LOCAL_TYPE_NAME','%SQL_DESC_MAXIMUM_SCALE', + '%SQL_DESC_MINIMUM_SCALE','%SQL_DESC_NAME','%SQL_DESC_NULLABLE','%SQL_DESC_NUM_PREC_RADIX','%SQL_DESC_OCTET_LENGTH','%SQL_DESC_OCTET_LENGTH_PTR','%SQL_DESC_PARAMETER_TYPE','%SQL_DESC_PRECISION', + '%SQL_DESC_ROWS_PROCESSED_PTR','%SQL_DESC_SCALE','%SQL_DESC_SCHEMA_NAME','%SQL_DESC_SEARCHABLE','%SQL_DESC_TABLE_NAME','%SQL_DESC_TYPE','%SQL_DESC_TYPE_NAME','%SQL_DESC_UNNAMED', + '%SQL_DESC_UNSIGNED','%SQL_DESC_UPDATABLE','%SQL_DIAG_ALTER_TABLE','%SQL_DIAG_CALL','%SQL_DIAG_CLASS_ORIGIN','%SQL_DIAG_COLUMN_NUMBER','%SQL_DIAG_CONNECTION_NAME','%SQL_DIAG_CREATE_INDEX', + '%SQL_DIAG_CREATE_TABLE','%SQL_DIAG_CREATE_VIEW','%SQL_DIAG_CURSOR_ROW_COUNT','%SQL_DIAG_DELETE_WHERE','%SQL_DIAG_DROP_INDEX','%SQL_DIAG_DROP_TABLE','%SQL_DIAG_DROP_VIEW','%SQL_DIAG_DYNAMIC_DELETE_CURSOR', + '%SQL_DIAG_DYNAMIC_FUNCTION','%SQL_DIAG_DYNAMIC_FUNCTION_CODE','%SQL_DIAG_DYNAMIC_UPDATE_CURSOR','%SQL_DIAG_GRANT','%SQL_DIAG_INSERT','%SQL_DIAG_MESSAGE_TEXT','%SQL_DIAG_NATIVE','%SQL_DIAG_NUMBER', + '%SQL_DIAG_RETURNCODE','%SQL_DIAG_REVOKE','%SQL_DIAG_ROW_COUNT','%SQL_DIAG_ROW_NUMBER','%SQL_DIAG_SELECT_CURSOR','%SQL_DIAG_SERVER_NAME','%SQL_DIAG_SQLSTATE','%SQL_DIAG_SUBCLASS_ORIGIN', + '%SQL_DIAG_UNKNOWN_STATEMENT','%SQL_DIAG_UPDATE_WHERE','%SQL_DI_CREATE_INDEX','%SQL_DI_DROP_INDEX','%SQL_DL_SQL92_DATE','%SQL_DL_SQL92_INTERVAL_DAY','%SQL_DL_SQL92_INTERVAL_DAY_TO_HOUR','%SQL_DL_SQL92_INTERVAL_DAY_TO_MINUTE', + '%SQL_DL_SQL92_INTERVAL_DAY_TO_SECOND','%SQL_DL_SQL92_INTERVAL_HOUR','%SQL_DL_SQL92_INTERVAL_HOUR_TO_MINUTE','%SQL_DL_SQL92_INTERVAL_HOUR_TO_SECOND','%SQL_DL_SQL92_INTERVAL_MINUTE','%SQL_DL_SQL92_INTERVAL_MINUTE_TO_SECOND','%SQL_DL_SQL92_INTERVAL_MONTH','%SQL_DL_SQL92_INTERVAL_SECOND', + '%SQL_DL_SQL92_INTERVAL_YEAR','%SQL_DL_SQL92_INTERVAL_YEAR_TO_MONTH','%SQL_DL_SQL92_TIME','%SQL_DL_SQL92_TIMESTAMP','%SQL_DM_VER','%SQL_DOUBLE','%SQL_DRIVER_COMPLETE','%SQL_DRIVER_COMPLETE_REQUIRED', + '%SQL_DRIVER_HDBC','%SQL_DRIVER_HDESC','%SQL_DRIVER_HENV','%SQL_DRIVER_HLIB','%SQL_DRIVER_HSTMT','%SQL_DRIVER_NAME','%SQL_DRIVER_NOPROMPT','%SQL_DRIVER_ODBC_VER', + '%SQL_DRIVER_PROMPT','%SQL_DRIVER_VER','%SQL_DROP','%SQL_DROP_ASSERTION','%SQL_DROP_CHARACTER_SET','%SQL_DROP_COLLATION','%SQL_DROP_DOMAIN','%SQL_DROP_SCHEMA', + '%SQL_DROP_TABLE','%SQL_DROP_TRANSLATION','%SQL_DROP_VIEW','%SQL_DS_CASCADE','%SQL_DS_DROP_SCHEMA','%SQL_DS_RESTRICT','%SQL_DTC_DONE','%SQL_DTC_ENLIST_EXPENSIVE', + '%SQL_DTC_TRANSITION_COST','%SQL_DTC_UNENLIST_EXPENSIVE','%SQL_DTR_DROP_TRANSLATION','%SQL_DT_CASCADE','%SQL_DT_DROP_TABLE','%SQL_DT_RESTRICT','%SQL_DV_CASCADE','%SQL_DV_DROP_VIEW', + '%SQL_DV_RESTRICT','%SQL_DYNAMIC_CURSOR_ATTRIBUTES1','%SQL_DYNAMIC_CURSOR_ATTRIBUTES2','%SQL_ENSURE','%SQL_ENTIRE_ROWSET','%SQL_ERROR','%SQL_EXPRESSIONS_IN_ORDERBY','%SQL_FALSE', + '%SQL_FD_FETCH_ABSOLUTE','%SQL_FD_FETCH_BOOKMARK','%SQL_FD_FETCH_FIRST','%SQL_FD_FETCH_LAST','%SQL_FD_FETCH_NEXT','%SQL_FD_FETCH_PREV','%SQL_FD_FETCH_PRIOR','%SQL_FD_FETCH_RELATIVE', + '%SQL_FETCH_ABSOLUTE','%SQL_FETCH_BOOKMARK','%SQL_FETCH_BY_BOOKMARK','%SQL_FETCH_DIRECTION','%SQL_FETCH_FIRST','%SQL_FETCH_FIRST_SYSTEM','%SQL_FETCH_FIRST_USER','%SQL_FETCH_LAST', + '%SQL_FETCH_NEXT','%SQL_FETCH_PREV','%SQL_FETCH_PRIOR','%SQL_FETCH_RELATIVE','%SQL_FILE_CATALOG','%SQL_FILE_NOT_SUPPORTED','%SQL_FILE_QUALIFIER','%SQL_FILE_TABLE', + '%SQL_FILE_USAGE','%SQL_FLOAT','%SQL_FN_CVT_CAST','%SQL_FN_CVT_CONVERT','%SQL_FN_NUM_ABS','%SQL_FN_NUM_ACOS','%SQL_FN_NUM_ASIN','%SQL_FN_NUM_ATAN', + '%SQL_FN_NUM_ATAN2','%SQL_FN_NUM_CEILING','%SQL_FN_NUM_COS','%SQL_FN_NUM_COT','%SQL_FN_NUM_DEGREES','%SQL_FN_NUM_EXP','%SQL_FN_NUM_FLOOR','%SQL_FN_NUM_LOG', + '%SQL_FN_NUM_LOG10','%SQL_FN_NUM_MOD','%SQL_FN_NUM_PI','%SQL_FN_NUM_POWER','%SQL_FN_NUM_RADIANS','%SQL_FN_NUM_RAND','%SQL_FN_NUM_ROUND','%SQL_FN_NUM_SIGN', + '%SQL_FN_NUM_SIN','%SQL_FN_NUM_SQRT','%SQL_FN_NUM_TAN','%SQL_FN_NUM_TRUNCATE','%SQL_FN_STR_ASCII','%SQL_FN_STR_BIT_LENGTH','%SQL_FN_STR_CHAR','%SQL_FN_STR_CHARACTER_LENGTH', + '%SQL_FN_STR_CHAR_LENGTH','%SQL_FN_STR_CONCAT','%SQL_FN_STR_DIFFERENCE','%SQL_FN_STR_INSERT','%SQL_FN_STR_LCASE','%SQL_FN_STR_LEFT','%SQL_FN_STR_LENGTH','%SQL_FN_STR_LOCATE', + '%SQL_FN_STR_LOCATE_2','%SQL_FN_STR_LTRIM','%SQL_FN_STR_OCTET_LENGTH','%SQL_FN_STR_POSITION','%SQL_FN_STR_REPEAT','%SQL_FN_STR_REPLACE','%SQL_FN_STR_RIGHT','%SQL_FN_STR_RTRIM', + '%SQL_FN_STR_SOUNDEX','%SQL_FN_STR_SPACE','%SQL_FN_STR_SUBSTRING','%SQL_FN_STR_UCASE','%SQL_FN_SYS_DBNAME','%SQL_FN_SYS_IFNULL','%SQL_FN_SYS_USERNAME','%SQL_FN_TD_CURDATE', + '%SQL_FN_TD_CURRENT_DATE','%SQL_FN_TD_CURRENT_TIME','%SQL_FN_TD_CURRENT_TIMESTAMP','%SQL_FN_TD_CURTIME','%SQL_FN_TD_DAYNAME','%SQL_FN_TD_DAYOFMONTH','%SQL_FN_TD_DAYOFWEEK','%SQL_FN_TD_DAYOFYEAR', + '%SQL_FN_TD_EXTRACT','%SQL_FN_TD_HOUR','%SQL_FN_TD_MINUTE','%SQL_FN_TD_MONTH','%SQL_FN_TD_MONTHNAME','%SQL_FN_TD_NOW','%SQL_FN_TD_QUARTER','%SQL_FN_TD_SECOND', + '%SQL_FN_TD_TIMESTAMPADD','%SQL_FN_TD_TIMESTAMPDIFF','%SQL_FN_TD_WEEK','%SQL_FN_TD_YEAR','%SQL_FN_TSI_DAY','%SQL_FN_TSI_FRAC_SECOND','%SQL_FN_TSI_HOUR','%SQL_FN_TSI_MINUTE', + '%SQL_FN_TSI_MONTH','%SQL_FN_TSI_QUARTER','%SQL_FN_TSI_SECOND','%SQL_FN_TSI_WEEK','%SQL_FN_TSI_YEAR','%SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1','%SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2','%SQL_GB_COLLATE', + '%SQL_GB_GROUP_BY_CONTAINS_SELECT','%SQL_GB_GROUP_BY_EQUALS_SELECT','%SQL_GB_NOT_SUPPORTED','%SQL_GB_NO_RELATION','%SQL_GD_ANY_COLUMN','%SQL_GD_ANY_ORDER','%SQL_GD_BLOCK','%SQL_GD_BOUND', + '%SQL_GETDATA_EXTENSIONS','%SQL_GET_BOOKMARK','%SQL_GROUP_BY','%SQL_GUID','%SQL_HANDLE_DBC','%SQL_HANDLE_DESC','%SQL_HANDLE_ENV','%SQL_HANDLE_SENV', + '%SQL_HANDLE_STMT','%SQL_HOUR','%SQL_HOUR_TO_MINUTE','%SQL_HOUR_TO_SECOND','%SQL_IC_LOWER','%SQL_IC_MIXED','%SQL_IC_SENSITIVE','%SQL_IC_UPPER', + '%SQL_IDENTIFIER_CASE','%SQL_IDENTIFIER_QUOTE_CHAR','%SQL_IGNORE','%SQL_IK_ALL','%SQL_IK_ASC','%SQL_IK_DESC','%SQL_IK_NONE','%SQL_INDEX_ALL', + '%SQL_INDEX_CLUSTERED','%SQL_INDEX_HASHED','%SQL_INDEX_KEYWORDS','%SQL_INDEX_OTHER','%SQL_INDEX_UNIQUE','%SQL_INFO_FIRST','%SQL_INFO_SCHEMA_VIEWS','%SQL_INITIALLY_DEFERRED', + '%SQL_INITIALLY_IMMEDIATE','%SQL_INSENSITIVE','%SQL_INSERT_STATEMENT','%SQL_INTEGER','%SQL_INTEGRITY','%SQL_INTERVAL','%SQL_INTERVAL_DAY','%SQL_INTERVAL_DAY_TO_HOUR', + '%SQL_INTERVAL_DAY_TO_MINUTE','%SQL_INTERVAL_DAY_TO_SECOND','%SQL_INTERVAL_HOUR','%SQL_INTERVAL_HOUR_TO_MINUTE','%SQL_INTERVAL_HOUR_TO_SECOND','%SQL_INTERVAL_MINUTE','%SQL_INTERVAL_MINUTE_TO_SECOND','%SQL_INTERVAL_MONTH', + '%SQL_INTERVAL_SECOND','%SQL_INTERVAL_YEAR','%SQL_INTERVAL_YEAR_TO_MONTH','%SQL_INVALID_HANDLE','%SQL_ISV_ASSERTIONS','%SQL_ISV_CHARACTER_SETS','%SQL_ISV_CHECK_CONSTRAINTS','%SQL_ISV_COLLATIONS', + '%SQL_ISV_COLUMNS','%SQL_ISV_COLUMN_DOMAIN_USAGE','%SQL_ISV_COLUMN_PRIVILEGES','%SQL_ISV_CONSTRAINT_COLUMN_USAGE','%SQL_ISV_CONSTRAINT_TABLE_USAGE','%SQL_ISV_DOMAINS','%SQL_ISV_DOMAIN_CONSTRAINTS','%SQL_ISV_KEY_COLUMN_USAGE', + '%SQL_ISV_REFERENTIAL_CONSTRAINTS','%SQL_ISV_SCHEMATA','%SQL_ISV_SQL_LANGUAGES','%SQL_ISV_TABLES','%SQL_ISV_TABLE_CONSTRAINTS','%SQL_ISV_TABLE_PRIVILEGES','%SQL_ISV_TRANSLATIONS','%SQL_ISV_USAGE_PRIVILEGES', + '%SQL_ISV_VIEWS','%SQL_ISV_VIEW_COLUMN_USAGE','%SQL_ISV_VIEW_TABLE_USAGE','%SQL_IS_DAY','%SQL_IS_DAY_TO_HOUR','%SQL_IS_DAY_TO_MINUTE','%SQL_IS_DAY_TO_SECOND','%SQL_IS_HOUR', + '%SQL_IS_HOUR_TO_MINUTE','%SQL_IS_HOUR_TO_SECOND','%SQL_IS_INSERT_LITERALS','%SQL_IS_INSERT_SEARCHED','%SQL_IS_INTEGER','%SQL_IS_MINUTE','%SQL_IS_MINUTE_TO_SECOND','%SQL_IS_MONTH', + '%SQL_IS_POINTER','%SQL_IS_SECOND','%SQL_IS_SELECT_INTO','%SQL_IS_SMALLINT','%SQL_IS_UINTEGER','%SQL_IS_USMALLINT','%SQL_IS_YEAR','%SQL_IS_YEAR_TO_MONTH', + '%SQL_KEYSET_CURSOR_ATTRIBUTES1','%SQL_KEYSET_CURSOR_ATTRIBUTES2','%SQL_KEYSET_SIZE','%SQL_KEYSET_SIZE_DEFAULT','%SQL_KEYWORDS','%SQL_LCK_EXCLUSIVE','%SQL_LCK_NO_CHANGE','%SQL_LCK_UNLOCK', + '%SQL_LEN_BINARY_ATTR_OFFSET','%SQL_LEN_DATA_AT_EXEC_OFFSET','%SQL_LIKE_ESCAPE_CLAUSE','%SQL_LIKE_ONLY','%SQL_LOCK_EXCLUSIVE','%SQL_LOCK_NO_CHANGE','%SQL_LOCK_TYPES','%SQL_LOCK_UNLOCK', + '%SQL_LOGIN_TIMEOUT','%SQL_LOGIN_TIMEOUT_DEFAULT','%SQL_LONGVARBINARY','%SQL_LONGVARCHAR','%SQL_MAXIMUM_CATALOG_NAME_LENGTH','%SQL_MAXIMUM_COLUMNS_IN_GROUP_BY','%SQL_MAXIMUM_COLUMNS_IN_INDEX','%SQL_MAXIMUM_COLUMNS_IN_ORDER_BY', + '%SQL_MAXIMUM_COLUMNS_IN_SELECT','%SQL_MAXIMUM_COLUMN_NAME_LENGTH','%SQL_MAXIMUM_CONCURRENT_ACTIVITIES','%SQL_MAXIMUM_CURSOR_NAME_LENGTH','%SQL_MAXIMUM_DRIVER_CONNECTIONS','%SQL_MAXIMUM_IDENTIFIER_LENGTH','%SQL_MAXIMUM_INDEX_SIZE','%SQL_MAXIMUM_ROW_SIZE', + '%SQL_MAXIMUM_SCHEMA_NAME_LENGTH','%SQL_MAXIMUM_STATEMENT_LENGTH','%SQL_MAXIMUM_TABLES_IN_SELECT','%SQL_MAXIMUM_USER_NAME_LENGTH','%SQL_MAX_ASYNC_CONCURRENT_STATEMENTS','%SQL_MAX_BINARY_LITERAL_LEN','%SQL_MAX_CATALOG_NAME_LEN','%SQL_MAX_CHAR_LITERAL_LEN', + '%SQL_MAX_COLUMNS_IN_GROUP_BY','%SQL_MAX_COLUMNS_IN_INDEX','%SQL_MAX_COLUMNS_IN_ORDER_BY','%SQL_MAX_COLUMNS_IN_SELECT','%SQL_MAX_COLUMNS_IN_TABLE','%SQL_MAX_COLUMN_NAME_LEN','%SQL_MAX_CONCURRENT_ACTIVITIES','%SQL_MAX_CURSOR_NAME_LEN', + '%SQL_MAX_DRIVER_CONNECTIONS','%SQL_MAX_DSN_LENGTH','%SQL_MAX_IDENTIFIER_LEN','%SQL_MAX_INDEX_SIZE','%SQL_MAX_LENGTH','%SQL_MAX_LENGTH_DEFAULT','%SQL_MAX_MESSAGE_LENGTH','%SQL_MAX_NUMERIC_LEN', + '%SQL_MAX_OPTION_STRING_LENGTH','%SQL_MAX_OWNER_NAME_LEN','%SQL_MAX_PROCEDURE_NAME_LEN','%SQL_MAX_QUALIFIER_NAME_LEN','%SQL_MAX_ROWS','%SQL_MAX_ROWS_DEFAULT','%SQL_MAX_ROW_SIZE','%SQL_MAX_ROW_SIZE_INCLUDES_LONG', + '%SQL_MAX_SCHEMA_NAME_LEN','%SQL_MAX_STATEMENT_LEN','%SQL_MAX_TABLES_IN_SELECT','%SQL_MAX_TABLE_NAME_LEN','%SQL_MAX_USER_NAME_LEN','%SQL_MINUTE','%SQL_MINUTE_TO_SECOND','%SQL_MODE_DEFAULT', + '%SQL_MODE_READ_ONLY','%SQL_MODE_READ_WRITE','%SQL_MONTH','%SQL_MULTIPLE_ACTIVE_TXN','%SQL_MULT_RESULT_SETS','%SQL_NAMED','%SQL_NC_END','%SQL_NC_HIGH', + '%SQL_NC_LOW','%SQL_NC_START','%SQL_NEED_DATA','%SQL_NEED_LONG_DATA_LEN','%SQL_NNC_NON_NULL','%SQL_NNC_NULL','%SQL_NONSCROLLABLE','%SQL_NON_NULLABLE_COLUMNS', + '%SQL_NOSCAN','%SQL_NOSCAN_DEFAULT','%SQL_NOSCAN_OFF','%SQL_NOSCAN_ON','%SQL_NOT_DEFERRABLE','%SQL_NO_ACTION','%SQL_NO_COLUMN_NUMBER','%SQL_NO_DATA', + '%SQL_NO_DATA_FOUND','%SQL_NO_NULLS','%SQL_NO_ROW_NUMBER','%SQL_NO_TOTAL','%SQL_NTS','%SQL_NTSL','%SQL_NULLABLE','%SQL_NULLABLE_UNKNOWN', + '%SQL_NULL_COLLATION','%SQL_NULL_DATA','%SQL_NULL_HANDLE','%SQL_NULL_HDBC','%SQL_NULL_HDESC','%SQL_NULL_HENV','%SQL_NULL_HSTMT','%SQL_NUMERIC', + '%SQL_NUMERIC_FUNCTIONS','%SQL_OAC_LEVEL1','%SQL_OAC_LEVEL2','%SQL_OAC_NONE','%SQL_ODBC_API_CONFORMANCE','%SQL_ODBC_CURSORS','%SQL_ODBC_INTERFACE_CONFORMANCE','%SQL_ODBC_SAG_CLI_CONFORMANCE', + '%SQL_ODBC_SQL_CONFORMANCE','%SQL_ODBC_SQL_OPT_IEF','%SQL_ODBC_VER','%SQL_OIC_CORE','%SQL_OIC_LEVEL1','%SQL_OIC_LEVEL2','%SQL_OJ_ALL_COMPARISON_OPS','%SQL_OJ_CAPABILITIES', + '%SQL_OJ_FULL','%SQL_OJ_INNER','%SQL_OJ_LEFT','%SQL_OJ_NESTED','%SQL_OJ_NOT_ORDERED','%SQL_OJ_RIGHT','%SQL_OPT_TRACE','%SQL_OPT_TRACEFILE', + '%SQL_OPT_TRACE_DEFAULT','%SQL_OPT_TRACE_OFF','%SQL_OPT_TRACE_ON','%SQL_ORDER_BY_COLUMNS_IN_SELECT','%SQL_OSCC_COMPLIANT','%SQL_OSCC_NOT_COMPLIANT','%SQL_OSC_CORE','%SQL_OSC_EXTENDED', + '%SQL_OSC_MINIMUM','%SQL_OUTER_JOINS','%SQL_OUTER_JOIN_CAPABILITIES','%SQL_OU_DML_STATEMENTS','%SQL_OU_INDEX_DEFINITION','%SQL_OU_PRIVILEGE_DEFINITION','%SQL_OU_PROCEDURE_INVOCATION','%SQL_OU_TABLE_DEFINITION', + '%SQL_OV_ODBC2','%SQL_OV_ODBC3','%SQL_OWNER_TERM','%SQL_OWNER_USAGE','%SQL_PACKET_SIZE','%SQL_PARAM_ARRAY_ROW_COUNTS','%SQL_PARAM_ARRAY_SELECTS','%SQL_PARAM_BIND_BY_COLUMN', + '%SQL_PARAM_BIND_TYPE_DEFAULT','%SQL_PARAM_DIAG_UNAVAILABLE','%SQL_PARAM_ERROR','%SQL_PARAM_IGNORE','%SQL_PARAM_INPUT','%SQL_PARAM_INPUT_OUTPUT','%SQL_PARAM_OUTPUT','%SQL_PARAM_PROCEED', + '%SQL_PARAM_SUCCESS','%SQL_PARAM_SUCCESS_WITH_INFO','%SQL_PARAM_TYPE_DEFAULT','%SQL_PARAM_TYPE_UNKNOWN','%SQL_PARAM_UNUSED','%SQL_PARC_BATCH','%SQL_PARC_NO_BATCH','%SQL_PAS_BATCH', + '%SQL_PAS_NO_BATCH','%SQL_PAS_NO_SELECT','%SQL_PC_NON_PSEUDO','%SQL_PC_NOT_PSEUDO','%SQL_PC_PSEUDO','%SQL_PC_UNKNOWN','%SQL_POSITION','%SQL_POSITIONED_STATEMENTS', + '%SQL_POS_ADD','%SQL_POS_DELETE','%SQL_POS_OPERATIONS','%SQL_POS_POSITION','%SQL_POS_REFRESH','%SQL_POS_UPDATE','%SQL_PRED_BASIC','%SQL_PRED_CHAR', + '%SQL_PRED_NONE','%SQL_PRED_SEARCHABLE','%SQL_PROCEDURES','%SQL_PROCEDURE_TERM','%SQL_PS_POSITIONED_DELETE','%SQL_PS_POSITIONED_UPDATE','%SQL_PS_SELECT_FOR_UPDATE','%SQL_PT_FUNCTION', + '%SQL_PT_PROCEDURE','%SQL_PT_UNKNOWN','%SQL_QL_END','%SQL_QL_START','%SQL_QUALIFIER_LOCATION','%SQL_QUALIFIER_NAME_SEPARATOR','%SQL_QUALIFIER_TERM','%SQL_QUALIFIER_USAGE', + '%SQL_QUERY_TIMEOUT','%SQL_QUERY_TIMEOUT_DEFAULT','%SQL_QUICK','%SQL_QUIET_MODE','%SQL_QUOTED_IDENTIFIER_CASE','%SQL_QU_DML_STATEMENTS','%SQL_QU_INDEX_DEFINITION','%SQL_QU_PRIVILEGE_DEFINITION', + '%SQL_QU_PROCEDURE_INVOCATION','%SQL_QU_TABLE_DEFINITION','%SQL_RD_DEFAULT','%SQL_RD_OFF','%SQL_RD_ON','%SQL_REAL','%SQL_REFRESH','%SQL_RESET_PARAMS', + '%SQL_RESTRICT','%SQL_RESULT_COL','%SQL_RETRIEVE_DATA','%SQL_RETURN_VALUE','%SQL_ROLLBACK','%SQL_ROWSET_SIZE','%SQL_ROWSET_SIZE_DEFAULT','%SQL_ROWVER', + '%SQL_ROW_ADDED','%SQL_ROW_DELETED','%SQL_ROW_ERROR','%SQL_ROW_IDENTIFIER','%SQL_ROW_IGNORE','%SQL_ROW_NOROW','%SQL_ROW_NUMBER','%SQL_ROW_NUMBER_UNKNOWN', + '%SQL_ROW_PROCEED','%SQL_ROW_SUCCESS','%SQL_ROW_SUCCESS_WITH_INFO','%SQL_ROW_UPDATED','%SQL_ROW_UPDATES','%SQL_SCCO_LOCK','%SQL_SCCO_OPT_ROWVER','%SQL_SCCO_OPT_TIMESTAMP', + '%SQL_SCCO_OPT_VALUES','%SQL_SCCO_READ_ONLY','%SQL_SCC_ISO92_CLI','%SQL_SCC_XOPEN_CLI_VERSION1','%SQL_SCHEMA_TERM','%SQL_SCHEMA_USAGE','%SQL_SCOPE_CURROW','%SQL_SCOPE_SESSION', + '%SQL_SCOPE_TRANSACTION','%SQL_SCROLLABLE','%SQL_SCROLL_CONCURRENCY','%SQL_SCROLL_DYNAMIC','%SQL_SCROLL_FORWARD_ONLY','%SQL_SCROLL_KEYSET_DRIVEN','%SQL_SCROLL_OPTIONS','%SQL_SCROLL_STATIC', + '%SQL_SC_FIPS127_2_TRANSITIONAL','%SQL_SC_NON_UNIQUE','%SQL_SC_SQL92_ENTRY','%SQL_SC_SQL92_FULL','%SQL_SC_SQL92_INTERMEDIATE','%SQL_SC_TRY_UNIQUE','%SQL_SC_UNIQUE','%SQL_SDF_CURRENT_DATE', + '%SQL_SDF_CURRENT_TIME','%SQL_SDF_CURRENT_TIMESTAMP','%SQL_SEARCHABLE','%SQL_SEARCH_PATTERN_ESCAPE','%SQL_SECOND','%SQL_SENSITIVE','%SQL_SERVER_NAME','%SQL_SETPARAM_VALUE_MAX', + '%SQL_SETPOS_MAX_LOCK_VALUE','%SQL_SETPOS_MAX_OPTION_VALUE','%SQL_SET_DEFAULT','%SQL_SET_NULL','%SQL_SFKD_CASCADE','%SQL_SFKD_NO_ACTION','%SQL_SFKD_SET_DEFAULT','%SQL_SFKD_SET_NULL', + '%SQL_SFKU_CASCADE','%SQL_SFKU_NO_ACTION','%SQL_SFKU_SET_DEFAULT','%SQL_SFKU_SET_NULL','%SQL_SG_DELETE_TABLE','%SQL_SG_INSERT_COLUMN','%SQL_SG_INSERT_TABLE','%SQL_SG_REFERENCES_COLUMN', + '%SQL_SG_REFERENCES_TABLE','%SQL_SG_SELECT_TABLE','%SQL_SG_UPDATE_COLUMN','%SQL_SG_UPDATE_TABLE','%SQL_SG_USAGE_ON_CHARACTER_SET','%SQL_SG_USAGE_ON_COLLATION','%SQL_SG_USAGE_ON_DOMAIN','%SQL_SG_USAGE_ON_TRANSLATION', + '%SQL_SG_WITH_GRANT_OPTION','%SQL_SIGNED_OFFSET','%SQL_SIMULATE_CURSOR','%SQL_SMALLINT','%SQL_SNVF_BIT_LENGTH','%SQL_SNVF_CHARACTER_LENGTH','%SQL_SNVF_CHAR_LENGTH','%SQL_SNVF_EXTRACT', + '%SQL_SNVF_OCTET_LENGTH','%SQL_SNVF_POSITION','%SQL_SO_DYNAMIC','%SQL_SO_FORWARD_ONLY','%SQL_SO_KEYSET_DRIVEN','%SQL_SO_MIXED','%SQL_SO_STATIC','%SQL_SPECIAL_CHARACTERS', + '%SQL_SPEC_MAJOR','%SQL_SPEC_MINOR','%SQL_SP_BETWEEN','%SQL_SP_COMPARISON','%SQL_SP_EXISTS','%SQL_SP_IN','%SQL_SP_ISNOTNULL','%SQL_SP_ISNULL', + '%SQL_SP_LIKE','%SQL_SP_MATCH_FULL','%SQL_SP_MATCH_PARTIAL','%SQL_SP_MATCH_UNIQUE_FULL','%SQL_SP_MATCH_UNIQUE_PARTIAL','%SQL_SP_OVERLAPS','%SQL_SP_QUANTIFIED_COMPARISON','%SQL_SP_UNIQUE', + '%SQL_SQL92_DATETIME_FUNCTIONS','%SQL_SQL92_FOREIGN_KEY_DELETE_RULE','%SQL_SQL92_FOREIGN_KEY_UPDATE_RULE','%SQL_SQL92_GRANT','%SQL_SQL92_NUMERIC_VALUE_FUNCTIONS','%SQL_SQL92_PREDICATES','%SQL_SQL92_RELATIONAL_JOIN_OPERATORS','%SQL_SQL92_REVOKE', + '%SQL_SQL92_ROW_VALUE_CONSTRUCTOR','%SQL_SQL92_STRING_FUNCTIONS','%SQL_SQL92_VALUE_EXPRESSIONS','%SQL_SQLSTATE_SIZE','%SQL_SQL_CONFORMANCE','%SQL_SQ_COMPARISON','%SQL_SQ_CORRELATED_SUBQUERIES','%SQL_SQ_EXISTS', + '%SQL_SQ_IN','%SQL_SQ_QUANTIFIED','%SQL_SRJO_CORRESPONDING_CLAUSE','%SQL_SRJO_CROSS_JOIN','%SQL_SRJO_EXCEPT_JOIN','%SQL_SRJO_FULL_OUTER_JOIN','%SQL_SRJO_INNER_JOIN','%SQL_SRJO_INTERSECT_JOIN', + '%SQL_SRJO_LEFT_OUTER_JOIN','%SQL_SRJO_NATURAL_JOIN','%SQL_SRJO_RIGHT_OUTER_JOIN','%SQL_SRJO_UNION_JOIN','%SQL_SRVC_DEFAULT','%SQL_SRVC_NULL','%SQL_SRVC_ROW_SUBQUERY','%SQL_SRVC_VALUE_EXPRESSION', + '%SQL_SR_CASCADE','%SQL_SR_DELETE_TABLE','%SQL_SR_GRANT_OPTION_FOR','%SQL_SR_INSERT_COLUMN','%SQL_SR_INSERT_TABLE','%SQL_SR_REFERENCES_COLUMN','%SQL_SR_REFERENCES_TABLE','%SQL_SR_RESTRICT', + '%SQL_SR_SELECT_TABLE','%SQL_SR_UPDATE_COLUMN','%SQL_SR_UPDATE_TABLE','%SQL_SR_USAGE_ON_CHARACTER_SET','%SQL_SR_USAGE_ON_COLLATION','%SQL_SR_USAGE_ON_DOMAIN','%SQL_SR_USAGE_ON_TRANSLATION','%SQL_SSF_CONVERT', + '%SQL_SSF_LOWER','%SQL_SSF_SUBSTRING','%SQL_SSF_TRANSLATE','%SQL_SSF_TRIM_BOTH','%SQL_SSF_TRIM_LEADING','%SQL_SSF_TRIM_TRAILING','%SQL_SSF_UPPER','%SQL_SS_ADDITIONS', + '%SQL_SS_DELETIONS','%SQL_SS_UPDATES','%SQL_STANDARD_CLI_CONFORMANCE','%SQL_STATIC_CURSOR_ATTRIBUTES1','%SQL_STATIC_CURSOR_ATTRIBUTES2','%SQL_STATIC_SENSITIVITY','%SQL_STILL_EXECUTING','%SQL_STRING_FUNCTIONS', + '%SQL_SUBQUERIES','%SQL_SUCCESS','%SQL_SUCCESS_WITH_INFO','%SQL_SU_DML_STATEMENTS','%SQL_SU_INDEX_DEFINITION','%SQL_SU_PRIVILEGE_DEFINITION','%SQL_SU_PROCEDURE_INVOCATION','%SQL_SU_TABLE_DEFINITION', + '%SQL_SVE_CASE','%SQL_SVE_CAST','%SQL_SVE_COALESCE','%SQL_SVE_NULLIF','%SQL_SYSTEM_FUNCTIONS','%SQL_TABLE_STAT','%SQL_TABLE_TERM','%SQL_TC_ALL', + '%SQL_TC_DDL_COMMIT','%SQL_TC_DDL_IGNORE','%SQL_TC_DML','%SQL_TC_NONE','%SQL_TIME','%SQL_TIMEDATE_ADD_INTERVALS','%SQL_TIMEDATE_DIFF_INTERVALS','%SQL_TIMEDATE_FUNCTIONS', + '%SQL_TIMESTAMP','%SQL_TIMESTAMP_LEN','%SQL_TIME_LEN','%SQL_TINYINT','%SQL_TRANSACTION_CAPABLE','%SQL_TRANSACTION_ISOLATION_OPTION','%SQL_TRANSACTION_READ_COMMITTED','%SQL_TRANSACTION_READ_UNCOMMITTED', + '%SQL_TRANSACTION_REPEATABLE_READ','%SQL_TRANSACTION_SERIALIZABLE','%SQL_TRANSLATE_DLL','%SQL_TRANSLATE_OPTION','%SQL_TRUE','%SQL_TXN_CAPABLE','%SQL_TXN_ISOLATION','%SQL_TXN_ISOLATION_OPTION', + '%SQL_TXN_READ_COMMITTED','%SQL_TXN_READ_UNCOMMITTED','%SQL_TXN_REPEATABLE_READ','%SQL_TXN_SERIALIZABLE','%SQL_TYPE_DATE','%SQL_TYPE_NULL','%SQL_TYPE_TIME','%SQL_TYPE_TIMESTAMP', + '%SQL_UB_DEFAULT','%SQL_UB_FIXED','%SQL_UB_OFF','%SQL_UB_ON','%SQL_UB_VARIABLE','%SQL_UNBIND','%SQL_UNICODE','%SQL_UNICODE_CHAR', + '%SQL_UNICODE_LONGVARCHAR','%SQL_UNICODE_VARCHAR','%SQL_UNION','%SQL_UNION_STATEMENT','%SQL_UNKNOWN_TYPE','%SQL_UNNAMED','%SQL_UNSEARCHABLE','%SQL_UNSIGNED_OFFSET', + '%SQL_UNSPECIFIED','%SQL_UPDATE','%SQL_UPDATE_BY_BOOKMARK','%SQL_USER_NAME','%SQL_USE_BOOKMARKS','%SQL_US_UNION','%SQL_US_UNION_ALL','%SQL_U_UNION', + '%SQL_U_UNION_ALL','%SQL_VARBINARY','%SQL_VARCHAR','%SQL_XOPEN_CLI_YEAR','%SQL_YEAR','%SQL_YEAR_TO_MONTH','%SRCCOPY','%SS_BITMAP', + '%SS_BLACKFRAME','%SS_BLACKRECT','%SS_CENTER','%SS_CENTERIMAGE','%SS_ENDELLIPSIS','%SS_ETCHEDFRAME','%SS_ETCHEDHORZ','%SS_ETCHEDVERT', + '%SS_GRAYFRAME','%SS_GRAYRECT','%SS_LEFT','%SS_NOPREFIX','%SS_NOTIFY','%SS_NOWORDWRAP','%SS_PATHELLIPSIS','%SS_RIGHT', + '%SS_RIGHTJUST','%SS_SIMPLE','%SS_SUNKEN','%SS_WHITEFRAME','%SS_WHITERECT','%SS_WORDELLIPSIS','%STAT_FILL_FROM_MEMORY','%STAT_FILL_NATURAL', + '%STAT_FILL_NATURAL_ERASTONE','%STAT_FILL_NATURAL_EVEN','%STAT_FILL_NATURAL_FIBONACCI','%STAT_FILL_NATURAL_ODD','%STAT_FILL_WITH_NUMBER','%STAT_MINMAX_INDEX','%STAT_MINMAX_VALUE','%STAT_TYPE_BYTE', + '%STAT_TYPE_CURRENCY','%STAT_TYPE_DOUBLE','%STAT_TYPE_DWORD','%STAT_TYPE_EXT','%STAT_TYPE_INTEGER','%STAT_TYPE_LONG','%STAT_TYPE_QUAD','%STAT_TYPE_SINGLE', + '%STAT_TYPE_WORD','%SWP_ASYNCWINDOWPOS','%SWP_DEFERERASE','%SWP_DRAWFRAME','%SWP_FRAMECHANGED','%SWP_HIDEWINDOW','%SWP_NOACTIVATE','%SWP_NOCOPYBITS', + '%SWP_NOMOVE','%SWP_NOOWNERZORDER','%SWP_NOREDRAW','%SWP_NOREPOSITION','%SWP_NOSENDCHANGING','%SWP_NOSIZE','%SWP_NOZORDER','%SWP_SHOWWINDOW', + '%SW_FORCEMINIMIZE','%SW_HIDE','%SW_MAXIMIZE','%SW_MINIMIZE','%SW_NORMAL','%SW_RESTORE','%SW_SHOW','%SW_SHOWDEFAULT', + '%SW_SHOWMAXIMIZED','%SW_SHOWMINIMIZED','%SW_SHOWMINNOACTIVE','%SW_SHOWNA','%SW_SHOWNOACTIVATE','%SW_SHOWNORMAL','%TBASS_3DALG_DEFAULT','%TBASS_3DALG_FULL', + '%TBASS_3DALG_LIGHT','%TBASS_3DALG_OFF','%TBASS_3DMODE_NORMAL','%TBASS_3DMODE_OFF','%TBASS_3DMODE_RELATIVE','%TBASS_ACTIVE_PAUSED','%TBASS_ACTIVE_PLAYING','%TBASS_ACTIVE_STALLED', + '%TBASS_ACTIVE_STOPPED','%TBASS_CONFIG_3DALGORITHM','%TBASS_CONFIG_BUFFER','%TBASS_CONFIG_CURVE_PAN','%TBASS_CONFIG_CURVE_VOL','%TBASS_CONFIG_FLOATDSP','%TBASS_CONFIG_GVOL_MUSIC','%TBASS_CONFIG_GVOL_SAMPLE', + '%TBASS_CONFIG_GVOL_STREAM','%TBASS_CONFIG_MAXVOL','%TBASS_CONFIG_MP3_CODEC','%TBASS_CONFIG_NET_AGENT','%TBASS_CONFIG_NET_BUFFER','%TBASS_CONFIG_NET_PASSIVE','%TBASS_CONFIG_NET_PREBUF','%TBASS_CONFIG_NET_PROXY', + '%TBASS_CONFIG_NET_TIMEOUT','%TBASS_CONFIG_PAUSE_NOPLAY','%TBASS_CONFIG_UPDATEPERIOD','%TBASS_CTYPE_MUSIC_IT','%TBASS_CTYPE_MUSIC_MO3','%TBASS_CTYPE_MUSIC_MOD','%TBASS_CTYPE_MUSIC_MTM','%TBASS_CTYPE_MUSIC_S3M', + '%TBASS_CTYPE_MUSIC_XM','%TBASS_CTYPE_RECORD','%TBASS_CTYPE_SAMPLE','%TBASS_CTYPE_STREAM','%TBASS_CTYPE_STREAM_AIFF','%TBASS_CTYPE_STREAM_MP1','%TBASS_CTYPE_STREAM_MP2','%TBASS_CTYPE_STREAM_MP3', + '%TBASS_CTYPE_STREAM_OGG','%TBASS_CTYPE_STREAM_WAV','%TBASS_CTYPE_STREAM_WAV_FLOAT','%TBASS_CTYPE_STREAM_WAV_PCM','%TBASS_DATA_AVAILABLE','%TBASS_DATA_FFT1024','%TBASS_DATA_FFT2048','%TBASS_DATA_FFT4096', + '%TBASS_DATA_FFT512','%TBASS_DATA_FFT_INDIVIDUAL','%TBASS_DATA_FFT_NOWINDOW','%TBASS_DATA_FLOAT','%TBASS_DEVICE_3D','%TBASS_DEVICE_8BITS','%TBASS_DEVICE_LATENCY','%TBASS_DEVICE_MONO', + '%TBASS_DEVICE_NOSPEAKER','%TBASS_DEVICE_SPEAKERS','%TBASS_EAX_ENVIRONMENT_ALLEY','%TBASS_EAX_ENVIRONMENT_ARENA','%TBASS_EAX_ENVIRONMENT_AUDITORIUM','%TBASS_EAX_ENVIRONMENT_BATHROOM','%TBASS_EAX_ENVIRONMENT_CARPETEDHALLWAY','%TBASS_EAX_ENVIRONMENT_CAVE', + '%TBASS_EAX_ENVIRONMENT_CITY','%TBASS_EAX_ENVIRONMENT_CONCERTHALL','%TBASS_EAX_ENVIRONMENT_COUNT','%TBASS_EAX_ENVIRONMENT_DIZZY','%TBASS_EAX_ENVIRONMENT_DRUGGED','%TBASS_EAX_ENVIRONMENT_FOREST','%TBASS_EAX_ENVIRONMENT_GENERIC','%TBASS_EAX_ENVIRONMENT_HALLWAY', + '%TBASS_EAX_ENVIRONMENT_HANGAR','%TBASS_EAX_ENVIRONMENT_LIVINGROOM','%TBASS_EAX_ENVIRONMENT_MOUNTAINS','%TBASS_EAX_ENVIRONMENT_PADDEDCELL','%TBASS_EAX_ENVIRONMENT_PARKINGLOT','%TBASS_EAX_ENVIRONMENT_PLAIN','%TBASS_EAX_ENVIRONMENT_PSYCHOTIC','%TBASS_EAX_ENVIRONMENT_QUARRY', + '%TBASS_EAX_ENVIRONMENT_ROOM','%TBASS_EAX_ENVIRONMENT_SEWERPIPE','%TBASS_EAX_ENVIRONMENT_STONECORRIDOR','%TBASS_EAX_ENVIRONMENT_STONEROOM','%TBASS_EAX_ENVIRONMENT_UNDERWATER','%TBASS_ERROR_ALREADY','%TBASS_ERROR_BUFLOST','%TBASS_ERROR_CODEC', + '%TBASS_ERROR_CREATE','%TBASS_ERROR_DECODE','%TBASS_ERROR_DEVICE','%TBASS_ERROR_DRIVER','%TBASS_ERROR_DX','%TBASS_ERROR_EMPTY','%TBASS_ERROR_FILEFORM','%TBASS_ERROR_FILEOPEN', + '%TBASS_ERROR_FORMAT','%TBASS_ERROR_FREQ','%TBASS_ERROR_HANDLE','%TBASS_ERROR_ILLPARAM','%TBASS_ERROR_ILLTYPE','%TBASS_ERROR_INIT','%TBASS_ERROR_MEM','%TBASS_ERROR_NO3D', + '%TBASS_ERROR_NOCHAN','%TBASS_ERROR_NOEAX','%TBASS_ERROR_NOFX','%TBASS_ERROR_NOHW','%TBASS_ERROR_NONET','%TBASS_ERROR_NOPAUSE','%TBASS_ERROR_NOPLAY','%TBASS_ERROR_NOTAVAIL', + '%TBASS_ERROR_NOTFILE','%TBASS_ERROR_PLAYING','%TBASS_ERROR_POSITION','%TBASS_ERROR_SPEAKER','%TBASS_ERROR_START','%TBASS_ERROR_TIMEOUT','%TBASS_ERROR_UNKNOWN','%TBASS_ERROR_VERSION', + '%TBASS_FALSE','%TBASS_FILEPOS_CURRENT','%TBASS_FILEPOS_DECODE','%TBASS_FILEPOS_DOWNLOAD','%TBASS_FILEPOS_END','%TBASS_FILEPOS_START','%TBASS_FILE_CLOSE','%TBASS_FILE_LEN', + '%TBASS_FILE_READ','%TBASS_FILE_SEEK','%TBASS_FX_CHORUS','%TBASS_FX_COMPRESSOR','%TBASS_FX_DISTORTION','%TBASS_FX_ECHO','%TBASS_FX_FLANGER','%TBASS_FX_GARGLE', + '%TBASS_FX_I3DL2REVERB','%TBASS_FX_PARAMEQ','%TBASS_FX_PHASE_180','%TBASS_FX_PHASE_90','%TBASS_FX_PHASE_NEG_180','%TBASS_FX_PHASE_NEG_90','%TBASS_FX_PHASE_ZERO','%TBASS_FX_REVERB', + '%TBASS_INPUT_LEVEL','%TBASS_INPUT_OFF','%TBASS_INPUT_ON','%TBASS_INPUT_TYPE_ANALOG','%TBASS_INPUT_TYPE_AUX','%TBASS_INPUT_TYPE_CD','%TBASS_INPUT_TYPE_DIGITAL','%TBASS_INPUT_TYPE_LINE', + '%TBASS_INPUT_TYPE_MASK','%TBASS_INPUT_TYPE_MIC','%TBASS_INPUT_TYPE_PHONE','%TBASS_INPUT_TYPE_SPEAKER','%TBASS_INPUT_TYPE_SYNTH','%TBASS_INPUT_TYPE_UNDEF','%TBASS_INPUT_TYPE_WAVE','%TBASS_MP3_SETPOS', + '%TBASS_MUSIC_3D','%TBASS_MUSIC_ATTRIB_AMPLIFY','%TBASS_MUSIC_ATTRIB_BPM','%TBASS_MUSIC_ATTRIB_PANSEP','%TBASS_MUSIC_ATTRIB_PSCALER','%TBASS_MUSIC_ATTRIB_SPEED','%TBASS_MUSIC_ATTRIB_VOL_CHAN','%TBASS_MUSIC_ATTRIB_VOL_GLOBAL', + '%TBASS_MUSIC_ATTRIB_VOL_INST','%TBASS_MUSIC_AUTOFREE','%TBASS_MUSIC_CALCLEN','%TBASS_MUSIC_DECODE','%TBASS_MUSIC_FLOAT','%TBASS_MUSIC_FT2MOD','%TBASS_MUSIC_FX','%TBASS_MUSIC_LOOP', + '%TBASS_MUSIC_MONO','%TBASS_MUSIC_NONINTER','%TBASS_MUSIC_NOSAMPLE','%TBASS_MUSIC_POSRESET','%TBASS_MUSIC_POSRESETEX','%TBASS_MUSIC_PRESCAN','%TBASS_MUSIC_PT1MOD','%TBASS_MUSIC_RAMP', + '%TBASS_MUSIC_RAMPS','%TBASS_MUSIC_STOPBACK','%TBASS_MUSIC_SURROUND','%TBASS_MUSIC_SURROUND2','%TBASS_OBJECT_DS','%TBASS_OBJECT_DS3DL','%TBASS_OK','%TBASS_RECORD_PAUSE', + '%TBASS_SAMPLE_3D','%TBASS_SAMPLE_8BITS','%TBASS_SAMPLE_FLOAT','%TBASS_SAMPLE_FX','%TBASS_SAMPLE_LOOP','%TBASS_SAMPLE_MONO','%TBASS_SAMPLE_MUTEMAX','%TBASS_SAMPLE_OVER_DIST', + '%TBASS_SAMPLE_OVER_POS','%TBASS_SAMPLE_OVER_VOL','%TBASS_SAMPLE_SOFTWARE','%TBASS_SAMPLE_VAM','%TBASS_SLIDE_FREQ','%TBASS_SLIDE_PAN','%TBASS_SLIDE_VOL','%TBASS_SPEAKER_CENLFE', + '%TBASS_SPEAKER_CENTER','%TBASS_SPEAKER_FRONT','%TBASS_SPEAKER_FRONTLEFT','%TBASS_SPEAKER_FRONTRIGHT','%TBASS_SPEAKER_LEFT','%TBASS_SPEAKER_LFE','%TBASS_SPEAKER_REAR','%TBASS_SPEAKER_REAR2', + '%TBASS_SPEAKER_REAR2LEFT','%TBASS_SPEAKER_REAR2RIGHT','%TBASS_SPEAKER_REARLEFT','%TBASS_SPEAKER_REARRIGHT','%TBASS_SPEAKER_RIGHT','%TBASS_STREAMPROC_END','%TBASS_STREAM_AUTOFREE','%TBASS_STREAM_BLOCK', + '%TBASS_STREAM_DECODE','%TBASS_STREAM_PRESCAN','%TBASS_STREAM_RESTRATE','%TBASS_STREAM_STATUS','%TBASS_SYNC_DOWNLOAD','%TBASS_SYNC_END','%TBASS_SYNC_FREE','%TBASS_SYNC_MESSAGE', + '%TBASS_SYNC_META','%TBASS_SYNC_MIXTIME','%TBASS_SYNC_MUSICFX','%TBASS_SYNC_MUSICINST','%TBASS_SYNC_MUSICPOS','%TBASS_SYNC_ONETIME','%TBASS_SYNC_POS','%TBASS_SYNC_SLIDE', + '%TBASS_SYNC_STALL','%TBASS_TAG_HTTP','%TBASS_TAG_ICY','%TBASS_TAG_ID3','%TBASS_TAG_ID3V2','%TBASS_TAG_META','%TBASS_TAG_MUSIC_INST','%TBASS_TAG_MUSIC_MESSAGE', + '%TBASS_TAG_MUSIC_NAME','%TBASS_TAG_MUSIC_SAMPLE','%TBASS_TAG_OGG','%TBASS_TAG_RIFF_INFO','%TBASS_TAG_VENDOR','%TBASS_TRUE','%TBASS_UNICODE','%TBASS_VAM_HARDWARE', + '%TBASS_VAM_SOFTWARE','%TBASS_VAM_TERM_DIST','%TBASS_VAM_TERM_PRIO','%TBASS_VAM_TERM_TIME','%TBASS_VERSION','%TBCD_CHANNEL','%TBCD_THUMB','%TBCD_TICS', + '%TBGL_ALIGN_CENTER','%TBGL_ALIGN_CENTER_CENTER','%TBGL_ALIGN_CENTER_DOWN','%TBGL_ALIGN_CENTER_UP','%TBGL_ALIGN_LEFT','%TBGL_ALIGN_LEFT_CENTER','%TBGL_ALIGN_LEFT_DOWN','%TBGL_ALIGN_LEFT_UP', + '%TBGL_ALIGN_RIGHT','%TBGL_ALIGN_RIGHT_CENTER','%TBGL_ALIGN_RIGHT_DOWN','%TBGL_ALIGN_RIGHT_UP','%TBGL_ALWAYS','%TBGL_EQUAL','%TBGL_ERROR_FILE','%TBGL_ERROR_MSGBOX', + '%TBGL_ERROR_NONE','%TBGL_GEQUAL','%TBGL_GREATER','%TBGL_LEQUAL','%TBGL_LESS','%TBGL_LIGHT_AMBIENT','%TBGL_LIGHT_CONSTANT_ATTENUATION','%TBGL_LIGHT_DIFFUSE', + '%TBGL_LIGHT_LINEAR_ATTENUATION','%TBGL_LIGHT_POSITION','%TBGL_LIGHT_QUADRATIC_ATTENUATION','%TBGL_LIGHT_SPECULAR','%TBGL_LIGHT_SPOT_CUTOFF','%TBGL_LIGHT_SPOT_DIRECTION','%TBGL_LIGHT_SPOT_EXPONENT','%TBGL_M15B', + '%TBGL_M15G','%TBGL_M15LAYER','%TBGL_M15PSTOP','%TBGL_M15R','%TBGL_M15TEXN','%TBGL_M15TEXX','%TBGL_M15TEXY','%TBGL_M15X', + '%TBGL_M15Y','%TBGL_M15Z','%TBGL_NEVER','%TBGL_NORMAL_NONE','%TBGL_NORMAL_PRECISE','%TBGL_NORMAL_SMOOTH','%TBGL_NOTEQUAL','%TBGL_OBJ_CUBE', + '%TBGL_OBJ_CUBE3','%TBGL_OBJ_CYLINDER','%TBGL_OBJ_SPHERE','%TBGL_PINFO_RGB','%TBGL_PINFO_XYZ','%TBGL_TEX_LINEAR','%TBGL_TEX_MIPMAP','%TBGL_TEX_NEAREST', + '%TBM_CLEARSEL','%TBM_CLEARTICS','%TBM_GETBUDDY','%TBM_GETCHANNELRECT','%TBM_GETLINESIZE','%TBM_GETNUMTICS','%TBM_GETPAGESIZE','%TBM_GETPOS', + '%TBM_GETPTICS','%TBM_GETRANGEMAX','%TBM_GETRANGEMIN','%TBM_GETSELEND','%TBM_GETSELSTART','%TBM_GETTHUMBLENGTH','%TBM_GETTHUMBRECT','%TBM_GETTIC', + '%TBM_GETTICPOS','%TBM_GETTOOLTIPS','%TBM_GETUNICODEFORMAT','%TBM_SETBUDDY','%TBM_SETLINESIZE','%TBM_SETPAGESIZE','%TBM_SETPOS','%TBM_SETRANGE', + '%TBM_SETRANGEMAX','%TBM_SETRANGEMIN','%TBM_SETSEL','%TBM_SETSELEND','%TBM_SETSELSTART','%TBM_SETTHUMBLENGTH','%TBM_SETTIC','%TBM_SETTICFREQ', + '%TBM_SETTIPSIDE','%TBM_SETTOOLTIPS','%TBM_SETUNICODEFORMAT','%TBS_AUTOTICKS','%TBS_BOTH','%TBS_BOTTOM','%TBS_DOWNISLEFT','%TBS_ENABLESELRANGE', + '%TBS_FIXEDLENGTH','%TBS_HORZ','%TBS_LEFT','%TBS_NOTHUMB','%TBS_NOTICKS','%TBS_REVERSED','%TBS_RIGHT','%TBS_TOOLTIPS', + '%TBS_TOP','%TBS_VERT','%TBTS_BOTTOM','%TBTS_LEFT','%TBTS_RIGHT','%TBTS_TOP','%TB_%VT_BSTR','%TB_%VT_CY', + '%TB_%VT_DATE','%TB_%VT_EMPTY','%TB_%VT_I2','%TB_%VT_I4','%TB_%VT_NULL','%TB_%VT_R4','%TB_%VT_R8','%TB_BOTTOM', + '%TB_CLASS_E_NOAGGREGATION','%TB_CO_E_CLASSSTRING','%TB_DISPATCH_METHOD','%TB_DISPATCH_PROPERTYGET','%TB_DISPATCH_PROPERTYPUT','%TB_DISPATCH_PROPERTYPUTREF','%TB_ENDTRACK','%TB_E_INVALIDARG', + '%TB_E_NOINTERFACE','%TB_E_OUTOFMEMORY','%TB_IMGCTX_ACTUALSIZE','%TB_IMGCTX_AUTOSIZE','%TB_IMGCTX_FITTOHEIGHT','%TB_IMGCTX_FITTOWIDTH','%TB_IMGCTX_STRETCH','%TB_LINEDOWN', + '%TB_LINEUP','%TB_MK_E_CONNECTMANUALLY','%TB_MK_E_EXCEEDEDDEADLINE','%TB_MK_E_INTERMEDIATEINTERFACENOTSUPPORTED','%TB_MK_E_NOOBJECT','%TB_MK_E_SYNTAX','%TB_PAGEDOWN','%TB_PAGEUP', + '%TB_REGDB_E_CLASSNOTREG','%TB_REGDB_E_WRITEREGDB','%TB_SIZEOF_TBVARIANT','%TB_S_FALSE','%TB_S_OK','%TB_THUMBPOSITION','%TB_THUMBTRACK','%TB_TOP', + '%TCM_FIRST','%TCM_GETCURSEL','%TCN_FOCUSCHANGE','%TCN_GETOBJECT','%TCN_SELCHANGE','%TCN_SELCHANGING','%TCS_BOTTOM','%TCS_BUTTONS', + '%TCS_EX_FLATSEPARATORS','%TCS_EX_REGISTERDROP','%TCS_FIXEDWIDTH','%TCS_FLATBUTTONS','%TCS_FOCUSNEVER','%TCS_FOCUSONBUTTONDOWN','%TCS_FORCEICONLEFT','%TCS_FORCELABELLEFT', + '%TCS_HOTTRACK','%TCS_MULTILINE','%TCS_MULTISELECT','%TCS_OWNERDRAWFIXED','%TCS_RAGGEDRIGHT','%TCS_RIGHT','%TCS_RIGHTJUSTIFY','%TCS_SCROLLOPPOSITE', + '%TCS_SINGLELINE','%TCS_TABS','%TCS_TOOLTIPS','%TCS_VERTICAL','%TM_PLAINTEXT','%TM_RICHTEXT','%TOKENIZER_DEFAULT_ALPHA','%TOKENIZER_DEFAULT_DELIM', + '%TOKENIZER_DEFAULT_DQUOTE','%TOKENIZER_DEFAULT_NEWLINE','%TOKENIZER_DEFAULT_NUMERIC','%TOKENIZER_DEFAULT_SPACE','%TOKENIZER_DELIMITER','%TOKENIZER_EOL','%TOKENIZER_ERROR','%TOKENIZER_FINISHED', + '%TOKENIZER_NUMBER','%TOKENIZER_QUOTE','%TOKENIZER_STRING','%TOKENIZER_UNDEFTOK','%TRUE','%TV_FIRST','%UDM_GETACCEL','%UDM_GETBASE', + '%UDM_GETBUDDY','%UDM_GETPOS','%UDM_GETPOS32','%UDM_GETRANGE','%UDM_GETRANGE32','%UDM_GETUNICODEFORMAT','%UDM_SETACCEL','%UDM_SETBASE', + '%UDM_SETBUDDY','%UDM_SETPOS','%UDM_SETPOS32','%UDM_SETRANGE','%UDM_SETRANGE32','%UDM_SETUNICODEFORMAT','%UDS_ALIGNLEFT','%UDS_ALIGNRIGHT', + '%UDS_ARROWKEYS','%UDS_AUTOBUDDY','%UDS_HORZ','%UDS_HOTTRACK','%UDS_NOTHOUSANDS','%UDS_SETBUDDYINT','%UDS_WRAP','%UD_MAXVAL', + '%UD_MINVAL','%VK_0','%VK_1','%VK_2','%VK_3','%VK_4','%VK_5','%VK_6', + '%VK_7','%VK_8','%VK_9','%VK_A','%VK_ACCEPT','%VK_ADD','%VK_APPS','%VK_B', + '%VK_BACK','%VK_C','%VK_CANCEL','%VK_CAPITAL','%VK_CLEAR','%VK_CONTROL','%VK_CONVERT','%VK_D', + '%VK_DECIMAL','%VK_DELETE','%VK_DIVIDE','%VK_DOWN','%VK_E','%VK_END','%VK_ESCAPE','%VK_EXECUTE', + '%VK_F','%VK_F1','%VK_F10','%VK_F11','%VK_F12','%VK_F13','%VK_F14','%VK_F15', + '%VK_F16','%VK_F17','%VK_F18','%VK_F19','%VK_F2','%VK_F20','%VK_F21','%VK_F22', + '%VK_F23','%VK_F24','%VK_F3','%VK_F4','%VK_F5','%VK_F6','%VK_F7','%VK_F8', + '%VK_F9','%VK_FINAL','%VK_G','%VK_H','%VK_HANGEUL','%VK_HANGUL','%VK_HANJA','%VK_HELP', + '%VK_HOME','%VK_I','%VK_INSERT','%VK_J','%VK_JUNJA','%VK_K','%VK_KANA','%VK_KANJI', + '%VK_L','%VK_LBUTTON','%VK_LEFT','%VK_LINEFEED','%VK_LWIN','%VK_M','%VK_MBUTTON','%VK_MENU', + '%VK_MODECHANGE','%VK_MULTIPLY','%VK_N','%VK_NEXT','%VK_NONCONVERT','%VK_NUMLOCK','%VK_NUMPAD0','%VK_NUMPAD1', + '%VK_NUMPAD2','%VK_NUMPAD3','%VK_NUMPAD4','%VK_NUMPAD5','%VK_NUMPAD6','%VK_NUMPAD7','%VK_NUMPAD8','%VK_NUMPAD9', + '%VK_O','%VK_P','%VK_PAUSE','%VK_PGDN','%VK_PGUP','%VK_PRINT','%VK_PRIOR','%VK_Q', + '%VK_R','%VK_RBUTTON','%VK_RETURN','%VK_RIGHT','%VK_RWIN','%VK_S','%VK_SCROLL','%VK_SELECT', + '%VK_SEPARATOR','%VK_SHIFT','%VK_SLEEP','%VK_SNAPSHOT','%VK_SPACE','%VK_SUBTRACT','%VK_T','%VK_TAB', + '%VK_U','%VK_UP','%VK_V','%VK_W','%VK_X','%VK_XBUTTON1','%VK_XBUTTON2','%VK_Y', + '%VK_Z','%VT_ARRAY','%VT_BLOB','%VT_BLOB_OBJECT','%VT_BOOL','%VT_BSTR','%VT_BYREF','%VT_CARRAY', + '%VT_CF','%VT_CLSID','%VT_CY','%VT_DATE','%VT_DISPATCH','%VT_EMPTY','%VT_ERROR','%VT_FILETIME', + '%VT_HRESULT','%VT_I1','%VT_I2','%VT_I4','%VT_I8','%VT_INT','%VT_LPSTR','%VT_LPWSTR', + '%VT_NULL','%VT_PTR','%VT_R4','%VT_R8','%VT_RECORD','%VT_RESERVED','%VT_SAFEARRAY','%VT_STORAGE', + '%VT_STORED_OBJECT','%VT_STREAM','%VT_STREAMED_OBJECT','%VT_UI1','%VT_UI2','%VT_UI4','%VT_UI8','%VT_UINT', + '%VT_UNKNOWN','%VT_USERDEFINED','%VT_VARIANT','%VT_VECTOR','%VT_VOID','%WAVE_FORMAT_1M08','%WAVE_FORMAT_1M16','%WAVE_FORMAT_1S08', + '%WAVE_FORMAT_1S16','%WAVE_FORMAT_2M08','%WAVE_FORMAT_2M16','%WAVE_FORMAT_2S08','%WAVE_FORMAT_2S16','%WAVE_FORMAT_4M08','%WAVE_FORMAT_4M16','%WAVE_FORMAT_4S08', + '%WAVE_FORMAT_4S16','%WBF_CUSTOM','%WBF_LEVEL1','%WBF_LEVEL2','%WBF_OVERFLOW','%WBF_WORDBREAK','%WBF_WORDWRAP','%WHITE', + '%WIN_FINDTITLECONTAIN','%WIN_FINDTITLEEND','%WIN_FINDTITLEEQUAL','%WIN_FINDTITLESTART','%WM_ACTIVATE','%WM_ACTIVATEAPP','%WM_CAPTURECHANGED','%WM_CHAR', + '%WM_CLOSE','%WM_COMMAND','%WM_DESTROY','%WM_DROPFILES','%WM_ERASEBKGND','%WM_GETTEXTLENGTH','%WM_HOTKEY','%WM_HSCROLL', + '%WM_IDLE','%WM_INITDIALOG','%WM_KEYDOWN','%WM_KEYUP','%WM_KILLFOCUS','%WM_LBUTTONDBLCLK','%WM_LBUTTONDOWN','%WM_LBUTTONUP', + '%WM_MBUTTONDBLCLK','%WM_MBUTTONDOWN','%WM_MBUTTONUP','%WM_MOUSEFIRST','%WM_MOUSEMOVE','%WM_MOUSEWHEEL','%WM_MOVE','%WM_MOVING', + '%WM_NCLBUTTONDOWN','%WM_NCRBUTTONDOWN','%WM_NEXTDLGCTL','%WM_NOTIFY','%WM_PAINT','%WM_QUIT','%WM_RBUTTONDBLCLK','%WM_RBUTTONDOWN', + '%WM_RBUTTONUP','%WM_SETFOCUS','%WM_SETFONT','%WM_SETTEXT','%WM_SIZE','%WM_SIZING','%WM_SYSCOMMAND','%WM_TIMER', + '%WM_USER','%WM_VSCROLL','%WS_BORDER','%WS_CAPTION','%WS_CHILD','%WS_CLIPCHILDREN','%WS_CLIPSIBLINGS','%WS_DISABLED', + '%WS_DLGFRAME','%WS_EX_ACCEPTFILES','%WS_EX_APPWINDOW','%WS_EX_CLIENTEDGE','%WS_EX_CONTEXTHELP','%WS_EX_CONTROLPARENT','%WS_EX_LAYERED','%WS_EX_LEFT', + '%WS_EX_LEFTSCROLLBAR','%WS_EX_LTRREADING','%WS_EX_MDICHILD','%WS_EX_NOPARENTNOTIFY','%WS_EX_OVERLAPPEDWINDOW','%WS_EX_PALETTEWINDOW','%WS_EX_RIGHT','%WS_EX_RIGHTSCROLLBAR', + '%WS_EX_RTLREADING','%WS_EX_STATICEDGE','%WS_EX_TOOLWINDOW','%WS_EX_TOPMOST','%WS_EX_TRANSPARENT','%WS_EX_WINDOWEDGE','%WS_GROUP','%WS_HSCROLL', + '%WS_ICONIC','%WS_MAXIMIZE','%WS_MAXIMIZEBOX','%WS_MINIMIZE','%WS_MINIMIZEBOX','%WS_OVERLAPPEDWINDOW','%WS_POPUP','%WS_POPUPWINDOW', + '%WS_SYSMENU','%WS_TABSTOP','%WS_THICKFRAME','%WS_VISIBLE','%WS_VSCROLL','%YELLOW','%ZERO','CRLF', + 'FALSE','M_E','M_PI','NULL','TAB','TRUE' + ) + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000FF; font-weight: bold;', + 2 => 'color: #993333; font-style: italic; font-weight: bold;', + 3 => 'color: #000066;', + 4 => 'color: #993333;' + ), + 'COMMENTS' => array( + 1 => 'color: #008000;' + ), + 'BRACKETS' => array( + 0 => 'color: #333333;' + ), + 'STRINGS' => array( + 0 => 'color: #800080;' + ), + 'NUMBERS' => array( + 0 => 'color: #CC0000;' + ), + 'METHODS' => array( + 1 => 'color: #66cc66;' + ), + 'SYMBOLS' => array( + 0 => 'color: #333333;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + 1 => '_' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/tsql.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/tsql.php new file mode 100644 index 0000000..af57a13 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/tsql.php @@ -0,0 +1,382 @@ + 'T-SQL', + 'COMMENT_SINGLE' => array(1 => '--'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + /* + This will be highlighted in blue + */ + + // Datatypes + 'bigint', 'int', 'smallint', 'tinyint', 'bit', 'decimal', 'numeric', 'money', + 'smallmoney', 'float', 'real', 'datetime', 'smalldatetime', 'char', 'varchar', + 'text', 'nchar', 'nvarchar', 'ntext', 'binary', 'varbinary', 'image', 'cursor', + 'sql_variant', 'table', 'timestamp', 'uniqueidentifier', + + // Keywords + 'ABSOLUTE', 'ACTION', 'ADD', 'ADMIN', 'AFTER', 'AGGREGATE', 'ALIAS', 'ALLOCATE', 'ALTER', 'ARE', 'ARRAY', 'AS', + 'ASC', 'ASSERTION', 'AT', 'AUTHORIZATION', 'BACKUP', 'BEFORE', 'BEGIN', 'BINARY', 'BIT', 'BLOB', 'BOOLEAN', 'BOTH', 'BREADTH', + 'BREAK', 'BROWSE', 'BULK', 'BY', 'CALL', 'CASCADE', 'CASCADED', 'CASE', 'CAST', 'CATALOG', 'CHAR', 'CHARACTER', 'CHECK', 'CHECKPOINT', + 'CLASS', 'CLOB', 'CLOSE', 'CLUSTERED', 'COALESCE', 'COLLATE', 'COLLATION', 'COLUMN', 'COMMIT', 'COMPLETION', 'COMPUTE', 'CONNECT', + 'CONNECTION', 'CONSTRAINT', 'CONSTRAINTS', 'CONSTRUCTOR', 'CONTAINS', 'CONTAINSTABLE', 'CONTINUE', 'CONVERT', 'CORRESPONDING', 'CREATE', + 'CUBE', 'CURRENT', 'CURRENT_DATE', 'CURRENT_PATH', 'CURRENT_ROLE', 'CURRENT_TIME', 'CURRENT_TIMESTAMP', 'CURRENT_USER', + 'CURSOR', 'CYCLE', 'DATA', 'DATABASE', 'DATE', 'DAY', 'DBCC', 'DEALLOCATE', 'DEC', 'DECIMAL', 'DECLARE', 'DEFAULT', 'DEFERRABLE', + 'DEFERRED', 'DELETE', 'DENY', 'DEPTH', 'DEREF', 'DESC', 'DESCRIBE', 'DESCRIPTOR', 'DESTROY', 'DESTRUCTOR', 'DETERMINISTIC', + 'DIAGNOSTICS', 'DICTIONARY', 'DISCONNECT', 'DISK', 'DISTINCT', 'DISTRIBUTED', 'DOMAIN', 'DOUBLE', 'DROP', 'DUMMY', 'DUMP', 'DYNAMIC', + 'EACH', 'ELSE', 'END', 'END-EXEC', 'EQUALS', 'ERRLVL', 'ESCAPE', 'EVERY', 'EXCEPT', 'EXCEPTION', 'EXEC', 'EXECUTE', 'EXIT', + 'EXTERNAL', 'FALSE', 'FETCH', 'FILE', 'FILLFACTOR', 'FIRST', 'FLOAT', 'FOR', 'FOREIGN', 'FOUND', 'FREE', 'FREETEXT', 'FREETEXTTABLE', + 'FROM', 'FULL', 'FUNCTION', 'GENERAL', 'GET', 'GLOBAL', 'GOTO', 'GRANT', 'GROUP', 'GROUPING', 'HAVING', 'HOLDLOCK', 'HOST', 'HOUR', + 'IDENTITY', 'IDENTITY_INSERT', 'IDENTITYCOL', 'IF', 'IGNORE', 'IMMEDIATE', 'INDEX', 'INDICATOR', 'INITIALIZE', 'INITIALLY', + 'INNER', 'INOUT', 'INPUT', 'INSERT', 'INT', 'INTEGER', 'INTERSECT', 'INTERVAL', 'INTO', 'IS', 'ISOLATION', 'ITERATE', 'KEY', + 'KILL', 'LANGUAGE', 'LARGE', 'LAST', 'LATERAL', 'LEADING', 'LEFT', 'LESS', 'LEVEL', 'LIMIT', 'LINENO', 'LOAD', 'LOCAL', + 'LOCALTIME', 'LOCALTIMESTAMP', 'LOCATOR', 'MAP', 'MATCH', 'MINUTE', 'MODIFIES', 'MODIFY', 'MODULE', 'MONTH', 'NAMES', 'NATIONAL', + 'NATURAL', 'NCHAR', 'NCLOB', 'NEW', 'NEXT', 'NO', 'NOCHECK', 'NONCLUSTERED', 'NONE', 'NULLIF', 'NUMERIC', 'OBJECT', 'OF', + 'OFF', 'OFFSETS', 'OLD', 'ON', 'ONLY', 'OPEN', 'OPENDATASOURCE', 'OPENQUERY', 'OPENROWSET', 'OPENXML', 'OPERATION', 'OPTION', + 'ORDER', 'ORDINALITY', 'OUT', 'OUTPUT', 'OVER', 'PAD', 'PARAMETER', 'PARAMETERS', 'PARTIAL', 'PATH', 'PERCENT', 'PLAN', + 'POSTFIX', 'PRECISION', 'PREFIX', 'PREORDER', 'PREPARE', 'PRESERVE', 'PRIMARY', 'PRINT', 'PRIOR', 'PRIVILEGES', 'PROC', 'PROCEDURE', + 'PUBLIC', 'RAISERROR', 'READ', 'READS', 'READTEXT', 'REAL', 'RECONFIGURE', 'RECURSIVE', 'REF', 'REFERENCES', 'REFERENCING', 'RELATIVE', + 'REPLICATION', 'RESTORE', 'RESTRICT', 'RESULT', 'RETURN', 'RETURNS', 'REVOKE', 'RIGHT', 'ROLE', 'ROLLBACK', 'ROLLUP', 'ROUTINE', 'ROW', + 'ROWGUIDCOL', 'ROWS', 'RULE', 'SAVE', 'SAVEPOINT', 'SCHEMA', 'SCOPE', 'SCROLL', 'SEARCH', 'SECOND', 'SECTION', 'SELECT', + 'SEQUENCE', 'SESSION', 'SESSION_USER', 'SET', 'SETS', 'SETUSER', 'SHUTDOWN', 'SIZE', 'SMALLINT', 'SPACE', 'SPECIFIC', + 'SPECIFICTYPE', 'SQL', 'SQLEXCEPTION', 'SQLSTATE', 'SQLWARNING', 'START', 'STATE', 'STATEMENT', 'STATIC', 'STATISTICS', 'STRUCTURE', + 'SYSTEM_USER', 'TABLE', 'TEMPORARY', 'TERMINATE', 'TEXTSIZE', 'THAN', 'THEN', 'TIME', 'TIMESTAMP', 'TIMEZONE_HOUR', 'TIMEZONE_MINUTE', + 'TO', 'TOP', 'TRAILING', 'TRAN', 'TRANSACTION', 'TRANSLATION', 'TREAT', 'TRIGGER', 'TRUE', 'TRUNCATE', 'TSEQUAL', 'UNDER', 'UNION', + 'UNIQUE', 'UNKNOWN', 'UNNEST', 'UPDATE', 'UPDATETEXT', 'USAGE', 'USE', 'USER', 'USING', 'VALUE', 'VALUES', 'VARCHAR', 'VARIABLE', + 'VARYING', 'VIEW', 'WAITFOR', 'WHEN', 'WHENEVER', 'WHERE', 'WHILE', 'WITH', 'WITHOUT', 'WORK', 'WRITE', 'WRITETEXT', 'YEAR', 'ZONE', + 'UNCOMMITTED', 'NOCOUNT', + ), + 2 => array( + /* + Built-in functions + Highlighted in pink. + */ + + //Configuration Functions + '@@DATEFIRST','@@OPTIONS','@@DBTS','@@REMSERVER','@@LANGID','@@SERVERNAME', + '@@LANGUAGE','@@SERVICENAME','@@LOCK_TIMEOUT','@@SPID','@@MAX_CONNECTIONS','@@TEXTSIZE', + '@@MAX_PRECISION','@@VERSION','@@NESTLEVEL', + + //Cursor Functions + '@@CURSOR_ROWS','@@FETCH_STATUS', + + //Date and Time Functions + 'DATEADD','DATEDIFF','DATENAME','DATEPART','DAY','GETDATE','GETUTCDATE','MONTH','YEAR', + + //Mathematical Functions + 'ABS','DEGREES','RAND','ACOS','EXP','ROUND','ASIN','FLOOR','SIGN', + 'ATAN','LOG','SIN','ATN2','LOG10','SQUARE','CEILING','PI','SQRT','COS', + 'POWER','TAN','COT','RADIANS', + + //Meta Data Functions + 'COL_LENGTH','fn_listextendedproperty','COL_NAME','FULLTEXTCATALOGPROPERTY', + 'COLUMNPROPERTY','FULLTEXTSERVICEPROPERTY','DATABASEPROPERTY','INDEX_COL', + 'DATABASEPROPERTYEX','INDEXKEY_PROPERTY','DB_ID','INDEXPROPERTY','DB_NAME', + 'OBJECT_ID','FILE_ID','OBJECT_NAME','FILE_NAME','OBJECTPROPERTY','FILEGROUP_ID', + '@@PROCID','FILEGROUP_NAME','SQL_VARIANT_PROPERTY','FILEGROUPPROPERTY', + 'TYPEPROPERTY','FILEPROPERTY', + + //Security Functions + 'fn_trace_geteventinfo','IS_SRVROLEMEMBER','fn_trace_getfilterinfo','SUSER_SID', + 'fn_trace_getinfo','SUSER_SNAME','fn_trace_gettable','USER_ID','HAS_DBACCESS', + 'IS_MEMBER', + + //String Functions + 'ASCII','NCHAR','SOUNDEX','CHAR','PATINDEX','SPACE','CHARINDEX', + 'REPLACE','STR','DIFFERENCE','QUOTENAME','STUFF','LEFT','REPLICATE', + 'SUBSTRING','LEN','REVERSE','UNICODE','LOWER','RIGHT','UPPER','LTRIM', + 'RTRIM', + + //System Functions + 'APP_NAME','COLLATIONPROPERTY','@@ERROR','fn_helpcollations', + 'fn_servershareddrives','fn_virtualfilestats','FORMATMESSAGE', + 'GETANSINULL','HOST_ID','HOST_NAME','IDENT_CURRENT','IDENT_INCR', + 'IDENT_SEED','@@IDENTITY','ISDATE','ISNUMERIC','PARSENAME','PERMISSIONS', + '@@ROWCOUNT','ROWCOUNT_BIG','SCOPE_IDENTITY','SERVERPROPERTY','SESSIONPROPERTY', + 'STATS_DATE','@@TRANCOUNT','USER_NAME', + + //System Statistical Functions + '@@CONNECTIONS','@@PACK_RECEIVED','@@CPU_BUSY','@@PACK_SENT', + 'fn_virtualfilestats','@@TIMETICKS','@@IDLE','@@TOTAL_ERRORS','@@IO_BUSY', + '@@TOTAL_READ','@@PACKET_ERRORS','@@TOTAL_WRITE', + + //Text and Image Functions + 'TEXTPTR','TEXTVALID', + + //Aggregate functions + 'AVG', 'MAX', 'BINARY_CHECKSUM', 'MIN', 'CHECKSUM', 'SUM', 'CHECKSUM_AGG', + 'STDEV', 'COUNT', 'STDEVP', 'COUNT_BIG', 'VAR', 'GROUPING', 'VARP' + ), + 3 => array( + /* + System stored procedures + Higlighted dark brown + */ + + //Active Directory Procedures + 'sp_ActiveDirectory_Obj', 'sp_ActiveDirectory_SCP', + + //Catalog Procedures + 'sp_column_privileges', 'sp_special_columns', 'sp_columns', 'sp_sproc_columns', + 'sp_databases', 'sp_statistics', 'sp_fkeys', 'sp_stored_procedures', 'sp_pkeys', + 'sp_table_privileges', 'sp_server_info', 'sp_tables', + + //Cursor Procedures + 'sp_cursor_list', 'sp_describe_cursor_columns', 'sp_describe_cursor', 'sp_describe_cursor_tables', + + //Database Maintenance Plan Procedures + 'sp_add_maintenance_plan', 'sp_delete_maintenance_plan_db', 'sp_add_maintenance_plan_db', + 'sp_delete_maintenance_plan_job', 'sp_add_maintenance_plan_job', 'sp_help_maintenance_plan', + 'sp_delete_maintenance_plan', + + //Distributed Queries Procedures + 'sp_addlinkedserver', 'sp_indexes', 'sp_addlinkedsrvlogin', 'sp_linkedservers', 'sp_catalogs', + 'sp_primarykeys', 'sp_column_privileges_ex', 'sp_serveroption', 'sp_columns_ex', + 'sp_table_privileges_ex', 'sp_droplinkedsrvlogin', 'sp_tables_ex', 'sp_foreignkeys', + + //Full-Text Search Procedures + 'sp_fulltext_catalog', 'sp_help_fulltext_catalogs_cursor', 'sp_fulltext_column', + 'sp_help_fulltext_columns', 'sp_fulltext_database', 'sp_help_fulltext_columns_cursor', + 'sp_fulltext_service', 'sp_help_fulltext_tables', 'sp_fulltext_table', + 'sp_help_fulltext_tables_cursor', 'sp_help_fulltext_catalogs', + + //Log Shipping Procedures + 'sp_add_log_shipping_database', 'sp_delete_log_shipping_database', 'sp_add_log_shipping_plan', + 'sp_delete_log_shipping_plan', 'sp_add_log_shipping_plan_database', + 'sp_delete_log_shipping_plan_database', 'sp_add_log_shipping_primary', + 'sp_delete_log_shipping_primary', 'sp_add_log_shipping_secondary', + 'sp_delete_log_shipping_secondary', 'sp_can_tlog_be_applied', 'sp_get_log_shipping_monitor_info', + 'sp_change_monitor_role', 'sp_remove_log_shipping_monitor', 'sp_change_primary_role', + 'sp_resolve_logins', 'sp_change_secondary_role', 'sp_update_log_shipping_monitor_info', + 'sp_create_log_shipping_monitor_account', 'sp_update_log_shipping_plan', + 'sp_define_log_shipping_monitor', 'sp_update_log_shipping_plan_database', + + //OLE Automation Extended Stored Procedures + 'sp_OACreate', 'sp_OAMethod', 'sp_OADestroy', 'sp_OASetProperty', 'sp_OAGetErrorInfo', + 'sp_OAStop', 'sp_OAGetProperty', + + //Replication Procedures + 'sp_add_agent_parameter', 'sp_enableagentoffload', 'sp_add_agent_profile', + 'sp_enumcustomresolvers', 'sp_addarticle', 'sp_enumdsn', 'sp_adddistpublisher', + 'sp_enumfullsubscribers', 'sp_adddistributiondb', 'sp_expired_subscription_cleanup', + 'sp_adddistributor', 'sp_generatefilters', 'sp_addmergealternatepublisher', + 'sp_getagentoffloadinfo', 'sp_addmergearticle', 'sp_getmergedeletetype', 'sp_addmergefilter', + 'sp_get_distributor', 'sp_addmergepublication', 'sp_getqueuedrows', 'sp_addmergepullsubscription', + 'sp_getsubscriptiondtspackagename', 'sp_addmergepullsubscription_agent', 'sp_grant_publication_access', + 'sp_addmergesubscription', 'sp_help_agent_default', 'sp_addpublication', 'sp_help_agent_parameter', + 'sp_addpublication_snapshot', 'sp_help_agent_profile', 'sp_addpublisher70', 'sp_helparticle', + 'sp_addpullsubscription', 'sp_helparticlecolumns', 'sp_addpullsubscription_agent', 'sp_helparticledts', + 'sp_addscriptexec', 'sp_helpdistpublisher', 'sp_addsubscriber', 'sp_helpdistributiondb', + 'sp_addsubscriber_schedule', 'sp_helpdistributor', 'sp_addsubscription', 'sp_helpmergealternatepublisher', + 'sp_addsynctriggers', 'sp_helpmergearticle', 'sp_addtabletocontents', 'sp_helpmergearticlecolumn', + 'sp_adjustpublisheridentityrange', 'sp_helpmergearticleconflicts', 'sp_article_validation', + 'sp_helpmergeconflictrows', 'sp_articlecolumn', 'sp_helpmergedeleteconflictrows', 'sp_articlefilter', + 'sp_helpmergefilter', 'sp_articlesynctranprocs', 'sp_helpmergepublication', 'sp_articleview', + 'sp_helpmergepullsubscription', 'sp_attachsubscription', 'sp_helpmergesubscription', 'sp_browsesnapshotfolder', + 'sp_helppublication', 'sp_browsemergesnapshotfolder', 'sp_help_publication_access', 'sp_browsereplcmds', + 'sp_helppullsubscription', 'sp_change_agent_parameter', 'sp_helpreplfailovermode', 'sp_change_agent_profile', + 'sp_helpreplicationdboption', 'sp_changearticle', 'sp_helpreplicationoption', 'sp_changedistpublisher', + 'sp_helpsubscriberinfo', 'sp_changedistributiondb', 'sp_helpsubscription', 'sp_changedistributor_password', + 'sp_ivindexhasnullcols', 'sp_changedistributor_property', 'sp_helpsubscription_properties', 'sp_changemergearticle', + 'sp_link_publication', 'sp_changemergefilter', 'sp_marksubscriptionvalidation', 'sp_changemergepublication', + 'sp_mergearticlecolumn', 'sp_changemergepullsubscription', 'sp_mergecleanupmetadata', 'sp_changemergesubscription', + 'sp_mergedummyupdate', 'sp_changepublication', 'sp_mergesubscription_cleanup', 'sp_changesubscriber', + 'sp_publication_validation', 'sp_changesubscriber_schedule', 'sp_refreshsubscriptions', 'sp_changesubscriptiondtsinfo', + 'sp_reinitmergepullsubscription', 'sp_changesubstatus', 'sp_reinitmergesubscription', 'sp_change_subscription_properties', + 'sp_reinitpullsubscription', 'sp_check_for_sync_trigger', 'sp_reinitsubscription', 'sp_copymergesnapshot', + 'sp_removedbreplication', 'sp_copysnapshot', 'sp_repladdcolumn', 'sp_copysubscription', 'sp_replcmds', + 'sp_deletemergeconflictrow', 'sp_replcounters', 'sp_disableagentoffload', 'sp_repldone', 'sp_drop_agent_parameter', + 'sp_repldropcolumn', 'sp_drop_agent_profile', 'sp_replflush', 'sp_droparticle', 'sp_replicationdboption', + 'sp_dropanonymouseagent', 'sp_replication_agent_checkup', 'sp_dropdistpublisher', 'sp_replqueuemonitor', + 'sp_dropdistributiondb', 'sp_replsetoriginator', 'sp_dropmergealternatepublisher', 'sp_replshowcmds', + 'sp_dropdistributor', 'sp_repltrans', 'sp_dropmergearticle', 'sp_restoredbreplication', 'sp_dropmergefilter', + 'sp_revoke_publication_access', 'sp_scriptsubconflicttable', 'sp_dropmergepublication', 'sp_script_synctran_commands', + 'sp_dropmergepullsubscription', 'sp_setreplfailovermode', 'sp_showrowreplicainfo', 'sp_dropmergesubscription', + 'sp_subscription_cleanup', 'sp_droppublication', 'sp_table_validation', 'sp_droppullsubscription', + 'sp_update_agent_profile', 'sp_dropsubscriber', 'sp_validatemergepublication', 'sp_dropsubscription', + 'sp_validatemergesubscription', 'sp_dsninfo', 'sp_vupgrade_replication', 'sp_dumpparamcmd', + + //Security Procedures + 'sp_addalias', 'sp_droprolemember', 'sp_addapprole', 'sp_dropserver', 'sp_addgroup', 'sp_dropsrvrolemember', + 'sp_addlinkedsrvlogin', 'sp_dropuser', 'sp_addlogin', 'sp_grantdbaccess', 'sp_addremotelogin', + 'sp_grantlogin', 'sp_addrole', 'sp_helpdbfixedrole', 'sp_addrolemember', 'sp_helpgroup', + 'sp_addserver', 'sp_helplinkedsrvlogin', 'sp_addsrvrolemember', 'sp_helplogins', 'sp_adduser', + 'sp_helpntgroup', 'sp_approlepassword', 'sp_helpremotelogin', 'sp_changedbowner', 'sp_helprole', + 'sp_changegroup', 'sp_helprolemember', 'sp_changeobjectowner', 'sp_helprotect', 'sp_change_users_login', + 'sp_helpsrvrole', 'sp_dbfixedrolepermission', 'sp_helpsrvrolemember', 'sp_defaultdb', 'sp_helpuser', + 'sp_defaultlanguage', 'sp_MShasdbaccess', 'sp_denylogin', 'sp_password', 'sp_dropalias', 'sp_remoteoption', + 'sp_dropapprole', 'sp_revokedbaccess', 'sp_dropgroup', 'sp_revokelogin', 'sp_droplinkedsrvlogin', + 'sp_setapprole', 'sp_droplogin', 'sp_srvrolepermission', 'sp_dropremotelogin', 'sp_validatelogins', 'sp_droprole', + + //SQL Mail Procedures + 'sp_processmail', 'xp_sendmail', 'xp_deletemail', 'xp_startmail', 'xp_findnextmsg', 'xp_stopmail', 'xp_readmail', + + //SQL Profiler Procedures + 'sp_trace_create', 'sp_trace_setfilter', 'sp_trace_generateevent', 'sp_trace_setstatus', 'sp_trace_setevent', + + //SQL Server Agent Procedures + 'sp_add_alert', 'sp_help_jobhistory', 'sp_add_category', 'sp_help_jobschedule', 'sp_add_job', + 'sp_help_jobserver', 'sp_add_jobschedule', 'sp_help_jobstep', 'sp_add_jobserver', 'sp_help_notification', + 'sp_add_jobstep', 'sp_help_operator', 'sp_add_notification', 'sp_help_targetserver', + 'sp_add_operator', 'sp_help_targetservergroup', 'sp_add_targetservergroup', 'sp_helptask', + 'sp_add_targetsvrgrp_member', 'sp_manage_jobs_by_login', 'sp_addtask', 'sp_msx_defect', + 'sp_apply_job_to_targets', 'sp_msx_enlist', 'sp_delete_alert', 'sp_post_msx_operation', + 'sp_delete_category', 'sp_purgehistory', 'sp_delete_job', 'sp_purge_jobhistory', 'sp_delete_jobschedule', + 'sp_reassigntask', 'sp_delete_jobserver', 'sp_remove_job_from_targets', 'sp_delete_jobstep', + 'sp_resync_targetserver', 'sp_delete_notification', 'sp_start_job', 'sp_delete_operator', + 'sp_stop_job', 'sp_delete_targetserver', 'sp_update_alert', 'sp_delete_targetservergroup', + 'sp_update_category', 'sp_delete_targetsvrgrp_member', 'sp_update_job', 'sp_droptask', + 'sp_update_jobschedule', 'sp_help_alert', 'sp_update_jobstep', 'sp_help_category', + 'sp_update_notification', 'sp_help_downloadlist', 'sp_update_operator', 'sp_helphistory', + 'sp_update_targetservergroup', 'sp_help_job', 'sp_updatetask', 'xp_sqlagent_proxy_account', + + //System Procedures + 'sp_add_data_file_recover_suspect_db', 'sp_helpconstraint', 'sp_addextendedproc', + 'sp_helpdb', 'sp_addextendedproperty', 'sp_helpdevice', 'sp_add_log_file_recover_suspect_db', + 'sp_helpextendedproc', 'sp_addmessage', 'sp_helpfile', 'sp_addtype', 'sp_helpfilegroup', + 'sp_addumpdevice', 'sp_helpindex', 'sp_altermessage', 'sp_helplanguage', 'sp_autostats', + 'sp_helpserver', 'sp_attach_db', 'sp_helpsort', 'sp_attach_single_file_db', 'sp_helpstats', + 'sp_bindefault', 'sp_helptext', 'sp_bindrule', 'sp_helptrigger', 'sp_bindsession', + 'sp_indexoption', 'sp_certify_removable', 'sp_invalidate_textptr', 'sp_configure', + 'sp_lock', 'sp_create_removable', 'sp_monitor', 'sp_createstats', 'sp_procoption', + 'sp_cycle_errorlog', 'sp_recompile', 'sp_datatype_info', 'sp_refreshview', 'sp_dbcmptlevel', + 'sp_releaseapplock', 'sp_dboption', 'sp_rename', 'sp_dbremove', 'sp_renamedb', + 'sp_delete_backuphistory', 'sp_resetstatus', 'sp_depends', 'sp_serveroption', 'sp_detach_db', + 'sp_setnetname', 'sp_dropdevice', 'sp_settriggerorder', 'sp_dropextendedproc', 'sp_spaceused', + 'sp_dropextendedproperty', 'sp_tableoption', 'sp_dropmessage', 'sp_unbindefault', 'sp_droptype', + 'sp_unbindrule', 'sp_executesql', 'sp_updateextendedproperty', 'sp_getapplock', 'sp_updatestats', + 'sp_getbindtoken', 'sp_validname', 'sp_help', 'sp_who', + + //Web Assistant Procedures + 'sp_dropwebtask', 'sp_makewebtask', 'sp_enumcodepages', 'sp_runwebtask', + + //XML Procedures + 'sp_xml_preparedocument', 'sp_xml_removedocument', + + //General Extended Procedures + 'xp_cmdshellxp_logininfo', 'xp_enumgroups', 'xp_msver', 'xp_findnextmsgxp_revokelogin', + 'xp_grantlogin', 'xp_sprintf', 'xp_logevent', 'xp_sqlmaint', 'xp_loginconfig', 'xp_sscanf', + + //API System Stored Procedures + 'sp_cursor', 'sp_cursorclose', 'sp_cursorexecute', 'sp_cursorfetch', 'sp_cursoropen', + 'sp_cursoroption', 'sp_cursorprepare', 'sp_cursorunprepare', 'sp_execute', 'sp_prepare', 'sp_unprepare', + + //Misc + 'sp_createorphan', 'sp_droporphans', 'sp_reset_connection', 'sp_sdidebug' + ), + 4 => array( + //Function/sp's higlighted brown. + 'fn_helpcollations', 'fn_listextendedproperty ', 'fn_servershareddrives', + 'fn_trace_geteventinfo', 'fn_trace_getfilterinfo', 'fn_trace_getinfo', + 'fn_trace_gettable', 'fn_virtualfilestats', + ), + ), + 'SYMBOLS' => array( + '!', '!=', '%', '&', '&&', '(', ')', '*', '+', '-', '/', '<', '<<', '<=', + '<=>', '<>', '=', '>', '>=', '>>', '^', 'ALL', 'AND', 'ANY', 'BETWEEN', 'CROSS', + 'EXISTS', 'IN', 'JOIN', 'LIKE', 'NOT', 'NULL', 'OR', 'OUTER', 'SOME', '|', '||', '~' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000FF;', + 2 => 'color: #FF00FF;', + 3 => 'color: #AF0000;', + 4 => 'color: #AF0000;' + ), + 'COMMENTS' => array( + 1 => 'color: #008080;', + 'MULTI' => 'color: #008080;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #808080;' + ), + 'STRINGS' => array( + 0 => 'color: #FF0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #000;' + ), + 'METHODS' => array( + 1 => 'color: #202020;', + 2 => 'color: #202020;' + ), + 'SYMBOLS' => array( + 0 => 'color: #808080;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/vb.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/vb.php new file mode 100644 index 0000000..bbea101 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/vb.php @@ -0,0 +1,148 @@ + 'Visual Basic', + 'COMMENT_SINGLE' => array(1 => "'"), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'as', 'err', 'boolean', 'and', 'or', 'recordset', 'unload', 'to', + 'integer','long','single','new','database','nothing','set','close', + 'open','print','split','line','field','querydef','instrrev', + 'abs','array','asc','ascb','ascw','atn','avg','me', + 'cbool','cbyte','ccur','cdate','cdbl','cdec','choose','chr','chrb','chrw','cint','clng', + 'command','cos','count','createobject','csng','cstr','curdir','cvar','cvdate','cverr', + 'date','dateadd','datediff','datepart','dateserial','datevalue','day','ddb','dir','doevents', + 'environ','eof','error','exp', + 'fileattr','filedatetime','filelen','fix','format','freefile','fv', + 'getallstrings','getattr','getautoserversettings','getobject','getsetting', + 'hex','hour','iif','imestatus','input','inputb','inputbox','instr','instb','int','ipmt', + 'isarray','isdate','isempty','iserror','ismissing','isnull','isnumeric','isobject', + 'lbound','lcase','left','leftb','len','lenb','loadpicture','loc','lof','log','ltrim', + 'max','mid','midb','min','minute','mirr','month','msgbox', + 'now','nper','npv','oct','partition','pmt','ppmt','pv','qbcolor', + 'rate','rgb','right','rightb','rnd','rtrim', + 'second','seek','sgn','shell','sin','sln','space','spc','sqr','stdev','stdevp','str', + 'strcomp','strconv','string','switch','sum','syd', + 'tab','tan','time','timer','timeserial','timevalue','trim','typename', + 'ubound','ucase','val','var','varp','vartype','weekday','year', + 'appactivate','base','beep','call','case','chdir','chdrive','const', + 'declare','defbool','defbyte','defcur','defdate','defdbl','defdec','defint', + 'deflng','defobj','defsng','defstr','deftype','defvar','deletesetting','dim','do', + 'else','elseif','end','enum','erase','event','exit','explicit', + 'false','filecopy','for','foreach','friend','function','get','gosub','goto', + 'if','implements','kill','let','lineinput','lock','loop','lset','mkdir','name','next','not', + 'onerror','on','option','private','property','public','put','raiseevent','randomize', + 'redim','rem','reset','resume','return','rmdir','rset', + 'savepicture','savesetting','sendkeys','setattr','static','sub', + 'then','true','type','unlock','wend','while','width','with','write', + 'vbabort','vbabortretryignore','vbapplicationmodal','vbarray', + 'vbbinarycompare','vbblack','vbblue','vbboolean','vbbyte','vbcancel', + 'vbcr','vbcritical','vbcrlf','vbcurrency','vbcyan','vbdataobject', + 'vbdate','vbdecimal','vbdefaultbutton1','vbdefaultbutton2', + 'vbdefaultbutton3','vbdefaultbutton4','vbdouble','vbempty', + 'vberror','vbexclamation','vbfirstfourdays','vbfirstfullweek', + 'vbfirstjan1','vbformfeed','vbfriday','vbgeneraldate','vbgreen', + 'vbignore','vbinformation','vbinteger','vblf','vblong','vblongdate', + 'vblongtime','vbmagenta','vbmonday','vbnewline','vbno','vbnull', + 'vbnullchar','vbnullstring','vbobject','vbobjecterror','vbok','vbokcancel', + 'vbokonly','vbquestion','vbred','vbretry','vbretrycancel','vbsaturday', + 'vbshortdate','vbshorttime','vbsingle','vbstring','vbsunday', + 'vbsystemmodal','vbtab','vbtextcompare','vbthursday','vbtuesday', + 'vbusesystem','vbusesystemdayofweek','vbvariant','vbverticaltab', + 'vbwednesday','vbwhite','vbyellow','vbyes','vbyesno','vbyesnocancel', + 'vbnormal','vbdirectory' + ) + ), + 'SYMBOLS' => array( + '(', ')' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #66cc66;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/vbnet.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/vbnet.php new file mode 100644 index 0000000..c417fee --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/vbnet.php @@ -0,0 +1,197 @@ + 'vb.net', + 'COMMENT_SINGLE' => array(1 => "'"), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + '3DDKSHADOW', '3DHIGHLIGHT', '3DLIGHT', 'ABORT', 'ABORTRETRYIGNORE', 'ACTIVEBORDER', + 'ACTIVETITLEBAR', 'ALIAS', 'APPLICATIONMODAL', 'APPLICATIONWORKSPACE', 'ARCHIVE', + 'BACK', 'BINARYCOMPARE', 'BLACK', 'BLUE', 'BUTTONFACE', 'BUTTONSHADOW', 'BUTTONTEXT', + 'CANCEL', 'CDROM', 'CR', 'CRITICAL', 'CRLF', 'CYAN', 'DEFAULT', 'DEFAULTBUTTON1', + 'DEFAULTBUTTON2', 'DEFAULTBUTTON3', 'DESKTOP', 'DIRECTORY', 'EXCLAMATION', 'FALSE', + 'FIXED', 'FORAPPENDING', 'FORMFEED', 'FORREADING', 'FORWRITING', 'FROMUNICODE', + 'GRAYTEXT', 'GREEN', 'HIDDEN', 'HIDE', 'HIGHLIGHT', 'HIGHLIGHTTEXT', 'HIRAGANA', + 'IGNORE', 'INACTIVEBORDER', 'INACTIVECAPTIONTEXT', 'INACTIVETITLEBAR', 'INFOBACKGROUND', + 'INFORMATION', 'INFOTEXT', 'KATAKANALF', 'LOWERCASE', 'MAGENTA', 'MAXIMIZEDFOCUS', + 'MENUBAR', 'MENUTEXT', 'METHOD', 'MINIMIZEDFOCUS', 'MINIMIZEDNOFOCUS', 'MSGBOXRIGHT', + 'MSGBOXRTLREADING', 'MSGBOXSETFOREGROUND', 'NARROW', 'NEWLINE', 'NO', 'NORMAL', + 'NORMALFOCUS', 'NORMALNOFOCUS', 'NULLSTRING', 'OBJECTERROR', 'OK', 'OKCANCEL', 'OKONLY', + 'PROPERCASE', 'QUESTION', 'RAMDISK', 'READONLY', 'RED', 'REMOTE', 'REMOVABLE', 'RETRY', + 'RETRYCANCEL', 'SCROLLBARS', 'SYSTEMFOLDER', 'SYSTEMMODAL', 'TAB', 'TEMPORARYFOLDER', + 'TEXTCOMPARE', 'TITLEBARTEXT', 'TRUE', 'UNICODE', 'UNKNOWN', 'UPPERCASE', 'VERTICALTAB', + 'VOLUME', 'WHITE', 'WIDE', 'WIN16', 'WIN32', 'WINDOWBACKGROUND', 'WINDOWFRAME', + 'WINDOWSFOLDER', 'WINDOWTEXT', 'YELLOW', 'YES', 'YESNO', 'YESNOCANCEL' + ), + 2 => array( + 'AndAlso', 'As', 'ADDHANDLER', 'ASSEMBLY', 'AUTO', 'Binary', 'ByRef', 'ByVal', 'BEGINEPILOGUE', + 'Else', 'ElseIf', 'Empty', 'Error', 'ENDPROLOGUE', 'EXTERNALSOURCE', 'ENVIRON', 'For', + 'Friend', 'GET', 'HANDLES', 'Input', 'Is', 'IsNot', 'Len', 'Lock', 'Me', 'Mid', 'MUSTINHERIT', + 'MYBASE', 'MYCLASS', 'New', 'Next', 'Nothing', 'Null', 'NOTINHERITABLE', + 'NOTOVERRIDABLE', 'OFF', 'On', 'Option', 'Optional', 'Overloads', 'OVERRIDABLE', 'ParamArray', + 'Print', 'Private', 'Property', 'Public', 'Resume', 'Return', 'Seek', 'Static', 'Step', + 'String', 'SHELL', 'SENDKEYS', 'SET', 'Shared', 'Then', 'Time', 'To', 'THROW', 'WithEvents' + ), + 3 => array( + 'COLLECTION', 'DEBUG', 'DICTIONARY', 'DRIVE', 'DRIVES', 'ERR', 'FILE', 'FILES', + 'FILESYSTEMOBJECT', 'FOLDER', 'FOLDERS', 'TEXTSTREAM' + ), + 4 => array( + 'BOOLEAN', 'BYTE', 'DATE', 'DECIMIAL', 'DOUBLE', 'INTEGER', 'LONG', 'OBJECT', + 'SINGLE STRING' + ), + 5 => array( + 'ADDRESSOF', 'AND', 'BITAND', 'BITNOT', 'BITOR', 'BITXOR', + 'GETTYPE', 'LIKE', 'MOD', 'NOT', 'ORXOR' + ), + 6 => array( + 'APPACTIVATE', 'BEEP', 'CALL', 'CHDIR', 'CHDRIVE', 'CLASS', 'CASE', 'CATCH', 'CONST', + 'DECLARE', 'DELEGATE', 'DELETESETTING', 'DIM', 'DO', 'DOEVENTS', 'END', 'ENUM', + 'EVENT', 'EXIT', 'EACH', 'FUNCTION', 'FINALLY', 'IF', 'IMPORTS', 'INHERITS', + 'INTERFACE', 'IMPLEMENTS', 'KILL', 'LOOP', 'MIDB', 'NAMESPACE', 'OPEN', 'PUT', + 'RAISEEVENT', 'RANDOMIZE', 'REDIM', 'REM', 'RESET', 'SAVESETTING', 'SELECT', + 'SETATTR', 'STOP', 'SUB', 'SYNCLOCK', 'STRUCTURE', 'SHADOWS', 'SWITCH', + 'TIMEOFDAY', 'TODAY', 'TRY', 'WIDTH', 'WITH', 'WRITE', 'WHILE' + ), + 7 => array( + 'ABS', 'ARRAY', 'ASC', 'ASCB', 'ASCW', 'CALLBYNAME', 'CBOOL', 'CBYTE', 'CCHAR', + 'CCHR', 'CDATE', 'CDBL', 'CDEC', 'CHOOSE', 'CHR', 'CHR$', 'CHRB', 'CHRB$', 'CHRW', + 'CINT', 'CLNG', 'CLNG8', 'CLOSE', 'COBJ', 'COMMAND', 'COMMAND$', 'CONVERSION', + 'COS', 'CREATEOBJECT', 'CSHORT', 'CSTR', 'CURDIR', 'CTYPE', 'CVDATE', 'DATEADD', + 'DATEDIFF', 'DATEPART', 'DATESERIAL', 'DATEVALUE', 'DAY', 'DDB', 'DIR', 'DIR$', + 'EOF', 'ERROR$', 'EXP', 'FILEATTR', 'FILECOPY', 'FILEDATATIME', 'FILELEN', 'FILTER', + 'FIX', 'FORMAT', 'FORMAT$', 'FORMATCURRENCY', 'FORMATDATETIME', 'FORMATNUMBER', + 'FORMATPERCENT', 'FREEFILE', 'FV', 'GETALLSETTINGS', 'GETATTRGETOBJECT', 'GETSETTING', + 'HEX', 'HEX$', 'HOUR', 'IIF', 'IMESTATUS', 'INPUT$', 'INPUTB', 'INPUTB$', 'INPUTBOX', + 'INSTR', 'INSTRB', 'INSTRREV', 'INT', 'IPMT', 'IRR', 'ISARRAY', 'ISDATE', 'ISEMPTY', + 'ISERROR', 'ISNULL', 'ISNUMERIC', 'ISOBJECT', 'JOIN', 'LBOUND', 'LCASE', 'LCASE$', + 'LEFT', 'LEFT$', 'LEFTB', 'LEFTB$', 'LENB', 'LINEINPUT', 'LOC', 'LOF', 'LOG', 'LTRIM', + 'LTRIM$', 'MID$', 'MIDB', 'MIDB$', 'MINUTE', 'MIRR', 'MKDIR', 'MONTH', 'MONTHNAME', + 'MSGBOX', 'NOW', 'NPER', 'NPV', 'OCT', 'OCT$', 'PARTITION', 'PMT', 'PPMT', 'PV', + 'RATE', 'REPLACE', 'RIGHT', 'RIGHT$', 'RIGHTB', 'RIGHTB$', 'RMDIR', 'RND', 'RTRIM', + 'RTRIM$', 'SECOND', 'SIN', 'SLN', 'SPACE', 'SPACE$', 'SPC', 'SPLIT', 'SQRT', 'STR', 'STR$', + 'STRCOMP', 'STRCONV', 'STRING$', 'STRREVERSE', 'SYD', 'TAB', 'TAN', 'TIMEOFDAY', + 'TIMER', 'TIMESERIAL', 'TIMEVALUE', 'TODAY', 'TRIM', 'TRIM$', 'TYPENAME', 'UBOUND', + 'UCASE', 'UCASE$', 'VAL', 'WEEKDAY', 'WEEKDAYNAME', 'YEAR' + ), + 8 => array( + 'ANY', 'ATN', 'CALENDAR', 'CIRCLE', 'CURRENCY', 'DEFBOOL', 'DEFBYTE', 'DEFCUR', + 'DEFDATE', 'DEFDBL', 'DEFDEC', 'DEFINT', 'DEFLNG', 'DEFOBJ', 'DEFSNG', 'DEFSTR', + 'DEFVAR', 'EQV', 'GOSUB', 'IMP', 'INITIALIZE', 'ISMISSING', 'LET', 'LINE', 'LSET', + 'RSET', 'SGN', 'SQR', 'TERMINATE', 'VARIANT', 'VARTYPE', 'WEND' + ), + ), + 'SYMBOLS' => array( + '&', '&=', '*', '*=', '+', '+=', '-', '-=', '//', '/', '/=', '=', '\\', '\\=', + '^', '^=' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false, + 8 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0600FF;', //Constants + 2 => 'color: #FF8000;', //Keywords + 3 => 'color: #008000;', //Data Types + 4 => 'color: #FF0000;', //Objects + 5 => 'color: #804040;', //Operators + 6 => 'color: #0600FF;', //Statements + 7 => 'color: #0600FF;', //Functions + 8 => 'color: #0600FF;' //Deprecated + ), + 'COMMENTS' => array( + 1 => 'color: #008080; font-style: italic;', + 'MULTI' => 'color: #008080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #008080; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #808080;' + ), + 'NUMBERS' => array( + 0 => 'color: #FF0000;' + ), + 'METHODS' => array( + 1 => 'color: #0000FF;' + ), + 'SYMBOLS' => array( + 0 => 'color: #008000;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://www.google.com/search?q={FNAME}+msdn.microsoft.com', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 =>'.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/vhdl.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/vhdl.php new file mode 100644 index 0000000..47d1eb7 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/vhdl.php @@ -0,0 +1,138 @@ + 'VHDL', + 'COMMENT_SINGLE' => array(1 => '--'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /*keywords*/ + 1 => array( + 'access','after','alias','all','assert','architecture','begin', + 'block','body','buffer','bus','case','component','configuration','constant', + 'disconnect','downto','else','elsif','end','entity','exit','file','for', + 'function','generate','generic','group','guarded','if','impure','in', + 'inertial','inout','is','label','library','linkage','literal','loop', + 'map','new','next','null','of','on','open','others','out','package', + 'port','postponed','procedure','process','pure','range','record','register', + 'reject','report','return','select','severity','signal','shared','subtype', + 'then','to','transport','type','unaffected','units','until','use','variable', + 'wait','when','while','with','note','warning','error','failure','and', + 'or','xor','not','nor' + ), + /*types*/ + 2 => array( + 'bit','bit_vector','character','boolean','integer','real','time','string', + 'severity_level','positive','natural','signed','unsigned','line','text', + 'std_logic','std_logic_vector','std_ulogic','std_ulogic_vector','qsim_state', + 'qsim_state_vector','qsim_12state','qsim_12state_vector','qsim_strength', + 'mux_bit','mux_vector','reg_bit','reg_vector','wor_bit','wor_vector' + ), + /*operators*/ + 3 => array( + '=','<=',':=','=>','==' + ) + ), + 'SYMBOLS' => array( + '[', ']', '(', ')',';','<','>',':' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight: bold;', + 2 => 'color: #aa0000;' + ), + 'COMMENTS' => array( + 1 => 'color: #adadad; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #7f007f;' + ), + 'NUMBERS' => array( + 0 => 'color: #ff0000;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + 0 => 'color: #ff0000;', + 1 => 'color: #ff0000;', + 2 => 'color: #ff0000;', + 3 => 'color: #ff0000;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + 0 => '(\b(0x)[0-9a-fA-F]{2,}[hH]?|\b(0x)?[0-9a-fA-F]{2,}[hH])|'. + '(\b[0-9]{1,}((\.){1}[0-9]{1,}){0,1}(E)[\-]{0,1}[0-9]{1,})|'. + '(\b(ns))|'. + "('[0-9a-zA-Z]+)", + 1 => "\b(''[0-9]'')" + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/visualfoxpro.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/visualfoxpro.php new file mode 100644 index 0000000..7265342 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/visualfoxpro.php @@ -0,0 +1,442 @@ + 'Visual Fox Pro', + 'COMMENT_SINGLE' => array(1 => "//", 2 => "\n*"), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array('Case', 'Else', '#Else', 'Then', + 'Endcase', 'Enddefine', 'Enddo', 'Endfor', 'Endfunc', 'Endif', 'Endprintjob', + 'Endproc', 'Endscan', 'Endtext', 'Endwith', '#Endif', + '#Elif','#Else','#Endif','#Define','#If','#Include', + '#Itsexpression','#Readclauses','#Region','#Section','#Undef','#Wname', + 'Case','Define','Do','Else','Endcase','Enddefine', + 'Enddo','Endfor','Endfunc','Endif','Endprintjob','Endproc', + 'Endscan','Endtext','Endwith','For','Function','Hidden', + 'If','Local','Lparameter','Lparameters','Next','Otherwise', + 'Parameters','Printjob','Procedure','Protected','Public','Scan', + 'Text','Then','While','With','?','??', + '???','Abs','Accept','Access','Aclass','Acopy', + 'Acos','Adatabases','Adbobjects','Addbs','Addrelationtoenv','Addtabletoenv', + 'Adel','Adir','Aelement','Aerror','Afields','Afont', + 'Agetclass','Agetfileversion','Ains','Ainstance','Alen','Align', + 'Alines','Alltrim','Alter','Amembers','Amouseobj','Anetresources', + 'Ansitooem','Append','Aprinters','Ascan','Aselobj','Asin', + 'Asort','Assert','Asserts','Assist','Asubscript','Asynchronous', + 'At_c','Atan','Atc','Atcc','Atcline','Atline', + 'Atn2','Aused','Autoform','Autoreport','Avcxclasses','Average', + 'BarCount','BarPrompt','BatchMode','BatchUpdateCount','Begin','BellSound', + 'BinToC','Bintoc','Bitand','Bitclear','Bitlshift','Bitnot', + 'Bitor','Bitrshift','Bitset','Bittest','Bitxor','Bof', + 'Browse','BrowseRefresh','Buffering','BuilderLock','COMArray','COMReturnError', + 'CToBin','Calculate','Call','Capslock','Cd','Cdow', + 'Ceiling','Central','Change','Char','Chdir','Chr', + 'Chrsaw','Chrtran','Chrtranc','Close','Cmonth','Cntbar', + 'Cntpad','Col','Comclassinfo','CommandTargetQuery','Compile','Completed', + 'Compobj','Compute','Concat','ConnectBusy','ConnectHandle','ConnectName', + 'ConnectString','ConnectTimeOut','ContainerReleaseType','Continue','Copy','Cos', + 'Cot','Count','Coverage','Cpconvert','Cpcurrent','Cpdbf', + 'Cpnotrans','Create','CreateBinary','Createobject','Createobjectex','Createoffline', + 'CrsBuffering','CrsFetchMemo','CrsFetchSize','CrsMaxRows','CrsMethodUsed','CrsNumBatch', + 'CrsShareConnection','CrsUseMemoSize','CrsWhereClause','Ctobin','Ctod','Ctot', + 'Curdate','Curdir','CurrLeft','CurrSymbol','CursorGetProp','CursorSetProp', + 'Curtime','Curval','DBGetProp','DBSetProp','DB_BufLockRow','DB_BufLockTable', + 'DB_BufOff','DB_BufOptRow','DB_BufOptTable','DB_Complette','DB_DeleteInsert','DB_KeyAndModified', + 'DB_KeyAndTimestamp','DB_KeyAndUpdatable','DB_LocalSQL','DB_NoPrompt','DB_Prompt','DB_RemoteSQL', + 'DB_TransAuto','DB_TransManual','DB_TransNone','DB_Update','Datetime','Day', + 'Dayname','Dayofmonth','Dayofweek','Dayofyear','Dbalias','Dbused', + 'Ddeaborttrans','Ddeadvise','Ddeenabled','Ddeexecute','Ddeinitiate','Ddelasterror', + 'Ddepoke','Dderequest','Ddesetoption','Ddesetservice','Ddesettopic','Ddeterminate', + 'Debugout','Declare','DefOLELCid','DefaultValue','Defaultext','Degrees', + 'DeleteTrigger','Desc','Description','Difference','Dimension','Dir', + 'Directory','Diskspace','DispLogin','DispWarnings','Display','Dll', + 'Dmy','DoDefault','DoEvents','Doc','Doevents','Dow', + 'Drivetype','Drop','Dropoffline','Dtoc','Dtor','Dtos', + 'Dtot','DynamicInputMask','Each','Edit','Eject','Elif', + 'End','Eof','Erase','Evaluate','Event','Eventtracking', + 'Exclude','Exclusive','Exit','Exp','Export','External', + 'FDate','FTime','Fchsize','Fclose','Fcount','Fcreate', + 'Feof','Ferror','FetchMemo','FetchSize','Fflush','Fgets', + 'Filer','Filetostr','Find','Fklabel','Fkmax','Fldlist', + 'Flock','Floor','Flush','Fontmetric','Fopen','Forceext', + 'Forcepath','FormSetClass','FormSetLib','FormsClass','FormsLib','Found', + 'FoxPro','Foxcode','Foxdoc','Foxgen','Foxgraph','Foxview', + 'Fputs','Fread','French','Fseek','Fsize','Fv', + 'Fwrite','Gather','German','GetPem','Getbar','Getcolor', + 'Getcp','Getdir','Getenv','Getexpr','Getfile','Getfldstate', + 'Getfont','Gethost','Getnextmodified','Getobject','Getpad','Getpict', + 'Getprinter','Go','Gomonth','Goto','Graph','GridHorz', + 'GridShow','GridShowPos','GridSnap','GridVert','Help','HelpOn', + 'HelpTo','HighLightRow','Home','Hour','IMEStatus','IdleTimeOut', + 'Idxcollate','Ifdef','Ifndef','Iif','Import','Include', + 'Indbc','Index','Indexseek','Inkey','Inlist','Input', + 'Insert','InsertTrigger','Insmode','IsBlank','IsFLocked','IsLeadByte', + 'IsMouse','IsNull','IsRLocked','Isalpha','Iscolor','Isdigit', + 'Isexclusive','Isflocked','Ishosted','Islower','Isreadonly','Isrlocked', + 'Isupper','Italian','Japan','Join','Justdrive','Justext', + 'Justfname','Justpath','Juststem','KeyField','KeyFieldList','Keyboard' + ), + 2 => array('Keymatch','LastProject','Lastkey','Lcase','Leftc','Len', + 'Lenc','Length','Likec','Lineno','LoadPicture','Loadpicture', + 'Locate','Locfile','Log','Log10','Logout','Lookup', + 'Loop','Lower','Ltrim','Lupdate','Mail','MaxRecords', + 'Mcol','Md','Mdown','Mdx','Mdy','Memlines', + 'Menu','Messagebox','Minute','Mkdir','Mline','Modify', + 'Month','Monthname','Mouse','Mrkbar','Mrkpad','Mrow', + 'Mtdll','Mton','Mwindow','Native','Ndx','Network', + 'NoFilter','Nodefault','Normalize','Note','Now','Ntom', + 'NullString','Numlock','Nvl','ODBChdbc','ODBChstmt','OLEDropTextInsertion', + 'OLELCid','Objnum','Objref','Objtoclient','Objvar','Occurs', + 'Oemtoansi','Oldval','OlePublic','Olereturnerror','On','Open', + 'Oracle','Order','Os','Outer','PCount','Pack', + 'PacketSize','Padc','Padl','Padr','Payment','Pcol', + 'PemStatus','Pi','Pivot','Play','Pop','Popup', + 'Power','PrimaryKey','Printstatus','Private','Prmbar','Prmpad', + 'ProjectClick','Proper','Prow','Prtinfo','Push','Putfile', + 'Pv','Qpr','Quater','QueryTimeOut','Quit','Radians', + 'Rand','Rat','Ratc','Ratline','Rd','Rdlevel', + 'Read','Readkey','Recall','Reccount','RecentlyUsedFiles','Recno', + 'Recsize','Regional','Reindex','RelatedChild','RelatedTable','RelatedTag', + 'Remove','Rename','Repeat','Replace','Replicate','Report', + 'ResHeight','ResWidth','ResourceOn','ResourceTo','Resources','Restore', + 'Resume','Retry','Return','Revertoffline','Rgbscheme','Rightc', + 'Rlock','Rmdir','Rollback','Round','Rtod','Rtrim', + 'RuleExpression','RuleText','Run','Runscript','Rview','SQLAsynchronous', + 'SQLBatchMode','SQLCancel','SQLColumns','SQLConnect','SQLConnectTimeOut','SQLDisconnect', + 'SQLDispLogin','SQLDispWarnings','SQLExec','SQLGetProp','SQLIdleTimeOut','SQLMoreResults', + 'SQLPrepare','SQLQueryTimeOut','SQLSetProp','SQLTables','SQLTransactions','SQLWaitTime', + 'Save','SavePicture','Savepicture','ScaleUnits','Scatter','Scols', + 'Scroll','Sec','Second','Seek','Select','SendUpdates', + 'Set','SetDefault','Setfldstate','Setup','ShareConnection','ShowOLEControls', + 'ShowOLEInsertable','ShowVCXs','Sign','Sin','Size','SizeBox', + 'Skpbar','Skppad','Sort','Soundex','SourceName','Sqlcommit', + 'Sqll','Sqlrollback','Sqlstringconnect','Sqrt','Srows','StatusBar', + 'Store','Str','Strconv','Strtofile','Strtran','Stuff', + 'Stuffc','Substr','Substrc','Substring','Sum','Suspend', + 'Sys','Sysmetric','TabOrdering','Table','TableRefresh','Tablerevert', + 'Tableupdate','TagCount','TagNo','Tan','Target','This', + 'Thisform','Thisformset','Timestamp','Timestampdiff','Total','Transactions', + 'Transform','Trim','Truncate','Ttoc','Ttod','Txnlevel', + 'Txtwidth','Type','Ucase','Undefine','Unlock','Unpack', + 'Updatable','UpdatableFieldList','Update','UpdateName','UpdateNameList','UpdateTrigger', + 'UpdateType','Updated','Upper','Upsizing','Usa','Use', + 'UseMemoSize','Used','Val','Validate','Varread','Vartype', + 'Version','VersionLanguage','Wait','WaitTime','Wborder','Wchild', + 'Wcols','Week','Wexist','Wfont','WhereType','Windcmd', + 'Windhelp','Windmemo','Windmenu','Windmodify','Windquery','Windscreen', + 'Windsnip','Windstproc','WizardPrompt','Wlast','Wlcol','Wlrow', + 'Wmaximum','Wminimum','Wontop','Woutput','Wparent','Wread', + 'Wrows','Wtitle','Wvisible','Year','Zap','_Alignment', + '_Asciicols','_Asciirows','_Assist','_Beautify','_Box','_Browser', + '_Builder','_Calcmem','_Calcvalue','_Cliptext','_Converter','_Coverage', + '_Curobj','_Dblclick','_Diarydate','_Dos','_Foxdoc','_Foxgraph', + '_Gallery','_Gengraph','_Genhtml','_Genmenu','_Genpd','_Genscrn', + '_Genxtab','_Getexpr','_Include','_Indent','_Lmargin','_Mac', + '_Mbr_appnd','_Mbr_cpart','_Mbr_delet','_Mbr_font','_Mbr_goto','_Mbr_grid', + '_Mbr_link','_Mbr_mode','_Mbr_mvfld','_Mbr_mvprt','_Mbr_seek','_Mbr_sp100', + '_Mbr_sp200','_Mbr_szfld','_Mbrowse','_Mda_appnd','_Mda_avg','_Mda_brow', + '_Mda_calc','_Mda_copy','_Mda_count','_Mda_label','_Mda_pack','_Mda_reprt', + '_Mda_rindx','_Mda_setup','_Mda_sort','_Mda_sp100','_Mda_sp200','_Mda_sp300', + '_Mda_sum','_Mda_total','_Mdata','_Mdiary','_Med_clear','_Med_copy', + '_Med_cut','_Med_cvtst','_Med_find','_Med_finda','_Med_goto','_Med_insob', + '_Med_link','_Med_obj','_Med_paste','_Med_pref','_Med_pstlk','_Med_redo', + '_Med_repl','_Med_repla','_Med_slcta','_Med_sp100','_Med_sp200','_Med_sp300', + '_Med_sp400','_Med_sp500','_Med_undo','_Medit','_Mfi_clall','_Mfi_close', + '_Mfi_export','_Mfi_import','_Mfi_new','_Mfi_open','_Mfi_pgset','_Mfi_prevu', + '_Mfi_print','_Mfi_quit','_Mfi_revrt','_Mfi_savas','_Mfi_save','_Mfi_send', + '_Mfi_setup','_Mfi_sp100','_Mfi_sp200','_Mfi_sp300','_Mfi_sp400','_Mfile', + '_Mfiler','_Mfirst','_Mlabel','_Mlast','_Mline','_Mmacro', + '_Mmbldr','_Mpr_beaut','_Mpr_cancl','_Mpr_compl','_Mpr_do','_Mpr_docum', + '_Mpr_formwz','_Mpr_gener','_Mpr_graph','_Mpr_resum','_Mpr_sp100','_Mpr_sp200', + '_Mpr_sp300','_Mpr_suspend','_Mprog','_Mproj','_Mrc_appnd','_Mrc_chnge', + '_Mrc_cont','_Mrc_delet','_Mrc_goto','_Mrc_locat','_Mrc_recal','_Mrc_repl', + '_Mrc_seek','_Mrc_sp100','_Mrc_sp200','_Mrecord','_Mreport','_Mrqbe', + '_Mscreen','_Msm_data','_Msm_edit','_Msm_file','_Msm_format','_Msm_prog', + '_Msm_recrd','_Msm_systm','_Msm_text','_Msm_tools','_Msm_view','_Msm_windo', + '_Mst_about','_Mst_ascii','_Mst_calcu','_Mst_captr','_Mst_dbase','_Mst_diary', + '_Mst_filer','_Mst_help','_Mst_hphow','_Mst_hpsch','_Mst_macro','_Mst_office', + '_Mst_puzzl','_Mst_sp100','_Mst_sp200','_Mst_sp300','_Mst_specl','_Msysmenu', + '_Msystem','_Mtable','_Mtb_appnd','_Mtb_cpart','_Mtb_delet','_Mtb_delrc', + '_Mtb_goto','_Mtb_link','_Mtb_mvfld','_Mtb_mvprt','_Mtb_props','_Mtb_recal', + '_Mtb_sp100','_Mtb_sp200','_Mtb_sp300','_Mtb_sp400','_Mtb_szfld','_Mwi_arran', + '_Mwi_clear','_Mwi_cmd','_Mwi_color','_Mwi_debug','_Mwi_hide','_Mwi_hidea', + '_Mwi_min','_Mwi_move','_Mwi_rotat','_Mwi_showa','_Mwi_size','_Mwi_sp100', + '_Mwi_sp200','_Mwi_toolb','_Mwi_trace','_Mwi_view','_Mwi_zoom','_Mwindow', + '_Mwizards','_Mwz_all','_Mwz_form','_Mwz_foxdoc','_Mwz_import','_Mwz_label', + '_Mwz_mail','_Mwz_pivot','_Mwz_query','_Mwz_reprt','_Mwz_setup','_Mwz_table', + '_Mwz_upsizing','_Netware','_Oracle','_Padvance','_Pageno','_Pbpage', + '_Pcolno','_Pcopies','_Pdparms','_Pdriver','_Pdsetup','_Pecode', + '_Peject','_Pepage','_Pform','_Plength','_Plineno','_Ploffset', + '_Ppitch','_Pquality','_Pretext','_Pscode','_Pspacing','_Pwait', + '_Rmargin','_Runactivedoc','_Samples','_Screen','_Shell','_Spellchk', + '_Sqlserver','_Startup','_Tabs','_Tally','_Text','_Throttle', + '_Transport','_Triggerlevel','_Unix','_WebDevOnly','_WebMenu','_WebMsftHomePage', + '_WebVFPHomePage','_WebVfpOnlineSupport','_Windows','_Wizard','_Wrap','_scctext', + '_vfp','Additive','After','Again','Aindent','Alignright', + 'All','Alt','Alternate','And','Ansi','Any', + 'Aplabout','App','Array','As','Asc','Ascending', + 'Ascii','At','Attributes','Automatic','Autosave','Avg', + 'Bar','Before','Bell','Between','Bitmap','Blank', + 'Blink','Blocksize','Border','Bottom','Brstatus','Bucket', + 'Buffers','By','Candidate','Carry','Cascade','Catalog', + 'Cdx','Center','Century','Cga','Character','Check', + 'Classlib','Clock','Cnt','Codepage','Collate','Color', + 'Com1','Com2','Command','Compact','Compatible','Compress', + 'Confirm','Connection','Connections','Connstring','Console','Copies', + 'Cpcompile','Cpdialog','Csv','Currency','Cycle','Databases', + 'Datasource','Date','Db4','Dbc','Dbf','Dbmemo3', + 'Debug','Decimals','Defaultsource','Deletetables','Delimited','Delimiters', + 'Descending','Design','Development','Device','Dif','Disabled', + 'Distinct','Dlls','Dohistory','Dos','Dosmem','Double', + 'Driver','Duplex','Echo','Editwork','Ega25','Ega43', + 'Ems','Ems64','Encrypt','Encryption','Environment','Escape', + 'Events','Exact','Except','Exe','Exists','Expression', + 'Extended','F','Fdow','Fetch','Field','Fields', + 'File','Files','Fill','Fixed','Float','Foldconst', + 'Font','Footer','Force','Foreign','Fox2x','Foxplus', + 'Free','Freeze','From','Fullpath','Fw2','Fweek', + 'Get','Gets','Global','Group','Grow','Halfheight', + 'Having','Heading','Headings','Helpfilter','History','Hmemory', + 'Hours','Id','In','Indexes','Information','Instruct', + 'Int','Integer','Intensity','Intersect','Into','Is', + 'Isometric','Key','Keycolumns','Keycomp','Keyset','Last', + 'Ledit','Level','Library','Like','Linked','Lock', + 'Logerrors','Long','Lpartition','Mac','Macdesktop','Machelp', + 'Mackey','Macros','Mark','Master','Max','Maxmem', + 'Mdi','Memlimit','Memory','Memos','Memowidth','Memvar', + 'Menus','Messages','Middle','Min','Minimize','Minus', + 'Mod','Modal','Module','Mono43','Movers','Multilocks', + 'Mvarsiz','Mvcount','N','Near','Negotiate','Noalias', + 'Noappend','Noclear','Noclose','Noconsole','Nocptrans','Nodata', + 'Nodebug','Nodelete','Nodup','Noedit','Noeject','Noenvironment', + 'Nofloat','Nofollow','Nogrow','Noinit','Nolgrid','Nolink', + 'Nolock','Nomargin','Nomdi','Nomenu','Nominimize','Nomodify' + ), + 3 => array('Nomouse','None','Nooptimize','Nooverwrite','Noprojecthook','Noprompt', + 'Noread','Norefresh','Norequery','Norgrid','Norm','Normal', + 'Nosave','Noshadow','Noshow','Nospace','Not','Notab', + 'Notify','Noupdate','Novalidate','Noverify','Nowait','Nowindow', + 'Nowrap','Nozoom','Npv','Null','Number','Objects', + 'Odometer','Of','Off','Oleobjects','Only','Optimize', + 'Or','Orientation','Output','Outshow','Overlay','Overwrite', + 'Pad','Palette','Paperlength','Papersize','Paperwidth','Password', + 'Path','Pattern','Pause','Pdox','Pdsetup','Pen', + 'Pfs','Pixels','Plain','Popups','Precision','Preference', + 'Preview','Primary','Printer','Printquality','Procedures','Production', + 'Program','Progwork','Project','Prompt','Query','Random', + 'Range','Readborder','Readerror','Record','Recover','Redit', + 'Reference','References','Relative','Remote','Reprocess','Resource', + 'Rest','Restrict','Rgb','Right','Row','Rowset', + 'Rpd','Runtime','Safety','Same','Sample','Say', + 'Scale','Scheme','Scoreboard','Screen','Sdf','Seconds', + 'Selection','Shadows','Shared','Sheet','Shell','Shift', + 'Shutdown','Single','Some','Sortwork','Space','Sql', + 'Standalone','Status','Std','Step','Sticky','String', + 'Structure','Subclass','Summary','Sylk','Sysformats','Sysmenus', + 'System','T','Tab','Tables','Talk','Tedit', + 'Textmerge','Time','Timeout','Titles','Tmpfiles','To', + 'Topic','Transaction','Trap','Trbetween','Trigger','Ttoption', + 'Typeahead','Udfparms','Union','Unique','Userid','Users', + 'Values','Var','Verb','Vga25','Vga50','Views', + 'Volume','Where','Windows','Wk1','Wk3','Wks', + 'Workarea','Wp','Wr1','Wrap','Wrk','Xcmdfile', + 'Xl5','Xl8','Xls','Y','Yresolution','Zoom', + 'Activate','ActivateCell','Add','AddColumn','AddItem','AddListItem', + 'AddObject','AddProperty','AddToSCC','AfterBuild','AfterCloseTables','AfterDock', + 'AfterRowColChange','BeforeBuild','BeforeDock','BeforeOpenTables','BeforeRowColChange','Box', + 'Build','CheckIn','CheckOut','Circle','Clear','ClearData', + 'Cleanup','Click','CloneObject','CloseEditor','CloseTables','Cls', + 'CommandTargetExec','CommandTargetQueryStas','ContainerRelease','DataToClip','DblClick','Deactivate', + 'Delete','DeleteColumn','Deleted','Destroy','DoCmd','Dock', + 'DoScroll','DoVerb','DownClick','Drag','DragDrop','DragOver', + 'DropDown','Draw','EnterFocus','Error','ErrorMessage','Eval', + 'ExitFocus','FormatChange','GetData','GetFormat','GetLatestVersion','GoBack', + 'GotFocus','GoForward','GridHitTest','Hide','HideDoc','IndexToItemId', + 'Init','InteractiveChange','Item','ItemIdToIndex','KeyPress','Line', + 'Load','LostFocus','Message','MiddleClick','MouseDown','MouseMove', + 'MouseUp','MouseWheel','Move','Moved','NavigateTo','Newobject', + 'OLECompleteDrag','OLEDrag','OLEDragDrop','OLEDragOver','OLEGiveFeedback','OLESetData', + 'OLEStartDrag','OpenEditor','OpenTables','Paint','Point','Print', + 'ProgrammaticChange','PSet','QueryAddFile','QueryModifyFile','QueryRemoveFile','QueryRunFile', + 'QueryUnload','RangeHigh','RangeLow','ReadActivate','ReadExpression','ReadDeactivate', + 'ReadMethod','ReadShow','ReadValid','ReadWhen','Refresh','Release', + 'RemoveFromSCC','RemoveItem','RemoveListItem','RemoveObject','Requery','RequestData', + 'Reset','ResetToDefault','Resize','RightClick','SaveAs','SaveAsClass', + 'Scrolled','SetAll','SetData','SetFocus','SetFormat','SetMain', + 'SetVar','SetViewPort','ShowDoc','ShowWhatsThis','TextHeight','TextWidth', + 'Timer','UIEnable','UnDock','UndoCheckOut','Unload','UpClick', + 'Valid','WhatsThisMode','When','WriteExpression','WriteMethod','ZOrder', + 'ATGetColors','ATListColors','Accelerate','ActiveColumn','ActiveControl','ActiveForm', + 'ActiveObjectId','ActivePage','ActiveProject','ActiveRow','AddLineFeeds','Alias', + 'Alignment','AllowAddNew','AllowHeaderSizing','AllowResize','AllowRowSizing','AllowTabs', + 'AlwaysOnTop','Application','AutoActivate','AutoCenter','AutoCloseTables','AutoIncrement', + 'AutoOpenTables','AutoRelease','AutoSize','AutoVerbMenu','AutoYield','AvailNum', + 'BackColor','BackStyle','BaseClass','BorderColor','BorderStyle','BorderWidth', + 'Bound','BoundColumn','BoundTo','BrowseAlignment','BrowseCellMarg','BrowseDestWidth', + 'BufferMode','BufferModeOverride','BuildDateTime','ButtonCount','ButtonIndex','Buttons', + 'CLSID','CanAccelerate','CanGetFocus','CanLoseFocus','Cancel','Caption', + 'ChildAlias','ChildOrder','Class','ClassLibrary','ClipControls','ClipRect', + 'Closable','ColorScheme','ColorSource','ColumnCount','ColumnHeaders','ColumnLines', + 'ColumnOrder','ColumnWidths','Columns','Comment','ContinuousScroll','ControlBox', + 'ControlCount','ControlIndex','ControlSource','Controls','CurrentControl','CurrentX', + 'CurrentY','CursorSource','Curvature','DataSession','DataSessionId','DataSourceObj', + 'DataType','Database','DateFormat','DateMark','DefButton','DefButtonOrig', + 'DefHeight','DefLeft','DefTop','DefWidth','Default','DefaultFilePath', + 'DefineWindows','DeleteMark','Desktop','Dirty','DisabledBackColor','DisabledByEOF', + 'DisabledForeColor','DisabledItemBackColor','DisabledItemForeColor','DisabledPicture','DispPageHeight','DispPageWidth', + 'DisplayCount','DisplayValue','DoCreate','DockPosition','Docked','DocumentFile', + 'DownPicture','DragIcon','DragMode','DragState','DrawMode','DrawStyle', + 'DrawWidth','DynamicAlignment','DynamicBackColor','DynamicCurrentControl','DynamicFontBold','DynamicFontItalic', + 'DynamicFontName','DynamicFontOutline','DynamicFontShadow','DynamicFontSize','DynamicFontStrikethru','DynamicFontUnderline', + 'DynamicForeColor','EditFlags','Enabled','EnabledByReadLock','Encrypted','EnvLevel', + 'ErasePage','FileClass','FileClassLibrary','FillColor','FillStyle','Filter', + 'FirstElement','FontBold','FontItalic','FontName','FontOutline','FontShadow', + 'FontSize','FontStrikethru','FontUnderline','ForceFocus','ForeColor','FormCount', + 'FormIndex','FormPageCount','FormPageIndex','Format','Forms','FoxFont', + 'FullName','GoFirst','GoLast','GridLineColor','GridLineWidth','GridLines' + ), + 4 => array('HPROJ','HWnd','HalfHeightCaption','HasClip','HeaderGap','HeaderHeight', + 'Height','HelpContextID','HideSelection','Highlight','HomeDir','HostName', + 'HotKey','HscrollSmallChange','IMEMode','Icon','IgnoreInsert','InResize', + 'Increment','IncrementalSearch','InitialSelectedAlias','InputMask','Instancing','IntegralHeight', + 'Interval','ItemBackColor','ItemData','ItemForeColor','ItemIDData','ItemTips', + 'JustReadLocked','KeyPreview','KeyboardHighValue','KeyboardLowValue','LastModified','Left', + 'LeftColumn','LineSlant','LinkMaster','List','ListCount','ListIndex', + 'ListItem','ListItemId','LockDataSource','LockScreen','MDIForm','MainClass', + 'MainFile','Margin','MaxButton','MaxHeight','MaxLeft','MaxLength', + 'MaxTop','MaxWidth','MemoWindow','MinButton','MinHeight','MinWidth', + 'MouseIcon','MousePointer','Movable','MoverBars','MultiSelect','Name', + 'NapTime','NewIndex','NewItemId','NoDataOnLoad','NoDefine','NotifyContainer', + 'NullDisplay','NumberOfElements','OLEDragMode','OLEDragPicture','OLEDropEffects','OLEDropHasData', + 'OLEDropMode','OLERequestPendingTimeOut','OLEServerBusyRaiseError','OLEServerBusyTimeOut','OLETypeAllowed','OleClass', + 'OleClassId','OleControlContainer','OleIDispInValue','OleIDispOutValue','OleIDispatchIncoming','OleIDispatchOutgoing', + 'OnResize','OneToMany','OpenViews','OpenWindow','PageCount','PageHeight', + 'PageOrder','PageWidth','Pages','Panel','PanelLink','Parent', + 'ParentAlias','ParentClass','Partition','PasswordChar','Picture','ProcessID', + 'ProgID','ProjectHookClass','ProjectHookLibrary','Projects','ReadColors','ReadCycle', + 'ReadFiller','ReadLock','ReadMouse','ReadOnly','ReadSave','ReadSize', + 'ReadTimeout','RecordMark','RecordSource','RecordSourceType','Rect','RelationalExpr', + 'RelativeColumn','RelativeRow','ReleaseErase','ReleaseType','ReleaseWindows','Resizable', + 'RightToLeft','RowHeight','RowSource','RowSourceType','SCCProvider','SCCStatus', + 'SDIForm','ScaleMode','ScrollBars','SelLength','SelStart','SelText', + 'SelectOnEntry','Selected','SelectedBackColor','SelectedForeColor','SelectedID','SelectedItemBackColor', + 'SelectedItemForeColor','SelfEdit','ServerClass','ServerClassLibrary','ServerHelpFile','ServerName', + 'ServerProject','ShowTips','ShowWindow','Sizable','Size','Size', + 'Size','Skip','SkipForm','Sorted','SourceType','Sparse', + 'SpecialEffect','SpinnerHighValue','SpinnerLowValue','SplitBar','StartMode','StatusBarText', + 'Stretch','StrictDateEntry','Style','SystemRefCount','TabIndex','TabStop', + 'TabStretch','TabStyle','Tabhit','Tabs','Tag','TerminateRead', + 'ThreadID','TitleBar','ToolTipText','Top','TopIndex','TopItemId', + 'TypeLibCLSID','TypeLibDesc','TypeLibName','UnlockDataSource','Value','ValueDirty', + 'VersionComments','VersionCompany','VersionCopyright','VersionDescription','VersionNumber','VersionProduct', + 'VersionTrademarks','View','ViewPortHeight','ViewPortLeft','ViewPortTop','ViewPortWidth', + 'Visible','VscrollSmallChange','WasActive','WasOpen','WhatsThisButton','WhatsThisHelp', + 'WhatsThisHelpID','Width','WindowList','WindowNTIList','WindowState','WindowType', + 'WordWrap','ZOrderSet','ActiveDoc','Checkbox','Column','ComboBox', + 'CommandButton','CommandGroup','Container','Control','Cursor','Custom', + 'DataEnvironment','EditBox','Empty','FontClass','Form','Formset', + 'General','Grid','Header','HyperLink','Image','Label', + 'ListBox','Memo','OleBaseControl','OleBoundControl','OleClassIDispOut','OleControl', + 'OptionButton','OptionGroup','Page','PageFrame','ProjectHook','RectClass', + 'Relation','Session','Shape','Spinner','TextBox' ,'Toolbar' + ), + ), + 'SYMBOLS' => array("!", "@", "$", "%", "(", ")", "-", "+", "=", "/", "{", "}", "[", "]", ":", ";", ",", " ", ".", "*", "&"), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: blue;', + 2 => 'color: blue;', + 3 => 'color: blue;', + 4 => 'color: blue;' + ), + 'COMMENTS' => array( + 1 => 'color: green; font-style: italic;', + 2 => 'color: green; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: blue;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: blue;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/winbatch.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/winbatch.php new file mode 100644 index 0000000..6228a79 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/winbatch.php @@ -0,0 +1,367 @@ + 'Winbatch', + 'COMMENT_SINGLE' => array(1 => ';', 2 => ':'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"', '`'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'While', 'To', 'Then', 'Switch', 'Select', 'Return', 'Next', 'IntControl', 'Include', 'In', 'If', + 'Goto', 'GoSub', 'ForEach', 'For', 'Exit', 'Execute', 'ErrorMode', 'EndWhile', 'EndSwitch', '#EndSubRoutine', + 'EndSelect', 'EndIf', '#EEndFunction', 'EndFor', 'End', 'Else', 'DropWild', 'Drop', '#DefineSubRoutine', + '#DefineFunction', 'Debug', 'Continue', 'Case', 'CallExt', 'Call', 'By', 'BreakPoint', 'Break' + ), + 2 => array( + 'ZOOMED', 'YES', 'WORD4', 'WORD2', 'WORD1', 'WHOLESECTION', 'WAIT', 'UNSORTED', 'UNCHECK', 'TRUE', 'TILE', + 'TAB', 'STRING', 'STACK', 'SPC2NET', 'SORTED', 'SOK', 'SNET2PC', 'SINGLE', 'SHIFT', 'SERVER', 'SERRWINSOCK', + 'SERRVOICE', 'SERRSOCKET', 'SERRSERVICE', 'SERRSELECT', 'SERRPARAM', 'SERROUTOFMEM', 'SERRNOTFOUND', 'SERRNOCONN', + 'SERRNOANSWER', 'SERRMUSTWAIT', 'SERRIPADDR', 'SERRHOSTNAME', 'SERRFAILURE', 'SERRBUSY', 'SCROLLLOCK', 'SCANCEL', + 'SAVE', 'SALREADY', 'ROWS', 'REGUSERS', 'REGROOT', 'REGMACHINE', 'REGCURRENT', 'REGCLASSES', 'RDBLCLICK', 'RCLICK', + 'RBUTTON', 'RAD2DEG', 'QSUCCESSINFO', 'QSUCCESS', 'QSTILLEX', 'QROLLBACK', 'QNULL', 'QNODATA', 'QNEXT', 'QNEEDDATA', + 'QFIRST', 'QCOMMIT', 'QBADHANDLE', 'PRINTER', 'PLANCKJOULES', 'PLANCKERGS', 'PI', 'PARSEONLY', 'PARSEC', 'P3ERRREPLY', + 'OPEN', 'ON', 'OFF', 'NUMLOCK', 'NOWAIT', 'NOTIFY', 'NORMAL', 'NORESIZE', 'NONE', 'NO', 'NCSAFORMAT', 'MULTIPLE', + 'MSFORMAT', 'MPLAYRDBLCK', 'MPLAYRCLK', 'MPLAYRBUTTON', 'MPLAYMDBLCK', 'MPLAYMCLK', 'MPLAYMBUTTON', 'MPLAYLDBLCK', + 'MPLAYLCLK', 'MPLAYLBUTTON', 'MINOR', 'MDBLCLICK', 'MCLICK', 'MBYESNO', 'MBUTTON', 'MBOKCANCEL', 'MAJOR', 'MAGFIELD', + 'LOCALGROUP', 'LIGHTMTPS', 'LIGHTMPS', 'LF', 'LDBLCLICK', 'LCLICK', 'LBUTTON', 'LAFFDBERROR', 'ICON', 'HTTPS', 'HTTP', + 'HNOHEADER', 'HMETHODPOST', 'HMETHODGET', 'HIDDEN', 'HHEADERONLY', 'HHEADER', 'GRAVITATION', 'GOPHER', 'GOLDENRATIO', + 'GMTSEC', 'GLOBALGROUP', 'GFTSEC', 'GETPROCID', 'GETEXITCODE', 'FWDSCAN', 'FTPPASSIVE', 'FTP', 'FLOAT8', 'FARADAY', + 'FALSE', 'EXTENDED', 'EULERS', 'ENABLE', 'ELECTRIC', 'DRIVE', 'DISABLE', 'DESCENDING', 'DEG2RAD', 'DEFAULT', 'CTRL', + 'CRLF', 'CR', 'COMMONFORMAT', 'COLUMNS', 'CHECK', 'CAPSLOCK', 'CANCEL', 'BOLTZMANN', 'BACKSCAN', 'AVOGADRO', 'ATTR_X', + 'ATTR_T', 'ATTR_SY', 'ATTR_SH', 'ATTR_RO', 'ATTR_RI', 'ATTR_P', 'ATTR_IC', 'ATTR_H', 'ATTR_DM', 'ATTR_DI', 'ATTR_DC', + 'ATTR_CI', 'ATTR_A', 'ASCENDING', 'ARRANGE', 'AMC', 'ACC_WRITE', 'ACC_READ_NT', 'ACC_READ_95', 'ACC_READ', 'ACC_PRINT_NT', + 'ACC_PMANG_NT', 'ACC_PFULL_NT', 'ACC_LIST', 'ACC_FULL_NT', 'ACC_FULL_95', 'ACC_DELETE', 'ACC_CREATE', 'ACC_CONTROL', + 'ACC_CHNG_NT', 'ACC_ATTRIB', 'ABOVEICONS' + ), + 3 => array( + 'Yields', 'Yield', 'WinZoom', 'WinWaitExist', 'WinWaitClose', 'WinWaitChild', 'WinVersion', 'WinTitle', 'WinSysInfo', + 'WinState', 'WinShow', 'WinResources', 'WinPositionChild', 'WinPosition', 'WinPlaceSet', 'WinPlaceGet', 'WinPlaceChild', + 'WinPlace', 'WinParmSet', 'WinParmGet', 'WinName', 'WinMetrics', 'WinItemProcId', 'WinItemNameId', 'WinItemizeEx', + 'WinItemize', 'WinItemChild', 'WinIsDos', 'WinIdGet', 'WinIconize', 'WinHide', 'WinHelp', 'WinGetactive', 'WinExistchild', + 'WinExist', 'WinExename', 'WinConfig', 'WinClosenot', 'WinClose', 'WinArrange', 'WinActivechild', 'WinActivchild', + 'WinActivate', 'WebVerifyCard', 'WebSetTimeout', 'WebParamSize', 'WebParamNames', 'WebParamFile', 'WebParamData', + 'WebParamBuf', 'WebOutFile', 'WebOutBinary', 'WebOut', 'WebDumpError', 'WebDatData', 'WebCounter', 'WebConSize', 'WebConData', + 'WebConBuf', 'WebCmdData', 'WebBaseConv', 'Wallpaper', 'WaitForKeyEX', 'WaitForKey', 'VersionDLL', 'Version', 'VarType', + 'TimeYmdHms', 'TimeWait', 'TimeSubtract', 'TimeJulToYmd', 'TimeJulianDay', 'TimeDiffSecs', 'TimeDiffDays', 'TimeDiff', 'TimeDelay', + 'TimeDate', 'TimeAdd', 'TextSelect', 'TextBoxSort', 'TextBox', 'Terminate', 'Tanh', 'Tan', 'SysParamInfo', 'SvcWaitForCmd', + 'SvcSetState', 'SvcSetAccept', 'StrUpper', 'StrTrim', 'StrSubWild', 'StrSub', 'StrScan', 'StrReplace', 'StrLower', 'StrLenWild', + 'StrLen', 'StrIndexWild', 'StrIndexNC', 'StrIndex', 'StriCmp', 'StrFixLeft', 'StrFixCharsL', 'StrFixChars', 'StrFix', 'StrFill', + 'StrCnt', 'StrCmp', 'StrClean', 'StrCharCount', 'StrCat', 'StrByteCount', 'Sqrt', 'SoundVolume', 'Sounds', 'Snapshot', 'Sinh', 'Sin', + 'ShortCutMake', 'ShortCutInfo', 'ShortCutExtra', 'ShortCutEdit', 'ShortCutDir', 'ShellExecute', 'SendMenusToEx', 'SendMenusTo', + 'SendKeysTo', 'SendKeysChild', 'SendKey', 'RunZoomWait', 'RunZoom', 'RunWithLogon', 'RunWait', 'RunShell', 'RunIconWait', + 'RunIcon', 'RunHideWait', 'RunHide', 'RunExit', 'RunEnviron', 'Run', 'RtStatus', 'Reload', 'RegUnloadHive', 'RegSetValue', + 'RegSetQword', 'RegSetMulSz', 'RegSetExpSz', 'RegSetEx', 'RegSetDword', 'RegSetBin', 'RegQueryValue', 'RegQueryStr', + 'RegQueryQword', 'RegQueryMulSz', 'RegQueryKeys', 'RegQueryKeyLastWriteTime', 'RegQueryKey', 'RegQueryItem', 'RegQueryExpSz', + 'RegQueryEx', 'RegQueryDword', 'RegQueryBin', 'RegOpenKeyEx', 'RegOpenKey', 'RegOpenFlags', 'RegLoadHive', 'RegExistValue', + 'RegExistKey', 'RegEntryType', 'RegDelValue', 'RegDeleteKey', 'RegCreateKey', 'RegConnect', 'RegCloseKey', 'RegApp', 'Random', + 'PtrPersistent', 'PtrGlobalDefine', 'PtrGlobal', 'Print', 'PlayWaveform', 'PlayMidi', 'PlayMedia', 'PipeServerWrite', 'PipeServerRead', + 'PipeServerCreate', 'PipeServerClose', 'PipeInfo', 'PipeClientSendRecvData', 'PipeClientOpen', 'PipeClientClose', 'Pause', + 'ParseData', 'ObjectTypeGet', 'ObjectType', 'ObjectOpen', 'ObjectGet', 'ObjectEventRemove', 'objecteventremove', 'ObjectEventAdd', + 'objecteventadd', 'ObjectCreate', 'ObjectConstToArray', 'ObjectConstantsGet', 'ObjectCollectionOpen', 'ObjectCollectionNext', + 'ObjectCollectionClose', 'ObjectClose', 'ObjectAccess', 'Num2Char', 'NetInfo', 'MsgTextGet', 'MousePlay', 'MouseMove', 'MouseInfo', + 'MouseDrag', 'MouseCoords', 'MouseClickBtn', 'MouseClick', 'mod', 'Min', 'Message', 'Max', 'Loge', 'LogDisk', 'Log10', 'LastError', + 'KeyToggleSet', 'KeyToggleGet', 'ItemSortNc', 'ItemSort', 'ItemSelect', 'ItemReplace', 'ItemRemove', 'ItemLocate', 'ItemInsert', + 'ItemExtractCSV', 'ItemExtract', 'ItemCountCSV', 'ItemCount', 'IsNumber', 'IsLicensed', 'IsKeyDown', 'IsInt', 'IsFloat', 'IsDefined', + 'Int', 'InstallFile', 'IniWritePvt', 'IniWrite', 'IniReadPvt', 'IniRead', 'IniItemizePvt', 'IniItemize', 'IniDeletePvt', 'IniDelete', + 'IgnoreInput', 'IconReplace', 'IconInfo', 'IconExtract', 'IconArrange', 'GetTickCount', 'GetObject', 'GetExactTime', 'Floor', + 'FindWindow', 'FileYmdHms', 'FileWrite', 'FileVerInfo', 'FileTimeTouch', 'FileTimeSetEx', 'FileTimeSet', 'FileTimeGetEx', + 'FileTimeGet', 'FileTimeCode', 'FileSizeEx', 'FileSize', 'FileRoot', 'FileRename', 'FileRead', 'FilePutW', 'FilePut', 'FilePath', + 'FileOpen', 'FileNameShort', 'FileNameLong', 'FileNameEval2', 'FileNameEval1', 'FileMoveAttr', 'FileMove', 'FileMapName', + 'FileLocate', 'FileItemPath', 'FileItemize', 'FileInfoToArray', 'FileGetW', 'FileGet', 'FileFullname', 'FileExtension', 'FileExist', + 'FileDelete', 'FileCreateTemp', 'FileCopyAttr', 'FileCopy', 'FileCompare', 'FileClose', 'FileBaseName', 'FileAttrSetEx', + 'FileAttrSet', 'FileAttrGetEx', 'FileAttrGet', 'FileAppend', 'Fabs', 'ExtractAttachedFile', 'Exp', 'ExeTypeInfo', 'Exclusive', + 'EnvItemize', 'EnvironSet', 'Environment', 'EndSession', 'DosVersion', 'DllLoad', 'DllLastError', 'DllHwnd', 'DllHinst', + 'DllFree', 'DllCallCDecl', 'DllCall', 'Display', 'DiskVolinfo', 'DiskSize', 'DiskScan', 'DiskInfo', 'DiskFree', 'DiskExist', + 'DirWindows', 'DirSize', 'DirScript', 'DirRename', 'DirRemove', 'DirMake', 'DirItemize', 'DirInfoToArray', 'DirHome', 'DirGet', + 'DirExist', 'DirChange', 'DirAttrSetEx', 'DirAttrSet', 'DirAttrGetEx', 'DirAttrGet', 'DialogProcOptions', 'DialogObject', + 'DialogControlState', 'DialogControlSet', 'DialogControlGet', 'DialogBox', 'Dialog', 'Delay', 'Decimals', 'DebugTrace', + 'DebugData', 'DDETimeout', 'DDETerminate', 'DDERequest', 'DDEPoke', 'DDEInitiate', 'DDEExecute', 'DateTime', 'CurrFilepath', + 'CurrentPath', 'CurrentFile', 'CreateObject', 'Cosh', 'Cos', 'ClipPut', 'ClipHasFormat', 'ClipGetEx', 'ClipGet', 'ClipAppend', + 'ChrUnicodeToString', 'ChrUnicodeToHex', 'ChrStringToUnicode', 'ChrSetCodepage', 'ChrHexToUnicode', 'ChrGetCodepage', + 'Char2Num', 'Ceiling', 'ButtonNames', 'BoxUpdates', 'BoxTitle', 'BoxTextFont', 'BoxTextColor', 'BoxText', 'BoxShut', 'BoxPen', + 'BoxOpen', 'BoxNew', 'BoxMapmode', 'BoxesUp', 'BoxDrawText', 'BoxDrawRect', 'BoxDrawLine', 'BoxDrawCircle', 'BoxDestroy', + 'BoxDataTag', 'BoxDataClear', 'BoxColor', 'BoxCaption', 'BoxButtonWait', 'BoxButtonStat', 'BoxButtonKill', 'BoxButtonDraw', + 'BoxBitMap', 'BinaryXor', 'BinaryXlate', 'BinaryWriteEx', 'BinaryWrite', 'BinaryTagRepl', 'BinaryTagLen', 'BinaryTagInit', + 'BinaryTagIndex', 'BinaryTagFind', 'BinaryTagExtr', 'BinaryStrCnt', 'BinarySort', 'BinaryReplace', 'BinaryReadEx', + 'BinaryRead', 'BinaryPokeStrW', 'BinaryPokeStr', 'BinaryPokeHex', 'BinaryPokeFlt', 'BinaryPoke4', 'BinaryPoke2', 'BinaryPoke', + 'BinaryPeekStrW', 'BinaryPeekStr', 'BinaryPeekHex', 'BinaryPeekFlt', 'BinaryPeek4', 'BinaryPeek2', 'BinaryPeek', 'BinaryOr', + 'BinaryOleType', 'BinaryIndexNc', 'BinaryIndexEx', 'BinaryIndexBin', 'BinaryIndex', 'BinaryIncrFlt', 'BinaryIncr4', + 'BinaryIncr2', 'BinaryIncr', 'BinaryHashRec', 'BinaryFree', 'BinaryEodSet', 'BinaryEodGet', 'BinaryCopy', 'BinaryConvert', + 'BinaryCompare', 'BinaryClipPut', 'BinaryClipGet', 'BinaryChecksum', 'BinaryBufInfo', 'BinaryAnd', 'BinaryAllocArray', + 'BinaryAlloc', 'Beep', 'Average', 'Atan', 'AskYesNo', 'AskTextbox', 'AskPassword', 'AskLine', 'AskItemlist', 'AskFont', + 'AskFiletext', 'AskFilename', 'AskDirectory', 'AskColor', 'Asin', 'ArrInitialize', 'ArrInfo', 'ArrDimension', + 'Arrayize', 'ArrayFilePutCSV', 'ArrayFilePut', 'ArrayFileGetCSV', 'ArrayFileGet', 'AppWaitClose', 'AppExist', 'AddExtender', + 'Acos', 'Abs', 'About' + ), + 4 => array( + 'zZipFiles', 'zVersionInfo', 'zVersion', 'zUnZipFiles', 'zSetPortBit', 'zRPortShift', 'zPortOut', 'zPortIn', 'zNotPortBit', + 'zLPortShift', 'zGetPortBit', 'zClrPortBit', 'xVerifyCCard', 'xSendMessage', 'xMessageBox', 'xMemCompact', 'xHex', 'xGetElapsed', + 'xGetChildHwnd', 'xExtenderInfo', 'xEnumStreams', 'xEjectMedia', 'xDriveReady', 'xDiskLabelGet', 'xCursorSet', 'xBaseConvert', + 'wxPing', 'wxParmSet', 'wxParmGet', 'wxMsgSetHdr', 'wxMsgGetHdr', 'wxMsgGetBody', 'wxHost2Addr', 'wxGetLastErr', 'wxGetInfo', + 'wxGetErrDesc', 'wxAddr2Host', 'wtsWaitSystemEvent', 'wtsVersion', 'wtsTerminateProcess', 'wtsShutdownSystem', 'wtsSendMessage', + 'wtsQuerySessionInfo', 'wtsProcIdToSessId', 'wtsLogoffSession', 'wtsLastErrMsg', 'wtsIsTSEnabled', 'wtsIsCitrixEnabled', + 'wtsGetActiveConsoleSessId', 'wtsEnumSessions', 'wtsEnumProcesses', 'wtsDisconnectSession', 'wnWrkGroups', 'wnVersion', 'wntWtsUserSet', + 'wntWtsUserGet', 'wntVersion', 'wntUserSidChk', 'wntUserSetDat', 'wntUserRename', 'wntUserProps', 'wntUserList', 'wntUserInfo', + 'wntUserGetDat', 'wntUserFiles', 'wntUserExist', 'wntUserDel', 'wntUserAddDat', 'wntUserAdd', 'wntSvcStatus', 'wntSvcStart', + 'wntSvcList', 'wntSvcDelete', 'wntSvcCreate', 'wntSvcControl', 'wntSvcCfgSet', 'wntSvcCfgGet', 'wntShutdown', 'wntShareUsers', + 'wntShareSet', 'wntShareList', 'wntShareInfo', 'wntShareDel', 'wntShareAdd', 'wntServiceInf', 'wntServiceAt', 'wntServerType', + 'wntServerList', 'wntServerInfo', 'wntSecurityGet', 'wntRunAsUser', 'wntResources2', 'wntResources', 'wntRemoteTime', 'wntRasUserSet', + 'wntRasUserGet', 'wntProfileInfo', 'wntProfileDel', 'wntPrivUsers', 'wntPrivList', 'wntPrivGet', 'wntPrivDel', 'wntPrivAdd', + 'wntOwnerSet', 'wntOwnerGet', 'wntMemberSet', 'wntMemberLst2', 'wntMemberList', 'wntMemberGrps', 'wntMemberGet', 'wntMemberDel', + 'wntLsaPolSet', 'wntLsaPolGet', 'wntListGroups', 'wntLastErrMsg', 'wntGroupRen', 'wntGroupInfo', 'wntGroupEdit', 'wntGroupDel', + 'wntGroupAdd', 'wntGetUser', 'wntGetDrive', 'wntGetDc', 'wntGetCon', 'wntFileUsers', 'wntFilesOpen', 'wntFileClose', 'wntEventWrite', + 'wntEventLog', 'wntDomainSync', 'wntDirDialog', 'wntDfsList', 'wntDfsGetInfo', 'wntCurrUsers', 'wntChgPswd', 'wntCancelCon', + 'wntAuditMod', 'wntAuditList', 'wntAuditGet', 'wntAuditDel', 'wntAuditAdd2', 'wntAuditAdd', 'wntAddPrinter', 'wntAddDrive', + 'wntAcctPolSet', 'wntAcctPolGet', 'wntAcctList', 'wntAcctInfo', 'wntAccessMod', 'wntAccessList', 'wntAccessGet', 'wntAccessDel', + 'wntaccessadd2', 'wntAccessAdd', 'wnShares', 'wnSharePath', 'wnShareName', 'wnShareCnt', 'wnServers', 'wnRestore', 'wnNetNames', + 'wnGetUser', 'wnGetCon', 'wnGetCaps', 'wnDlgShare', 'wnDlgNoShare', 'wnDlgDiscon', 'wnDlgCon4', 'wnDlgCon3', 'wnDlgCon2', 'wnDlgCon', + 'wnDlgBrowse', 'wnDialog', 'wnCmptrInfo', 'wnCancelCon', 'wnAddCon', 'WaitSRQ', 'w9xVersion', 'w9xUserSetDat', 'w9xUserRename', + 'w9xUserprops', 'w9xUserList', 'w9xUserinfo', 'w9xUserGetDat', 'w9xUserExist', 'w9xUserDel', 'w9xUserAddDat', 'w9xUserAdd', 'w9xShareSet', + 'w9xShareInfo', 'w9xShareDel', 'w9xShareAdd', 'w9xServiceAt', 'w9xServerList', 'w9xRemoteTime', 'w9xOwnerGet', 'w9xMemberSet', + 'w9xMemberList', 'w9xMemberGrps', 'w9xMemberGet', 'w9xMemberDel', 'w9xListGroups', 'w9xGroupInfo', 'w9xGroupDel', 'w9xGroupAdd', + 'w9xGetDC', 'w9xFileUsers', 'w9xAccessList', 'w9xAccessGet', 'w9xAccessDel', 'w9xAccessAdd', 'w95Version', 'w95ShareUsers', + 'w95ShareSet', 'w95ShareList', 'w95ShareInfo', 'w95ShareDel', 'w95ShareAdd', 'w95ServiceInf', 'w95ServiceAt', 'w95ServerType', + 'w95ServerInfo', 'w95Resources', 'w95GetUser', 'w95GetDrive', 'w95GetCon', 'w95FileUsers', 'w95FileClose', 'w95DirDialog', + 'w95CancelCon', 'w95AddPrinter', 'w95AddDrive', 'w95AccessDel', 'w95AccessAdd', 'w3Version', 'w3PrtBrowse', 'w3NetGetUser', + 'w3NetDialog', 'w3GetCon', 'w3GetCaps', 'w3DirBrowse', 'w3CancelCon', 'w3AddCon', 'urlGetScheme', 'urlEncode', 'urlDecode', + 'tVersion', 'tSetPriority', 'TriggerList', 'Trigger', 'tRemoteConn', 'tOpenProc', 'tListProc', 'tListMod', 'tKillProc', 'tGetProcInfo', + 'tGetPriority', 'tGetModInfo', 'tGetLastError', 'tGetData', 'TestSys', 'TestSRQ', 'tCountProc', 'tCompatible', 'tCloseProc', + 'tBrowseCntrs', 'sSendString', 'sSendNum', 'sSendLine', 'sSendBinary', 'sRecvNum', 'sRecvLine', 'sRecvBinary', 'SrchVersion', + 'SrchNext', 'SrchInit', 'SrchFree', 'sOpen', 'sOK2Send', 'sOK2Recv', 'smtpSendText', 'smtpSendFile', 'sListen', 'SetRWLS', + 'SendSetup', 'SendLLO', 'SendList', 'SendIFC', 'SendDataBytes', 'SendCmds', 'Send', 'sConnect', 'sClose', 'SByteOrder32', + 'sByteOrder16', 'sAccept', 'rRegVersion', 'rRegSearch', 'ResetSys', 'ReceiveSetup', 'Receive', 'ReadStsByte', 'RcvRespMsg', + 'RasVersion', 'RasTypeSize', 'RasRename', 'RasNumCons', 'RasNameValid', 'RasListActCon', 'RasItemize', 'RasHangUp', 'RasGetLastErr', + 'RasGetConStat', 'RasEntrySet', 'RasEntryInfo', 'RasEntryExist', 'RasEntryDel', 'RasEntryAdd', 'RasDialInfo', 'RasDial', + 'RasCopy', 'RasConStatus', 'qVersionInfo', 'qTransact', 'qTables', 'qSpecial', 'qSetConnOpt', 'qNumRsltCol', 'qNativeSql', 'qLastCode', + 'qGetData', 'qFreeStmt', 'qFreeEnv', 'qFreeConnect', 'qFetch', 'qExecDirect', 'qError', 'qDriverList', 'qDriverCon', 'qDisconnect', + 'qDataSources', 'qConnect', 'qConfigError', 'qConfigData', 'qColumns', 'qBindCol', 'qAllocStmt', 'qAllocEnv', 'qAllocConnect', + 'pWaitFor', 'pVersionInfo', 'pTimeout', 'pSetPublish', 'pSetPrtInfo', 'pSetPrtAttrib', 'pSetDefPrtEx', 'pSetDefPrt', 'pSendFile', + 'pRecvFile', 'pPutString', 'pPutLine', 'pPutChar', 'pPutByte', 'pPutBinary', 'PPollUnconfig', 'PPollConfig', 'PPoll', 'pPeekChar', + 'pPeekByte', 'pPaperSizes', 'pPaperBins', 'pModemSReg', 'pModemParams', 'pModemInit', 'pModemHangUp', 'pModemDial', 'pModemControl', + 'pModemConnect', 'pModemCommand', 'pModemAnsRing', 'pModemAnsCall', 'pMediaTypes', 'pGetString', 'pGetPublish', 'pGetPrtList', + 'pGetPrtInfo', 'pGetPrtAttrib', 'pGetLine', 'pGetLastError', 'pGetErrorMsg', 'pGetErrorCode', 'pGetDefPrtInf', 'pGetChar', + 'pGetByte', 'pGetBinary', 'pDelPrtConn', 'pDelPrinter', 'pComOpen', 'pComModify', 'pComInfo', 'pComControl', 'pComClose', + 'pCheckSum', 'pCheckBinary', 'pCaptureOn', 'pCaptureOff', 'pCaptureLog', 'PassControl', 'pAddPrtConn', 'pAddPrinter', 'p3RecvText', + 'p3RecvFile', 'p3Peek', 'p3Open', 'p3GetReply', 'p3Delete', 'p3Count', 'p3Close', 'nwWhoAmI', 'nwVfyPassword', 'nwVersion', + 'nwSrvShutdown', 'nwSrvNLMMgr', 'nwSrvGenGUID', 'nwSrvExecNCF', 'nwSetVolLimit', 'nwSetSrvParam', 'nwSetSrvInfo', 'nwSetPrimServ', + 'nwSetPassword', 'nwSetOptions', 'nwSetFileInfo', 'nwSetDirLimit', 'nwSetDirInfo', 'nwSetContext', 'nwSetBcastMode', 'nwServerList', + 'nwSendBcastMsg', 'nwSearchObjects', 'nwSearchFilter', 'nwRenameObject', 'nwRemoveObject', 'nwReceiveBcastMsg', 'nwNameConvert', + 'nwMutateObject', 'nwMoveObject', 'nwModifyObject', 'nwMapDelete', 'nwMap', 'nwLogout', 'nwLogin', 'nwListUserGroups', + 'nwListObjects', 'nwListGroupMembers', 'nwLastErrMsg', 'nwIsUserInGroup', 'nwGetVolLimit', 'nwGetSrvStats', 'nwGetSrvParam', + 'nwGetSrvInfo', 'nwGetSrvCfg', 'nwGetOptions', 'nwGetObjValue', 'nwGetObjInfo', 'nwGetNLMInfo', 'nwGetMapped', 'nwGetFileInfo', + 'nwGetDirLimit', 'nwGetDirInfo', 'nwGetContext', 'nwGetConnInfo', 'nwGetCapture', 'nwGetBcastMode', 'nwGetAttrInfo', + 'nwDriveStatus', 'nwDrivePath', 'nwDetachFromServer', 'nwDelUserFromGroup', 'nwDelConnNum', 'nwCompareObject', 'nwClientInfo', + 'nwChgPassword', 'nwAttachToServer', 'nwAddUserToGroup', 'nwAddObject', 'netVersion', 'netResources', 'netGetUser', 'netGetCon', + 'netDirDialog', 'netCancelCon', 'netAddPrinter', 'netAddDrive', 'n4Version', 'n4UserGroups', 'n4UserGroupEx', 'n4SetPrimServ', + 'n4SetOptions', 'n4SetContextG', 'n4SetContext', 'n4ServerList', 'n4ServerInfo', 'n4ObjSearch', 'n4ObjRename', 'n4ObjOptions', + 'n4ObjMove', 'n4ObjGetVal', 'n4ObjectProps', 'n4ObjectList', 'n4ObjectInfo', 'n4ObjDelete', 'n4NameConvert', 'n4MsgsEndAll', + 'n4MsgsEnd', 'n4MemberSet', 'n4MemberGet', 'n4MemberDel', 'n4MapRoot', 'n4MapDir', 'n4MapDelete', 'n4Map', 'n4LogoutTree', + 'n4Logout', 'n4Login', 'n4GetUserName', 'n4GetUserId', 'n4GetUser', 'n4GetNetAddr', 'n4GetMapped', 'n4GetContext', + 'n4GetConnNum', 'n4FileUsers', 'n4FileTimeGet', 'n4FileAttrSet', 'n4FileAttrGet', 'n4DriveStatus', 'n4DrivePath', 'n4DirTimeGet', + 'n4DirAttrSet', 'n4DirAttrGet', 'n4Detach', 'n4ChgPassword', 'n4CapturePrt', 'n4CaptureGet', 'n4CaptureEnd', 'n4Attach', + 'n3Version', 'n3UserGroups', 'n3ServerList', 'n3ServerInfo', 'n3MsgsEndAll', 'n3MsgsEnd', 'n3MemberSet', 'n3MemberGet', + 'n3MemberDel', 'n3Maproot', 'n3Mapdir', 'n3Mapdelete', 'n3Map', 'n3Logout', 'n3GetUserId', 'n3GetUser', 'n3GetNetAddr', + 'n3GetMapped', 'n3GetConnNum', 'n3FileTimeGet', 'n3FileAttrSet', 'n3FileAttrGet', 'n3DriveStatus', 'n3DrivePath', + 'n3DirTimeGet', 'n3DirAttrSet', 'n3DirAttrGet', 'n3Detach', 'n3ChgPassword', 'n3CapturePrt', 'n3CaptureGet', + 'n3CaptureEnd', 'n3Attach', 'mVersion', 'mSyncMail', 'mSendMailEx', 'mSendMail', 'mrecvmail', 'mReadNextMsg', 'mLogOn', + 'mLogOff', 'mFindNext', 'mError', 'mCompatible', 'kVerInfo', 'kStatusInfo', 'kSendText', 'kSendFile', 'kManageImap4', + 'kInit', 'kGetMail', 'kExtra', 'kDest', 'kDeletePop3', 'iWriteDataBuf', 'iWriteData', 'iVersion', 'IUrlOpen', 'iUrlEncode', + 'iUrlDecode', 'iReadDataBuf', 'iReadData', 'ipVersion', 'ipPing', 'iPing', 'ipHost2Addr', 'ipGetLastErr', 'ipGetAddress', + 'iParseURL', 'ipAddr2Host', 'iOptionSet', 'iOptionGet', 'ImgWave', 'ImgVersion', 'ImgUnsharpMask', 'ImgThreshold', 'ImgSwirl', + 'ImgSpread', 'ImgSolarize', 'ImgShear', 'ImgSharpen', 'ImgShade', 'ImgScale', 'ImgSample', 'ImgRotate', 'ImgResize', + 'ImgReduceNoise', 'ImgRaise', 'ImgOilPaint', 'ImgNormalize', 'ImgNegate', 'ImgMotionBlur', 'ImgModulate', 'ImgMinify', + 'ImgMedianFilter', 'ImgMagnify', 'ImgLevel', 'ImgIsValid', 'ImgIsPalette', 'ImgIsMono', 'ImgIsGray', 'ImgInfo', 'ImgImplode', + 'ImgGetImageType', 'ImgGetColorCount', 'ImgGaussianBlur', 'ImgGamma', 'ImgFrame', 'ImgFlop', 'ImgFlip', 'ImgEqualize', + 'ImgEnhance', 'ImgEmboss', 'ImgCrop', 'ImgConvert', 'ImgContrast', 'ImgCompare', 'ImgColorize', 'ImgChop', 'ImgCharcoal', + 'ImgBorder', 'ImgBlur', 'ImgAddNoise', 'iLocFindNext', 'iLocFindInit', 'iHttpOpen', 'iHttpInit', 'iHttpHeaders', 'iHttpAccept', + 'iHostConnect', 'iHost2Addr', 'iGetResponse', 'iGetLastError', 'iGetIEVer', 'iGetConStatEx', 'iGetConState', 'iFtpRename', + 'iFtpPut', 'iFtpOpen', 'iFtpGet', 'iFtpFindNext', 'iFtpFindInit', 'iFtpDirRemove', 'iFtpDirMake', 'iFtpDirGet', 'iFtpDirChange', + 'iFtpDialog', 'iFtpDelete', 'iFtpCmd', 'iErrorDialog', 'iDialItemize', 'iDialHangUp', 'iDial', 'iCookieSet', 'iCookieGet', + 'iContentURL', 'iContentFile', 'iContentData', 'iClose', 'ibWrtf', 'ibWrt', 'ibWait', 'ibVersion', 'ibUnlock', 'ibTrg', + 'ibTmo', 'ibStop', 'ibStatus', 'ibSta', 'ibSre', 'ibSic', 'ibSad', 'ibRsv', 'ibRsp', 'ibRsc', 'ibRpp', 'ibRdf', 'ibRd', + 'ibPpc', 'ibPoke', 'ibPct', 'ibPad', 'ibOnl', 'ibMakeAddr', 'ibLock', 'ibLoc', 'ibLn', 'ibLines', 'ibIst', 'ibInit', + 'ibGts', 'ibGetSad', 'ibGetPad', 'ibFind', 'ibEvent', 'ibErr', 'ibEot', 'ibEos', 'iBegin', 'ibDma', 'ibDev', 'ibConfig', + 'ibCntl', 'ibCnt', 'ibCmda', 'ibCmd', 'ibClr', 'ibCac', 'ibBna', 'ibAsk', 'iAddr2Host', 'huge_Thousands', 'huge_Subtract', + 'huge_SetOptions', 'huge_Multiply', 'huge_GetLastError', 'huge_ExtenderInfo', 'huge_Divide', 'huge_Decimal', 'huge_Add', + 'httpStripHTML', 'httpRecvTextF', 'httpRecvText', 'httpRecvQuery', 'httpRecvQryF', 'httpRecvFile', 'httpGetServer', + 'httpGetQuery', 'httpGetPath', 'httpGetFile', 'httpGetDir', 'httpGetAnchor', 'httpFullPath', 'httpFirewall', 'httpAuth', + 'ftpRename', 'ftpQuote', 'ftpPut', 'ftpOpen', 'ftpList', 'ftpGet', 'ftpFirewall', 'ftpDelete', 'ftpClose', 'ftpChDir', + 'FindRQS', 'FindLstn', 'EnvSetVar', 'EnvPathDel', 'EnvPathChk', 'EnvPathAdd', 'EnvListVars', 'EnvGetVar', 'EnvGetInfo', + 'EnableRemote', 'EnableLocal', 'ehllapiWait', 'ehllapiVersion', 'ehllapiUninit', 'ehllapiStopKeyIntercept', 'ehllapiStopHostNotify', + 'ehllapiStopCloseIntercept', 'ehllapiStartKeyIntercept', 'ehllapiStartHostNotify', 'ehllapiStartCloseIntercept', + 'ehllapiSetWindowStatus', 'ehllapiSetSessionParams', 'ehllapiSetPSWindowName', 'ehllapiSetCursorLoc', 'ehllapiSendKey', + 'ehllapiSendFile', 'ehllapiSearchPS', 'ehllapiSearchField', 'ehllapiRunProfile', 'ehllapiResetSystem', 'ehllapiReserve', + 'ehllapiRelease', 'ehllapiReceiveFile', 'ehllapiQuerySystem', 'ehllapiQueryPSStatus', 'ehllapiQueryHostNotify', + 'ehllapiQueryFieldAttr', 'ehllapiQueryCursorLoc', 'ehllapiQueryCloseIntercept', 'ehllapiPostInterceptStatus', + 'ehllapiPause', 'ehllapiLastErrMsg', 'ehllapiInit', 'ehllapiGetWindowStatus', 'ehllapiGetPSHWND', 'ehllapiGetKey', + 'ehllapiFindFieldPos', 'ehllapiFindFieldLen', 'ehllapiDisconnectPS', 'ehllapiCvtRCToPos', 'ehllapiCvtPosToRC', + 'ehllapiCopyTextToPS', 'ehllapiCopyTextToField', 'ehllapiCopyTextFromPS', 'ehllapiCopyTextFromField', 'ehllapiCopyOIA', + 'ehllapiConnectPS', 'dunItemize', 'dunDisconnect', 'dunConnectEx', 'dunConnect', 'dsTestParam', 'dsSIDtoHexStr', 'dsSetSecProp', + 'dsSetProperty', 'dsSetPassword', 'dsSetObj', 'dsSetCredentX', 'dsSetCredent', 'dsRemFromGrp', 'dsRelSecObj', 'dsMoveObj', + 'dsIsObject', 'dsIsMemberGrp', 'dsIsContainer', 'dsGetUsersGrps', 'dsGetSecProp', 'dsGetPropName', 'dsGetProperty', + 'dsGetPrntPath', 'dsGetPrimGrp', 'dsGetMemGrp', 'dsGetInfo', 'dsGetClass', 'dsGetChldPath', 'dsFindPath', 'dsDeleteObj', + 'dsCreatSecObj', 'dsCreateObj', 'dsCopySecObj', 'dsAddToGrp', 'dsAclRemAce', 'dsAclOrderAce', 'dsAclGetAces', 'dsAclAddAce', + 'DevClearList', 'DevClear', 'dbTest', 'dbSwapColumns', 'dbSort', 'dbSetRecordField', 'dbSetOptions', 'dbSetErrorReporting', + 'dbSetEntireRecord', 'dbSetDelimiter', 'dbSave', 'dbOpen', 'dbNameColumn', 'dbMakeNewItem', 'dbInsertColumn', 'dbGetVersion', + 'dbGetSaveStatus', 'dbGetRecordField', 'dbGetRecordCount', 'dbGetNextItem', 'dbGetLastError', 'dbGetEntireRecord', + 'dbGetColumnType', 'dbGetColumnNumber', 'dbGetColumnName', 'dbGetColumnCount', 'dbFindRecord', 'dbExist', 'dbEasterEgg', + 'dbDeleteRecord', 'dbDeleteColumn', 'dbDebug', 'dbCookDatabases', 'dbClose', 'dbCloneRecord', 'dbBindCol', 'cWndState', + 'cWndinfo', 'cWndGetWndSpecName', 'cWndGetWndSpec', 'cWndexist', 'cWndByWndSpecName', 'cWndByWndSpec', 'cWndbyseq', + 'cWndbyname', 'cWndbyid', 'cWndbyclass', 'cWinIDConvert', 'cVersionInfo', 'cVendorId', 'cSetWndText', 'cSetUpDownPos', + 'cSetTvItem', 'cSetTrackPos', 'cSetTabItem', 'cSetLvItem', 'cSetLbItemEx', 'cSetLbItem', 'cSetIpAddr', 'cSetFocus', + 'cSetEditText', 'cSetDtpDate', 'cSetCbItem', 'cSetCalDate', 'cSendMessage', 'cRadioButton', 'cPostMessage', 'cPostButton', + 'cMemStat', 'cGetWndCursor', 'cGetUpDownPos', 'cGetUpDownMin', 'cGetUpDownMax', 'cGetTVItem', 'cGetTrackPos', 'cGetTrackMin', + 'cGetTrackMax', 'cGetTbText', 'cGetSbText', 'cGetLvText', 'cGetLvSelText', 'cGetLvFocText', 'cGetLvDdtText', 'cGetLvColText', + 'cGetLbText', 'cGetLbSelText', 'cGetLbCount', 'cGetIpAddr', 'cGetInfo', 'cGetHrText', 'cGetFocus', 'cGetEditText', 'cGetDtpDate', + 'cGetControlImageCRC', 'cGetCBText', 'cGetCbCount', 'cGetCalDate', 'cFindByName', 'cFindByClass', 'cEnablestate', 'cDblClickItem', + 'cCpuSupt', 'cCpuSpeed', 'cCpuIdExt', 'cCpuId', 'cCpuFeat', 'cCpuBenchmark', 'cCloneCheck', 'cClickToolbar', 'cClickButton', + 'cClearTvItem', 'cClearLvItem', 'cClearLbAll', 'cCheckbox', 'aVersion', 'aStatusbar', 'aShellFolder', 'aMsgTimeout', 'AllSPoll', + 'aGetLastError', 'aFileRename', 'aFileMove', 'aFileDelete', 'aFileCopy' + ), + 5 => array( + 'wWordRight', 'wWordLeft', 'wWinTile', 'wWinRestore', 'wWinNext', 'wWinMinimize', 'wWinMaximize', 'wWinCloseAll', 'wWinClose', + 'wWinCascade', 'wWinArricons', 'wViewOutput', 'wViewOptions', 'wViewHtml', 'wUpperCase', 'wUpline', 'wUndo', 'wTopOfFile', 'wToggleIns', + 'wTab', 'wStatusMsg', 'wStartSel', 'wSpellcheck', 'wSetProject', 'wSetPrefs', 'wSetColblk', 'wSetBookmark', 'wSelWordRight', + 'wSelWordLeft', 'wSelUp', 'wSelTop', 'wSelRight', 'wSelPgUp', 'wSelPgDn', 'wSelLeft', 'wSelInfo', 'wSelHome', 'wSelEnd', 'wSelectAll', + 'wSelDown', 'wSelBottom', 'wRunRebuild', 'wRunMake', 'wRunExecute', 'wRunDebug', 'wRunConfig', 'wRunCompile', 'wRunCommand', 'wRight', + 'wRepeat', 'wRedo', 'wRecord', 'wProperties', 'wPrintDirect', 'wPrinSetup', 'wPrevError', 'wPaste', 'wPageUp', 'wPageDown', 'wNextError', + 'wNewLine', 'wLowerCase', 'wLineCount', 'wLeft', 'wInvertCase', 'wInsString', 'wInsLine', 'wHome', 'wHelpKeyword', 'wHelpKeybrd', + 'wHelpIndex', 'wHelpHelp', 'wHelpCmds', 'wHelpAbout', 'wGotoLine', 'wGotoCol', 'wGetWrap', 'wGetWord', 'wGetUndo', 'wGetSelstate', + 'wGetRedo', 'wGetOutput', 'wGetModified', 'wGetLineNo', 'wGetIns', 'wGetFilename', 'wGetColNo', 'wGetChar', 'wFtpOpen', 'wFindNext', + 'wFindInFiles', 'wFind', 'wFileSaveAs', 'wFileSave', 'wFileRevert', 'wFilePrint', 'wFilePgSetup', 'wFileOpen', 'wFileNew', 'wFileMerge', + 'wFileList', 'wFileExit', 'wEndSel', 'wEndOfFile', 'wEnd', 'wEdWrap', 'wEdWordRight', 'wEdWordLeft', 'wEdUpLine', 'wEdUndo', 'wEdTopOfFile', + 'wEdToggleIns', 'wEdTab', 'wEdStartSel', 'wEdSetColBlk', 'wEdSelectAll', 'wEdRight', 'wEdRedo', 'wEdPaste', 'wEdPageUp', 'wEdPageDown', + 'wEdNewLine', 'wEdLeft', 'wEdInsString', 'wEdHome', 'wEdGoToLine', 'wEdGoToCol', 'wEdGetWord', 'wEdEndSel', 'wEdEndOfFile', 'wEdEnd', + 'wEdDownLine', 'wEdDelete', 'wEdCutLine', 'wEdCut', 'wEdCopyLine', 'wEdCopy', 'wEdClearSel', 'wEdBackTab', 'wEdBackspace', 'wDownLine', + 'wDelete', 'wDelButton', 'wCutMarked', 'wCutLine', 'wCutAppend', 'wCut', 'wCopyMarked', 'wCopyLine', 'wCopyAppend', 'wCopy', 'wCompile', + 'wClearSel', 'wChange', 'wCallMacro', 'wBackTab', 'wBackspace', 'wAutoIndent', 'wAddButton', 'edWindowTile', 'edWindowRestore', + 'edWindowNext', 'edWindowMinimize', 'edWindowMaximize', 'edWindowCloseall', 'edWindowClose', 'edWindowCascade', 'edWindowArrangeIcons', + 'edStatusMsg', 'edSearchViewOutput', 'edSearchRepeat', 'edSearchPrevError', 'edSearchNextError', 'edSearchFind', 'edSearchChange', + 'edRunRebuild', 'edRunMake', 'edRunExecute', 'edRunDebug', 'edRunConfigure', 'edRunCompile', 'edRunCommand', 'edRecord', 'edHelpProcedures', + 'edHelpKeyword', 'edHelpKeyboard', 'edHelpIndex', 'edHelpHelp', 'edHelpCommands', 'edHelpAbout', 'edGetWordWrapState', 'edGetWindowName', + 'edGetUndoState', 'edGetSelectionState', 'edGetRedoState', 'edGetModifiedStatus', 'edGetLineNumber', 'edGetInsertState', 'edGetColumnNumber', + 'edGetChar', 'edFileSetPreferences', 'edFileSaveAs', 'edFileSave', 'edFilePrinterSetup', 'edFilePrint', 'edFilePageSetup', 'edFileOpen', + 'edFileNew', 'edFileMerge', 'edFileList', 'edFileExit', 'edEditWrap', 'edEditWordRight', 'edEditWordLeft', 'edEditUpLine', 'edEditUndo', + 'edEditToggleIns', 'edEditTab', 'edEditStartSelection', 'edEditSetColumnBlock', 'edEditSetBookmark', 'edEditSelectAll', 'edEditRight', + 'edEditRedo', 'edEditPaste', 'edEditPageUp', 'edEditPageDown', 'edEditLeft', 'edEditInsertString', 'edEditGoToLine', 'edEditGoToColumn', + 'edEditGoToBookmark', 'edEditGetCurrentWord', 'edEditEndSelection', 'edEditEndOfLine', 'edEditEndOfFile', 'edEditDownline', 'edEditDelete', + 'edEditCutline', 'edEditCut', 'edEditCopyline', 'edEditCopy', 'edEditClearSelection', 'edEditBeginningOfLine', 'edEditBeginningOfFile', + 'edEditBackTab', 'edEditBackspace', 'edDeleteButton', 'edAddButton' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '!', '+', '-', '~', '$', '^', '?', '@', '%', '#', '&', '*', '|', '/', '<', '>' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #800080;', + 2 => 'color: #0080FF; font-weight: bold;', + 3 => 'color: #0000FF;', + 4 => 'color: #FF00FF;', + 5 => 'color: #008000;' + ), + 'COMMENTS' => array( + 1 => 'color: #008000; font-style: italic;', + 2 => 'color: #FF1010; font-weight: bold;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 0 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + 0 => 'color: #0000ff;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTER' => '', + 'REGEXPS' => array( + 0 => "[\\$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*" + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/xml.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/xml.php new file mode 100644 index 0000000..3c38f9c --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/xml.php @@ -0,0 +1,146 @@ + 'XML', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array(''), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + ), + 'SYMBOLS' => array( + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + ), + 'COMMENTS' => array( + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + 0 => 'color: #00bbdd;', + 1 => 'color: #ddbb00;', + 2 => 'color: #339933;', + 3 => 'color: #009900;' + ), + 'REGEXPS' => array( + 0 => 'color: #000066;', + 1 => 'font-weight: bold; color: black;', + 2 => 'font-weight: bold; color: black;', + ) + ), + 'URLS' => array( + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + 0 => array( + GESHI_SEARCH => '([a-z_\-:]+)(=)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'i', + GESHI_BEFORE => '', + GESHI_AFTER => '\\2' + ), + 1 => array( + GESHI_SEARCH => '(<[/?|(\?xml)]?[a-z0-9_\-:]*(\??>)?)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'i', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 2 => array( + GESHI_SEARCH => '(([/|\?])?>)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'i', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, + 'SCRIPT_DELIMITERS' => array( + 0 => array( + ' '>' + ), + 1 => array( + '&' => ';' + ), + 2 => array( + ' ']]>' + ), + 3 => array( + '<' => '>' + ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => false, + 1 => false, + 2 => false, + 3 => true + ), + 'TAB_WIDTH' => 4 +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/xpp.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/xpp.php new file mode 100644 index 0000000..3bb06b9 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/xpp.php @@ -0,0 +1,433 @@ + + * + * CHANGES + * ------- + * 2007/02/28 (1.0.0) + * - First Release + * + * TODO (updated 2007/02/27) + * ------------------------- + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi 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. + * + * GeSHi 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 GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'X++', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( // Primitive types + 'void', + 'str', + 'real', + 'int64', + 'int', + 'date', + 'container', + 'boolean', + 'anytype' + ), + 2 => array( // Keywords + 'window', + 'while', + 'try', + 'true', + 'throw', + 'switch', + 'super', + 'static', + 'server', + 'right', + 'return', + 'retry', + 'public', + 'protected', + 'private', + 'print', + 'pause', + 'null', + 'new', + 'mod', + 'left', + 'interface', + 'implements', + 'if', + 'for', + 'final', + 'false', + 'extends', + 'else', + 'edit', + 'do', + 'div', + 'display', + 'default', + 'continue', + 'client', + 'class', + 'changeCompany', + 'case', + 'breakpoint', + 'break', + 'at', + 'abstract' + ), + 3 => array( // Functions within the Axapta kernel + 'year', + 'wkofyr', + 'webwebpartstr', + 'webstaticfilestr', + 'websitetempstr', + 'websitedefstr', + 'webreportstr', + 'webpagedefstr', + 'weboutputcontentitemstr', + 'webmenustr', + 'webletitemstr', + 'webformstr', + 'webdisplaycontentitemstr', + 'webactionitemstr', + 'varstr', + 'utilmoyr', + 'uint2str', + 'typeof', + 'typeid', + 'trunc', + 'today', + 'timenow', + 'time2str', + 'term', + 'tanh', + 'tan', + 'tablestr', + 'tablestaticmethodstr', + 'tablepname', + 'tablenum', + 'tablename2id', + 'tablemethodstr', + 'tableid2pname', + 'tableid2name', + 'tablefieldgroupstr', + 'tablecollectionstr', + 'systemdateset', + 'systemdateget', + 'syd', + 'substr', + 'strupr', + 'strscan', + 'strrtrim', + 'strrep', + 'strrem', + 'strprompt', + 'strpoke', + 'strnfind', + 'strlwr', + 'strltrim', + 'strline', + 'strlen', + 'strkeep', + 'strins', + 'strfmt', + 'strfind', + 'strdel', + 'strcolseq', + 'strcmp', + 'stralpha', + 'str2time', + 'str2num', + 'str2int64', + 'str2int', + 'str2guid', + 'str2enum', + 'str2date', + 'staticmethodstr', + 'sln', + 'sleep', + 'sinh', + 'sin', + 'setprefix', + 'sessionid', + 'securitykeystr', + 'securitykeynum', + 'runbuf', + 'runas', + 'round', + 'resourcestr', + 'reportstr', + 'refprintall', + 'rate', + 'querystr', + 'pv', + 'pt', + 'prmisdefault', + 'primoyr', + 'prevyr', + 'prevqtr', + 'prevmth', + 'power', + 'pmt', + 'num2str', + 'num2date', + 'num2char', + 'nextyr', + 'nextqtr', + 'nextmth', + 'newguid', + 'mthofyr', + 'mthname', + 'mkdate', + 'minint', + 'min', + 'methodstr', + 'menustr', + 'menuitemoutputstr', + 'menuitemdisplaystr', + 'menuitemactionstr', + 'maxint', + 'maxdate', + 'max', + 'match', + 'logn', + 'log10', + 'literalstr', + 'licensecodestr', + 'licensecodenum', + 'intvnorm', + 'intvno', + 'intvname', + 'intvmax', + 'int64str', + 'int64str', + 'indexstr', + 'indexnum', + 'indexname2id', + 'indexid2name', + 'idg', + 'identifierstr', + 'helpfilestr', + 'helpdevstr', + 'helpapplstr', + 'guid2str', + 'getprefix', + 'getCurrentUTCTime', + 'fv', + 'funcname', + 'frac', + 'formstr', + 'fieldstr', + 'fieldpname', + 'fieldnum', + 'fieldname2id', + 'fieldid2pname', + 'fieldid2name', + 'extendedTypeStr', + 'extendedTypeNum', + 'exp10', + 'exp', + 'evalbuf', + 'enumstr', + 'enumnum', + 'enumcnt', + 'enum2str', + 'endmth', + 'dimof', + 'dg', + 'decround', + 'ddb', + 'dayofyr', + 'dayofwk', + 'dayofmth', + 'dayname', + 'date2str', + 'date2num', + 'curuserid', + 'curext', + 'cterm', + 'cosh', + 'cos', + 'corrflagset', + 'corrflagget', + 'convertUTCTimeToLocalTime', + 'convertUTCDateToLocalDate', + 'conpoke', + 'conpeek', + 'connull', + 'conlen', + 'conins', + 'confind', + 'configurationkeystr', + 'configurationkeynum', + 'condel', + 'classstr', + 'classnum', + 'classidget', + 'char2num', + 'beep', + 'atan', + 'asin', + 'ascii2ansi', + 'any2str', + 'any2real', + 'any2int64', + 'any2int', + 'any2guid', + 'any2enum', + 'any2date', + 'ansi2ascii', + 'acos', + 'abs' + ), + 4 => array( // X++ SQL stuff + 'where', + 'update_recordset', + 'ttsCommit', + 'ttsBegin', + 'ttsAbort', + 'sum', + 'setting', + 'select', + 'reverse', + 'pessimisticLock', + 'outer', + 'order by', + 'optimisticLock', + 'notExists', + 'noFetch', + 'next', + 'minof', + 'maxof', + 'like', + 'join', + 'insert_recordset', + 'index hint', + 'index', + 'group by', + 'from', + 'forUpdate', + 'forceSelectOrder', + 'forcePlaceholders', + 'forceNestedLoop', + 'forceLiterals', + 'flush', + 'firstOnly', + 'firstFast', + 'exists', + 'desc', + 'delete_from', + 'count', + 'avg', + 'asc' + ) + ), + 'SYMBOLS' => array( // X++ symbols + '!', + '&', + '(', + ')', + '*', + '^', + '|', + '~', + '+', + ',', + '-', + '/', + ':', + '<', + '=', + '>', + '?', + '[', + ']', + '{', + '}' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + 4 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000ff;', + 2 => 'color: #0000ff;', + 3 => 'color: #0000ff;', + 4 => 'color: #0000ff;' + ), + 'COMMENTS' => array( + 1 => 'color: #007f00;', + 'MULTI' => 'color: #007f00; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000000;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #000000;' + ), + 'METHODS' => array( + 1 => 'color: #000000;', + 2 => 'color: #000000;' + ), + 'SYMBOLS' => array( + 0 => 'color: #00007f;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.', + 2 => '::' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/geshi/geshi/z80.php b/wp-content/plugins/highlight-source-pro/geshi/geshi/z80.php new file mode 100644 index 0000000..7feb5cb --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/geshi/geshi/z80.php @@ -0,0 +1,136 @@ + 'ZiLOG Z80 Assembler', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /*CPU*/ + 1 => array( + 'adc','add','and','bit','call','ccf','cp','cpd','cpdr','cpir','cpi', + 'cpl','daa','dec','di','djnz','ei','ex','exx','halt','im','in', + 'in0','inc','ind','indr','inir','ini','jp','jr','ld','ldd','lddr', + 'ldir','ldi','mlt','neg','nop','or','otdm','otdmr','otdr','otim', + 'otimr','otir','out','out0','outd','outi','pop','push','res','ret', + 'reti','retn','rl','rla','rlc','rlca','rld','rr','rra','rrc','rrca', + 'rrd','rst','sbc','scf','set','sla','sl1','sll','slp','sra','srl', + 'sub','tst','tstio','xor' + ), + /*registers*/ + 2 => array( + 'a','b','c','d','e','h','l', + 'af','bc','de','hl','ix','iy','sp', + 'af\'','ixh','ixl','iyh','iyl' + ), + /*Directive*/ + 3 => array( + '#define','#endif','#else','#ifdef','#ifndef','#include','#undef', + '.db','.dd','.df','.dq','.dt','.dw','.end','.org','equ' + ), + ), + 'SYMBOLS' => array( + '[', ']', '(', ')', '?', '+', '-', '*', '/', '%', '$' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000ff; font-weight:bold;', + 2 => 'color: #0000ff;', + 3 => 'color: #46aa03; font-weight:bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #adadad; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #0000ff;' + ), + 'STRINGS' => array( + 0 => 'color: #7f007f;' + ), + 'NUMBERS' => array( + 0 => 'color: #dd22dd;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #008000;' + ), + 'REGEXPS' => array( + 0 => 'color: #22bbff;', + 1 => 'color: #22bbff;', + 2 => 'color: #993333;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + 0 => '0[0-9a-fA-F]{1,32}[hH]', + 1 => '\%[01]{1,64}[bB]', + 2 => '^[_a-zA-Z][_a-zA-Z0-9]{0,50}\:' + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 8 +); + +?> diff --git a/wp-content/plugins/highlight-source-pro/highlight_source_pro.php b/wp-content/plugins/highlight-source-pro/highlight_source_pro.php new file mode 100644 index 0000000..baf7b67 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/highlight_source_pro.php @@ -0,0 +1,133 @@ +Jay Pipes +and GeSHi +Version: 1.3 +Author: Christian Knoflach +Author URI: http://kno.at/ + +Copyright 2008 Christian Knoflach (christian@kno.at) + +This plugin is pretty much copy & paste from this article: +http://jpipes.com/index.php?/archives/216-Syntax-Highlighting-and-Allowing-HTML-in-Comments.html +with a few modifications to work as a plugin. Credits for all of this go to the authors of +GeSHi, HTMLPurifier and Jay Pipes. + +==================================================================================================== +This software is provided "as is" and any express or implied warranties, including, but not limited +to, the implied warranties of merchantibility and fitness for a particular purpose are disclaimed. +In no event shall the copyright owner or contributors be liable for any direct, indirect, +incidental, special, exemplary, or consequential damages (including, but not limited to, +procurement of substitute goods or services; loss of use, data, or profits; or business +interruption) however caused and on any theory of liability, whether in contract, strict liability, +or tort (including negligence or otherwise) arising in any way out of the use of this software, +even if advised of the possibility of such damage. + +For full license details see license.txt +================================================================================================= */ + +add_filter('the_content', 'hsp_clean_and_codify', 1); +add_action('wp_head', 'hsp_add_css'); + +function hsp_add_css() +{ + print(''); + print(''); +} + +/** + * Highlights the text as code in the supplied language + * + * @return string The marked up code + * @param subject The text to markup + * @param language The language to use for highlighting + */ +function hsp_syntax_highlight($subject, $language, $offset=1, $title='', $encoded = false) +{ + /* Format the code with GeSHi */ + include_once('geshi/geshi.php'); + + if ( $encoded ) + { + $subject = html_entity_decode($subject); + } + $subject = $subject; + $geshi= new GeSHi($subject, $language); + $geshi->set_header_type(GESHI_HEADER_DIV); + $geshi->enable_classes(); + $geshi->enable_strict_mode($mode); + $geshi->enable_keyword_links(false); + $geshi->enable_line_numbers(GESHI_NORMAL_LINE_NUMBERS); + + if ( $offset != 0 ) + { + $geshi->start_line_numbers_at($offset); + $geshi->set_overall_class('geshi '. $language); + } else { + $geshi->set_overall_class('geshi no '. $language); + } + + if ( !empty($title) ) + { + $geshi->set_header_content($title); + } + + return str_replace("'", ''', $geshi->parse_code()); +} + +/** + * Returns a cleaned and syntax-highlighted string of HTML + * + * @return string Cleaned and codified text + * @param subject The text to cut into code pieces + */ +function hsp_clean_and_codify($subject) +{ + $original= $subject; + $code_pieces= array(); +// $code_regex = '/[\[\<]pre\s*(lang|language)\=[\"\'](\w+)[\"\'][\]\>]([\D\S]+?)[\[\<]\/pre[\]\>]/'; +// $code_regex = '/[\[\<]pre\s*(lang|language)\=[\"\'](\w+)[\"\'](\s*class=[\"\']([0-9]+)[\"\'])?\s*[\]\>]([\D\S]+?)[\[\<]\/pre[\]\>]/'; +// $code_regex = '/[\[\<]pre\s*(lang|language)\=[\"\'](\w+)[\"\'](\s*class=[\"\']([0-9]+)[\"\'])?\s*[\]\>]([ ]*([^\\n]+))?([\D\S]+?)[\[\<]\/pre[\]\>]/'; + $code_regex = '/[\[\<]pre\s*(lang|language)\=[\"\'](enc__)?(\w+)[\"\'](\s*class=[\"\']([0-9]+)[\"\'])?\s*[\]\>]([ ]*([^\n]+))?\n([\D\S]+?)[\[\<]\/pre[\]\>]/'; + $code_delimiter= "CODECODECODE"; + + /* First split the text into code and non-code blocks */ + while (preg_match($code_regex, $subject, $code_matches) == 1) + { + $encoded_flag = (strtolower($code_matches[2]) == 'enc__'); + $language= trim(strtolower($code_matches[3])); // 0-index is the full match + $start_line = $code_matches[5]; + $code_title = trim($code_matches[7]); + $code_sample= $code_matches[8]; + $entire_code_string= $code_matches[0]; + $code_sample= str_replace("\t", " ", $code_sample); /* Replace tabs with spaces */ + $code_pieces[]= array('enc'=>$encoded_flag, 'lang'=>$language, 'text'=>$code_sample, 'offset'=>$start_line, 'title'=>$code_title); + $subject= str_replace($entire_code_string, $code_delimiter, $subject); + $code_matches= array(); //reset + } + + /* + * Now $subject should contain CleanMarkup\n|||CODE|||\nCleanMarkup... + * We now replace the code sections by passing an executable string + * to the regex parser (the /e option) and using the syntax_highlight + * function to do the grunt work + */ + $num_code_pieces= count($code_pieces); + $i= 0; + + if ($num_code_pieces > 0) + { + $replacement= "hsp_syntax_highlight(rtrim(\$code_pieces[\$i]['text']), \$code_pieces[\$i]['lang'], \$code_pieces[\$i]['offset'], \$code_pieces[\$i]['title'], \$code_pieces[\$i++]['enc']);"; + $subject= preg_replace('/' . $code_delimiter . '/e', $replacement, $subject); + } + + return $subject; +} +?> \ No newline at end of file diff --git a/wp-content/plugins/highlight-source-pro/ie.css b/wp-content/plugins/highlight-source-pro/ie.css new file mode 100644 index 0000000..a967d07 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/ie.css @@ -0,0 +1 @@ +div.geshi { overflow:scroll;overflow-Y:hidden;} \ No newline at end of file diff --git a/wp-content/plugins/highlight-source-pro/license.txt b/wp-content/plugins/highlight-source-pro/license.txt new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/license.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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. But first, please read +. diff --git a/wp-content/plugins/highlight-source-pro/readme.txt b/wp-content/plugins/highlight-source-pro/readme.txt new file mode 100644 index 0000000..a962f86 --- /dev/null +++ b/wp-content/plugins/highlight-source-pro/readme.txt @@ -0,0 +1,93 @@ +=== Highlight Source Pro === +Contributors: kno +Donate link: http://tinyurl.com/3mjxz2 +Tags: code, source, highlight, markup, syntax, formatting, posts, +Requires at least: 2.3 +Tested up to: 2.5 +Stable tag: 1.3 + +Powerful, XHTML-compliant, server-side code highlighting for pretty much all languages + + +== Description == + +Powerful, flexible, XHTML-compliant, server-side code highlighting, credits for everything +but 'making it a plugin' go to [Jay Pipes](http://jpipes.com/index.php?/archives/216-Syntax-Highlighting-and-Allowing-HTML-in-Comments.html) +and [GeSHi](http://geshi.org/). + += Features = + +* Highlight sources of any language +* automatically, server-side (no javascripts) +* XHTML-Compliant, `
          `, `
            `, `` with class-attributes and a css-file are used for styling +* optionally add a heading for every code-block +* optionally specify line-number offset (BREAKS XHTML COMPLIANCE) +* optionally don't display line-numbers +* set per-codeblock if the code is html_entity_encoded or not +* only parses `
            `-tags with the `lang=`-attribute, thus does not interfere with any regular preformatted contents you might have
            +*   degrades beautifully through `
            `-tags (if you keep the sources clean, that is)
            +*   all settings through logical, valid arguments for the main container
            +*   comes with generic cross-browser CSS (tested: IE5.5+, FF, Safari, Opera)
            +
            += Version History =
            +*   1.3: Thanks to a tipp now the link-path to the stylesheets is correct, sorry for the inconvenience
            +*   1.2: Leading whitespace isn't stripped anymore (indents as well as newlines), when there's no title the title-div is not being generated anymore
            +*   1.1: Solved the issue with single-quotes being changed to typographical quotes
            +
            += Known Issues =
            +
            +While the plugin is basically XHTML 1.0 Strict compliant there's just no way of getting the offset-based line-numbering to display without inadequate (ab)use of javascript and css hacks, so be warned that *IF you use the line-number offset, your documents will **NOT** validate* because of the forbidden `start=`-attribute for the `
              `! + +== Installation == + +The plugin is simple to install: + +1. Upload the `highlight_source_pro` folder to your `/wp-content/plugins` directory +1. Enable via Admin-Interface + += How to Use = + +Set your code-blocks as `
              `-tags. If the language is supported by GeSHi (see file list in the `/geshi-directory`) use the filename (without extension) as language-attribute. If your code is encoded (html-entities; e.g. `<` is displayed as `<` - most likely the case if you write in the visual editor) add the `enc__`-prefix. For example for a php-codeblock you would start as follows:
              +
              +`
              `
              +
              +You can control various things:
              +*   Start of Line-Offset, e.g. for #17: `
              `
              +*   define entity-encoded blocks, e.g. for php: `
              `
              +*   Define a title for your code-block that appears inside the block, but above the code lines. Everything in the same line as the opening  `
              ` tag will be considered the title, including HTML works fine:
              +        
              +        `
              This is an example with a 

              headline

              ` +* disable line numbers by not specifying an offset +* combine all those things as long as you stick to the right order: + +== Frequently Asked Questions == + += I use Self-Formatted Markup in older posts, what's gonna happen? = + +As long as they aren't wrapped in `
              `-tags *with a `lang=`-attribute* nothing is going to happen - your markup will stay untouched. Highlight Source Pro only hooks in for those `
              `-tags having a `lang=`-attribute.
              +
              += What about that class-abuse for line numbering??? =
              +
              +The line-numbering is the one problem here, because - currently - it requires to break with the XHTML-Standard. Because the `
                ` is always and guaranteed inside a `
                ` with the `.geshi`-class there is no need for the `class`-attribute on the list element. Also due to the fact that a CSS-classname is not allowed to start with a number, this solution is valid XHTML for downgrading and *can never interfere with existing CSS-rules*. + += I can use all HTML for the title-line? = + +Yep. The basic idea is, once again, backwards compatibility. If you consider your code-blocks being important you'll most likely want to add a heading instead of just a line, on the other hand you can simply use the title-feature to show which file is being talked about. Since the title-string will be placed inside a `
                ` you'll be fine as long as there's no line-break (and your markup is valid) + += What about that html_entity_decode thing and the enc__ - prefix?? = + +There's two ways of handling code-listing in your original post source. You can either use the HTML-input and hardcode PHP, C or whatever you think about, statements in there, Highlight Source Pro will handle those listings without any problems (in fact, it's the safer version to use for Highlighting as all characters are present in their original form). + +On the other hand this will get problematic if - for any reason - you stop using Highlight Source Pro, because WordPress (and every other serious software) will strip lots of those listings for security and compatibility reasons. If you want to be sure that your listings don't break when moving to another platform you should consider using htmlentities() on your listings, or writing them with the Visual Editor in the first place, so when falling back everything will be displayed as you want. + +In this case you'll have to use the `enc__`-prefix to tell Highlight Source Pro to apply `html_entity_decode()` before the actual syntax-highlighting. While this might be the more *default* case it's still the one requiring the alteration with the prefix, for compatibility reasons. If encoded scripts would be marked with the original language-signature and the source would later on be used in another GeSHi-environment things would get very, very complicated and confusing. + + +== Screenshots == + +1. All-In-One Preview + + +== Documentation == + +More on the [Highlight Source Pro Page](http://blog.kno.at/tools/highlight-source-pro/) \ No newline at end of file diff --git a/wp-content/plugins/highlight-source-pro/screenshot-1.png b/wp-content/plugins/highlight-source-pro/screenshot-1.png new file mode 100644 index 0000000..b4c117e Binary files /dev/null and b/wp-content/plugins/highlight-source-pro/screenshot-1.png differ diff --git a/wp-content/plugins/index.php b/wp-content/plugins/index.php new file mode 100644 index 0000000..4e6c07c --- /dev/null +++ b/wp-content/plugins/index.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/admin/css/admin.css b/wp-content/plugins/wordpress-https/admin/css/admin.css new file mode 100644 index 0000000..82187d9 --- /dev/null +++ b/wp-content/plugins/wordpress-https/admin/css/admin.css @@ -0,0 +1,19 @@ +#adminmenu .menu-top.toplevel_page_wordpress-https.current .wp-menu-image, +#adminmenu .menu-top.toplevel_page_wordpress-https.wp-has-current-submenu .wp-menu-image, +#adminmenu .menu-top.toplevel_page_wordpress-https:hover .wp-menu-image, +#adminmenu .menu-top.toplevel_page_wordpress-https.focused .wp-menu-image { + /* background-position: -360px -1px; */ + background-position: 0% 0%; +} +#adminmenu .menu-top.toplevel_page_wordpress-https .wp-menu-image img { + display: none; +} + +#adminmenu .menu-top.toplevel_page_wordpress-https div.wp-menu-image { + /* background: url('../../../../../wp-admin/images/menu.png') no-repeat scroll -360px -33px; */ + background: url('images/admin-icon.png') no-repeat 0% 100%;; +} +#side-sortables #wordpress-https .inside { + padding: 0; + margin: 0; +} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/admin/css/images/add.png b/wp-content/plugins/wordpress-https/admin/css/images/add.png new file mode 100644 index 0000000..6332fef Binary files /dev/null and b/wp-content/plugins/wordpress-https/admin/css/images/add.png differ diff --git a/wp-content/plugins/wordpress-https/admin/css/images/admin-icon.png b/wp-content/plugins/wordpress-https/admin/css/images/admin-icon.png new file mode 100644 index 0000000..cd9ff90 Binary files /dev/null and b/wp-content/plugins/wordpress-https/admin/css/images/admin-icon.png differ diff --git a/wp-content/plugins/wordpress-https/admin/css/images/admin-icon32.png b/wp-content/plugins/wordpress-https/admin/css/images/admin-icon32.png new file mode 100644 index 0000000..3b1af2c Binary files /dev/null and b/wp-content/plugins/wordpress-https/admin/css/images/admin-icon32.png differ diff --git a/wp-content/plugins/wordpress-https/admin/css/images/arrow_left.png b/wp-content/plugins/wordpress-https/admin/css/images/arrow_left.png new file mode 100644 index 0000000..5dc6967 Binary files /dev/null and b/wp-content/plugins/wordpress-https/admin/css/images/arrow_left.png differ diff --git a/wp-content/plugins/wordpress-https/admin/css/images/arrow_right.png b/wp-content/plugins/wordpress-https/admin/css/images/arrow_right.png new file mode 100644 index 0000000..b1a1819 Binary files /dev/null and b/wp-content/plugins/wordpress-https/admin/css/images/arrow_right.png differ diff --git a/wp-content/plugins/wordpress-https/admin/css/images/delete.png b/wp-content/plugins/wordpress-https/admin/css/images/delete.png new file mode 100644 index 0000000..08f2493 Binary files /dev/null and b/wp-content/plugins/wordpress-https/admin/css/images/delete.png differ diff --git a/wp-content/plugins/wordpress-https/admin/css/images/lock-icon.png b/wp-content/plugins/wordpress-https/admin/css/images/lock-icon.png new file mode 100644 index 0000000..e94ecf0 Binary files /dev/null and b/wp-content/plugins/wordpress-https/admin/css/images/lock-icon.png differ diff --git a/wp-content/plugins/wordpress-https/admin/css/network.css b/wp-content/plugins/wordpress-https/admin/css/network.css new file mode 100644 index 0000000..c9eb7b9 --- /dev/null +++ b/wp-content/plugins/wordpress-https/admin/css/network.css @@ -0,0 +1,28 @@ +#blog-table .blog-host { + width: 100%; +} +#blog-table input[type="checkbox"] { + float: none; + margin: 0; +} +#blog-table .blog-ssl_admin, #blog-table .blog-exclusive_https, +#blog-table .blog-remove_unsecure, #blog-table .blog-debug, +#blog-table .blog-proxy, #blog-table .blog-admin_menu { + width: 1%; + text-align: center; +} +#blog-table .blog-proxy select { + width: 50px; +} +#blog-table .blog-admin_menu select { + width: 78px; +} +#blog-table .blog-host input { + width: 100%; +} +table#blog-table tr td, +table#blog-table tr th { + padding: 0 5px; + word-wrap: break-word; + overflow: hidden; +} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/admin/css/settings.css b/wp-content/plugins/wordpress-https/admin/css/settings.css new file mode 100644 index 0000000..a225757 --- /dev/null +++ b/wp-content/plugins/wordpress-https/admin/css/settings.css @@ -0,0 +1,205 @@ +.wphttps-message-wrap { + position: fixed; + bottom: 50%; + left: 50%; + margin-left: -25%; + width: 50%; + z-index: 10; + text-align: center; +} +.wphttps-message-wrap ul { + margin: 0; +} + +#wphttps-main #icon-options-https { + background: url(images/admin-icon32.png) no-repeat; +} + +#wphttps-main .meta-box-sortables { + margin: 0 8px; +} + +#wphttps-main #poststuff .column-primary { + width: 72%; + padding: 0; +} +#wphttps-main #poststuff .column-secondary { + width: 28%; + float: right; + padding: 0; +} +#wphttps-main #poststuff .postbox { + min-width: auto; +} + +#wphttps-main #message { + margin: 15px 0 0 0; +} +#wphttps-main #message p { + line-height: 100%; +} + +#wphttps-main img.loading { + display: block; + position: absolute; + top: 7px; + right: 7px; +} + +#wphttps-main img.waiting { + display: none; +} +#wphttps-main img.submit-waiting { + vertical-align: middle; + margin-left: 5px; +} + +#wphttps-donate-link img { + display: block; + margin: 5px auto 13px auto; +} + +#wphttps-main input[type="text"] { + margin: -5px 0 0 0; +} +#wphttps-main input[type="checkbox"] { + margin: 7px 0 0 0; + vertical-align: bottom; +} +#wphttps-main table tr td, +#wphttps-main table tr th { + line-height: 1em; + padding: 10px; +} +#wphttps-main table tr td { + padding: 2px 0 0 0; +} +#wphttps-main table tr td:first-child { + padding-top: 0; +} +#wphttps-main table th { + width: 160px; + line-height: 32px; + padding: 0; +} +#wphttps-main label.label-radio { + display: block; + margin: 5px 5px 0 0; + float: left; +} +#wphttps-main #settings-reset, +#wphttps-main #network-settings-reset, +#wphttps-main #filters-reset, +#wphttps-main #domain-mapping-reset { + float: left; + margin-right: 10px; +} +#wphttps-main #ssl_port_label { + display: inline-block; + padding-top: 10px; +} +#wphttps-main #ssl_host { + width: 70%; +} +#wphttps-main #exclusive_https_row label { + padding-top: 5px; +} + +#wphttps-main #admin_menu_row label { + display: inline; +} + +#wphttps-main #secure_filter_row textarea { + width: 95%; + height: 120px; +} + +#wphttps-main #admin_menu_row fieldset { + margin-top: 5px; +} + +#wphttps-main input[type="checkbox"] { + float: left; +} +#wphttps-main p.description { + margin: .5em 0 0 .5em; + width: 75%; + display: block; + float: left; + line-height: 1.2em; +} +#wphttps-main #secure_filter_row p.description { + margin: .5em 10px 0 0; + width: auto; +} +#wphttps-main #ssl_proxy_row p.description { + width: 65%; +} +#wphttps-main #domain_mapping td { + padding: 10px 0; +} +#wphttps-main #domain_mapping td.arrow { + padding: 8px 0; +} +#wphttps-main #domain_mapping .http_scheme, +#wphttps-main #domain_mapping .https_scheme { + width: 30px; + padding: 10px; +} +#wphttps-main #domain_mapping .https_scheme { + width: 35px; +} +#wphttps-main #domain_mapping .http_domain .label, +#wphttps-main #domain_mapping .https_domain .label { + display: block; + float: left; + text-align: right; + padding-right: 2%; +} +#wphttps-main #domain_mapping input { + width: 96%; + padding-left: 2%; + padding-right: 2%; +} +#wphttps-main #domain_mapping .add { + display: block; + height: 16px; + width: 16px; + overflow: hidden; + text-indent: -1000em; + float: left; + background: url(images/add.png) no-repeat 50% 50%; +} +#wphttps-main #domain_mapping .remove { + display: block; + height: 16px; + width: 16px; + overflow: hidden; + text-indent: -1000em; + float: left; + background: url(images/delete.png) no-repeat 50% 50%; +} +#wphttps-main #domain_mapping .arrow .label { + display: block; + height: 16px; + width: 16px; + overflow: hidden; + text-indent: -1000em; + background: url(images/arrow_right.png) no-repeat 50% 50%; + margin: 0 auto; +} + +#wphttps-main #regex-help { + display: none; +} +table.regex-help { + border-collapse: collapse; +} +table.regex-help tr { + border: 1px solid #000; + border-width: 1px 1px 0 0; +} +table.regex-help td, table.regex-help th { + border: 1px solid #000; + border-width: 0 0 1px 1px; +} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/admin/js/metabox.php b/wp-content/plugins/wordpress-https/admin/js/metabox.php new file mode 100644 index 0000000..b3ce2b7 --- /dev/null +++ b/wp-content/plugins/wordpress-https/admin/js/metabox.php @@ -0,0 +1,26 @@ +getContent(); + +if ( $content ) { + echo $content; +} +?> \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/admin/templates/ajax_message.php b/wp-content/plugins/wordpress-https/admin/templates/ajax_message.php new file mode 100644 index 0000000..080cc4c --- /dev/null +++ b/wp-content/plugins/wordpress-https/admin/templates/ajax_message.php @@ -0,0 +1,19 @@ + 0 ) { + echo "
                \n\t
                  \n"; + foreach ( $errors as $error ) { + echo "\t\t
                • ".$error."

                • \n"; + } + echo "\t
                \n
                \n"; + } else { + echo "

                " . $message . "

                \n"; + if ( $logout || $reload ) { + echo ""; + } + } + exit(); +} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/admin/templates/metabox/ajax.php b/wp-content/plugins/wordpress-https/admin/templates/metabox/ajax.php new file mode 100644 index 0000000..0d599e9 --- /dev/null +++ b/wp-content/plugins/wordpress-https/admin/templates/metabox/ajax.php @@ -0,0 +1,20 @@ +getPlugin()->getSlug()); +?> \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/admin/templates/metabox/domain_mapping.php b/wp-content/plugins/wordpress-https/admin/templates/metabox/domain_mapping.php new file mode 100644 index 0000000..9f60c68 --- /dev/null +++ b/wp-content/plugins/wordpress-https/admin/templates/metabox/domain_mapping.php @@ -0,0 +1,122 @@ +
                +getPlugin()->getSlug()); ?> + + +

                ', '') ; ?>.

                + + + + +getPlugin()->getSetting('ssl_host_mapping')) ? $this->getPlugin()->getSetting('ssl_host_mapping') : array() ); + foreach( $ssl_host_mapping as $http_domain => $https_domain ) { +?> + + + + + + + + + + + + + + + + + + +
                + http:// + + + + > + + https:// + + + + + +
                + http:// + + + + > + + https:// + + + + + +
                + +

                + + + <?php _e('Waiting...','wordpress-https'); ?> +

                +
                + \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/admin/templates/metabox/filters.php b/wp-content/plugins/wordpress-https/admin/templates/metabox/filters.php new file mode 100644 index 0000000..24a212d --- /dev/null +++ b/wp-content/plugins/wordpress-https/admin/templates/metabox/filters.php @@ -0,0 +1,49 @@ +
                +getPlugin()->getSlug()); ?> + + + + + + + +
                + +

                ',''); ?>.

                +
                + +
                + +

                + + + <?php _e('Waiting...','wordpress-https'); ?> +

                +
                + + \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/admin/templates/metabox/network.php b/wp-content/plugins/wordpress-https/admin/templates/metabox/network.php new file mode 100644 index 0000000..1c8b8f2 --- /dev/null +++ b/wp-content/plugins/wordpress-https/admin/templates/metabox/network.php @@ -0,0 +1,104 @@ +
                +getPlugin()->getSlug()); ?> + + + + + + + + + + + + + + + + +get_col($wpdb->prepare("SELECT blog_id FROM " . $wpdb->blogs, NULL)); + foreach($blogs as $blog_id) { + $ssl_host = ($this->getPlugin()->getSetting('ssl_host', $blog_id) != '' ? $this->getPlugin()->getSetting('ssl_host', $blog_id) : get_site_url($blog_id, '', 'https')); + $ssl_host = preg_replace('/http[s]?:\/\//', '', $ssl_host); + $ssl_host = rtrim(str_replace(parse_url(get_site_url($blog_id, ''), PHP_URL_PATH), '', $ssl_host), '/'); +?> + + + + + + + + + + +getPlugin()->getSetting('network_defaults'); + if ( sizeof($defaults) == 0 ) { + foreach( $this->getPlugin()->getSettings() as $setting => $default ) { + $defaults[$setting] = $default; + } + } +?> + + + + + + + + + + + + + +
                getPlugin()->getSetting('ssl_admin', $blog_id) ? ' checked="checked"' : ''); ?> />getPlugin()->getSetting('exclusive_https', $blog_id)) ? ' checked="checked"' : ''); ?> />getPlugin()->getSetting('remove_unsecure', $blog_id)) ? ' checked="checked"' : ''); ?> />getPlugin()->getSetting('debug', $blog_id)) ? ' checked="checked"' : ''); ?> /> + + + +
                New Site Defaults /> /> /> /> + + + +
                + +

                + + <?php _e('Waiting...','wordpress-https'); ?> +

                +
                + \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/admin/templates/metabox/post.php b/wp-content/plugins/wordpress-https/admin/templates/metabox/post.php new file mode 100644 index 0000000..fd2f201 --- /dev/null +++ b/wp-content/plugins/wordpress-https/admin/templates/metabox/post.php @@ -0,0 +1,28 @@ +ID ) { + $force_ssl = get_post_meta($post->ID, 'force_ssl', true); + $force_ssl_children = get_post_meta($post->ID, 'force_ssl_children', true); + $postParent = $post; + while ( $postParent->post_parent ) { + $postParent = get_post( $postParent->post_parent ); + if ( get_post_meta($postParent->ID, 'force_ssl_children', true) == 1 ) { + $parent_force_ssl_children = get_post($postParent->ID); + break; + } + } +} + +wp_nonce_field($this->getPlugin()->getSlug(), $this->getPlugin()->getSlug()); +?> + +
                + + + + post_title) . '"' : '' ); ?>> /> +
                +
                + +
                \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/admin/templates/metabox/settings.php b/wp-content/plugins/wordpress-https/admin/templates/metabox/settings.php new file mode 100644 index 0000000..63c7345 --- /dev/null +++ b/wp-content/plugins/wordpress-https/admin/templates/metabox/settings.php @@ -0,0 +1,145 @@ +getPlugin()->getHttpsUrl(); + $ssl_host = $ssl_host->setPort('')->setScheme('')->toString(); + if ( $this->getPlugin()->getHttpUrl()->getPath() != '/' ) { + $ssl_host = str_replace($this->getPlugin()->getHttpUrl()->getPath(), '', $ssl_host, $count); + } + $ssl_host = rtrim($ssl_host, '/'); +?> +
                +getPlugin()->getSlug()); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                +
                + + +
                +
                +
                + +
                +
                +
                + +
                +
                +
                + +
                +
                +
                + +
                +
                +
                + +

                +
                +
                +
                + + +
                +
                + + + + +

                + + + <?php _e('Waiting...','wordpress-https'); ?> +

                +
                + \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/admin/templates/network.php b/wp-content/plugins/wordpress-https/admin/templates/network.php new file mode 100644 index 0000000..f5670db --- /dev/null +++ b/wp-content/plugins/wordpress-https/admin/templates/network.php @@ -0,0 +1,20 @@ + + +
                + +
                +

                +

                + + +
                +
                +getPlugin()->getSlug() . '_network', 'main', $this); ?> +
                +
                +
                \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/admin/templates/settings.php b/wp-content/plugins/wordpress-https/admin/templates/settings.php new file mode 100644 index 0000000..ad488c3 --- /dev/null +++ b/wp-content/plugins/wordpress-https/admin/templates/settings.php @@ -0,0 +1,120 @@ + + +
                + +
                +

                +

                + + +
                +
                +getPlugin()->getSlug(), 'main', $this); ?> +
                +
                +getPlugin()->getSlug(), 'side', $this); ?> +
                +
                + +
                +

                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                [abc]
                [^abc]but a, b, or c','wordpress-https'); ?>
                [a-z]
                [a-zA-Z]
                \s
                \S
                \d
                \D
                \w
                \W
                \b
                \B
                |
                ()
                ^
                $
                +

                + + + + + + + + + + + + + + + + + + + + + + + + + +
                {n,m}n times but no more than m times','wordpress-https'); ?>
                {n,}n or more times','wordpress-https'); ?>
                {n}n occurrences of the previous item','wordpress-https'); ?>
                ?
                +
                *
                +
                +
                \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/languages/wordpress-https-de_DE.mo b/wp-content/plugins/wordpress-https/languages/wordpress-https-de_DE.mo new file mode 100644 index 0000000..1fe9aff Binary files /dev/null and b/wp-content/plugins/wordpress-https/languages/wordpress-https-de_DE.mo differ diff --git a/wp-content/plugins/wordpress-https/languages/wordpress-https-de_DE.po b/wp-content/plugins/wordpress-https/languages/wordpress-https-de_DE.po new file mode 100644 index 0000000..6a62491 --- /dev/null +++ b/wp-content/plugins/wordpress-https/languages/wordpress-https-de_DE.po @@ -0,0 +1,334 @@ +# Translation of WordPress HTTPS in German +# This file is distributed under the same license as the WordPress HTTPS package. +msgid "" +msgstr "" +"PO-Revision-Date: 2012-12-18 11:26:32+0000\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: GlotPress/0.1\n" +"Project-Id-Version: WordPress HTTPS\n" + +#: admin/templates/metabox/network.php:9 +msgid "Force SSL Admin" +msgstr "Force SSL Admin" + +#: admin/templates/metabox/post.php:24 +msgid "This post's parent page ' %s ' has 'Secure child posts' enabled." +msgstr "Die übergeordnete Seite dieses Artikels ' %s ' hat 'Sichere Unter-Artikel' aktiviert." + +#: wordpress-https.php:5 +msgid "WordPress HTTPS is intended to be an all-in-one solution to using SSL on WordPress sites." +msgstr "WordPress HTTPS ist eine All-in-One Lösung für SSL auf WordPress Seiten" + +#: admin/templates/metabox/network.php:7 +msgid "Blog" +msgstr "Seite" + +#: admin/templates/network.php:9 admin/templates/settings.php:9 +#: lib/WordPressHTTPS/Module/Post.php:42 +msgid "HTTPS" +msgstr "HTTPS" + +#: lib/WordPressHTTPS/Module/Settings.php:61 +msgid "General Settings" +msgstr "Allgemeine Einstellungen" + +#: lib/WordPressHTTPS/Module/Settings.php:70 +msgid "Developer Updates" +msgstr "Entwickler-Updates" + +#: lib/WordPressHTTPS/Module/Settings.php:88 +msgid "Feedback" +msgstr "Feedback" + +#: lib/WordPressHTTPS/Module/UrlFilters.php:63 +msgid "URL Filters" +msgstr "URL Filter" + +#: admin/templates/settings.php:96 +msgid "Match the previous item at least n times but no more than m times" +msgstr "Entspricht einer Häufigkeit von mindestens n aber nicht mehr als m" + +#: admin/templates/settings.php:100 +msgid "Match the previous item n or more times" +msgstr "Entspricht einer Häufigkeit von n oder mehr" + +#: admin/templates/settings.php:104 +msgid "Match exactly n occurrences of the previous item" +msgstr "Entspricht einer Häufigkeit von genau n des vorherigen Elements" + +#: admin/templates/settings.php:108 +msgid "Match 0 or 1 occurrences of the previous item {0,1}" +msgstr "Entspricht einer Häufigkeit von 0 oder 1 des vorherigen Elements {0,1} " + +#: admin/templates/settings.php:112 +msgid "Match 1 or more occurrences of the previous item {1,}" +msgstr "Entspricht einer Häufigkeit von 1 oder mehr des vorherigen Elements {1,}" + +#: admin/templates/settings.php:116 +msgid "Match 0 or more occurrences of the previous item {0,}" +msgstr "Entspricht einer Häufigkeit von 0 oder mehr des vorherigen Elements {0,} " + +#: lib/WordPressHTTPS/Module/Settings.php:79 +msgid "Support" +msgstr "Support" + +#: lib/WordPressHTTPS/Module/Settings.php:97 +msgid "Donate" +msgstr "Spende" + +#: lib/WordPressHTTPS/Module/DomainMapping.php:61 +msgid "Domain Mapping" +msgstr "Domain Mapping" + +#: lib/WordPressHTTPS/Module/Network.php:61 +msgid "Network Settings" +msgstr "Netzwerk-Einstellungen" + +#: lib/WordPressHTTPS/Module/Network.php:70 +#: lib/WordPressHTTPS/Module/Settings.php:106 +msgid "Loading..." +msgstr "Lade..." + +#: lib/WordPressHTTPS/Module/Network.php:87 +#: lib/WordPressHTTPS/Module/Settings.php:123 +msgid "You do not have sufficient permissions to access this page." +msgstr "Sie haben keine Berechtigung diese Seite anzuzeigen." + +#: admin/templates/settings.php:25 +msgid "Expressions" +msgstr "Ausdrücke" + +#: admin/templates/settings.php:29 +msgid "A single character: a, b, or c" +msgstr "Jedes einzelne Zeichen: a, b, oder c " + +#: admin/templates/settings.php:33 +msgid "Any single character but a, b, or c" +msgstr "Jedes einzelne Zeichen außer a, b, oder c" + +#: admin/templates/settings.php:37 +msgid "Any character in the range a-z" +msgstr "Jedes Zeichen im Bereich a-z" + +#: admin/templates/settings.php:41 +msgid "Any character in the range a-z or A-Z (any alphabetical character)" +msgstr "Jedes Zeichen im Bereich a-z oder A-Z (alle alphabetischen Zeichen)" + +#: admin/templates/settings.php:45 +msgid "Any whitespace character [ \\t\\n\\r\\f\\v]" +msgstr "Jedes Leerzeichen [ \\t\\n\\r\\f\\v]" + +#: admin/templates/settings.php:49 +msgid "Any non-whitespace character [^ \\t\\n\\r\\f\\v]" +msgstr "Jedes Nicht-Leerzeichen [^ \\t\\n\\r\\f\\v]" + +#: admin/templates/settings.php:53 +msgid "Any digit [0-9]" +msgstr "Jede Ziffer [0-9]" + +#: admin/templates/settings.php:57 +msgid "Any non-digit [^0-9]" +msgstr "Jede Nicht-Ziffer [^0-9]" + +#: admin/templates/settings.php:61 +msgid "Any word character [a-zA-Z0-9_]" +msgstr "Jedes Wort-Zeichen [a-zA-Z0-9_]" + +#: admin/templates/settings.php:65 +msgid "Any non-word character [^a-zA-Z0-9_]" +msgstr "Jedes Nicht-Wort-Zeichen [^a-zA-Z0-9_]" + +#: admin/templates/settings.php:69 +msgid "A word boundary between \\w and \\W" +msgstr "Eine Wortgrenze zwischen \\w und \\W" + +#: admin/templates/settings.php:73 +msgid "A position that is not a word boundary" +msgstr "Eine Position, die keine Wortgrenze ist" + +#: admin/templates/settings.php:77 +msgid "Alternation: matches either the subexpression to the left or to the right" +msgstr "Wechsel: Entspricht entweder des Unter-Ausdrucks zur Linken oder zur Rechten" + +#: admin/templates/settings.php:81 +msgid "Grouping: group all together for repetition operators" +msgstr "Bündelung: Gruppiere alle für Wiederholungsoperatoren" + +#: admin/templates/settings.php:85 +msgid "Beginning of the string" +msgstr "Anfang des Strings" + +#: admin/templates/settings.php:89 +msgid "End of the string" +msgstr "Ende des Strings" + +#: admin/templates/settings.php:92 +msgid "Repetition Operators" +msgstr "Wiederholungs Operatoren" + +#: admin/templates/metabox/settings.php:21 +msgid "Port" +msgstr "Port" + +#: admin/templates/metabox/settings.php:28 +msgid "Force SSL Administration" +msgstr "Force SSL Administration" + +#: admin/templates/metabox/settings.php:34 +msgid "Always use HTTPS while in the admin panel. This setting is identical to %s FORCE_SSL_ADMIN" +msgstr "Nutze immer HTTPS für den Admin-Bereich. Diese Einstellung ist identisch mit %s FORCE_SSL_ADMIN" + +#: admin/templates/metabox/network.php:10 +#: admin/templates/metabox/settings.php:40 +msgid "Force SSL Exclusively" +msgstr "Force SSL Exklusiv" + +#: admin/templates/metabox/settings.php:46 +msgid "Any page that is not secured via %s Force SSL %s or URL Filters will be redirected to HTTP." +msgstr "Alle Seiten, die nicht durch %s Force SSL %s oder URL Filter gesichert werden, werde auf HTTP umgeleitet." + +#: admin/templates/metabox/network.php:11 +#: admin/templates/metabox/settings.php:52 +msgid "Remove Unsecure Elements" +msgstr "Unsichere Elemente entfernen" + +#: admin/templates/metabox/settings.php:58 +msgid "Remove elements inaccessible over HTTPS. May break other plugins' functionality." +msgstr "Entferne alle Elemente unerreichbar über HTTPS. Könnte Funktionen anderer Plugins beeinträchtigen." + +#: admin/templates/metabox/network.php:12 +#: admin/templates/metabox/settings.php:64 +msgid "Debug Mode" +msgstr "Debug Mode" + +#: admin/templates/metabox/settings.php:70 +msgid "Outputs debug information to the browser's console." +msgstr "Gibt Debug-Informationen in der Konsole des Browsers aus." + +#: admin/templates/metabox/network.php:13 +#: admin/templates/metabox/settings.php:76 +msgid "Proxy" +msgstr "Proxy" + +#: admin/templates/metabox/network.php:35 +#: admin/templates/metabox/network.php:67 +#: admin/templates/metabox/settings.php:80 +msgid "No" +msgstr "Nein" + +#: admin/templates/metabox/network.php:36 +#: admin/templates/metabox/network.php:68 +#: admin/templates/metabox/settings.php:81 +msgid "Auto" +msgstr "Auto" + +#: admin/templates/metabox/network.php:37 +#: admin/templates/metabox/network.php:69 +#: admin/templates/metabox/settings.php:82 +msgid "Yes" +msgstr "Ja" + +#: admin/templates/metabox/settings.php:84 +msgid "If you think you may behind a proxy, set to Auto. Otherwise, leave the setting on No." +msgstr "Wenn Sie denken, dass Sie sich hinter einem Proxy befinden, wählen Sie Auto. Ansonsten lassen Sie es auf Nein." + +#: admin/templates/metabox/network.php:14 +#: admin/templates/metabox/settings.php:89 +msgid "Admin Menu Location" +msgstr "Position des Admin-Menüs" + +#: admin/templates/metabox/network.php:42 +#: admin/templates/metabox/network.php:74 +#: admin/templates/metabox/settings.php:93 +msgid "Sidebar" +msgstr "" + +#: admin/templates/metabox/network.php:43 +#: admin/templates/metabox/network.php:75 +#: admin/templates/metabox/settings.php:96 +msgid "Settings" +msgstr "Einstellungen" + +#: admin/templates/metabox/settings.php:126 +msgid "Are you sure you want to reset all WordPress HTTPS settings?" +msgstr "Sind Sie sicher, dass Sie alle WordPress HTTPS Einstellungen zurücksetzen wollen?" + +#: admin/templates/metabox/domain_mapping.php:4 +#: admin/templates/metabox/filters.php:7 +msgid "Regular Expressions Help" +msgstr "Hilfe zu Regulären Ausdrücken" + +#: admin/templates/metabox/domain_mapping.php:30 +#: admin/templates/metabox/domain_mapping.php:53 +msgid "Remove URL Filter" +msgstr "URL Filter entfernen" + +#: admin/templates/metabox/domain_mapping.php:30 +#: admin/templates/metabox/domain_mapping.php:53 +msgid "Remove" +msgstr "Entfernen" + +#: admin/templates/metabox/domain_mapping.php:31 +#: admin/templates/metabox/domain_mapping.php:54 +msgid "Add URL Filter" +msgstr "URL Filter hinzufügen" + +#: admin/templates/metabox/domain_mapping.php:31 +#: admin/templates/metabox/domain_mapping.php:54 +msgid "Add" +msgstr "Hinzufügen" + +#: admin/templates/metabox/domain_mapping.php:111 +msgid "Are you sure you want to reset all WordPress HTTPS domain mappings?" +msgstr "Sind Sie sicher, dass du alle WordPress HTTPS domain mappings zurücksetzen willst?" + +#: admin/templates/metabox/filters.php:6 +msgid "Secure Filters" +msgstr "Sicherheits-Filter" + +#: admin/templates/metabox/filters.php:7 +msgid "Example: If you have an E-commerce shop and all of the URL's begin with /store/, you could secure all store links by entering '/store/' on one line. You may use %s regular expressions %s" +msgstr "Beispiel: Sollten Sie einen E-Commerce Shop betreiben und alle URLs beginnen mit /store/, können Sie alle Links zum Shop durch die Eingabe von '/store/' in einer Zeile sichern. Sie können auch %s Reguläre Ausdrücke %s nutzen" + +#: admin/templates/metabox/domain_mapping.php:62 +#: admin/templates/metabox/filters.php:16 +#: admin/templates/metabox/network.php:86 +#: admin/templates/metabox/settings.php:108 +msgid "Save Changes" +msgstr "Änderungen speichern" + +#: admin/templates/metabox/domain_mapping.php:63 +#: admin/templates/metabox/filters.php:17 +#: admin/templates/metabox/settings.php:109 +msgid "Reset" +msgstr "Reset" + +#: admin/templates/metabox/filters.php:18 +#: admin/templates/metabox/network.php:87 +#: admin/templates/metabox/settings.php:110 +msgid "Waiting..." +msgstr "Warte..." + +#: admin/templates/metabox/filters.php:35 +msgid "Are you sure you want to reset all WordPress HTTPS filters?" +msgstr "Sind Sie sicher, dass Sie alle WordPress HTTPS Filter zurücksetzen wollen?" + +#: admin/templates/metabox/post.php:24 +msgid "Secure post" +msgstr "Sicherer Artikel" + +#: admin/templates/metabox/post.php:27 +msgid "Secure child posts" +msgstr "Sichere Unter-Artikel" + +#: admin/templates/metabox/network.php:8 +#: admin/templates/metabox/settings.php:15 +msgid "SSL Host" +msgstr "SSL Host" + +#: admin/templates/metabox/domain_mapping.php:4 +msgid "Domain mapping allows you to map external domains that host their HTTPS content on a different domain. You may use %s regular expressions %s" +msgstr "Domain Mapping erlaubt es externe Domains auf deren HTTPS Domains umzuleiten. Sie können auch %s Reguläre Ausdrücke %s nutzen" \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/languages/wordpress-https.pot b/wp-content/plugins/wordpress-https/languages/wordpress-https.pot new file mode 100644 index 0000000..2c9b9b2 --- /dev/null +++ b/wp-content/plugins/wordpress-https/languages/wordpress-https.pot @@ -0,0 +1,352 @@ +# Copyright (C) 2012 +# This file is distributed under the same license as the package. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp\n" +"POT-Creation-Date: 2012-12-18 09:24:12+00:00\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"PO-Revision-Date: 2012-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" + +#: wordpress-https.php:5 +msgid "WordPress HTTPS is intended to be an all-in-one solution to using SSL on WordPress sites." +msgstr "" + +#: admin/templates/metabox/domain_mapping.php:4 +msgid "" +"Domain mapping allows you to map external domains that host their HTTPS " +"content on a different domain. You may use %s regular expressions %s" +msgstr "" + +#: admin/templates/metabox/domain_mapping.php:4 +#: admin/templates/metabox/filters.php:7 +msgid "Regular Expressions Help" +msgstr "" + +#: admin/templates/metabox/domain_mapping.php:30 +#: admin/templates/metabox/domain_mapping.php:53 +msgid "Remove URL Filter" +msgstr "" + +#: admin/templates/metabox/domain_mapping.php:30 +#: admin/templates/metabox/domain_mapping.php:53 +msgid "Remove" +msgstr "" + +#: admin/templates/metabox/domain_mapping.php:31 +#: admin/templates/metabox/domain_mapping.php:54 +msgid "Add URL Filter" +msgstr "" + +#: admin/templates/metabox/domain_mapping.php:31 +#: admin/templates/metabox/domain_mapping.php:54 +msgid "Add" +msgstr "" + +#: admin/templates/metabox/domain_mapping.php:62 +#: admin/templates/metabox/filters.php:16 +#: admin/templates/metabox/network.php:86 +#: admin/templates/metabox/settings.php:108 +msgid "Save Changes" +msgstr "" + +#: admin/templates/metabox/domain_mapping.php:63 +#: admin/templates/metabox/filters.php:17 +#: admin/templates/metabox/settings.php:109 +msgid "Reset" +msgstr "" + +#: admin/templates/metabox/domain_mapping.php:111 +msgid "Are you sure you want to reset all WordPress HTTPS domain mappings?" +msgstr "" + +#: admin/templates/metabox/filters.php:6 +msgid "Secure Filters" +msgstr "" + +#: admin/templates/metabox/filters.php:7 +msgid "" +"Example: If you have an E-commerce shop and all of the URL's begin with /" +"store/, you could secure all store links by entering '/store/' on one line. " +"You may use %s regular expressions %s" +msgstr "" + +#: admin/templates/metabox/filters.php:18 +#: admin/templates/metabox/network.php:87 +#: admin/templates/metabox/settings.php:110 +msgid "Waiting..." +msgstr "" + +#: admin/templates/metabox/filters.php:35 +msgid "Are you sure you want to reset all WordPress HTTPS filters?" +msgstr "" + +#: admin/templates/metabox/network.php:7 +msgid "Blog" +msgstr "" + +#: admin/templates/metabox/network.php:8 +#: admin/templates/metabox/settings.php:15 +msgid "SSL Host" +msgstr "" + +#: admin/templates/metabox/network.php:9 +msgid "Force SSL Admin" +msgstr "" + +#: admin/templates/metabox/network.php:10 +#: admin/templates/metabox/settings.php:40 +msgid "Force SSL Exclusively" +msgstr "" + +#: admin/templates/metabox/network.php:11 +#: admin/templates/metabox/settings.php:52 +msgid "Remove Unsecure Elements" +msgstr "" + +#: admin/templates/metabox/network.php:12 +#: admin/templates/metabox/settings.php:64 +msgid "Debug Mode" +msgstr "" + +#: admin/templates/metabox/network.php:13 +#: admin/templates/metabox/settings.php:76 +msgid "Proxy" +msgstr "" + +#: admin/templates/metabox/network.php:14 +#: admin/templates/metabox/settings.php:89 +msgid "Admin Menu Location" +msgstr "" + +#: admin/templates/metabox/network.php:35 +#: admin/templates/metabox/network.php:67 +#: admin/templates/metabox/settings.php:80 +msgid "No" +msgstr "" + +#: admin/templates/metabox/network.php:36 +#: admin/templates/metabox/network.php:68 +#: admin/templates/metabox/settings.php:81 +msgid "Auto" +msgstr "" + +#: admin/templates/metabox/network.php:37 +#: admin/templates/metabox/network.php:69 +#: admin/templates/metabox/settings.php:82 +msgid "Yes" +msgstr "" + +#: admin/templates/metabox/network.php:42 +#: admin/templates/metabox/network.php:74 +#: admin/templates/metabox/settings.php:93 +msgid "Sidebar" +msgstr "" + +#: admin/templates/metabox/network.php:43 +#: admin/templates/metabox/network.php:75 +#: admin/templates/metabox/settings.php:96 +msgid "Settings" +msgstr "" + +#: admin/templates/metabox/post.php:24 +msgid "This post's parent page ' %s ' has 'Secure child posts' enabled." +msgstr "" + +#: admin/templates/metabox/post.php:24 +msgid "Secure post" +msgstr "" + +#: admin/templates/metabox/post.php:27 +msgid "Secure child posts" +msgstr "" + +#: admin/templates/metabox/settings.php:21 +msgid "Port" +msgstr "" + +#: admin/templates/metabox/settings.php:28 +msgid "Force SSL Administration" +msgstr "" + +#: admin/templates/metabox/settings.php:34 +msgid "" +"Always use HTTPS while in the admin panel. This setting is identical to %s " +"FORCE_SSL_ADMIN" +msgstr "" + +#: admin/templates/metabox/settings.php:46 +msgid "" +"Any page that is not secured via %s Force SSL %s or URL Filters will be " +"redirected to HTTP." +msgstr "" + +#: admin/templates/metabox/settings.php:58 +msgid "" +"Remove elements inaccessible over HTTPS. May break other plugins' " +"functionality." +msgstr "" + +#: admin/templates/metabox/settings.php:70 +msgid "Outputs debug information to the browser's console." +msgstr "" + +#: admin/templates/metabox/settings.php:84 +msgid "" +"If you think you may behind a proxy, set to Auto. Otherwise, leave the " +"setting on No." +msgstr "" + +#: admin/templates/metabox/settings.php:126 +msgid "Are you sure you want to reset all WordPress HTTPS settings?" +msgstr "" + +#: admin/templates/network.php:9 admin/templates/settings.php:9 +#: lib/WordPressHTTPS/Module/Post.php:42 +msgid "HTTPS" +msgstr "" + +#: admin/templates/settings.php:25 +msgid "Expressions" +msgstr "" + +#: admin/templates/settings.php:29 +msgid "A single character: a, b, or c" +msgstr "" + +#: admin/templates/settings.php:33 +msgid "Any single character but a, b, or c" +msgstr "" + +#: admin/templates/settings.php:37 +msgid "Any character in the range a-z" +msgstr "" + +#: admin/templates/settings.php:41 +msgid "Any character in the range a-z or A-Z (any alphabetical character)" +msgstr "" + +#: admin/templates/settings.php:45 +msgid "Any whitespace character [ \\t\\n\\r\\f\\v]" +msgstr "" + +#: admin/templates/settings.php:49 +msgid "Any non-whitespace character [^ \\t\\n\\r\\f\\v]" +msgstr "" + +#: admin/templates/settings.php:53 +msgid "Any digit [0-9]" +msgstr "" + +#: admin/templates/settings.php:57 +msgid "Any non-digit [^0-9]" +msgstr "" + +#: admin/templates/settings.php:61 +msgid "Any word character [a-zA-Z0-9_]" +msgstr "" + +#: admin/templates/settings.php:65 +msgid "Any non-word character [^a-zA-Z0-9_]" +msgstr "" + +#: admin/templates/settings.php:69 +msgid "A word boundary between \\w and \\W" +msgstr "" + +#: admin/templates/settings.php:73 +msgid "A position that is not a word boundary" +msgstr "" + +#: admin/templates/settings.php:77 +msgid "" +"Alternation: matches either the subexpression to the left or to the right" +msgstr "" + +#: admin/templates/settings.php:81 +msgid "Grouping: group all together for repetition operators" +msgstr "" + +#: admin/templates/settings.php:85 +msgid "Beginning of the string" +msgstr "" + +#: admin/templates/settings.php:89 +msgid "End of the string" +msgstr "" + +#: admin/templates/settings.php:92 +msgid "Repetition Operators" +msgstr "" + +#: admin/templates/settings.php:96 +msgid "" +"Match the previous item at least n times but no more than m times" +msgstr "" + +#: admin/templates/settings.php:100 +msgid "Match the previous item n or more times" +msgstr "" + +#: admin/templates/settings.php:104 +msgid "Match exactly n occurrences of the previous item" +msgstr "" + +#: admin/templates/settings.php:108 +msgid "Match 0 or 1 occurrences of the previous item {0,1}" +msgstr "" + +#: admin/templates/settings.php:112 +msgid "Match 1 or more occurrences of the previous item {1,}" +msgstr "" + +#: admin/templates/settings.php:116 +msgid "Match 0 or more occurrences of the previous item {0,}" +msgstr "" + +#: lib/WordPressHTTPS/Module/DomainMapping.php:61 +msgid "Domain Mapping" +msgstr "" + +#: lib/WordPressHTTPS/Module/Network.php:61 +msgid "Network Settings" +msgstr "" + +#: lib/WordPressHTTPS/Module/Network.php:70 +#: lib/WordPressHTTPS/Module/Settings.php:106 +msgid "Loading..." +msgstr "" + +#: lib/WordPressHTTPS/Module/Network.php:87 +#: lib/WordPressHTTPS/Module/Settings.php:123 +msgid "You do not have sufficient permissions to access this page." +msgstr "" + +#: lib/WordPressHTTPS/Module/Settings.php:61 +msgid "General Settings" +msgstr "" + +#: lib/WordPressHTTPS/Module/Settings.php:70 +msgid "Developer Updates" +msgstr "" + +#: lib/WordPressHTTPS/Module/Settings.php:79 +msgid "Support" +msgstr "" + +#: lib/WordPressHTTPS/Module/Settings.php:88 +msgid "Feedback" +msgstr "" + +#: lib/WordPressHTTPS/Module/Settings.php:97 +msgid "Donate" +msgstr "" + +#: lib/WordPressHTTPS/Module/UrlFilters.php:63 +msgid "URL Filters" +msgstr "" diff --git a/wp-content/plugins/wordpress-https/lib/Mvied/Logger/Interface.php b/wp-content/plugins/wordpress-https/lib/Mvied/Logger/Interface.php new file mode 100644 index 0000000..e7f8cca --- /dev/null +++ b/wp-content/plugins/wordpress-https/lib/Mvied/Logger/Interface.php @@ -0,0 +1,36 @@ +_post = get_post($id); + $this->ID = $this->_post->ID; + $this->name = $this->_post->post_title; + + $reflect = new ReflectionClass($this); + $properties = $reflect->getProperties(ReflectionProperty::IS_PUBLIC); + foreach($properties as $property) { + $property = $property->getName(); + if ( !isset($this->$property) ) { + $this->$property = get_post_meta($this->ID, $property, true); + } + } + } + + public function __get( $property ) { + return get_post_meta($this->ID, $property, true); + } + + public function getPost() { + return $this->_post; + } + + public function load( $array = array() ) { + foreach($array as $key => $value) { + if ( property_exists($this, $key) ) { + $this->$key = $value; + } + } + } + + public function save() { + $reflect = new ReflectionClass($this); + $properties = $reflect->getProperties(ReflectionProperty::IS_PUBLIC); + foreach($properties as $property) { + $property = $property->getName(); + if ( strpos($property, '_') !== 0 ) { + update_post_meta($this->_post->ID, $property, $this->$property); + } + } + } + +} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/lib/Mvied/Plugin.php b/wp-content/plugins/wordpress-https/lib/Mvied/Plugin.php new file mode 100644 index 0000000..854cacf --- /dev/null +++ b/wp-content/plugins/wordpress-https/lib/Mvied/Plugin.php @@ -0,0 +1,438 @@ +_directory = $directory; + return $this; + } + + /** + * Get Directory + * + * @param none + * @return string + */ + public function getDirectory() { + return $this->_directory; + } + + /** + * Set Module Directory + * + * @param string $module_directory + * @return object $this + */ + public function setModuleDirectory( $module_directory ) { + $this->_module_directory = $module_directory; + return $this; + } + + /** + * Get Module Directory + * + * @param none + * @return string + */ + public function getModuleDirectory() { + return $this->_module_directory; + } + + /** + * Get Available Modules + * + * @param none + * @return array $modules + */ + public function getAvailableModules() { + $modules = array(); + if ( is_dir($this->getModuleDirectory()) && $module_directory = opendir($this->getModuleDirectory()) ) { + while ( false !== ($entry = readdir($module_directory)) ) { + if ( strpos($entry, '.') !== 0 && strpos($entry, '.php') !== false ) { + $module = str_replace('.php', '', $entry); + if ( $module != 'Interface' ) { + $modules[] = $module; + if ( is_dir($this->getModuleDirectory() . $module) && $sub_module_directory = opendir($this->getModuleDirectory() . $module) ) { + while ( false !== ($entry = readdir($sub_module_directory)) ) { + if ( $entry != '.' && $entry != '..' ) { + $sub_module = str_replace('.php', '', $entry); + $modules[] = $module . '\\' . $sub_module; + } + } + } + } + } + } + } + return $modules; + } + + /** + * Get Module + * + * @param string $module + * @return object + */ + public function getModule( $module ) { + $module = 'Module\\' . $module; + if ( isset($module) ) { + if ( isset($this->_modules[$module]) ) { + return $this->_modules[$module]; + } + } + + die('Module not found: \'' . $module . '\'.'); + } + + /** + * Get Modules + * + * Returns an array of all loaded modules + * + * @param none + * @return array $modules + */ + public function getModules() { + $modules = array(); + if ( isset($this->_modules) ) { + $modules = $this->_modules; + } + return $modules; + } + + /** + * Set Module + * + * @param string $module + * @param object $object + * @return $this + */ + public function setModule( $module, $object ) { + $this->_modules[$module] = $object; + return $this; + } + + /** + * Set Logger + * + * @param object $logger + * @return object $this + */ + public function setLogger( Mvied_Logger_Interface $logger ) { + $this->_logger = $logger; + return $this; + } + + /** + * Get Logger + * + * @param none + * @return object + */ + public function getLogger() { + if ( ! isset($this->_logger) ) { + die(__CLASS__ . ' missing Logger dependency.'); + } + + return $this->_logger->getInstance(); + } + + /** + * Set Plugin Url + * + * @param string $plugin_url + * @return object $this + */ + public function setPluginUrl( $plugin_url ) { + $this->_plugin_url = $plugin_url; + return $this; + } + + /** + * Get Plugin Url + * + * @param none + * @return string + */ + public function getPluginUrl() { + return $this->_plugin_url; + } + + /** + * Get Plugin Setting + * + * @param string $setting + * @param int $setting_blog_id + * @return mixed + */ + public function getSetting( $setting, $blog_id = 0 ) { + $setting_full = $this->getSlug() . '_' . $setting; + if ( $blog_id > 0 ) { + $value = get_blog_option($blog_id, $setting_full); + } else { + $value = get_option($setting_full); + } + + // Load default option + if ( $value === false && array_key_exists($setting, $this->_settings) ) { + $value = $this->_settings[$setting]; + } + // Convert 1's and 0's to boolean + switch( $value ) { + case "1": + $value = true; + break; + case "0": + $value = false; + break; + } + return $value; + } + + /** + * Get Plugin Settings + * + * @param none + * @return array + */ + public function getSettings() { + return $this->_settings; + } + + /** + * Set Plugin Setting + * + * @param string $setting + * @param mixed $value + * @param int $blog_id + * @return $this + */ + public function setSetting( $setting, $value, $blog_id = 0 ) { + $setting_full = $this->getSlug() . '_' . $setting; + if ( $blog_id > 0 ) { + update_blog_option($blog_id, $setting_full, $value); + } else { + update_option($setting_full, $value); + } + return $this; + } + + /** + * Set Slug + * + * @param string $slug + * @return object $this + */ + public function setSlug( $slug ) { + $this->_slug = $slug; + return $this; + } + + /** + * Get Slug + * + * @param none + * @return string + */ + public function getSlug() { + return $this->_slug; + } + + /** + * Set Version + * + * @param string $version + * @return object $this + */ + public function setVersion( $version ) { + $this->_version = $version; + return $this; + } + + /** + * Get Version + * + * @param none + * @return string + */ + public function getVersion() { + return $this->_version; + } + + /** + * Init + * + * Initializes all of the modules. + * + * @param none + * @return $this + */ + public function init() { + $modules = $this->getModules(); + foreach( $modules as $module ) { + $module->init(); + } + if ( isset($this->_slug) ) { + do_action($this->_slug . '_init'); + } + return $this; + } + + /** + * Is Module Loaded? + * + * @param string $module + * @return boolean + */ + public function isModuleLoaded( $module ) { + if ( is_object($this->getModule($module)) ) { + return true; + } else { + return false; + } + } + + /** + * Load Module + * + * @param string $module + * @return $this + */ + public function loadModule( $module ) { + if ( strpos(get_class($this), '_') !== false ) { + $base_class = substr(get_class($this), 0, strpos(get_class($this), '_')); + } else { + $base_class = get_class($this); + } + $module_full = 'Module\\' . $module; + $filename = str_replace('\\', '/', $module); + $filename = $filename . '.php'; + + require_once($this->getModuleDirectory() . $filename); + + $class = $base_class . '_' . str_replace('\\', '_', $module_full); + if ( ! isset($this->_modules[$class]) || ! is_object($this->_modules[$class]) || get_class($this->_modules[$class]) != $class ) { + try { + $object = new $class; + $this->setModule($module_full, $object); + $this->getModule($module)->setPlugin($this); + } catch ( Exception $e ) { + die('Unable to load module: \'' . $module . '\'. ' . $e->getMessage()); + } + } + + return $this; + } + + /** + * Load Modules + * + * Load specified modules. If no modules are specified, all modules are loaded. + * + * @param array $modules + * @return $this + */ + public function loadModules( $modules = array() ) { + if ( sizeof($modules) == 0 ) { + $modules = $this->getAvailableModules(); + } + + foreach( $modules as $module ) { + $this->loadModule( $module ); + } + return $this; + } + + /** + * Unload Module + * + * @param string $module + * @return $this + */ + public function unloadModule( $module ) { + if ( strpos(get_class($this), '_') !== false ) { + $base_class = substr(get_class($this), 0, strpos(get_class($this), '_')); + } else { + $base_class = get_class($this); + } + $module = 'Module\\' . $module; + + $modules = $this->getModules(); + + unset($modules[$module]); + + $this->_modules = $modules; + + return $this; + } + +} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/lib/Mvied/Plugin/Module.php b/wp-content/plugins/wordpress-https/lib/Mvied/Plugin/Module.php new file mode 100644 index 0000000..508c2d7 --- /dev/null +++ b/wp-content/plugins/wordpress-https/lib/Mvied/Plugin/Module.php @@ -0,0 +1,56 @@ +_plugin = $plugin; + return $this; + } + + /** + * Get Plugin + * + * @param none + * @return Mvied_Plugin + */ + public function getPlugin() { + if ( ! isset($this->_plugin) ) { + die('Module ' . __CLASS__ . ' missing Plugin dependency.'); + } + + return $this->_plugin; + } + +} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/lib/Mvied/Plugin/Module/Interface.php b/wp-content/plugins/wordpress-https/lib/Mvied/Plugin/Module/Interface.php new file mode 100644 index 0000000..d3955e2 --- /dev/null +++ b/wp-content/plugins/wordpress-https/lib/Mvied/Plugin/Module/Interface.php @@ -0,0 +1,36 @@ +_directory = $directory; + return $this; + } + + /** + * Get Directory + * + * @param none + * @return string + */ + public function getDirectory() { + return $this->_directory; + } + + /** + * Set Module Directory + * + * @param string $module_directory + * @return object $this + */ + public function setModuleDirectory( $module_directory ) { + $this->_module_directory = $module_directory; + return $this; + } + + /** + * Get Module Directory + * + * @param none + * @return string + */ + public function getModuleDirectory() { + return $this->_module_directory; + } + + /** + * Get Available Modules + * + * @param none + * @return array $modules + */ + public function getAvailableModules() { + $modules = array(); + if ( is_dir($this->getModuleDirectory()) && $module_directory = opendir($this->getModuleDirectory()) ) { + while ( false !== ($entry = readdir($module_directory)) ) { + if ( $entry != '.' && $entry != '..' ) { + $module = str_replace('.php', '', $entry); + if ( $module != 'Interface' ) { + $modules[] = $module; + if ( is_dir($this->getModuleDirectory() . $module) && $sub_module_directory = opendir($this->getModuleDirectory() . $module) ) { + while ( false !== ($entry = readdir($sub_module_directory)) ) { + if ( $entry != '.' && $entry != '..' ) { + $sub_module = str_replace('.php', '', $entry); + $modules[] = $module . '\\' . $sub_module; + } + } + } + } + } + } + } + return $modules; + } + /** + * Get Module + * + * @param string $module + * @return object + */ + public function getModule( $module ) { + $module = 'Module\\' . $module; + if ( isset($module) ) { + if ( isset($this->_modules[$module]) ) { + return $this->_modules[$module]; + } + } + + die('Module not found: \'' . $module . '\'.'); + } + /** + * Get Modules + * + * Returns an array of all loaded modules + * + * @param none + * @return array $modules + */ + public function getModules() { + $modules = array(); + if ( isset($this->_modules) ) { + $modules = $this->_modules; + } + return $modules; + } + + /** + * Set Module + * + * @param string $module + * @param object $object + * @return $this + */ + public function setModule( $module, $object ) { + $this->_modules[$module] = $object; + return $this; + } + /** + * Set Logger + * + * @param object $logger + * @return object $this + */ + public function setLogger( Mvied_Logger_Interface $logger ) { + $this->_logger = $logger; + return $this; + } + + /** + * Get Logger + * + * @param none + * @return object + */ + public function getLogger() { + if ( ! isset($this->_logger) ) { + die(__CLASS__ . ' missing Logger dependency.'); + } + + return $this->_logger->getInstance(); + } + /** + * Get Theme Setting + * + * @param string $setting + * @param int $setting_blog_id + * @return mixed + */ + public function getSetting( $setting, $blog_id = 0 ) { + $setting_full = $this->getSlug() . '_' . $setting; + if ( $blog_id > 0 ) { + $value = get_blog_option($blog_id, $setting_full); + } else { + $value = get_option($setting_full); + } + // Load default option + if ( $value === false ) { + $value = $this->_settings[$setting]; + } + // Convert 1's and 0's to boolean + switch( $value ) { + case "1": + $value = true; + break; + case "0": + $value = false; + break; + } + return $value; + } + /** + * Get Theme Settings + * + * @param none + * @return array + */ + public function getSettings() { + return $this->_settings; + } + + /** + * Set Plugin Setting + * + * @param string $setting + * @param mixed $value + * @param int $blog_id + * @return $this + */ + public function setSetting( $setting, $value, $blog_id = 0 ) { + $setting_full = $this->getSlug() . '_' . $setting; + if ( $blog_id > 0 ) { + update_blog_option($blog_id, $setting_full, $value); + } else { + update_option($setting_full, $value); + } + return $this; + } + + /** + * Set Slug + * + * @param string $slug + * @return object $this + */ + public function setSlug( $slug ) { + $this->_slug = $slug; + return $this; + } + + /** + * Get Slug + * + * @param none + * @return string + */ + public function getSlug() { + return $this->_slug; + } + + /** + * Set Version + * + * @param string $version + * @return object $this + */ + public function setVersion( $version ) { + $this->_version = $version; + return $this; + } + + /** + * Get Version + * + * @param none + * @return string + */ + public function getVersion() { + return $this->_version; + } + + /** + * Init + * + * Initializes all of the modules. + * + * @param none + * @return $this + */ + public function init() { + $modules = $this->getModules(); + foreach( $modules as $module ) { + $module->init(); + } + if ( isset($this->_slug) ) { + do_action($this->_slug . '_init'); + } + return $this; + } + /** + * Is Module Loaded? + * + * @param string $module + * @return boolean + */ + public function isModuleLoaded( $module ) { + if ( is_object($this->getModule($module)) ) { + return true; + } else { + return false; + } + } + /** + * Load Module + * + * @param string $module + * @return $this + */ + public function loadModule( $module ) { + if ( strpos(get_class($this), '_') !== false ) { + $base_class = substr(get_class($this), 0, strpos(get_class($this), '_')); + } else { + $base_class = get_class($this); + } + $module_full = 'Module\\' . $module; + $filename = str_replace('\\', '/', $module); + $filename = $filename . '.php'; + + require_once($this->getModuleDirectory() . $filename); + $class = $base_class . '_' . str_replace('\\', '_', $module_full); + if ( ! isset($this->_modules[$class]) || ! is_object($this->_modules[$class]) || get_class($this->_modules[$class]) != $class ) { + try { + $object = new $class; + $this->setModule($module_full, $object); + $this->getModule($module)->setTheme($this); + } catch ( Exception $e ) { + die('Unable to load module: \'' . $module . '\'. ' . $e->getMessage()); + } + } + return $this; + } + /** + * Load Modules + * + * Load specified modules. If no modules are specified, all modules are loaded. + * + * @param array $modules + * @return $this + */ + public function loadModules( $modules = array() ) { + if ( sizeof($modules) == 0 ) { + $modules = $this->getAvailableModules(); + } + foreach( $modules as $module ) { + $this->loadModule( $module ); + } + return $this; + } + /** + * Unload Module + * + * @param string $module + * @return $this + */ + public function unloadModule( $module ) { + if ( strpos(get_class($this), '_') !== false ) { + $base_class = substr(get_class($this), 0, strpos(get_class($this), '_')); + } else { + $base_class = get_class($this); + } + $module = 'Module\\' . $module; + $modules = $this->getModules(); + + unset($modules[$module]); + + $this->_modules = $modules; + return $this; + } +} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/lib/Mvied/Theme/Module.php b/wp-content/plugins/wordpress-https/lib/Mvied/Theme/Module.php new file mode 100644 index 0000000..1077351 --- /dev/null +++ b/wp-content/plugins/wordpress-https/lib/Mvied/Theme/Module.php @@ -0,0 +1,56 @@ +_theme = $theme; + return $this; + } + + /** + * Get Theme + * + * @param none + * @return Mvied_Theme + */ + public function getTheme() { + if ( ! isset($this->_theme) ) { + die('Module ' . __CLASS__ . ' missing Theme dependency.'); + } + + return $this->_theme; + } + +} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/lib/Mvied/Theme/Module/Interface.php b/wp-content/plugins/wordpress-https/lib/Mvied/Theme/Module/Interface.php new file mode 100644 index 0000000..3ba9b6d --- /dev/null +++ b/wp-content/plugins/wordpress-https/lib/Mvied/Theme/Module/Interface.php @@ -0,0 +1,36 @@ + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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. But first, please read +. \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/lib/WordPressHTTPS.php b/wp-content/plugins/wordpress-https/lib/WordPressHTTPS.php new file mode 100644 index 0000000..a8c6596 --- /dev/null +++ b/wp-content/plugins/wordpress-https/lib/WordPressHTTPS.php @@ -0,0 +1,497 @@ + default_value + * + * @var array + */ + protected $_settings = array( + 'ssl_host' => '', // Hostname for SSL Host + 'ssl_port' => '', // Port number for SSL Host + 'secure_external_urls' => array(), // Secure external URL's + 'unsecure_external_urls' => array(), // Unsecure external URL's + 'ssl_host_diff' => 0, // Is SSL Host different than WordPress host + 'ssl_host_subdomain' => 0, // Is SSL Host a subdomain of WordPress host + 'exclusive_https' => 0, // Redirect pages that are not secured to HTTP + 'remove_unsecure' => 0, // Remove unsecure elements from HTML + 'ssl_admin' => 0, // Force SSL Over Administration Panel (The same as FORCE_SSL_ADMIN) + 'ssl_proxy' => 0, // Proxy detection + 'debug' => 0, // Debug Mode + 'admin_menu' => 'side', // HTTPS Admin Menu location + 'secure_filter' => array(), // Expressions to secure URL's against + 'ssl_host_mapping' => array(), // External SSL Hosts whose HTTPS content is on another domain + 'network_defaults' => array(), // Default settings for new blogs on a multisite network + ); + + /** + * File extensions to be loaded securely. + * + * @var array + */ + protected $_file_extensions = array('jpg', 'jpeg', 'png', 'gif', 'css', 'js'); + + /** + * Default External SSL Host Mapping + * @var array + */ + public static $ssl_host_mapping = array( + 'w.sharethis.com' => 'ws.sharethis.com', + '\d.gravatar.com' => 'secure.gravatar.com', + ); + + /** + * Get File Extensions to Secure + * + * @param none + * @return array + */ + public function getFileExtensions() { + return $this->_file_extensions; + } + + /** + * Get HTTP Url + * + * @param none + * @return WordPressHTTPS_Url + */ + public function getHttpUrl() { + if ( !isset($this->_http_url) ) { + $this->_http_url = WordPressHTTPS_Url::fromString('http://' . parse_url(get_bloginfo('template_url'), PHP_URL_HOST) . parse_url(home_url('/'), PHP_URL_PATH)); + } + return $this->_http_url; + } + + /** + * Get HTTPS Url + * + * @param none + * @return WordPressHTTPS_Url + */ + public function getHttpsUrl() { + if ( !isset($this->_https_url) ) { + $this->_https_url = clone $this->getHttpUrl(); + $this->_https_url->setScheme('https'); + + if ( is_string($this->getSetting('ssl_host')) && $this->getSetting('ssl_host') != '' ) { + $ssl_host = rtrim($this->getSetting('ssl_host'), '/') . '/'; + // If using a different host for SSL + if ( $ssl_host != $this->_https_url->toString() ) { + // Assign HTTPS URL to SSL Host + $this->setSetting('ssl_host_diff', 1); + if ( strpos($ssl_host, 'http://') === false && strpos($ssl_host, 'https://') === false ) { + $ssl_host = 'https://' . $ssl_host; + } + $this->_https_url = WordPressHTTPS_Url::fromString( $ssl_host ); + } else { + $this->setSetting('ssl_host_diff', 0); + } + } + + // Prepend SSL Host path + if ( strpos($this->_https_url->getPath(), $this->getHttpUrl()->getPath()) === false ) { + $this->_https_url->setPath( $this->_https_url->getPath() . $this->getHttpUrl()->getPath() ); + } + + // Add SSL Port to HTTPS URL + $this->_https_url->setPort($this->getSetting('ssl_port')); + } + + return $this->_https_url; + } + + /** + * Get domains local to the WordPress installation. + * + * @param none + * @return array $hosts Array of domains local to the WordPress installation. + */ + public function getLocalDomains() { + global $wpdb; + $hosts = array( + $this->getHttpUrl()->getHost(), + $this->getHttpsUrl()->getHost() + ); + + if ( is_multisite() && is_subdomain_install() ) { + $multisite_hosts = $wpdb->get_col($wpdb->prepare("SELECT domain FROM " . $wpdb->blogs, NULL)); + $hosts = array_merge($hosts, $multisite_hosts); + } + return $hosts; + } + + /** + * Initialize + * + * @param none + * @return void + */ + public function init() { + $this->getLogger()->log('Version: ' . $this->getVersion()); + $this->getLogger()->log('HTTP URL: ' . $this->getHttpUrl()->toString()); + $this->getLogger()->log('HTTPS URL: ' . $this->getHttpsUrl()->toString()); + $this->getLogger()->log('SSL: ' . ( $this->isSsl() ? 'Yes' : 'No' )); + $this->getLogger()->log('Diff Host: ' . ( $this->getSetting('ssl_host_diff') ? 'Yes' : 'No' )); + $this->getLogger()->log('Subdomain: ' . ( $this->getSetting('ssl_host_subdomain') ? 'Yes' : 'No' )); + $this->getLogger()->log('Proxy: ' . ( $this->getSetting('ssl_proxy') === 'auto' ? 'Auto' : ( $this->getSetting('ssl_proxy') ? 'Yes' : 'No' ) )); + $this->getLogger()->log('Secure External URLs: [ ' . implode(', ', (array)$this->getSetting('secure_external_urls')) . ' ]'); + $this->getLogger()->log('Unsecure External URLs: [ ' . implode(', ', (array)$this->getSetting('unsecure_external_urls')) . ' ]'); + + parent::init(); + } + + /** + * Install + * + * @param none + * @return void + */ + public function install() { + global $wpdb; + + if ( is_multisite() && is_network_admin() ) { + $blogs = $wpdb->get_col($wpdb->prepare("SELECT blog_id FROM " . $wpdb->blogs, NULL)); + } else { + $blogs = array($wpdb->blogid); + } + + $defaults = $this->getSetting('network_defaults'); + foreach ( $blogs as $blog_id ) { + // Add Settings + foreach ( $this->getSettings() as $option => $value ) { + if ( is_multisite() ) { + if ( add_blog_option($blog_id, $option, $value) && isset($defaults[$option]) ) { + if ( $option == 'ssl_host' && strpos($value, 'https://') !== 0 ) { + $value = 'https://' . rtrim($defaults[$option], '/') . '/'; + } else { + $value = $defaults[$option]; + } + $this->setSetting($option, $value, $blog_id); + } + } else { + add_option($option, $value); + } + } + + // Fix a bug that saved the ssl_host as an object + if ( ! is_string($this->getSetting('ssl_host', $blog_id)) ) { + $this->setSetting('ssl_host', $this->_settings['ssl_host'], $blog_id); + $this->setSetting('ssl_port', $this->_settings['ssl_port'], $blog_id); + $this->setSetting('ssl_host_diff', $this->_settings['ssl_host_diff'], $blog_id); + $this->setSetting('ssl_host_subdomain', $this->_settings['ssl_host_subdomain'], $blog_id); + } + + // If secure front page option exists, create front page filter + if ( $this->getSetting('frontpage', $blog_id) ) { + $this->setSetting('secure_filter', array_merge($this->getSetting('secure_filter'), array(rtrim(str_replace('http://', '', $this->getHttpUrl()->toString()), '/') . '/$'))); + $this->setSetting('frontpage', 0, $blog_id); + } + + // Reset cache + $this->setSetting('secure_external_urls', $this->_settings['secure_external_urls'], $blog_id); + $this->setSetting('unsecure_external_urls', $this->_settings['unsecure_external_urls'], $blog_id); + + // Set default domain mapping + if ( $this->getSetting('ssl_host_mapping', $blog_id) == array() ) { + $this->setSetting('ssl_host_mapping', WordPressHTTPS::$ssl_host_mapping, $blog_id); + } + } + + $is_subdomain = $this->getHttpsUrl()->isSubdomain($this->getHttpUrl()); + foreach ( $blogs as $blog_id ) { + $this->setSetting('ssl_host_subdomain', $is_subdomain, $blog_id); + } + } + + /** + * Is Local URL + * + * Determines if URL is local or external + * + * @param string $url + * @return boolean + */ + public function isUrlLocal($url) { + $hosts = $this->getLocalDomains(); + if ( ($url_parts = @parse_url($url)) && isset($url_parts['host']) && !in_array($url_parts['host'], $hosts) ) { + return false; + } + return true; + } + + /** + * Replaces HTTP Host with HTTPS Host + * + * @param string $string + * @return string $string + */ + public function makeUrlHttps( $string ) { + if ( (string)$string == '' ) { + return false; + } + + // If relative, prepend appropriate path + if ( strpos($string, '/') === 0 ) { + if ( $this->getSetting('ssl_host_diff') && strpos($string, $this->getHttpsUrl()->getPath()) === false ) { + if ( $this->getHttpUrl()->getPath() == '/' ) { + $string = rtrim($this->getHttpsUrl()->getPath(), '/') . $string; + } else { + $string = str_replace($this->getHttpUrl()->getPath(), $this->getHttpsUrl()->getPath(), $string); + } + } + } else if ( $url = WordPressHTTPS_Url::fromString( $string ) ) { + if ( $this->isUrlLocal($url) ) { + if ( $url->getScheme() == 'http' || ( $url->getScheme() == 'https' && $this->getSetting('ssl_host_diff') ) ) { + $has_host = ( $this->getHttpUrl()->getHost() == $this->getHttpsUrl()->getHost() ) || strpos($url, $this->getHttpsUrl()->getHost()) !== false; + $has_path = ( $this->getHttpUrl()->getPath() == $this->getHttpsUrl()->getPath() ) || strpos($url, $this->getHttpsUrl()->getPath()) !== false; + $has_port = ( (int)$this->getHttpsUrl()->getPort() > 0 ? strpos($url, ':' . $this->getHttpsUrl()->getPort()) !== false : true ); + if ( $url->getScheme() == 'http' || !$has_host || !$has_path || !$has_port ) { + $updated = clone $url; + $updated->setScheme('https'); + $updated->setHost($this->getHttpsUrl()->getHost()); + $updated->setPort($this->getHttpsUrl()->getPort()); + if ( $this->getSetting('ssl_host_diff') && strpos($updated->getPath(), $this->getHttpsUrl()->getPath()) === false ) { + if ( $this->getHttpUrl()->getPath() == '/' ) { + $updated->setPath(rtrim($this->getHttpsUrl()->getPath(), '/') . $updated->getPath()); + } else if ( strpos($updated->getPath(), $this->getHttpUrl()->getPath()) !== false ) { + $updated->setPath(str_replace($this->getHttpUrl()->getPath(), $this->getHttpsUrl()->getPath(), $updated->getPath())); + } else if ( strpos($updated->getPath(), rtrim($this->getHttpUrl()->getPath(), '/')) !== false ) { + $updated->setPath(str_replace(rtrim($this->getHttpUrl()->getPath(), '/'), $this->getHttpsUrl()->getPath(), $updated->getPath())); + } + } + if ( ( ( $this->isSsl() && !$this->getSetting('exclusive_https') ) || ( defined('FORCE_SSL_ADMIN') && constant('FORCE_SSL_ADMIN') ) || $this->getSetting('ssl_admin') ) && strpos($url, 'wp-admin') !== false && preg_match('/redirect_to=([^&]+)/i', $updated->toString(), $redirect) && isset($redirect[1]) ) { + $redirect_url = $redirect[1]; + $updated = str_replace($redirect_url, urlencode($this->makeUrlHttps(urldecode($redirect_url))), $updated->toString()); + } + $string = str_replace($url, $updated, $string); + } + } + } else { + $updated = clone $url; + $updated = WordPressHTTPS_Url::fromString( apply_filters('https_external_url', $updated->toString()) ); + if ( @in_array($updated->toString(), $this->getSetting('secure_external_urls')) == false && @in_array($updated->toString(), $this->getSetting('unsecure_external_urls')) == false ) { + $test = clone $updated; + $test->setScheme('https'); + if ( $test->isValid() ) { + // Cache this URL as available over HTTPS for future reference + $this->addSecureExternalUrl($updated->toString()); + $updated->setScheme('https'); + } else { + // If not available over HTTPS, mark as an unsecure external URL + $this->addUnsecureExternalUrl($updated->toString()); + } + } else if ( in_array($updated->toString(), $this->getSetting('secure_external_urls')) ) { + $updated->setScheme('https'); + } + if ( $url->toString() != $updated->toString() ) { + $string = str_replace($url, $updated, $string); + } + } + unset($test); + unset($updated); + unset($url); + } + return $string; + } + + /** + * Replaces HTTPS Host with HTTP Host + * + * @param string $string + * @return string $string + */ + public function makeUrlHttp( $string ) { + if ( (string)$string == '' ) { + return false; + } + + // If relative + if ( strpos($string, '/') === 0 ) { + if ( $this->getSetting('ssl_host_diff') && strpos($string, $this->getHttpsUrl()->getPath()) !== false ) { + $string = str_replace($this->getHttpsUrl()->getPath(), $this->getHttpUrl()->getPath(), $string); + } + } else if ( $url = WordPressHTTPS_Url::fromString( $string ) ) { + if ( $this->isUrlLocal($url) ) { + if ( $url->getScheme() == 'https' ) { + $updated = clone $url; + $updated->setScheme('http'); + $updated->setHost($this->getHttpUrl()->getHost()); + $updated->setPort($this->getHttpUrl()->getPort()); + if ( $this->getSetting('ssl_host_diff') && strpos($updated->getPath(), $this->getHttpsUrl()->getPath()) !== false ) { + $updated->setPath(str_replace($this->getHttpsUrl()->getPath(), $this->getHttpUrl()->getPath(), $updated->getPath())); + } + if ( strpos($url, 'wp-admin') !== false && preg_match('/redirect_to=([^&]+)/i', $url, $redirect) && isset($redirect[1]) ) { + $redirect_url = $redirect[1]; + $url = str_replace($redirect_url, urlencode($this->makeUrlHttp(urldecode($redirect_url))), $url); + } + $string = str_replace($url, $updated, $string); + } + } else { + $updated = apply_filters('http_external_url', str_replace('https://', 'http://', $url)); + $string = str_replace($url, $updated, $string); + } + } + unset($updated); + unset($url); + return $string; + } + + /** + * Add Secure External URL + * + * @param string $value + * @return $this + */ + public function addSecureExternalUrl( $value ) { + if ( trim($value) == '' ) { + return $this; + } + + $secure_external_urls = (array) $this->getSetting('secure_external_urls'); + array_push($secure_external_urls, (string) $value); + $this->setSetting('secure_external_urls', $secure_external_urls); + + return $this; + } + + /** + * Add Unsecure External URL + * + * @param string $value + * @return $this + */ + public function addUnsecureExternalUrl( $value ) { + if ( trim($value) == '' ) { + return $this; + } + + $unsecure_external_urls = (array) $this->getSetting('unsecure_external_urls'); + array_push($unsecure_external_urls, (string) $value); + $this->setSetting('unsecure_external_urls', $unsecure_external_urls); + + return $this; + } + + /** + * Checks if the current page is SSL + * + * @param none + * @return bool + */ + public function isSsl() { + // Some extra checks for Shared SSL + if ( is_ssl() && strpos($_SERVER['HTTP_HOST'], $this->getHttpsUrl()->getHost()) === false && $_SERVER['SERVER_ADDR'] != $_SERVER['HTTP_HOST'] ) { + return false; + } else if ( isset($_SERVER['HTTP_CF_VISITOR']) && strpos($_SERVER['HTTP_CF_VISITOR'], 'https') ) { + return true; + } else if ( isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https' ) { + return true; + } else if ( $this->getSetting('ssl_host_diff') && !is_ssl() && isset($_SERVER['HTTP_X_FORWARDED_SERVER']) && $this->getHttpsUrl()->getHost() == $_SERVER['HTTP_X_FORWARDED_SERVER'] ) { + return true; + } else if ( $this->getSetting('ssl_host_diff') && !is_ssl() && $this->getHttpsUrl()->getHost() == $_SERVER['HTTP_HOST'] && ( $this->getHttpsUrl()->getPort() <= 0 || $_SERVER['SERVER_PORT'] == $this->getHttpsUrl()->getPort() ) && strpos($_SERVER['REQUEST_URI'], $this->getHttpsUrl()->getPath()) !== false ) { + return true; + } + return is_ssl(); + } + + /** + * Maintained for backwards compatibility. + * + * @param none + * @return bool + */ + public function is_ssl() { + return $this->isSsl(); + } + + /** + * Redirects page to HTTP or HTTPS accordingly + * + * @param string $scheme Either http or https + * @return void + */ + public function redirect( $scheme = 'https' ) { + $current_path = ( isset($_SERVER['REDIRECT_URL']) && strpos($_SERVER['REDIRECT_URL'], 'index.php') === false ? $_SERVER['REDIRECT_URL'] : $_SERVER['REQUEST_URI'] ); + if ( strpos($_SERVER['REQUEST_URI'], '?') !== false && isset($_SERVER['REDIRECT_URL']) && strpos($_SERVER['REDIRECT_URL'], '?') === false ) { + $current_path .= substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], '?')); + } + + $current_url = ( $this->isSsl() ? 'https' : 'http' ) . '://' . ( isset($_SERVER['HTTP_X_FORWARDED_SERVER']) ? $_SERVER['HTTP_X_FORWARDED_SERVER'] : $_SERVER['HTTP_HOST'] ) . $current_path; + if ( $scheme == 'https' ) { + $url = $this->makeUrlHttps($current_url); + } else { + $url = $this->makeUrlHttp($current_url); + } + + if ( $current_url != $url ) { + // Use a cookie to detect redirect loops + $redirect_count = ( isset($_COOKIE['redirect_count']) && is_numeric($_COOKIE['redirect_count']) ? (int)$_COOKIE['redirect_count']+1 : 1 ); + setcookie('redirect_count', $redirect_count, 0, '/'); + // If redirect count is greater than 2, prevent redirect and log the redirect loop + if ( $redirect_count > 2 ) { + setcookie('redirect_count', null, -time(), '/'); + $this->getLogger()->log('[ERROR] Redirect Loop!'); + return; + } + + // Redirect + if ( function_exists('wp_redirect') ) { + wp_redirect($url, 301); + } else { + // End all output buffering and redirect + while(@ob_end_clean()); + header("Location: " . $url, true, 301); + } + exit(); + } + } + + /** + * Get relevent files and directories within WordPress + * + * @param none + * @return void + */ + public function getDirectories() { + $directories = array(); + $scannedDirectories = array(); + $directories[] = get_theme_root() . '/' . get_template(); + + foreach( $directories as $directory ) { + $scannedDirectories[$directory]['name'] = $directory; + if ( is_readable($directory) && ($files = scandir($directory)) ) { + $scannedDirectories[$directory]['files'] = $files; + unset($files); + } else { + $scannedDirectories[$directory]['error'] = "Unable to read directory."; + } + } + return $scannedDirectories; + } + +} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Logger.php b/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Logger.php new file mode 100644 index 0000000..178e3de --- /dev/null +++ b/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Logger.php @@ -0,0 +1,100 @@ +_log; + } + + /** + * Adds a string to an array of log entries + * + * @param string $string + * @return $this + */ + public function log( $string ) { + $this->_log[] = $string; + return $this; + } + + /** + * Console Log + * + * Output contents of the log to the browser's console. + * + * @param none + * @return string $code + */ + public function consoleLog() { + $code = "\n"; + return $code; + } + + /** + * File Log + * + * Writes the contens of the log to a file + * + * @param sring $filename + * @return int | false + */ + public function fileLog( $filename = '' ) { + if ( $filename == '' ) { + $filename = 'debug.log.txt'; + } + return file_put_contents($filename, implode("\r\n", $this->getLog()), FILE_APPEND); + } + +} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/Admin.php b/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/Admin.php new file mode 100644 index 0000000..fb01b3e --- /dev/null +++ b/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/Admin.php @@ -0,0 +1,74 @@ +getPlugin()->getSlug() . '-admin-global', $this->getPlugin()->getPluginUrl() . '/admin/css/admin.css', array(), $this->getPlugin()->getVersion()); + } + + /** + * Renders a meta box + * + * @param string $module + * @param array $metabox + * @return void + */ + public function meta_box_render( $module, $metabox = array() ) { + if ( isset($metabox['args']['metabox']) ) { + include($this->getPlugin()->getDirectory() . '/admin/templates/metabox/' . $metabox['args']['metabox'] . '.php'); + } + } + + /** + * Plugin links on Manage Plugins page in admin panel + * WordPress Hook - plugin_row_meta + * + * @param array $links + * @param string $file + * @return array $links + */ + public function plugin_links($links, $file) { + if ( strpos($file, $this->getPlugin()->getSlug()) === false ) { + return $links; + } + + $links[] = 'Settings'; + $links[] = 'FAQ'; + $links[] = 'Support'; + $links[] = 'Donate'; + return $links; + } + +} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/Core.php b/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/Core.php new file mode 100644 index 0000000..69424a1 --- /dev/null +++ b/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/Core.php @@ -0,0 +1,655 @@ +getPlugin()->getSetting('ssl_host_diff') && $this->getPlugin()->isSsl() ) { + // Prevent WordPress' canonical redirect when using a different SSL Host + remove_filter('template_redirect', 'redirect_canonical'); + // Add SSL Host path to rewrite rules + add_filter('rewrite_rules_array', array(&$this, 'rewrite_rules'), 10, 1); + } + + // Add SSL Host to allowed redirect hosts + add_filter('allowed_redirect_hosts' , array(&$this, 'allowed_redirect_hosts'), 10, 1); + + // Filter URL's + add_filter('bloginfo_url', array(&$this, 'secure_url'), 10); + add_filter('logout_url', array(&$this, 'secure_url'), 10); + add_filter('login_url', array(&$this, 'secure_url'), 10); + add_filter('network_admin_url', array(&$this, 'secure_url'), 10); + + // Filter Element URL's + add_filter('get_avatar', array(&$this, 'element_url'), 10); + add_filter('wp_get_attachment_url', array(&$this, 'element_url'), 10); + add_filter('template_directory_uri', array(&$this, 'element_url'), 10); + add_filter('stylesheet_directory_uri', array(&$this, 'element_url'), 10); + add_filter('plugins_url', array(&$this, 'element_url'), 10); + add_filter('includes_url', array(&$this, 'element_url'), 10); + + // Filter admin_url in admin + if ( is_admin() ) { + add_filter('admin_url', array(&$this, 'admin_url'), 10, 2); + // Filter site_url publicly + } else { + add_filter('site_url', array(&$this, 'site_url'), 10, 4); + } + + // Filter force_ssl + add_filter('force_ssl', array(&$this, 'secure_wordpress_forms'), 20, 3); + add_filter('force_ssl', array(&$this, 'secure_different_host_admin'), 20, 3); + add_filter('force_ssl', array(&$this, 'secure_child_post'), 30, 3); + add_filter('force_ssl', array(&$this, 'secure_admin'), 30, 3); + add_filter('force_ssl', array(&$this, 'secure_login'), 30, 3); + add_filter('force_ssl', array(&$this, 'secure_element'), 30, 3); + add_filter('force_ssl', array(&$this, 'secure_post'), 40, 3); + add_filter('force_ssl', array(&$this, 'secure_exclusive'), 50, 3); + + $filters = array('page_link', 'preview_page_link', 'post_link', 'preview_page_link', 'post_type_link', 'attachment_link', 'day_link', 'month_link', 'year_link', 'comment_reply_link', 'category_link', 'author_link', 'archives_link', 'tag_link', 'search_link'); + foreach( $filters as $filter ) { + add_filter($filter, array(&$this, 'secure_post_link'), 10); + } + + // Run install when new blog is created + add_action('wpmu_new_blog', array($this->getPlugin(), 'install'), 10, 0); + + // Set response headers + add_action($this->getPlugin()->getSlug() . '_init', array(&$this, 'set_headers'), 9, 1); + + if ( $this->getPlugin()->getSetting('ssl_host_diff') ) { + // Remove SSL Host authentication cookies on logout + add_action('clear_auth_cookie', array(&$this, 'clear_cookies')); + + // Set authentication cookie + if ( $this->getPlugin()->isSsl() ) { + add_action('set_auth_cookie', array(&$this, 'set_cookie'), 10, 5); + add_action('set_logged_in_cookie', array(&$this, 'set_cookie'), 10, 5); + } + } + + // Filter scripts + add_action('wp_print_scripts', array(&$this, 'fix_scripts'), 100, 0); + add_action('admin_print_scripts', array(&$this, 'fix_scripts'), 100, 0); + + // Filter styles + add_action('wp_print_styles', array(&$this, 'fix_styles'), 100, 0); + add_action('admin_print_styles', array(&$this, 'fix_styles'), 100, 0); + + // Run proxy check + if ( $this->getPlugin()->getSetting('ssl_proxy') === 'auto' ) { + // If page is not SSL and no proxy cookie is detected, run proxy check + if ( ! $this->getPlugin()->isSsl() && ! isset($_COOKIE['wp_proxy']) ) { + add_action('init', array(&$this, 'proxy_check'), 1); + add_action('admin_init', array(&$this, 'proxy_check'), 1); + // Update ssl_proxy setting if a proxy has been detected + } else if ( $this->getPlugin()->getSetting('ssl_proxy') !== true && isset($_COOKIE['wp_proxy']) && $_COOKIE['wp_proxy'] == 1 ) { + $this->getPlugin()->setSetting('ssl_proxy', 1); + // Update ssl_proxy if proxy is no longer detected + } else if ( $this->getPlugin()->getSetting('ssl_proxy') !== false && isset($_COOKIE['wp_proxy']) && $_COOKIE['wp_proxy'] != 1 ) { + $this->getPlugin()->setSetting('ssl_proxy', 0); + } + } + + // Check if the page needs to be redirected + if ( is_admin() || preg_match('/wp-login\.php/', $_SERVER['REQUEST_URI']) === 1 ) { + add_action($this->getPlugin()->getSlug() . '_init', array(&$this, 'redirect_check')); + add_action($this->getPlugin()->getSlug() . '_init', array(&$this, 'clear_redirect_count_cookie'), 9, 1); + } else { + add_action('template_redirect', array(&$this, 'redirect_check')); + add_action('template_redirect', array(&$this, 'clear_redirect_count_cookie'), 9, 1); + } + } + + /** + * Allowed Redirect Hosts + * WordPress Filter - aloowed_redirect_hosts + * + * @param array $content + * @return array $content + */ + public function allowed_redirect_hosts( $content ) { + $content[] = $this->getPlugin()->getHttpsUrl()->getHost(); + return $content; + } + + /** + * Secure URL + * + * @param string $url + * @return string $url + */ + public function secure_url( $url = '' ) { + $force_ssl = apply_filters('force_ssl', null, 0, $url); + if ( $force_ssl ) { + $url = $this->getPlugin()->makeUrlHttps($url); + } else if ( !is_null($force_ssl) && !$force_ssl ) { + $url = $this->getPlugin()->makeUrlHttp($url); + } + return $url; + } + + /** + * Secure Element URL + * + * @param string $url + * @return string $url + */ + public function element_url( $url = '' ) { + $force_ssl = apply_filters('force_ssl', null, 0, $url); + if ( $this->getPlugin()->isSsl() || $force_ssl ) { + $url = $this->getPlugin()->makeUrlHttps($url); + } else if ( !is_null($force_ssl) && !$force_ssl ) { + $url = $this->getPlugin()->makeUrlHttp($url); + } + return $url; + } + + /** + * Add rewrite rule to recognize additional path information on SSL Host + * + * @param array $rules + * @return array $rules + */ + public function rewrite_rules( $rules = array() ) { + $requestPath = str_replace($this->getPlugin()->getHttpsUrl()->getPath(), '', $_SERVER['REQUEST_URI']); + if ( $this->getPlugin()->getHttpUrl()->getPath() != '/' ) { + $httpsPath = str_replace($this->getPlugin()->getHttpUrl()->getPath(), '', $this->getPlugin()->getHttpsUrl()->getPath()); + } else { + $httpsPath = $this->getPlugin()->getHttpsUrl()->getPath(); + } + if ( $httpsPath != '/' ) { + $rules['^' . $httpsPath . '([^\'"]+)'] = 'index.php?pagename=$matches[1]'; + } + return $rules; + } + + /** + * Admin URL + * WordPress Filter - admin_url + * + * @param string $url + * @param string $scheme + * @return string $url + */ + public function admin_url( $url, $scheme ) { + $force_ssl = apply_filters('force_ssl', null, 0, $url); + + // Catches base URL's used by low-level WordPress code + if ( is_null($force_ssl) && is_admin() && $this->getPlugin()->isSsl() && ($url_parts = parse_url($url)) && ( !isset($url_parts['path']) || trim($url_parts['path'], '/') == '' ) ) { + $force_ssl = true; + } + + if ( $scheme != 'http' && $force_ssl ) { + $url = $this->getPlugin()->makeUrlHttps($url); + } else if ( !is_null($force_ssl) && !$force_ssl ) { + $url = $this->getPlugin()->makeUrlHttp($url); + } + return $url; + } + + /** + * Site URL + * WordPress Filter - site_url + * + * @param string $url + * @param string $path + * @param string $scheme + * @param int $blog_id + * @return string $url + */ + public function site_url( $url, $path, $scheme, $blog_id ) { + $force_ssl = apply_filters('force_ssl', null, 0, $url); + + if ( $scheme != 'http' && $force_ssl ) { + $url = $this->getPlugin()->makeUrlHttps($url); + } else if ( !is_null($force_ssl) && !$force_ssl ) { + $url = $this->getPlugin()->makeUrlHttp($url); + } + return $url; + } + + /** + * Secure Post Link + * + * @param string $url + * @return string $url + */ + public function secure_post_link( $url ) { + $force_ssl = apply_filters('force_ssl', null, 0, $url); + if ( $force_ssl ) { + $url = $this->getPlugin()->makeUrlHttps($url); + } else if ( !is_null($force_ssl) && !$force_ssl ) { + $url = $this->getPlugin()->makeUrlHttp($url); + } + return $url; + } + + /** + * Secure Admin + * WordPress HTTPS Filter - force_ssl + * + * @param boolean $force_ssl + * @param int $post_id + * @param string $url + * @return boolean $force_ssl + */ + public function secure_admin( $force_ssl, $post_id = 0, $url = '' ) { + if ( $url != '' && $this->getPlugin()->isUrlLocal($url) && ( strpos($url, 'wp-admin') !== false || strpos($url, 'wp-login') !== false ) ) { + if ( $this->getPlugin()->getSetting('exclusive_https') && !( ( defined('FORCE_SSL_ADMIN') && constant('FORCE_SSL_ADMIN') ) || $this->getPlugin()->getSetting('ssl_admin') ) ) { + $force_ssl = false; + //TODO When logged in to HTTP and visiting an HTTPS page, admin links will always be forced to HTTPS, even if the user is not logged in via HTTPS. I need to find a way to detect this. + } else if ( ( $this->getPlugin()->isSsl() && !$this->getPlugin()->getSetting('exclusive_https') ) || ( ( defined('FORCE_SSL_ADMIN') && constant('FORCE_SSL_ADMIN') ) || $this->getPlugin()->getSetting('ssl_admin') ) ) { + $force_ssl = true; + } + if ( strpos($url, 'admin-ajax.php') !== false ) { + if ( $this->getPlugin()->isSsl() ) { + $force_ssl = true; + } else { + $force_ssl = false; + } + } + } + + return $force_ssl; + } + + /** + * Secure Login + * WordPress HTTPS Filter - force_ssl + * + * @param boolean $force_ssl + * @param int $post_id + * @param string $url + * @return boolean $force_ssl + */ + public function secure_login( $force_ssl, $post_id = 0, $url = '' ) { + if ( $url != '' && $this->getPlugin()->isUrlLocal($url) ) { + if ( force_ssl_login() && preg_match('/wp-login\.php$/', $url) === 1 ) { + $force_ssl = true; + } + } + return $force_ssl; + } + + /** + * Secure Element by Extension + * WordPress HTTPS Filter - force_ssl + * + * @param boolean $force_ssl + * @param int $post_id + * @param string $url + * @return boolean $force_ssl + */ + public function secure_element( $force_ssl, $post_id = 0, $url = '' ) { + if ( $url != '' && $this->getPlugin()->isUrlLocal($url) ) { + $filename = basename($url); + foreach( $this->getPlugin()->getFileExtensions() as $extension ) { + if ( preg_match('/\.' . $extension . '(\?|$)/', $filename) ) { + if ( $this->getPlugin()->isSsl() ) { + $force_ssl = true; + } else { + $force_ssl = false; + } + } + } + } + return $force_ssl; + } + + /** + * Secure Post + * WordPress HTTPS Filter - force_ssl + * + * @param boolean $force_ssl + * @param int $post_id + * @param string $url + * @return boolean $force_ssl + */ + public function secure_post( $force_ssl, $post_id = 0, $url = '' ) { + global $wpdb; + + if ( $post_id > 0 ) { + $force_ssl = ( get_post_meta($post_id, 'force_ssl', true) == 1 ? true : $force_ssl); + } + return $force_ssl; + } + + /** + * Always secure pages when using a different SSL Host. + * WordPress HTTPS Filter - force_ssl + * + * @param boolean $force_ssl + * @param int $post_id + * @param string $url + * @return boolean $force_ssl + */ + public function secure_exclusive( $force_ssl, $post_id = 0, $url = '' ) { + if ( is_null($force_ssl) && $this->getPlugin()->isUrlLocal($url) && $this->getPlugin()->getSetting('exclusive_https') ) { + $force_ssl = false; + } + return $force_ssl; + } + + /** + * Always secure pages when using a different SSL Host. + * WordPress HTTPS Filter - force_ssl + * + * @param boolean $force_ssl + * @param int $post_id + * @param string $url + * @return boolean $force_ssl + */ + public function secure_different_host_admin( $force_ssl, $post_id = 0, $url = '' ) { + if ( $post_id > 0 || ( $url != '' && $this->getPlugin()->isUrlLocal($url) ) ) { + if ( !$this->getPlugin()->getSetting('exclusive_https') && !$this->getPlugin()->getSetting('ssl_host_subdomain') && $this->getPlugin()->getSetting('ssl_host_diff') && $this->getPlugin()->getSetting('ssl_admin') && function_exists('is_user_logged_in') && is_user_logged_in() ) { + $force_ssl = true; + } + } + return $force_ssl; + } + + /** + * Secure WordPress forms + * WordPress HTTPS Filter - force_ssl + * + * @param boolean $force_ssl + * @param int $post_id + * @param string $url + * @return boolean $force_ssl + */ + public function secure_wordpress_forms( $force_ssl, $post_id = 0, $url = '' ) { + if ( $this->getPlugin()->isSsl() && $this->getPlugin()->isUrlLocal($url) && ( strpos($url, 'wp-pass.php') !== false || strpos($url, 'wp-login.php?action=') !== false || strpos($url, 'wp-comments-post.php') !== false ) ) { + $force_ssl = true; + } + return $force_ssl; + } + + /** + * Secure Child Post + * WordPress HTTPS Filter - force_ssl + * + * @param boolean $force_ssl + * @param int $post_id + * @param string $url + * @return boolean $force_ssl + */ + public function secure_child_post( $force_ssl, $post_id = 0, $url = '' ) { + if ( $post_id > 0 ) { + $postParent = get_post($post_id); + while ( $postParent->post_parent ) { + $postParent = get_post( $postParent->post_parent ); + if ( get_post_meta($postParent->ID, 'force_ssl_children', true) == 1 ) { + $force_ssl = true; + break; + } + } + } + return $force_ssl; + } + + /** + * Fix Enqueued Scripts + * + * @param none + * @return void + */ + public function fix_scripts() { + global $wp_scripts; + if ( isset($wp_scripts) && sizeof($wp_scripts->registered) > 0 ) { + foreach ( $wp_scripts->registered as $script ) { + if ( in_array($script->handle, $wp_scripts->queue) ) { + if ( strpos($script->src, 'http') === 0 ) { + if ( $this->getPlugin()->isSsl() ) { + $updated = $this->getPlugin()->makeUrlHttps($script->src); + $script->src = $updated; + } else { + $updated = $this->getPlugin()->makeUrlHttp($script->src); + $script->src = $updated; + } + if ( $script->src != $updated ) { + $log = '[FIXED] Element: ' . "\n"; + echo '' . "\n"; + exit(); + } + + /** + * Redirect Check + * + * Checks if the current page needs to be redirected + * + * @param none + * @return void + */ + public function redirect_check() { + global $post; + + $force_ssl = apply_filters('force_ssl', null, ( $post ? $post->ID : null ), ( $this->getPlugin()->isSsl() ? 'https' : 'http' ) . '://' . ( isset($_SERVER['HTTP_X_FORWARDED_SERVER']) ? $_SERVER['HTTP_X_FORWARDED_SERVER'] : $_SERVER['HTTP_HOST'] ) . $_SERVER['REQUEST_URI'] ); + + if ( ! $this->getPlugin()->isSsl() && isset($force_ssl) && $force_ssl ) { + $scheme = 'https'; + } else if ( $this->getPlugin()->isSsl() && isset($force_ssl) && ! $force_ssl ) { + $scheme = 'http'; + } + + if ( isset($scheme) ) { + $this->getPlugin()->redirect($scheme); + } + } + + /** + * Add Access-Control-Allow-Origin header to AJAX calls + * + * @param none + * @return void + */ + public function set_headers() { + if ( !headers_sent() && isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest' ) { + header("Access-Control-Allow-Origin: " . $this->getPlugin()->getHttpsUrl()); + } + } + + /** + * Set Cookie + * WordPress Hook - set_auth_cookie, set_logged_in_cookie + * + * @param string $cookie + * @param string $expire + * @param int $expiration + * @param int $user_id + * @param string $scheme + * @return void + */ + public function set_cookie($cookie, $expire, $expiration, $user_id, $scheme) { + if ( ( $scheme == 'secure_auth' && $this->getPlugin()->isSsl() ) || ( ( ( defined('FORCE_SSL_ADMIN') && constant('FORCE_SSL_ADMIN') ) || $this->getPlugin()->getSetting('ssl_admin') ) && ! $this->getPlugin()->getSetting('ssl_host_subdomain') ) ) { + $secure = true; + } + $secure = apply_filters('secure_auth_cookie', @$secure, $user_id); + + if( $scheme == 'logged_in' ) { + $cookie_name = LOGGED_IN_COOKIE; + } elseif ( $secure ) { + $cookie_name = SECURE_AUTH_COOKIE; + $scheme = 'secure_auth'; + } else { + $cookie_name = AUTH_COOKIE; + $scheme = 'auth'; + $secure = false; + } + + //$cookie_domain = COOKIE_DOMAIN; + $cookie_path = COOKIEPATH; + $cookie_path_site = SITECOOKIEPATH; + $cookie_path_plugins = PLUGINS_COOKIE_PATH; + $cookie_path_admin = ADMIN_COOKIE_PATH; + + if ( $this->getPlugin()->isSsl() ) { + // If SSL Host is a subdomain, make cookie domain a wildcard + if ( $this->getPlugin()->getSetting('ssl_host_subdomain') ) { + $cookie_domain = '.' . $this->getPlugin()->getHttpsUrl()->getBaseHost(); + // Otherwise, cookie domain set for different SSL Host + } else { + $cookie_domain = $this->getPlugin()->getHttpsUrl()->getHost(); + } + + if ( $this->getPlugin()->getHttpsUrl()->getPath() != '/' ) { + $cookie_path = str_replace($this->getPlugin()->getHttpsUrl()->getPath(), '', $cookie_path); + $cookie_path_site = str_replace($this->getPlugin()->getHttpsUrl()->getPath(), '', $cookie_path_site); + $cookie_path_plugins = str_replace($this->getPlugin()->getHttpsUrl()->getPath(), '', $cookie_path_plugins); + } + + if ( $this->getPlugin()->getHttpUrl()->getPath() != '/' ) { + $cookie_path = str_replace($this->getPlugin()->getHttpUrl()->getPath(), '', $cookie_path); + $cookie_path_site = str_replace($this->getPlugin()->getHttpUrl()->getPath(), '', $cookie_path_site); + $cookie_path_plugins = str_replace($this->getPlugin()->getHttpUrl()->getPath(), '', $cookie_path_plugins); + } + + $cookie_path = rtrim($this->getPlugin()->getHttpsUrl()->getPath(), '/') . $cookie_path; + $cookie_path_site = rtrim($this->getPlugin()->getHttpsUrl()->getPath(), '/') . $cookie_path_site; + $cookie_path_plugins = rtrim($this->getPlugin()->getHttpsUrl()->getPath(), '/') . $cookie_path_plugins; + $cookie_path_admin = rtrim($cookie_path_site, '/') . '/wp-admin'; + } + + if ( $scheme == 'logged_in' ) { + setcookie($cookie_name, $cookie, $expire, $cookie_path, $cookie_domain, $secure, true); + if ( $cookie_path != $cookie_path_site ) { + setcookie($cookie_name, $cookie, $expire, $cookie_path_site, $cookie_domain, $secure, true); + } + } else { + setcookie($cookie_name, $cookie, $expire, $cookie_path_plugins, $cookie_domain, false, true); + setcookie($cookie_name, $cookie, $expire, $cookie_path_admin, $cookie_domain, false, true); + } + } + + /** + * Removes redirect_count cookie. + * + * @param none + * @return void + */ + public function clear_redirect_count_cookie() { + if ( !headers_sent() && isset($_COOKIE['redirect_count']) ) { + setcookie('redirect_count', null, -time(), '/'); + } + } + + /** + * Clear Cookies + * WordPress Hook - clear_auth_cookie + * + * @param none + * @return void + */ + public function clear_cookies() { + if ( $this->getPlugin()->getSetting('ssl_host_subdomain') ) { + $cookie_domain = '.' . $this->getPlugin()->getHttpsUrl()->getBaseHost(); + } else { + $cookie_domain = $this->getPlugin()->getHttpsUrl()->getHost(); + } + + $cookie_path = COOKIEPATH; + $cookie_path_site = SITECOOKIEPATH; + $cookie_path_plugins = PLUGINS_COOKIE_PATH; + + if ( $this->getPlugin()->getHttpsUrl()->getPath() != '/' ) { + $cookie_path = str_replace($this->getPlugin()->getHttpsUrl()->getPath(), '', $cookie_path); + $cookie_path_site = str_replace($this->getPlugin()->getHttpsUrl()->getPath(), '', $cookie_path_site); + $cookie_path_plugins = str_replace($this->getPlugin()->getHttpsUrl()->getPath(), '', $cookie_path_plugins); + } + + if ( $this->getPlugin()->getHttpUrl()->getPath() != '/' ) { + $cookie_path = str_replace($this->getPlugin()->getHttpUrl()->getPath(), '', $cookie_path); + $cookie_path_site = str_replace($this->getPlugin()->getHttpUrl()->getPath(), '', $cookie_path_site); + $cookie_path_plugins = str_replace($this->getPlugin()->getHttpUrl()->getPath(), '', $cookie_path_plugins); + } + + $cookie_path = rtrim($this->getPlugin()->getHttpsUrl()->getPath(), '/') . $cookie_path; + $cookie_path_site = rtrim($this->getPlugin()->getHttpsUrl()->getPath(), '/') . $cookie_path_site; + $cookie_path_plugins = rtrim($this->getPlugin()->getHttpsUrl()->getPath(), '/') . $cookie_path_plugins; + $cookie_path_admin = $cookie_path_site . 'wp-admin'; + + setcookie(AUTH_COOKIE, ' ', time() - 31536000, $cookie_path_admin, $cookie_domain); + setcookie(AUTH_COOKIE, ' ', time() - 31536000, $cookie_path_plugins, $cookie_domain); + setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, $cookie_path_admin, $cookie_domain); + setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, $cookie_path_plugins, $cookie_domain); + setcookie(LOGGED_IN_COOKIE, ' ', time() - 31536000, $cookie_path, $cookie_domain); + setcookie(LOGGED_IN_COOKIE, ' ', time() - 31536000, $cookie_path_site, $cookie_domain); + + setcookie(AUTH_COOKIE, ' ', time() - 31536000, $cookie_path_admin); + setcookie(AUTH_COOKIE, ' ', time() - 31536000, $cookie_path_plugins); + setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, $cookie_path_admin); + setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, $cookie_path_plugins); + setcookie(LOGGED_IN_COOKIE, ' ', time() - 31536000, $cookie_path); + setcookie(LOGGED_IN_COOKIE, ' ', time() - 31536000, $cookie_path_site); + } + +} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/DomainMapping.php b/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/DomainMapping.php new file mode 100644 index 0000000..db584f9 --- /dev/null +++ b/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/DomainMapping.php @@ -0,0 +1,116 @@ +getPlugin()->getSlug() . '_domain_mapping_save', array(&$this, 'save')); + add_action('wp_ajax_' . $this->getPlugin()->getSlug() . '_domain_mapping_reset', array(&$this, 'reset')); + if ( isset($_GET['page']) && strpos($_GET['page'], $this->getPlugin()->getSlug()) !== false ) { + // Add meta boxes + add_action('admin_init', array(&$this, 'add_meta_boxes')); + } + } + + // Custom filter https_external_url + add_filter('https_external_url', array(&$this, 'map_url'), 10); + } + + /** + * Domain Mapping + * + * @param string $url + * @return string $url + */ + public function map_url( $url ) { + if ( is_array($this->getPlugin()->getSetting('ssl_host_mapping')) && sizeof($this->getPlugin()->getSetting('ssl_host_mapping')) > 0 ) { + foreach( $this->getPlugin()->getSetting('ssl_host_mapping') as $http_domain => $https_domain ) { + preg_match('/' . $http_domain . '/', $url, $matches); + if ( sizeof($matches) > 0 ) { + $url = preg_replace('/' . $http_domain . '/', $https_domain, $url); + } + } + } + return $url; + } + + /** + * Add meta boxes to WordPress HTTPS Settings page. + * + * @param none + * @return void + */ + public function add_meta_boxes() { + add_meta_box( + $this->getPlugin()->getSlug() . '_domain_mapping', + __( 'Domain Mapping', $this->getPlugin()->getSlug() ), + array($this->getPlugin()->getModule('Admin'), 'meta_box_render'), + 'toplevel_page_' . $this->getPlugin()->getSlug(), + 'main', + 'core', + array( 'metabox' => 'domain_mapping' ) + ); + } + + /** + * Reset Domain Mapping + * + * @param array $settings + * @return void + */ + public function reset() { + if ( !wp_verify_nonce($_POST['_wpnonce'], $this->getPlugin()->getSlug()) ) { + return false; + } + + $message = "Domain Mapping reset."; + $errors = array(); + $reload = true; + + $this->getPlugin()->setSetting('ssl_host_mapping', WordPressHTTPS::$ssl_host_mapping); + + require_once($this->getPlugin()->getDirectory() . '/admin/templates/ajax_message.php'); + } + + /** + * Save Domain Mapping + * + * @param array $settings + * @return void + */ + public function save() { + if ( !wp_verify_nonce($_POST['_wpnonce'], $this->getPlugin()->getSlug()) ) { + return false; + } + + $message = "Domain Mapping saved."; + $errors = array(); + $reload = false; + + $ssl_host_mapping = array(); + for( $i=0; $igetPlugin()->setSetting('ssl_host_mapping', $ssl_host_mapping); + + require_once($this->getPlugin()->getDirectory() . '/admin/templates/ajax_message.php'); + } + +} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/Ecommerce.php b/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/Ecommerce.php new file mode 100644 index 0000000..a6f15f6 --- /dev/null +++ b/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/Ecommerce.php @@ -0,0 +1,101 @@ + 0 ) { + $woocommerce_checkout_pages = array( + get_option('woocommerce_checkout_page_id'), + get_option('woocommerce_pay_page_id') + ); + $woocommerce_account_pages = array( + get_option('woocommerce_myaccount_page_id'), + get_option('woocommerce_edit_address_page_id'), + get_option('woocommerce_view_order_page_id'), + get_option('woocommerce_change_password_page_id') + ); + if ( get_option('woocommerce_force_ssl_checkout') == 'yes' ) { + $secure_pages = array_merge($woocommerce_checkout_pages, $woocommerce_account_pages); + if ( in_array($post_id, $secure_pages) ) { + $force_ssl = true; + } else if ( get_option('woocommerce_unforce_ssl_checkout') === 'yes' && !in_array($post_id, $secure_pages) ) { + $force_ssl = false; + } + } + } + return $force_ssl; + } + + /** + * Secure Jigoshop + * WordPress HTTPS Filter - force_ssl + * + * @param boolean $force_ssl + * @param int $post_id + * @param string $url + * @return boolean $force_ssl + */ + public function secure_jigoshop( $force_ssl, $post_id = 0, $url = '' ) { + if ( !is_admin() && $post_id > 0 ) { + if ( get_option('jigoshop_force_ssl_checkout') === 'yes' && ( $post_id == get_option('jigoshop_checkout_page_id') || strpos($url, 'admin-ajax.php?action=jigoshop-checkout') !== false ) ) { + $force_ssl = true; + } + } + return $force_ssl; + } + + /** + * Secure WP E-commerce + * WordPress HTTPS Filter - force_ssl + * + * @param boolean $force_ssl + * @param int $post_id + * @param string $url + * @return boolean $force_ssl + */ + public function secure_wpecommerce( $force_ssl, $post_id = 0, $url = '' ) { + global $wp_query; + + if ( !is_admin() && $post_id > 0 ) { + if ( get_option('wpsc_force_ssl') === '1' && strpos( $wp_query->post->post_content, '[shoppingcart]' ) !== false ) { + $force_ssl = true; + } + } + return $force_ssl; + } + +} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/Network.php b/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/Network.php new file mode 100644 index 0000000..068fde4 --- /dev/null +++ b/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/Network.php @@ -0,0 +1,166 @@ +getPlugin()->getSlug() . '_network_settings_save', array(&$this, 'save')); + if ( isset($_GET['page']) && strpos($_GET['page'], $this->getPlugin()->getSlug()) !== false && strpos($_SERVER['REQUEST_URI'], 'wp-admin/network') !== false ) { + // Add meta boxes + add_action('admin_init', array(&$this, 'add_meta_boxes')); + + // Add scripts + add_action('admin_enqueue_scripts', array(&$this, 'admin_enqueue_scripts')); + } + } + + if ( is_multisite() ) { + add_action('network_admin_menu', array(&$this, 'network_admin_menu')); + } + } + + /** + * Network admin panel menu option + * WordPress Hook - network_admin_menu + * + * @param none + * @return void + */ + public function network_admin_menu() { + add_menu_page('HTTPS', 'HTTPS', 'manage_options', $this->getPlugin()->getSlug(), array(&$this, 'dispatch'), '', 88); + } + + /** + * Add meta boxes to WordPress HTTPS Settings page. + * + * @param none + * @return void + */ + public function add_meta_boxes() { + add_meta_box( + $this->getPlugin()->getSlug() . '_settings', + __( 'Network Settings', $this->getPlugin()->getSlug() ), + array($this->getPlugin()->getModule('Admin'), 'meta_box_render'), + 'toplevel_page_' . $this->getPlugin()->getSlug() . '_network', + 'main', + 'core', + array( 'metabox' => 'network' ) + ); + add_meta_box( + $this->getPlugin()->getSlug() . '_donate2', + __( 'Loading...', $this->getPlugin()->getSlug() ), + array($this->getPlugin()->getModule('Admin'), 'meta_box_render'), + 'toplevel_page_' . $this->getPlugin()->getSlug() . '_network', + 'main', + 'low', + array( 'metabox' => 'ajax', 'url' => 'http://wordpresshttps.com/client/donate2.php' ) + ); + } + + /** + * Dispatch request for settings page + * + * @param none + * @return void + */ + public function dispatch() { + if ( !current_user_can('manage_network_options') ) { + wp_die( __('You do not have sufficient permissions to access this page.') ); + } + + self::render(); + } + + /** + * Adds javascript and stylesheets to settings page in the admin panel. + * WordPress Hook - enqueue_scripts + * + * @param none + * @return void + */ + public function admin_enqueue_scripts() { + wp_enqueue_style($this->getPlugin()->getSlug() . '-network-admin-page', $this->getPlugin()->getPluginUrl() . '/admin/css/network.css', array($this->getPlugin()->getSlug() . '-admin-page'), $this->getPlugin()->getVersion()); + } + + /** + * Render settings page + * + * @param none + * @return void + */ + public function render() { + require_once($this->getPlugin()->getDirectory() . '/admin/templates/network.php'); + } + + /** + * Save Settings + * + * @param array $settings + * @return void + */ + public function save() { + if ( !wp_verify_nonce($_POST['_wpnonce'], $this->getPlugin()->getSlug()) ) { + return false; + } + + $message = "Network settings saved."; + $errors = array(); + $reload = false; + $logout = false; + + if ( isset($_POST['blog']) && is_array($_POST['blog']) && sizeof($_POST['blog']) > 0 ) { + foreach( $_POST['blog'] as $blog_id => $setting ) { + foreach( $setting as $key => $value ) { + if ( $key == 'ssl_host' && $value != '' ) { + $blog_url = WordPressHTTPS_Url::fromString(get_site_url($blog_id, '', 'https')); + $value = strtolower($value); + // Add Scheme + if ( strpos($value, 'http://') === false && strpos($value, 'https://') === false ) { + $value = 'https://' . $value; + } + + $ssl_host = WordPressHTTPS_Url::fromString($value); + + // Add Port + $port = (($blog_url->getPort() && $blog_url->getPort() != 80 && $blog_url->getPort() != 443) ? $port : null); + $ssl_host->setPort($port); + + // Add Path + if ( strpos($ssl_host->getPath(), $blog_url->getPath()) !== true ) { + $path = '/'. ltrim(str_replace(rtrim($blog_url->getPath(), '/'), '', $ssl_host->getPath()), '/'); + $ssl_host->setPath(rtrim($path, '/') . $blog_url->getPath()); + } + $ssl_host->setPath(rtrim($ssl_host->getPath(), '/') . '/'); + $value = $ssl_host->toString(); + } + $this->getPlugin()->setSetting($key, $value, $blog_id); + } + } + } + if ( isset($_POST['blog_default']) && is_array($_POST['blog_default']) && sizeof($_POST['blog_default']) > 0 ) { + $this->getPlugin()->setSetting('network_defaults', $_POST['blog_default']); + } + + if ( $logout ) { + wp_logout(); + } + + require_once($this->getPlugin()->getDirectory() . '/admin/templates/ajax_message.php'); + } + +} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/Parser.php b/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/Parser.php new file mode 100644 index 0000000..f48dad1 --- /dev/null +++ b/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/Parser.php @@ -0,0 +1,441 @@ +_html + */ + public function parseHtml( $buffer ) { + $this->_html = $buffer; + + $this->normalizeElements(); + $this->fixLinksAndForms(); + $this->fixExtensions(); + $this->fixElements(); + $this->fixCssElements(); + $this->fixRelativeElements(); + + // Output logger contents to browsers console if in Debug Mode + if ( $this->getPlugin()->getSetting('debug') == true ) { + $this->consoleLog(); + } + + return $this->_html; + } + + /** + * Start output buffering + * + * @param none + * @return void + */ + public function startOutputBuffering() { + ob_start(array(&$this, 'parseHtml')); + } + + /** + * Secure element + * + * @param string $url + * @param string $type + * @return boolean + */ + public function secureElement( $url, $type = '' ) { + $updated = false; + $result = false; + $upload_dir = wp_upload_dir(); + $upload_path = str_replace($this->getPlugin()->getHttpsUrl()->getPath(), $this->getPlugin()->getHttpUrl()->getPath(), parse_url($upload_dir['baseurl'], PHP_URL_PATH)); + + if ( ! is_admin() || ( is_admin() && strpos($url, $upload_path) === false ) ) { + $updated = $this->getPlugin()->makeUrlHttps($url); + if ( $url != $updated ) { + $this->_html = str_replace($url, $updated, $this->_html); + } else { + $updated = false; + } + } + + // Add log entry if this change hasn't been logged + if ( $updated ) { + $log = '[FIXED] Element: ' . ( $type != '' ? '<' . $type . '> ' : '' ) . $url . ' => ' . $updated; + $result = true; + } else if ( strpos($url, 'http://') === 0 ) { + if ( $this->getPlugin()->getSetting('remove_unsecure') ) { + $log = '[FIXED] Removed Unsecure Element: <' . $type . '> - ' . $url; + } else { + $log = '[WARNING] Unsecure Element: <' . $type . '> - ' . $url; + } + } + if ( isset($log) && ! in_array($log, $this->getPlugin()->getLogger()->getLog()) ) { + $this->getPlugin()->getLogger()->log($log); + } + + return $result; + } + + /** + * Unsecure element + * + * @param string $url + * @param string $type + * @return boolean + */ + public function unsecureElement( $url, $type = '' ) { + $updated = false; + $result = false; + $upload_dir = wp_upload_dir(); + $upload_path = str_replace($this->getPlugin()->getHttpsUrl()->getPath(), $this->getPlugin()->getHttpUrl()->getPath(), parse_url($upload_dir['baseurl'], PHP_URL_PATH)); + + if ( ! is_admin() || ( is_admin() && strpos($url, $upload_path) === false ) ) { + $updated = $this->getPlugin()->makeUrlHttp($url); + $this->_html = str_replace($url, $updated, $this->_html); + } + + // Add log entry if this change hasn't been logged + if ( $updated && $url != $updated ) { + $log = '[FIXED] Element: ' . ( $type != '' ? '<' . $type . '> ' : '' ) . $url . ' => ' . $updated; + $result = true; + } + if ( isset($log) && ! in_array($log, $this->getPlugin()->getLogger()->getLog()) ) { + $this->getPlugin()->getLogger()->log($log); + } + + return $result; + } + + /** + * Normalize all local URL's to HTTP + * + * @param none + * @return void + */ + public function normalizeElements() { + $httpMatches = array(); + $httpsMatches = array(); + if ( $this->getPlugin()->getSetting('ssl_host_diff') && !is_admin() ) { + $url = clone $this->getPlugin()->getHttpsUrl(); + $url->setScheme('http'); + preg_match_all('/(' . str_replace('/', '\/', preg_quote($url->toString())) . '[^\'"]*)[\'"]?/im', $this->_html, $httpsMatches); + + $url = clone $this->getPlugin()->getHttpUrl(); + $url->setScheme('https'); + preg_match_all('/(' . str_replace('/', '\/', preg_quote($url->toString())) . '[^\'"]*)[\'"]?/im', $this->_html, $httpMatches); + + $matches = array_merge($httpMatches, $httpsMatches); + for ($i = 0; $i < sizeof($matches[0]); $i++) { + if ( isset($matches[1][$i]) ) { + $url_parts = parse_url($matches[1][$i]); + if ( $url_parts && strpos($url_parts['path'], 'wp-admin') === false && strpos($url_parts['path'], 'wp-login') === false ) { + $this->_html = str_replace($url, $this->getPlugin()->makeUrlHttp($url), $this->_html); + } + } + } + } + } + + /** + * Fixes schemes on DOM elements. + * + * @param none + * @return void + */ + public function fixElements() { + if ( is_admin() ) { + preg_match_all('/\<(script|link|img)[^>]+[\'"]((http|https):\/\/[^\'"]+)[\'"][^>]*>(<\/(script|link|img|input|embed|param|iframe)>\s*)?/im', $this->_html, $matches); + } else { + preg_match_all('/\<(script|link|img|input|embed|param|iframe)[^>]+[\'"]((http|https):\/\/[^\'"]+)[\'"][^>]*>(<\/(script|link|img|input|embed|param|iframe)>\s*)?/im', $this->_html, $matches); + } + + for ($i = 0; $i < sizeof($matches[0]); $i++) { + $html = $matches[0][$i]; + $type = $matches[1][$i]; + $url = $matches[2][$i]; + $scheme = $matches[3][$i]; + $updated = false; + + if ( $type == 'img' || $type == 'script' || $type == 'embed' || $type == 'iframe' || + ( $type == 'link' && ( strpos($html, 'stylesheet') !== false || strpos($html, 'pingback') !== false ) ) || + ( $type == 'form' && strpos($html, 'wp-pass.php') !== false ) || + ( $type == 'form' && strpos($html, 'wp-login.php?action=postpass') !== false ) || + ( $type == 'form' && strpos($html, 'commentform') !== false ) || + ( $type == 'input' && strpos($html, 'image') !== false ) || + ( $type == 'param' && strpos($html, 'movie') !== false ) + ) { + if ( $this->getPlugin()->isSsl() && ( $this->getPlugin()->getSetting('ssl_host_diff') || ( !$this->getPlugin()->getSetting('ssl_host_diff') && strpos($url, 'http://') === 0 ) ) ) { + if ( !$this->secureElement($url, $type) && $this->getPlugin()->getSetting('remove_unsecure') ) { + $this->_html = str_replace($html, '', $this->_html); + } + } else if ( !$this->getPlugin()->isSsl() && strpos($url, 'https://') === 0 ) { + $this->unsecureElement($url, $type); + } + } + } + } + + /** + * Fix CSS background images or imports. + * + * @param none + * @return void + */ + public function fixCssElements() { + preg_match_all('/(import|background)[:]?[^u]*url\([\'"]?(http:\/\/[^\'"\)]+)[\'"\)]?\)/im', $this->_html, $matches); + for ($i = 0; $i < sizeof($matches[0]); $i++) { + $css = $matches[0][$i]; + $url = $matches[2][$i]; + if ( $this->getPlugin()->isSsl() && ( $this->getPlugin()->getSetting('ssl_host_diff') || ( !$this->getPlugin()->getSetting('ssl_host_diff') && strpos($url, 'http://') === 0 ) ) ) { + $this->secureElement($url, 'style'); + } else if ( !$this->getPlugin()->isSsl() && strpos($url, 'https://') === 0 ) { + $this->unsecureElement($url, 'style'); + } + } + } + + /** + * Fix elements that are being referenced relatively. + * + * @param none + * @return void + */ + public function fixRelativeElements() { + if ( $this->getPlugin()->isSsl() && $this->getPlugin()->getHttpUrl()->getPath() != $this->getPlugin()->getHttpsUrl()->getPath() ) { + preg_match_all('/\<(script|link|img|input|form|embed|param)[^>]+(src|href|action|data|movie|image|value)=[\'"](\/[^\'"]*)[\'"][^>]*>/im', $this->_html, $matches); + + for ($i = 0; $i < sizeof($matches[0]); $i++) { + $html = $matches[0][$i]; + $type = $matches[1][$i]; + $attr = $matches[2][$i]; + $url_path = $matches[3][$i]; + if ( + $type != 'input' || + ( $type == 'input' && $attr == 'image' ) || + ( $type == 'input' && strpos($html, '_wp_http_referer') !== false ) + ) { + if ( strpos($url_path, '//') !== 0 ) { + $updated = clone $this->getPlugin()->getHttpsUrl(); + $updated->setPath($url_path); + $this->_html = str_replace($html, str_replace($url_path, $updated, $html), $this->_html); + $this->getPlugin()->getLogger()->log('[FIXED] Element: <' . $type . '> - ' . $url_path . ' => ' . $updated); + } + } + } + } + } + + /** + * Fixes schemes on DOM elements with extensions specified in $this->_extensions + * + * @param none + * @return void + */ + public function fixExtensions() { + @preg_match_all('/((http|https):\/\/[^\'"\)\s]+)[\'"\)]?/i', $this->_html, $matches); + for ($i = 0; $i < sizeof($matches[1]); $i++) { + $url = $matches[1][$i]; + $filename = basename($url); + $scheme = $matches[2][$i]; + + foreach( $this->getPlugin()->getFileExtensions() as $extension ) { + if ( $extension == 'js' ) { + $type = 'script'; + } else if ( $extension == 'css' ) { + $type = 'style'; + } else if ( in_array($extension, array('jpg', 'jpeg', 'png', 'gif')) ) { + $type = 'img'; + } else { + continue; + } + + if ( preg_match('/\.' . $extension . '(\?|$)/', $filename) ) { + if ( $this->getPlugin()->isSsl() && ( $this->getPlugin()->getSetting('ssl_host_diff') || ( !$this->getPlugin()->getSetting('ssl_host_diff') && strpos($url, 'http://') === 0 ) ) ) { + $this->secureElement($url, $type); + } else if ( !$this->getPlugin()->isSsl() && strpos($url, 'https://') === 0 ) { + $this->unsecureElement($url, $type); + } + } + } + } + } + + /** + * Fix links and forms + * + * @param none + * @return void + */ + public function fixLinksAndForms() { + global $wpdb; + // Update anchor and form tags to appropriate URL's + preg_match_all('/\<(a|form)[^>]+[\'"]((http|https):\/\/[^\'"]+)[\'"][^>]*>/im', $this->_html, $matches); + + for ($i = 0; $i < sizeof($matches[0]); $i++) { + $html = $matches[0][$i]; + $type = $matches[1][$i]; + $url = $matches[2][$i]; + $scheme = $matches[3][$i]; + $updated = false; + $post_id = null; + $blog_id = null; + $force_ssl = null; + $url_path = '/'; + + if ( !$this->getPlugin()->isUrlLocal($url) ) { + continue; + } + + if ( $url != '' && ($url_parts = parse_url($url)) && isset($url_parts['path']) ) { + if ( $this->getPlugin()->getHttpsUrl()->getPath() != '/' ) { + if ( $this->getPlugin()->getSetting('ssl_host_diff') ) { + $url_parts['path'] = str_replace($this->getPlugin()->getHttpsUrl()->getPath(), '', $url_parts['path']); + } + if ( $this->getPlugin()->getHttpUrl()->getPath() != '/' ) { + $url_parts['path'] = str_replace($this->getPlugin()->getHttpUrl()->getPath(), '', $url_parts['path']); + } + } + + // qTranslate integration - strips language from beginning of url path + if ( defined('QTRANS_INIT') && constant('QTRANS_INIT') == true ) { + global $q_config; + if ( isset($q_config['enabled_languages']) ) { + foreach($q_config['enabled_languages'] as $language) { + $url_parts['path'] = preg_replace('/^\/' . $language . '\//', '/', $url_parts['path']); + } + } + } + + if ( preg_match("/page_id=([\d]+)/", parse_url($url, PHP_URL_QUERY), $postID) ) { + $post_id = $postID[1]; + } else if ( isset($url_parts['path']) && ( $url_parts['path'] == '' || $url_parts['path'] == '/' ) ) { + if ( get_option('show_on_front') == 'page' ) { + $post_id = get_option('page_on_front'); + } + } else if ( isset($url_parts['path']) && ($post = get_page_by_path($url_parts['path'])) ) { + $post_id = $post->ID; + } + + if ( is_multisite() && isset($url_parts['host']) ) { + if ( is_subdomain_install() ) { + $blog_id = get_blog_id_from_url( $url_parts['host'], '/'); + } else { + $url_path_segments = explode('/', $url_parts['path']); + if ( sizeof($url_path_segments) > 1 ) { + foreach( $url_path_segments as $url_path_segment ) { + if ( is_null($blog_id) && $url_path_segment != '' ) { + $url_path .= $url_path_segment . '/'; + if ( ($blog_id = get_blog_id_from_url( $url_parts['host'], $url_path)) > 0 ) { + break; + } else { + $blog_id = null; + } + } + } + } + } + + if ( !is_null($blog_id) && $blog_id != $wpdb->blogid ) { + // URL Filters + if ( sizeof((array)$this->getPlugin()->getSetting('secure_filter', $blog_id)) > 0 ) { + foreach( $this->getPlugin()->getSetting('secure_filter', $blog_id) as $filter ) { + if ( preg_match('/' . str_replace('/', '\/', $filter) . '/', $url) === 1 ) { + $force_ssl = true; + } + } + } + if ( ( $this->getPlugin()->getSetting('ssl_admin', $blog_id) || defined('FORCE_SSL_ADMIN') && constant('FORCE_SSL_ADMIN') ) && strpos($url_parts['path'], 'wp-admin') !== false && ( ! $this->getPlugin()->getSetting('ssl_host_diff', $blog_id) || ( $this->getPlugin()->getSetting('ssl_host_diff', $blog_id) && function_exists('is_user_logged_in') && is_user_logged_in() ) ) ) { + $force_ssl = true; + } else if ( is_null($force_ssl) && $this->getPlugin()->getSetting('exclusive_https', $blog_id) ) { + $force_ssl = false; + } else if ( strpos($url, 'https://') === 0 ) { + $force_ssl = true; + } + } + } + } + + // Only apply force_ssl filters for current blog + if ( is_null($blog_id) ) { + $force_ssl = apply_filters('force_ssl', null, ( isset($post_id) ? $post_id : 0 ), $url ); + } + + if ( $force_ssl == true ) { + if ( is_null($blog_id) ) { + $updated = $this->getPlugin()->makeUrlHttps($url); + } else { + if ( $this->getPlugin()->getSetting('ssl_host', $blog_id) ) { + $ssl_host = $this->getPlugin()->getSetting('ssl_host', $blog_id); + } else { + $ssl_host = parse_url(get_home_url($blog_id, '/'), PHP_URL_HOST); + } + if ( is_subdomain_install() ) { + $host = $url_parts['host'] . '/'; + } else { + $host = $url_parts['host'] . '/' . $url_path; + } + $updated = str_replace($url_parts['scheme'] . '://' . $host, $ssl_host, $url); + } + $this->_html = str_replace($html, str_replace($url, $updated, $html), $this->_html); + } else if ( !is_null($force_ssl) && !$force_ssl ) { + if ( is_null($blog_id) ) { + $updated = $this->getPlugin()->makeUrlHttp($url); + } else { + if ( is_subdomain_install() ) { + $host = $url_parts['host'] . '/'; + } else { + $host = $url_parts['host'] . '/' . $url_path; + } + $updated = str_replace($url_parts['scheme'] . '://' . $host, get_home_url($blog_id, '/'), $url); + } + $this->_html = str_replace($html, str_replace($url, $updated, $html), $this->_html); + } + + // Add log entry if this change hasn't been logged + if ( $updated && $url != $updated ) { + $log = '[FIXED] Element: <' . $type . '> - ' . $url . ' => ' . $updated; + if ( ! in_array($log, $this->getPlugin()->getLogger()->getLog()) ) { + $this->getPlugin()->getLogger()->log($log); + } + } + } + } + + /** + * Output contents of the log to the browser's console. + * + * @param none + * @return void + */ + public function consoleLog() { + $this->_html = str_replace('', $this->getPlugin()->getLogger()->consoleLog() . "\n\n", $this->_html); + } + +} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/Post.php b/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/Post.php new file mode 100644 index 0000000..3a39c61 --- /dev/null +++ b/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/Post.php @@ -0,0 +1,96 @@ + true, + ); + $post_types = get_post_types( $args ); + foreach($post_types as $post_type ) { + add_meta_box( + $this->getPlugin()->getSlug(), + __( 'HTTPS', $this->getPlugin()->getSlug() ), + array($this->getPlugin()->getModule('Admin'), 'meta_box_render'), + $post_type, + 'side', + 'core', + array( 'metabox' => 'post' ) + ); + }; + } + + /** + * Save Force SSL option to post or page + * + * @param int $post_id + * @return int $post_id + */ + public function post_save( $post_id ) { + if ( array_key_exists($this->getPlugin()->getSlug(), $_POST) ) { + if ( ! wp_verify_nonce($_POST[$this->getPlugin()->getSlug()], $this->getPlugin()->getSlug()) ) { + return $post_id; + } + + if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) { + return $post_id; + } + + if ( @$_POST['post_type'] == 'page' ) { + if ( !current_user_can('edit_page', $post_id) ) { + return $post_id; + } + } else { + if ( !current_user_can('edit_post', $post_id) ) { + return $post_id; + } + } + + $force_ssl = ( @$_POST['force_ssl'] == 1 ? true : false); + if ( $force_ssl ) { + update_post_meta($post_id, 'force_ssl', 1); + } else { + delete_post_meta($post_id, 'force_ssl'); + } + + $force_ssl_children = ( @$_POST['force_ssl_children'] == 1 ? true : false); + if ( $force_ssl_children ) { + update_post_meta($post_id, 'force_ssl_children', 1); + } else { + delete_post_meta($post_id, 'force_ssl_children'); + } + } + + return $post_id; + } + +} diff --git a/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/Settings.php b/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/Settings.php new file mode 100644 index 0000000..b0049a4 --- /dev/null +++ b/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/Settings.php @@ -0,0 +1,303 @@ +getPlugin()->getSlug() . '_settings_save', array(&$this, 'save')); + add_action('wp_ajax_' . $this->getPlugin()->getSlug() . '_settings_reset', array(&$this, 'reset')); + add_action('wp_ajax_' . $this->getPlugin()->getSlug() . '_ajax_metabox', array(&$this, 'ajax_metabox')); + if ( isset($_GET['page']) && strpos($_GET['page'], $this->getPlugin()->getSlug()) !== false ) { + // Add meta boxes + add_action('admin_init', array(&$this, 'add_meta_boxes')); + + // Add scripts + add_action('admin_enqueue_scripts', array(&$this, 'admin_enqueue_scripts')); + } + + // Add admin menus + add_action('admin_menu', array(&$this, 'admin_menu')); + } + } + + /** + * Admin panel menu option + * WordPress Hook - admin_menu + * + * @param none + * @return void + */ + public function admin_menu() { + if ( $this->getPlugin()->getSetting('admin_menu') === 'side' ) { + add_menu_page('HTTPS', 'HTTPS', 'manage_options', $this->getPlugin()->getSlug(), array($this->getPlugin()->getModule('Settings'), 'dispatch'), '', 88); + } else { + add_options_page('HTTPS', 'HTTPS', 'manage_options', $this->getPlugin()->getSlug(), array($this->getPlugin()->getModule('Settings'), 'dispatch')); + } + } + + /** + * Add meta boxes to WordPress HTTPS Settings page. + * + * @param none + * @return void + */ + public function add_meta_boxes() { + add_meta_box( + $this->getPlugin()->getSlug() . '_settings', + __( 'General Settings', $this->getPlugin()->getSlug() ), + array($this->getPlugin()->getModule('Admin'), 'meta_box_render'), + 'toplevel_page_' . $this->getPlugin()->getSlug(), + 'main', + 'high', + array( 'metabox' => 'settings' ) + ); + add_meta_box( + $this->getPlugin()->getSlug() . '_updates', + __( 'Developer Updates', $this->getPlugin()->getSlug() ), + array($this->getPlugin()->getModule('Admin'), 'meta_box_render'), + 'toplevel_page_' . $this->getPlugin()->getSlug(), + 'side', + 'high', + array( 'metabox' => 'ajax', 'url' => 'http://wordpresshttps.com/client/updates.php' ) + ); + add_meta_box( + $this->getPlugin()->getSlug() . '_support', + __( 'Support', $this->getPlugin()->getSlug() ), + array($this->getPlugin()->getModule('Admin'), 'meta_box_render'), + 'toplevel_page_' . $this->getPlugin()->getSlug(), + 'side', + 'high', + array( 'metabox' => 'ajax', 'url' => 'http://wordpresshttps.com/client/support.php' ) + ); + add_meta_box( + $this->getPlugin()->getSlug() . '_rate', + __( 'Feedback', $this->getPlugin()->getSlug() ), + array($this->getPlugin()->getModule('Admin'), 'meta_box_render'), + 'toplevel_page_' . $this->getPlugin()->getSlug(), + 'side', + 'core', + array( 'metabox' => 'ajax', 'url' => 'http://wordpresshttps.com/client/rate.php' ) + ); + add_meta_box( + $this->getPlugin()->getSlug() . '_donate', + __( 'Donate', $this->getPlugin()->getSlug() ), + array($this->getPlugin()->getModule('Admin'), 'meta_box_render'), + 'toplevel_page_' . $this->getPlugin()->getSlug(), + 'side', + 'core', + array( 'metabox' => 'ajax', 'url' => 'http://wordpresshttps.com/client/donate.php' ) + ); + add_meta_box( + $this->getPlugin()->getSlug() . '_donate2', + __( 'Loading...', $this->getPlugin()->getSlug() ), + array($this->getPlugin()->getModule('Admin'), 'meta_box_render'), + 'toplevel_page_' . $this->getPlugin()->getSlug(), + 'main', + 'low', + array( 'metabox' => 'ajax', 'url' => 'http://wordpresshttps.com/client/donate2.php' ) + ); + } + + /** + * Dispatch request for settings page + * + * @param none + * @return void + */ + public function dispatch() { + if ( !current_user_can('manage_options') ) { + wp_die( __('You do not have sufficient permissions to access this page.') ); + } + + self::render(); + } + + /** + * Dispatch request for ajax metabox + * + * @param none + * @return void + */ + public function ajax_metabox() { + // Disable errors + error_reporting(0); + + // Set headers + header("Status: 200"); + header("HTTP/1.1 200 OK"); + header('Content-Type: text/html'); + header('Cache-Control: no-store, no-cache, must-revalidate'); + header('Cache-Control: post-check=0, pre-check=0', FALSE); + header('Pragma: no-cache'); + header("Vary: Accept-Encoding"); + + if ( ! wp_verify_nonce($_POST['_nonce'], $this->getPlugin()->getSlug()) ) { + exit; + } + + $content = WordPressHTTPS_Url::fromString( $_POST['url'] )->getContent(); + if ( $content ) { + echo $content; + } + exit; + } + + /** + * Adds javascript and stylesheets to settings page in the admin panel. + * WordPress Hook - enqueue_scripts + * + * @param none + * @return void + */ + public function admin_enqueue_scripts() { + wp_enqueue_style($this->getPlugin()->getSlug() . '-admin-page', $this->getPlugin()->getPluginUrl() . '/admin/css/settings.css', array(), $this->getPlugin()->getVersion()); + wp_enqueue_script('jquery-form'); + wp_enqueue_script('post'); + + if ( function_exists('add_thickbox') ) { + add_thickbox(); + } + } + + /** + * Render settings page + * + * @param none + * @return void + */ + public function render() { + require_once($this->getPlugin()->getDirectory() . '/admin/templates/settings.php'); + } + + /** + * Reset Settings + * + * @param none + * @return void + */ + public function reset() { + if ( !wp_verify_nonce($_POST['_wpnonce'], $this->getPlugin()->getSlug()) ) { + return false; + } + + $message = "Settings reset."; + $errors = array(); + $reload = true; + + foreach ($this->getPlugin()->getSettings() as $key => $default) { + $this->getPlugin()->setSetting($key, $default); + } + $this->getPlugin()->install(); + + require_once($this->getPlugin()->getDirectory() . '/admin/templates/ajax_message.php'); + } + + /** + * Save Settings + * + * @param none + * @return void + */ + public function save() { + if ( !wp_verify_nonce($_POST['_wpnonce'], $this->getPlugin()->getSlug()) ) { + return false; + } + + $message = "Settings saved."; + $errors = array(); + $reload = false; + $logout = false; + + foreach ($this->getPlugin()->getSettings() as $key => $default) { + if ( !array_key_exists($key, $_POST) && $default == 0 ) { + $_POST[$key] = 0; + $this->getPlugin()->setSetting($key, $_POST[$key]); + } else if ( array_key_exists($key, $_POST) ) { + if ( $key == 'ssl_host' ) { + if ( $_POST[$key] != '' ) { + $_POST[$key] = strtolower($_POST[$key]); + // Add Scheme + if ( strpos($_POST[$key], 'http://') === false && strpos($_POST[$key], 'https://') === false ) { + $_POST[$key] = 'https://' . $_POST[$key]; + } + + $ssl_host = WordPressHTTPS_Url::fromString($_POST[$key]); + + // Add Port + $_POST['ssl_port'] = $port = ((isset($_POST['ssl_port']) && is_int($_POST['ssl_port']) && $_POST['ssl_port'] != 443) ? $_POST['ssl_port'] : $ssl_host->getPort()); + $ssl_host->setPort($port); + + // Add Path + if ( strpos($ssl_host->getPath(), $this->getPlugin()->getHttpUrl()->getPath()) !== true ) { + $path = '/'. ltrim(str_replace(rtrim($this->getPlugin()->getHttpUrl()->getPath(), '/'), '', $ssl_host->getPath()), '/'); + $ssl_host->setPath(rtrim($path, '/') . $this->getPlugin()->getHttpUrl()->getPath()); + } + $ssl_host->setPath(rtrim($ssl_host->getPath(), '/') . '/'); + + if ( $ssl_host->toString() != $this->getPlugin()->getHttpsUrl()->toString() ) { + // Ensure that the WordPress installation is accessible at this host + //if ( $ssl_host->isValid() ) { + // If secure domain has changed and currently on SSL, logout user + if ( $this->getPlugin()->isSsl() ) { + $logout = true; + } + $_POST[$key] = $ssl_host->setPort('')->toString(); + /*} else { + $errors[] = 'SSL Host - Invalid WordPress installation at ' . $ssl_host; + $_POST[$key] = get_option($key); + }*/ + } else { + $_POST[$key] = $this->getPlugin()->getHttpsUrl()->toString(); + } + } else { + $_POST[$key] = get_option($key); + } + } else if ( $key == 'ssl_proxy' ) { + // Reload if we're auto detecting the proxy and we're not in SSL + if ( $_POST[$key] == 'auto' && ! $this->getPlugin()->isSsl() ) { + $reload = true; + } + } else if ( $key == 'ssl_admin' ) { + if ( force_ssl_admin() && $this->getPlugin()->getSetting('ssl_host_diff') ) { + $errors[] = 'SSL Admin - FORCE_SSL_ADMIN should not be set to true in your wp-config.php while using a non-default SSL Host.'; + // If forcing SSL Admin and currently not SSL, logout user + } else if ( $_POST[$key] == 1 && !$this->getPlugin()->isSsl() ) { + $logout = true; + } + } else if ( $key == 'ssl_host_subdomain' ) { + // Checks to see if the SSL Host is a subdomain + $is_subdomain = $this->getPlugin()->getHttpsUrl()->isSubdomain($this->getPlugin()->getHttpUrl()); + if ( $ssl_host->setScheme('http') != $this->getPlugin()->getHttpUrl() && $is_subdomain ) { + $_POST[$key] = 1; + } else { + $_POST[$key] = 0; + } + } + + $this->getPlugin()->setSetting($key, $_POST[$key]); + } + } + + if ( $logout ) { + wp_logout(); + } + + require_once($this->getPlugin()->getDirectory() . '/admin/templates/ajax_message.php'); + } + +} diff --git a/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/UrlFilters.php b/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/UrlFilters.php new file mode 100644 index 0000000..9cdcb83 --- /dev/null +++ b/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/UrlFilters.php @@ -0,0 +1,114 @@ +getPlugin()->getSlug() . '_filters_save', array(&$this, 'save')); + add_action('wp_ajax_' . $this->getPlugin()->getSlug() . '_filters_reset', array(&$this, 'reset')); + if ( isset($_GET['page']) && strpos($_GET['page'], $this->getPlugin()->getSlug()) !== false ) { + // Add meta boxes + add_action('admin_init', array(&$this, 'add_meta_boxes')); + } + } + + add_filter('force_ssl', array(&$this, 'secure_filter_url'), 10, 3); + } + + /** + * Secure Filter URL + * WordPress HTTPS Filter - force_ssl + * + * @param boolean $force_ssl + * @param int $post_id + * @param string $url + * @return boolean $force_ssl + */ + public function secure_filter_url( $force_ssl, $post_id = 0, $url = '' ) { + // Check secure filters + if ( is_null($force_ssl) && sizeof((array)$this->getPlugin()->getSetting('secure_filter')) > 0 ) { + foreach( $this->getPlugin()->getSetting('secure_filter') as $filter ) { + if ( preg_match('/' . str_replace('/', '\/', $filter) . '/', $url) === 1 ) { + $force_ssl = true; + } + } + } + return $force_ssl; + } + + /** + * Add meta boxes to WordPress HTTPS Settings page. + * + * @param none + * @return void + */ + public function add_meta_boxes() { + add_meta_box( + $this->getPlugin()->getSlug() . '_filters', + __( 'URL Filters', $this->getPlugin()->getSlug() ), + array($this->getPlugin()->getModule('Admin'), 'meta_box_render'), + 'toplevel_page_' . $this->getPlugin()->getSlug(), + 'main', + 'default', + array( 'metabox' => 'filters' ) + ); + } + + /** + * Reset Url Filters + * + * @param array $settings + * @return void + */ + public function reset() { + if ( !wp_verify_nonce($_POST['_wpnonce'], $this->getPlugin()->getSlug()) ) { + return false; + } + + $message = "URL Filters reset."; + $errors = array(); + $reload = true; + + $this->getPlugin()->setSetting('secure_filter', array()); + + require_once($this->getPlugin()->getDirectory() . '/admin/templates/ajax_message.php'); + } + + /** + * Save Url Filters + * + * @param array $settings + * @return void + */ + public function save() { + if ( !wp_verify_nonce($_POST['_wpnonce'], $this->getPlugin()->getSlug()) ) { + return false; + } + + $message = "URL Filters saved."; + $errors = array(); + $reload = false; + + $filters = array_map('trim', explode("\n", $_POST['secure_filter'])); + $filters = array_filter($filters); // Removes blank array items + $this->getPlugin()->setSetting('secure_filter', $filters); + + require_once($this->getPlugin()->getDirectory() . '/admin/templates/ajax_message.php'); + } + +} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Url.php b/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Url.php new file mode 100644 index 0000000..fc343f3 --- /dev/null +++ b/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Url.php @@ -0,0 +1,555 @@ +_scheme = $scheme; + return $this; + } + + /** + * Get Scheme + * + * @param none + * @return string + */ + public function getScheme() { + return $this->_scheme; + } + + /** + * Set Host + * + * @param string $host + * @return object $this + */ + public function setHost( $host ) { + $this->_host = $host; + return $this; + } + + /** + * Get Host + * + * @param none + * @return string + */ + public function getHost() { + return $this->_host; + } + + /** + * Set Base Host + * + * @param string $base_host + * @return object $this + */ + public function setBaseHost( $base_host ) { + $this->_base_host = $base_host; + return $this; + } + + /** + * Gets the base host of the URL + * + * @param none + * @return string + */ + public function getBaseHost() { + $return_url = clone $this; + $test_url = clone $this; + $test_url->setPath(''); + $host_parts = explode('.', $test_url->getHost()); + for ( $i = 0; $i <= sizeof($host_parts); $i++ ) { + $test_url->setHost( str_replace($host_parts[$i] . '.', '', $test_url->getHost()) ); + if ( $test_url->isValid() ) { + $return_url = clone $test_url; + } else { + break; + } + } + return $return_url->getHost(); + } + + /** + * Set Port + * + * @param string $port + * @return object $this + */ + public function setPort( $port ) { + $this->_port = $port; + return $this; + } + + /** + * Get Port + * + * @param none + * @return string + */ + public function getPort() { + return $this->_port; + } + + /** + * Set User + * + * @param string $user + * @return object $this + */ + public function setUser( $user ) { + $this->_user = $user; + return $this; + } + + /** + * Get User + * + * @param none + * @return string + */ + public function getUser() { + return $this->_user; + } + + /** + * Set Pass + * + * @param string $pass + * @return object $this + */ + public function setPass( $pass ) { + $this->_pass = $pass; + return $this; + } + + /** + * Get Pass + * + * @param none + * @return string + */ + public function getPass() { + return $this->_pass; + } + + /** + * Set Path + * + * Ensures the path begins with a forward slash + * + * @param none + * @return string + */ + public function setPath( $path ) { + $this->_path = ltrim($path, '/'); + $this->_path = '/' . $this->_path; + $filename = basename($this->_path); + $pathinfo = pathinfo($filename); + if ( $pathinfo && isset($pathinfo['extension']) ) { + $this->setExtension($pathinfo['extension']); + $this->setFilename($filename); + } + + return $this; + } + + /** + * Get Path + * + * Ensures the path begins with a forward slash + * + * @param none + * @return string + */ + public function getPath() { + return $this->_path; + } + + /** + * Set Filename + * + * @param string $filename + * @return object $this + */ + public function setFilename( $filename ) { + $this->_filename = $filename; + return $this; + } + + /** + * Get Filename + * + * @param none + * @return string + */ + public function getFilename() { + return $this->_filename; + } + + /** + * Set Extension + * + * @param string $extension + * @return object $this + */ + public function setExtension( $extension ) { + $this->_extension = $extension; + return $this; + } + + /** + * Get Extension + * + * @param none + * @return string + */ + public function getExtension() { + return $this->_extension; + } + + /** + * Set Query + * + * @param string $query + * @return object $this + */ + public function setQuery( $query ) { + $this->_query = $query; + return $this; + } + + /** + * Get Query + * + * @param none + * @return string + */ + public function getQuery() { + return $this->_query; + } + + /** + * Set Fragment + * + * @param string $fragment + * @return object $this + */ + public function setFragment( $fragment ) { + $this->_fragment = $fragment; + return $this; + } + + /** + * Get Fragment + * + * @param none + * @return string + */ + public function getFragment() { + return $this->_fragment; + } + + /** + * Set Content + * + * @param string $content + * @return object $this + */ + public function setContent( $content ) { + $this->_content = $content; + return $this; + } + + /** + * Get the contents of the URL + * + * @param boolean $verify_ssl + * @return boolean + */ + public function getContent( $verify_ssl = false ) { + if ( $this->_content ) { + return $this->_content; + } + + $this->_content = false; + + if ( function_exists('curl_init') ) { + $ch = curl_init(); + + curl_setopt($ch, CURLOPT_URL, $this->toString()); + curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER["HTTP_USER_AGENT"]); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $verify_ssl); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_FAILONERROR, true); + curl_setopt($ch, CURLOPT_TIMEOUT, 5); + @curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); + curl_setopt($ch, CURLOPT_HEADER, false); + curl_setopt($ch, CURLOPT_ENCODING, 'gzip,deflate'); + + $content = curl_exec($ch); + $info = curl_getinfo($ch); + curl_close($ch); + + if ( isset($info['http_code']) && !( $info['http_code'] == 0 || $info['http_code'] == 404 ) ) { + $this->_content = $content; + } + } + + if ( !$this->_content && @ini_get('allow_url_fopen') ) { + if ( ($content = @file_get_contents($this->toString())) !== false ) { + $this->_content = $content; + } + } + return $this->_content; + } + + /** + * Validates the existence of the URL with cURL or file_get_contents() + * + * @param boolean $verify_ssl + * @return boolean + */ + public function isValid( $verify_ssl = false ) { + if ( function_exists('curl_init') ) { + $ch = curl_init(); + + curl_setopt($ch, CURLOPT_URL, $this->toString()); + curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER["HTTP_USER_AGENT"]); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $verify_ssl); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_FAILONERROR, true); + curl_setopt($ch, CURLOPT_TIMEOUT, 5); + @curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); + curl_setopt($ch, CURLOPT_HEADER, false); + curl_setopt($ch, CURLOPT_ENCODING, 'gzip,deflate'); + + $content = curl_exec($ch); + $info = curl_getinfo($ch); + curl_close($ch); + + if ( !$info['http_code'] || ( $info['http_code'] == 0 || $info['http_code'] == 404 ) ) { + return false; + } else { + return true; + } + } else if ( @ini_get('allow_url_fopen') ) { + if ( @file_get_contents($url) !== false ) { + return true; + } + } + return false; + } + + /** + * Compares URL objects to determine if either of them are a subdomain of the other. + * + * @param WordPressHTTPS_Url $url + * @return boolean + */ + public function isSubdomain( WordPressHTTPS_Url $url ) { + $this_host = $this->getBaseHost(); + $other_host = $url->getBaseHost(); + if ( $this_host == $other_host ) { + return true; + } + return false; + } + + /** + * Factory object from an array provided by the parse_url function + * + * Example of usage: + * $site_url = WordPressHTTPS_Url::fromArray( parse_url( site_url() ) ); + * + * @param array $array + * @return $url WordPressHTTPS_Url + */ + public static function fromArray( $array = array() ) { + if ( sizeof($array) <= 1 ) { + return false; + } + + $url = new WordPressHTTPS_Url; + $url->setScheme(@$array['scheme']); + $url->setUser(@$array['user']); + $url->setPass(@$array['pass']); + $url->setHost(@$array['host']); + $url->setPort(@$array['port']); + $url->setPath(@$array['path']); + $url->setQuery(@$array['query']); + $url->setFragment(@$array['fragment']); + + return $url; + } + + /** + * Factory object from a string that contains a URL + * + * Example of usage: + * $site_url = WordPressHTTPS_Url::fromString( site_url() ); + * + * @param string $string + * @return $url WordPressHTTPS_Url + */ + public static function fromString( $string ) { + $url = new WordPressHTTPS_Url; + + @preg_match_all('/((http|https):\/\/[^\'"]+)[\'"\)]?/i', $string, $url_parts); + if ( isset($url_parts[1][0]) ) { + if ( $url_parts = parse_url( $url_parts[1][0] ) ) { + $url->setScheme(@$url_parts['scheme']); + $url->setUser(@$url_parts['user']); + $url->setPass(@$url_parts['pass']); + $url->setHost(@$url_parts['host']); + $url->setPort(@$url_parts['port']); + $url->setPath(@$url_parts['path']); + $url->setQuery(@$url_parts['query']); + $url->setFragment(@$url_parts['fragment']); + return $url; + } + } else { + return false; + } + + return $url; + } + + /** + * Returns an array of all URL properties + * + * @param none + * @return array parse_url + */ + public function toArray() { + return parse_url( $this->toString() ); + } + + /** + * Formats the current URL object to a string + * + * @param none + * @return string + */ + public function toString() { + $string = ( $this->getScheme() ? $this->getScheme() . '://' : '' ) . + ( $this->getUser() ? $this->getUser() . ( $this->getPass() ? ':' . $this->getPass() : '' ) . '@' : '' ) . + $this->getHost() . + ( $this->getPort() && ( ( $this->getPort() != 80 && $this->getScheme() == 'http' ) || ( $this->getPort() != 443 && $this->getScheme() == 'https' ) ) ? ':' . $this->getPort() : '' ) . + $this->getPath() . + ( $this->getQuery() ? '?' . $this->getQuery() : '' ) . + ( $this->getFragment() ? '#' . $this->getFragment() : '' ); + + return $string; + } + + /** + * Magic __toString method that is called when the object is casted to a string + * + * @param none + * @return string + */ + public function __toString() { + return $this->toString(); + } + +} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/readme.txt b/wp-content/plugins/wordpress-https/readme.txt new file mode 100644 index 0000000..e071fa5 --- /dev/null +++ b/wp-content/plugins/wordpress-https/readme.txt @@ -0,0 +1,294 @@ +=== WordPress HTTPS (SSL) === +Contributors: Mvied +Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=N9NFVADLVUR7A +Tags: security, encryption, ssl, shared ssl, private ssl, public ssl, private ssl, http, https +Requires at least: 3.0 +Tested up to: 3.5 +Stable tag: 3.3.6 +License: GPLv3 + +WordPress HTTPS is intended to be an all-in-one solution to using SSL on WordPress sites. + +== Description == +

                Read the Installation Guide. If after setting up the plugin you are experiencing issues, please check the FAQ.

                +

                If you are still unable to resolve your issue, start a support topic and I or someone from the community will be able to assist you.

                +

                Contribute Code at https://github.com/Mvied/wordpress-https

                +

                Contribute Translations at https://translate.foe-services.de/projects/wordpress-https

                + +== Installation == +1. Upload the `wordpress-https` folder to the `/wp-content/plugins/` directory. +1. Activate the plugin through the 'Plugins' menu in WordPress. +1. Navigate to the HTTPS settings page in the admin sidebar in the dashboard. +1. If you are using a non-default SSL Host for your HTTPS connection (e.g., a subdomain or shared SSL host) enter the entire secure URL into SSL Host. If your installation is located in a folder, you can choose to include it in the URL or not. If you set this to a domain that is not currently serving your WordPress installation over HTTPS and enable Force SSL Admin, you will lock yourself out of your dashboard. Follow instructions in the FAQ to reset the plugin. +1. If you would like connections to your admin panel to be secure, enable Force SSL Admin. If you are using a non-default SSL Host, do not use WordPress' built-in FORCE_SSL_ADMIN or FORCE_SSL_LOGIN. +1. If you are looking to secure only your admin panel and/or posts and pages you specify, enable Force SSL Exclusively. This will ensure that any content not specified to be secure is always served over HTTP. +1. You can individually secure post and pages when editing them by updating the settings located in the HTTPS box on the right sidebar. +1. You can use simple text match or regular expressions to specify URL's that should be secure using URL Filters in the WordPress HTTPS settings. Each filter should be on one line. + +== Frequently Asked Questions == += How do I fix partially encrypted/mixed content errors? = +To identify what is causing your page(s) to be insecure, please follow the instructions below. +
                  +
                1. Download Google Chrome.
                2. +
                3. Open the page you're having trouble with in Google Chrome.
                4. +
                5. Open the Developer Tools. How to access the Developer Tools.
                6. +
                7. Click on the Console tab.
                8. +
                +For each item that is making your page partially encrypted, you should see an entry in the console similar to "The page at https://www.example.com/ displayed insecure content from http://www.example.com/." Note that the URL that is loading insecure content is HTTP and not HTTPS. + +Once you have identified the insecure elements, you need to figure out what theme or plugin is causing these elements to be loaded. Although WordPress HTTPS does its best to fix all insecure content, there are a few cases that are impossible to fix. Here are some typical examples. +
                  +
                • The element is external (not hosted on your server) and is not available over HTTPS. These elements will have to be removed from the page by disabling or modifying the theme or plugin that is adding the element.
                • +
                • The element is internal (hosted on your server) but does not get changed to HTTPS. This is often due to a background image in CSS or an image or file path in JavaScript being hard-coded to HTTP inside of a CSS file. The plugin can not fix these. The image paths must be changed to relative links. For example `http://www.example.com/wp-content/themes/mytheme/images/background.jpg` to simply `/wp-content/themes/mytheme/images/background.jpg`. Ensure you copy the entire path, including the prepended slash (very important).
                • +
                + += I can't get into my admin panel. How do I fix it? = +Since it is possible to lock yourself out of the dasboard, WordPress HTTPS comes with a way to reset the plugin's settings. The plugin makes no permanent changes to WordPress, so this will restore all settings to their defaults. Follow directions under "How do I reset the plugin's settings?" + += How do I reset the plugin's settings? = +Go to /wp-content/plugins/wordpress-https/wordpress-https.php and uncomment (remove the two forward slashes before) the line below, or go to your wp-config.php file and add this line. Hit any page on your site, and then remove it or comment it out again. +`define('WPHTTPS_RESET', true);` + += The settings won't save! = +Did you reset the plugin following the steps above and forget to comment the line back out or remove it from wp-config.php? + += How do I make my whole website secure? = +To make your entire website secure, you simply need to change your site url to use HTTPS instead of HTTP. Please read how to change the site url. +Alternatively, you can use URL Filters in the WordPress HTTPS Settings to secure your entire site by putting just '/' as a filter. This will cause any URL with a forward slash to be secure (all of them). + += How do I make only certain pages secure? = +The plugin adds a meta box to the add/edit post screen entitled HTTPS. In that meta box, a checkbox for 'Secure Post' has been added to make this process easy. See Screenshots if you're having a hard time finding it. +Alternatively, you can use URL Filters to secure post and pages by their permalink. + += I'm using Force SSL Administration and all of the links to the front-end of my site are HTTPS. Why? = +For many users this behavior is desirable. If you would like links the the front-end of your site to be HTTP, enable Force SSL Exclusively and do not secure your front-end pages. + += I'm getting 404 errors on all of my pages. Why? = +If you're using a public/shared SSL, try disabling your custom permalink structure. Some public/shared SSL's have issues with WordPress' permalinks because of the way they are configured. If you continue to recieve 404 errors, there may be no way to use WordPress with that particular public/shared SSL. + += I'm receiving a blank page with no error. What gives? = +This is most commonly due to PHP's memory limit being too low. Check your Apache error logs just to be sure. Talk to your hosting provider about increading PHP's memory limit. + += Is there a hook or filter to force pages to be secure? = +Yes! Here is an example of how to use the 'force_ssl' filter to force a page to be secure. +`function custom_force_ssl( $force_ssl, $post_id = 0, $url = '' ) { + if ( $post_id == 5 ) { + $force_ssl = true; + } + return $force_ssl; +} + +add_filter('force_ssl' , 'custom_force_ssl', 10, 3);` + +You can also use this filter to filter pages based on their URL. Let's say you have an E-commerce site and all of your E-commerce URL's contain 'store'. +`function store_force_ssl( $force_ssl, $post_id = 0, $url = '' ) { + if ( strpos($url, 'store') !== false ) { + $force_ssl = true; + } + return $force_ssl; +} + +add_filter('force_ssl', 'store_force_ssl', 10, 3);` + +== Screenshots == +1. WordPress HTTPS Settings screen +2. Force SSL checkbox added to add/edit posts screen + +== Changelog == += 3.3.6 = +* Fixed bug where admin links in multisite networks were being broken. +* Added check for Jigoshop admin-ajax.php calls. += 3.3.5 = +* Enhanced multisite support and testing. +* Slightly adjusted settings page column widths. +* Now using admin-ajax.php for settings page. +* Added detection and conflict fixes for a few popular E-commerce plugins: WooCommerce, WP E-commerce and Jigoshop +* Bug Fix - Password protected pages in WordPress 3.5+ should now be properly secured. +* Bug Fix - The SSL Admin setting should now be properly retained when using FORCE_SSL_ADMIN. +* Bug Fix - Links to the home page should now properly be set to HTTP when using Force SSL Exclusively. +* Bug Fix - Installations with a non-default wp-content folder location should no longer experience issues with the WordPress HTTPS settings page. += 3.3.0 = +* Tested with WordPress v3.5. +* Added German translation and gettext support. Thanks Christian Foellmann. +* Large sites using the default SSL Host (matching the Site URL) should experience a significant performance increase. +* Added the Access-Control-Allow-Origin header to AJAX calls to allow local HTTP pages make HTTPS AJAX calls. += 3.2.3 = +* Bug Fix - Sites prevented from logging into the admin panel after the previous release should now be working again. +* Bug Fix - Fixed bug in Parser where links and forms could be written incorrectly. += 3.2.2 = +* Performance Increase. +* Bug Fix - Sites prevented from logging into the admin panel after the previous release should now be working again. += 3.2.1 = +* Added Network settings for multisite installations. +* Bug Fix - Elements should now be properly secured by the file extension check in the Parser. +* Bug Fix - Pages being redirected should no longer always redirect to index.php for some server configurations. +* Bug Fix - FORCE_SSL_ADMIN option should no longer cause redirect loops if the ssl_admin setting is set to false. += 3.2 = +* Added domain mapping. Domain mapping allows you to map external domains that host their HTTPS content on a different domain. +* Added Remove Unsecure Elements option. If possible, this option removes external elements from the page that can not be loaded over HTTPS, preventing insecure content errors without modifying any code. +* ClouldFlare support. +* Substantial memory optimization. +* Removed Secure Front Page option. This can now be achieved through URL Filters. +* Bug Fix - Visiting the admin panel over HTTP when using Shared SSL should no longer log the user out, but will now redirect accordingly. +* Bug Fix - Random 404 errors should be gone. +* Bug Fix - Fixed bug where a bad setting for ssl_host would cause the code to fail. +* Bug Fix - CSS backgrounds that do not have quotes should no longer break debug output. += 3.1.2 = +* Bug Fix - Redirects should no longer remove URL parameters. +* Bug Fix - Removed loginout filter that was changing links to plain text. +* Bug Fix - Plugin should no longer cause JavaScript errors from removing quotes from the end of URL's. +* Bug Fix - CSS backgrounds that do not have quotes should no longer break debug output. += 3.1.1 = +* Bug Fix - Fixed bug in Parser. += 3.1 = +* Memory optimization. +* Added secure URL filtering. +* Users receiving 404 errors on every page when using Shared SSL should now be able to use those Shared SSL's that previously did not work. +* Added support for qTranslate. +* Added support for securing custom post types. +* Added $url to the force_ssl filter as the third arguement. See FAQ for example usage. += 3.0.4 = +* Fixed multiple bugs for sites using SSL for the entire site. +* Bug Fix - plugin should no longer try to load hidden files as modules. += 3.0.3 = +* Any element on an HTTP page that is set to HTTPS should be auto-corrected. +* Added support for domain mapper plugin. +* Bug Fix - SSL Host should now always end in a trailing slash. +* Bug Fix - Fixed bug in cookie logic that prevented some users from logging in. +* Bug Fix - Fixed bug in redirects that would cause login issues and 404 errors. += 3.0.2 = +* Added setting to change where HTTPS settings appear in the admin panel. +* Bug Fix - Plugin should no longer interefere with editing posts and using images from the Media Library. +* Bug Fix - Fixed major bug that occurred when site was installed in the base directory. +* Bug Fix - File uploader should no longer produce an HTTP Error. +* Bug Fix - Fixed performance issue that caused the login page to load for a long period of time. +* Bug Fix - Proxy check should no longer interfere with RSS Feeds, HTML Validators, etc. +* Bug Fix - Force SSL and SSL Front Page should no longer conflict. +* Bug Fix - If Force SSL Exclusively is enabled and Secure Front Page is not (or the front page is not secured), links to the front page will be set to HTTP. += 3.0.1 = +* Bug Fix - Fixed major issue when upgrading from previous version of WordPress HTTPS. +* Bug Fix - Added is_ssl method back to main plugin class to avoid errors with Gravity Forms. +* Bug Fix - Archive widget links should now appear correctly. += 3.0 = +* The plugin has been completely re-written. +* Redirect loops should no longer be an issue. +* Bugs are likely to occur. += 2.0.4 = +* Bug Fix - Users using Shared SSL should no longer have broken URL's and redirects. +* Bug Fix - Pages should correctly be identified as HTTPS if PHP returns an IP address for SERVER_ADDR in $_SERVER. +* Bug Fix - Users using the default permalink structure should now have URL's being properly changed to/from HTTPS. += 2.0.3 = +* Force SSL Admin will always be enabled when FORCE_SSL_ADMIN is true in wp-config.php. +* Bug Fix - Users using Shared SSL should no longer have issues with the SSL Host path duplicating in URL's. +* Bug Fix - The plugin should now function properly when using a subdomain as the SSL Host. +* Bug Fix - Page and post links will only be forced to HTTPS when using a different SSL Host that is not a subdomain of your Home URL. +* Bug Fix - WordPress HTTPS should no longer generate erroneous notices and warnings in apache error logs. (If I missed any, let me know) += 2.0.2 = +* Bug Fix - SSL Host option was not being saved correctly upon subsequent saves. This was causing redirect loops for most users. += 2.0.1 = +* Ensured that deprected options are removed from a WordPress installation when activating the plugin. +* Added a button to the WordPress HTTPS settings page to reset all plugin settings and cache. +* Bug Fix - URL's entered for SSL Host were not validing correctly. +* Bug Fix - External URL's were not always being identified as valid external elements. +* Bug Fix - Slight enhancement to SSL detection. += 2.0 = +* Full support for using a custom SSL port has been added. A special thanks to Chris "doingweb" Antes for his feedback and testing of this feature. +* Forcing pages to/from HTTPS is now pluggable using the 'force_ssl' filter. +* When using Force Shared SSL Admin, links to the admin panel will always be rewritten with the Shared SSL Host. +* When using Shared SSL, all links to post and pages from within the admin panel will use the Shared SSL Host to retain administration functionality on those pages. +* Redirects to the admin panel now hook into wp_redirect rather than using the auth_redirect pluggable function. +* Canonical redirects will now still occur on sites usinga different SSL Host, but not on secure pages. +* Cookies are now set with hooks rather than pluggable functions. +* Plugin will now delete all options and custom metadata when uninstalled. +* Added a HTTP_X_FORWARDED_PROTO check to the is_ssl function. +* Internal HTTPS Elements option has been removed. Disabling this option was never a good idea, so it was removed and the plugin will always act as it did when this option was enabled. +* External HTTPS Elements option has been removed. The handling of external elements has improved in such a way that this option is no longer required. +* Disable Automatic HTTPS option has been removed. This option should have generally been enabled anyway. +* Bug Fix - After logging in, the logged_in cookie was not being set properly. This caused the admin bar to not show up in both HTTP and HTTPS. +* Bug Fix - When using Shared SSL, the login page would not honor the redirect_to variable after a successful login. += 1.9.2 = +* Added External URL caching to the plugin so that external elements will only be checked for once, increasing the speed of sites not using the Bypass External Check option. +* Any forms whose action points to page that has the Forced SSL option on will be updated to HTTPS even on HTTP pages. +* Bug Fix - When using Shared SSL, permalink structure was being buggy. +* Bug Fix - Certain server configurations were causing the plugin to create redirect loops when using the Force SSL Exclusively option. += 1.9.1 = +* Bug Fix - Cookies were not being set to the correct paths when logging in, causing logins to fail. +* Bug Fix - Links to the front page when using latest posts were not correctly being set to HTTP/HTTPS. +* Bug Fix - When using Shared SSL, the HTTPS version of the site_url was not being correctly replaced with the Shared SSL URL for internal elements. +* Bug Fix - When using Shared SSL, the admin login page was not always redirecting properly due to output buffering. +* Bug Fix - When using Shared SSL, the auth_redirect function was not redirecting to the Shared SSL URL. +* Bug Fix - If the home_url contained 'www' but the URL appeared without 'www', the URL would not be fixed. +* Standards - Updated redirect method to use https or http as a an argument rather than true or false to better comply with WordPress coding standards. += 1.9 = +* Created Updates widget on settings screen to allow for dynamic updates from the plugin developers. +* Added support for PHP4. +* Converted all spaces to tabs in source. +* Force Shared SSL Admin option added to allow those using Shared SSL the ability to use their certificate for their admin dashboard. +* Bug fix - Force SSL checkbox will now appear on WordPress versions below 2.9. +* Bug fix - Password protected pages forced to SSL will now work properly. +* Bug fix - Plugin should no longer break feeds. +* Numerous other bug fixes that have since been forgotten due to the length of time this version has been in development. += 1.8.5 = +* In version 1.8.5, when a page is forced to HTTPS, any links to that page will always be HTTPS, even when using the 'Disable Automatic HTTPS' option. Likewise, when the 'Force SSL Exclusively' option is enabled, all links to pages not forced to HTTPS will be changed to HTTP on HTTPS pages. +* Updated RegEx's for more complicated URL's. +* Bug fix - When in the admin panel, only link URL's are changed back to HTTP again. +* Added support for using Shared SSL together with the FORCE_SSL_ADMIN and FORCE_SSL_LOGIN options. += 1.8.1 = +* Re-enabled the canonical redirect for WordPres sites not using Shared SSL. += 1.8 = +* Fixed cross-browser CSS issue on plugin settings page. +* Corrected and updated plugin settings validation. +* Lengthened the fade out timer on messages from the plugin settings page from 2 to 5 seconds so that the more lengthy error messages could be read before the message faded. +* If viewing an admin page via SSL, and your Home URL is not set to HTTPS, links to the front-end of the website will be forced to HTTP. By default, WordPress changes these links to HTTPS. +* When using Shared SSL, any anchor that links to the regular HTTPS version of the domain will be changed to use the Shared SSL Host. +* Added embed and param tags to the list of tags that are fixed by WordPress HTTPS. This is to fix flash movies. += 1.7.5 = +* Bug fix - When using 'Latest Posts' as the front page, the front page would redirect to HTTP when viewed over HTTPS even if the 'Force SSL Exclusively' option was disabled. +* Prevented the 'Disable Automatic HTTPS' option from parsing URL's in the admin panel. +* General code cleanup and such. += 1.7 = +* Bug fix - External URL's were not being forced to HTTPS after the last update. +* Added the functionality to correct relative URL's when using Shared SSL. +* General code cleanup and such. += 1.6.5 = +* Added support for Shared SSL. += 1.6.3 = +* Changed the redirection check to use `template_redirect` hook rather than `get_header`. += 1.6.2 = +* Tag links were not being set back to HTTP when the 'Disable Automatic HTTPS' option was enabled. += 1.6.1 = +* Bug fix - front page redirection was causing issues when a static page was selected for the posts page. += 1.6 = +* Added the ability to force the front page to HTTPS. +* Multiple enhancements to core functionality of plugin. Mostly just changing code to integrate more smoothely with WordPress. +* Enhancements have been made to the plugin's settings page. += 1.5.2 = +* Fixed a bug that would prevent stylesheets from being fixed if the rel attribute came after the href attribute. Bug could have also caused errors with other tags. += 1.5.1 = +* Added input elements with the type of 'image' to be filtered for insecure content. += 1.5 = +* Added the ability to force SSL on certain pages. +* Also added the option to exclusively force SSL on certain pages. Pages not forced to HTTPS are forced to HTTP. +* Plugin now filters the `bloginfo` and `bloginfo_url` functions for HTTPS URL's when the 'Disable Automatic HTTPS' option is enabled in WordPress 3.0+. += 1.0.1 = +* Bug fix. += 1.0 = +* Major modifications to plugin structure, efficiency, and documentation. +* Added the option to disable WordPress 3.0+ from changing all of your page, category and post links to HTTPS. += 0.5.1 = +* Bug fix. += 0.5 = +* Due to increasing concerns about plugin performance, the option to bypass the HTTPS check on external elements has been added. += 0.4 = +* Plugin functions converted to OOP class. +* The plugin will now attempt to set the allow_url_fopen option to true with `ini_set` function if possible. += 0.3 = +* Added the option to change external elements to HTTPS if the external server allows the elements to be accessed via HTTPS. += 0.2 = +* Changed the way in which HTTPS was detected to be more reliable. += 0.1 = +* Initial Release. + +== Upgrade Notice == += 3.2 = +You may lose your SSL Host setting upon upgrading if it is not default (matching your Site URL). diff --git a/wp-content/plugins/wordpress-https/screenshot-1.png b/wp-content/plugins/wordpress-https/screenshot-1.png new file mode 100644 index 0000000..06aca89 Binary files /dev/null and b/wp-content/plugins/wordpress-https/screenshot-1.png differ diff --git a/wp-content/plugins/wordpress-https/screenshot-2.png b/wp-content/plugins/wordpress-https/screenshot-2.png new file mode 100644 index 0000000..71cfd65 Binary files /dev/null and b/wp-content/plugins/wordpress-https/screenshot-2.png differ diff --git a/wp-content/plugins/wordpress-https/uninstall.php b/wp-content/plugins/wordpress-https/uninstall.php new file mode 100644 index 0000000..4afa2fb --- /dev/null +++ b/wp-content/plugins/wordpress-https/uninstall.php @@ -0,0 +1,48 @@ +get_col($wpdb->prepare("SELECT blog_id FROM " . $wpdb->blogs, NULL)); +} else { + $blogs = array($wpdb->blogid); +} + +// Delete WordPress HTTPS options +foreach ( $blogs as $blog_id ) { + foreach( $options as $option ) { + if ( is_multisite() ) { + delete_blog_option($blog_id, $option); + } else { + delete_option($option); + } + } +} + +// Delete force_ssl custom_field from posts and pages +delete_metadata('post', null, 'force_ssl', null, true); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-https/wordpress-https.php b/wp-content/plugins/wordpress-https/wordpress-https.php new file mode 100644 index 0000000..5c72446 --- /dev/null +++ b/wp-content/plugins/wordpress-https/wordpress-https.php @@ -0,0 +1,78 @@ +. +*/ + +if ( !defined('ABSPATH') ) exit; + +load_plugin_textdomain( 'wordpress-https', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); + +function wphttps_autoloader($class) { + $namespaces = array( + 'Mvied', + 'WordPressHTTPS' + ); + if ( preg_match('/([A-Za-z]+)_?/', $class, $match) && in_array($match[1], $namespaces) ) { + $filename = str_replace('_', DIRECTORY_SEPARATOR, $class) . '.php'; + require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . $filename; + } +} +spl_autoload_register('wphttps_autoloader'); + +/* + * WordPress HTTPS Reset + * Uncomment the line below (remove the two forward slashes) to reset the plugin to its default settings. + * When the plugin is reset, comment the line out again. + */ +//define('WPHTTPS_RESET', true); + +if ( ! defined('WP_UNINSTALL_PLUGIN') ) { + $wordpress_https = new WordPressHTTPS; + $wordpress_https->setSlug('wordpress-https'); + $wordpress_https->setVersion('3.3.6'); + $wordpress_https->setLogger(WordPressHTTPS_Logger::getInstance()); + $wordpress_https->setDirectory(dirname(__FILE__)); + $wordpress_https->setModuleDirectory(dirname(__FILE__) . '/lib/WordPressHTTPS/Module/'); + + // Load Modules + $wordpress_https->loadModules(); + + // If WPHTTPS_RESET global is defined, reset settings + if ( defined('WPHTTPS_RESET') && constant('WPHTTPS_RESET') == true ) { + foreach($wordpress_https->getSettings() as $key => $default) { + $wordpress_https->setSetting($key, $default); + } + } + + // Initialize Plugin + $wordpress_https->init(); + $wordpress_https->setPluginUrl(plugins_url('', __FILE__)); + + // Register activation hook. Must be called outside of a class. + register_activation_hook(__FILE__, array($wordpress_https, 'install')); +} diff --git a/wp-content/plugins/wp-recaptcha/LICENSE b/wp-content/plugins/wp-recaptcha/LICENSE new file mode 100644 index 0000000..5cb775f --- /dev/null +++ b/wp-content/plugins/wp-recaptcha/LICENSE @@ -0,0 +1,23 @@ +Copyright (c) 2008 reCAPTCHA -- http://recaptcha.net +AUTHORS: + Mike Crawford + Ben Maurer + Jorge Peña + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + * +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + * +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/wp-content/plugins/wp-recaptcha/email.png b/wp-content/plugins/wp-recaptcha/email.png new file mode 100644 index 0000000..7348aed Binary files /dev/null and b/wp-content/plugins/wp-recaptcha/email.png differ diff --git a/wp-content/plugins/wp-recaptcha/mailhide.php b/wp-content/plugins/wp-recaptcha/mailhide.php new file mode 100644 index 0000000..0d77e2e --- /dev/null +++ b/wp-content/plugins/wp-recaptcha/mailhide.php @@ -0,0 +1,349 @@ +register_default_options(); + + // require the recaptcha library + $this->require_library(); + + // verify mcrypt is loaded + $this->verify_mcrypt(); + + // register the hooks + $this->register_actions(); + $this->register_filters(); + + // keep this in the arsenal just in case + // disable the make_clickable filter cause it screws things up + /* + if ($this->mailhide_enabled()) { + remove_filter('comment_text', 'make_clickable', 9); + }*/ + } + + function register_actions() { + // load the plugin's textdomain for localization + add_action('init', array(&$this, 'load_textdomain')); + + // options + register_activation_hook(WPPlugin::path_to_plugin_directory() . '/wp-recaptcha.php', array(&$this, 'register_default_options')); // this way it only happens once, when the plugin is activated + add_action('admin_init', array(&$this, 'register_settings_group')); + add_action('admin_init', array(&$this, 'settings_section')); + + // admin notice + add_action('admin_notices', array(&$this, 'missing_mcrypt_notice')); + add_action('admin_notices', array(&$this, 'missing_keys_notice')); + } + + function register_filters() { + // add the filters only if mcrypt is loaded + if ($this->mcrypt_loaded) { + if ($this->options['use_in_posts']) + add_filter('the_content', array(&$this, 'mailhide_emails'), 9000); + + if ($this->options['use_in_comments']) + add_filter('comment_text', array(&$this, 'mailhide_emails'), 9000); + + // todo: this seems like it doesn't work: http://codex.wordpress.org/Plugin_API/Filter_Reference/the_content_rss + // instead check for is_feed() on 'the_content' filter + // the_excerpt_rss filter works fine + // concern: it seems like the feeds still show the email encoded in CDATA + if ($this->options['use_in_rss']) { + add_filter('the_content_rss', array(&$this, 'mailhide_emails'), 9000); + add_filter('the_excerpt_rss', array(&$this, 'mailhide_emails'), 9000); // this one is sometimes used instead + } + + // todo: atom requires the html to be escaped, rss does not. do so accordingly in the preg_replace_callbacks + // todo: also be sure to escape replace_link_with + // - use htmlentities($var, ENT_QUOTES); for escaping? + if ($this->options['use_in_rss_comments']) + add_filter('comment_text_rss', array(&$this, 'mailhide_emails'), 9000); + } + } + + function mailhide_enabled() { + return ($this->options['use_in_posts'] || $this->options['use_in_comments'] || $this->options['use_in_rss'] || $this->options['use_in_rss_comments']); + } + + function keys_missing() { + return (empty($this->options['public_key']) || empty($this->options['private_key'])); + } + + function create_error_notice($message, $anchor = '') { + $options_url = admin_url('options-general.php?page=wp-recaptcha/recaptcha.php') . $anchor; + $error_message = sprintf(__($message . ' Fix this', 'recaptcha'), $options_url); + + echo '

                ' . $error_message . '

                '; + } + + function missing_mcrypt_notice() { + if ($this->mailhide_enabled() && !$this->mcrypt_loaded) { + $this->create_error_notice('You enabled MailHide but the mcrypt PHP extension does not seem to be loaded.', '#mailhide'); + } + } + + // todo: make a check in mailhide_settings partial so that if the keys are missing, the appropriate box is highlighted with #FFFFE0 bg-color 1px solid #E6DB55 border + function missing_keys_notice() { + if ($this->mailhide_enabled() && $this->keys_missing()) { + $this->create_error_notice('You enabled MailHide, but some of the MailHide API Keys seem to be missing.', '#mailhide'); + } + } + + function settings_section() { + add_settings_section('mailhide_options', '', array(&$this, 'show_settings_section'), 'recaptcha_options_page'); + } + + function show_settings_section() { + include('mailhide_settings.php'); + } + + function verify_mcrypt() { + $this->mcrypt_loaded = extension_loaded('mcrypt'); + } + + // require the recaptcha library + function require_library() { + require_once(WPPlugin::path_to_plugin_directory() . '/recaptchalib.php'); + } + + function load_textdomain() { + load_plugin_textdomain('recaptcha', false, 'languages'); + } + + function register_default_options() { + if ($this->options) + return; + + $option_defaults = array(); + + $old_options = WPPlugin::retrieve_options("recaptcha"); + + if ($old_options) { + // keys + $option_defaults['public_key'] = $old_options['mailhide_pub']; // mailhide public key + $option_defaults['private_key'] = $old_options['mailhide_priv']; // mailhide private key + + // placement + $option_defaults['use_in_posts'] = $old_options['use_mailhide_posts']; // mailhide for posts/pages + $option_defaults['use_in_comments'] = $old_options['use_mailhide_comments']; // use mailhide for comments + $option_defaults['use_in_rss'] = $old_options['use_mailhide_rss']; // use mailhide for the rss feed of the posts/pages + $option_defaults['use_in_rss_comments'] = $old_options['use_mailhide_rss_comments']; // use mailhide for the rss comments + + // bypass levels + $option_defaults['bypass_for_registered_users'] = ($old_options['mh_bypass'] == "on") ? 1 : 0; // whether to sometimes skip the MailHide filter for registered users + $option_defaults['minimum_bypass_level'] = $old_options['mh_bypasslevel']; // who can see full emails normally (should be a valid WordPress capability slug) + + if ($option_defaults['minimum_bypass_level'] == "level_10") { + $option_defaults['minimum_bypass_level'] = "activate_plugins"; + } + + // styling + $option_defaults['replace_link_with'] = $old_options['mh_replace_link']; // name the link something else + $option_defaults['replace_title_with'] = $old_options['mh_replace_title']; // title of the link + } + + else { + // keys + $option_defaults['public_key'] = ''; // mailhide public key + $option_defaults['private_key'] = ''; // mailhide private key + + // placement + $option_defaults['use_in_posts'] = 0; // mailhide for posts/pages + $option_defaults['use_in_comments'] = 0; // use mailhide for comments + $option_defaults['use_in_rss'] = 0; // use mailhide for the rss feed of the posts/pages + $option_defaults['use_in_rss_comments'] = 0; // use mailhide for the rss comments + + // bypass levels + $option_defaults['bypass_for_registered_users'] = 0; // whether to sometimes skip the MailHide filter for registered users + $option_defaults['minimum_bypass_level'] = 'read'; // who can see full emails normally (should be a valid WordPress capability slug) + + // styling + $option_defaults['replace_link_with'] = ''; // name the link something else + $option_defaults['replace_title_with'] = ''; // title of the link + } + + // add the option based on what environment we're in + WPPlugin::add_options($this->options_name, $option_defaults); + } + + function register_settings_group() { + register_setting('mailhide_options_group', 'mailhide_options', array(&$this, 'validate_options')); + } + + function validate_dropdown($array, $key, $value) { + // make sure that the capability that was supplied is a valid capability from the drop-down list + if (in_array($value, $array)) + return $value; + else // if not, load the old value + return $this->options[$key]; + } + + function validate_options($input) { + // keys + $validated['public_key'] = trim($input['public_key']); // mailhide public key + $validated['private_key'] = trim($input['private_key']); // mailhide private key + + // placement + $validated['use_in_posts'] = ($input['use_in_posts'] == 1 ? 1 : 0); // mailhide for posts/pages + $validated['use_in_comments'] = ($input['use_in_comments'] == 1 ? 1 : 0); // use mailhide for comments + $validated['use_in_rss'] = ($input['use_in_rss'] == 1 ? 1 : 0); // use mailhide for the rss feed of the posts/pages + $validated['use_in_rss_comments'] = ($input['use_in_rss_comments'] == 1 ? 1 : 0); // use mailhide for the rss comments + + $capabilities = array('read', 'edit_posts', 'publish_posts', 'moderate_comments', 'activate_plugins'); + + // bypass levels + $validated['bypass_for_registered_users'] = ($input['bypass_for_registered_users'] == 1 ? 1: 0); // whether to sometimes skip the MailHide filter for registered users + $validated['minimum_bypass_level'] = $this->validate_dropdown($capabilities, 'minimum_bypass_level', $input['minimum_bypass_level']); // who can see full emails normally (should be a valid WordPress capability slug) + + // styling + $validated['replace_link_with'] = $input['replace_link_with']; // name the link something else + $validated['replace_title_with'] = $input['replace_title_with']; // title of the link + + return $validated; + } + + function build_dropdown($name, $keyvalue, $checked_value) { + echo ' \n"; + } + + function capabilities_dropdown() { + // define choices: Display text => permission slug + $capabilities = array( + __('all registered users', 'recaptcha') => 'read', + __('edit posts', 'recaptcha') => 'edit_posts', + __('publish posts', 'recaptcha') => 'publish_posts', + __('moderate comments', 'recaptcha') => 'moderate_comments', + __('activate plugins', 'recaptcha') => 'activate_plugins' + ); + + $this->build_dropdown('mailhide_options[minimum_bypass_level]', $capabilities, $this->options['minimum_bypass_level']); + } + + function mailhide_emails($content) { + global $user_ID; + + // set the minimum capability needed to skip the MailHide if there is one + if ($this->options['bypass_for_registered_users'] && $this->options['minimum_bypass_level']) + $needed_capability = $this->options['minimum_bypass_level']; + + // skip the MailHide display if the minimum capability is met + // todo: only 'use in comments' is checked, have to check each of them? + // todo: wait, is that necessary? the filter isn't even added if that field is false, removed + + if ($needed_capability && current_user_can($needed_capability)) { + // remove the nohides + $content = preg_replace('/\[\/?nohide\]/i','',$content); + return $content; + } + + // Regular Expressions thanks to diabolic from EFNet #regex + + // match hyperlinks with emails + $regex = '/(?!\[nohide\])]*href="((?:mailto:)?([^@"]+@[^@"]+))"[^>]*>(.+?)<\/a>(?!\[\/nohide\])/i'; + $content = preg_replace_callback($regex, array(&$this, "replace_hyperlinked"), $content); + + // match emails + // this seems to no longer be necessary because wordpress automatically linkifies all plaintext emails + $regex = '/\b([\w.+-]+@[a-z\d.-]+\.[a-z]{2,6})\b(?!\s*\[\/nohide\]|(?:(?!]*>).)*<\/a>)/i'; + $content = preg_replace_callback($regex, array(&$this, "replace_plaintext"), $content); + + // remove the nohides + $content = preg_replace('/\[\/?nohide\]/i','',$content); + + return $content; + } + + // replace the hyperlinked emails i.e. this or that + function replace_hyperlinked($matches) { + $html = ""; + $email = $matches[2]; + $text = $matches[3]; + + if ($email == $text) { + // employ the use of email parts instead + $html = recaptcha_mailhide_html($this->options['public_key'], $this->options['private_key'], $email); + + // style it + $html = '' . $html . ""; + } + + else { + // get the url, the part inside the href. this is the email of course + $url = recaptcha_mailhide_url($this->options['public_key'], $this->options['private_key'], $email); + + // construct a new hyperlink with the url hidden but the link text the same + $html = "" . $text . ""; + + // style it + $html = '' . $html . ""; + } + + return $html; + } + + // replace the plain text emails i.e. haha@lol.com + function replace_plaintext($matches) { + if ($this->options['replace_link_with'] == "" && $this->options['replace_title_with'] == "") { + // find plain text emails and hide them + $html = recaptcha_mailhide_html($this->options['public_key'], $this->options['private_key'], $matches[0]); + } + + else { + // replace both things + if ($this->options['replace_link_with'] != "" && $this->options['replace_title_with'] != "") { + $url = recaptcha_mailhide_url($this->options['public_key'], $this->options['private_key'], $matches[0]); + $html = "options['replace_title_with'] . "\">" . $this->options['replace_link_with'] . ""; + } + + // only replace the link + else if ($this->options['replace_link_with'] != "" && $this->options['replace_title_with'] == "") { + $url = recaptcha_mailhide_url($this->options['public_key'], $this->options['private_key'], $matches[0]); + $html = "" . $this->options['replace_link_with'] . ""; + } + + // only replace the title + else if ($this->options['replace_link_with'] == "" && $this->options['replace_title_with'] != "") { + $url = recaptcha_mailhide_url($this->options['public_key'], $this->options['private_key'], $matches[0]); + $emailparts = _recaptcha_mailhide_email_parts ($matches[0]); + + $html = htmlentities($emailparts[0], ENT_QUOTES) . "...@" . htmlentities($emailparts[0], ENT_QUOTES); + } + } + + // style it + $html = '' . $html . ""; + + return $html; + } + } // end class declaration +} // end class exists clause + +?> \ No newline at end of file diff --git a/wp-content/plugins/wp-recaptcha/mailhide_settings.php b/wp-content/plugins/wp-recaptcha/mailhide_settings.php new file mode 100644 index 0000000..76229d9 --- /dev/null +++ b/wp-content/plugins/wp-recaptcha/mailhide_settings.php @@ -0,0 +1,101 @@ + + + +

                +

                + +
                + + +

                +

                .

                +

                + + + + + + + + + + +
                + +
                + +
                + +

                + + + + + + + + + + +
                + options['use_in_posts']); ?> /> +
                + + options['use_in_comments']); ?> /> +
                + + options['use_in_rss']); ?> /> +
                + + options['use_in_rss_comments']); ?> /> +
                +
                + options['bypass_for_registered_users']); ?> /> + + capabilities_dropdown(); ?> +
                + +

                + + + + + + + + + + +
                + +
                + +
                + +

                +

                You can style hidden emails using a variety of classes. Style the classes in your theme's stylesheet and be sure to clear any caches you might have to see the results.

                + +
                  +
                • .mh-email is assigned to the complete email
                • +
                • .mh-first is assigned to the first part of the email
                • +
                • .mh-middle is assigned to the middle of the email (the link)
                • +
                • .mh-last is assigned to the last part of the email
                • +
                + +

                The following is an example of the structure:

                + + + <span class="mh-email">
                +     <span class="mh-first">jorg</span>
                +     <a href="url" class="mh-middle">...</a>
                +     <span class="mh-last">@gmail.com</span>
                + </span> +
                + +

                +
                \ No newline at end of file diff --git a/wp-content/plugins/wp-recaptcha/readme.txt b/wp-content/plugins/wp-recaptcha/readme.txt new file mode 100644 index 0000000..206a99e --- /dev/null +++ b/wp-content/plugins/wp-recaptcha/readme.txt @@ -0,0 +1,137 @@ +=== Plugin Name === +Contributors: recaptchanet +Tags: comments, registration, recaptcha, antispam, mailhide, captcha +Requires at least: 2.7 +Tested up to: 2.9.1 +Stable tag: 3.2 + +Integrates reCAPTCHA anti-spam methods with WordPress including comment, registration, and email spam protection. + +== Description == + += Notice = + +If anyone is interested in taking up development of this plugin, please contact me at blaenk@gmail.com. I would be glad to provide access to the plugin repository. Preferably someone who has experience with the WP and WP multisite APIs (primarily their authorization and options APIs). + +If you would like to simply contribute patches, you are welcome to do so at the [github repository](https://github.com/blaenk/wp-recaptcha). + +Otherwise, if anyone encounters issues with this plugin, you might want to give [this one](http://wordpress.org/extend/plugins/bwp-recaptcha/) a try. + += What is reCAPTCHA? = + +[reCAPTCHA](http://recaptcha.net/ "reCAPTCHA") is an anti-spam method originating from [Carnegie Mellon University](http://www.cmu.edu/index.shtml "Carnegie Mellon University"), then acquired by [Google](http://www.google.com/recaptcha) which uses [CAPTCHAs](http://recaptcha.net/captcha.html "CAPTCHA") in a [genius way](http://recaptcha.net/learnmore.html "How Does it Work? - reCAPTCHA"). Instead of randomly generating useless characters which users grow tired of continuosly typing in, risking the possibility that spammers will eventually write sophisticated spam bots which use [OCR](http://en.wikipedia.org/wiki/Optical_character_recognition "Optical Character Recognition - Wikipedia") libraries to read the characters, reCAPTCHA uses a different approach. + +The world is in the process of digitizing books by use of automated machines which employ the use of Optical Character Recognition software. Sometimes the certain words cannot be read by the software. reCAPTCHA uses a combination of these words, further distorts them, and then constructs a CAPTCHA image. After a certain percentage of users solve the 'unknown' word the same way, it is assumed that it is the correct spelling of the word. This helps digitize books, giving users a ***reason*** to solve reCAPTCHA forms. Because the industry level scanners and OCR software which are used to digitize the books can't read the words with which the CAPTCHAs are constructed, it is safe to assume that in-house spam-bot OCR techniques will not be able to bypass the resulting CAPTCHA, which is a further distortion of the unreadable word. + +reCAPTCHA is probably the most popular and widely accepted CAPTCHA systems by both end-users and site-owners. It is used by such sites prominent sites as [Facebook](http://www.facebook.com), [Twitter](http://www.twitter.com), to the Average Joe's little blog out there on the corner of the Internet. + +It is accessible by everyone. If the user has trouble reading the CAPTCHA challenge, he or she has the option of requesting a new one. If this does not help, there is also an audio challenge which users may use. + +== Installation == + +To install in regular WordPress and [WordPress MultiSite](http://codex.wordpress.org/Create_A_Network): + +1. Upload the `wp-recaptcha` folder to the `/wp-content/plugins/` directory +1. Activate the plugin through the `Plugins` menu in WordPress +1. Get the reCAPTCHA keys [here](http://recaptcha.net/api/getkey?domain=www.blaenkdenum.com&app=wordpress "reCAPTCHA API keys") and/or the MailHide keys [here](http://mailhide.recaptcha.net/apikey "MailHide keys") + +== Requirements == + +* You need the reCAPTCHA keys [here](http://recaptcha.net/api/getkey?domain=www.blaenkdenum.com&app=wordpress "reCAPTCHA API keys") and/or the MailHide keys [here](http://mailhide.recaptcha.net/apikey "MailHide keys") +* If you plan on using MailHide, you will need to have the [mcrypt](http://php.net/mcrypt "mcrypt") PHP module loaded (*Most servers do*) +* If you turn on XHTML 1.0 Compliance you and your users will need to have Javascript enabled to see and complete the reCAPTCHA form +* Your theme must have a `do_action('comment_form', $post->ID);` call right before the end of your form (*Right before the closing form tag*). Most themes do. + +== ChangeLog == + += Version 3.2 +* Transferred ownership back to Google += Version 3.1.6 = +* WordPress MS fixes. Should now work out of the box at the individual blog level. Thanks to [huyz](http://huyz.us/) +* NOTICE: If anyone is interested in taking up development of this plugin, please contact me at blaenk@gmail.com. += Version 3.1.5 = +* Thanks to [Ken Newman](https://github.com/WraithKenny) for these changes +* Update author website +* Stop generating javascript errors on unnecessary pages +* Better SSL support += Version 3.1.4 = +* Fixed an XSS vulnerability += Version 3.1.3 = +* Added a collision aversion prefix to the Plugin class. bbouton from github alerted me to a collision between WP-reCAPTCHA's plugin class and the JW Player Plugin's Plugin class. += Version 3.1.2 = +* Fixed option migration. The plugin was actually written to be made to import the old options, but the hook that functionality was registered to does not fire when the wordpress interface updates a plugin, only when a plugin is updated manually. Now the plugin will import or register default options as long as the options don't already exist. +* Fixed a case where recaptcha theme would not change. This happened because of the above problem, creating a situation in which the tab index field could be empty, and being empty this then caused a problem with the recaptcha options when they were output to the page. If you're running version 3.0 of the plugin, go ahead and add a number to the tab index (e.g. 5 for comments, 30 for registration), if not, this plugin should automatically fix it next time you change save the settings. +* Modified the options page submit buttons to more explicitly show that they are specific to their own respective sections, that is, one button ONLY saves the changes for one reCAPTCHA, and the other ONLY saves the changes for MailHide. += Version 3.0 = +* Rewrote the entire plugin in an object-oriented manner with separation of concerns in mind to increase maintainability and extensibility +* Implemented the ability to import the options from the option set of older versions of the plugin, such as 2.9.8.2 and less +* Redesigned the options page for the plugin, now using newer wordpress options/form functionality with support for input-validation +* Options for recaptcha and mailhide are independent of each other +* Added support for localization, using gettext +* Fixed the issue where comments would not be saved if the reCAPTCHA was entered incorrectly (or not entered at all). requires javascript +* Fixed an issue where saved comments (from bad reCAPTCHA response) would replace double quotes with backslashes +* Fixed an issue in wordpress 3 and above in which mailhide would not work due to interference with a new filter, make_clickable, which auto-links emails and URLs +* Fixed a role-check issue in wordpress 3 and above. level_10 (and all levels for that matter) have been deprecated. now using activate_plugins instead. += Version 2.9.8.2 = +* Fixed a bug with WordPress 3.0 Multi-Site += Version 2.9.8 = +* Added support for WordPress 3.0 Multi-Site thanks to Tom Lynch += Version 2.9.7 = +* Fixed a relatively new [critical bug](http://www.blaenkdenum.com/2010/03/recaptcha-marking-all-comments-as-spam/) which marked new comments as spam regardless of reCAPTCHA response += Version 2.9.6 = +* Fixed a careless bug affecting custom hidden emails +* Fixed broken links in readme.txt += Version 2.9.5 = +* Added flexibility to the enabling of MailHide. Can now separately choose to enable/disable MailHide for posts/pages, comments, RSS feed of posts/pages, and RSS feed of comments +* Fixed an ['endless redirection' bug](http://wordpress.org/support/topic/245154?replies=1 "endless redirection in wp-reCAPTCHA options form") thanks to Edilton Siqueira +* Fixed a bug in WPMU where wp-admin/user-new.php kept trying to validate the user registration with reCAPTCHA information despite not having shown the reCAPTCHA form, thanks to [Daniel Collis-Puro](http://blogs.law.harvard.edu/ "Weblogs at Harvard Law School") for letting me know +* Added a line break after the reCAPTCHA form to add some padding space between it and the submit button. Due to [popular demand](http://www.chriscredendino.com/2009/03/08/adding-space-between-recaptcha-and-the-comment-submit-button-on-wordpress/ "Adding space between reCAPTCHA and the comment Submit Button on WordPress") +* Fixed a validation problem where a style attribute was missing. Thanks to [nv1962](http://wordpress.org/support/profile/304093 "nv1962's profile") +* Public and Private keys are now trimmed since they are usually pasted from the recaptcha site, to avoid any careless errors +* Fixed the regular expressions for matching the emails, email@provider.co.uk type emails now work += Version 2.9.4 = +* Fixed a bug where the comment would not be saved if the CAPTCHA wasn't entered correctly. Thanks to Justin Heideman. += Version 2.9.3 = +* Fixed the `recaptcha_wp_saved_comment` function. Thanks to Tomi M. += Version 2.9.2 = +* 'Beautified' the options page. +* Added two options to allow users to enter their own custom error messages. Also good for foreign language support. +* Fixed a conflict bug with the OpenID plugin where the reCAPTCHA form would show under the OpenID section in the registration form. +* Added two new options which allow one to choose the text to be shown for all hidden Emails and/or the title of the link. +* Fixed a 'Could not open socket' error in recaptchalib.php. [Bug ID 26](http://code.google.com/p/recaptcha/issues/detail?id=26 "recaptchalib.php: Could not open socket (Fix included)") +* Fixed a WPMU issue where blog registrations weren't possible due to a redirection to the first step in the registration process. Thanks to [Edward](http://yisheng.wordpress.com/2008/08/14/wp-recaptcha-for-wpmu-26/ "Edward"). += Version 2.9.1 = +* Forgot that if you can see emails in their true form, then you shouldn't have to see the [nohide][/nohide] tags either. Fixed. += Version 2.8.6 = +* Administration interface is now integrated with 2.5's look and feel. Thanks to [Jeremy Clarke](http://simianuprising.com/ "Jeremy Clarke"). +* Users can now have more control over who sees the reCAPTCHA form and who can see emails in their true form (If MailHide is enabled). Thanks to [Jeremy Clarke](http://simianuprising.com/ "Jeremy Clarke"). +* Fixed a very stupid (**One character deal**) fatal error on most Windows Servers which don't support short tags (short_open_tag). I'm speaking of the so called 'Unexpected $end' error. +* Accommodated for the fact that in +2.6 the wp-content folder can be anywhere. + +== Frequently Asked Questions == + += HELP, I'm still getting spam! = +There are four common issues that make reCAPTCHA appear to be broken: + +1. **Moderation Emails**: reCAPTCHA marks comments as spam, so even though the comments don't actually get posted, you will be notified of what is supposedly new spam. It is recommended to turn off moderation emails with reCAPTCHA. +1. **Akismet Spam Queue**: Again, because reCAPTCHA marks comments with a wrongly entered CAPTCHA as spam, they are added to the spam queue. These comments however weren't posted to the blog so reCAPTCHA is still doing it's job. It is recommended to either ignore the Spam Queue and clear it regularly or disable Akismet completely. reCAPTCHA takes care of all of the spam created by bots, which is the usual type of spam. The only other type of spam that would get through is human spam, where humans are hired to manually solve CAPTCHAs. If you still get spam while only having reCAPTCHA enabled, you could be a victim of the latter practice. If this is the case, then turning on Akismet will most likely solve your problem. Again, just because it shows up in the Spam Queue does NOT mean that spam is being posted to your blog, it's more of a 'comments that have been caught as spam by reCAPTCHA' queue. +1. **Trackbacks and Pingbacks**: reCAPTCHA can't do anything about pingbacks and trackbacks. You can disable pingbacks and trackbacks in Options > Discussion > Allow notifications from other Weblogs (Pingbacks and trackbacks). +1. **Human Spammers**: Believe it or not, there are people who are paid (or maybe slave labor?) to solve CAPTCHAs all over the internet and spam. This is the last and rarest reason for which it might appear that reCAPTCHA is not working, but it does happen. On this plugin's [page](http://www.blaenkdenum.com/wp-recaptcha/ "WP-reCAPTCHA - Blaenk Denum"), these people sometimes attempt to post spam to try and make it seem as if reCAPTCHA is not working. A combination of reCAPTCHA and Akismet might help to solve this problem, and if spam still gets through for this reason, it would be very minimal and easy to manually take care of. + += Why am I getting Warning: pack() [function.pack]: Type H: illegal hex digit? +You have the keys in the wrong place. Remember, the reCAPTCHA keys are different from the MailHide keys. And the Public keys are different from the Private keys as well. You can't mix them around. Go through your keys and make sure you have them each in the correct box. + += Aren't you increasing the time users spend solving CAPTCHAs by requiring them to type two words instead of one? = +Actually, no. Most CAPTCHAs on the Web ask users to enter strings of random characters, which are slower to type than English words. reCAPTCHA requires no more time to solve than most other CAPTCHAs. + += Are reCAPTCHAs less secure than other CAPTCHAs that use random characters instead of words? = +Because we ask users to enter two words instead of one, we can increase the security of reCAPTCHA against programs that attempt to guess the words using a dictionary. Whenever an IP address fails one reCAPTCHA, we can show them more distorted words, and give them challenges for which we know both words. The probability of randomly guessing both words correctly would be less than one in ten million. + += Are CAPTCHAs secure? I heard spammers are using porn sites to solve them: the CAPTCHAs are sent to a porn site, and the porn site users are asked to solve the CAPTCHA before being able to see a pornographic image. = + +CAPTCHAs offer great protection against abuse from automated programs. While it might be the case that some spammers have started using porn sites to attack CAPTCHAs (although there is no recorded evidence of this), the amount of damage this can inflict is tiny (so tiny that we haven't even seen this happen!). Whereas it is trivial to write a bot that abuses an unprotected site millions of times a day, redirecting CAPTCHAs to be solved by humans viewing pornography would only allow spammers to abuse systems a few thousand times per day. The economics of this attack just don't add up: every time a porn site shows a CAPTCHA before a porn image, they risk losing a customer to another site that doesn't do this. + +== Screenshots == + +1. The reCAPTCHA Settings +2. The MailHide Settings diff --git a/wp-content/plugins/wp-recaptcha/recaptcha.css b/wp-content/plugins/wp-recaptcha/recaptcha.css new file mode 100644 index 0000000..00f4336 --- /dev/null +++ b/wp-content/plugins/wp-recaptcha/recaptcha.css @@ -0,0 +1,72 @@ +/* RECAPTCHA STYLING */ +.recaptcha-error { + font-size: 1.8em; + padding-bottom: 8px; +} +/* END RECAPTCHA STYLING */ + +/* MAILHIDE STYLING */ + +/* This is for plain text emails i.e. haha@lol.com - TEXT*/ +.mh-plaintext { + background:transparent url(email.png) no-repeat scroll left center; + border:medium none; + color:#2277DD; + height:16px; + padding:2px 2px 4px 20px; +} + +/* This is for plain text emails i.e. haha@lol.com - DOTS*/ +.mh-plaintext a, .mh-plaintext a:hover, .mh-plaintext a:visited, .mh-plaintext a:visited:hover { + color: #FF7700; + font-weight: bolder; + text-decoration: none; + border: 0; + background-color: transparent !important; +} + +/* This is for hyperlinked emails i.e. TEXT - TEXT*/ +.mh-hyperlinked { + background:transparent url(email.png) no-repeat scroll left center; + border:medium none; + color:#2277DD; + height:16px; + padding:2px 2px 4px 20px; +} + +/* This is for hyperlinked emails i.e. TEXT - DOTS*/ +.mh-hyperlinked a, .mh-hyperlinked a:hover, .mh-hyperlinked a:visited, .mh-hyperlinked a:visited:hover { + color: #FF7700; + font-weight: bolder; + text-decoration: none; + border: 0; +} +/* END MAILHIDE STYLING */ + +/* ADMINISTRATION SETTINGS RECAPTCHA */ +.lang-select label, .theme-select label { + vertical-align: middle !important; +} + +.lang-select select, .theme-select select { + vertical-align: middle !important; +} + +.recaptcha-form { + margin: auto !important; + width: 25em !important; +} + +.recaptcha-options td { + vertical-align: top !important; +} + +.which-key label { + font-weight: bold; +} + +.copyright { + text-align: center; + font-size: .85em; +} +/* END ADMINISTRATION SETTINGS RECAPTCHA */ \ No newline at end of file diff --git a/wp-content/plugins/wp-recaptcha/recaptcha.php b/wp-content/plugins/wp-recaptcha/recaptcha.php new file mode 100644 index 0000000..8b6a414 --- /dev/null +++ b/wp-content/plugins/wp-recaptcha/recaptcha.php @@ -0,0 +1,601 @@ +register_default_options(); + + // require the recaptcha library + $this->require_library(); + + // register the hooks + $this->register_actions(); + $this->register_filters(); + } + + function register_actions() { + // load the plugin's textdomain for localization + add_action('init', array(&$this, 'load_textdomain')); + + // styling + add_action('wp_head', array(&$this, 'register_stylesheets')); // make unnecessary: instead, inform of classes for styling + add_action('admin_head', array(&$this, 'register_stylesheets')); // make unnecessary: shouldn't require styling in the options page + + if ($this->options['show_in_registration']) + add_action('login_head', array(&$this, 'registration_style')); // make unnecessary: instead use jQuery and add to the footer? + + // options + register_activation_hook(WPPlugin::path_to_plugin_directory() . '/wp-recaptcha.php', array(&$this, 'register_default_options')); // this way it only happens once, when the plugin is activated + add_action('admin_init', array(&$this, 'register_settings_group')); + + // only register the hooks if the user wants recaptcha on the registration page + if ($this->options['show_in_registration']) { + // recaptcha form display + if ($this->is_multi_blog()) + add_action('signup_extra_fields', array(&$this, 'show_recaptcha_in_registration')); + else + add_action('register_form', array(&$this, 'show_recaptcha_in_registration')); + } + + // only register the hooks if the user wants recaptcha on the comments page + if ($this->options['show_in_comments']) { + add_action('comment_form', array(&$this, 'show_recaptcha_in_comments')); + + // recaptcha comment processing (look into doing all of this with AJAX, optionally) + add_action('wp_head', array(&$this, 'saved_comment'), 0); + add_action('preprocess_comment', array(&$this, 'check_comment'), 0); + add_action('comment_post_redirect', array(&$this, 'relative_redirect'), 0, 2); + } + + // administration (menus, pages, notifications, etc.) + add_filter("plugin_action_links", array(&$this, 'show_settings_link'), 10, 2); + + add_action('admin_menu', array(&$this, 'add_settings_page')); + + // admin notices + add_action('admin_notices', array(&$this, 'missing_keys_notice')); + } + + function register_filters() { + // only register the hooks if the user wants recaptcha on the registration page + if ($this->options['show_in_registration']) { + // recaptcha validation + if ($this->is_multi_blog()) + add_filter('wpmu_validate_user_signup', array(&$this, 'validate_recaptcha_response_wpmu')); + else + add_filter('registration_errors', array(&$this, 'validate_recaptcha_response')); + } + } + + function load_textdomain() { + load_plugin_textdomain('recaptcha', false, 'languages'); + } + + // set the default options + function register_default_options() { + if ($this->options) + return; + + $option_defaults = array(); + + $old_options = WPPlugin::retrieve_options("recaptcha"); + + if ($old_options) { + $option_defaults['public_key'] = $old_options['pubkey']; // the public key for reCAPTCHA + $option_defaults['private_key'] = $old_options['privkey']; // the private key for reCAPTCHA + + // placement + $option_defaults['show_in_comments'] = $old_options['re_comments']; // whether or not to show reCAPTCHA on the comment post + $option_defaults['show_in_registration'] = $old_options['re_registration']; // whether or not to show reCAPTCHA on the registration page + + // bypass levels + $option_defaults['bypass_for_registered_users'] = ($old_options['re_bypass'] == "on") ? 1 : 0; // whether to skip reCAPTCHAs for registered users + $option_defaults['minimum_bypass_level'] = $old_options['re_bypasslevel']; // who doesn't have to do the reCAPTCHA (should be a valid WordPress capability slug) + + if ($option_defaults['minimum_bypass_level'] == "level_10") { + $option_defaults['minimum_bypass_level'] = "activate_plugins"; + } + + // styling + $option_defaults['comments_theme'] = $old_options['re_theme']; // the default theme for reCAPTCHA on the comment post + $option_defaults['registration_theme'] = $old_options['re_theme_reg']; // the default theme for reCAPTCHA on the registration form + $option_defaults['recaptcha_language'] = $old_options['re_lang']; // the default language for reCAPTCHA + $option_defaults['xhtml_compliance'] = $old_options['re_xhtml']; // whether or not to be XHTML 1.0 Strict compliant + $option_defaults['comments_tab_index'] = $old_options['re_tabindex']; // the default tabindex for reCAPTCHA + $option_defaults['registration_tab_index'] = 30; // the default tabindex for reCAPTCHA + + // error handling + $option_defaults['no_response_error'] = $old_options['error_blank']; // message for no CAPTCHA response + $option_defaults['incorrect_response_error'] = $old_options['error_incorrect']; // message for incorrect CAPTCHA response + } + + else { + // keys + $option_defaults['public_key'] = ''; // the public key for reCAPTCHA + $option_defaults['private_key'] = ''; // the private key for reCAPTCHA + + // placement + $option_defaults['show_in_comments'] = 1; // whether or not to show reCAPTCHA on the comment post + $option_defaults['show_in_registration'] = 1; // whether or not to show reCAPTCHA on the registration page + + // bypass levels + $option_defaults['bypass_for_registered_users'] = 1; // whether to skip reCAPTCHAs for registered users + $option_defaults['minimum_bypass_level'] = 'read'; // who doesn't have to do the reCAPTCHA (should be a valid WordPress capability slug) + + // styling + $option_defaults['comments_theme'] = 'red'; // the default theme for reCAPTCHA on the comment post + $option_defaults['registration_theme'] = 'red'; // the default theme for reCAPTCHA on the registration form + $option_defaults['recaptcha_language'] = 'en'; // the default language for reCAPTCHA + $option_defaults['xhtml_compliance'] = 0; // whether or not to be XHTML 1.0 Strict compliant + $option_defaults['comments_tab_index'] = 5; // the default tabindex for reCAPTCHA + $option_defaults['registration_tab_index'] = 30; // the default tabindex for reCAPTCHA + + // error handling + $option_defaults['no_response_error'] = 'ERROR: Please fill in the reCAPTCHA form.'; // message for no CAPTCHA response + $option_defaults['incorrect_response_error'] = 'ERROR: That reCAPTCHA response was incorrect.'; // message for incorrect CAPTCHA response + } + + // add the option based on what environment we're in + WPPlugin::add_options($this->options_name, $option_defaults); + } + + // require the recaptcha library + function require_library() { + require_once($this->path_to_plugin_directory() . '/recaptchalib.php'); + } + + // register the settings + function register_settings_group() { + register_setting("recaptcha_options_group", 'recaptcha_options', array(&$this, 'validate_options')); + } + + // todo: make unnecessary + function register_stylesheets() { + $path = WPPlugin::url_to_plugin_directory() . '/recaptcha.css'; + + echo ''; + } + + // stylesheet information + // todo: this 'hack' isn't nice, try to figure out a workaround + function registration_style() { + $width = 0; // the width of the recaptcha form + + // every theme is 358 pixels wide except for the clean theme, so we have to programmatically handle that + if ($this->options['registration_theme'] == 'clean') + $width = 485; + else + $width = 360; + + echo << + window.onload = function() { + document.getElementById('login').style.width = '{$width}px'; + document.getElementById('reg_passmail').style.marginTop = '10px'; + document.getElementById('recaptcha_widget_div').style.marginBottom = '10px'; + }; + +REGISTRATION; + } + + function recaptcha_enabled() { + return ($this->options['show_in_comments'] || $this->options['show_in_registration']); + } + + function keys_missing() { + return (empty($this->options['public_key']) || empty($this->options['private_key'])); + } + + function create_error_notice($message, $anchor = '') { + $options_url = admin_url('options-general.php?page=wp-recaptcha/recaptcha.php') . $anchor; + $error_message = sprintf(__($message . ' Fix this', 'recaptcha'), $options_url); + + echo '

                ' . $error_message . '

                '; + } + + function missing_keys_notice() { + if ($this->recaptcha_enabled() && $this->keys_missing()) { + $this->create_error_notice('You enabled reCAPTCHA, but some of the reCAPTCHA API Keys seem to be missing.'); + } + } + + function validate_dropdown($array, $key, $value) { + // make sure that the capability that was supplied is a valid capability from the drop-down list + if (in_array($value, $array)) + return $value; + else // if not, load the old value + return $this->options[$key]; + } + + function validate_options($input) { + // todo: make sure that 'incorrect_response_error' is not empty, prevent from being empty in the validation phase + + // trim the spaces out of the key, as they are usually present when copied and pasted + // todo: keys seem to usually be 40 characters in length, verify and if confirmed, add to validation process + $validated['public_key'] = trim($input['public_key']); + $validated['private_key'] = trim($input['private_key']); + + $validated['show_in_comments'] = ($input['show_in_comments'] == 1 ? 1 : 0); + $validated['bypass_for_registered_users'] = ($input['bypass_for_registered_users'] == 1 ? 1: 0); + + $capabilities = array ('read', 'edit_posts', 'publish_posts', 'moderate_comments', 'activate_plugins'); + $themes = array ('red', 'white', 'blackglass', 'clean'); + + $recaptcha_languages = array ('en', 'nl', 'fr', 'de', 'pt', 'ru', 'es', 'tr'); + + $validated['minimum_bypass_level'] = $this->validate_dropdown($capabilities, 'minimum_bypass_level', $input['minimum_bypass_level']); + $validated['comments_theme'] = $this->validate_dropdown($themes, 'comments_theme', $input['comments_theme']); + + $validated['comments_tab_index'] = $input['comments_tab_index'] ? $input["comments_tab_index"] : 5; // use the intval filter + + $validated['show_in_registration'] = ($input['show_in_registration'] == 1 ? 1 : 0); + $validated['registration_theme'] = $this->validate_dropdown($themes, 'registration_theme', $input['registration_theme']); + $validated['registration_tab_index'] = $input['registration_tab_index'] ? $input["registration_tab_index"] : 30; // use the intval filter + + $validated['recaptcha_language'] = $this->validate_dropdown($recaptcha_languages, 'recaptcha_language', $input['recaptcha_language']); + $validated['xhtml_compliance'] = ($input['xhtml_compliance'] == 1 ? 1 : 0); + + $validated['no_response_error'] = $input['no_response_error']; + $validated['incorrect_response_error'] = $input['incorrect_response_error']; + + return $validated; + } + + // display recaptcha + function show_recaptcha_in_registration($errors) { + $format = << + var RecaptchaOptions = { theme : '{$this->options['registration_theme']}', lang : '{$this->options['recaptcha_language']}' , tabindex : {$this->options['registration_tab_index']} }; + +FORMAT; + + $comment_string = << + document.getElementById('recaptcha_table').style.direction = 'ltr'; + +COMMENT_FORM; + + // todo: is this check necessary? look at the latest recaptchalib.php + if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") + $use_ssl = true; + else + $use_ssl = false; + + $escaped_error = htmlentities($_GET['rerror'], ENT_QUOTES); + + // if it's for wordpress mu, show the errors + if ($this->is_multi_blog()) { + $error = $errors->get_error_message('captcha'); + echo ''; + echo ($error ? '

                '.$error.'

                ' : ''); + echo $format . $this->get_recaptcha_html($escaped_error, $use_ssl); + } + + // for regular wordpress + else { + echo $format . $this->get_recaptcha_html($escaped_error, $use_ssl); + } + } + + function validate_recaptcha_response($errors) { + // empty so throw the empty response error + if (empty($_POST['recaptcha_response_field']) || $_POST['recaptcha_response_field'] == '') { + $errors->add('blank_captcha', $this->options['no_response_error']); + return $errors; + } + + $response = recaptcha_check_answer($this->options['private_key'], $_SERVER['REMOTE_ADDR'], $_POST['recaptcha_challenge_field'], $_POST['recaptcha_response_field']); + + // response is bad, add incorrect response error + if (!$response->is_valid) + if ($response->error == 'incorrect-captcha-sol') + $errors->add('captcha_wrong', $this->options['incorrect_response_error']); + + return $errors; + } + + function validate_recaptcha_response_wpmu($result) { + // must make a check here, otherwise the wp-admin/user-new.php script will keep trying to call + // this function despite not having called do_action('signup_extra_fields'), so the recaptcha + // field was never shown. this way it won't validate if it's called in the admin interface + + if (!$this->is_authority()) { + // blogname in 2.6, blog_id prior to that + // todo: why is this done? + if (isset($_POST['blog_id']) || isset($_POST['blogname'])) + return $result; + + // no text entered + if (empty($_POST['recaptcha_response_field']) || $_POST['recaptcha_response_field'] == '') { + $result['errors']->add('blank_captcha', $this->options['no_response_error']); + return $result; + } + + $response = recaptcha_check_answer($this->options['private_key'], $_SERVER['REMOTEADDR'], $_POST['recaptcha_challenge_field'], $_POST['recaptcha_response_field']); + + // response is bad, add incorrect response error + // todo: why echo the error here? wpmu specific? + if (!$response->is_valid) + if ($response->error == 'incorrect-captcha-sol') { + $result['errors']->add('captcha_wrong', $this->options['incorrect_response_error']); + echo '
                ' . $this->options['incorrect_response_error'] . '
                '; + } + + return $result; + } + } + + // utility methods + function hash_comment($id) { + define ("RECAPTCHA_WP_HASH_SALT", "b7e0638d85f5d7f3694f68e944136d62"); + + if (function_exists('wp_hash')) + return wp_hash(RECAPTCHA_WP_HASH_SALT . $id); + else + return md5(RECAPTCHA_WP_HASH_SALT . $this->options['private_key'] . $id); + } + + function get_recaptcha_html($recaptcha_error, $use_ssl=false) { + return recaptcha_get_html($this->options['public_key'], $recaptcha_error, $use_ssl, $this->options['xhtml_compliance']); + } + + function show_recaptcha_in_comments() { + global $user_ID; + + // set the minimum capability needed to skip the captcha if there is one + if (isset($this->options['bypass_for_registered_users']) && $this->options['bypass_for_registered_users'] && $this->options['minimum_bypass_level']) + $needed_capability = $this->options['minimum_bypass_level']; + + // skip the reCAPTCHA display if the minimum capability is met + if ((isset($needed_capability) && $needed_capability && current_user_can($needed_capability)) || !$this->options['show_in_comments']) + return; + + else { + // Did the user fail to match the CAPTCHA? If so, let them know + if ((isset($_GET['rerror']) && $_GET['rerror'] == 'incorrect-captcha-sol')) + echo '

                ' . $this->options['incorrect_response_error'] . "

                "; + + //modify the comment form for the reCAPTCHA widget + $recaptcha_js_opts = << + var RecaptchaOptions = { theme : '{$this->options['comments_theme']}', lang : '{$this->options['recaptcha_language']}' , tabindex : {$this->options['comments_tab_index']} }; + +OPTS; + + add_action('wp_footer', array(&$this, 'save_comment_script')); // preserve the comment that was entered + + // todo: replace this with jquery: http://digwp.com/2009/06/including-jquery-in-wordpress-the-right-way/ + // todo: use math to increment+1 the submit button based on what the tab_index option is + if ($this->options['xhtml_compliance']) { + $comment_string = << 
                +COMMENT_FORM; + } + + else { + $comment_string = << 
                + +COMMENT_FORM; + } + + $use_ssl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on"); + + $escaped_error = htmlentities($_GET['rerror'], ENT_QUOTES); + + echo $recaptcha_js_opts . $this->get_recaptcha_html(isset($escaped_error) ? $escaped_error : null, $use_ssl) . $comment_string; + } + } + + // this is what does the submit-button re-ordering + function save_comment_script() { + $javascript = << + var sub = document.getElementById('submit'); + document.getElementById('recaptcha-submit-btn-area').appendChild (sub); + document.getElementById('submit').tabIndex = 6; + if ( typeof _recaptcha_wordpress_savedcomment != 'undefined') { + document.getElementById('comment').value = _recaptcha_wordpress_savedcomment; + } + document.getElementById('recaptcha_table').style.direction = 'ltr'; + +JS; + echo $javascript; + } + + // todo: this doesn't seem necessary + function show_captcha_for_comment() { + global $user_ID; + return true; + } + + function check_comment($comment_data) { + global $user_ID; + + if ($this->options['bypass_for_registered_users'] && $this->options['minimum_bypass_level']) + $needed_capability = $this->options['minimum_bypass_level']; + + if (($needed_capability && current_user_can($needed_capability)) || !$this->options['show_in_comments']) + return $comment_data; + + if ($this->show_captcha_for_comment()) { + // do not check trackbacks/pingbacks + if ($comment_data['comment_type'] == '') { + $challenge = $_POST['recaptcha_challenge_field']; + $response = $_POST['recaptcha_response_field']; + + $recaptcha_response = recaptcha_check_answer($this->options['private_key'], $_SERVER['REMOTE_ADDR'], $challenge, $response); + + if ($recaptcha_response->is_valid) + return $comment_data; + + else { + $this->saved_error = $recaptcha_response->error; + + // http://codex.wordpress.org/Plugin_API/Filter_Reference#Database_Writes_2 + add_filter('pre_comment_approved', create_function('$a', 'return \'spam\';')); + return $comment_data; + } + } + } + + return $comment_data; + } + + function relative_redirect($location, $comment) { + if ($this->saved_error != '') { + // replace #comment- at the end of $location with #commentform + + $location = substr($location, 0, strpos($location, '#')) . + ((strpos($location, "?") === false) ? "?" : "&") . + 'rcommentid=' . $comment->comment_ID . + '&rerror=' . $this->saved_error . + '&rchash=' . $this->hash_comment($comment->comment_ID) . + '#commentform'; + } + + return $location; + } + + function saved_comment() { + if (!is_single() && !is_page()) + return; + + $comment_id = $_REQUEST['rcommentid']; + $comment_hash = $_REQUEST['rchash']; + + if (empty($comment_id) || empty($comment_hash)) + return; + + if ($comment_hash == $this->hash_comment($comment_id)) { + $comment = get_comment($comment_id); + + // todo: removed double quote from list of 'dangerous characters' + $com = preg_replace('/([\\/\(\)\+\;\'])/e','\'%\'.dechex(ord(\'$1\'))', $comment->comment_content); + + $com = preg_replace('/\\r\\n/m', '\\\n', $com); + + echo " + + "; + + wp_delete_comment($comment->comment_ID); + } + } + + // todo: is this still needed? + // this is used for the api keys url in the administration interface + function blog_domain() { + $uri = parse_url(get_option('siteurl')); + return $uri['host']; + } + + // add a settings link to the plugin in the plugin list + function show_settings_link($links, $file) { + if ($file == plugin_basename($this->path_to_plugin_directory() . '/wp-recaptcha.php')) { + $settings_title = __('Settings for this Plugin', 'recaptcha'); + $settings = __('Settings', 'recaptcha'); + $settings_link = '' . $settings . ''; + array_unshift($links, $settings_link); + } + + return $links; + } + + // add the settings page + function add_settings_page() { + // add the options page + if ($this->environment == Environment::WordPressMU && $this->is_authority()) + add_submenu_page('wpmu-admin.php', 'WP-reCAPTCHA', 'WP-reCAPTCHA', 'manage_options', __FILE__, array(&$this, 'show_settings_page')); + + /* re-add when we figure out a way to add network-wide settings in ms + if ($this->environment == Environment::WordPressMS && $this->is_authority()) + add_submenu_page('ms-admin.php', 'WP-reCAPTCHA', 'WP-reCAPTCHA', 'manage_options', __FILE__, array(&$this, 'show_settings_page')); + */ + + add_options_page('WP-reCAPTCHA', 'WP-reCAPTCHA', 'manage_options', __FILE__, array(&$this, 'show_settings_page')); + } + + // store the xhtml in a separate file and use include on it + function show_settings_page() { + include("settings.php"); + } + + function build_dropdown($name, $keyvalue, $checked_value) { + echo ' \n"; + } + + function capabilities_dropdown() { + // define choices: Display text => permission slug + $capabilities = array ( + __('all registered users', 'recaptcha') => 'read', + __('edit posts', 'recaptcha') => 'edit_posts', + __('publish posts', 'recaptcha') => 'publish_posts', + __('moderate comments', 'recaptcha') => 'moderate_comments', + __('activate plugins', 'recaptcha') => 'activate_plugins' + ); + + $this->build_dropdown('recaptcha_options[minimum_bypass_level]', $capabilities, $this->options['minimum_bypass_level']); + } + + function theme_dropdown($which) { + $themes = array ( + __('Red', 'recaptcha') => 'red', + __('White', 'recaptcha') => 'white', + __('Black Glass', 'recaptcha') => 'blackglass', + __('Clean', 'recaptcha') => 'clean' + ); + + if ($which == 'comments') + $this->build_dropdown('recaptcha_options[comments_theme]', $themes, $this->options['comments_theme']); + else if ($which == 'registration') + $this->build_dropdown('recaptcha_options[registration_theme]', $themes, $this->options['registration_theme']); + } + + function recaptcha_language_dropdown() { + $languages = array ( + __('English', 'recaptcha') => 'en', + __('Dutch', 'recaptcha') => 'nl', + __('French', 'recaptcha') => 'fr', + __('German', 'recaptcha') => 'de', + __('Portuguese', 'recaptcha') => 'pt', + __('Russian', 'recaptcha') => 'ru', + __('Spanish', 'recaptcha') => 'es', + __('Turkish', 'recaptcha') => 'tr' + ); + + $this->build_dropdown('recaptcha_options[recaptcha_language]', $languages, $this->options['recaptcha_language']); + } + } // end class declaration +} // end of class exists clause + +?> diff --git a/wp-content/plugins/wp-recaptcha/recaptchalib.php b/wp-content/plugins/wp-recaptcha/recaptchalib.php new file mode 100644 index 0000000..32c4f4d --- /dev/null +++ b/wp-content/plugins/wp-recaptcha/recaptchalib.php @@ -0,0 +1,277 @@ + $value ) + $req .= $key . '=' . urlencode( stripslashes($value) ) . '&'; + + // Cut the last '&' + $req=substr($req,0,strlen($req)-1); + return $req; +} + + + +/** + * Submits an HTTP POST to a reCAPTCHA server + * @param string $host + * @param string $path + * @param array $data + * @param int port + * @return array response + */ +function _recaptcha_http_post($host, $path, $data, $port = 80) { + + $req = _recaptcha_qsencode ($data); + + $http_request = "POST $path HTTP/1.0\r\n"; + $http_request .= "Host: $host\r\n"; + $http_request .= "Content-Type: application/x-www-form-urlencoded;\r\n"; + $http_request .= "Content-Length: " . strlen($req) . "\r\n"; + $http_request .= "User-Agent: reCAPTCHA/PHP\r\n"; + $http_request .= "\r\n"; + $http_request .= $req; + + $response = ''; + if( false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) { + die ('Could not open socket'); + } + + fwrite($fs, $http_request); + + while ( !feof($fs) ) + $response .= fgets($fs, 1160); // One TCP-IP packet + fclose($fs); + $response = explode("\r\n\r\n", $response, 2); + + return $response; +} + + + +/** + * Gets the challenge HTML (javascript and non-javascript version). + * This is called from the browser, and the resulting reCAPTCHA HTML widget + * is embedded within the HTML form it was called from. + * @param string $pubkey A public key for reCAPTCHA + * @param string $error The error given by reCAPTCHA (optional, default is null) + * @param boolean $use_ssl Should the request be made over ssl? (optional, default is false) + + * @return string - The HTML to be embedded in the user's form. + */ +function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false) +{ + if ($pubkey == null || $pubkey == '') { + die ("To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create"); + } + + if ($use_ssl) { + $server = RECAPTCHA_API_SECURE_SERVER; + } else { + $server = RECAPTCHA_API_SERVER; + } + + $errorpart = ""; + if ($error) { + $errorpart = "&error=" . $error; + } + return ' + + '; +} + + + + +/** + * A ReCaptchaResponse is returned from recaptcha_check_answer() + */ +class ReCaptchaResponse { + var $is_valid; + var $error; +} + + +/** + * Calls an HTTP POST function to verify if the user's guess was correct + * @param string $privkey + * @param string $remoteip + * @param string $challenge + * @param string $response + * @param array $extra_params an array of extra variables to post to the server + * @return ReCaptchaResponse + */ +function recaptcha_check_answer ($privkey, $remoteip, $challenge, $response, $extra_params = array()) +{ + if ($privkey == null || $privkey == '') { + die ("To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create"); + } + + if ($remoteip == null || $remoteip == '') { + die ("For security reasons, you must pass the remote ip to reCAPTCHA"); + } + + + + //discard spam submissions + if ($challenge == null || strlen($challenge) == 0 || $response == null || strlen($response) == 0) { + $recaptcha_response = new ReCaptchaResponse(); + $recaptcha_response->is_valid = false; + $recaptcha_response->error = 'incorrect-captcha-sol'; + return $recaptcha_response; + } + + $response = _recaptcha_http_post (RECAPTCHA_VERIFY_SERVER, "/recaptcha/api/verify", + array ( + 'privatekey' => $privkey, + 'remoteip' => $remoteip, + 'challenge' => $challenge, + 'response' => $response + ) + $extra_params + ); + + $answers = explode ("\n", $response [1]); + $recaptcha_response = new ReCaptchaResponse(); + + if (trim ($answers [0]) == 'true') { + $recaptcha_response->is_valid = true; + } + else { + $recaptcha_response->is_valid = false; + $recaptcha_response->error = $answers [1]; + } + return $recaptcha_response; + +} + +/** + * gets a URL where the user can sign up for reCAPTCHA. If your application + * has a configuration page where you enter a key, you should provide a link + * using this function. + * @param string $domain The domain where the page is hosted + * @param string $appname The name of your application + */ +function recaptcha_get_signup_url ($domain = null, $appname = null) { + return "https://www.google.com/recaptcha/admin/create?" . _recaptcha_qsencode (array ('domains' => $domain, 'app' => $appname)); +} + +function _recaptcha_aes_pad($val) { + $block_size = 16; + $numpad = $block_size - (strlen ($val) % $block_size); + return str_pad($val, strlen ($val) + $numpad, chr($numpad)); +} + +/* Mailhide related code */ + +function _recaptcha_aes_encrypt($val,$ky) { + if (! function_exists ("mcrypt_encrypt")) { + die ("To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed."); + } + $mode=MCRYPT_MODE_CBC; + $enc=MCRYPT_RIJNDAEL_128; + $val=_recaptcha_aes_pad($val); + return mcrypt_encrypt($enc, $ky, $val, $mode, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"); +} + + +function _recaptcha_mailhide_urlbase64 ($x) { + return strtr(base64_encode ($x), '+/', '-_'); +} + +/* gets the reCAPTCHA Mailhide url for a given email, public key and private key */ +function recaptcha_mailhide_url($pubkey, $privkey, $email) { + if ($pubkey == '' || $pubkey == null || $privkey == "" || $privkey == null) { + die ("To use reCAPTCHA Mailhide, you have to sign up for a public and private key, " . + "you can do so at http://www.google.com/recaptcha/mailhide/apikey"); + } + + + $ky = pack('H*', $privkey); + $cryptmail = _recaptcha_aes_encrypt ($email, $ky); + + return "http://www.google.com/recaptcha/mailhide/d?k=" . $pubkey . "&c=" . _recaptcha_mailhide_urlbase64 ($cryptmail); +} + +/** + * gets the parts of the email to expose to the user. + * eg, given johndoe@example,com return ["john", "example.com"]. + * the email is then displayed as john...@example.com + */ +function _recaptcha_mailhide_email_parts ($email) { + $arr = preg_split("/@/", $email ); + + if (strlen ($arr[0]) <= 4) { + $arr[0] = substr ($arr[0], 0, 1); + } else if (strlen ($arr[0]) <= 6) { + $arr[0] = substr ($arr[0], 0, 3); + } else { + $arr[0] = substr ($arr[0], 0, 4); + } + return $arr; +} + +/** + * Gets html to display an email address given a public an private key. + * to get a key, go to: + * + * http://www.google.com/recaptcha/mailhide/apikey + */ +function recaptcha_mailhide_html($pubkey, $privkey, $email) { + $emailparts = _recaptcha_mailhide_email_parts ($email); + $url = recaptcha_mailhide_url ($pubkey, $privkey, $email); + + return htmlentities($emailparts[0]) . "...@" . htmlentities ($emailparts [1]); + +} + + +?> diff --git a/wp-content/plugins/wp-recaptcha/screenshot-1.png b/wp-content/plugins/wp-recaptcha/screenshot-1.png new file mode 100644 index 0000000..4db34f7 Binary files /dev/null and b/wp-content/plugins/wp-recaptcha/screenshot-1.png differ diff --git a/wp-content/plugins/wp-recaptcha/screenshot-2.png b/wp-content/plugins/wp-recaptcha/screenshot-2.png new file mode 100644 index 0000000..acaf1b3 Binary files /dev/null and b/wp-content/plugins/wp-recaptcha/screenshot-2.png differ diff --git a/wp-content/plugins/wp-recaptcha/settings.php b/wp-content/plugins/wp-recaptcha/settings.php new file mode 100644 index 0000000..f47bb8e --- /dev/null +++ b/wp-content/plugins/wp-recaptcha/settings.php @@ -0,0 +1,136 @@ + + +
                + +

                +

                + +
                + + +

                +

                .

                +

                + + + + + + + + + + +
                + +
                + +
                + +

                + + + + + + + + + + + + + + + + + + + + +
                + options['show_in_comments']); ?> /> + +
                + options['bypass_for_registered_users']); ?> /> + + capabilities_dropdown(); ?> +
                + + theme_dropdown('comments'); ?> +
                + +
                + +

                + + + + + + + + + + + + + + + +
                + options['show_in_registration']); ?> /> + +
                + + theme_dropdown('registration'); ?> +
                + +
                + +

                + + + + + + + + + + +
                + + recaptcha_language_dropdown(); ?> +
                + options['xhtml_compliance']); ?> /> + +
                + +

                + + + + + + + + + + +
                + +
                + +
                + +

                +
                + + +
                \ No newline at end of file diff --git a/wp-content/plugins/wp-recaptcha/uninstall.php b/wp-content/plugins/wp-recaptcha/uninstall.php new file mode 100644 index 0000000..b13fc02 --- /dev/null +++ b/wp-content/plugins/wp-recaptcha/uninstall.php @@ -0,0 +1,18 @@ + \ No newline at end of file diff --git a/wp-content/plugins/wp-recaptcha/wp-plugin.php b/wp-content/plugins/wp-recaptcha/wp-plugin.php new file mode 100644 index 0000000..44a88ef --- /dev/null +++ b/wp-content/plugins/wp-recaptcha/wp-plugin.php @@ -0,0 +1,132 @@ +environment = WPPlugin::determine_environment(); + $this->options_name = $options_name; + + $this->options = WPPlugin::retrieve_options($this->options_name); + } + + // sub-classes determine what actions and filters to hook + abstract protected function register_actions(); + abstract protected function register_filters(); + + // environment checking + static function determine_environment() { + global $wpmu_version; + + if (function_exists('is_multisite')) + if (is_multisite()) + return Environment::WordPressMS; + + if (!empty($wpmu_version)) + return Environment::WordPressMU; + + return Environment::WordPress; + } + + // path finding + static function plugins_directory() { + if (WPPlugin::determine_environment() == Environment::WordPressMU) + return WP_CONTENT_DIR . '/mu-plugins'; + else + return WP_CONTENT_DIR . '/plugins'; + } + + static function plugins_url() { + if (WPPlugin::determine_environment() == Environment::WordPressMU) + return site_url() . '/wp-content/mu-plugins'; + else + return site_url() . '/wp-content/plugins'; + } + + static function path_to_plugin_directory() { + $current_directory = basename(dirname(__FILE__)); + + return WPPlugin::plugins_directory() . "/${current_directory}"; + } + + static function url_to_plugin_directory() { + $current_directory = basename(dirname(__FILE__)); + + return WPPlugin::plugins_url() . "/${current_directory}"; + } + + static function path_to_plugin($file_path) { + $file_name = basename($file_path); // /etc/blah/file.txt => file.txt + + if (WPPlugin::determine_environment() == Environment::WordPressMU) + return WPPlugin::plugins_directory() . "/${file_name}"; + else + return WPPlugin::path_to_plugin_directory() . "/${file_name}"; + } + + // options + abstract protected function register_default_options(); + + // option retrieval + static function retrieve_options($options_name) { + if (WPPlugin::determine_environment() == Environment::WordPressMU) + return get_site_option($options_name); + else + return get_option($options_name); + } + + static function remove_options($options_name) { + if (WPPlugin::determine_environment() == Environment::WordPressMU) + return delete_site_option($options_name); + else + return delete_option($options_name); + } + + static function add_options($options_name, $options) { + if (WPPlugin::determine_environment() == Environment::WordPressMU) + return add_site_option($options_name, $options); + else + return add_option($options_name, $options); + } + + protected function is_multi_blog() { + return $this->environment != Environment::WordPress; + } + + // calls the appropriate 'authority' checking function depending on the environment + protected function is_authority() { + if ($this->environment == Environment::WordPress) + return is_admin(); + + if ($this->environment == Environment::WordPressMU) + return is_site_admin(); + + if ($this->environment == Environment::WordPressMS) + return is_super_admin(); + } + } +} + +?> diff --git a/wp-content/plugins/wp-recaptcha/wp-recaptcha.php b/wp-content/plugins/wp-recaptcha/wp-recaptcha.php new file mode 100644 index 0000000..a4c2b47 --- /dev/null +++ b/wp-content/plugins/wp-recaptcha/wp-recaptcha.php @@ -0,0 +1,22 @@ + diff --git a/wp-content/themes/index.php b/wp-content/themes/index.php new file mode 100644 index 0000000..4e6c07c --- /dev/null +++ b/wp-content/themes/index.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/wp-content/themes/twentyfourteen/404.php b/wp-content/themes/twentyfourteen/404.php new file mode 100644 index 0000000..7f5bef8 --- /dev/null +++ b/wp-content/themes/twentyfourteen/404.php @@ -0,0 +1,32 @@ + + + +
                +
                + + + +
                +

                + + +
                + +
                +
                + + + +
                +
                + + + + + + +
                +
                + + + +
                +
                + + + +
                +

                + +

                + +
                + +
                + + + +
                +
                + + + +
                +
                + + + +
                +

                + + %s
                ', $term_description ); + endif; + ?> + + + +
          + + + + +
          + + + +

          + +

          + + 1 && get_option( 'page_comments' ) ) : ?> + + + +
            + 'ol', + 'short_ping' => true, + 'avatar_size'=> 34, + ) ); + ?> +
          + + 1 && get_option( 'page_comments' ) ) : ?> + + + + +

          + + + + + + +
          diff --git a/wp-content/themes/twentyfourteen/content-aside.php b/wp-content/themes/twentyfourteen/content-aside.php new file mode 100644 index 0000000..3837a2e --- /dev/null +++ b/wp-content/themes/twentyfourteen/content-aside.php @@ -0,0 +1,57 @@ + + +
          > + + +
          + + + ', '' ); + else : + the_title( '

          ', '

          ' ); + endif; + ?> + + +
          + +
          + →', 'twentyfourteen' ) ); + wp_link_pages( array( + 'before' => '', + 'link_before' => '', + 'link_after' => '', + ) ); + ?> +
          + + ', '', '' ); ?> +
          diff --git a/wp-content/themes/twentyfourteen/content-audio.php b/wp-content/themes/twentyfourteen/content-audio.php new file mode 100644 index 0000000..cb5b022 --- /dev/null +++ b/wp-content/themes/twentyfourteen/content-audio.php @@ -0,0 +1,57 @@ + + +
          > + + +
          + + + ', '' ); + else : + the_title( '

          ', '

          ' ); + endif; + ?> + + +
          + +
          + →', 'twentyfourteen' ) ); + wp_link_pages( array( + 'before' => '', + 'link_before' => '', + 'link_after' => '', + ) ); + ?> +
          + + ', '', '' ); ?> +
          diff --git a/wp-content/themes/twentyfourteen/content-featured-post.php b/wp-content/themes/twentyfourteen/content-featured-post.php new file mode 100644 index 0000000..6cc8822 --- /dev/null +++ b/wp-content/themes/twentyfourteen/content-featured-post.php @@ -0,0 +1,34 @@ + + +
          > + + + + +
          + + + + + ','' ); ?> +
          +
          diff --git a/wp-content/themes/twentyfourteen/content-gallery.php b/wp-content/themes/twentyfourteen/content-gallery.php new file mode 100644 index 0000000..c49a261 --- /dev/null +++ b/wp-content/themes/twentyfourteen/content-gallery.php @@ -0,0 +1,57 @@ + + +
          > + + +
          + + + ', '' ); + else : + the_title( '

          ', '

          ' ); + endif; + ?> + + +
          + +
          + →', 'twentyfourteen' ) ); + wp_link_pages( array( + 'before' => '', + 'link_before' => '', + 'link_after' => '', + ) ); + ?> +
          + + ', '', '' ); ?> +
          diff --git a/wp-content/themes/twentyfourteen/content-image.php b/wp-content/themes/twentyfourteen/content-image.php new file mode 100644 index 0000000..836601f --- /dev/null +++ b/wp-content/themes/twentyfourteen/content-image.php @@ -0,0 +1,57 @@ + + +
          > + + +
          + + + ', '' ); + else : + the_title( '

          ', '

          ' ); + endif; + ?> + + +
          + +
          + →', 'twentyfourteen' ) ); + wp_link_pages( array( + 'before' => '', + 'link_before' => '', + 'link_after' => '', + ) ); + ?> +
          + + ', '', '' ); ?> +
          diff --git a/wp-content/themes/twentyfourteen/content-link.php b/wp-content/themes/twentyfourteen/content-link.php new file mode 100644 index 0000000..d208ba0 --- /dev/null +++ b/wp-content/themes/twentyfourteen/content-link.php @@ -0,0 +1,57 @@ + + +
          > + + +
          + + + ', '' ); + else : + the_title( '

          ', '

          ' ); + endif; + ?> + + +
          + +
          + →', 'twentyfourteen' ) ); + wp_link_pages( array( + 'before' => '', + 'link_before' => '', + 'link_after' => '', + ) ); + ?> +
          + + ', '', '' ); ?> +
          diff --git a/wp-content/themes/twentyfourteen/content-none.php b/wp-content/themes/twentyfourteen/content-none.php new file mode 100644 index 0000000..a83e06e --- /dev/null +++ b/wp-content/themes/twentyfourteen/content-none.php @@ -0,0 +1,31 @@ + + + + +
          + + +

          Get started here.', 'twentyfourteen' ), admin_url( 'post-new.php' ) ); ?>

          + + + +

          + + + + +

          + + + +
          diff --git a/wp-content/themes/twentyfourteen/content-page.php b/wp-content/themes/twentyfourteen/content-page.php new file mode 100644 index 0000000..9839419 --- /dev/null +++ b/wp-content/themes/twentyfourteen/content-page.php @@ -0,0 +1,31 @@ + + +
          > +

          ', '

          ' ); + ?> + +
          + '', + 'link_before' => '', + 'link_after' => '', + ) ); + + edit_post_link( __( 'Edit', 'twentyfourteen' ), '', '' ); + ?> +
          +
          diff --git a/wp-content/themes/twentyfourteen/content-quote.php b/wp-content/themes/twentyfourteen/content-quote.php new file mode 100644 index 0000000..b93cf99 --- /dev/null +++ b/wp-content/themes/twentyfourteen/content-quote.php @@ -0,0 +1,57 @@ + + +
          > + + +
          + + + ', '' ); + else : + the_title( '

          ', '

          ' ); + endif; + ?> + + +
          + +
          + →', 'twentyfourteen' ) ); + wp_link_pages( array( + 'before' => '', + 'link_before' => '', + 'link_after' => '', + ) ); + ?> +
          + + ', '', '' ); ?> +
          diff --git a/wp-content/themes/twentyfourteen/content-video.php b/wp-content/themes/twentyfourteen/content-video.php new file mode 100644 index 0000000..bedbd7f --- /dev/null +++ b/wp-content/themes/twentyfourteen/content-video.php @@ -0,0 +1,57 @@ + + +
          > + + +
          + + + ', '' ); + else : + the_title( '

          ', '

          ' ); + endif; + ?> + + +
          + +
          + →', 'twentyfourteen' ) ); + wp_link_pages( array( + 'before' => '', + 'link_before' => '', + 'link_after' => '', + ) ); + ?> +
          + + ', '', '' ); ?> +
          diff --git a/wp-content/themes/twentyfourteen/content.php b/wp-content/themes/twentyfourteen/content.php new file mode 100644 index 0000000..d9bf754 --- /dev/null +++ b/wp-content/themes/twentyfourteen/content.php @@ -0,0 +1,66 @@ + + +
          > + + +
          + + + ', '' ); + else : + the_title( '

          ', '

          ' ); + endif; + ?> + + +
          + + +
          + +
          + +
          + →', 'twentyfourteen' ) ); + wp_link_pages( array( + 'before' => '', + 'link_before' => '', + 'link_after' => '', + ) ); + ?> +
          + + + ', '', '' ); ?> +
          diff --git a/wp-content/themes/twentyfourteen/css/editor-style.css b/wp-content/themes/twentyfourteen/css/editor-style.css new file mode 100644 index 0000000..e99813c --- /dev/null +++ b/wp-content/themes/twentyfourteen/css/editor-style.css @@ -0,0 +1,644 @@ +/* +Theme Name: Twenty Fourteen +Description: Used to style the TinyMCE editor. +*/ + + +/** + * Table of Contents: + * + * 1.0 - Body + * 2.0 - Headings + * 3.0 - Text Elements + * 4.0 - Links + * 5.0 - Alignment + * 6.0 - Tables + * 7.0 - Images + * 8.0 - Galleries + * 9.0 - Audio/Video + * 10.0 - RTL + * ---------------------------------------------------------------------------- + */ + + +/** + * 1.0 Body + * ---------------------------------------------------------------------------- + */ + +html .mceContentBody { + font-size: 100%; + max-width: 474px; +} + +body { + color: #2b2b2b; + font-family: Lato, sans-serif; + font-weight: 400; + line-height: 1.5; + vertical-align: baseline; +} + + +/** + * 2.0 Headings + * ---------------------------------------------------------------------------- + */ + +h1, +h2, +h3, +h4, +h5, +h6 { + clear: both; + font-weight: 700; + margin: 36px 0 12px; +} + +h1 { + font-size: 26px; + line-height: 1.3846153846; +} + +h2 { + font-size: 24px; + line-height: 1; +} + +h3 { + font-size: 22px; + line-height: 1.0909090909; +} + +h4 { + font-size: 20px; + line-height: 1.2; +} + +h5 { + font-size: 18px; + line-height: 1.3333333333; +} + +h6 { + font-size: 16px; + line-height: 1.5; +} + +h1:first-child, +h2:first-child, +h3:first-child, +h4:first-child, +h5:first-child, +h6:first-child { + margin-top: 0; +} + + +/** + * 3.0 Text Elements + * ---------------------------------------------------------------------------- + */ + +address { + font-style: italic; + margin-bottom: 24px; +} + +abbr[title] { + border-bottom: 1px dotted #2b2b2b; + cursor: help; +} + +b, +strong { + font-weight: 700; +} + +cite { + border: 0; +} + +cite, +dfn, +em, +i { + font-style: italic; +} + +mark, +ins { + background: #fff9c0; + border: 0; + color: inherit; + text-decoration: none; +} + +p { + margin: 0 0 24px; +} + +code, +kbd, +tt, +var, +samp, +pre { + font-family: monospace, serif; + font-size: 15px; + line-height: 1.6; +} + +pre { + border: 1px solid rgba(0, 0, 0, 0.1); + margin-bottom: 24px; + max-width: 100%; + overflow: auto; + padding: 12px; + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; +} + +blockquote, +q { + quotes: none; +} + +blockquote:before, +blockquote:after, +q:before, +q:after { + content: ""; + content: none; +} + +blockquote { + color: #767676; + font-size: 19px; + font-style: italic; + font-weight: 300; + line-height: 1.2631578947; + margin: 0 0 24px; +} + +blockquote cite, +blockquote small { + color: #2b2b2b; + font-size: 16px; + font-weight: 400; + line-height: 1.5; +} + +blockquote em, +blockquote i, +blockquote cite { + font-style: normal; +} + +blockquote strong, +blockquote b { + font-weight: 400; +} + +small { + font-size: smaller; +} + +big { + font-size: 125%; +} + +sup, +sub { + font-size: 75%; + height: 0; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + bottom: 1ex; +} + +sub { + top: .5ex; +} + +dl { + margin: 0 0 24px; +} + +dt { + font-weight: bold; +} + +dd { + margin: 0 0 24px; +} + +ul, +ol { + list-style: none; + margin: 0 0 24px 20px; + padding-left: 0; +} + +ul { + list-style: disc; +} + +ol { + list-style: decimal; +} + +li > ul, +li > ol { + margin: 0 0 0 20px; +} + +del { + color: #767676; +} + +hr { + background-color: rgba(0, 0, 0, 0.1); + border: 0; + height: 1px; + margin-bottom: 23px; +} + + +/** + * 4.0 Links + * ---------------------------------------------------------------------------- + */ + +a { + color: #24890d; + text-decoration: none; +} + +a:visited { + color: #24890d; +} + +a:focus { + outline: thin dotted; +} + +a:active, +a:hover { + color: #41a62a; + outline: 0; +} + + +/** + * 5.0 Alignment + * ---------------------------------------------------------------------------- + */ + +.alignleft { + float: left; + margin: 7px 24px 7px 0; +} + +.alignright { + float: right; + margin: 7px 0 7px 24px; +} + +.aligncenter { + clear: both; + display: block; + margin: 7px auto; +} + +blockquote.alignleft, +blockquote.alignright { + border-top: 1px solid rgba(0, 0, 0, 0.1); + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + padding-top: 17px; + width: 50%; +} + +blockquote.alignleft p, +blockquote.alignright p { + margin-bottom: 17px; +} + + +/** + * 6.0 Tables + * ---------------------------------------------------------------------------- + */ + +.mceItemTable { + border: 1px solid rgba(0, 0, 0, 0.1); + border-width: 1px 0 0 1px; + border-collapse: separate; + border-spacing: 0; + font-size: 14px; + line-height: 1.2857142857; + margin-bottom: 24px; + width: 100%; +} + +.mceItemTable th, +.mceItemTable caption { + border: 1px solid rgba(0, 0, 0, 0.1); + border-width: 0 1px 1px 0; + font-weight: 700; + padding: 8px; + text-align: left; + text-transform: uppercase; + vertical-align: baseline; +} + +.mceItemTable td { + border: 1px solid rgba(0, 0, 0, 0.1); + border-width: 0 1px 1px 0; + font-family: Lato, sans-serif; + font-size: 14px; + padding: 8px; + vertical-align: baseline; +} + + +/** + * 7.0 Images + * ---------------------------------------------------------------------------- + */ + +img { + height: auto; + max-width: 474px; + vertical-align: middle; +} + +.wp-caption { + background: transparent; + border: none; + color: #767676; + margin: 0 0 24px 0; + max-width: 474px; + padding: 0; + text-align: left; +} + +.html5-captions .wp-caption { + padding: 0; +} + +.wp-caption.alignleft { + margin: 7px 14px 7px 0; +} + +.html5-captions .wp-caption.alignleft { + margin-right: 24px; +} + +.wp-caption.alignright { + margin: 7px 0 7px 14px; +} + +.wp-caption.alignright img, +.wp-caption.alignright .wp-caption-dd { + padding-left: 10px; +} + +.html5-captions .wp-caption.alignright { + margin-left: 24px; +} + +.html5-captions .wp-caption.alignright img, +.html5-captions .wp-caption.alignright .wp-caption-dd { + padding: 0; +} + +.wp-caption.aligncenter { + margin: 7px 0; +} + +.wp-caption-dt { + margin: 0; +} + +.wp-caption .wp-caption-text, +.wp-caption-dd { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + font-size: 12px; + font-style: italic; + line-height: 1.5; + margin: 9px 0; + padding: 0 10px 0 0; /* Avoid the caption to overflow the width of the image because wp-caption has 10px wider width */ + text-align: left; +} + +.mceTemp + ul, +.mceTemp + ol { + list-style-position: inside; +} + +/** + * 8.0 Gallery + * ----------------------------------------------------------------------------- + */ + +.gallery .gallery-item { + float: left; + margin: 0 4px 4px 0; + overflow: hidden; + padding: 0; + position: relative; +} + +.gallery-columns-1 .gallery-item { + max-width: 100%; + width: auto; +} + +.gallery-columns-2 .gallery-item { + max-width: 48%; + max-width: -webkit-calc(50% - 14px); + max-width: calc(50% - 14px); + width: auto; +} + +.gallery-columns-3 .gallery-item { + max-width: 32%; + max-width: -webkit-calc(33.3% - 11px); + max-width: calc(33.3% - 11px); + width: auto; +} + +.gallery-columns-4 .gallery-item { + max-width: 23%; + max-width: -webkit-calc(25% - 9px); + max-width: calc(25% - 9px); + width: auto; +} + +.gallery-columns-5 .gallery-item { + max-width: 19%; + max-width: -webkit-calc(20% - 8px); + max-width: calc(20% - 8px); + width: auto; +} + +.gallery-columns-6 .gallery-item { + max-width: 15%; + max-width: -webkit-calc(16.7% - 7px); + max-width: calc(16.7% - 7px); + width: auto; +} + +.gallery-columns-7 .gallery-item { + max-width: 13%; + max-width: -webkit-calc(14.28% - 7px); + max-width: calc(14.28% - 7px); + width: auto; +} + +.gallery-columns-8 .gallery-item { + max-width: 11%; + max-width: -webkit-calc(12.5% - 6px); + max-width: calc(12.5% - 6px); + width: auto; +} + +.gallery-columns-9 .gallery-item { + max-width: 9%; + max-width: -webkit-calc(11.1% - 6px); + max-width: calc(11.1% - 6px); + width: auto; +} + +.gallery-columns-1 .gallery-item:nth-of-type(1n), +.gallery-columns-2 .gallery-item:nth-of-type(2n), +.gallery-columns-3 .gallery-item:nth-of-type(3n), +.gallery-columns-4 .gallery-item:nth-of-type(4n), +.gallery-columns-5 .gallery-item:nth-of-type(5n), +.gallery-columns-6 .gallery-item:nth-of-type(6n), +.gallery-columns-7 .gallery-item:nth-of-type(7n), +.gallery-columns-8 .gallery-item:nth-of-type(8n), +.gallery-columns-9 .gallery-item:nth-of-type(9n) { + margin-right: 0; +} + +.gallery-columns-1 .gallery-item:nth-of-type(1n), +.gallery-columns-2 .gallery-item:nth-of-type(2n - 1), +.gallery-columns-3 .gallery-item:nth-of-type(3n - 2), +.gallery-columns-4 .gallery-item:nth-of-type(4n - 3), +.gallery-columns-5 .gallery-item:nth-of-type(5n - 4), +.gallery-columns-6 .gallery-item:nth-of-type(6n - 5), +.gallery-columns-7 .gallery-item:nth-of-type(7n - 6), +.gallery-columns-8 .gallery-item:nth-of-type(8n - 7), +.gallery-columns-9 .gallery-item:nth-of-type(9n - 8) { + margin-left: 12px; /* Compensate for the default negative margin on .gallery, which can't be changed. */ +} + +.gallery .gallery-caption { + background-color: rgba(0, 0, 0, 0.7); + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + color: #fff; + font-size: 12px; + line-height: 1.5; + margin: 0; + max-height: 50%; + opacity: 0; + padding: 6px 8px; + position: absolute; + bottom: 0; + left: 0; + text-align: left; + width: 100%; +} + +.gallery .gallery-caption:before { + content: ""; + height: 100%; + min-height: 49px; + position: absolute; + top: 0; + left: 0; + width: 100%; +} + +.gallery-item:hover .gallery-caption { + opacity: 1; +} + +.gallery-columns-7 .gallery-caption, +.gallery-columns-8 .gallery-caption, +.gallery-columns-9 .gallery-caption { + display: none; +} + + +/** + * 9.0 Audio/Video + * ---------------------------------------------------------------------------- + */ + +.mejs-mediaelement, +.mejs-container .mejs-controls { + background: #000; +} + +.mejs-controls .mejs-time-rail .mejs-time-loaded, +.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current { + background: #fff; +} + +.mejs-controls .mejs-time-rail .mejs-time-current { + background: #24890d; +} + +.mejs-controls .mejs-time-rail .mejs-time-total, +.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total { + background: rgba(255, 255, 255, .33); +} + +.mejs-controls .mejs-time-rail span, +.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total, +.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current { + border-radius: 0; +} + +.mejs-overlay-loading { + background: transparent; +} + + +/** + * 10.0 RTL + * ---------------------------------------------------------------------------- + */ + +html .mceContentBody.rtl { + direction: rtl; + unicode-bidi: embed; +} + +.rtl ol, +.rtl ul { + margin-left: 0; + margin-right: 24px; +} + +.rtl .wp-caption, +.rtl tr th { + text-align: right; +} + +.rtl td { + text-align: right; +} diff --git a/wp-content/themes/twentyfourteen/css/ie.css b/wp-content/themes/twentyfourteen/css/ie.css new file mode 100644 index 0000000..3b71a6b --- /dev/null +++ b/wp-content/themes/twentyfourteen/css/ie.css @@ -0,0 +1,1332 @@ +/** + * Global Styles for older IE versions (previous to IE9). + */ + +pre, +fieldset, +table, +th, +td, +input, +textarea { + border: 1px solid #e5e5e5; +} + +hr { + background-color: #e5e5e5; +} + +button, +input, +select, +textarea { + vertical-align: middle; +} + + +input:focus, +textarea:focus { + border: 1px solid #b2b2b2; +} + +.site-content blockquote.alignleft, +.site-content blockquote.alignright { + border-top: 1px solid #e5e5e5; + border-bottom: 1px solid #e5e5e5; +} + +.post-thumbnail, +a.post-thumbnail:hover { + background: transparent; +} + +.list-view .site-content .hentry { + border-top: 1px solid #e5e5e5; + padding-top: 48px; +} + +.gallery-caption { + background: #000; + filter: alpha(opacity=0); +} + +.gallery-item:hover .gallery-caption { + filter: alpha(opacity=70); +} + +.nav-links { + border-top: 1px solid #e5e5e5; +} + +.post-navigation a, +.image-navigation .previous-image, +.image-navigation .next-image, +.contributor { + border-bottom: 1px solid #e5e5e5; +} + +.contributor-avatar, +.comment-author .avatar { + border: 1px solid #e5e5e5; +} + +.comment-list article, +.comment-list .pingback, +.comment-list .trackback { + border-top: 1px solid #e5e5e5; +} + +.comment-list .reply { + margin-top: 0; +} + +#secondary { + color: #b3b3b3; +} + +.widget abbr[title] { + border-color: #b3b3b3; +} + +.widget pre, +.widget fieldset, +.widget table, +.widget th, +.widget td, +.widget input, +.widget textarea { + border-color: #4d4d4d; +} + +.widget blockquote, +.widget .wp-caption, +.widget_twentyfourteen_ephemera .entry-meta a { + color: #b3b3b3; +} + +.widget del { + color: #666; +} + +.widget hr { + background-color: #4d4d4d; +} + +.widget input, +.widget textarea { + background-color: #1a1a1a; +} + +.widget input:focus, +.widget textarea:focus { + border-color: #262626; +} + +.widget_calendar thead th { + background-color: #1a1a1a; +} + +.widget_twentyfourteen_ephemera > ol > li { + border-bottom: 1px solid #4d4d4d; +} + +.widget_archive li, +.widget_categories li, +.widget_links li, +.widget_meta li, +.widget_nav_menu li, +.widget_pages li, +.widget_recent_comments li, +.widget_recent_entries li, +.widget_categories li ul, +.widget_nav_menu li ul, +.widget_pages li ul { + border-top: 1px solid #4d4d4d; +} + +.content-sidebar .widget pre, +.content-sidebar .widget fieldset, +.content-sidebar .widget table, +.content-sidebar .widget th, +.content-sidebar .widget td, +.content-sidebar .widget input, +.content-sidebar .widget textarea, +.content-sidebar .widget_archive li, +.content-sidebar .widget_categories li, +.content-sidebar .widget_links li, +.content-sidebar .widget_meta li, +.content-sidebar .widget_nav_menu li, +.content-sidebar .widget_pages li, +.content-sidebar .widget_recent_comments li, +.content-sidebar .widget_recent_entries li, +.content-sidebar .widget_categories li ul, +.content-sidebar .widget_nav_menu li ul, +.content-sidebar .widget_pages li ul { + border-color: #e5e5e5; +} + +.content-sidebar .widget hr { + background-color: #e5e5e5; +} + +.content-sidebar .widget input:focus, +.content-sidebar .widget textarea:focus { + border: 1px solid #b2b2b2; +} + +.content-sidebar .widget_calendar thead th { + background-color: #fafafa; +} + +.content-sidebar .widget_twentyfourteen_ephemera > ol > li { + border-bottom: 1px solid #e5e5e5; +} + +.site-footer, +.site-info, +.site-info a { + color: #b3b3b3; +} + +#supplementary + .site-info { + border-top: 1px solid #4d4d4d; +} + +.featured-content { + background: #000; +} + + +/** + * Internet Explorer 8 + */ + +.ie8 img.size-full, +.ie8 img.size-large, +.ie8 img.header-image, +.ie8 img.wp-post-image, +.ie8 img[class*="align"], +.ie8 img[class*="wp-image-"], +.ie8 img[class*="attachment-"] { + height: auto; + width: auto; /* Prevent stretching of full-size and large-size images with height and width attributes in IE8 */ +} + +.ie8 .full-size-link:before, +.ie8 .parent-post-link:before, +.ie8 .site-content span + .byline:before, +.ie8 .site-content span + .comments-link:before, +.ie8 .site-content span + .edit-link:before, +.ie8 .site-content span + .entry-date:before { + content: ""; +} + +.ie8 .attachment span.entry-date:before, +.ie8 .entry-content .edit-link a:before, +.ie8 .entry-meta .edit-link a:before, +.ie8 .site-content .byline a:before, +.ie8 .site-content .comments-link a:before, +.ie8 .site-content .entry-date a:before, +.ie8 .site-content .featured-post:before, +.ie8 .site-content .full-size-link a:before, +.ie8 .site-content .parent-post-link a:before, +.ie8 .site-content .post-format a:before { + display: inline-block; + font: normal 16px/1 Genericons; + text-decoration: inherit; + vertical-align: text-bottom; +} + +.ie8 .site-content .entry-meta > span { + margin-right: 10px; +} + +.ie8 .site-content .format-video .post-format a:before { + content: "\f104"; +} + +.ie8 .site-content .format-audio .post-format a:before { + content: "\f109"; +} + +.ie8 .site-content .format-image .post-format a:before { + content: "\f473"; + position: relative; + top: 1px; +} + +.ie8 .site-content .format-quote .post-format a:before { + content: "\f106"; + margin-right: 2px; +} + +.ie8 .site-content .format-gallery .post-format a:before { + content: "\f103"; + margin-right: 4px; +} + +.ie8 .site-content .format-aside .post-format a:before { + content: "\f101"; + margin-right: 2px; +} + +.ie8 .site-content .format-link .post-format a:before { + content: "\f107"; + position: relative; + top: 1px; +} + +.ie8 .site-content .featured-post:before { + content: "\f308"; + margin-right: 3px; + position: relative; + top: 1px; +} + +.ie8 .site-content .entry-date a:before, +.ie8 .attachment .site-content span.entry-date:before { + content: "\f303"; + margin-right: 1px; + position: relative; + top: 1px; +} + +.ie8 .site-content .byline a:before { + content: "\f304"; +} + +.ie8 .site-content .comments-link a:before { + content: "\f300"; + margin-right: 2px; +} + +.ie8 .entry-content .edit-link a:before, +.ie8 .entry-meta .edit-link a:before { + content: "\f411"; +} + +.ie8 .site-content .full-size-link a:before { + content: "\f402"; + margin-right: 1px; +} + +.ie8 .site-content .parent-post-link a:before { + content: "\f301"; +} + +.ie8 .main-content { + float: left; +} + +.ie8 .content-area { + float: left; + padding-top: 72px; + width: 100%; +} + +.ie8 .site-content { + margin-right: 29.04761904%; + margin-left: 17.61904761%; +} + +.ie8 .search-box-wrapper, +.ie8 .featured-content { + padding-left: 17.61904761%; +} + +.ie8 .header-main { + padding: 0 0 0 30px; +} + +.ie8 .search-toggle { + margin-right: 0; +} + +.ie8 .search-box .search-field { + width: 324px; +} + +.ie8 .site-navigation li .current_page_item > a, +.ie8 .site-navigation li .current_page_ancestor > a, +.ie8 .site-navigation li .current-menu-item > a, +.ie8 .site-navigation li .current-menu-ancestor > a { + background-color: #000; +} + +.ie8 .primary-navigation { + float: right; + font-size: 11px; + margin: 0 1px 0 -10px; + padding: 0; + text-transform: uppercase; +} + +.ie8 .primary-navigation .menu-toggle { + display: none; + padding: 0; +} + +.ie8 .primary-navigation .nav-menu { + border-bottom: 0; + display: block; +} + +.ie8 .primary-navigation.toggled-on { + border-bottom: 0; + margin: 0; + padding: 0; +} + +.ie8 .primary-navigation li { + border: 0; + display: inline-block; + height: 48px; + line-height: 48px; + position: relative; +} + +.ie8 .primary-navigation a { + display: inline-block; + padding: 0 10px; + white-space: nowrap; +} + +.ie8 .primary-navigation ul ul { + background-color: #24890d; + float: left; + margin: 0; + position: absolute; + top: 48px; + left: -999em; + z-index: 99999; +} + +.ie8 .primary-navigation li li { + border: 0; + display: block; + height: auto; + line-height: 1.0909090909; +} + +.ie8 .primary-navigation ul ul ul { + left: -999em; + top: 0; +} + +.ie8 .primary-navigation ul ul a { + padding: 18px 12px; + white-space: normal; + width: 176px; +} + +.ie8 .primary-navigation li:hover > a, +.ie8 .primary-navigation li.focus > a { + background-color: #24890d; + color: #fff; +} + +.ie8 .primary-navigation ul ul a:hover, +.ie8 .primary-navigation ul ul li.focus > a { + background-color: #41a62a; +} + +.ie8 .primary-navigation ul li:hover > ul, +.ie8 .primary-navigation ul li.focus > ul { + left: auto; +} + +.ie8 .primary-navigation ul ul li:hover > ul, +.ie8 .primary-navigation ul ul li.focus > ul { + left: 100%; +} + +.ie8 .archive-header, +.ie8 .page-header { + margin: 0 auto 60px; + padding: 0 10px; +} + +.ie8 .site-content .has-post-thumbnail .entry-header { + margin-top: -48px; +} + +.ie8 .archive-header, +.ie8 .comments-area, +.ie8 .image-navigation, +.ie8 .page-header, +.ie8 .page-content, +.ie8 .post-navigation, +.ie8 .site-content .entry-header, +.ie8 .site-content .entry-content, +.ie8 .site-content .entry-summary, +.ie8 .site-content footer.entry-meta { + margin-right: 54px; + padding-right: 30px; + padding-left: 30px; +} + +.ie8 .list-view .site-content .hentry:first-child, +.ie8 .list-view .site-content .hentry.has-post-thumbnail { + border-top: 0; + padding-top: 0; +} + +.ie8 .comment-list .trackback, +.ie8 .comment-list .pingback, +.ie8 .comment-list article { + margin-bottom: 36px; + padding-top: 36px; +} + +.ie8 .comment-author .avatar { + height: 34px; + top: 2px; + width: 34px; +} + +.ie8 .comment-author, +.ie8 .comment-awaiting-moderation, +.ie8 .comment-content, +.ie8 .comment-list .reply, +.ie8 .comment-metadata { + padding-left: 50px; +} + +.ie8 .comment-list .children { + margin-left: 20px; +} + +.ie8 .full-width .site-content { + margin-right: 0; +} + +.ie8 .full-width .archive-header, +.ie8 .full-width .comments-area, +.ie8 .full-width .image-navigation, +.ie8 .full-width .page-header, +.ie8 .full-width .page-content, +.ie8 .full-width .post-navigation, +.ie8 .full-width .site-content .entry-header, +.ie8 .full-width .site-content .entry-content, +.ie8 .full-width .site-content .entry-summary, +.ie8 .full-width .site-content footer.entry-meta { + padding-right: 30px; + padding-left: 30px; + margin-right: auto; +} + +.ie8 .full-width.singular .hentry.has-post-thumbnail, +.ie8 .full-width.home .hentry.has-post-thumbnail { + margin-top: -72px; +} + + +.ie8 .singular .hentry.has-post-thumbnail { + margin-top: 0; +} + +.ie8 .error404 .page-header { + margin-bottom: 24px; +} + +.ie8 .contributor-avatar { + margin-left: -168px; +} + +.ie8 .contributor-summary { + float: left; +} + +.ie8 .site:before { + background-color: #000; + content: ""; + display: block; + height: 100%; + min-height: 100%; + position: absolute; + top: 0; + left: 0; + width: 17.61904761%; + z-index: 2; +} + +.ie8 #secondary { + border: 0; + clear: none; + color: #b3b3b3; + float: left; + margin: 0 0 0 -100%; + min-height: 100vh; + padding: 0 30px; + width: 12.85714285%; +} + +.ie8 .site-description { + display: block; + margin: -3px 0 21px; +} + +.ie8 .secondary-navigation { + font-size: 11px; + margin: 0 -30px 48px; + width: calc(100% + 60px); +} + +.ie8 .secondary-navigation li { + border-top: 1px solid #4d4d4d; + position: relative; +} + +.ie8 .secondary-navigation a { + padding: 10px 30px; +} + +.ie8 .secondary-navigation ul ul { + background-color: #24890d; + position: absolute; + top: 0; + left: -999em; + width: 222px; + z-index: 99999; +} + +.ie8 .secondary-navigation li li { + border-top: 0; +} + +.ie8 .secondary-navigation li:hover > a, +.ie8 .secondary-navigation li.focus > a { + background-color: #24890d; + color: #fff; +} + +.ie8 .secondary-navigation ul ul a:hover, +.ie8 .secondary-navigation ul ul li.focus > a { + background-color: #41a62a; +} + +.ie8 .secondary-navigation ul li:hover > ul, +.ie8 .secondary-navigation ul li.focus > ul { + left: 202px; +} + +.ie8 .content-sidebar { + border: 0; + float: right; + margin-left: -29.04761904%; + padding: 72px 30px 24px; + width: 29.04761904%; +} + +.ie8 #supplementary { + padding: 0; +} + +.ie8 .footer-sidebar { + font-size: 12px; + line-height: 1.5; +} + +.ie8 .footer-sidebar .widget, +.ie8 .primary-sidebar .widget { + font-size: 12px; + line-height: 1.5; +} + +.ie8 .footer-sidebar .widget { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; + padding: 0 30px; + width: 25%; +} + +.ie8 .footer-sidebar .widget h1, +.ie8 .primary-sidebar .widget h1 { + font-size: 20px; + line-height: 1.2; +} + +.ie8 .footer-sidebar .widget h2, +.ie8 .primary-sidebar .widget h2 { + font-size: 18px; + line-height: 1.3333333333; +} + +.ie8 .footer-sidebar .widget h3, +.ie8 .primary-sidebar .widget h3 { + font-size: 16px; + line-height: 1.5; +} + +.ie8 .footer-sidebar .widget h4, +.ie8 .primary-sidebar .widget h4 { + font-size: 14px; + line-height: 1.7142857142; +} + +.ie8 .footer-sidebar .widget h5, +.ie8 .primary-sidebar .widget h5 { + font-size: 12px; + line-height: 2; +} + +.ie8 .footer-sidebar .widget h6, +.ie8 .primary-sidebar .widget h6 { + font-size: 11px; + line-height: 2.1818181818; +} + +.ie8 .footer-sidebar .widget code, +.ie8 .footer-sidebar .widget kbd, +.ie8 .footer-sidebar .widget tt, +.ie8 .footer-sidebar .widget var, +.ie8 .footer-sidebar .widget samp, +.ie8 .footer-sidebar .widget pre, +.ie8 .primary-sidebar .widget code, +.ie8 .primary-sidebar .widget kbd, +.ie8 .primary-sidebar .widget tt, +.ie8 .primary-sidebar .widget var, +.ie8 .primary-sidebar .widget samp, +.ie8 .primary-sidebar .widget pre { + font-size: 11px; + line-height: 1.6363636363; +} + +.ie8 .footer-sidebar .widget blockquote, +.ie8 .primary-sidebar .widget blockquote { + font-size: 14px; + line-height: 1.2857142857; +} + +.ie8 .footer-sidebar .widget blockquote cite, +.ie8 .primary-sidebar .widget blockquote cite { + font-size: 12px; + line-height: 1.5; +} + +.ie8 .footer-sidebar .widget input, +.ie8 .footer-sidebar .widget textarea, +.ie8 .primary-sidebar .widget input, +.ie8 .primary-sidebar .widget textarea { + font-size: 12px; + padding: 3px 2px 4px 4px; +} + +.ie8 .footer-sidebar .widget input[type="button"], +.ie8 .footer-sidebar .widget input[type="reset"], +.ie8 .footer-sidebar .widget input[type="submit"], +.ie8 .primary-sidebar .widget input[type="button"], +.ie8 .primary-sidebar .widget input[type="reset"], +.ie8 .primary-sidebar .widget input[type="submit"] { + padding: 5px 15px 4px; +} + +.ie8 .footer-sidebar .widget .widget-title, +.ie8 .primary-sidebar .widget .widget-title { + font-size: 11px; + font-weight: 700; + line-height: 1.6363636363; + margin-bottom: 18px; +} + +.ie8 .footer-sidebar .widget_twentyfourteen_ephemera .entry-title, +.ie8 .footer-sidebar .widget_twentyfourteen_ephemera .entry-meta, +.ie8 .footer-sidebar .widget_twentyfourteen_ephemera .wp-caption-text, +.ie8 .footer-sidebar .widget_twentyfourteen_ephemera .post-format-archive-link, +.ie8 .footer-sidebar .widget_twentyfourteen_ephemera .entry-content table, +.ie8 .primary-sidebar .widget_twentyfourteen_ephemera .entry-title, +.ie8 .primary-sidebar .widget_twentyfourteen_ephemera .entry-meta, +.ie8 .primary-sidebar .widget_twentyfourteen_ephemera .wp-caption-text, +.ie8 .primary-sidebar .widget_twentyfourteen_ephemera .post-format-archive-link, +.ie8 .primary-sidebar .widget_twentyfourteen_ephemera .entry-content table { + font-size: 11px; + line-height: 1.6363636363; +} + +.ie8 .footer-sidebar .widget_archive li, +.ie8 .footer-sidebar .widget_categories li, +.ie8 .footer-sidebar .widget_links li, +.ie8 .footer-sidebar .widget_meta li, +.ie8 .footer-sidebar .widget_nav_menu li, +.ie8 .footer-sidebar .widget_pages li, +.ie8 .footer-sidebar .widget_recent_comments li, +.ie8 .footer-sidebar .widget_recent_entries li, +.ie8 .primary-sidebar .widget_archive li, +.ie8 .primary-sidebar .widget_categories li, +.ie8 .primary-sidebar .widget_links li, +.ie8 .primary-sidebar .widget_meta li, +.ie8 .primary-sidebar .widget_nav_menu li, +.ie8 .primary-sidebar .widget_pages li, +.ie8 .primary-sidebar .widget_recent_comments li, +.ie8 .primary-sidebar .widget_recent_entries li { + border-top: 0; + padding: 0 0 6px; +} + +.ie8 .footer-sidebar .widget_categories li ul, +.ie8 .footer-sidebar .widget_nav_menu li ul, +.ie8 .footer-sidebar .widget_pages li ul, +.ie8 .primary-sidebar .widget_categories li ul, +.ie8 .primary-sidebar .widget_nav_menu li ul, +.ie8 .primary-sidebar .widget_pages li ul { + border-top: 0; + margin-top: 0; +} + +.ie8 .grid .featured-content .entry-header { + border-color: #000; + border-style: solid; + border-width: 12px 10px; + height: 96px; + padding: 0; +} + +.ie8 .featured-content { + padding-left: 17.61904761%; +} + +.ie8 .grid .featured-content .hentry { + float: left; + width: 33.3333333%; +} + +.ie8 .grid .featured-content .hentry:nth-child( 3n+1 ) { + clear: both; +} + +.ie8 .grid .featured-content .entry-header { + height: 120px; +} + +.ie8 .slider .featured-content .entry-title { + font-size: 33px; + line-height: 1.0909090909; +} + +.ie8 .slider .featured-content .entry-header { + min-height: inherit; + padding: 24px 30px 48px; + position: absolute; + left: 0; + bottom: 0; + width: 50%; + z-index: 3; +} + +.ie8 .slider-control-paging { + background: transparent; + margin-top: -48px; + padding-left: 24px; + width: 50%; +} + +.ie8 .slider-control-paging li { + margin: 12px 12px 12px 0; +} + +.ie8 .slider-control-paging a { + height: 24px; + width: 24px; +} + +.ie8 .slider-control-paging a:before { + top: 6px; + left: 6px; +} + +.ie8 .slider-direction-nav { + clear: none; + float: right; + margin-top: -48px; + width: 98px; +} + +.ie8 .slider-direction-nav li:first-child { + padding: 0 1px 0 0; +} + +.ie8 .slider-direction-nav li { + border: 0; + padding: 0 0 0 1px; +} + +.ie8 .slider-direction-nav a { + height: 48px; +} + +.ie8 .slider-direction-nav a:before { + line-height: 48px; +} + + +/** + * Internet Explorer 7 + */ + +.ie7 audio, +.ie7 canvas, +.ie7 video { + display: inline; + zoom: 1; +} + +.ie7 button, +.ie7 input, +.ie7 select, +.ie7 textarea { + vertical-align: middle; +} + +.ie7 button, +.ie7 input[type="button"], +.ie7 input[type="reset"], +.ie7 input[type="submit"] { + overflow: visible; +} + +.ie7 .screen-reader-text { + clip: rect(1px 1px 1px 1px); +} + +.ie7 .site, +.ie7 .site-header { + max-width: 100%; +} + +.ie7 .search-toggle { + line-height: 45px; + margin-right: 190px; + padding: 0 20px; + text-transform: uppercase; + width: auto; +} + +.ie7 .search-toggle .screen-reader-text { + color: #fff; + position: relative; /* Override inherited `absolute` value set in style.css. */ +} + +.ie7 .search-box { + height: 24px; + padding: 12px 0; +} + +.ie7 .search-box .search-field { + margin: 0 10px; + width: 33%; +} + +.ie7 .site-navigation li { + border-top: 1px solid #4d4d4d; +} + +.ie7 .primary-navigation .nav-menu, +.ie7 .secondary-navigation { + border-bottom: 1px solid #4d4d4d; +} + +.ie7 .secondary-navigation { + margin: 48px auto; + max-width: 474px +} + +.ie7 .content-area { + padding-top: 48px; +} + +.ie7 .hentry { + max-width: 100%; +} + +.ie7 .menu-toggle { + color: #fff; + font-weight: 400; + font-size: 16px; + line-height: 45px; + text-transform: uppercase; + width: 200px; +} + +.ie7 .post-thumbnail img { + display: block; + margin: 0 auto; +} + +.ie7 .entry-meta .tag-links a { + margin-left: 0; +} + +.ie7 .content-sidebar { + padding: 48px 10px; +} + +.ie7 .singular .hentry.has-post-thumbnail { + margin-top: -48px; +} + +.ie7 .entry-meta > span, +.ie7 .widget_twentyfourteen_ephemera .entry-title { + margin-right: 20px; +} + +.ie7 #secondary { + border-bottom: 1px solid #4d4d4d; +} + +.ie7 .content-sidebar { + border-top: 1px solid #e5e5e5; + border-bottom: 1px solid #e5e5e5; +} + +.ie7 .widget { + margin: 0 auto 48px; + max-width: 474px; +} + +.ie7 .content-sidebar .widget_twentyfourteen_ephemera .widget-title { + padding-top: 7px; +} + +.ie7 .slider .featured-content .hentry { + display: block; +} + +.ie7 .featured-content .entry-header { + min-height: 0; +} + +.ie7 .slider-control-paging a { + line-height: 40px; + text-indent: 0; +} + +.ie7 .slider-control-paging .slider-active { + color: #41a62a; +} + +.ie7 .slider-direction-nav { + border-top: 2px solid #fff; +} + +.ie7 .slider-direction-nav li { + border: 0; + width: 49%; +} + +.ie7 .slider-direction-nav a { + font-size: 16px; + line-height: 45px; + text-transform: uppercase; +} + +.ie7 .slider-direction-nav a:hover { + background-color: #000; + color: #41a62a; +} + +.ie7 .search-toggle { + line-height: 45px; + margin-right: 190px; +} + +.ie7 .featured-content .post-thumbnail, +.ie7 .slider .featured-content .post-thumbnail { + padding-top: 0; +} + +.ie7 .featured-content .post-thumbnail img { + position: relative; +} + +.ie7 .featured-content .entry-header { + width: auto; +} + +.ie7 .grid .featured-content .hentry { + float: left; + margin: 0 auto; + max-width: 672px; + width: 33.333333%; +} + +.ie7 .slider .featured-content .entry-header { + margin: 0 auto; + max-width: 1038px; +} + +.ie7 .slider-control-paging { + float: none; + margin: -24px auto 0; + max-width: 1038px; + width: auto; +} + + +/** + * RTL for Internet Explorer 8 & 7 + */ + +.rtl .attachment a, +.rtl .gallery a, +.rtl .wp-caption a, +.rtl .widget_twentyfourteen_ephemera .entry-content a { + display: inline; +} + + +/** + * RTL overrides for Internet Explorer 8 + */ + +.ie8 .rtl .site-content .entry-meta > span { + margin-right: auto; + margin-left: 10px; +} + +.ie8 .rtl .site-content .format-quote .post-format a:before { + margin-right: auto; + margin-left: 2px; +} + +.ie8 .rtl .site-content .format-gallery .post-format a:before { + margin-right: auto; + margin-left: 4px; +} + +.ie8 .rtl .site-content .format-aside .post-format a:before { + margin-right: auto; + margin-left: 2px; +} + +.ie8 .rtl .site-content .featured-post:before { + margin-right: auto; + margin-left: 3px; +} + +.ie8 .rtl .site-content .entry-date a:before, +.ie8 .rtl .attachment .site-content span.entry-date:before { + margin-right: auto; + margin-left: 1px; +} + +.ie8 .rtl .site-content .comments-link a:before { + margin-right: auto; + margin-left: 2px; +} + +.ie8 .rtl .site-content .full-size-link a:before { + margin-right: auto; + margin-left: 1px; +} + +.ie8 .rtl .main-content { + float: right; +} + +.ie8 .rtl .content-area { + float: right; +} + +.ie8 .rtl .site-content { + margin-right: 17.61904761%; + margin-left: 29.04761904%; +} + +.ie8 .rtl .search-box-wrapper, +.ie8 .rtl .featured-content { + padding-right: 17.61904761%; + padding-left: 0; +} + +.ie8 .rtl .header-main { + padding: 0 30px 0 0; +} + +.ie8 .rtl .search-toggle { + margin-right: auto; + margin-left: 0; +} + +.ie8 .rtl .primary-navigation { + float: left; + margin: 0 -10px 0 1px; +} + +.ie8 .rtl .primary-navigation ul ul { + float: right; + right: -999em; + left: auto; +} + +.ie8 .rtl .primary-navigation ul ul ul { + right: -999em; + left: auto; +} + +.ie8 .rtl .primary-navigation ul li:hover > ul, +.ie8 .rtl .primary-navigation ul li.focus > ul { + right: auto; + left: auto; +} + +.ie8 .rtl .primary-navigation ul ul li:hover > ul, +.ie8 .rtl .primary-navigation ul ul li.focus > ul { + right: 100%; + left: auto; +} + +.ie8 .rtl .entry-meta .tag-links a:before { + right: -8px; +} + +.ie8 .rtl .archive-header, +.ie8 .rtl .comments-area, +.ie8 .rtl .image-navigation, +.ie8 .rtl .page-header, +.ie8 .rtl .page-content, +.ie8 .rtl .post-navigation, +.ie8 .rtl .site-content .entry-header, +.ie8 .rtl .site-content .entry-content, +.ie8 .rtl .site-content .entry-summary, +.ie8 .rtl .site-content footer.entry-meta { + margin-right: auto; + margin-left: 54px; +} + +.ie8 .rtl .comment-author, +.ie8 .rtl .comment-awaiting-moderation, +.ie8 .rtl .comment-content, +.ie8 .rtl .comment-list .reply, +.ie8 .rtl .comment-metadata { + padding-right: 50px; + padding-left: 0; +} + +.ie8 .rtl .comment-list .children { + margin-right: 20px; + margin-left: auto; +} + + +.ie8 .rtl.full-width .site-content { + margin-left: 0; +} + +.ie8 .rtl.full-width .archive-header, +.ie8 .rtl.full-width .comments-area, +.ie8 .rtl.full-width .image-navigation, +.ie8 .rtl.full-width .page-header, +.ie8 .rtl.full-width .page-content, +.ie8 .rtl.full-width .post-navigation, +.ie8 .rtl.full-width .site-content .entry-header, +.ie8 .rtl.full-width .site-content .entry-content, +.ie8 .rtl.full-width .site-content .entry-summary, +.ie8 .rtl.full-width .site-content footer.entry-meta { + margin-left: auto; +} + +.ie8 .rtl .contributor-avatar { + margin-right: -168px; + margin-left: auto; +} + +.ie8 .rtl .contributor-summary { + float: right; +} + +.ie8 .rtl .site:before { + right: 0; + left: auto; +} + +.ie8 .rtl #secondary { + float: right; + margin: 0 -100% 0 0; +} + +.ie8 .rtl .secondary-navigation ul ul { + right: -999em; + left: auto; +} + +.ie8 .rtl .secondary-navigation ul li:hover > ul, +.ie8 .rtl .secondary-navigation ul li.focus > ul { + right: 202px; + left: auto; +} + +.ie8 .rtl .content-sidebar { + float: left; + margin-right: -29.04761904%; + margin-left: auto; +} + +.ie8 .rtl .footer-sidebar .widget { + float: right; +} + +.ie8 .rtl .featured-content { + padding-right: 17.61904761%; + padding-left: 0; +} + +.ie8 .rtl.grid .featured-content .hentry { + float: right; +} + +.ie8 .rtl.slider .featured-content .entry-header { + right: 0; + left: auto; +} + +.ie8 .rtl .slider-control-paging { + padding-right: 24px; + padding-left: 0; +} + +.ie8 .rtl .slider-control-paging li { + margin: 12px 0 12px 12px; +} + +.ie8 .rtl .slider-control-paging a:before { + right: 6px; + left: auto; +} + +.ie8 .rtl .slider-direction-nav { + float: left; +} + +.ie8 .rtl .slider-direction-nav li { + padding: 0 1px 0 0; +} + +.ie8 .rtl .slider-direction-nav li:first-child { + padding: 0 0 0 1px; +} + + +/** + * RTL overrides for Internet Explorer 7 + */ + +.ie7 .rtl.grid .featured-content .hentry { + float: right; +} + +.ie7 .rtl .slider-control-paging { + float: none; + margin: -24px auto 0; +} + +.ie7 .rtl .entry-meta .tag-links a { + margin-right: 0; + margin-left: auto; +} + +.ie7 .rtl .search-toggle { + margin-right: auto; + margin-left: 190px; +} \ No newline at end of file diff --git a/wp-content/themes/twentyfourteen/featured-content.php b/wp-content/themes/twentyfourteen/featured-content.php new file mode 100644 index 0000000..1a623ac --- /dev/null +++ b/wp-content/themes/twentyfourteen/featured-content.php @@ -0,0 +1,39 @@ + + + diff --git a/wp-content/themes/twentyfourteen/footer.php b/wp-content/themes/twentyfourteen/footer.php new file mode 100644 index 0000000..b297a2e --- /dev/null +++ b/wp-content/themes/twentyfourteen/footer.php @@ -0,0 +1,28 @@ + + +
          + +
          + + + +
          + + +
          +
          + + + + + \ No newline at end of file diff --git a/wp-content/themes/twentyfourteen/functions.php b/wp-content/themes/twentyfourteen/functions.php new file mode 100644 index 0000000..d78b44b --- /dev/null +++ b/wp-content/themes/twentyfourteen/functions.php @@ -0,0 +1,512 @@ + for posts and comments. + add_theme_support( 'automatic-feed-links' ); + + // Enable support for Post Thumbnails, and declare two sizes. + add_theme_support( 'post-thumbnails' ); + set_post_thumbnail_size( 672, 372, true ); + add_image_size( 'twentyfourteen-full-width', 1038, 576, true ); + + // This theme uses wp_nav_menu() in two locations. + register_nav_menus( array( + 'primary' => __( 'Top primary menu', 'twentyfourteen' ), + 'secondary' => __( 'Secondary menu in left sidebar', 'twentyfourteen' ), + ) ); + + /* + * Switch default core markup for search form, comment form, and comments + * to output valid HTML5. + */ + add_theme_support( 'html5', array( + 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' + ) ); + + /* + * Enable support for Post Formats. + * See http://codex.wordpress.org/Post_Formats + */ + add_theme_support( 'post-formats', array( + 'aside', 'image', 'video', 'audio', 'quote', 'link', 'gallery', + ) ); + + // This theme allows users to set a custom background. + add_theme_support( 'custom-background', apply_filters( 'twentyfourteen_custom_background_args', array( + 'default-color' => 'f5f5f5', + ) ) ); + + // Add support for featured content. + add_theme_support( 'featured-content', array( + 'featured_content_filter' => 'twentyfourteen_get_featured_posts', + 'max_posts' => 6, + ) ); + + // This theme uses its own gallery styles. + add_filter( 'use_default_gallery_style', '__return_false' ); +} +endif; // twentyfourteen_setup +add_action( 'after_setup_theme', 'twentyfourteen_setup' ); + +/** + * Adjust content_width value for image attachment template. + * + * @since Twenty Fourteen 1.0 + */ +function twentyfourteen_content_width() { + if ( is_attachment() && wp_attachment_is_image() ) { + $GLOBALS['content_width'] = 810; + } +} +add_action( 'template_redirect', 'twentyfourteen_content_width' ); + +/** + * Getter function for Featured Content Plugin. + * + * @since Twenty Fourteen 1.0 + * + * @return array An array of WP_Post objects. + */ +function twentyfourteen_get_featured_posts() { + /** + * Filter the featured posts to return in Twenty Fourteen. + * + * @since Twenty Fourteen 1.0 + * + * @param array|bool $posts Array of featured posts, otherwise false. + */ + return apply_filters( 'twentyfourteen_get_featured_posts', array() ); +} + +/** + * A helper conditional function that returns a boolean value. + * + * @since Twenty Fourteen 1.0 + * + * @return bool Whether there are featured posts. + */ +function twentyfourteen_has_featured_posts() { + return ! is_paged() && (bool) twentyfourteen_get_featured_posts(); +} + +/** + * Register three Twenty Fourteen widget areas. + * + * @since Twenty Fourteen 1.0 + */ +function twentyfourteen_widgets_init() { + require get_template_directory() . '/inc/widgets.php'; + register_widget( 'Twenty_Fourteen_Ephemera_Widget' ); + + register_sidebar( array( + 'name' => __( 'Primary Sidebar', 'twentyfourteen' ), + 'id' => 'sidebar-1', + 'description' => __( 'Main sidebar that appears on the left.', 'twentyfourteen' ), + 'before_widget' => '', + 'before_title' => '

          ', + 'after_title' => '

          ', + ) ); + register_sidebar( array( + 'name' => __( 'Content Sidebar', 'twentyfourteen' ), + 'id' => 'sidebar-2', + 'description' => __( 'Additional sidebar that appears on the right.', 'twentyfourteen' ), + 'before_widget' => '', + 'before_title' => '

          ', + 'after_title' => '

          ', + ) ); + register_sidebar( array( + 'name' => __( 'Footer Widget Area', 'twentyfourteen' ), + 'id' => 'sidebar-3', + 'description' => __( 'Appears in the footer section of the site.', 'twentyfourteen' ), + 'before_widget' => '', + 'before_title' => '

          ', + 'after_title' => '

          ', + ) ); +} +add_action( 'widgets_init', 'twentyfourteen_widgets_init' ); + +/** + * Register Lato Google font for Twenty Fourteen. + * + * @since Twenty Fourteen 1.0 + * + * @return string + */ +function twentyfourteen_font_url() { + $font_url = ''; + /* + * Translators: If there are characters in your language that are not supported + * by Lato, translate this to 'off'. Do not translate into your own language. + */ + if ( 'off' !== _x( 'on', 'Lato font: on or off', 'twentyfourteen' ) ) { + $font_url = add_query_arg( 'family', urlencode( 'Lato:300,400,700,900,300italic,400italic,700italic' ), "//fonts.googleapis.com/css" ); + } + + return $font_url; +} + +/** + * Enqueue scripts and styles for the front end. + * + * @since Twenty Fourteen 1.0 + */ +function twentyfourteen_scripts() { + // Add Lato font, used in the main stylesheet. + wp_enqueue_style( 'twentyfourteen-lato', twentyfourteen_font_url(), array(), null ); + + // Add Genericons font, used in the main stylesheet. + wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.0.2' ); + + // Load our main stylesheet. + wp_enqueue_style( 'twentyfourteen-style', get_stylesheet_uri(), array( 'genericons' ) ); + + // Load the Internet Explorer specific stylesheet. + wp_enqueue_style( 'twentyfourteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentyfourteen-style', 'genericons' ), '20131205' ); + wp_style_add_data( 'twentyfourteen-ie', 'conditional', 'lt IE 9' ); + + if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { + wp_enqueue_script( 'comment-reply' ); + } + + if ( is_singular() && wp_attachment_is_image() ) { + wp_enqueue_script( 'twentyfourteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20130402' ); + } + + if ( is_active_sidebar( 'sidebar-3' ) ) { + wp_enqueue_script( 'jquery-masonry' ); + } + + if ( is_front_page() && 'slider' == get_theme_mod( 'featured_content_layout' ) ) { + wp_enqueue_script( 'twentyfourteen-slider', get_template_directory_uri() . '/js/slider.js', array( 'jquery' ), '20131205', true ); + wp_localize_script( 'twentyfourteen-slider', 'featuredSliderDefaults', array( + 'prevText' => __( 'Previous', 'twentyfourteen' ), + 'nextText' => __( 'Next', 'twentyfourteen' ) + ) ); + } + + wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20140319', true ); +} +add_action( 'wp_enqueue_scripts', 'twentyfourteen_scripts' ); + +/** + * Enqueue Google fonts style to admin screen for custom header display. + * + * @since Twenty Fourteen 1.0 + */ +function twentyfourteen_admin_fonts() { + wp_enqueue_style( 'twentyfourteen-lato', twentyfourteen_font_url(), array(), null ); +} +add_action( 'admin_print_scripts-appearance_page_custom-header', 'twentyfourteen_admin_fonts' ); + +if ( ! function_exists( 'twentyfourteen_the_attached_image' ) ) : +/** + * Print the attached image with a link to the next attached image. + * + * @since Twenty Fourteen 1.0 + */ +function twentyfourteen_the_attached_image() { + $post = get_post(); + /** + * Filter the default Twenty Fourteen attachment size. + * + * @since Twenty Fourteen 1.0 + * + * @param array $dimensions { + * An array of height and width dimensions. + * + * @type int $height Height of the image in pixels. Default 810. + * @type int $width Width of the image in pixels. Default 810. + * } + */ + $attachment_size = apply_filters( 'twentyfourteen_attachment_size', array( 810, 810 ) ); + $next_attachment_url = wp_get_attachment_url(); + + /* + * Grab the IDs of all the image attachments in a gallery so we can get the URL + * of the next adjacent image in a gallery, or the first image (if we're + * looking at the last image in a gallery), or, in a gallery of one, just the + * link to that image file. + */ + $attachment_ids = get_posts( array( + 'post_parent' => $post->post_parent, + 'fields' => 'ids', + 'numberposts' => -1, + 'post_status' => 'inherit', + 'post_type' => 'attachment', + 'post_mime_type' => 'image', + 'order' => 'ASC', + 'orderby' => 'menu_order ID', + ) ); + + // If there is more than 1 attachment in a gallery... + if ( count( $attachment_ids ) > 1 ) { + foreach ( $attachment_ids as $attachment_id ) { + if ( $attachment_id == $post->ID ) { + $next_id = current( $attachment_ids ); + break; + } + } + + // get the URL of the next image attachment... + if ( $next_id ) { + $next_attachment_url = get_attachment_link( $next_id ); + } + + // or get the URL of the first image attachment. + else { + $next_attachment_url = get_attachment_link( array_shift( $attachment_ids ) ); + } + } + + printf( '%2$s', + esc_url( $next_attachment_url ), + wp_get_attachment_image( $post->ID, $attachment_size ) + ); +} +endif; + +if ( ! function_exists( 'twentyfourteen_list_authors' ) ) : +/** + * Print a list of all site contributors who published at least one post. + * + * @since Twenty Fourteen 1.0 + */ +function twentyfourteen_list_authors() { + $contributor_ids = get_users( array( + 'fields' => 'ID', + 'orderby' => 'post_count', + 'order' => 'DESC', + 'who' => 'authors', + ) ); + + foreach ( $contributor_ids as $contributor_id ) : + $post_count = count_user_posts( $contributor_id ); + + // Move on if user has not published a post (yet). + if ( ! $post_count ) { + continue; + } + ?> + +
          +
          +
          +
          +

          +

          + +

          + + + +
          +
          +
          + + = 2 || $page >= 2 ) { + $title = "$title $sep " . sprintf( __( 'Page %s', 'twentyfourteen' ), max( $paged, $page ) ); + } + + return $title; +} +add_filter( 'wp_title', 'twentyfourteen_wp_title', 10, 2 ); + +// Implement Custom Header features. +require get_template_directory() . '/inc/custom-header.php'; + +// Custom template tags for this theme. +require get_template_directory() . '/inc/template-tags.php'; + +// Add Theme Customizer functionality. +require get_template_directory() . '/inc/customizer.php'; + +/* + * Add Featured Content functionality. + * + * To overwrite in a plugin, define your own Featured_Content class on or + * before the 'setup_theme' hook. + */ +if ( ! class_exists( 'Featured_Content' ) && 'plugins.php' !== $GLOBALS['pagenow'] ) { + require get_template_directory() . '/inc/featured-content.php'; +} diff --git a/wp-content/themes/twentyfourteen/genericons/COPYING.txt b/wp-content/themes/twentyfourteen/genericons/COPYING.txt new file mode 100644 index 0000000..aece214 --- /dev/null +++ b/wp-content/themes/twentyfourteen/genericons/COPYING.txt @@ -0,0 +1,9 @@ +Genericons 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. + +The fonts are distributed 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. + +As a special exception, if you create a document which uses this font, and embed this font or unaltered portions of this font into the document, this font does not by itself cause the resulting document to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the document might be covered by the GNU General Public License. If you modify this font, you may extend this exception to your version of the font, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. + +This license does not convey any intellectual property rights to third party trademarks that may be included in the icon font; such marks remain subject to all rights and guidelines of use of their owner. \ No newline at end of file diff --git a/wp-content/themes/twentyfourteen/genericons/Genericons-Regular.otf b/wp-content/themes/twentyfourteen/genericons/Genericons-Regular.otf new file mode 100644 index 0000000..e21c349 Binary files /dev/null and b/wp-content/themes/twentyfourteen/genericons/Genericons-Regular.otf differ diff --git a/wp-content/themes/twentyfourteen/genericons/LICENSE.txt b/wp-content/themes/twentyfourteen/genericons/LICENSE.txt new file mode 100644 index 0000000..d159169 --- /dev/null +++ b/wp-content/themes/twentyfourteen/genericons/LICENSE.txt @@ -0,0 +1,339 @@ + 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 + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +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 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 +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +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 + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +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 +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +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 + + 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 +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +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 + + 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. diff --git a/wp-content/themes/twentyfourteen/genericons/README.txt b/wp-content/themes/twentyfourteen/genericons/README.txt new file mode 100644 index 0000000..e6ebd7d --- /dev/null +++ b/wp-content/themes/twentyfourteen/genericons/README.txt @@ -0,0 +1,115 @@ + ___ ____ __ _ ____ ____ __ ___ __ __ _ ____ + / __)( __)( ( \( __)( _ \( )/ __)/ \ ( ( \/ ___) +( (_ \ ) _) / / ) _) ) / )(( (__( O )/ /\___ \ + \___/(____)\_)__)(____)(__\_)(__)\___)\__/ \_)__)(____/ + + +Genericons are vector icons embedded in a webfont designed to be clean and simple keeping with a generic aesthetic. + +Use genericons for instant HiDPI, to change icon colors on the fly, or even with CSS effects such as drop-shadows or gradients! + + +_ _ ____ ____ ____ ____ +| | [__ |__| | __ |___ +|__| ___] | | |__] |___ + + +To use it, place the font folder in your stylesheet directory and paste this in your CSS file: + +/* =Genericons, thanks to FontSquirrel.com for conversion! +-------------------------------------------------------------- */ +@font-face { + font-family: 'Genericons'; + src: url('font/genericons-regular-webfont.eot'); + src: url('font/genericons-regular-webfont.eot?#iefix') format('embedded-opentype'), + url('font/genericons-regular-webfont.woff') format('woff'), + url('font/genericons-regular-webfont.ttf') format('truetype'), + url('font/genericons-regular-webfont.svg#genericonsregular') format('svg'); + font-weight: normal; + font-style: normal; + +} + +Note: the above only works if you don't use a CDN. If you do, or don't know what that is, you should use the syntax that's embedded in genericons.css. + +From then on, you can create an icon like this: + +.my-icon:before { + content: '\f101'; + display: inline-block; + -webkit-font-smoothing: antialiased; + font: normal 16px/1 'Genericons'; + vertical-align: top; +} + +This will output a comment icon before every element with the class "my-icon". The "content: '\f101';" part of this CSS is easily copied from the helper tool at http://genericons.com/ + +You can also use the bundled example.css if you'd rather insert the icons using HTML tags. + + +_ _ ____ ___ ____ ____ +|\ | | | | |___ [__ +| \| |__| | |___ ___] + + +Photoshop mockups: + +Genericons-Regular.otf found in the root directory of this zip has not been web-font-ified. So you can drop it in your system fonts folder and use the font in Photoshop if you like. + +For those of you using Genericons in your Photoshop mockup, remember to delete the old version of the font from Font Book, and grab the new one from the zip file. This also affects using it in your webdesigns: if you have an old version of the font installed locally, that's the font that'll be used in your website as well, so if you're missing icons, check for old versions of the font on your system. + +Pixel grid: + +Note that Genericons has been designed for a 16x16 pixel grid. That means it'll look sharp at font-size: 16px exactly. It'll also be crisp at multiples thereof, such as 32px or 64px. It'll also look reasonably crisp at in-between font sizes such as 24px or 48px, but not quite as crisp as 16 or 32. Please don't set the font-size to 17px, though, that'll just look terrible. + +Also note the CSS property "-webkit-font-smoothing: antialiased". That makes the icons look great in WebKit browsers. Please see http://noscope.com/2012/font-smoothing for more info. + +Updates: + +We don't often update icons, but do very carefully when we get good feedback suggesting improvements. Please be mindful if you upgrade, and check that the updated icons behave as you intended. + + + +____ _ _ ____ _ _ ____ ____ _ ____ ____ +| |__| |__| |\ | | __ |___ | | | | __ +|___ | | | | | \| |__] |___ |___ |__| |__] + +V3.0.2: +A slew of new stuff and updates. +- Social icons: Skype, Digg, Reddit, Stumbleupon, Pocket. +- New generic icons: heart, lock and print. +- New editing icons: code, bold, italic, image +- New interaction icons: subscribe, unsubscribe, subscribed, reply all, reply, flag. +- The hyperlink icon has been updated to be clearer, chunkier. +- The "home" icon has been updated for style, size and clarity. +- The email icon has been updated for style and clarity, and to fit with the new subscribe icons. +- The document icon has been updated for style. +- The "pin" icon has been updated for style and clarity. +- The Twitter icon has been scaled down to fit with the other social icons. + +V3.0.1: +Mostly maintenance. +- Fixed an issue with the example page that showed an old "top" icon instead of the actual NEW "refresh" icon. +- Added inverse Google+ and Path. +- Replaced tabs with spaces in the helper CSS. +- Changed the Genericons.com copy/paste tool to serve span's instead of div's for casual icon insertion. It's being converted to "inline-block" anyway. + +V3.0: +Mainly maintenance and a few new icons. +- Fast forward, rewind, PollDaddy, Notice, Info, Help, Portfolio +- Updated the feed icon. It's a bit smaller now for consistency, the previous one was rather big. +- So, the previous version numbering, 2.09, wasn't very PHP version compare friendly. So from now on it'll be 3.0, 3.1 etc. Props Ipstenu. +- Genericons.com now has a mini release blog. +- The CSS has prettier formatting, props Konstantin Obenland. + +V2.09: +Updated Facebook icon to new version. Updated Instagram logo to use new one-color version. Updated Google+ icon to use same radius as Instagram and Facebook. Added a bunch of new icons, cog, unapprove, cart, media player buttons, tablet, send to tablet. + +V2.06: +Included Base64 encoded version. This is necessary for Genericons to work with CDNs in Firefox. Firefox blocks fonts linked from a different domain. A CDN (typically s.example.com) usually puts the font on a subdomain, and is hence blocked in Firefox. + +V2.05: +Added a bunch of new icons, including upload to cloud, download to cloud, many more. + +V2: +Initial public release \ No newline at end of file diff --git a/wp-content/themes/twentyfourteen/genericons/example.html b/wp-content/themes/twentyfourteen/genericons/example.html new file mode 100644 index 0000000..f33b30a --- /dev/null +++ b/wp-content/themes/twentyfourteen/genericons/example.html @@ -0,0 +1,462 @@ + + + +Genericons + + + + + +
          + +

          Genericons Usage

          + +

          Copy the font folder and the genericons.css file together into your project. Link the CSS in your HTML:

          + +

          <link href="path/to/genericons.css" rel="stylesheet">

          + +

          Drop in the following HTML with the name of the icon you want to display:

          + +

          <div class="genericon genericon-standard"></div>

          + +
          + + +
          +
          +
          + +
          +
          +
          + +
          +
          + + +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          + + +
          +
          +
          +
          +
          +
          +
          +
          +
          + + + +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          + + +
          +
          +
          +
          + +
          + +

          If you want to insert an icon manually using the :before selector, you can setup CSS rules like the following example. Make sure to set the size to a multiple of 16px or the icons could end up looking fuzzy:

          + +

          + +

          Add a matching class to your HTML:

          + +

          <div class="my-icon">You're a Star!</div>

          + +

          Here's the result: You're a Star!

          + +

          Examples

          + +

          Turn every icon a Salmon color:

          + +

          + +

          Or turn the stars Gold:

          + +

          + +

          Use icons for bulleted lists:

          + +
            +
          • One
          • +
          • Two
          • +
          • Three
          • +
          • Four
          • +
          + +

          + +

          + +

          Use icons to style blockquotes:

          + +
          Sometimes I've believed as many as six impossible things before breakfast. —Lewis Carroll
          +
          `Twas brillig, and the slithy toves Did gyre and gimble in the wabe: All mimsy were the borogoves, And the mome raths outgrabe. "Beware the Jabberwock, my son! The jaws that bite, the claws that catch! Beware the Jubjub bird, and shun The frumious Bandersnatch!"
          + +

          + +

          + +

          Use icons to style buttons:

          + + View + Listen + +

          + +

          /

          + +

          CSS Preprocessors

          + +

          Preprocessing extensions such as Sass (SCSS Syntax) or LESS can make it easier to manage CSS for a lot of things at once using things like variables and mixins.

          + +

          This example will seup the basic genericon rules and sets a color you can use for all icons using Sass:

          + +

          + +

          Here is a similar example for LESS:

          + +

          + +

          Fallback images for IE7 and below

          + +

          Genericons does not come with fallback icons by default -- therefore you have to create them yourself. If you are using HTML similar to this example: + +

          <span class="genericon genericon-warning"></span>

          + +

          You can use the asterisk hack to serve a different icon to IE7 once you have saved the fallback icons to your project:

          + + + +
          + + + diff --git a/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.eot b/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.eot new file mode 100644 index 0000000..6e71567 Binary files /dev/null and b/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.eot differ diff --git a/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.svg b/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.svg new file mode 100644 index 0000000..d9f0c82 --- /dev/null +++ b/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.svg @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.ttf b/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.ttf new file mode 100644 index 0000000..7be71af Binary files /dev/null and b/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.ttf differ diff --git a/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.woff b/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.woff new file mode 100644 index 0000000..4d72659 Binary files /dev/null and b/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.woff differ diff --git a/wp-content/themes/twentyfourteen/genericons/genericons.css b/wp-content/themes/twentyfourteen/genericons/genericons.css new file mode 100644 index 0000000..5a36281 --- /dev/null +++ b/wp-content/themes/twentyfourteen/genericons/genericons.css @@ -0,0 +1,194 @@ +/** + + Genericons Helper CSS + +*/ + + +/** + * The font was graciously generated by Font Squirrel (http://www.fontsquirrel.com). We love those guys. + */ + +@font-face { + font-family: 'Genericons'; + src: url('font/genericons-regular-webfont.eot'); +} + +@font-face { + font-family: 'Genericons'; + src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAACs4AA4AAAAARowAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABRAAAABwAAAAcaW/Oz0dERUYAAAFgAAAAHQAAACAAqwAET1MvMgAAAYAAAABCAAAAYFFfaIVjbWFwAAABxAAAAJcAAAGyqWOQYWdhc3AAAAJcAAAACAAAAAgAAAAQZ2x5ZgAAAmQAACOsAAA47IE+VnJoZWFkAAAmEAAAACsAAAA2BFJrzGhoZWEAACY8AAAAHAAAACQQAwfdaG10eAAAJlgAAACGAAABBlHsRCBsb2NhAAAm4AAAAP4AAAD+AbXzmG1heHAAACfgAAAAHgAAACAA0ADAbmFtZQAAKAAAAAFhAAAC2ELRXhRwb3N0AAApZAAAAcwAAAT2hTWbEXdlYmYAACswAAAABgAAAAZeqFJzAAAAAQAAAADMPaLPAAAAAM6ZHNoAAAAAzpkPJXjaY2BkYGDgA2IJBhBgYmAEwlogZgHzGAAJqQCwAAAAeNpjYGb/zDiBgZWBhdWY5QwDA8NMCM10hsEIzAdKYQeh3uF+DA4PGL4ys6X9S2Ng4GBg0AAKMyIpUWBgBACHZguVAAB42mNgYGBmgGAZBkYGEFgD5DGC+SwME4C0AhCyMDA8YPjI+Ynzk+Qnlc8cXzi/SH7R/GL5xfNL5JfML8Vfmf//B6tg+MTwSeCTwmeGLwxfBL4ofDH44vAl4EvCl4KvDP//KzDzs/Dx8XHwMfGq8xjwaPGo8MjxSPAI8fDwsHFXQW3HCxjZGODKGJmABBO6AoZhDwAl3ijmAAABAAH//wAPeNqNWwlglNW1vudfE8g2mS0LSWYymZlAkgmZycwkLGEAMZAAgoGwBBFUoAQEwqIgLn9VKoJA6xKtoKBVodiqbUVr0z5T6wJ15RF91u0ZfBVFfc+2tkWYubxz7j8TEsAlk3+/89/tnO9859wzTGX4B19Jv2cy01g6y2DZjNVY3BbZ6rY6LeAeDBYrfHVyP//Fwf18O8zYf3C/9PvEBbCVneY9p4En3mSnoZJL7DQD1u+vhjFNYhK+VDXw3TobjG+2MifWZneHwR12h9x2d+qo4qaxOJOMhCEZBuDbuHijQXe4IbMEvsfAM8M4zXBnYBUSYAEdP/huK167lNwcSXGVSTm5LBip9ZVqNrkaHoSFr73Gd/P5fPdrr8HBns7Onk6dnbmzkErEX+ukB4wpzABDNzRDtNjOirC9OBpeHA2vGnZDkOUwTynucl2OHM3ly9GNr7GXBv7HDWqwxH4HGj/5u2f416DXwqCuLv6vLtWIM9ns1oLYnlPdoMNq0PnXfDv/WmZUogsGUd0SS+s/XszqtripfqAjboaM1ei4xRngYEhir+IGeE82OKMzjoMD9EijfkiMpYNFM04ZCksYNN8gYSHVwHHLxAubpltUSwDCtRGXQzV2dJxmHTt6oaFXNa59vjzxiSHdU/78tbt7e3G8cTb0VPsYYIvSwW2lWcbpwjfSHg8JRtMlCzGQqB2irnwWojly2C1YYzgSttAE4YXTjnVbaq3hYqBHLh9eRKJ2euQIUjEZx6arvTW2as+qWGt7d2s7jZd5rbOuTdxYuNt7d/1MMKatWjWNGzPr7/buXgjGJn4rnXBjU1fXJkgW4qIQGDNF23Dr1qltucxD/QmKxnlwxD2lohlgMW9VAM5A1B2MAE7Sgj17FvAYjxl4on5IVwZeduOY7ntbZ/gMH/AYdO9ZAHiWwPtn7hlvY50ypOZGRbl1ifnByfVGcQRsWaD7G6DWp0eLZTuOlD9SK4k55YbS3jb78kDLiLbGiy6KtxUMLcoZGW5rVvFlp3CTWHvbnOM3znpk28i2xq43ula0FY6eMNk/9bZIW3OP0M3aNJQutgR7GlRYrj2HqZoPZz1c629QaCf5/AHIknSfX9MDcjZoTs1uK5admp4FAfAHFP8wyAKHs1hxFuuRqM2B7fOXMUttLitT2GHYCLkP8g385bJSmDBlg9EaXaoNSsu2KpmhUZdHr9qy5aroZQ3VgwaNGL402mpsmBzOGDJm9iyXlF5UGilSMvLTLQVyelFBaSbImbklZZHRFwegtIy/zDc8CFbYmMYe5P/LNx3mv0p8tkQvyVeen37jyPSSie2PrX6gI7t84qU1ICm5NV63JLm9NRZNkm6/bs3u1Y+1T3SlVc/NzIK6qJLpKcyT9MEFudi3kjq3nFaQX5LvGCQPCq5X8lzaEskBF70B12I/SD502okxy0Yc8LIga2CNbJpAGoZQwxBrGIGNt1TzOKwNStRXpmpMd5RFJRXHsVhyRhSnhJOa64ywqM+fARDJjZapxZALwagkU1k5CLtw5KwPPcS/4Jv4Fbh98dBDYJUmuQzX4j9re6ZsXTr0ev504thz/G/Vz8FXW7bJ2xqf+vcoR5Ff2w+Tryn4umDt8uvgF8dyYvxj3qHcuuuVPP4578ka0caLDnS5H/+Ab25/O42d9X6sU9RblvMIf0Qa4WoYV3b97bGZvOstx8QAFDTVX9peXBSakeHWCqGI/yO2l7++/lWITBlutAbjJ5bDjO5AoPAe/md+aBpUws1N/PBL3YQtiJ+ViJ/vkbaDppOQZMmKx+V1hFxRlCJHKIiH0ShGBDlRh+IkGQwFnZGopkd0Y9IKaFj31FH+l4f46zwxvBzYwat/X+Yvrg7esG/arMmzg1tgy9FBb9+zZ7mxdNjVV2rDV07TXWnXnDj+8j2zHlbvk3as1DML/nyzWiEHH5y/aMb+lwf7q+75r7UFY25uzDTbxxBAdYP5+2u8xW11jwZshzPq85RmSUXgsYQs7iQKIGq2d3a2848hK4N/XDHuEW3q0vm3z67kPFGJD3Sjs/0UlpBeAqU7Y1QU/j4oOn/dBZ/zeKK+s52+KzCXGeoxrDcfL2Ss0EI11DZIoaCjBGRPqVYkqcey+Au8+4MPahc/emW0vaBA/+PkkHKCH44/LU+CapCmblkR02SZfxybkPU6okeqL9lsKpvN5rPFQjYdKJsayqYPZTMC1gYpXEvqm07j7PSVeUoVPRSMjIGIQ9M1Hawyqn3E6TDvFQPd9OK06XIkN1yrovCChuLq8w8Gh9wEy2Hyl9u3f8mf5HfyJ+lMvnN6HsJ4nk2yqjlahpomy1NHDFrBP935Ot+1ota73FNqt2bZKmvA98R1M23ZNtumi3zLPJ4cK2TnVNRIM9TR/3r6na+fPPkqv+FC2bflRkU68fdVutG/Dpgs6j3lg4yL6ue5A3PCpUrxoMLBeVkOi21QfSssWvn8PlWSoaRUVqX43ZIFZutSqQsG0U1rvkNSpbTyYbfcm6hvhzXvvv7653zjFUrRrnggoKnS3sRYNxO2PzmeYTaWTWeLyPZ7LEhNSBaEnCBYIkim4UhGxWko6i5Fa4YDi6JUBASTvoizGJwOTUZQKNUtJO8EowA0pChRiO5OxFBVMwRfQFKAkqWql+yQPdll1iKLJS0w+cm5LXtuSTxww1+nmfJz8tnrDtntOzZu+IPDblyfO8n69N3XvVpc5CoogX06JJ6cuTmv/h1jRpO1tWxUUZHGiGiIt8fxy0McOx5bJhVkDLEU2vLsg2ovHLnt6Y6nh2+/rGUsSbWR+Lnyxv0P/EVR/vqzPd38LmiBv94gj653j/Lym4q8OWmLps1cCpCfOTK/prSGCfuFBkmbqjmRLXqEHqHohAOAMmy3OQANO6mQHiYhr4024FO7IDBSLoxvkaaNG3/xdOW6vbcGp9eV5vATkJaWMyG0KTGdCJOqXjRi1JSpI0dcFN8ILz3+VF6lL39V/Bh0VVnL637DZ8v58WP95imbDUGcifbXZFNlrd+vRSnNJu3tjH9n61KKbk5KYtP3aCuwR9GQTEMbMlbYXUeu3SYpSC/8EqqZ3xe1mvDnEJZfIyVEpWPUXLsNBUkn4+v3oQo3SGVKzRNQ/cra/fzgS5c/Xjopp/SSu/SiB8u3LW6Z7R2d5dywaN0zl/PjJ7Z+cd/sllxdz0nXPY4bbmq86zBUpLENh/ip2/7Fr+q9JMY/qN94R2TvRumJ6Vdv7Vp2cej25+ov//FvoeaptyDr8r3vrr/jCntB3ujyvJz0EKj7r3zvtfsvFdiZsoetSQ5BNtBT6o9ErcVgtjwgYdORuDicjggOdDTi8/vCJspRD7HjUcIjnzkzJYCj4DyLQphm/o4dTUUTh2yf9mBiy/xH/r19299/fk19+5LcIkXKkVU164JGo7vjUO+0zvkXX24dXFPcOP7iNTlp6R3WPA3t3GP9GQPy/E38fx8ctnYJFISbn4YxB1f3/OyyKT985DdzthwZlpZlTY+lWx2Wqdcs/PUt09997M5/37VuWuD+q4aNm3VPR8V0q5V7WxZuWQ9xiCSpgcT2SAv0BeoeZAjI0VmOz6XlOFxlyaP84Vd831dfwWxlbfJEngGzv0qei6NpJ5l+A1IMRB7I9ZbJKAQ42YgZsk8m2dB0J94qhNxQkErmoE3fevOE2OactFUddZNG2WprDs954oZbZmywzZv+4+X3JWAFLFTvg7a0DN5SdM+8J56A7ItgIlRb0+7puGr5DN6b+Afvhf+CP5G7kvRxspH5nqM7yEZxWhky/t1x2islCSzbu5uLWxLuidMm8IvwNjO0ctTDUrzwaKLR9pDFJgAQcS8StWB//CQCqHhuZfxpS9XwSU3LXiwouPnSS65b0TZ7/Y9unTyq0mKB/bxVN7bOuWR0zJNIbN0wbuxqV4nDVgcFs8vyqwL3wiuQP0DvSxB3Rp7bdqQUvgpAWwo2x0gIRhQxI5Ec1Y3ih1QbGQcCuQPROhIeoPzq8eawEW4Wu8Ru/lwveUBIu7/M4T18Nu/J4V82h1UWbh6IAejvJL/U3NxrfqtkXEMP74HKnoZxCUYPWRryfdCZxpmN5SFiuRA1fWwYCxDzp+brQMME1IMoRILg9FqsahSsft3pjfrdulP16ungVy2KV/qPoqLEOIst15oYV1Qk/YelPPHwMSi+GYqPJU7tO/7pp4mbH35YOfHww4lx/OgxtHq3HuNHtX/wqrwSXuVy8MrBg6HH4YIjJXlwZHDis3ufhRB/9dl7YXbi2V27dgVW4N+eZ3fyfTB757P8lQFjHmaz2O/PwzCCZWQMA5Kfph1FV/H7yvy+3GikLIq2T0Egy1XAp+iaJARDiWJvifyNkSNloSASQCxvdZD0EDtko4UVLaNrUT5CIBIAcY2wIlCFZCr5GNlkNfgIbOhKJxTFh4gyzmJJYCddABY9H3eRpM9h8+KRszoPrVn7hD8yafVK/tTeffx4Y1PmrNlQ9WvJ/Qbfe/BdWA+R+/ibV155hc3yyLXrwbVx8sS7EnfeLmfBZZC762dQfFlZ6Q/4ezu0Wa1bV69vafsT2Actm7GYf3Xl2tGj09PuvXLFf48c7Wi+8N2LZtrsoeC8edN8tWmWUO2MlpH1GVpFSXl1YGKmlJVud0yY3GgN+HIbKyra3E2a1Lpp3AWLivK8R1eurkNqevyHN/32vMzo6w/+/crmG9cd3tVuG/7chrv5Y+s3rioq/GD3Lrjypzv/s1jL+ZDfdeR9vvldrUBft3IZ/8tdd56e1Jhdb7+T3/XWbuzHauO2jfX+6+9KDNq+Zs0wz5BSsP9JWvZswxTbyIaly669+vlid8slbUebpthGNVx62YwZec4aZ+PQ2Y0TVW1UtMU7JseuQl2FXNxUVOxWKkonX+yPpqXnl1ywaOyy6tycK29rWrakomLNug0bbnNa30lyrTSGcjUVeVYH24q6HHW7cMLI5UTssGURa5KcWbJO9qQYLUiDjFKmVENAqkUZIJ8VXVI5Cy1OAJ8Is04+s2onbu0OE2uDYhWdVPLmaxvkaAO+WLnhbl7IT9w3aYpr/LzrJ1nr0kCTFIBBhVnW0U23bQwFJ5Xnxja8cO26l3+yJJjpKoqUuWdarc48q9NbOcqVl1NSHMizXZ5bO3rIiCvGD7eHhrQF6i6/IOhURiY5lxG/MNQwtqwk46mHuj4qrRhbludpmViV4dErZv4wtndG3bL5jcNUyaJk61mDs/WCyoA1X9EdFa6i5qmNpeOuvrQu2NphjC+fMLoqWlI0LttaMbza4SjyjWuYE6yYOgYvchKPWoty6+d2rKhZEfMMq5+3Zm1tx09SbPI043eXBaLDgqHijm17bqiePnxYdvpgiy7j4x+hLtfhmM/F0S5WbXqWSspjyTI9fDwrlhCz3ZbhqFaodgHN7xkuUD0LiuUS0AMKDbxcLDvV+zPKr7xkUbS8YvnK9St/MGusJRekwRZX+Rhv7YoZE6y57gvG1+VA3djXNi51Sp4xF7fNa4nZrOP+sr2+vDBfthTmpaf36s4RQ4cMbhx/4d69v3rgno3zCvShqnXizB8/+NF1c25tiVrVzExd45/JGaWlVf7yTKuUX5yRCXmlFVllVfKvEx9nuuZNfXjyjW1NVe7sNJByrguOrVowbcqIysEZh9JdS1c8/MCL86auHumSsobkD6J4zzbs/xrsv5utxxFw6IKR+FE+yohhRUlKgFzRkEnUgGIjvv4fLES+qoM+ZOCSj5Ho4yghYXOkPsj1k6Yv9dx8Sl/Sx4bgpt6bNy6/aPKj/ODRTZbxN/Vu2nb1hOZHoe7oJr54ZKln9IiZU1bMKfS43Ra0avMWVla4iu351eHS0vy8EfUXt67cunxZfX20dt6l11+CVN3dMHbp1KpqZ6HDPsRVUespi9TOuvrpzo6V8rj2lZt6bxqR9aOjUPdoa8vam/CqOWPTUX7w0QX81ZlLZo9u8PkL8/Nsaem52U5bUaC0zOVqGG51lHnmBaurqvILyv1NkxYuvmBseXkBWp2S4mBsaKXD4SqtrXEWuN2B5qmTq8cEAiKMjH4B0yieFjTjihQgErsKCDqEkQ5IFWBBTSY+i8pIAS8tm4y4Zgz3OfC/ORwjm8ljY9c2zh1mdNesWBgDPaMg1z3nwpy0NNgTblbY0HGZbr/YYdn25vLh5ZIx/4ETt6qWKveQGfdePHOP19dMVPVV2K6H9DWshtWziejRzWWXs2XsujOtIxuGcyqinyIGYUWxd6okBQ6BG36v7CB5cEilGsUja9HakedHXjTeUMCGXyI2q0YEq9Udik0r9dHbXPQKPHVG8MSUhtpIkERAD9UFsl7gj/HV/Jcv5FSGr2q5YtTTf52n5ubaoT6vZXjT0qVNjYtVfnLKB4+PWtKy7kisqipWlVj1KHj27+fvP/oL/v7+/eBJHC2vnllUOXSEurKifmhVSUsic9y8sWMD1XDz/LHj5o1rzB5WnN36TFdrdvGw7LodP1F+HG0rDNbc8vGmTX+9JRgpnBNuuaplYToccgzOUCcOrVl659KFjaP49RkLWq+ShlVRpafs7QeWLX+qvf2pt55ql3ZWD2luKKtfXzK8fIR/9JZ548Yl/+PZxRXZra3ZFcXZdSIuLyE1Rn5ZRByHOBmyfVmw/9Hgtptx3QZwOZx2nfDZ5fOHnVFxfzQo06svqAY4tG37IdDxVH0JHC+p90kXHuL/c1Baeh/eUg7PKw0ESnnJlude3Hr4NXd1tRuObf7Ds5uXVd1weOuLf9r6n8MDPXT3bbFGYIg1gmxW1scXxSqByXV9qJo2J0QdwagTImIKif22d6ZWCDqldv6ud3mZzwftine7V4V2b1Mk7NXJbzcOm2sIh8FAhzAMPq/X2+7jnUospkC7r73JK/SC4sxMYwPZdl+U2awP30ZBZTzRxJuRXMagu7Od3ix0S8IR1WitA1kjsmmn2+6WQ1ENcZ8WA7BswjCMmGIkDDSutErCUmskGtWtoLfOwJIu5SbXRjSWYJzJ7OV2UiINzxM4bzLjRjPd6YtTi7ErYd5zmR9DRUbeh76qrRjSQUfVlmuQhql/WLnyD/wUP8pP0RmUHH9zZ1vbzjfNA2yBYXP5E/jeAYVU8cVTK/vK0UFi/K02mAbv9K0laEyszVjwmtQMVcscUXTsI0q7WN3hCEO7e+OsVzHEqg4/3rubjOPu3v59GswKWaW5uuMOh+y0WSlQ4BarEsJFIBSguaJp8lBtmnHSEGtShtEcjgvqL5PDEDMKfL5aXwz3mnGKAnP4R6tZVCJBe+mAr4AzfF4A3VjyrHZEvqMdIyXktkWyTUclQioctYrWhL6hOTwmgexwy5KhVRUUDNGXP0b1fmPDJJdTkkBSB2H7huj4FfgVtZCxjAFtLBGxngpWLSIuI9kYNv67Rs/u8SY3td/52dffNKiMFszMrf/52dff2C/j3D/So1Zo1a/RrxEre7qvNBtQ/XU/oN/QIEXBj0AwBnHAH9WvOYCqfMDrPfARX3dB2/gMW91w2PrRAe8y3wGf74DaRnsqcRQfB3Oraqebj70HfO3eA2zA+qTVrI3cPCKvUrAYnSJd7VtM1JnBLT/97bozarKSV/dbRwTs6v/104x1v/3pyv5riKZcn6nL/a21yYgc31XjLbTu+l3VSibGDKx7KOHTwKoBKw2Z1cMZbu7WzmkC/B+Kgv5Msh3wdYpRUwVnt4RbZNGIZINYH/1FpGNQmca0HpaJcutBmWUWiJS5FCc2DLHLLyPUBCNRBH803HokuZKrJHERTi6CwVAJg6+AU1xbxP/Je/g/r/gMVk954e3nJ8M6vu3+D5e/0Pw+NPSSyw8mfioMTi5Zs2YxV7m6ZPWaJXCSb5va0jIF1sKaBy6empGMDuxOYqva10ZaFS/ENoaEPFKDwInePrnGqh+wyWaAkJqOFCJKEUISU4ocEENRF+9Ysgqbw2/7cjPfLNre+Uf4fO4pNlc6wCuzendXyj2iG51/fJiKUhf+tjnhgB56pq3bEbh4Kn0ZfVzswA/pi0oJr4xU7u7lBvXl0h0B6sbfbqHv0G1mriFLhrArwh5ReCIdsFFOpRtiBu+m9VCxKBrDSyU24JJTkdRajIgnnvMOOWbEu+PdhhwTO5neMeAyTkX6YtFkEwYzJ6syswu8ZjzerrppSgmTbA61L0oU6vfR2CmUmeYwCNgEAdCnaS/NNXHExA1KPTADPYiM+N+dECxVwuOZjew8FKOdv4ulYzu8IKeDDKosT048Ce89De/Cu0/De4kDB5TrgT+V+BQm8yclJzSB5GRibZ2JNWGNDSJJQGD1Ay3/awRshI4k4IphcDPdIGHwGDvDtUjqqVZ7OoTTCZV1tOa0CC+zk/hUZAgYiRgYoqVYWoxbt9aN30tDZpBjsgocfPA7UeokhI/uONYhG4lfLpBaFuwRhwTxCkDpjRvQLRvxL/o/AtLWPr6Db6ep9VL2Am2qoCkkNt3QLXVTS4iyDMCPTJZH6+FgCaLtKcCpzJFYGV7RcrW7VirLFQrqCAI7DNthOgx5ccVp9jL/OffxuBk8Pk2ZHY+v2rNq1R5aBlnxIv8f/jhffRgUeAdmvczxnhlfPgwLX0uIcqsEhjE7+oaf6QEcizxzTd4h5CUKDeCQU8kKyFClJEwob0r/nr1679ef7Vs9WzpRv3NnoVDt5gMmnXr8VMX2V17Zrrx5yfjx8bUgpIfTnoeTEIB1puKwDlbMwpTtEYyIMIbTIXxLWsBQdDdL9ZrWmoTHapJWirmXRd0G/LhqwiD36zffu9a3FAno7E9vfI4/18xfTtIf2cFXmQV2dfjascCcT258DhqaIayw6LDrHlzt86HFmnNFzy+4KN8J4vYab+q2qe+pPA5/KouDwqmoQjaH60wyh2D2oSRlMjM3TFNh0CmONSqPkUzcSBjC0jxDwEA5GpKZwGGSpOf5KLqS2CahG3C7RvKRhSPFGPpu6RAAYV6AuSIi7q6xOdP4Ur502hzTSiQ6U7k34eNHpvF26Jx2xDQeiau6zEdmvxYQjqkfkgqlgwfQCyAqbPAPjQ+hm5JZYI/RLZkygtKTRu0w83OI/eQTFadPGjvBUpsujFFC5MOc7s8DLKYPYvFniaQAiw+9kNrcKNgk3em2lKCohWslv8Wh5KJaG59MnPaXvU/y9/atX6YWrV/2UcKwvtk4HW9B2T5Ub+OTxmd+8AT/ooKfLH4LJnTtBOeyxEc7+afLPpKo5O+WPAHWCtBL3uS/I/9Bxn4qhugFNpiQTxGYksQeGgAzryeZbyRKsLj4Xhxh4jRWiYcWKZbG1P8Wax+FZt4MmXQEjuSB4azYsqAUZyiS8jWgCu4wuBXWrVIPmkf+z8S1j93R2noH7Xbe39Fxf4fcTcxd2t3AS/pOwDBL4I63dlCx/nihC9vJKH3G3M5VUx3nICHSomTsQX8VVfvu02rGeTQ03bQtgv86xYpDheC+Z5hv0s6YFiYkrI3qQQOEA8GS3r+XMtu+6byf9ek+bQo+7cGH5AvHPWFaGxBZXu98w7nJf6nxZmlBhGWWujjryEy7izaDfMlCsXZrhmbQoRiZ5BpOEf9AerHU2bdA0q7rXZt+NL+6a/XuXoWZQFHk2dS1YNHG3t0NQkfJz1bMHD9ET1s2cmo/Cgf4fbVIqYNWZGrqPVDc1PRp0+FmXs8/hJcAL5p7bj/N9qCX+jt+tPlI86eTpIm8Hlz0sKf506bE58D2mHaFrJlK1Ikyc5LjKJtNUc0miRjUEfUL9Zdke9Kp/rAbouoX3DoLZokUuZ/PQjmztsIsA2a1ov5b4YhmpMpHRXk/3vxiFv85JdvBrIHlUVdiGrUB/9MlZCvoRncnkNmgVUPfu1tCfoOGLRkPE9gSE2yP6A2QJSYvX4oR+HeLM3NdVca2UUbaULDIIpcPv4Lais0y7wNBTFzk/5m+heALIhdPM1kP2m+SBbKwp0SypFBYWp+U8KZqaGxAHub5PDrW32fz2j1h+Ba/7XzXUn9H7dv9tvNdayzlqZ1mxvn/aKgkEdMQcQlT/89eBXST/iUzQHHwRHCF9tJxokTcRAEK4MTFMwq/nKZoSCrykcQYUYcTbbPv7DrQ47W4cXxqI0TRcOhzz1OdyFo16NzM03z5rGpxgFAKKHDEBHWinNc+btAXSyWczRcoS9EO+5mjjRFJ9KF8CFyTTHiLo7Dx998/zd7n76t9qJY8smP8gSr+D8isgkspHo6jKXCgRPQwiQQEbOdDA5HtiWbBBAUukk3pTNP6gIHoFWUq0uAJkCB/DA8uVwooEg3UGDNT+AwOlfavXdTyLXB0phIxp/3rT9ZJg31Wvcn4UZJjp4lIHNorARBASx5u3eTaiXfmSj4+l5ZxKKn3NKqORq7wI4l32iQvSSynVF7SrDPxKEVwdksySdeSTGU2mykLtoyTgoXjLKm7ybm1COn1kPUYiSpsSm8IX+KrjQqbohnC0Yil5BSRPRgMxl+jAAcJq2EK70kjensUL2lO97A9+gJ9AQuIqJLu1XSrTkscft1v9flVP61yRP1RNRKVo85I0Bl1yg6n10nhcD3lAusLRvDXK8c4th4an542/tBWe12Ivz7ik7S0T0ZATfUoO97PGX/oNkddCGrodqJYgLD0Od06U7L/G0ZVm0U/6f/mA8ms6/42fbCp0/2zuYESYnSIeG0sFIyCdnZWtxLkPT2bN0pdE9HFqOy55drEhInnpHgnXuuByomJCRs39/CeiVLX9efWiVNAek1pQpCyL2XJo0TQS7xOsKa4CSFy8oC4pDCBt0kIaU7p8RkZ6eNW9JEpnZeljDdtJsfu42FJjhZnJvdKxbG1FN6Lt6ATzgU5S71G6ov5mmUlk9WKwqp4GU9mgSerTOaJszN54qI6M09cBpEEm/a9cDYVxBaSqrSLt5iAl4aAd9LUVIGzpwbgrMAgquO8OJsk15Y+nD1fdYQ1NDWdx1NIC81n1UwDpQq2194ZT6FtIom2yoA4N1nEb490p0TDGbJ4vk+8u3RaXd20OpfxvSLe8oQ6Kn4QvfuB7fJ8Z7tADskpevl92iU5/uBcJdr2fRoGD8P9/LIFonXsrLaNYY3f1TaxIkqfIvDQKmpUZFCKpVE/Yrz0/dstsWhefqQie/AtuTkBlzU7x1I4ds7oFVddtvd790V2D2vGussKczLsDt+w4qIiG7pj1kGDq69uSHyd7KKIJ5r+udA48ZHFrxsU7Dx8yF0oUi74kGzB+coqggDEzymr9MVsNPRoc8mnJc8zZCXTRwer2+/RaSPTTv+tMEN+iwQWxHlrfFmFUSG/hTtVBHlASLN5TMW5UxiQSW+P5PrKspGIK1quU2HS5lU5f+ZHVj3wwCp+5M85q5BLLmqHUZ9b2n/603bL5/z5dnzXYujV79VK8CydstzQUjq9stWfLutW2anET5xmJ/jKw4ff5G/AcE3hh99844031d6GOGv4GOqhfjsS/Hrk8C9t5y/xl7YzZsZlUdOTsap8WlFKh7CbKA36h+diS1/qLQ0jOeVx0UUYGOY/EyOmWTHIbKMfaXQnC4SpMDf6MmLP046ib2+H/dvrpx8sfVvNxjn1laTqo9iYenZ9fvDrYNaYEBm86oD6/jmXdx5ogxyzSnQ8eEzqjg2o8gUqMpd/mfyNS1Iu6bcmhPD4j3Uyu4XCSxTxo5gsdYJYNZrIzqbfX0GWjHpFcVzyJ3h3DC0s7+lsmsxFCE/4WX3yBQPep5z9HpT8gV8esDYi03iA+Tun0oBM6aMeS1BkB8ghECKt4XbhyubmlRc2Lm8I1Xs89aGG5Y3mHZ2dZOTJk/NMm9x3lrLvwmbSb7lELWrSooDbby5GO80fLIFYRz3N1IUJtqpDZh20sCriAkTh4qyj437DuL9jIH8zfx9mHziDoXAtcyVXvYvQ46N5iYs9VMI+qBTMVGVG/zkzcMB4D/+FINRJH0diwmfLTNYiciWIHxMVVkNkB0UuhTgqL7Us7tqE3iflJDIzVN1NAbRuZaF/1/xNXciM22cNRXuHvaOIJ8XvzfdTHEsO6e5oyOqJunXl7S+Nch4rN/AA3eWq8NHITUnF2o3keFpMFsKSeRGqH2TTAQUzvCIZKJrdp1HmTXaSDL78szuxAFw8Ff8n/7abpDSUDobcTZ94LJlrjNdpQoLR7tNt8dz8nhIT6wb4zJr8HjrHMXwKSiy5poDPvOlg3hYl/h9VXAj9eNpjYGRgYGBmaPaTOnEpnt/mKwM3BwMInJvJr4ZMczBwQCgmEAUABy0HjgB42mNgZGDgYPh/A0QyMPz/DySBIiiAFQBj/AP1eNotj7ERAkEIRR94gbljP/bgzMUXWQeR2fVwsdZibiEWIB9gZz/wYfms/SjzF1jGZxyDIBwPS0S5TFwITfhO5qjsm7eqPNmz9jHqhNCZbG1fWjVjOqqLq/RSbaNfBnd59Z3EX4pjqY1qZsyOio5Waq3ef9SiIx6MtZ7N77KePcvtD516IYIAAAAAACYAJgAmAC4AXgCIAMYA7AD6ARYBMAF+AboB9AKOAygDeAO0A94EhgUaBVoFsAYWBpoGvAb6Bx4HVgeyCBAJPAn2CnYLJgtuDCoMcAyyDNQM8A0ODVYNeA28Dg4OeA6uDuQPIg9qD7wQHBA+EGAQphDEEOAQ/BEqEUIRhBG+EhQSUhKAEpYSshL0EwITGBNaE44T+hQkFFYUaBSAFJgUrhTCFM4U3BTyFVoVjBXMFf4WPhZ2Fp4WuhboF0QXfhewF8YX1BfqGAAYDhhAGIIYzhkcGY4ZpBm6GewaDBo2GnoashrwGxwbPBtuG5obzBv8HBYcPhxMHFocaBx2AAB42mNgZGBgqGPYyyDAAAJMQMzIABJzAPMZACNoAZEAAHjajZK9TgJBFIXPAppgYUUsrDbRQk34cYl/UFmIiRpDNGpngmYBI7AIq2Dj8+kLWPoQllZ+MwyRAIWZzOy555577p0BSUt6U1JeKi3piz3CnjJEI5zQsr4dTqrkjTUprXslhxc09G4dXoT/dDitVe/H4XetJDIOf6iQ2NKxqjqTrxeF6qmvB0XqEAfsCMZXjfiVbwsUW9WsegCK1QTVLRODQg11z9klGus20MSsrkrKswZ25dQg+8zXdGzAt6gwtR16hOw8bBc2i39NTyiNTxtmTRXX8Wim3ya3Mx5mVuMXWb8L4gbdzH16KuJVYAUq60qnutE5aF5ddqpynsaf0lxPvdNkt6ouYUw0yTZRxs7vhfy2zeW0x1nmxjU94mk0dVjzTnfU5bRj9z5egQ7+Nf8JfGinOiTbhu/b1+7wBiGuf7/kaIaKdfN5n8hOZnjfTl+i8y5nADb/nAKZ4i+dtXAXAAAAeNpt0tVyG0EYBWG1Ag4zMzNoZ/7ZtUMO2WFmZnDAQYcrj5hXClhtX2WrVOdG9e1O17TardHn969Wav3v+fn3R6tNmwlMZBKT6WEKU5nGdGYwk1nMZg5zmcd8FrCQRSxmCUtZxnJWsJJVrGYNa1nHejawkU1sZgtb2cZ2drCTXeymQ0UiExRqGnrpYw972cd+DtDPQQ5xmCMcZYBBjnGcE5zkFKc5w1nOcZ4LXOQSl7nCVa5xnRvc5Ba3ucNd7nGfBzzkEY95wlOe8ZwhXvCSV7xmmDe85R3v+cBHRvjEZ77wlW9850fPyPDQQKfT+beD1fhWbnKzG25xa7dxe92+0U16SS/pJb2kl/SSXtJLemnMq/QqvUqv0qv0Kr1Kr9Kr9Cq9pJf0kl7SS10ve47sObLnyJ4jd8b+V9zabdzue0MndEIndEIndEIndGLc6X5/2CPsEfYIe4Q9wh5hj7BH2CPsEfYIe4Q9wh5hj0h6SS/pJb2kl/WyXtbLelkv62W9rJf1sl7ohV7ohV7ohV7ohV7ohV7RK3pFr+gVvaJX9Ipe0St6tV6tV+vVerVerVfr1Xq1Xq3X6DV6jV7T9Yr3qXifivepdPIfY1AvlQABUnNepwAA) format('woff'), + url('font/genericons-regular-webfont.ttf') format('truetype'), + url('font/genericons-regular-webfont.svg#genericonsregular') format('svg'); + font-weight: normal; + font-style: normal; +} + + +/** + * All Genericons + */ + +.genericon { + display: inline-block; + width: 16px; + height: 16px; + -webkit-font-smoothing: antialiased; + font-size: 16px; + line-height: 1; + font-family: 'Genericons'; + text-decoration: inherit; + font-weight: normal; + font-style: normal; + vertical-align: top; +} + +/** + * IE7 and IE6 hacks + */ + +.genericon { + *overflow: auto; + *zoom: 1; + *display: inline; +} + +/** + * Individual icons + */ + +/* Post formats */ +.genericon-standard:before { content: '\f100'; } +.genericon-aside:before { content: '\f101'; } +.genericon-image:before { content: '\f102'; } +.genericon-gallery:before { content: '\f103'; } +.genericon-video:before { content: '\f104'; } +.genericon-status:before { content: '\f105'; } +.genericon-quote:before { content: '\f106'; } +.genericon-link:before { content: '\f107'; } +.genericon-chat:before { content: '\f108'; } +.genericon-audio:before { content: '\f109'; } + +/* Social icons */ +.genericon-github:before { content: '\f200'; } +.genericon-dribbble:before { content: '\f201'; } +.genericon-twitter:before { content: '\f202'; } +.genericon-facebook:before { content: '\f203'; } +.genericon-facebook-alt:before { content: '\f204'; } +.genericon-wordpress:before { content: '\f205'; } +.genericon-googleplus:before { content: '\f206'; } +.genericon-linkedin:before { content: '\f207'; } +.genericon-linkedin-alt:before { content: '\f208'; } +.genericon-pinterest:before { content: '\f209'; } +.genericon-pinterest-alt:before { content: '\f210'; } +.genericon-flickr:before { content: '\f211'; } +.genericon-vimeo:before { content: '\f212'; } +.genericon-youtube:before { content: '\f213'; } +.genericon-tumblr:before { content: '\f214'; } +.genericon-instagram:before { content: '\f215'; } +.genericon-codepen:before { content: '\f216'; } +.genericon-polldaddy:before { content: '\f217'; } +.genericon-googleplus-alt:before { content: '\f218'; } +.genericon-path:before { content: '\f219'; } +.genericon-skype:before { content: '\f220'; } +.genericon-digg:before { content: '\f221'; } +.genericon-reddit:before { content: '\f222'; } +.genericon-stumbleupon:before { content: '\f223'; } +.genericon-pocket:before { content: '\f224'; } + +/* Meta icons */ +.genericon-comment:before { content: '\f300'; } +.genericon-category:before { content: '\f301'; } +.genericon-tag:before { content: '\f302'; } +.genericon-time:before { content: '\f303'; } +.genericon-user:before { content: '\f304'; } +.genericon-day:before { content: '\f305'; } +.genericon-week:before { content: '\f306'; } +.genericon-month:before { content: '\f307'; } +.genericon-pinned:before { content: '\f308'; } + +/* Other icons */ +.genericon-search:before { content: '\f400'; } +.genericon-unzoom:before { content: '\f401'; } +.genericon-zoom:before { content: '\f402'; } +.genericon-show:before { content: '\f403'; } +.genericon-hide:before { content: '\f404'; } +.genericon-close:before { content: '\f405'; } +.genericon-close-alt:before { content: '\f406'; } +.genericon-trash:before { content: '\f407'; } +.genericon-star:before { content: '\f408'; } +.genericon-home:before { content: '\f409'; } +.genericon-mail:before { content: '\f410'; } +.genericon-edit:before { content: '\f411'; } +.genericon-reply:before { content: '\f412'; } +.genericon-feed:before { content: '\f413'; } +.genericon-warning:before { content: '\f414'; } +.genericon-share:before { content: '\f415'; } +.genericon-attachment:before { content: '\f416'; } +.genericon-location:before { content: '\f417'; } +.genericon-checkmark:before { content: '\f418'; } +.genericon-menu:before { content: '\f419'; } +.genericon-refresh:before { content: '\f420'; } +.genericon-minimize:before { content: '\f421'; } +.genericon-maximize:before { content: '\f422'; } +.genericon-404:before { content: '\f423'; } +.genericon-spam:before { content: '\f424'; } +.genericon-summary:before { content: '\f425'; } +.genericon-cloud:before { content: '\f426'; } +.genericon-key:before { content: '\f427'; } +.genericon-dot:before { content: '\f428'; } +.genericon-next:before { content: '\f429'; } +.genericon-previous:before { content: '\f430'; } +.genericon-expand:before { content: '\f431'; } +.genericon-collapse:before { content: '\f432'; } +.genericon-dropdown:before { content: '\f433'; } +.genericon-dropdown-left:before { content: '\f434'; } +.genericon-top:before { content: '\f435'; } +.genericon-draggable:before { content: '\f436'; } +.genericon-phone:before { content: '\f437'; } +.genericon-send-to-phone:before { content: '\f438'; } +.genericon-plugin:before { content: '\f439'; } +.genericon-cloud-download:before { content: '\f440'; } +.genericon-cloud-upload:before { content: '\f441'; } +.genericon-external:before { content: '\f442'; } +.genericon-document:before { content: '\f443'; } +.genericon-book:before { content: '\f444'; } +.genericon-cog:before { content: '\f445'; } +.genericon-unapprove:before { content: '\f446'; } +.genericon-cart:before { content: '\f447'; } +.genericon-pause:before { content: '\f448'; } +.genericon-stop:before { content: '\f449'; } +.genericon-skip-back:before { content: '\f450'; } +.genericon-skip-ahead:before { content: '\f451'; } +.genericon-play:before { content: '\f452'; } +.genericon-tablet:before { content: '\f453'; } +.genericon-send-to-tablet:before { content: '\f454'; } +.genericon-info:before { content: '\f455'; } +.genericon-notice:before { content: '\f456'; } +.genericon-help:before { content: '\f457'; } +.genericon-fastforward:before { content: '\f458'; } +.genericon-rewind:before { content: '\f459'; } +.genericon-portfolio:before { content: '\f460'; } +.genericon-heart:before { content: '\f461'; } +.genericon-code:before { content: '\f462'; } +.genericon-subscribe:before { content: '\f463'; } +.genericon-unsubscribe:before { content: '\f464'; } +.genericon-subscribed:before { content: '\f465'; } +.genericon-reply-alt:before { content: '\f466'; } +.genericon-reply-single:before { content: '\f467'; } +.genericon-flag:before { content: '\f468'; } +.genericon-print:before { content: '\f469'; } +.genericon-lock:before { content: '\f470'; } +.genericon-bold:before { content: '\f471'; } +.genericon-italic:before { content: '\f472'; } +.genericon-picture:before { content: '\f473'; } + +/* Generic shapes */ +.genericon-uparrow:before { content: '\f500'; } +.genericon-rightarrow:before { content: '\f501'; } +.genericon-downarrow:before { content: '\f502'; } +.genericon-leftarrow:before { content: '\f503'; } + + + + + diff --git a/wp-content/themes/twentyfourteen/header.php b/wp-content/themes/twentyfourteen/header.php new file mode 100644 index 0000000..3cd5664 --- /dev/null +++ b/wp-content/themes/twentyfourteen/header.php @@ -0,0 +1,65 @@ + section and everything up till
          + * + * @package WordPress + * @subpackage Twenty_Fourteen + * @since Twenty Fourteen 1.0 + */ +?> + + + +> + + + + + <?php wp_title( '|', true, 'right' ); ?> + + + + + + +> +
          + + + + + + +
          diff --git a/wp-content/themes/twentyfourteen/image.php b/wp-content/themes/twentyfourteen/image.php new file mode 100644 index 0000000..98daaec --- /dev/null +++ b/wp-content/themes/twentyfourteen/image.php @@ -0,0 +1,79 @@ + + +
          +
          + + +
          > +
          + ', '' ); ?> + + +
          + +
          +
          +
          + +
          + + +
          + +
          + +
          + + '', + 'link_before' => '', + 'link_after' => '', + ) ); + ?> +
          +
          + +
          ' ); ?> +
          + + + + + + +
          + + + + + + + + + + + + + + + + + diff --git a/wp-content/themes/twentyfourteen/images/pattern-light.svg b/wp-content/themes/twentyfourteen/images/pattern-light.svg new file mode 100644 index 0000000..55a48f1 --- /dev/null +++ b/wp-content/themes/twentyfourteen/images/pattern-light.svg @@ -0,0 +1,6 @@ + + + diff --git a/wp-content/themes/twentyfourteen/inc/back-compat.php b/wp-content/themes/twentyfourteen/inc/back-compat.php new file mode 100644 index 0000000..ac06b94 --- /dev/null +++ b/wp-content/themes/twentyfourteen/inc/back-compat.php @@ -0,0 +1,63 @@ +

          %s

          ', $message ); +} + +/** + * Prevent the Theme Customizer from being loaded on WordPress versions prior to 3.6. + * + * @since Twenty Fourteen 1.0 + */ +function twentyfourteen_customize() { + wp_die( sprintf( __( 'Twenty Fourteen requires at least WordPress version 3.6. You are running version %s. Please upgrade and try again.', 'twentyfourteen' ), $GLOBALS['wp_version'] ), '', array( + 'back_link' => true, + ) ); +} +add_action( 'load-customize.php', 'twentyfourteen_customize' ); + +/** + * Prevent the Theme Preview from being loaded on WordPress versions prior to 3.4. + * + * @since Twenty Fourteen 1.0 + */ +function twentyfourteen_preview() { + if ( isset( $_GET['preview'] ) ) { + wp_die( sprintf( __( 'Twenty Fourteen requires at least WordPress version 3.6. You are running version %s. Please upgrade and try again.', 'twentyfourteen' ), $GLOBALS['wp_version'] ) ); + } +} +add_action( 'template_redirect', 'twentyfourteen_preview' ); diff --git a/wp-content/themes/twentyfourteen/inc/custom-header.php b/wp-content/themes/twentyfourteen/inc/custom-header.php new file mode 100644 index 0000000..f22ef18 --- /dev/null +++ b/wp-content/themes/twentyfourteen/inc/custom-header.php @@ -0,0 +1,144 @@ + Header screen. + * @type string $admin_preview_callback Callback function used to create the custom header markup in + * the Appearance > Header screen. + * } + */ + add_theme_support( 'custom-header', apply_filters( 'twentyfourteen_custom_header_args', array( + 'default-text-color' => 'fff', + 'width' => 1260, + 'height' => 240, + 'flex-height' => true, + 'wp-head-callback' => 'twentyfourteen_header_style', + 'admin-head-callback' => 'twentyfourteen_admin_header_style', + 'admin-preview-callback' => 'twentyfourteen_admin_header_image', + ) ) ); +} +add_action( 'after_setup_theme', 'twentyfourteen_custom_header_setup' ); + +if ( ! function_exists( 'twentyfourteen_header_style' ) ) : +/** + * Styles the header image and text displayed on the blog + * + * @see twentyfourteen_custom_header_setup(). + * + */ +function twentyfourteen_header_style() { + $text_color = get_header_textcolor(); + + // If no custom color for text is set, let's bail. + if ( display_header_text() && $text_color === get_theme_support( 'custom-header', 'default-text-color' ) ) + return; + + // If we get this far, we have custom styles. + ?> + + Header screen. + * + * @see twentyfourteen_custom_header_setup() + * + * @since Twenty Fourteen 1.0 + */ +function twentyfourteen_admin_header_style() { +?> + + Header screen. + * + * @see twentyfourteen_custom_header_setup() + * + * @since Twenty Fourteen 1.0 + */ +function twentyfourteen_admin_header_image() { +?> + +get_section( 'colors' )->description = __( 'Background may only be visible on wide screens.', 'twentyfourteen' ); + $wp_customize->get_section( 'background_image' )->description = __( 'Background may only be visible on wide screens.', 'twentyfourteen' ); + + // Add postMessage support for site title and description. + $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; + $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; + $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; + + // Rename the label to "Site Title Color" because this only affects the site title in this theme. + $wp_customize->get_control( 'header_textcolor' )->label = __( 'Site Title Color', 'twentyfourteen' ); + + // Rename the label to "Display Site Title & Tagline" in order to make this option extra clear. + $wp_customize->get_control( 'display_header_text' )->label = __( 'Display Site Title & Tagline', 'twentyfourteen' ); + + // Add the featured content section in case it's not already there. + $wp_customize->add_section( 'featured_content', array( + 'title' => __( 'Featured Content', 'twentyfourteen' ), + 'description' => sprintf( __( 'Use a tag to feature your posts. If no posts match the tag, sticky posts will be displayed instead.', 'twentyfourteen' ), + esc_url( add_query_arg( 'tag', _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), admin_url( 'edit.php' ) ) ), + admin_url( 'edit.php?show_sticky=1' ) + ), + 'priority' => 130, + ) ); + + // Add the featured content layout setting and control. + $wp_customize->add_setting( 'featured_content_layout', array( + 'default' => 'grid', + 'sanitize_callback' => 'twentyfourteen_sanitize_layout', + ) ); + + $wp_customize->add_control( 'featured_content_layout', array( + 'label' => __( 'Layout', 'twentyfourteen' ), + 'section' => 'featured_content', + 'type' => 'select', + 'choices' => array( + 'grid' => __( 'Grid', 'twentyfourteen' ), + 'slider' => __( 'Slider', 'twentyfourteen' ), + ), + ) ); +} +add_action( 'customize_register', 'twentyfourteen_customize_register' ); + +/** + * Sanitize the Featured Content layout value. + * + * @since Twenty Fourteen 1.0 + * + * @param string $layout Layout type. + * @return string Filtered layout type (grid|slider). + */ +function twentyfourteen_sanitize_layout( $layout ) { + if ( ! in_array( $layout, array( 'grid', 'slider' ) ) ) { + $layout = 'grid'; + } + + return $layout; +} + +/** + * Bind JS handlers to make Theme Customizer preview reload changes asynchronously. + * + * @since Twenty Fourteen 1.0 + */ +function twentyfourteen_customize_preview_js() { + wp_enqueue_script( 'twentyfourteen_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20131205', true ); +} +add_action( 'customize_preview_init', 'twentyfourteen_customize_preview_js' ); + +/** + * Add contextual help to the Themes and Post edit screens. + * + * @since Twenty Fourteen 1.0 + */ +function twentyfourteen_contextual_help() { + if ( 'admin_head-edit.php' === current_filter() && 'post' !== $GLOBALS['typenow'] ) { + return; + } + + get_current_screen()->add_help_tab( array( + 'id' => 'twentyfourteen', + 'title' => __( 'Twenty Fourteen', 'twentyfourteen' ), + 'content' => + '
            ' . + '
          • ' . sprintf( __( 'The home page features your choice of up to 6 posts prominently displayed in a grid or slider, controlled by a tag; you can change the tag and layout in Appearance → Customize. If no posts match the tag, sticky posts will be displayed instead.', 'twentyfourteen' ), esc_url( add_query_arg( 'tag', _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), admin_url( 'edit.php' ) ) ), admin_url( 'customize.php' ), admin_url( 'edit.php?show_sticky=1' ) ) . '
          • ' . + '
          • ' . sprintf( __( 'Enhance your site design by using Featured Images for posts you’d like to stand out (also known as post thumbnails). This allows you to associate an image with your post without inserting it. Twenty Fourteen uses featured images for posts and pages—above the title—and in the Featured Content area on the home page.', 'twentyfourteen' ), 'http://codex.wordpress.org/Post_Thumbnails#Setting_a_Post_Thumbnail' ) . '
          • ' . + '
          • ' . sprintf( __( 'For an in-depth tutorial, and more tips and tricks, visit the Twenty Fourteen documentation.', 'twentyfourteen' ), 'http://codex.wordpress.org/Twenty_Fourteen' ) . '
          • ' . + '
          ', + ) ); +} +add_action( 'admin_head-themes.php', 'twentyfourteen_contextual_help' ); +add_action( 'admin_head-edit.php', 'twentyfourteen_contextual_help' ); diff --git a/wp-content/themes/twentyfourteen/inc/featured-content.php b/wp-content/themes/twentyfourteen/inc/featured-content.php new file mode 100644 index 0000000..3f9dc41 --- /dev/null +++ b/wp-content/themes/twentyfourteen/inc/featured-content.php @@ -0,0 +1,536 @@ + $post_ids, + 'posts_per_page' => count( $post_ids ), + ) ); + + return $featured_posts; + } + + /** + * Get featured post IDs + * + * This function will return the an array containing the + * post IDs of all featured posts. + * + * Sets the "featured_content_ids" transient. + * + * @static + * @access public + * @since Twenty Fourteen 1.0 + * + * @return array Array of post IDs. + */ + public static function get_featured_post_ids() { + // Return array of cached results if they exist. + $featured_ids = get_transient( 'featured_content_ids' ); + if ( ! empty( $featured_ids ) ) { + return array_map( 'absint', (array) $featured_ids ); + } + + $settings = self::get_setting(); + + // Return sticky post ids if no tag name is set. + $term = get_term_by( 'name', $settings['tag-name'], 'post_tag' ); + if ( $term ) { + $tag = $term->term_id; + } else { + return self::get_sticky_posts(); + } + + // Query for featured posts. + $featured = get_posts( array( + 'numberposts' => self::$max_posts, + 'tax_query' => array( + array( + 'field' => 'term_id', + 'taxonomy' => 'post_tag', + 'terms' => $tag, + ), + ), + ) ); + + // Return array with sticky posts if no Featured Content exists. + if ( ! $featured ) { + return self::get_sticky_posts(); + } + + // Ensure correct format before save/return. + $featured_ids = wp_list_pluck( (array) $featured, 'ID' ); + $featured_ids = array_map( 'absint', $featured_ids ); + + set_transient( 'featured_content_ids', $featured_ids ); + + return $featured_ids; + } + + /** + * Return an array with IDs of posts maked as sticky. + * + * @static + * @access public + * @since Twenty Fourteen 1.0 + * + * @return array Array of sticky posts. + */ + public static function get_sticky_posts() { + $settings = self::get_setting(); + return array_slice( get_option( 'sticky_posts', array() ), 0, self::$max_posts ); + } + + /** + * Delete featured content ids transient. + * + * Hooks in the "save_post" action. + * + * @see Featured_Content::validate_settings(). + * + * @static + * @access public + * @since Twenty Fourteen 1.0 + */ + public static function delete_transient() { + delete_transient( 'featured_content_ids' ); + } + + /** + * Exclude featured posts from the home page blog query. + * + * Filter the home page posts, and remove any featured post ID's from it. + * Hooked onto the 'pre_get_posts' action, this changes the parameters of + * the query before it gets any posts. + * + * @static + * @access public + * @since Twenty Fourteen 1.0 + * + * @param WP_Query $query WP_Query object. + * @return WP_Query Possibly-modified WP_Query. + */ + public static function pre_get_posts( $query ) { + + // Bail if not home or not main query. + if ( ! $query->is_home() || ! $query->is_main_query() ) { + return; + } + + $page_on_front = get_option( 'page_on_front' ); + + // Bail if the blog page is not the front page. + if ( ! empty( $page_on_front ) ) { + return; + } + + $featured = self::get_featured_post_ids(); + + // Bail if no featured posts. + if ( ! $featured ) { + return; + } + + // We need to respect post ids already in the blacklist. + $post__not_in = $query->get( 'post__not_in' ); + + if ( ! empty( $post__not_in ) ) { + $featured = array_merge( (array) $post__not_in, $featured ); + $featured = array_unique( $featured ); + } + + $query->set( 'post__not_in', $featured ); + } + + /** + * Reset tag option when the saved tag is deleted. + * + * It's important to mention that the transient needs to be deleted, + * too. While it may not be obvious by looking at the function alone, + * the transient is deleted by Featured_Content::validate_settings(). + * + * Hooks in the "delete_post_tag" action. + * + * @see Featured_Content::validate_settings(). + * + * @static + * @access public + * @since Twenty Fourteen 1.0 + * + * @param int $tag_id The term_id of the tag that has been deleted. + */ + public static function delete_post_tag( $tag_id ) { + $settings = self::get_setting(); + + if ( empty( $settings['tag-id'] ) || $tag_id != $settings['tag-id'] ) { + return; + } + + $settings['tag-id'] = 0; + $settings = self::validate_settings( $settings ); + update_option( 'featured-content', $settings ); + } + + /** + * Hide featured tag from displaying when global terms are queried from the front-end. + * + * Hooks into the "get_terms" filter. + * + * @static + * @access public + * @since Twenty Fourteen 1.0 + * + * @param array $terms List of term objects. This is the return value of get_terms(). + * @param array $taxonomies An array of taxonomy slugs. + * @return array A filtered array of terms. + * + * @uses Featured_Content::get_setting() + */ + public static function hide_featured_term( $terms, $taxonomies ) { + + // This filter is only appropriate on the front-end. + if ( is_admin() ) { + return $terms; + } + + // We only want to hide the featured tag. + if ( ! in_array( 'post_tag', $taxonomies ) ) { + return $terms; + } + + // Bail if no terms were returned. + if ( empty( $terms ) ) { + return $terms; + } + + $settings = self::get_setting(); + foreach( $terms as $order => $term ) { + if ( ( $settings['tag-id'] === $term->term_id || $settings['tag-name'] === $term->name ) && 'post_tag' === $term->taxonomy ) { + unset( $terms[ $order ] ); + } + } + + return $terms; + } + + /** + * Hide featured tag from display when terms associated with a post object + * are queried from the front-end. + * + * Hooks into the "get_the_terms" filter. + * + * @static + * @access public + * @since Twenty Fourteen 1.0 + * + * @param array $terms A list of term objects. This is the return value of get_the_terms(). + * @param int $id The ID field for the post object that terms are associated with. + * @param array $taxonomy An array of taxonomy slugs. + * @return array Filtered array of terms. + * + * @uses Featured_Content::get_setting() + */ + public static function hide_the_featured_term( $terms, $id, $taxonomy ) { + + // This filter is only appropriate on the front-end. + if ( is_admin() ) { + return $terms; + } + + // Make sure we are in the correct taxonomy. + if ( 'post_tag' != $taxonomy ) { + return $terms; + } + + // No terms? Return early! + if ( empty( $terms ) ) { + return $terms; + } + + $settings = self::get_setting(); + foreach( $terms as $order => $term ) { + if ( ( $settings['tag-id'] === $term->term_id || $settings['tag-name'] === $term->name ) && 'post_tag' === $term->taxonomy ) { + unset( $terms[ $term->term_id ] ); + } + } + + return $terms; + } + + /** + * Register custom setting on the Settings -> Reading screen. + * + * @static + * @access public + * @since Twenty Fourteen 1.0 + */ + public static function register_setting() { + register_setting( 'featured-content', 'featured-content', array( __CLASS__, 'validate_settings' ) ); + } + + /** + * Add settings to the Customizer. + * + * @static + * @access public + * @since Twenty Fourteen 1.0 + * + * @param WP_Customize_Manager $wp_customize Theme Customizer object. + */ + public static function customize_register( $wp_customize ) { + $wp_customize->add_section( 'featured_content', array( + 'title' => __( 'Featured Content', 'twentyfourteen' ), + 'description' => sprintf( __( 'Use a tag to feature your posts. If no posts match the tag, sticky posts will be displayed instead.', 'twentyfourteen' ), + esc_url( add_query_arg( 'tag', _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), admin_url( 'edit.php' ) ) ), + admin_url( 'edit.php?show_sticky=1' ) + ), + 'priority' => 130, + 'theme_supports' => 'featured-content', + ) ); + + // Add Featured Content settings. + $wp_customize->add_setting( 'featured-content[tag-name]', array( + 'default' => _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), + 'type' => 'option', + 'sanitize_js_callback' => array( __CLASS__, 'delete_transient' ), + ) ); + $wp_customize->add_setting( 'featured-content[hide-tag]', array( + 'default' => true, + 'type' => 'option', + 'sanitize_js_callback' => array( __CLASS__, 'delete_transient' ), + ) ); + + // Add Featured Content controls. + $wp_customize->add_control( 'featured-content[tag-name]', array( + 'label' => __( 'Tag Name', 'twentyfourteen' ), + 'section' => 'featured_content', + 'priority' => 20, + ) ); + $wp_customize->add_control( 'featured-content[hide-tag]', array( + 'label' => __( 'Don’t display tag on front end.', 'twentyfourteen' ), + 'section' => 'featured_content', + 'type' => 'checkbox', + 'priority' => 30, + ) ); + } + + /** + * Enqueue the tag suggestion script. + * + * @static + * @access public + * @since Twenty Fourteen 1.0 + */ + public static function enqueue_scripts() { + wp_enqueue_script( 'featured-content-suggest', get_template_directory_uri() . '/js/featured-content-admin.js', array( 'jquery', 'suggest' ), '20131022', true ); + } + + /** + * Get featured content settings. + * + * Get all settings recognized by this module. This function + * will return all settings whether or not they have been stored + * in the database yet. This ensures that all keys are available + * at all times. + * + * In the event that you only require one setting, you may pass + * its name as the first parameter to the function and only that + * value will be returned. + * + * @static + * @access public + * @since Twenty Fourteen 1.0 + * + * @param string $key The key of a recognized setting. + * @return mixed Array of all settings by default. A single value if passed as first parameter. + */ + public static function get_setting( $key = 'all' ) { + $saved = (array) get_option( 'featured-content' ); + + $defaults = array( + 'hide-tag' => 1, + 'tag-id' => 0, + 'tag-name' => _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), + ); + + $options = wp_parse_args( $saved, $defaults ); + $options = array_intersect_key( $options, $defaults ); + + if ( 'all' != $key ) { + return isset( $options[ $key ] ) ? $options[ $key ] : false; + } + + return $options; + } + + /** + * Validate featured content settings. + * + * Make sure that all user supplied content is in an expected + * format before saving to the database. This function will also + * delete the transient set in Featured_Content::get_featured_content(). + * + * @static + * @access public + * @since Twenty Fourteen 1.0 + * + * @param array $input Array of settings input. + * @return array Validated settings output. + */ + public static function validate_settings( $input ) { + $output = array(); + + if ( empty( $input['tag-name'] ) ) { + $output['tag-id'] = 0; + } else { + $term = get_term_by( 'name', $input['tag-name'], 'post_tag' ); + + if ( $term ) { + $output['tag-id'] = $term->term_id; + } else { + $new_tag = wp_create_tag( $input['tag-name'] ); + + if ( ! is_wp_error( $new_tag ) && isset( $new_tag['term_id'] ) ) { + $output['tag-id'] = $new_tag['term_id']; + } + } + + $output['tag-name'] = $input['tag-name']; + } + + $output['hide-tag'] = isset( $input['hide-tag'] ) && $input['hide-tag'] ? 1 : 0; + + // Delete the featured post ids transient. + self::delete_transient(); + + return $output; + } +} // Featured_Content + +Featured_Content::setup(); diff --git a/wp-content/themes/twentyfourteen/inc/template-tags.php b/wp-content/themes/twentyfourteen/inc/template-tags.php new file mode 100644 index 0000000..d1f9bcf --- /dev/null +++ b/wp-content/themes/twentyfourteen/inc/template-tags.php @@ -0,0 +1,198 @@ +max_num_pages < 2 ) { + return; + } + + $paged = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1; + $pagenum_link = html_entity_decode( get_pagenum_link() ); + $query_args = array(); + $url_parts = explode( '?', $pagenum_link ); + + if ( isset( $url_parts[1] ) ) { + wp_parse_str( $url_parts[1], $query_args ); + } + + $pagenum_link = remove_query_arg( array_keys( $query_args ), $pagenum_link ); + $pagenum_link = trailingslashit( $pagenum_link ) . '%_%'; + + $format = $GLOBALS['wp_rewrite']->using_index_permalinks() && ! strpos( $pagenum_link, 'index.php' ) ? 'index.php/' : ''; + $format .= $GLOBALS['wp_rewrite']->using_permalinks() ? user_trailingslashit( 'page/%#%', 'paged' ) : '?paged=%#%'; + + // Set up paginated links. + $links = paginate_links( array( + 'base' => $pagenum_link, + 'format' => $format, + 'total' => $GLOBALS['wp_query']->max_num_pages, + 'current' => $paged, + 'mid_size' => 1, + 'add_args' => array_map( 'urlencode', $query_args ), + 'prev_text' => __( '← Previous', 'twentyfourteen' ), + 'next_text' => __( 'Next →', 'twentyfourteen' ), + ) ); + + if ( $links ) : + + ?> + + post_parent ) : get_adjacent_post( false, '', true ); + $next = get_adjacent_post( false, '', false ); + + if ( ! $next && ! $previous ) { + return; + } + + ?> + + ' . __( 'Sticky', 'twentyfourteen' ) . ''; + } + + // Set up and print post meta information. + printf( ' ', + esc_url( get_permalink() ), + esc_attr( get_the_date( 'c' ) ), + esc_html( get_the_date() ), + esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), + get_the_author() + ); +} +endif; + +/** + * Find out if blog has more than one category. + * + * @since Twenty Fourteen 1.0 + * + * @return boolean true if blog has more than 1 category + */ +function twentyfourteen_categorized_blog() { + if ( false === ( $all_the_cool_cats = get_transient( 'twentyfourteen_category_count' ) ) ) { + // Create an array of all the categories that are attached to posts + $all_the_cool_cats = get_categories( array( + 'hide_empty' => 1, + ) ); + + // Count the number of categories that are attached to the posts + $all_the_cool_cats = count( $all_the_cool_cats ); + + set_transient( 'twentyfourteen_category_count', $all_the_cool_cats ); + } + + if ( 1 !== (int) $all_the_cool_cats ) { + // This blog has more than 1 category so twentyfourteen_categorized_blog should return true + return true; + } else { + // This blog has only 1 category so twentyfourteen_categorized_blog should return false + return false; + } +} + +/** + * Flush out the transients used in twentyfourteen_categorized_blog. + * + * @since Twenty Fourteen 1.0 + */ +function twentyfourteen_category_transient_flusher() { + // Like, beat it. Dig? + delete_transient( 'twentyfourteen_category_count' ); +} +add_action( 'edit_category', 'twentyfourteen_category_transient_flusher' ); +add_action( 'save_post', 'twentyfourteen_category_transient_flusher' ); + +/** + * Display an optional post thumbnail. + * + * Wraps the post thumbnail in an anchor element on index + * views, or a div element when on single views. + * + * @since Twenty Fourteen 1.0 + */ +function twentyfourteen_post_thumbnail() { + if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) { + return; + } + + if ( is_singular() ) : + ?> + +
          + +
          + + + + + + + + 'widget_twentyfourteen_ephemera', + 'description' => __( 'Use this widget to list your recent Aside, Quote, Video, Audio, Image, Gallery, and Link posts.', 'twentyfourteen' ), + ) ); + } + + /** + * Output the HTML for this widget. + * + * @access public + * @since Twenty Fourteen 1.0 + * + * @param array $args An array of standard parameters for widgets in this theme. + * @param array $instance An array of settings for this widget instance. + */ + public function widget( $args, $instance ) { + $format = $instance['format']; + + switch ( $format ) { + case 'image': + $format_string = __( 'Images', 'twentyfourteen' ); + $format_string_more = __( 'More images', 'twentyfourteen' ); + break; + case 'video': + $format_string = __( 'Videos', 'twentyfourteen' ); + $format_string_more = __( 'More videos', 'twentyfourteen' ); + break; + case 'audio': + $format_string = __( 'Audio', 'twentyfourteen' ); + $format_string_more = __( 'More audio', 'twentyfourteen' ); + break; + case 'quote': + $format_string = __( 'Quotes', 'twentyfourteen' ); + $format_string_more = __( 'More quotes', 'twentyfourteen' ); + break; + case 'link': + $format_string = __( 'Links', 'twentyfourteen' ); + $format_string_more = __( 'More links', 'twentyfourteen' ); + break; + case 'gallery': + $format_string = __( 'Galleries', 'twentyfourteen' ); + $format_string_more = __( 'More galleries', 'twentyfourteen' ); + break; + case 'aside': + default: + $format_string = __( 'Asides', 'twentyfourteen' ); + $format_string_more = __( 'More asides', 'twentyfourteen' ); + break; + } + + $number = empty( $instance['number'] ) ? 2 : absint( $instance['number'] ); + $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? $format_string : $instance['title'], $instance, $this->id_base ); + + $ephemera = new WP_Query( array( + 'order' => 'DESC', + 'posts_per_page' => $number, + 'no_found_rows' => true, + 'post_status' => 'publish', + 'post__not_in' => get_option( 'sticky_posts' ), + 'tax_query' => array( + array( + 'taxonomy' => 'post_format', + 'terms' => array( "post-format-$format" ), + 'field' => 'slug', + 'operator' => 'IN', + ), + ), + ) ); + + if ( $ephemera->have_posts() ) : + $tmp_content_width = $GLOBALS['content_width']; + $GLOBALS['content_width'] = 306; + + echo $args['before_widget']; + ?> +

          + +

          +
            + + have_posts() ) : + $ephemera->the_post(); + $tmp_more = $GLOBALS['more']; + $GLOBALS['more'] = 0; + ?> +
          1. +
            > +
            + →', 'twentyfourteen' ) ); + else : + $images = array(); + + $galleries = get_post_galleries( get_the_ID(), false ); + if ( isset( $galleries[0]['ids'] ) ) + $images = explode( ',', $galleries[0]['ids'] ); + + if ( ! $images ) : + $images = get_posts( array( + 'fields' => 'ids', + 'numberposts' => -1, + 'order' => 'ASC', + 'orderby' => 'menu_order', + 'post_mime_type' => 'image', + 'post_parent' => get_the_ID(), + 'post_type' => 'attachment', + ) ); + endif; + + $total_images = count( $images ); + + if ( has_post_thumbnail() ) : + $post_thumbnail = get_the_post_thumbnail(); + elseif ( $total_images > 0 ) : + $image = array_shift( $images ); + $post_thumbnail = wp_get_attachment_image( $image, 'post-thumbnail' ); + endif; + + if ( ! empty ( $post_thumbnail ) ) : + ?> + + +

            + %2$s photo.', 'This gallery contains %2$s photos.', $total_images, 'twentyfourteen' ), + esc_url( get_permalink() ), + number_format_i18n( $total_images ) + ); + ?> +

            + →', 'twentyfourteen' ) ); + endif; + ?> +
            + +
            + +
            +
            +
          2. + + +
          + + →', 'twentyfourteen' ), $format_string_more ); + ?> + + formats ) ) { + $instance['format'] = $new_instance['format']; + } + + return $instance; + } + + /** + * Display the form for this widget on the Widgets page of the Admin area. + * + * @since Twenty Fourteen 1.0 + * + * @param array $instance + */ + function form( $instance ) { + $title = empty( $instance['title'] ) ? '' : esc_attr( $instance['title'] ); + $number = empty( $instance['number'] ) ? 2 : absint( $instance['number'] ); + $format = isset( $instance['format'] ) && in_array( $instance['format'], $this->formats ) ? $instance['format'] : 'aside'; + ?> +

          +

          + +

          +

          + +

          + + + +

          + + + +
          +
          + + + +
          +
          + +
          + + 781 ) { + var mastheadHeight = $( '#masthead' ).height(), + toolbarOffset, mastheadOffset; + + if ( mastheadHeight > 48 ) { + body.removeClass( 'masthead-fixed' ); + } + + if ( body.is( '.header-image' ) ) { + toolbarOffset = body.is( '.admin-bar' ) ? $( '#wpadminbar' ).height() : 0; + mastheadOffset = $( '#masthead' ).offset().top - toolbarOffset; + + _window.on( 'scroll.twentyfourteen', function() { + if ( ( window.scrollY > mastheadOffset ) && ( mastheadHeight < 49 ) ) { + body.addClass( 'masthead-fixed' ); + } else { + body.removeClass( 'masthead-fixed' ); + } + } ); + } + } + + // Focus styles for menus. + $( '.primary-navigation, .secondary-navigation' ).find( 'a' ).on( 'focus.twentyfourteen blur.twentyfourteen', function() { + $( this ).parents().toggleClass( 'focus' ); + } ); + } ); + + _window.load( function() { + // Arrange footer widgets vertically. + if ( $.isFunction( $.fn.masonry ) ) { + $( '#footer-sidebar' ).masonry( { + itemSelector: '.widget', + columnWidth: function( containerWidth ) { + return containerWidth / 4; + }, + gutterWidth: 0, + isResizable: true, + isRTL: $( 'body' ).is( '.rtl' ) + } ); + } + + // Initialize Featured Content slider. + if ( body.is( '.slider' ) ) { + $( '.featured-content' ).featuredslider( { + selector: '.featured-content-inner > article', + controlsContainer: '.featured-content' + } ); + } + } ); +} )( jQuery ); diff --git a/wp-content/themes/twentyfourteen/js/html5.js b/wp-content/themes/twentyfourteen/js/html5.js new file mode 100644 index 0000000..6168aac --- /dev/null +++ b/wp-content/themes/twentyfourteen/js/html5.js @@ -0,0 +1,8 @@ +/* + HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag(); +a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x"; +c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| +"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f); +if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d 0 && $( slider.vars.controlsContainer ); + } + + slider.doMath(); + + // INIT + slider.setup( 'init' ); + + // CONTROLNAV + methods.controlNav.setup(); + + // DIRECTIONNAV + methods.directionNav.setup(); + + // KEYBOARD + if ( $( slider.containerSelector ).length === 1 ) { + $( document ).bind( 'keyup', function( event ) { + var keycode = event.keyCode, + target = false; + if ( ! slider.animating && ( keycode === 39 || keycode === 37 ) ) { + if ( keycode === 39 ) { + target = slider.getTarget( 'next' ); + } else if ( keycode === 37 ) { + target = slider.getTarget( 'prev' ); + } + + slider.featureAnimate( target ); + } + } ); + } + + // TOUCH + if ( touch ) { + methods.touch(); + } + + $( window ).bind( 'resize orientationchange focus', methods.resize ); + + slider.find( 'img' ).attr( 'draggable', 'false' ); + }, + + controlNav: { + setup: function() { + methods.controlNav.setupPaging(); + }, + setupPaging: function() { + var type = 'control-paging', + j = 1, + item, + slide, + i; + + slider.controlNavScaffold = $( '
            ' ); + + if ( slider.pagingCount > 1 ) { + for ( i = 0; i < slider.pagingCount; i++ ) { + slide = slider.slides.eq( i ); + item = '' + j + ''; + slider.controlNavScaffold.append( '
          1. ' + item + '
          2. ' ); + j++; + } + } + + // CONTROLSCONTAINER + ( slider.controlsContainer ) ? $( slider.controlsContainer ).append( slider.controlNavScaffold ) : slider.append( slider.controlNavScaffold ); + methods.controlNav.set(); + + methods.controlNav.active(); + + slider.controlNavScaffold.delegate( 'a, img', eventType, function( event ) { + event.preventDefault(); + + if ( watchedEvent === '' || watchedEvent === event.type ) { + var $this = $( this ), + target = slider.controlNav.index( $this ); + + if ( ! $this.hasClass( namespace + 'active' ) ) { + slider.direction = ( target > slider.currentSlide ) ? 'next' : 'prev'; + slider.featureAnimate( target ); + } + } + + // Set up flags to prevent event duplication. + if ( watchedEvent === '' ) { + watchedEvent = event.type; + } + + methods.setToClearWatchedEvent(); + } ); + }, + set: function() { + var selector = 'a'; + slider.controlNav = $( '.' + namespace + 'control-nav li ' + selector, ( slider.controlsContainer ) ? slider.controlsContainer : slider ); + }, + active: function() { + slider.controlNav.removeClass( namespace + 'active' ).eq( slider.animatingTo ).addClass( namespace + 'active' ); + }, + update: function( action, pos ) { + if ( slider.pagingCount > 1 && action === 'add' ) { + slider.controlNavScaffold.append( $( '
          3. ' + slider.count + '
          4. ' ) ); + } else if ( slider.pagingCount === 1 ) { + slider.controlNavScaffold.find( 'li' ).remove(); + } else { + slider.controlNav.eq( pos ).closest( 'li' ).remove(); + } + methods.controlNav.set(); + ( slider.pagingCount > 1 && slider.pagingCount !== slider.controlNav.length ) ? slider.update( pos, action ) : methods.controlNav.active(); + } + }, + + directionNav: { + setup: function() { + var directionNavScaffold = $( '' ); + + // CONTROLSCONTAINER + if ( slider.controlsContainer ) { + $( slider.controlsContainer ).append( directionNavScaffold ); + slider.directionNav = $( '.' + namespace + 'direction-nav li a', slider.controlsContainer ); + } else { + slider.append( directionNavScaffold ); + slider.directionNav = $( '.' + namespace + 'direction-nav li a', slider ); + } + + methods.directionNav.update(); + + slider.directionNav.bind( eventType, function( event ) { + event.preventDefault(); + var target; + + if ( watchedEvent === '' || watchedEvent === event.type ) { + target = ( $( this ).hasClass( namespace + 'next' ) ) ? slider.getTarget( 'next' ) : slider.getTarget( 'prev' ); + slider.featureAnimate( target ); + } + + // Set up flags to prevent event duplication. + if ( watchedEvent === '' ) { + watchedEvent = event.type; + } + + methods.setToClearWatchedEvent(); + } ); + }, + update: function() { + var disabledClass = namespace + 'disabled'; + if ( slider.pagingCount === 1 ) { + slider.directionNav.addClass( disabledClass ).attr( 'tabindex', '-1' ); + } else { + slider.directionNav.removeClass( disabledClass ).removeAttr( 'tabindex' ); + } + } + }, + + touch: function() { + var startX, + startY, + offset, + cwidth, + dx, + startT, + scrolling = false, + localX = 0, + localY = 0, + accDx = 0; + + if ( ! msGesture ) { + el.addEventListener( 'touchstart', onTouchStart, false ); + } else { + el.style.msTouchAction = 'none'; + el._gesture = new MSGesture(); // MSFT specific. + el._gesture.target = el; + el.addEventListener( 'MSPointerDown', onMSPointerDown, false ); + el._slider = slider; + el.addEventListener( 'MSGestureChange', onMSGestureChange, false ); + el.addEventListener( 'MSGestureEnd', onMSGestureEnd, false ); + } + + function onTouchStart( e ) { + if ( slider.animating ) { + e.preventDefault(); + } else if ( ( window.navigator.msPointerEnabled ) || e.touches.length === 1 ) { + cwidth = slider.w; + startT = Number( new Date() ); + + // Local vars for X and Y points. + localX = e.touches[0].pageX; + localY = e.touches[0].pageY; + + offset = ( slider.currentSlide + slider.cloneOffset ) * cwidth; + if ( slider.animatingTo === slider.last && slider.direction !== 'next' ) { + offset = 0; + } + + startX = localX; + startY = localY; + + el.addEventListener( 'touchmove', onTouchMove, false ); + el.addEventListener( 'touchend', onTouchEnd, false ); + } + } + + function onTouchMove( e ) { + // Local vars for X and Y points. + localX = e.touches[0].pageX; + localY = e.touches[0].pageY; + + dx = startX - localX; + scrolling = Math.abs( dx ) < Math.abs( localY - startY ); + + if ( ! scrolling ) { + e.preventDefault(); + if ( slider.transitions ) { + slider.setProps( offset + dx, 'setTouch' ); + } + } + } + + function onTouchEnd() { + // Finish the touch by undoing the touch session. + el.removeEventListener( 'touchmove', onTouchMove, false ); + + if ( slider.animatingTo === slider.currentSlide && ! scrolling && dx !== null ) { + var updateDx = dx, + target = ( updateDx > 0 ) ? slider.getTarget( 'next' ) : slider.getTarget( 'prev' ); + + slider.featureAnimate( target ); + } + el.removeEventListener( 'touchend', onTouchEnd, false ); + + startX = null; + startY = null; + dx = null; + offset = null; + } + + function onMSPointerDown( e ) { + e.stopPropagation(); + if ( slider.animating ) { + e.preventDefault(); + } else { + el._gesture.addPointer( e.pointerId ); + accDx = 0; + cwidth = slider.w; + startT = Number( new Date() ); + offset = ( slider.currentSlide + slider.cloneOffset ) * cwidth; + if ( slider.animatingTo === slider.last && slider.direction !== 'next' ) { + offset = 0; + } + } + } + + function onMSGestureChange( e ) { + e.stopPropagation(); + var slider = e.target._slider, + transX, + transY; + if ( ! slider ) { + return; + } + + transX = -e.translationX, + transY = -e.translationY; + + // Accumulate translations. + accDx = accDx + transX; + dx = accDx; + scrolling = Math.abs( accDx ) < Math.abs( -transY ); + + if ( e.detail === e.MSGESTURE_FLAG_INERTIA ) { + setImmediate( function () { // MSFT specific. + el._gesture.stop(); + } ); + + return; + } + + if ( ! scrolling || Number( new Date() ) - startT > 500 ) { + e.preventDefault(); + if ( slider.transitions ) { + slider.setProps( offset + dx, 'setTouch' ); + } + } + } + + function onMSGestureEnd( e ) { + e.stopPropagation(); + var slider = e.target._slider, + updateDx, + target; + if ( ! slider ) { + return; + } + + if ( slider.animatingTo === slider.currentSlide && ! scrolling && dx !== null ) { + updateDx = dx, + target = ( updateDx > 0 ) ? slider.getTarget( 'next' ) : slider.getTarget( 'prev' ); + + slider.featureAnimate( target ); + } + + startX = null; + startY = null; + dx = null; + offset = null; + accDx = 0; + } + }, + + resize: function() { + if ( ! slider.animating && slider.is( ':visible' ) ) { + slider.doMath(); + + // SMOOTH HEIGHT + methods.smoothHeight(); + slider.newSlides.width( slider.computedW ); + slider.setProps( slider.computedW, 'setTotal' ); + } + }, + + smoothHeight: function( dur ) { + var $obj = slider.viewport; + ( dur ) ? $obj.animate( { 'height': slider.slides.eq( slider.animatingTo ).height() }, dur ) : $obj.height( slider.slides.eq( slider.animatingTo ).height() ); + }, + + setToClearWatchedEvent: function() { + clearTimeout( watchedEventClearTimer ); + watchedEventClearTimer = setTimeout( function() { + watchedEvent = ''; + }, 3000 ); + } + }; + + // Public methods. + slider.featureAnimate = function( target ) { + if ( target !== slider.currentSlide ) { + slider.direction = ( target > slider.currentSlide ) ? 'next' : 'prev'; + } + + if ( ! slider.animating && slider.is( ':visible' ) ) { + slider.animating = true; + slider.animatingTo = target; + + // CONTROLNAV + methods.controlNav.active(); + + slider.slides.removeClass( namespace + 'active-slide' ).eq( target ).addClass( namespace + 'active-slide' ); + + slider.atEnd = target === 0 || target === slider.last; + + // DIRECTIONNAV + methods.directionNav.update(); + + var dimension = slider.computedW, + slideString; + + if ( slider.currentSlide === 0 && target === slider.count - 1 && slider.direction !== 'next' ) { + slideString = 0; + } else if ( slider.currentSlide === slider.last && target === 0 && slider.direction !== 'prev' ) { + slideString = ( slider.count + 1 ) * dimension; + } else { + slideString = ( target + slider.cloneOffset ) * dimension; + } + slider.setProps( slideString, '', slider.vars.animationSpeed ); + if ( slider.transitions ) { + if ( ! slider.atEnd ) { + slider.animating = false; + slider.currentSlide = slider.animatingTo; + } + slider.container.unbind( 'webkitTransitionEnd transitionend' ); + slider.container.bind( 'webkitTransitionEnd transitionend', function() { + slider.wrapup( dimension ); + } ); + } else { + slider.container.animate( slider.args, slider.vars.animationSpeed, 'swing', function() { + slider.wrapup( dimension ); + } ); + } + + // SMOOTH HEIGHT + methods.smoothHeight( slider.vars.animationSpeed ); + } + }; + + slider.wrapup = function( dimension ) { + if ( slider.currentSlide === 0 && slider.animatingTo === slider.last ) { + slider.setProps( dimension, 'jumpEnd' ); + } else if ( slider.currentSlide === slider.last && slider.animatingTo === 0 ) { + slider.setProps( dimension, 'jumpStart' ); + } + slider.animating = false; + slider.currentSlide = slider.animatingTo; + }; + + slider.getTarget = function( dir ) { + slider.direction = dir; + + // Swap for RTL. + if ( slider.isRtl ) { + dir = 'next' === dir ? 'prev' : 'next'; + } + + if ( dir === 'next' ) { + return ( slider.currentSlide === slider.last ) ? 0 : slider.currentSlide + 1; + } else { + return ( slider.currentSlide === 0 ) ? slider.last : slider.currentSlide - 1; + } + }; + + slider.setProps = function( pos, special, dur ) { + var target = ( function() { + var posCalc = ( function() { + switch ( special ) { + case 'setTotal': return ( slider.currentSlide + slider.cloneOffset ) * pos; + case 'setTouch': return pos; + case 'jumpEnd': return slider.count * pos; + case 'jumpStart': return pos; + default: return pos; + } + }() ); + + return ( posCalc * -1 ) + 'px'; + }() ); + + if ( slider.transitions ) { + target = 'translate3d(' + target + ',0,0 )'; + dur = ( dur !== undefined ) ? ( dur / 1000 ) + 's' : '0s'; + slider.container.css( '-' + slider.pfx + '-transition-duration', dur ); + } + + slider.args[slider.prop] = target; + if ( slider.transitions || dur === undefined ) { + slider.container.css( slider.args ); + } + }; + + slider.setup = function( type ) { + var sliderOffset; + + if ( type === 'init' ) { + slider.viewport = $( '
            ' ).css( { 'overflow': 'hidden', 'position': 'relative' } ).appendTo( slider ).append( slider.container ); + slider.cloneCount = 0; + slider.cloneOffset = 0; + } + slider.cloneCount = 2; + slider.cloneOffset = 1; + // Clear out old clones. + if ( type !== 'init' ) { + slider.container.find( '.clone' ).remove(); + } + + slider.container.append( slider.slides.first().clone().addClass( 'clone' ).attr( 'aria-hidden', 'true' ) ).prepend( slider.slides.last().clone().addClass( 'clone' ).attr( 'aria-hidden', 'true' ) ); + slider.newSlides = $( slider.vars.selector, slider ); + + sliderOffset = slider.currentSlide + slider.cloneOffset; + slider.container.width( ( slider.count + slider.cloneCount ) * 200 + '%' ); + slider.setProps( sliderOffset * slider.computedW, 'init' ); + setTimeout( function() { + slider.doMath(); + slider.newSlides.css( { 'width': slider.computedW, 'float': 'left', 'display': 'block' } ); + // SMOOTH HEIGHT + methods.smoothHeight(); + }, ( type === 'init' ) ? 100 : 0 ); + + slider.slides.removeClass( namespace + 'active-slide' ).eq( slider.currentSlide ).addClass( namespace + 'active-slide' ); + }; + + slider.doMath = function() { + var slide = slider.slides.first(); + + slider.w = ( slider.viewport===undefined ) ? slider.width() : slider.viewport.width(); + slider.h = slide.height(); + slider.boxPadding = slide.outerWidth() - slide.width(); + + slider.itemW = slider.w; + slider.pagingCount = slider.count; + slider.last = slider.count - 1; + slider.computedW = slider.itemW - slider.boxPadding; + }; + + slider.update = function( pos, action ) { + slider.doMath(); + + // Update currentSlide and slider.animatingTo if necessary. + if ( pos < slider.currentSlide ) { + slider.currentSlide += 1; + } else if ( pos <= slider.currentSlide && pos !== 0 ) { + slider.currentSlide -= 1; + } + slider.animatingTo = slider.currentSlide; + + // Update controlNav. + if ( action === 'add' || slider.pagingCount > slider.controlNav.length ) { + methods.controlNav.update( 'add' ); + } else if ( action === 'remove' || slider.pagingCount < slider.controlNav.length ) { + if ( slider.currentSlide > slider.last ) { + slider.currentSlide -= 1; + slider.animatingTo -= 1; + } + methods.controlNav.update( 'remove', slider.last ); + } + // Update directionNav. + methods.directionNav.update(); + }; + + // FeaturedSlider: initialize. + methods.init(); + }; + + // Default settings. + $.featuredslider.defaults = { + namespace: 'slider-', // String: prefix string attached to the class of every element generated by the plugin. + selector: '.slides > li', // String: selector, must match a simple pattern. + animationSpeed: 600, // Integer: Set the speed of animations, in milliseconds. + controlsContainer: '', // jQuery Object/Selector: container navigation to append elements. + + // Text labels. + prevText: featuredSliderDefaults.prevText, // String: Set the text for the "previous" directionNav item. + nextText: featuredSliderDefaults.nextText // String: Set the text for the "next" directionNav item. + }; + + // FeaturedSlider: plugin function. + $.fn.featuredslider = function( options ) { + if ( options === undefined ) { + options = {}; + } + + if ( typeof options === 'object' ) { + return this.each( function() { + var $this = $( this ), + selector = ( options.selector ) ? options.selector : '.slides > li', + $slides = $this.find( selector ); + + if ( $slides.length === 1 || $slides.length === 0 ) { + $slides.fadeIn( 400 ); + } else if ( $this.data( 'featuredslider' ) === undefined ) { + new $.featuredslider( this, options ); + } + } ); + } + }; +} )( jQuery ); diff --git a/wp-content/themes/twentyfourteen/languages/twentyfourteen.pot b/wp-content/themes/twentyfourteen/languages/twentyfourteen.pot new file mode 100644 index 0000000..3cd1327 --- /dev/null +++ b/wp-content/themes/twentyfourteen/languages/twentyfourteen.pot @@ -0,0 +1,467 @@ +# Copyright (C) 2014 the WordPress team +# This file is distributed under the GNU General Public License v2 or later. +msgid "" +msgstr "" +"Project-Id-Version: Twenty Fourteen 1.1\n" +"Report-Msgid-Bugs-To: http://wordpress.org/tags/twentyfourteen\n" +"POT-Creation-Date: 2014-04-16 18:29:37+00:00\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" + +#: 404.php:17 +msgid "Not Found" +msgstr "" + +#: 404.php:21 +msgid "It looks like nothing was found at this location. Maybe try a search?" +msgstr "" + +#: archive.php:31 +msgid "Daily Archives: %s" +msgstr "" + +#: archive.php:34 +msgid "Monthly Archives: %s" +msgstr "" + +#: archive.php:34 +msgctxt "monthly archives date format" +msgid "F Y" +msgstr "" + +#: archive.php:37 +msgid "Yearly Archives: %s" +msgstr "" + +#: archive.php:37 +msgctxt "yearly archives date format" +msgid "Y" +msgstr "" + +#: archive.php:40 taxonomy-post_format.php:51 +msgid "Archives" +msgstr "" + +#: author.php:31 +msgid "All posts by %s" +msgstr "" + +#: category.php:20 +msgid "Category Archives: %s" +msgstr "" + +#: comments.php:27 +msgid "One thought on “%2$s”" +msgid_plural "%1$s thoughts on “%2$s”" +msgstr[0] "" +msgstr[1] "" + +#: comments.php:34 comments.php:52 +msgid "Comment navigation" +msgstr "" + +#: comments.php:35 comments.php:53 +msgid "← Older Comments" +msgstr "" + +#: comments.php:36 comments.php:54 +msgid "Newer Comments →" +msgstr "" + +#: comments.php:59 +msgid "Comments are closed." +msgstr "" + +#: content-aside.php:17 content-audio.php:17 content-featured-post.php:28 +#: content-gallery.php:17 content-image.php:17 content-link.php:17 +#: content-quote.php:17 content-video.php:17 content.php:19 +msgctxt "Used between list items, there is a space after the comma." +msgid ", " +msgstr "" + +#: content-aside.php:37 content-audio.php:37 content-gallery.php:37 +#: content-image.php:37 content-link.php:37 content-quote.php:37 +#: content-video.php:37 content.php:38 inc/widgets.php:194 +msgid "Leave a comment" +msgstr "" + +#: content-aside.php:37 content-audio.php:37 content-gallery.php:37 +#: content-image.php:37 content-link.php:37 content-quote.php:37 +#: content-video.php:37 content.php:38 inc/widgets.php:194 +msgid "1 Comment" +msgstr "" + +#: content-aside.php:37 content-audio.php:37 content-gallery.php:37 +#: content-image.php:37 content-link.php:37 content-quote.php:37 +#: content-video.php:37 content.php:38 inc/widgets.php:194 +msgid "% Comments" +msgstr "" + +#: content-aside.php:40 content-audio.php:40 content-gallery.php:40 +#: content-image.php:40 content-link.php:40 content-page.php:28 +#: content-quote.php:40 content-video.php:40 content.php:42 image.php:34 +#: page-templates/contributors.php:35 +msgid "Edit" +msgstr "" + +#: content-aside.php:46 content-audio.php:46 content-gallery.php:46 +#: content-image.php:46 content-link.php:46 content-quote.php:46 +#: content-video.php:46 content.php:54 inc/widgets.php:127 inc/widgets.php:172 +msgid "Continue reading " +msgstr "" + +#: content-aside.php:48 content-audio.php:48 content-gallery.php:48 +#: content-image.php:48 content-link.php:48 content-page.php:22 +#: content-quote.php:48 content-video.php:48 content.php:56 image.php:54 +msgid "Pages:" +msgstr "" + +#: content-none.php:12 +msgid "Nothing Found" +msgstr "" + +#: content-none.php:18 +msgid "" +"Ready to publish your first post? Get started here." +msgstr "" + +#: content-none.php:22 +msgid "" +"Sorry, but nothing matched your search terms. Please try again with some " +"different keywords." +msgstr "" + +#: content-none.php:27 +msgid "" +"It seems we can’t find what you’re looking for. Perhaps " +"searching can help." +msgstr "" + +#. #-#-#-#-# twentyfourteen.pot (Twenty Fourteen 1.0) #-#-#-#-# +#. Author URI of the plugin/theme +#: footer.php:21 +msgid "http://wordpress.org/" +msgstr "" + +#: footer.php:21 +msgid "Proudly powered by %s" +msgstr "" + +#: functions.php:83 +msgid "Top primary menu" +msgstr "" + +#: functions.php:84 +msgid "Secondary menu in left sidebar" +msgstr "" + +#: functions.php:171 +msgid "Primary Sidebar" +msgstr "" + +#: functions.php:173 +msgid "Main sidebar that appears on the left." +msgstr "" + +#: functions.php:180 +msgid "Content Sidebar" +msgstr "" + +#: functions.php:182 +msgid "Additional sidebar that appears on the right." +msgstr "" + +#: functions.php:189 +msgid "Footer Widget Area" +msgstr "" + +#: functions.php:191 +msgid "Appears in the footer section of the site." +msgstr "" + +#: functions.php:213 +msgctxt "Lato font: on or off" +msgid "on" +msgstr "" + +#: functions.php:254 +msgid "Previous" +msgstr "" + +#: functions.php:255 +msgid "Next" +msgstr "" + +#: functions.php:372 +msgid "%d Article" +msgid_plural "%d Articles" +msgstr[0] "" +msgstr[1] "" + +#: functions.php:488 +msgid "Page %s" +msgstr "" + +#: header.php:48 +msgid "Search" +msgstr "" + +#: header.php:52 +msgid "Primary Menu" +msgstr "" + +#: header.php:53 +msgid "Skip to content" +msgstr "" + +#: image.php:65 +msgid "Previous Image" +msgstr "" + +#: image.php:66 +msgid "Next Image" +msgstr "" + +#: inc/back-compat.php:37 inc/back-compat.php:47 inc/back-compat.php:60 +msgid "" +"Twenty Fourteen requires at least WordPress version 3.6. You are running " +"version %s. Please upgrade and try again." +msgstr "" + +#: inc/customizer.php:19 inc/customizer.php:20 +msgid "Background may only be visible on wide screens." +msgstr "" + +#: inc/customizer.php:28 +msgid "Site Title Color" +msgstr "" + +#: inc/customizer.php:31 +msgid "Display Site Title & Tagline" +msgstr "" + +#: inc/customizer.php:35 inc/featured-content.php:408 +msgid "Featured Content" +msgstr "" + +#: inc/customizer.php:36 inc/featured-content.php:409 +msgid "" +"Use a tag to feature your posts. If no posts match the " +"tag, sticky posts will be displayed instead." +msgstr "" + +#: inc/customizer.php:37 inc/customizer.php:102 inc/featured-content.php:410 +#: inc/featured-content.php:419 inc/featured-content.php:479 +msgctxt "featured content default tag slug" +msgid "featured" +msgstr "" + +#: inc/customizer.php:50 +msgid "Layout" +msgstr "" + +#: inc/customizer.php:54 +msgid "Grid" +msgstr "" + +#: inc/customizer.php:55 +msgid "Slider" +msgstr "" + +#. #-#-#-#-# twentyfourteen.pot (Twenty Fourteen 1.0) #-#-#-#-# +#. Theme Name of the plugin/theme +#: inc/customizer.php:99 +msgid "Twenty Fourteen" +msgstr "" + +#: inc/customizer.php:102 +msgid "" +"The home page features your choice of up to 6 posts prominently displayed in " +"a grid or slider, controlled by a tag; you can change " +"the tag and layout in Appearance → Customize. If " +"no posts match the tag, sticky posts will be displayed " +"instead." +msgstr "" + +#: inc/customizer.php:103 +msgid "" +"Enhance your site design by using Featured Images for " +"posts you’d like to stand out (also known as post thumbnails). This " +"allows you to associate an image with your post without inserting it. Twenty " +"Fourteen uses featured images for posts and pages—above the " +"title—and in the Featured Content area on the home page." +msgstr "" + +#: inc/customizer.php:104 +msgid "" +"For an in-depth tutorial, and more tips and tricks, visit the Twenty Fourteen documentation." +msgstr "" + +#: inc/featured-content.php:431 +msgid "Tag Name" +msgstr "" + +#: inc/featured-content.php:436 +msgid "Don’t display tag on front end." +msgstr "" + +#: inc/template-tags.php:45 +msgid "← Previous" +msgstr "" + +#: inc/template-tags.php:46 +msgid "Next →" +msgstr "" + +#: inc/template-tags.php:53 +msgid "Posts navigation" +msgstr "" + +#: inc/template-tags.php:80 +msgid "Post navigation" +msgstr "" + +#: inc/template-tags.php:84 +msgid "Published In%title" +msgstr "" + +#: inc/template-tags.php:86 +msgid "Previous Post%title" +msgstr "" + +#: inc/template-tags.php:87 +msgid "Next Post%title" +msgstr "" + +#: inc/template-tags.php:104 +msgid "Sticky" +msgstr "" + +#: inc/widgets.php:34 +msgid "Twenty Fourteen Ephemera" +msgstr "" + +#: inc/widgets.php:36 +msgid "" +"Use this widget to list your recent Aside, Quote, Video, Audio, Image, " +"Gallery, and Link posts." +msgstr "" + +#: inc/widgets.php:54 taxonomy-post_format.php:33 +msgid "Images" +msgstr "" + +#: inc/widgets.php:55 +msgid "More images" +msgstr "" + +#: inc/widgets.php:58 taxonomy-post_format.php:36 +msgid "Videos" +msgstr "" + +#: inc/widgets.php:59 +msgid "More videos" +msgstr "" + +#: inc/widgets.php:62 taxonomy-post_format.php:39 +msgid "Audio" +msgstr "" + +#: inc/widgets.php:63 +msgid "More audio" +msgstr "" + +#: inc/widgets.php:66 taxonomy-post_format.php:42 +msgid "Quotes" +msgstr "" + +#: inc/widgets.php:67 +msgid "More quotes" +msgstr "" + +#: inc/widgets.php:70 taxonomy-post_format.php:45 +msgid "Links" +msgstr "" + +#: inc/widgets.php:71 +msgid "More links" +msgstr "" + +#: inc/widgets.php:74 taxonomy-post_format.php:48 +msgid "Galleries" +msgstr "" + +#: inc/widgets.php:75 +msgid "More galleries" +msgstr "" + +#: inc/widgets.php:79 taxonomy-post_format.php:30 +msgid "Asides" +msgstr "" + +#: inc/widgets.php:80 +msgid "More asides" +msgstr "" + +#: inc/widgets.php:162 +msgid "This gallery contains %2$s photo." +msgid_plural "" +"This gallery contains %2$s photos." +msgstr[0] "" +msgstr[1] "" + +#. translators: used with More archives link +#: inc/widgets.php:206 +msgid "%s " +msgstr "" + +#: inc/widgets.php:255 +msgid "Title:" +msgstr "" + +#: inc/widgets.php:258 +msgid "Number of posts to show:" +msgstr "" + +#: inc/widgets.php:261 +msgid "Post format to show:" +msgstr "" + +#: search.php:18 +msgid "Search Results for: %s" +msgstr "" + +#: tag.php:22 +msgid "Tag Archives: %s" +msgstr "" + +#. Theme URI of the plugin/theme +msgid "http://wordpress.org/themes/twentyfourteen" +msgstr "" + +#. Description of the plugin/theme +msgid "" +"In 2014, our default theme lets you create a responsive magazine website " +"with a sleek, modern design. Feature your favorite homepage content in " +"either a grid or a slider. Use the three widget areas to customize your " +"website, and change your content's layout with a full-width page template " +"and a contributor page to show off your authors. Creating a magazine website " +"with WordPress has never been easier." +msgstr "" + +#. Author of the plugin/theme +msgid "the WordPress team" +msgstr "" + +#. Template Name of the plugin/theme +msgid "Contributor Page" +msgstr "" + +#. Template Name of the plugin/theme +msgid "Full Width Page" +msgstr "" diff --git a/wp-content/themes/twentyfourteen/page-templates/contributors.php b/wp-content/themes/twentyfourteen/page-templates/contributors.php new file mode 100644 index 0000000..92602ab --- /dev/null +++ b/wp-content/themes/twentyfourteen/page-templates/contributors.php @@ -0,0 +1,52 @@ + + +
            + + + +
            +
            + + +
            > +

            ', '

            ' ); + + // Output the authors list. + twentyfourteen_list_authors(); + + edit_post_link( __( 'Edit', 'twentyfourteen' ), '
            ', '
            ' ); + ?> +
            + + +
            +
            +
            + + + +
            + + + +
            +
            + +
            +
            +
            + + + +
            + + +
            +
            + + + +
            +
            + +
            + + ul, +li > ol { + margin: 0 20px 0 0; +} + +caption, +th, +td { + text-align: right; +} + + +/** + * 2.0 Repeatable Patterns + * ----------------------------------------------------------------------------- + */ + +.wp-caption-text { + padding-left: 10px; + padding-right: 0; +} + +.screen-reader-text:focus { + right: 5px; + left: auto; +} + + +/** + * 4.0 Header + * ----------------------------------------------------------------------------- + */ + +.site-title { + float: right; +} + +.search-toggle { + float: left; + margin-left: 38px; + margin-right: auto; +} + +.search-box .search-field { + float: left; + padding: 1px 6px 2px 2px; +} + +.search-toggle .screen-reader-text { + right: 5px; /* Avoid a horizontal scrollbar when the site has a long menu */ + left: auto; +} + + +/** + * 5.0 Navigation + * ----------------------------------------------------------------------------- + */ + +.site-navigation ul ul { + margin-right: 20px; + margin-left: auto; +} + +.menu-toggle { + right: auto; + left: 0; +} + + +/** + * 6.0 Content + * ----------------------------------------------------------------------------- + */ + +/** + * 6.3 Entry Meta + * ----------------------------------------------------------------------------- + */ + +.entry-meta .tag-links a { + margin: 0 10px 4px 4px; +} + +.entry-meta .tag-links a:before { + border-right: 0; + border-left: 8px solid #767676; + right: -7px; + left: auto; +} + +.entry-meta .tag-links a:hover:before, +.entry-meta .tag-links a:focus:before { + border-left-color: #41a62a; +} + +.entry-meta .tag-links a:after { + right: -2px; + left: auto; +} + + +/** + * 6.4 Entry Content + * ----------------------------------------------------------------------------- + */ + +.page-links a, +.page-links > span { + margin: 0 0 2px 1px; +} + +.page-links > .page-links-title { + padding-right: 0; + padding-left: 7px; +} + + +/** + * 6.5 Galleries + * ----------------------------------------------------------------------------- + */ + +.gallery-item { + float: right; + margin: 0 0 4px 4px; +} + +.gallery-columns-1 .gallery-item:nth-of-type(1n), +.gallery-columns-2 .gallery-item:nth-of-type(2n), +.gallery-columns-3 .gallery-item:nth-of-type(3n), +.gallery-columns-4 .gallery-item:nth-of-type(4n), +.gallery-columns-5 .gallery-item:nth-of-type(5n), +.gallery-columns-6 .gallery-item:nth-of-type(6n), +.gallery-columns-7 .gallery-item:nth-of-type(7n), +.gallery-columns-8 .gallery-item:nth-of-type(8n), +.gallery-columns-9 .gallery-item:nth-of-type(9n) { + margin-right: auto; + margin-left: 0; +} + +.gallery-caption { + padding: 6px 8px; + right: 0; + left: auto; + text-align: right; +} + +.gallery-caption:before { + right: 0; + left: auto; +} + + +/** + * 6.7 Post/Image/Paging Navigation + * ----------------------------------------------------------------------------- + */ + +.paging-navigation .page-numbers { + margin-right: auto; + margin-left: 1px; +} + + +/** + * 6.10 Contributor Page + * ----------------------------------------------------------------------------- + */ + +.contributor-avatar { + float: right; + margin: 0 0 20px 30px; +} + + +/** + * 6.14 Comments + * ----------------------------------------------------------------------------- + */ + +.comment-author .avatar { + right: 0; + left: auto; +} + +.bypostauthor > article .fn:before { + margin: 0 -2px 0 2px; +} + +.comment-author, +.comment-awaiting-moderation, +.comment-content, +.comment-list .reply, +.comment-metadata { + padding-right: 30px; + padding-left: 0; +} + +.comment-edit-link { + margin-right: 10px; + margin-left: auto; +} + +.comment-reply-link:before, +.comment-reply-login:before { + margin-left: auto; + margin-right: 2px; +} + +.comment-reply-link:before, +.comment-reply-login:before, +.comment-edit-link:before { + -webkit-transform: scaleX(-1); + -moz-transform: scaleX(-1); + -ms-transform: scaleX(-1); + -o-transform: scaleX(-1); + transform: scaleX(-1); +} + +.comment-content ul, +.comment-content ol { + margin: 0 22px 24px 0; +} + +.comment-list .children { + margin-right: 15px; + margin-left: auto; +} + +.comment-reply-title small a { + float: left; +} + +.comment-navigation .nav-previous a { + margin-right: auto; + margin-left: 10px; +} + + +/** + * 7.0 Sidebars + * ----------------------------------------------------------------------------- + */ + +/** + * 7.1 Widgets + * ----------------------------------------------------------------------------- + */ + +.widget li > ol, +.widget li > ul { + margin-right: 10px; + margin-left: auto; +} + +.widget input, +.widget textarea { + padding: 1px 4px 2px 2px; +} + +.widget_calendar caption { + text-align: right; +} + +.widget_calendar #prev { + padding-right: 5px; + padding-left: 0; +} + +.widget_calendar #next { + padding-right: 0; + padding-left: 5px; + text-align: left; +} + +.widget_twentyfourteen_ephemera .entry-content ul, +.widget_twentyfourteen_ephemera .entry-content ol { + margin: 0 20px 18px 0; +} + +.widget_twentyfourteen_ephemera .entry-content li > ul, +.widget_twentyfourteen_ephemera .entry-content li > ol { + margin: 0 20px 0 0; +} + + +/** + * 7.2 Content Sidebar Widgets + * ----------------------------------------------------------------------------- + */ + +.content-sidebar .widget li > ol, +.content-sidebar .widget li > ul { + margin-right: 18px; + margin-left: auto; +} + +.content-sidebar .widget_twentyfourteen_ephemera .widget-title:before { + margin: -1px 0 0 18px; +} + + +/** + * 9.0 Featured Content + * ----------------------------------------------------------------------------- + */ + +.featured-content .post-thumbnail img { + right: 0; + left: auto; +} + +.slider-viewport { + direction: ltr; +} + +.slider .featured-content .entry-header { + right: 0; + left: auto; + text-align: right; +} + +.slider-control-paging { + float: right; +} + +.slider-control-paging li { + float: right; + margin: 2px 0 2px 4px; +} + +.slider-control-paging li:last-child { + margin-right: auto; + margin-left: 0; +} + +.slider-control-paging a:before { + right: 10px; + left: auto; +} + +.slider-direction-nav li { + border-width: 2px 0 0 1px; + float: right; +} + +.slider-direction-nav li:last-child { + border-width: 2px 1px 0 0; +} + +.slider-direction-nav a:before { + content: "\f429"; +} + +.slider-direction-nav .slider-next:before { + content: "\f430"; +} + + +/** + * 10.0 Media Queries + * ----------------------------------------------------------------------------- + */ + +@media screen and (max-width: 400px) { + .list-view .site-content .post-thumbnail img { + float: right; + margin: 0 0 3px 10px; + } +} + +@media screen and (min-width: 401px) { + .site-content .entry-meta > span { + margin-right: auto; + margin-left: 10px; + } + + .site-content .format-quote .post-format a:before { + margin-right: auto; + margin-left: 2px; + } + + .site-content .format-gallery .post-format a:before { + margin-right: auto; + margin-left: 4px; + } + + .site-content .format-aside .post-format a:before { + margin-right: auto; + margin-left: 2px; + } + + .site-content .featured-post:before { + margin-right: auto; + margin-left: 3px; + } + + .site-content .entry-date a:before, + .attachment .site-content span.entry-date:before { + margin-right: auto; + margin-left: 1px; + } + + .site-content .comments-link a:before { + margin-right: auto; + margin-left: 2px; + } + + .site-content .full-size-link a:before { + margin-right: auto; + margin-left: 1px; + } + + .entry-content .edit-link a:before, + .entry-meta .edit-link a:before { + -webkit-transform: scaleX(-1); + -moz-transform: scaleX(-1); + -ms-transform: scaleX(-1); + -o-transform: scaleX(-1); + transform: scaleX(-1); + } +} + +@media screen and (min-width: 594px) { + .site-content .entry-header { + padding-right: 30px; + padding-left: 30px; + } +} + +@media screen and (min-width: 673px) { + .search-toggle { + margin-right: auto; + margin-left: 18px; + } + + .content-area { + float: right; + } + + .site-content { + margin-right: auto; + margin-left: 33.33333333%; + } + + .archive-header, + .comments-area, + .image-navigation, + .page-header, + .page-content, + .post-navigation, + .site-content .entry-content, + .site-content .entry-summary, + .site-content footer.entry-meta { + padding-right: 30px; + padding-left: 30px; + } + + .full-width .site-content { + margin-left: 0; + } + + .content-sidebar { + float: left; + margin-right: -33.33333333%; + margin-left: auto; + } + + .grid .featured-content .hentry { + float: right; + } + + .slider-control-paging { + padding-right: 20px; + padding-left: 0; + } + + .slider-direction-nav { + float: left; + } + + .slider-direction-nav li { + padding: 0 0 0 1px; + } + + .slider-direction-nav li:last-child { + padding: 0 1px 0 0; + } +} + +@media screen and (min-width: 783px) { + .header-main { + padding-right: 30px; + padding-left: 0; + } + + .search-toggle { + margin-right: auto; + margin-left: 0; + } + + .primary-navigation { + float: left; + margin: 0 -12px 0 1px; + } + + .primary-navigation ul ul { + float: right; + margin: 0; + right: -999em; + left: auto; + } + + .primary-navigation ul ul ul { + right: -999em; + left: auto; + } + + .primary-navigation ul li:hover > ul, + .primary-navigation ul li.focus > ul { + right: auto; + } + + .primary-navigation ul ul li:hover > ul, + .primary-navigation ul ul li.focus > ul { + right: 100%; + left: auto; + } + + .primary-navigation .menu-item-has-children > a, + .primary-navigation .page_item_has_children > a { + padding-right: 12px; + padding-left: 26px; + } + + .primary-navigation .menu-item-has-children > a:after, + .primary-navigation .page_item_has_children > a:after { + right: auto; + left: 12px; + } + + .primary-navigation li .menu-item-has-children > a, + .primary-navigation li .page_item_has_children > a { + padding-right: 12px; + padding-left: 20px; + } + + .primary-navigation .menu-item-has-children li.menu-item-has-children > a:after, + .primary-navigation .menu-item-has-children li.page_item_has_children > a:after, + .primary-navigation .page_item_has_children li.menu-item-has-children > a:after, + .primary-navigation .page_item_has_children li.page_item_has_children > a:after { + content: "\f503"; + right: auto; + left: 8px; + } +} + +@media screen and (min-width: 810px) { + .attachment .entry-attachment .attachment { + margin-right: -168px; + margin-left: -168px; + } + + .attachment .entry-attachment .attachment a { + display: block; + } + + .contributor-avatar { + margin-right: -168px; + margin-left: auto; + } + + .contributor-summary { + float: right; + } + + .full-width .site-content blockquote.alignright, + .full-width .site-content img.size-full.alignright, + .full-width .site-content img.size-large.alignright, + .full-width .site-content img.size-medium.alignright, + .full-width .site-content .wp-caption.alignright { + margin-right: -168px; + margin-left: auto; + } + + .full-width .site-content blockquote.alignleft, + .full-width .site-content img.size-full.alignleft, + .full-width .site-content img.size-large.alignleft, + .full-width .site-content img.size-medium.alignleft, + .full-width .site-content .wp-caption.alignleft { + margin-right: auto; + margin-left: -168px; + } +} + +@media screen and (min-width: 846px) { + .comment-author, + .comment-awaiting-moderation, + .comment-content, + .comment-list .reply, + .comment-metadata { + padding-right: 50px; + padding-left: 0; + } + + .comment-list .children { + margin-right: 20px; + margin-left: auto; + } +} + +@media screen and (min-width: 1008px) { + .search-box-wrapper { + padding-right: 182px; + padding-left: 0; + } + + .main-content { + float: right; + } + + .site-content { + margin-right: 182px; + margin-left: 29.04761904%; + } + + .full-width .site-content { + margin-right: 182px; + } + + .content-sidebar { + margin-right: -29.04761904%; + margin-left: auto; + } + + .site:before { + right: 0; + left: auto; + } + + #secondary { + float: right; + margin: 0 -100% 0 0; + } + + .secondary-navigation ul ul { + right: -999em; + left: auto; + } + + .secondary-navigation ul li:hover > ul, + .secondary-navigation ul li.focus > ul { + right: 162px; + left: auto; + } + + .secondary-navigation .menu-item-has-children > a { + padding-right: 30px; + padding-left: 38px; + } + + .secondary-navigation .menu-item-has-children > a:after { + border-right-color: #fff; + border-left-color: transparent; + right: auto; + left: 26px; + content: "\f503"; + } + + .footer-sidebar .widget { + float: right; + } + + .featured-content { + padding-right: 182px; + padding-left: 0; + } +} + +@media screen and (min-width: 1040px) { + .archive-header, + .comments-area, + .image-navigation, + .page-header, + .page-content, + .post-navigation, + .site-content .entry-header, + .site-content .entry-content, + .site-content .entry-summary, + .site-content footer.entry-meta { + padding-right: 15px; + padding-left: 15px; + } + + .full-width .archive-header, + .full-width .comments-area, + .full-width .image-navigation, + .full-width .page-header, + .full-width .page-content, + .full-width .post-navigation, + .full-width .site-content .entry-header, + .full-width .site-content .entry-content, + .full-width .site-content .entry-summary, + .full-width .site-content footer.entry-meta { + padding-right: 30px; + padding-left: 30px; + } +} + +@media screen and (min-width: 1080px) { + .site-content { + margin-right: 222px; + margin-left: 29.04761904%; + } + + .full-width .site-content { + margin-right: 222px; + } + + .search-box-wrapper, + .featured-content { + padding-right: 222px; + padding-left: 0; + } + + .secondary-navigation ul li:hover > ul, + .secondary-navigation ul li.focus > ul { + right: 202px; + left: auto; + } + + .slider-control-paging { + padding-right: 24px; + padding-left: 0; + } + + .slider-control-paging li { + margin: 12px 0 12px 12px; + } + + .slider-control-paging a:before { + right: 6px; + left: auto; + } +} + +@media screen and (min-width: 1110px) { + .archive-header, + .comments-area, + .image-navigation, + .page-header, + .page-content, + .post-navigation, + .site-content .entry-header, + .site-content .entry-content, + .site-content .entry-summary, + .site-content footer.entry-meta { + padding-right: 30px; + padding-left: 30px; + } +} + +@media screen and (min-width: 1218px) { + .archive-header, + .comments-area, + .image-navigation, + .page-header, + .page-content, + .post-navigation, + .site-content .entry-header, + .site-content .entry-content, + .site-content .entry-summary, + .site-content footer.entry-meta { + margin-left: 54px; + } + + .full-width .archive-header, + .full-width .comments-area, + .full-width .image-navigation, + .full-width .page-header, + .full-width .page-content, + .full-width .post-navigation, + .full-width .site-content .entry-header, + .full-width .site-content .entry-content, + .full-width .site-content .entry-summary, + .full-width .site-content footer.entry-meta { + margin-right: auto; + margin-left: auto; + } +} + +@media screen and (min-width: 1260px) { + .site-content blockquote.alignright { + margin-right: -18%; + margin-left: auto; + } + + .site-content blockquote.alignleft { + margin-left: -18%; + margin-right: auto; + } +} \ No newline at end of file diff --git a/wp-content/themes/twentyfourteen/screenshot.png b/wp-content/themes/twentyfourteen/screenshot.png new file mode 100644 index 0000000..0273112 Binary files /dev/null and b/wp-content/themes/twentyfourteen/screenshot.png differ diff --git a/wp-content/themes/twentyfourteen/search.php b/wp-content/themes/twentyfourteen/search.php new file mode 100644 index 0000000..3fe9bdb --- /dev/null +++ b/wp-content/themes/twentyfourteen/search.php @@ -0,0 +1,49 @@ + + +
            +
            + + + + + + + +
            +
            + + + diff --git a/wp-content/themes/twentyfourteen/sidebar-footer.php b/wp-content/themes/twentyfourteen/sidebar-footer.php new file mode 100644 index 0000000..20f3798 --- /dev/null +++ b/wp-content/themes/twentyfourteen/sidebar-footer.php @@ -0,0 +1,19 @@ + + +
            + +
            diff --git a/wp-content/themes/twentyfourteen/sidebar.php b/wp-content/themes/twentyfourteen/sidebar.php new file mode 100644 index 0000000..be3c8e0 --- /dev/null +++ b/wp-content/themes/twentyfourteen/sidebar.php @@ -0,0 +1,29 @@ + +
            + +

            + + + + + + + + + +
            diff --git a/wp-content/themes/twentyfourteen/single.php b/wp-content/themes/twentyfourteen/single.php new file mode 100644 index 0000000..e2db3b0 --- /dev/null +++ b/wp-content/themes/twentyfourteen/single.php @@ -0,0 +1,40 @@ + + +
            +
            + +
            +
            + + ul, +li > ol { + margin: 0 0 0 20px; +} + +img { + -ms-interpolation-mode: bicubic; + border: 0; + vertical-align: middle; +} + +figure { + margin: 0; +} + +fieldset { + border: 1px solid rgba(0, 0, 0, 0.1); + margin: 0 0 24px; + padding: 11px 12px 0; +} + +legend { + white-space: normal; +} + +button, +input, +select, +textarea { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + font-size: 100%; + margin: 0; + max-width: 100%; + vertical-align: baseline; +} + +button, +input { + line-height: normal; +} + +input, +textarea { + background-image: -webkit-linear-gradient(hsla(0,0%,100%,0), hsla(0,0%,100%,0)); /* Removing the inner shadow, rounded corners on iOS inputs */ +} + +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + cursor: pointer; +} + +button[disabled], +input[disabled] { + cursor: default; +} + +input[type="checkbox"], +input[type="radio"] { + padding: 0; +} + +input[type="search"] { + -webkit-appearance: textfield; +} + +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +textarea { + overflow: auto; + vertical-align: top; +} + +table, +th, +td { + border: 1px solid rgba(0, 0, 0, 0.1); +} + +table { + border-collapse: separate; + border-spacing: 0; + border-width: 1px 0 0 1px; + margin-bottom: 24px; + width: 100%; +} + +caption, +th, +td { + font-weight: normal; + text-align: left; +} + +th { + border-width: 0 1px 1px 0; + font-weight: bold; +} + +td { + border-width: 0 1px 1px 0; +} + +del { + color: #767676; +} + +hr { + background-color: rgba(0, 0, 0, 0.1); + border: 0; + height: 1px; + margin-bottom: 23px; +} + +/* Support a widely-adopted but non-standard selector for text selection styles + * to achieve a better experience. See http://core.trac.wordpress.org/ticket/25898. + */ +::selection { + background: #24890d; + color: #fff; + text-shadow: none; +} + +::-moz-selection { + background: #24890d; + color: #fff; + text-shadow: none; +} + + +/** + * 2.0 Repeatable Patterns + * ----------------------------------------------------------------------------- + */ + +/* Input fields */ + +input, +textarea { + border: 1px solid rgba(0, 0, 0, 0.1); + border-radius: 2px; + color: #2b2b2b; + padding: 8px 10px 7px; +} + +textarea { + width: 100%; +} + +input:focus, +textarea:focus { + border: 1px solid rgba(0, 0, 0, 0.3); + outline: 0; +} + +/* Buttons */ + +button, +.button, +input[type="button"], +input[type="reset"], +input[type="submit"] { + background-color: #24890d; + border: 0; + border-radius: 2px; + color: #fff; + font-size: 12px; + font-weight: 700; + padding: 10px 30px 11px; + text-transform: uppercase; + vertical-align: bottom; +} + +button:hover, +button:focus, +.button:hover, +.button:focus, +input[type="button"]:hover, +input[type="button"]:focus, +input[type="reset"]:hover, +input[type="reset"]:focus, +input[type="submit"]:hover, +input[type="submit"]:focus { + background-color: #41a62a; + color: #fff; +} + +button:active, +.button:active, +input[type="button"]:active, +input[type="reset"]:active, +input[type="submit"]:active { + background-color: #55d737; +} + +.search-field { + width: 100%; +} + +.search-submit { + display: none; +} + +/* Placeholder text color -- selectors need to be separate to work. */ + +::-webkit-input-placeholder { + color: #939393; +} + +:-moz-placeholder { + color: #939393; +} + +::-moz-placeholder { + color: #939393; + opacity: 1; /* Since FF19 lowers the opacity of the placeholder by default */ +} + +:-ms-input-placeholder { + color: #939393; +} + +/* Responsive images. Fluid images for posts, comments, and widgets */ + +.comment-content img, +.entry-content img, +.entry-summary img, +#site-header img, +.widget img, +.wp-caption { + max-width: 100%; +} + +/** + * Make sure images with WordPress-added height and width attributes are + * scaled correctly. + */ + +.comment-content img[height], +.entry-content img, +.entry-summary img, +img[class*="align"], +img[class*="wp-image-"], +img[class*="attachment-"], +#site-header img { + height: auto; +} + +img.size-full, +img.size-large, +.wp-post-image, +.post-thumbnail img { + height: auto; + max-width: 100%; +} + +/* Make sure embeds and iframes fit their containers */ + +embed, +iframe, +object, +video { + margin-bottom: 24px; + max-width: 100%; +} + +p > embed, +p > iframe, +p > object, +span > embed, +span > iframe, +span > object { + margin-bottom: 0; +} + +/* Alignment */ + +.alignleft { + float: left; +} + +.alignright { + float: right; +} + +.aligncenter { + display: block; + margin-left: auto; + margin-right: auto; +} + +blockquote.alignleft, +figure.wp-caption.alignleft, +img.alignleft { + margin: 7px 24px 7px 0; +} + +.wp-caption.alignleft { + margin: 7px 14px 7px 0; +} + +blockquote.alignright, +figure.wp-caption.alignright, +img.alignright { + margin: 7px 0 7px 24px; +} + +.wp-caption.alignright { + margin: 7px 0 7px 14px; +} + +blockquote.aligncenter, +img.aligncenter, +.wp-caption.aligncenter { + margin-top: 7px; + margin-bottom: 7px; +} + +.site-content blockquote.alignleft, +.site-content blockquote.alignright { + border-top: 1px solid rgba(0, 0, 0, 0.1); + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + padding-top: 17px; + width: 50%; +} + +.site-content blockquote.alignleft p, +.site-content blockquote.alignright p { + margin-bottom: 17px; +} + +.wp-caption { + margin-bottom: 24px; +} + +.wp-caption img[class*="wp-image-"] { + display: block; + margin: 0; +} + +.wp-caption { + color: #767676; +} + +.wp-caption-text { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + font-size: 12px; + font-style: italic; + line-height: 1.5; + margin: 9px 0; +} + +div.wp-caption .wp-caption-text { + padding-right: 10px; +} + +div.wp-caption.alignright img[class*="wp-image-"], +div.wp-caption.alignright .wp-caption-text { + padding-left: 10px; + padding-right: 0; +} + +.wp-smiley { + border: 0; + margin-bottom: 0; + margin-top: 0; + padding: 0; +} + +/* Assistive text */ + +.screen-reader-text { + clip: rect(1px, 1px, 1px, 1px); + position: absolute; +} + +.screen-reader-text:focus { + background-color: #f1f1f1; + border-radius: 3px; + box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6); + clip: auto; + color: #21759b; + display: block; + font-size: 14px; + font-weight: bold; + height: auto; + line-height: normal; + padding: 15px 23px 14px; + position: absolute; + left: 5px; + top: 5px; + text-decoration: none; + text-transform: none; + width: auto; + z-index: 100000; /* Above WP toolbar */ +} + +.hide { + display: none; +} + +/* Clearing floats */ + +.footer-sidebar:before, +.footer-sidebar:after, +.hentry:before, +.hentry:after, +.gallery:before, +.gallery:after, +.slider-direction-nav:before, +.slider-direction-nav:after, +.contributor-info:before, +.contributor-info:after, +.search-box:before, +.search-box:after, +[class*="content"]:before, +[class*="content"]:after, +[class*="site"]:before, +[class*="site"]:after { + content: ""; + display: table; +} + +.footer-sidebar:after, +.hentry:after, +.gallery:after, +.slider-direction-nav:after, +.contributor-info:after, +.search-box:after, +[class*="content"]:after, +[class*="site"]:after { + clear: both; +} + +/* Genericons */ + +.bypostauthor > article .fn:before, +.comment-edit-link:before, +.comment-reply-link:before, +.comment-reply-login:before, +.comment-reply-title small a:before, +.contributor-posts-link:before, +.menu-toggle:before, +.search-toggle:before, +.slider-direction-nav a:before, +.widget_twentyfourteen_ephemera .widget-title:before { + -webkit-font-smoothing: antialiased; + display: inline-block; + font: normal 16px/1 Genericons; + text-decoration: inherit; + vertical-align: text-bottom; +} + +/* Separators */ + +.site-content span + .entry-date:before, +.full-size-link:before, +.parent-post-link:before, +span + .byline:before, +span + .comments-link:before, +span + .edit-link:before, +.widget_twentyfourteen_ephemera .entry-title:after { + content: "\0020\007c\0020"; +} + + +/** + * 3.0 Basic Structure + * ----------------------------------------------------------------------------- + */ + +.site { + background-color: #fff; + max-width: 1260px; + position: relative; +} + +.main-content { + width: 100%; +} + + +/** + * 4.0 Header + * ----------------------------------------------------------------------------- + */ + +/* Ensure that there is no gap between the header and + the admin bar for WordPress versions before 3.8. */ +#wpadminbar { + min-height: 32px; +} + +#site-header { + position: relative; + z-index: 3; +} + +.site-header { + background-color: #000; + max-width: 1260px; + position: relative; + width: 100%; + z-index: 4; +} + +.header-main { + min-height: 48px; + padding: 0 10px; +} + +.site-title { + float: left; + font-size: 18px; + font-weight: 700; + line-height: 48px; + margin: 0; +} + +.site-title a, +.site-title a:hover { + color: #fff; +} + +/* Search in the header */ + +.search-toggle { + background-color: #24890d; + cursor: pointer; + float: right; + height: 48px; + margin-right: 38px; + text-align: center; + width: 48px; +} + +.search-toggle:hover, +.search-toggle.active { + background-color: #41a62a; +} + +.search-toggle:before { + color: #fff; + content: "\f400"; + font-size: 20px; + margin-top: 14px; +} + +.search-toggle .screen-reader-text { + left: 5px; /* Avoid a horizontal scrollbar when the site has a long menu */ +} + +.search-box-wrapper { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + position: absolute; + top: 48px; + right: 0; + width: 100%; + z-index: 2; +} + +.search-box { + background-color: #41a62a; + padding: 12px; +} + +.search-box .search-field { + background-color: #fff; + border: 0; + float: right; + font-size: 16px; + padding: 2px 2px 3px 6px; + width: 100%; +} + + +/** + * 5.0 Navigation + * ----------------------------------------------------------------------------- + */ + +.site-navigation ul { + list-style: none; + margin: 0; +} + +.site-navigation li { + border-top: 1px solid rgba(255, 255, 255, 0.2); +} + +.site-navigation ul ul { + margin-left: 20px; +} + +.site-navigation a { + color: #fff; + display: block; + text-transform: uppercase; +} + +.site-navigation a:hover { + color: #41a62a; +} + +.site-navigation .current_page_item > a, +.site-navigation .current_page_ancestor > a, +.site-navigation .current-menu-item > a, +.site-navigation .current-menu-ancestor > a { + color: #55d737; + font-weight: 900; +} + +/* Primary Navigation */ + +.primary-navigation { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + font-size: 14px; + padding-top: 24px; +} + +.primary-navigation.toggled-on { + padding: 72px 0 36px; +} + +.primary-navigation .nav-menu { + border-bottom: 1px solid rgba(255, 255, 255, 0.2); + display: none; +} + +.primary-navigation.toggled-on .nav-menu { + display: block; +} + +.primary-navigation a { + padding: 7px 0; +} + +/* Secondary Navigation */ + +.secondary-navigation { + border-bottom: 1px solid rgba(255, 255, 255, 0.2); + font-size: 12px; + margin: 48px 0; +} + +.secondary-navigation a { + padding: 9px 0; +} + +.menu-toggle { + background-color: #000; + border-radius: 0; + cursor: pointer; + font-size: 0; + height: 48px; + margin: 0; + overflow: hidden; + padding: 0; + position: absolute; + top: 0; + right: 0; + text-align: center; + width: 48px; +} + +.menu-toggle:before { + color: #fff; + content: "\f419"; + display: inline; + margin-top: 16px; +} + +.menu-toggle:active, +.menu-toggle:focus, +.menu-toggle:hover { + background-color: #444; +} + +.menu-toggle:focus { + outline: 1px dotted; +} + + +/** + * 6.0 Content + * ----------------------------------------------------------------------------- + */ + +.content-area { + padding-top: 48px; +} + +.hentry { + margin: 0 auto 48px; + max-width: 672px; +} + +.site-content .entry-header, +.site-content .entry-content, +.site-content .entry-summary, +.site-content .entry-meta, +.page-content { + margin: 0 auto; + max-width: 474px; +} + +.page-content { + margin-bottom: 48px; +} + + +/** + * 6.1 Post Thumbnail + * ----------------------------------------------------------------------------- + */ + +.post-thumbnail { + background: #b2b2b2 url(images/pattern-light.svg) repeat fixed; + display: block; + position: relative; + width: 100%; + z-index: 0; +} + +a.post-thumbnail:hover { + background-color: #999; +} + +.full-width .post-thumbnail img { + display: block; + margin: 0 auto; +} + + +/** + * 6.2 Entry Header + * ----------------------------------------------------------------------------- + */ + +.entry-header { + position: relative; + z-index: 1; +} + +.entry-title { + font-size: 33px; + font-weight: 300; + line-height: 1.0909090909; + margin-bottom: 12px; + margin: 0 0 12px 0; + text-transform: uppercase; +} + +.entry-title a { + color: #2b2b2b; +} + +.entry-title a:hover { + color: #41a62a; +} + +.site-content .entry-header { + background-color: #fff; + padding: 0 10px 12px; +} + +.site-content .has-post-thumbnail .entry-header { + padding-top: 24px; +} + + +/** + * 6.3 Entry Meta + * ----------------------------------------------------------------------------- + */ + +.entry-meta { + clear: both; + color: #767676; + font-size: 12px; + font-weight: 400; + line-height: 1.3333333333; + text-transform: uppercase; +} + +.entry-meta a { + color: #767676; +} + +.entry-meta a:hover { + color: #41a62a; +} + +.sticky .entry-date { + display: none; +} + +.cat-links { + font-weight: 900; + text-transform: uppercase; +} + +.cat-links a { + color: #2b2b2b; +} + +.cat-links a:hover { + color: #41a62a; +} + +.byline { + display: none; +} + +.single .byline, +.group-blog .byline { + display: inline; +} + +.site-content .entry-meta { + background-color: #fff; + margin-bottom: 8px; +} + +.site-content footer.entry-meta { + margin: 24px auto 0; + padding: 0 10px; +} + +/* Tag links style */ + +.entry-meta .tag-links a { + background-color: #767676; + border-radius: 0 2px 2px 0; + color: #fff; + display: inline-block; + font-size: 11px; + font-weight: 700; + line-height: 1.2727272727; + margin: 2px 4px 2px 10px; + padding: 3px 7px; + position: relative; + text-transform: uppercase; +} + +.entry-meta .tag-links a:hover { + background-color: #41a62a; + color: #fff; +} + +.entry-meta .tag-links a:before { + border-top: 10px solid transparent; + border-right: 8px solid #767676; + border-bottom: 10px solid transparent; + content: ""; + height: 0; + position: absolute; + top: 0; + left: -8px; + width: 0; +} + +.entry-meta .tag-links a:hover:before { + border-right-color: #41a62a; +} + +.entry-meta .tag-links a:after { + background-color: #fff; + border-radius: 50%; + content: ""; + height: 4px; + position: absolute; + top: 8px; + left: -2px; + width: 4px; +} + + +/** + * 6.4 Entry Content + * ----------------------------------------------------------------------------- + */ + +.entry-content, +.entry-summary, +.page-content { + -webkit-hyphens: auto; + -moz-hyphens: auto; + -ms-hyphens: auto; + hyphens: auto; + word-wrap: break-word; +} + +.site-content .entry-content, +.site-content .entry-summary, +.page-content { + background-color: #fff; + padding: 12px 10px 0; +} + +.page .entry-content { + padding-top: 0; +} + +.entry-content h1:first-child, +.entry-content h2:first-child, +.entry-content h3:first-child, +.entry-content h4:first-child, +.entry-content h5:first-child, +.entry-content h6:first-child, +.entry-summary h1:first-child, +.entry-summary h2:first-child, +.entry-summary h3:first-child, +.entry-summary h4:first-child, +.entry-summary h5:first-child, +.entry-summary h6:first-child, +.page-content h1:first-child, +.page-content h2:first-child, +.page-content h3:first-child, +.page-content h4:first-child, +.page-content h5:first-child, +.page-content h6:first-child { + margin-top: 0; +} + +.entry-content a, +.entry-summary a, +.page-content a, +.comment-content a { + text-decoration: underline; +} + +.entry-content a:hover, +.entry-summary a:hover, +.page-content a:hover, +.comment-content a:hover, +.entry-content a.button, +.entry-summary a.button, +.page-content a.button, +.comment-content a.button { + text-decoration: none; +} + +.entry-content table, +.comment-content table { + font-size: 14px; + line-height: 1.2857142857; + margin-bottom: 24px; +} + +.entry-content th, +.comment-content th { + font-weight: 700; + padding: 8px; + text-transform: uppercase; +} + +.entry-content td, +.comment-content td { + padding: 8px; +} + +.entry-content .edit-link { + clear: both; + display: block; + font-size: 12px; + font-weight: 400; + line-height: 1.3333333333; + text-transform: uppercase; +} + +.entry-content .edit-link a { + color: #767676; + text-decoration: none; +} + +.entry-content .edit-link a:hover { + color: #41a62a; +} + +/* Mediaelements */ + +.hentry .mejs-container { + margin: 12px 0 18px; +} + +.hentry .mejs-mediaelement, +.hentry .mejs-container .mejs-controls { + background: #000; +} + +.hentry .mejs-controls .mejs-time-rail .mejs-time-loaded, +.hentry .mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current { + background: #fff; +} + +.hentry .mejs-controls .mejs-time-rail .mejs-time-current { + background: #24890d; +} + +.hentry .mejs-controls .mejs-time-rail .mejs-time-total, +.hentry .mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total { + background: rgba(255, 255, 255, .33); +} + +.hentry .mejs-container .mejs-controls .mejs-time { + padding-top: 9px; +} + +.hentry .mejs-controls .mejs-time-rail span, +.hentry .mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total, +.hentry .mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current { + border-radius: 0; +} + +.hentry .mejs-overlay-loading { + background: transparent; +} + +/* Page links */ + +.page-links { + clear: both; + font-size: 12px; + font-weight: 900; + line-height: 2; + margin: 24px 0; + text-transform: uppercase; +} + +.page-links a, +.page-links > span { + background: #fff; + border: 1px solid #fff; + display: inline-block; + height: 22px; + margin: 0 1px 2px 0; + text-align: center; + width: 22px; +} + +.page-links a { + background: #000; + border: 1px solid #000; + color: #fff; + text-decoration: none; +} + +.page-links a:hover { + background: #41a62a; + border: 1px solid #41a62a; + color: #fff; +} + +.page-links > .page-links-title { + height: auto; + margin: 0; + padding-right: 7px; + width: auto; +} + + +/** + * 6.5 Gallery + * ----------------------------------------------------------------------------- + */ + +.gallery { + margin-bottom: 20px; +} + +.gallery-item { + float: left; + margin: 0 4px 4px 0; + overflow: hidden; + position: relative; +} + +.gallery-columns-1 .gallery-item { + max-width: 100%; +} + +.gallery-columns-2 .gallery-item { + max-width: 48%; + max-width: -webkit-calc(50% - 4px); + max-width: calc(50% - 4px); +} + +.gallery-columns-3 .gallery-item { + max-width: 32%; + max-width: -webkit-calc(33.3% - 4px); + max-width: calc(33.3% - 4px); +} + +.gallery-columns-4 .gallery-item { + max-width: 23%; + max-width: -webkit-calc(25% - 4px); + max-width: calc(25% - 4px); +} + +.gallery-columns-5 .gallery-item { + max-width: 19%; + max-width: -webkit-calc(20% - 4px); + max-width: calc(20% - 4px); +} + +.gallery-columns-6 .gallery-item { + max-width: 15%; + max-width: -webkit-calc(16.7% - 4px); + max-width: calc(16.7% - 4px); +} + +.gallery-columns-7 .gallery-item { + max-width: 13%; + max-width: -webkit-calc(14.28% - 4px); + max-width: calc(14.28% - 4px); +} + +.gallery-columns-8 .gallery-item { + max-width: 11%; + max-width: -webkit-calc(12.5% - 4px); + max-width: calc(12.5% - 4px); +} + +.gallery-columns-9 .gallery-item { + max-width: 9%; + max-width: -webkit-calc(11.1% - 4px); + max-width: calc(11.1% - 4px); +} + +.gallery-columns-1 .gallery-item:nth-of-type(1n), +.gallery-columns-2 .gallery-item:nth-of-type(2n), +.gallery-columns-3 .gallery-item:nth-of-type(3n), +.gallery-columns-4 .gallery-item:nth-of-type(4n), +.gallery-columns-5 .gallery-item:nth-of-type(5n), +.gallery-columns-6 .gallery-item:nth-of-type(6n), +.gallery-columns-7 .gallery-item:nth-of-type(7n), +.gallery-columns-8 .gallery-item:nth-of-type(8n), +.gallery-columns-9 .gallery-item:nth-of-type(9n) { + margin-right: 0; +} + +.gallery-columns-1.gallery-size-medium figure.gallery-item:nth-of-type(1n+1), +.gallery-columns-1.gallery-size-thumbnail figure.gallery-item:nth-of-type(1n+1), +.gallery-columns-2.gallery-size-thumbnail figure.gallery-item:nth-of-type(2n+1), +.gallery-columns-3.gallery-size-thumbnail figure.gallery-item:nth-of-type(3n+1) { + clear: left; +} + +.gallery-caption { + background-color: rgba(0, 0, 0, 0.7); + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + color: #fff; + font-size: 12px; + line-height: 1.5; + margin: 0; + max-height: 50%; + opacity: 0; + padding: 6px 8px; + position: absolute; + bottom: 0; + left: 0; + text-align: left; + width: 100%; +} + +.gallery-caption:before { + content: ""; + height: 100%; + min-height: 49px; + position: absolute; + top: 0; + left: 0; + width: 100%; +} + +.gallery-item:hover .gallery-caption { + opacity: 1; +} + +.gallery-columns-7 .gallery-caption, +.gallery-columns-8 .gallery-caption, +.gallery-columns-9 .gallery-caption { + display: none; +} + + +/** + * 6.6 Post Formats + * ----------------------------------------------------------------------------- + */ + +.format-aside .entry-content, +.format-aside .entry-summary, +.format-quote .entry-content, +.format-quote .entry-summary, +.format-link .entry-content, +.format-link .entry-summary { + padding-top: 0; +} + +.site-content .format-link .entry-title, +.site-content .format-aside .entry-title, +.site-content .format-quote .entry-title { + display: none; +} + + +/** + * 6.7 Post/Image/Paging Navigation + * ----------------------------------------------------------------------------- + */ + +.nav-links { + -webkit-hyphens: auto; + -moz-hyphens: auto; + -ms-hyphens: auto; + border-top: 1px solid rgba(0, 0, 0, 0.1); + hyphens: auto; + word-wrap: break-word; +} + +.post-navigation, +.image-navigation { + margin: 24px auto 48px; + max-width: 474px; + padding: 0 10px; +} + +.post-navigation a, +.image-navigation .previous-image, +.image-navigation .next-image { + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + padding: 11px 0 12px; + width: 100%; +} + +.post-navigation .meta-nav { + color: #767676; + display: block; + font-size: 12px; + font-weight: 900; + line-height: 2; + text-transform: uppercase; +} + +.post-navigation a, +.image-navigation a { + color: #2b2b2b; + display: block; + font-size: 14px; + font-weight: 700; + line-height: 1.7142857142; + text-transform: none; +} + +.post-navigation a:hover, +.image-navigation a:hover { + color: #41a62a; +} + +/* Paging Navigation */ + +.paging-navigation { + border-top: 5px solid #000; + margin: 48px 0; +} + +.paging-navigation .loop-pagination { + margin-top: -5px; + text-align: center; +} + +.paging-navigation .page-numbers { + border-top: 5px solid transparent; + display: inline-block; + font-size: 14px; + font-weight: 900; + margin-right: 1px; + padding: 7px 16px; + text-transform: uppercase; +} + +.paging-navigation a { + color: #2b2b2b; +} + +.paging-navigation .page-numbers.current { + border-top: 5px solid #24890d; +} + +.paging-navigation a:hover { + border-top: 5px solid #41a62a; + color: #2b2b2b; +} + + +/** + * 6.8 Attachments + * ----------------------------------------------------------------------------- + */ + +.attachment .content-sidebar, +.attachment .post-thumbnail { + display: none; +} + +.attachment .entry-content { + padding-top: 0; +} + +.attachment footer.entry-meta { + text-transform: none; +} + +.entry-attachment .attachment { + margin-bottom: 24px; +} + + +/** + * 6.9 Archives + * ----------------------------------------------------------------------------- + */ + +.archive-header, +.page-header { + margin: 24px auto; + max-width: 474px; +} + +.archive-title, +.page-title { + font-size: 16px; + font-weight: 900; + line-height: 1.5; + margin: 0; +} + +.taxonomy-description, +.author-description { + color: #767676; + font-size: 14px; + line-height: 1.2857142857; + padding-top: 18px; +} + +.taxonomy-description p, +.author-description p { + margin-bottom: 18px; +} + +.taxonomy-description p:last-child, +.author-description p:last-child { + margin-bottom: 0; +} + +.taxonomy-description a, +.author-description a { + text-decoration: underline; +} + +.taxonomy-description a:hover, +.author-description a:hover { + text-decoration: none; +} + + +/** + * 6.10 Contributor Page + * ----------------------------------------------------------------------------- + */ + +.contributor { + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + padding: 48px 10px; +} + +.contributor:first-of-type { + padding-top: 24px; +} + +.contributor-info { + margin: 0 auto; + max-width: 474px; +} + +.contributor-avatar { + border: 1px solid rgba(0, 0, 0, 0.1); + float: left; + margin: 0 30px 20px 0; + padding: 2px; +} + +.contributor-name { + font-size: 16px; + font-weight: 900; + line-height: 1.5; + margin: 0; +} + +.contributor-bio a { + text-decoration: underline; +} + +.contributor-bio a:hover { + text-decoration: none; +} + +.contributor-posts-link { + display: inline-block; + line-height: normal; + padding: 10px 30px; +} + +.contributor-posts-link:before { + content: "\f443"; +} + + +/** + * 6.11 404 Page + * ----------------------------------------------------------------------------- + */ + +.error404 .page-content { + padding-top: 0; +} + +.error404 .page-content .search-form { + margin-bottom: 24px; +} + + +/** + * 6.12 Full-width + * ----------------------------------------------------------------------------- + */ + +.full-width .hentry { + max-width: 100%; +} + + +/** + * 6.13 Singular + * ----------------------------------------------------------------------------- + */ + +.singular .site-content .hentry.has-post-thumbnail { + margin-top: -48px; +} + + +/** + * 6.14 Comments + * ----------------------------------------------------------------------------- + */ + +.comments-area { + margin: 48px auto; + max-width: 474px; + padding: 0 10px; +} + +.comment-reply-title, +.comments-title { + font: 900 16px/1.5 Lato, sans-serif; + margin: 0; + text-transform: uppercase; +} + +.comment-list { + list-style: none; + margin: 0 0 48px 0; +} + +.comment-author { + font-size: 14px; + line-height: 1.7142857142; +} + +.comment-list .reply, +.comment-metadata { + font-size: 12px; + line-height: 2; + text-transform: uppercase; +} + +.comment-list .reply { + margin-top: 24px; +} + +.comment-author .fn { + font-weight: 900; +} + +.comment-author a { + color: #2b2b2b; +} + +.comment-list .trackback a, +.comment-list .pingback a, +.comment-metadata a { + color: #767676; +} + +.comment-author a:hover, +.comment-list .pingback a:hover, +.comment-list .trackback a:hover, +.comment-metadata a:hover { + color: #41a62a; +} + +.comment-list article, +.comment-list .pingback, +.comment-list .trackback { + border-top: 1px solid rgba(0, 0, 0, 0.1); + margin-bottom: 24px; + padding-top: 24px; +} + +.comment-list > li:first-child > article, +.comment-list > .pingback:first-child, +.comment-list > .trackback:first-child { + border-top: 0; +} + +.comment-author { + position: relative; +} + +.comment-author .avatar { + border: 1px solid rgba(0, 0, 0, 0.1); + height: 18px; + padding: 2px; + position: absolute; + top: 0; + left: 0; + width: 18px; +} + +.bypostauthor > article .fn:before { + content: "\f408"; + margin: 0 2px 0 -2px; + position: relative; + top: -1px; +} + +.says { + display: none; +} + +.comment-author, +.comment-awaiting-moderation, +.comment-content, +.comment-list .reply, +.comment-metadata { + padding-left: 30px; +} + +.comment-edit-link { + margin-left: 10px; +} + +.comment-edit-link:before { + content: "\f411"; +} + +.comment-reply-link:before, +.comment-reply-login:before { + content: "\f412"; + margin-right: 2px; +} + +.comment-content { + -webkit-hyphens: auto; + -moz-hyphens: auto; + -ms-hyphens: auto; + hyphens: auto; + word-wrap: break-word; +} + +.comment-content ul, +.comment-content ol { + margin: 0 0 24px 22px; +} + +.comment-content li > ul, +.comment-content li > ol { + margin-bottom: 0; +} + +.comment-content > :last-child { + margin-bottom: 0; +} + +.comment-list .children { + list-style: none; + margin-left: 15px; +} + +.comment-respond { + margin-bottom: 24px; + padding: 0; +} + +.comment .comment-respond { + margin-top: 24px; +} + +.comment-respond h3 { + margin-top: 0; + margin-bottom: 24px; +} + +.comment-notes, +.comment-awaiting-moderation, +.logged-in-as, +.no-comments, +.form-allowed-tags, +.form-allowed-tags code { + color: #767676; +} + +.comment-notes, +.comment-awaiting-moderation, +.logged-in-as { + font-size: 14px; + line-height: 1.7142857142; +} + +.no-comments { + font-size: 16px; + font-weight: 900; + line-height: 1.5; + margin-top: 24px; + text-transform: uppercase; +} + +.comment-form label { + display: block; +} + +.comment-form input[type="text"], +.comment-form input[type="email"], +.comment-form input[type="url"] { + width: 100%; +} + +.form-allowed-tags, +.form-allowed-tags code { + font-size: 12px; + line-height: 1.5; +} + +.required { + color: #c0392b; +} + +.comment-reply-title small a { + color: #2b2b2b; + float: right; + height: 24px; + overflow: hidden; + width: 24px; +} + +.comment-reply-title small a:hover { + color: #41a62a; +} + +.comment-reply-title small a:before { + content: "\f405"; + font-size: 32px; +} + +.comment-navigation { + font-size: 12px; + line-height: 2; + margin-bottom: 48px; + text-transform: uppercase; +} + +.comment-navigation .nav-next, +.comment-navigation .nav-previous { + display: inline-block; +} + +.comment-navigation .nav-previous a { + margin-right: 10px; +} + +#comment-nav-above { + margin-top: 36px; + margin-bottom: 0; +} + + +/** + * 7.0 Sidebars + * ----------------------------------------------------------------------------- + */ + +/* Secondary */ + +#secondary { + background-color: #000; + border-top: 1px solid #000; + border-bottom: 1px solid rgba(255, 255, 255, 0.2); + clear: both; + color: rgba(255, 255, 255, 0.7); + margin-top: -1px; + padding: 0 10px; + position: relative; + z-index: 2; +} + +.site-description { + display: none; + font-size: 12px; + font-weight: 400; + line-height: 1.5; +} + +/* Primary Sidebar */ + +.primary-sidebar { + padding-top: 48px; +} + +.secondary-navigation + .primary-sidebar { + padding-top: 0; +} + +/* Content Sidebar */ + +.content-sidebar { + border-top: 1px solid rgba(0, 0, 0, 0.1); + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + color: #767676; + padding: 48px 10px 0; +} + + +/** + * 7.1 Widgets + * ----------------------------------------------------------------------------- + */ + +/* Primary Sidebar, Footer Sidebar */ + +.widget { + font-size: 14px; + -webkit-hyphens: auto; + -moz-hyphens: auto; + -ms-hyphens: auto; + hyphens: auto; + line-height: 1.2857142857; + margin-bottom: 48px; + width: 100%; + word-wrap: break-word; +} + +.widget a { + color: #fff; +} + +.widget a:hover { + color: #41a62a; +} + +.widget h1, +.widget h2, +.widget h3, +.widget h4, +.widget h5, +.widget h6 { + margin: 24px 0 12px; +} + +.widget h1 { + font-size: 22px; + line-height: 1.0909090909; +} + +.widget h2 { + font-size: 20px; + line-height: 1.2; +} + +.widget h3 { + font-size: 18px; + line-height: 1.3333333333; +} + +.widget h4 { + font-size: 16px; + line-height: 1.5; +} + +.widget h5 { + font-size: 14px; + line-height: 1.7142857142; +} + +.widget h6 { + font-size: 12px; + line-height: 2; +} + +.widget address { + margin-bottom: 18px; +} + +.widget abbr[title] { + border-color: rgba(255, 255, 255, 0.7); +} + +.widget mark, +.widget ins { + color: #000; +} + +.widget pre, +.widget fieldset { + border-color: rgba(255, 255, 255, 0.2); +} + +.widget code, +.widget kbd, +.widget tt, +.widget var, +.widget samp, +.widget pre { + font-size: 12px; + line-height: 1.5; +} + +.widget blockquote { + color: rgba(255, 255, 255, 0.7); + font-size: 18px; + line-height: 1.5; + margin-bottom: 18px; +} + +.widget blockquote cite { + color: #fff; + font-size: 14px; + line-height: 1.2857142857; +} + +.widget dl, +.widget dd { + margin-bottom: 18px; +} + +.widget ul, +.widget ol { + list-style: none; + margin: 0; +} + +.widget li > ol, +.widget li > ul { + margin-left: 10px; +} + +.widget table, +.widget th, +.widget td { + border-color: rgba(255, 255, 255, 0.2); +} + +.widget table { + margin-bottom: 18px; +} + +.widget del { + color: rgba(255, 255, 255, 0.4); +} + +.widget hr { + background-color: rgba(255, 255, 255, 0.2); +} + +.widget p { + margin-bottom: 18px; +} + +.widget input, +.widget textarea { + background-color: rgba(255, 255, 255, 0.1); + border-color: rgba(255, 255, 255, 0.2); + color: #fff; + font-size: 16px; + padding: 1px 2px 2px 4px; +} + +.widget input:focus, +.widget textarea:focus { + border-color: rgba(255, 255, 255, 0.3); +} + +.widget button, +.widget .button, +.widget input[type="button"], +.widget input[type="reset"], +.widget input[type="submit"] { + background-color: #24890d; + border: 0; + font-size: 12px; + padding: 5px 15px 4px; +} + +.widget input[type="button"]:hover, +.widget input[type="button"]:focus, +.widget input[type="reset"]:hover, +.widget input[type="reset"]:focus, +.widget input[type="submit"]:hover, +.widget input[type="submit"]:focus { + background-color: #41a62a; +} + +.widget input[type="button"]:active, +.widget input[type="reset"]:active, +.widget input[type="submit"]:active { + background-color: #55d737; +} + +.widget .wp-caption { + color: rgba(255, 255, 255, 0.7); + margin-bottom: 18px; +} + +.widget .widget-title { + font-size: 14px; + font-weight: 700; + line-height: 1.7142857142; + margin: 0 0 24px 0; + text-transform: uppercase; +} + +.widget-title, +.widget-title a { + color: #fff; +} + +.widget-title a:hover { + color: #41a62a; +} + +/* Calendar Widget*/ + +.widget_calendar table { + line-height: 2; + margin: 0; +} + +.widget_calendar caption { + color: #fff; + font-weight: 700; + line-height: 1.7142857142; + margin-bottom: 18px; + text-align: left; + text-transform: uppercase; +} + +.widget_calendar thead th { + background-color: rgba(255, 255, 255, 0.1); +} + +.widget_calendar tbody td, +.widget_calendar thead th { + text-align: center; +} + +.widget_calendar tbody a { + background-color: #24890d; + color: #fff; + display: block; +} + +.widget_calendar tbody a:hover { + background-color: #41a62a; +} + +.widget_calendar tbody a:hover { + color: #fff; +} + +.widget_calendar #prev { + padding-left: 5px; +} + +.widget_calendar #next { + padding-right: 5px; + text-align: right; +} + +/* Ephemera Widget*/ + +.widget_twentyfourteen_ephemera > ol > li { + border-bottom: 1px solid rgba(255, 255, 255, 0.2); + margin-bottom: 18px; + padding: 0; +} + +.widget_twentyfourteen_ephemera .hentry { + margin: 0; + max-width: 100%; +} + +.widget_twentyfourteen_ephemera .entry-title, +.widget_twentyfourteen_ephemera .entry-meta, +.widget_twentyfourteen_ephemera .wp-caption-text, +.widget_twentyfourteen_ephemera .post-format-archive-link, +.widget_twentyfourteen_ephemera .entry-content table { + font-size: 12px; + line-height: 1.5; +} + +.widget_twentyfourteen_ephemera .entry-title { + display: inline; + font-weight: 400; +} + +.widget_twentyfourteen_ephemera .entry-meta { + margin-bottom: 18px; +} + +.widget_twentyfourteen_ephemera .entry-meta a { + color: rgba(255, 255, 255, 0.7); +} + +.widget_twentyfourteen_ephemera .entry-meta a:hover { + color: #41a62a; +} + +.widget_twentyfourteen_ephemera .entry-content ul, +.widget_twentyfourteen_ephemera .entry-content ol { + margin: 0 0 18px 20px; +} + +.widget_twentyfourteen_ephemera .entry-content ul { + list-style: disc; +} + +.widget_twentyfourteen_ephemera .entry-content ol { + list-style: decimal; +} + +.widget_twentyfourteen_ephemera .entry-content li > ul, +.widget_twentyfourteen_ephemera .entry-content li > ol { + margin: 0 0 0 20px; +} + +.widget_twentyfourteen_ephemera .entry-content th, +.widget_twentyfourteen_ephemera .entry-content td { + padding: 6px; +} + +.widget_twentyfourteen_ephemera .post-format-archive-link { + font-weight: 700; + text-transform: uppercase; +} + +/* List Style Widgets*/ + +.widget_archive li, +.widget_categories li, +.widget_links li, +.widget_meta li, +.widget_nav_menu li, +.widget_pages li, +.widget_recent_comments li, +.widget_recent_entries li { + border-top: 1px solid rgba(255, 255, 255, 0.2); + padding: 8px 0 9px; +} + +.widget_archive li:first-child, +.widget_categories li:first-child, +.widget_links li:first-child, +.widget_meta li:first-child, +.widget_nav_menu li:first-child, +.widget_pages li:first-child, +.widget_recent_comments li:first-child, +.widget_recent_entries li:first-child { + border-top: 0; +} + +.widget_categories li ul, +.widget_nav_menu li ul, +.widget_pages li ul { + border-top: 1px solid rgba(255, 255, 255, 0.2); + margin-top: 9px; +} + +.widget_categories li li:last-child, +.widget_nav_menu li li:last-child, +.widget_pages li li:last-child { + padding-bottom: 0; +} + +/* Recent Posts Widget */ + +.widget_recent_entries .post-date { + display: block; +} + +/* RSS Widget */ + +.rsswidget img { + margin-top: -4px; +} + +.rssSummary { + margin: 9px 0; +} + +.rss-date { + display: block; +} + +.widget_rss li { + margin-bottom: 18px; +} + +.widget_rss li:last-child { + margin-bottom: 0; +} + +/* Text Widget */ + +.widget_text > div > :last-child { + margin-bottom: 0; +} + + +/** + * 7.2 Content Sidebar Widgets + * ----------------------------------------------------------------------------- + */ + +.content-sidebar .widget a { + color: #24890d; +} + +.content-sidebar .widget a:hover { + color: #41a62a; +} + +.content-sidebar .widget pre { + border-color: rgba(0, 0, 0, 0.1); +} + +.content-sidebar .widget mark, +.content-sidebar .widget ins { + color: #2b2b2b; +} + +.content-sidebar .widget abbr[title] { + border-color: #2b2b2b; +} + +.content-sidebar .widget fieldset { + border-color: rgba(0, 0, 0, 0.1); +} + +.content-sidebar .widget blockquote { + color: #767676; +} + +.content-sidebar .widget blockquote cite { + color: #2b2b2b; +} + +.content-sidebar .widget li > ol, +.content-sidebar .widget li > ul { + margin-left: 18px; +} + +.content-sidebar .widget table, +.content-sidebar .widget th, +.content-sidebar .widget td { + border-color: rgba(0, 0, 0, 0.1); +} + +.content-sidebar .widget del { + color: #767676; +} + +.content-sidebar .widget hr { + background-color: rgba(0, 0, 0, 0.1); +} + +.content-sidebar .widget input, +.content-sidebar .widget textarea { + background-color: #fff; + border-color: rgba(0, 0, 0, 0.1); + color: #2b2b2b; +} + +.content-sidebar .widget input:focus, +.content-sidebar .widget textarea:focus { + border-color: rgba(0, 0, 0, 0.3); +} + +.content-sidebar .widget input[type="button"], +.content-sidebar .widget input[type="reset"], +.content-sidebar .widget input[type="submit"] { + background-color: #24890d; + border: 0; + color: #fff; +} + +.content-sidebar .widget input[type="button"]:hover, +.content-sidebar .widget input[type="button"]:focus, +.content-sidebar .widget input[type="reset"]:hover, +.content-sidebar .widget input[type="reset"]:focus, +.content-sidebar .widget input[type="submit"]:hover, +.content-sidebar .widget input[type="submit"]:focus { + background-color: #41a62a; +} + +.content-sidebar .widget input[type="button"]:active, +.content-sidebar .widget input[type="reset"]:active, +.content-sidebar .widget input[type="submit"]:active { + background-color: #55d737; +} + +.content-sidebar .widget .wp-caption { + color: #767676; +} + +.content-sidebar .widget .widget-title { + border-top: 5px solid #000; + color: #2b2b2b; + font-size: 14px; + font-weight: 900; + margin: 0 0 18px; + padding-top: 7px; + text-transform: uppercase; +} + +.content-sidebar .widget .widget-title a { + color: #2b2b2b; +} + +.content-sidebar .widget .widget-title a:hover { + color: #41a62a; +} + +/* List Style Widgets*/ + +.content-sidebar .widget_archive li, +.content-sidebar .widget_categories li, +.content-sidebar .widget_links li, +.content-sidebar .widget_meta li, +.content-sidebar .widget_nav_menu li, +.content-sidebar .widget_pages li, +.content-sidebar .widget_recent_comments li, +.content-sidebar .widget_recent_entries li, +.content-sidebar .widget_categories li ul, +.content-sidebar .widget_nav_menu li ul, +.content-sidebar .widget_pages li ul { + border-color: rgba(0, 0, 0, 0.1); +} + +/* Calendar Widget */ + +.content-sidebar .widget_calendar caption { + color: #2b2b2b; + font-weight: 900; +} + +.content-sidebar .widget_calendar thead th { + background-color: rgba(0, 0, 0, 0.02); +} + +.content-sidebar .widget_calendar tbody a, +.content-sidebar .widget_calendar tbody a:hover { + color: #fff; +} + +/* Ephemera widget*/ + +.content-sidebar .widget_twentyfourteen_ephemera .widget-title { + line-height: 1.2857142857; + padding-top: 1px; +} + +.content-sidebar .widget_twentyfourteen_ephemera .widget-title:before { + background-color: #000; + color: #fff; + margin: -1px 9px 0 0; + padding: 6px 0 9px; + text-align: center; + vertical-align: middle; + width: 36px; +} + +.content-sidebar .widget_twentyfourteen_ephemera .video.widget-title:before { + content: "\f104"; +} + +.content-sidebar .widget_twentyfourteen_ephemera .audio.widget-title:before { + content: "\f109"; +} + +.content-sidebar .widget_twentyfourteen_ephemera .image.widget-title:before { + content: "\f473"; +} + +.content-sidebar .widget_twentyfourteen_ephemera .gallery.widget-title:before { + content: "\f103"; +} + +.content-sidebar .widget_twentyfourteen_ephemera .aside.widget-title:before { + content: "\f101"; +} + +.content-sidebar .widget_twentyfourteen_ephemera .quote.widget-title:before { + content: "\f106"; +} + +.content-sidebar .widget_twentyfourteen_ephemera .link.widget-title:before { + content: "\f107"; +} + +.content-sidebar .widget_twentyfourteen_ephemera > ol > li { + border-bottom: 1px solid rgba(0, 0, 0, 0.1); +} + +.content-sidebar .widget_twentyfourteen_ephemera .entry-meta { + color: #ccc; +} + +.content-sidebar .widget_twentyfourteen_ephemera .entry-meta a { + color: #767676; +} + +.content-sidebar .widget_twentyfourteen_ephemera .entry-meta a:hover { + color: #41a62a; +} + +.content-sidebar.widget_twentyfourteen_ephemera blockquote cite { + font-size: 13px; + line-height: 1.3846153846; +} + +.content-sidebar .widget_twentyfourteen_ephemera .post-format-archive-link { + font-weight: 900; +} + + +/** + * 8.0 Footer + * ----------------------------------------------------------------------------- + */ + +#supplementary { + padding: 0 10px; +} + +.site-footer, +.site-info, +.site-info a { + color: rgba(255, 255, 255, 0.7); +} + +.site-footer { + background-color: #000; + font-size: 12px; + position: relative; + z-index: 3; +} + +.footer-sidebar { + padding-top: 48px; +} + +.site-info { + padding: 15px 10px; +} + +#supplementary + .site-info { + border-top: 1px solid rgba(255, 255, 255, 0.2); +} + +.site-info a:hover { + color: #41a62a; +} + + +/** + * 9.0 Featured Content + * ----------------------------------------------------------------------------- + */ + +.featured-content { + background: #000 url(images/pattern-dark.svg) repeat fixed; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + position: relative; + width: 100%; +} + +.featured-content-inner { + overflow: hidden; +} + +.featured-content .hentry { + color: #fff; + margin: 0; + max-width: 100%; + width: 100%; +} + +.featured-content .post-thumbnail, +.featured-content .post-thumbnail:hover { + background: transparent; +} + +.featured-content .post-thumbnail { + display: block; + position: relative; + padding-top: 55.357142857%; + overflow: hidden; +} + +.featured-content .post-thumbnail img { + left: 0; + position: absolute; + top: 0; +} + +.featured-content .entry-header { + background-color: #000; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + min-height: 96px; + overflow: hidden; + padding: 24px 10px; +} + +.featured-content a { + color: #fff; +} + +.featured-content a:hover { + color: #41a62a; +} + +.featured-content .entry-meta { + color: #fff; + font-size: 11px; + font-weight: 700; + line-height: 1.0909090909; + margin-bottom: 12px; +} + +.featured-content .cat-links { + font-weight: 700; +} + +.featured-content .entry-title { + font-size: 18px; + font-weight: 300; + line-height: 1.3333333333; + margin: 0; + text-transform: uppercase; +} + + +/* Slider */ + +.slider .featured-content .hentry { + -webkit-backface-visibility: hidden; + display: none; + position: relative; +} + +.slider .featured-content .post-thumbnail { + padding-top: 55.49132947%; +} + +.slider-control-paging { + background-color: #000; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; + list-style: none; + margin: -24px 0 0 0; + position: relative; + width: 100%; + z-index: 3; +} + +.slider-control-paging li { + float: left; + margin: 2px 4px 2px 0; +} + +.slider-control-paging li:last-child { + margin-right: 0; +} + +.slider-control-paging a { + cursor: pointer; + display: block; + height: 44px; + position: relative; + text-indent: -999em; + width: 44px; +} + +.slider-control-paging a:before { + background-color: #4d4d4d; + content: ""; + height: 12px; + left: 10px; + position: absolute; + top: 16px; + width: 12px; +} + +.slider-control-paging a:hover:before { + background-color: #41a62a; +} + +.slider-control-paging .slider-active:before, +.slider-control-paging .slider-active:hover:before { + background-color: #24890d; +} + +.slider-direction-nav { + clear: both; + list-style: none; + margin: 0; + position: relative; + width: 100%; + z-index: 3; +} + +.slider-direction-nav li { + border-color: #fff; + border-style: solid; + border-width: 2px 1px 0 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; + text-align: center; + width: 50%; +} + +.slider-direction-nav li:last-child { + border-width: 2px 0 0 1px; +} + +.slider-direction-nav a { + background-color: #000; + display: block; + font-size: 0; + height: 46px; +} + +.slider-direction-nav a:hover { + background-color: #24890d; +} + +.slider-direction-nav a:before { + color: #fff; + content: "\f430"; + font-size: 32px; + line-height: 46px; +} + +.slider-direction-nav .slider-next:before { + content: "\f429"; +} + +.slider-direction-nav .slider-disabled { + display: none; +} + + +/** + * 10.0 Multisite + * ----------------------------------------------------------------------------- + */ + +.site-main .widecolumn { + padding-top: 72px; + width: auto; +} +.site-main .mu_register, +.widecolumn > h2, +.widecolumn > form { + margin: 0 auto 48px; + max-width: 474px; + padding: 0 30px; +} + +.site-main .mu_register #blog_title, +.site-main .mu_register #user_email, +.site-main .mu_register #blogname, +.site-main .mu_register #user_name { + font-size: inherit; + width: 90%; +} + +.site-main .mu_register input[type="submit"], +.widecolumn #submit { + font-size: inherit; + width: auto; +} + + +/** + * 11.0 Media Queries + * ----------------------------------------------------------------------------- + */ + +/* Does the same thing as , + * but in the future W3C standard way. -ms- prefix is required for IE10+ to + * render responsive styling in Windows 8 "snapped" views; IE10+ does not honor + * the meta tag. See http://core.trac.wordpress.org/ticket/25888. + */ +@-ms-viewport { + width: device-width; +} + +@viewport { + width: device-width; +} + +@media screen and (max-width: 400px) { + .list-view .site-content .post-thumbnail { + background: none; + width: auto; + z-index: 2; + } + + .list-view .site-content .post-thumbnail img { + float: left; + margin: 0 10px 3px 0; + width: 84px; + } + + .list-view .site-content .entry-header { + background-color: transparent; + padding: 0; + } + + .list-view .content-area { + padding: 0 10px; + } + + .list-view .site-content .hentry { + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + margin: 0; + min-height: 60px; + padding: 12px 0 9px; + } + + .list-view .site-content .cat-links, + .list-view .site-content .type-post .entry-content, + .list-view .site-content .type-page .entry-content, + .list-view .site-content .type-post .entry-summary, + .list-view .site-content .type-page .entry-summary, + .list-view .site-content footer.entry-meta { + display: none; + } + + .list-view .site-content .entry-title { + clear: none; + font-size: 15px; + font-weight: 900; + line-height: 1.2; + margin-bottom: 6px; + text-transform: none; + } + + .list-view .site-content .format-aside .entry-title, + .list-view .site-content .format-link .entry-title, + .list-view .site-content .format-quote .entry-title { + display: block; + } + + .list-view .site-content .entry-meta { + background-color: transparent; + clear: none; + margin: 0; + text-transform: none; + } + + .archive-header, + .page-header { + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + margin: 24px auto 0; + padding-bottom: 24px; + } + + .error404 .page-header { + border-bottom: 0; + margin: 0 auto 24px; + padding: 0 10px; + } +} + +@media screen and (min-width: 401px) { + a.post-thumbnail:hover img { + opacity: 0.85; + } + + .full-size-link:before, + .parent-post-link:before, + .site-content span + .byline:before, + .site-content span + .comments-link:before, + .site-content span + .edit-link:before, + .site-content span + .entry-date:before { + content: ""; + } + + .attachment span.entry-date:before, + .entry-content .edit-link a:before, + .entry-meta .edit-link a:before, + .site-content .byline a:before, + .site-content .comments-link a:before, + .site-content .entry-date a:before, + .site-content .featured-post:before, + .site-content .full-size-link a:before, + .site-content .parent-post-link a:before, + .site-content .post-format a:before { + -webkit-font-smoothing: antialiased; + display: inline-block; + font: normal 16px/1 Genericons; + text-decoration: inherit; + vertical-align: text-bottom; + } + + .site-content .entry-meta > span { + margin-right: 10px; + } + + .site-content .format-video .post-format a:before { + content: "\f104"; + } + + .site-content .format-audio .post-format a:before { + content: "\f109"; + } + + .site-content .format-image .post-format a:before { + content: "\f473"; + } + + .site-content .format-quote .post-format a:before { + content: "\f106"; + margin-right: 2px; + } + + .site-content .format-gallery .post-format a:before { + content: "\f103"; + margin-right: 4px; + } + + .site-content .format-aside .post-format a:before { + content: "\f101"; + margin-right: 2px; + } + + .site-content .format-link .post-format a:before { + content: "\f107"; + position: relative; + top: 1px; + } + + .site-content .featured-post:before { + content: "\f308"; + margin-right: 3px; + position: relative; + top: 1px; + } + + .site-content .entry-date a:before, + .attachment .site-content span.entry-date:before { + content: "\f303"; + margin-right: 1px; + position: relative; + top: 1px; + } + + .site-content .byline a:before { + content: "\f304"; + } + + .site-content .comments-link a:before { + content: "\f300"; + margin-right: 2px; + } + + .entry-content .edit-link a:before, + .entry-meta .edit-link a:before { + content: "\f411"; + } + + .site-content .full-size-link a:before { + content: "\f402"; + margin-right: 1px; + } + + .site-content .parent-post-link a:before { + content: "\f301"; + } + + .list-view .site-content .hentry { + border-top: 1px solid rgba(0, 0, 0, 0.1); + padding-top: 48px; + } + + .list-view .site-content .hentry:first-of-type, + .list-view .site-content .hentry.has-post-thumbnail { + border-top: 0; + padding-top: 0; + } + + .archive-header, + .page-header { + margin: 0 auto 60px; + padding: 0 10px; + } + + .error404 .page-header { + margin-bottom: 24px; + } +} + +@media screen and (min-width: 594px) { + .site-content .entry-header { + padding-right: 30px; + padding-left: 30px; + } + + .site-content .has-post-thumbnail .entry-header { + margin-top: -48px; + } +} + +@media screen and (min-width: 673px) { + .header-main { + padding: 0 30px; + } + + .search-toggle { + margin-right: 18px; + } + + .search-box .search-field { + width: 50%; + } + + .content-area { + float: left; + width: 100%; + } + + .site-content { + margin-right: 33.33333333%; + } + + .site-content .has-post-thumbnail .entry-header { + margin-top: 0; + } + + .archive-header, + .comments-area, + .image-navigation, + .page-header, + .page-content, + .post-navigation, + .site-content .entry-content, + .site-content .entry-summary, + .site-content footer.entry-meta { + padding-right: 30px; + padding-left: 30px; + } + + .singular .site-content .hentry.has-post-thumbnail { + margin-top: 0; + } + + .full-width .site-content { + margin-right: 0; + } + + .full-width .site-content .has-post-thumbnail .entry-header, + .full-width.singular .site-content .hentry.has-post-thumbnail, + .full-width.home .site-content .hentry.has-post-thumbnail { + margin-top: -48px; + } + + #secondary, + #supplementary { + padding: 0 30px; + } + + .content-sidebar { + border: 0; + float: right; + margin-left: -33.33333333%; + padding: 48px 30px 24px; + position: relative; + width: 33.33333333%; + } + + .grid .featured-content .hentry { + float: left; + width: 50%; + } + + .grid .featured-content .hentry:nth-child( 2n+1 ) { + clear: both; + } + + .grid .featured-content .entry-header { + border-color: #000; + border-style: solid; + border-width: 12px 10px; + height: 96px; + padding: 0; + } + + .slider .featured-content .entry-title { + font-size: 22px; + line-height: 1.0909090909; + } + + .slider .featured-content .entry-header { + min-height: inherit; + padding: 24px 30px 48px; + position: absolute; + left: 0; + bottom: 0; + width: 50%; + z-index: 3; + } + + .slider-control-paging { + background: transparent; + margin-top: -48px; + padding-left: 20px; + width: 50%; + } + + .slider-direction-nav { + clear: none; + float: right; + margin-top: -48px; + width: 98px; + } + + .slider-direction-nav li { + border: 0; + padding: 0 1px 0 0; + } + + .slider-direction-nav li:last-child { + padding: 0 0 0 1px; + } + + .slider-direction-nav a { + height: 48px; + } + + .slider-direction-nav a:before { + line-height: 48px; + } + + .site-info { + padding: 15px 30px; + } +} + +@media screen and (min-width: 783px) { + .header-main { + padding-right: 0; + } + + .search-toggle { + margin-right: 0; + } + + /* Fixed Header */ + + .masthead-fixed .site-header { + position: fixed; + top: 0; + } + + .admin-bar.masthead-fixed .site-header { + top: 32px; + } + + .masthead-fixed .site-main { + margin-top: 48px; + } + + /* Navigation */ + + .site-navigation li .current_page_item > a, + .site-navigation li .current_page_ancestor > a, + .site-navigation li .current-menu-item > a, + .site-navigation li .current-menu-ancestor > a { + color: #fff; + } + + /* Primary Navigation */ + + .primary-navigation { + float: right; + font-size: 11px; + margin: 0 1px 0 -12px; + padding: 0; + text-transform: uppercase; + } + + .primary-navigation .menu-toggle { + display: none; + padding: 0; + } + + .primary-navigation .nav-menu { + border-bottom: 0; + display: block; + } + + .primary-navigation.toggled-on { + border-bottom: 0; + margin: 0; + padding: 0; + } + + .primary-navigation li { + border: 0; + display: inline-block; + height: 48px; + line-height: 48px; + position: relative; + } + + .primary-navigation a { + display: inline-block; + padding: 0 12px; + white-space: nowrap; + } + + .primary-navigation ul ul { + background-color: #24890d; + float: left; + margin: 0; + position: absolute; + top: 48px; + left: -999em; + z-index: 99999; + } + + .primary-navigation li li { + border: 0; + display: block; + height: auto; + line-height: 1.0909090909; + } + + .primary-navigation ul ul ul { + left: -999em; + top: 0; + } + + .primary-navigation ul ul a { + padding: 18px 12px; + white-space: normal; + width: 176px; + } + + .primary-navigation li:hover > a, + .primary-navigation li.focus > a { + background-color: #24890d; + color: #fff; + } + + .primary-navigation ul ul a:hover, + .primary-navigation ul ul li.focus > a { + background-color: #41a62a; + } + + .primary-navigation ul li:hover > ul, + .primary-navigation ul li.focus > ul { + left: auto; + } + + .primary-navigation ul ul li:hover > ul, + .primary-navigation ul ul li.focus > ul { + left: 100%; + } + + .primary-navigation .menu-item-has-children > a, + .primary-navigation .page_item_has_children > a { + padding-right: 26px; + } + + .primary-navigation .menu-item-has-children > a:after, + .primary-navigation .page_item_has_children > a:after { + -webkit-font-smoothing: antialiased; + content: "\f502"; + display: inline-block; + font: normal 8px/1 Genericons; + position: absolute; + right: 12px; + top: 22px; + vertical-align: text-bottom; + } + + .primary-navigation li .menu-item-has-children > a, + .primary-navigation li .page_item_has_children > a { + padding-right: 20px; + width: 168px; + } + + .primary-navigation .menu-item-has-children li.menu-item-has-children > a:after, + .primary-navigation .menu-item-has-children li.page_item_has_children > a:after, + .primary-navigation .page_item_has_children li.menu-item-has-children > a:after, + .primary-navigation .page_item_has_children li.page_item_has_children > a:after { + content: "\f501"; + right: 8px; + top: 20px; + } +} + +@media screen and (min-width: 810px) { + .attachment .entry-attachment .attachment { + margin-right: -168px; + margin-left: -168px; + max-width: 810px; + } + + .attachment .site-content .attachment img { + display: block; + margin: 0 auto; + } + + .contributor-avatar { + margin-left: -168px; + } + + .contributor-summary { + float: left; + } + + .full-width .site-content blockquote.alignleft, + .full-width .site-content blockquote.alignright { + width: -webkit-calc(50% + 130px); + width: calc(50% + 130px); + } + + .full-width .site-content blockquote.alignleft, + .full-width .site-content img.size-full.alignleft, + .full-width .site-content img.size-large.alignleft, + .full-width .site-content img.size-medium.alignleft, + .full-width .site-content .wp-caption.alignleft { + margin-left: -168px; + } + + .full-width .site-content .alignleft { + clear: left; + } + + .full-width .site-content blockquote.alignright, + .full-width .site-content img.size-full.alignright, + .full-width .site-content img.size-large.alignright, + .full-width .site-content img.size-medium.alignright, + .full-width .site-content .wp-caption.alignright { + margin-right: -168px; + } + + .full-width .site-content .alignright { + clear: right; + } +} + +@media screen and (min-width: 846px) { + .content-area, + .content-sidebar { + padding-top: 72px; + } + + .site-content .has-post-thumbnail .entry-header { + margin-top: -48px; + } + + .comment-list .trackback, + .comment-list .pingback, + .comment-list article { + margin-bottom: 36px; + padding-top: 36px; + } + + .comment-author .avatar { + height: 34px; + top: 2px; + width: 34px; + } + + .comment-author, + .comment-awaiting-moderation, + .comment-content, + .comment-list .reply, + .comment-metadata { + padding-left: 50px; + } + + .comment-list .children { + margin-left: 20px; + } + + .full-width.singular .site-content .hentry.has-post-thumbnail, + .full-width.home .site-content .hentry.has-post-thumbnail { + margin-top: -72px; + } + + .featured-content { + margin-bottom: 0; + } +} + +@media screen and (min-width: 1008px) { + .search-box-wrapper { + padding-left: 182px; + } + + .main-content { + float: left; + } + + .site-content { + margin-right: 29.04761904%; + margin-left: 182px; + } + + .site-content .entry-header { + margin-top: 0; + } + + .site-content .has-post-thumbnail .entry-header { + margin-top: 0; + } + + .content-sidebar { + margin-left: -29.04761904%; + width: 29.04761904%; + } + + .site:before { + background-color: #000; + content: ""; + display: block; + height: 100%; + min-height: 100%; + position: absolute; + top: 0; + left: 0; + width: 182px; + z-index: 2; + } + + #secondary { + background-color: transparent; + border: 0; + clear: none; + float: left; + margin: 0 0 0 -100%; + min-height: 100vh; + width: 122px; + } + + .primary-sidebar { + padding-top: 0; + } + + .site-description { + display: block; + margin: -3px 0 21px; + } + + .site-description:empty { + margin: 0; + } + + .secondary-navigation { + font-size: 11px; + margin: 0 -30px 48px; + width: 182px; + } + + .secondary-navigation li { + border-top: 1px solid rgba(255, 255, 255, 0.2); + position: relative; + } + + .secondary-navigation a { + padding: 10px 30px; + } + + .secondary-navigation ul ul { + background-color: #24890d; + position: absolute; + top: 0; + left: -999em; + width: 182px; + z-index: 99999; + } + + .secondary-navigation li li { + border-top: 0; + } + + .secondary-navigation li:hover > a, + .secondary-navigation li.focus > a { + background-color: #24890d; + color: #fff; + } + + .secondary-navigation ul ul a:hover, + .secondary-navigation ul ul li.focus > a { + background-color: #41a62a; + } + + .secondary-navigation ul li:hover > ul, + .secondary-navigation ul li.focus > ul { + left: 162px; + } + + .secondary-navigation .menu-item-has-children > a { + padding-right: 38px; + } + + .secondary-navigation .menu-item-has-children > a:after { + -webkit-font-smoothing: antialiased; + content: "\f501"; + display: inline-block; + font: normal 8px/1 Genericons; + position: absolute; + right: 26px; + top: 14px; + vertical-align: text-bottom; + } + + .footer-sidebar .widget, + .primary-sidebar .widget { + font-size: 12px; + line-height: 1.5; + } + + .footer-sidebar .widget { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; + padding: 0 30px; + width: 25%; + } + + .footer-sidebar .widget h1, + .primary-sidebar .widget h1 { + font-size: 20px; + line-height: 1.2; + } + + .footer-sidebar .widget h2, + .primary-sidebar .widget h2 { + font-size: 18px; + line-height: 1.3333333333; + } + + .footer-sidebar .widget h3, + .primary-sidebar .widget h3 { + font-size: 16px; + line-height: 1.5; + } + + .footer-sidebar .widget h4, + .primary-sidebar .widget h4 { + font-size: 14px; + line-height: 1.7142857142; + } + + .footer-sidebar .widget h5, + .primary-sidebar .widget h5 { + font-size: 12px; + line-height: 2; + } + + .footer-sidebar .widget h6, + .primary-sidebar .widget h6 { + font-size: 11px; + line-height: 2.1818181818; + } + + .footer-sidebar .widget code, + .footer-sidebar .widget kbd, + .footer-sidebar .widget tt, + .footer-sidebar .widget var, + .footer-sidebar .widget samp, + .footer-sidebar .widget pre, + .primary-sidebar .widget code, + .primary-sidebar .widget kbd, + .primary-sidebar .widget tt, + .primary-sidebar .widget var, + .primary-sidebar .widget samp, + .primary-sidebar .widget pre { + font-size: 11px; + line-height: 1.6363636363; + } + + .footer-sidebar .widget blockquote, + .primary-sidebar .widget blockquote { + font-size: 14px; + line-height: 1.2857142857; + } + + .footer-sidebar .widget blockquote cite, + .primary-sidebar .widget blockquote cite { + font-size: 12px; + line-height: 1.5; + } + + .footer-sidebar .widget input, + .footer-sidebar .widget textarea, + .primary-sidebar .widget input, + .primary-sidebar .widget textarea { + font-size: 12px; + padding: 3px 2px 4px 4px; + } + + .footer-sidebar .widget input[type="button"], + .footer-sidebar .widget input[type="reset"], + .footer-sidebar .widget input[type="submit"], + .primary-sidebar .widget input[type="button"], + .primary-sidebar .widget input[type="reset"], + .primary-sidebar .widget input[type="submit"] { + padding: 5px 15px 4px; + } + + .footer-sidebar .widget .widget-title, + .primary-sidebar .widget .widget-title { + font-size: 11px; + font-weight: 900; + line-height: 1.6363636363; + margin-bottom: 18px; + } + + .footer-sidebar .widget_twentyfourteen_ephemera .entry-title, + .footer-sidebar .widget_twentyfourteen_ephemera .entry-meta, + .footer-sidebar .widget_twentyfourteen_ephemera .wp-caption-text, + .footer-sidebar .widget_twentyfourteen_ephemera .post-format-archive-link, + .footer-sidebar .widget_twentyfourteen_ephemera .entry-content table, + .primary-sidebar .widget_twentyfourteen_ephemera .entry-title, + .primary-sidebar .widget_twentyfourteen_ephemera .entry-meta, + .primary-sidebar .widget_twentyfourteen_ephemera .wp-caption-text, + .primary-sidebar .widget_twentyfourteen_ephemera .post-format-archive-link, + .primary-sidebar .widget_twentyfourteen_ephemera .entry-content table { + font-size: 11px; + line-height: 1.6363636363; + } + + .footer-sidebar .widget_archive li, + .footer-sidebar .widget_categories li, + .footer-sidebar .widget_links li, + .footer-sidebar .widget_meta li, + .footer-sidebar .widget_nav_menu li, + .footer-sidebar .widget_pages li, + .footer-sidebar .widget_recent_comments li, + .footer-sidebar .widget_recent_entries li, + .primary-sidebar .widget_archive li, + .primary-sidebar .widget_categories li, + .primary-sidebar .widget_links li, + .primary-sidebar .widget_meta li, + .primary-sidebar .widget_nav_menu li, + .primary-sidebar .widget_pages li, + .primary-sidebar .widget_recent_comments li, + .primary-sidebar .widget_recent_entries li { + border-top: 0; + padding: 0 0 6px; + } + + .footer-sidebar .widget_archive li:last-child, + .footer-sidebar .widget_categories li:last-child, + .footer-sidebar .widget_links li:last-child, + .footer-sidebar .widget_meta li:last-child, + .footer-sidebar .widget_nav_menu li:last-child, + .footer-sidebar .widget_pages li:last-child, + .footer-sidebar .widget_recent_comments li:last-child, + .footer-sidebar .widget_recent_entries li:last-child, + .primary-sidebar .widget_archive li:last-child, + .primary-sidebar .widget_categories li:last-child, + .primary-sidebar .widget_links li:last-child, + .primary-sidebar .widget_meta li:last-child, + .primary-sidebar .widget_nav_menu li:last-child, + .primary-sidebar .widget_pages li:last-child, + .primary-sidebar .widget_recent_comments li:last-child, + .primary-sidebar .widget_recent_entries li:last-child { + padding: 0; + } + + .footer-sidebar .widget_categories li ul, + .footer-sidebar .widget_nav_menu li ul, + .footer-sidebar .widget_pages li ul, + .primary-sidebar .widget_categories li ul, + .primary-sidebar .widget_nav_menu li ul, + .primary-sidebar .widget_pages li ul { + border-top: 0; + margin-top: 6px; + } + + #supplementary { + padding: 0; + } + + .footer-sidebar { + font-size: 12px; + line-height: 1.5; + } + + .featured-content { + padding-left: 182px; + } + + .grid .featured-content .hentry { + width: 33.3333333%; + } + + .grid .featured-content .hentry:nth-child( 2n+1 ) { + clear: none; + } + + .grid .featured-content .hentry:nth-child( 3n+1 ) { + clear: both; + } + + .grid .featured-content .entry-header { + height: 120px; + } +} + +@media screen and (min-width: 1040px) { + .site-content .has-post-thumbnail .entry-header { + margin-top: -48px; + } + + .archive-header, + .comments-area, + .image-navigation, + .page-header, + .page-content, + .post-navigation, + .site-content .entry-header, + .site-content .entry-content, + .site-content .entry-summary, + .site-content footer.entry-meta { + padding-right: 15px; + padding-left: 15px; + } + + .full-width .archive-header, + .full-width .comments-area, + .full-width .image-navigation, + .full-width .page-header, + .full-width .page-content, + .full-width .post-navigation, + .full-width .site-content .entry-header, + .full-width .site-content .entry-content, + .full-width .site-content .entry-summary, + .full-width .site-content footer.entry-meta { + padding-right: 30px; + padding-left: 30px; + } +} + +@media screen and (min-width: 1080px) { + .search-box .search-field { + width: 324px; + } + + .site-content, + .site-main .widecolumn { + margin-left: 222px; + } + + .site:before { + width: 222px; + } + + .search-box-wrapper, + .featured-content { + padding-left: 222px; + } + + #secondary { + width: 162px; + } + + .secondary-navigation, + .secondary-navigation ul ul { + width: 222px; + } + + .secondary-navigation ul li:hover > ul, + .secondary-navigation ul li.focus > ul { + left: 202px; + } + + .slider .featured-content .entry-title { + font-size: 33px; + } + + .slider .featured-content .entry-header, + .slider-control-paging { + width: 534px; + } + + .slider-control-paging { + padding-left: 24px; + } + + .slider-control-paging li { + margin: 12px 12px 12px 0; + } + + .slider-control-paging a { + height: 24px; + width: 24px; + } + + .slider-control-paging a:before { + top: 6px; + left: 6px; + } +} + +@media screen and (min-width: 1110px) { + .archive-header, + .comments-area, + .image-navigation, + .page-header, + .page-content, + .post-navigation, + .site-content .entry-header, + .site-content .entry-content, + .site-content .entry-summary, + .site-content footer.entry-meta { + padding-right: 30px; + padding-left: 30px; + } +} + +@media screen and (min-width: 1218px) { + .archive-header, + .comments-area, + .image-navigation, + .page-header, + .page-content, + .post-navigation, + .site-content .entry-header, + .site-content .entry-content, + .site-content .entry-summary, + .site-content footer.entry-meta { + margin-right: 54px; + } + + .full-width .archive-header, + .full-width .comments-area, + .full-width .image-navigation, + .full-width .page-header, + .full-width .page-content, + .full-width .post-navigation, + .full-width .site-content .entry-header, + .full-width .site-content .entry-content, + .full-width .site-content .entry-summary, + .full-width .site-content footer.entry-meta { + margin-right: auto; + } +} + +@media screen and (min-width: 1260px) { + .site-content blockquote.alignleft, + .site-content blockquote.alignright { + width: -webkit-calc(50% + 18px); + width: calc(50% + 18px); + } + + .site-content blockquote.alignleft { + margin-left: -18%; + } + + .site-content blockquote.alignright { + margin-right: -18%; + } +} + + +/** + * 12.0 Print + * ----------------------------------------------------------------------------- + */ + +@media print { + body { + background: none !important; /* Brute force since user agents all print differently. */ + color: #2b2b2b; + font-size: 12pt; + } + + .site, + .site-header, + .hentry, + .site-content .entry-header, + .site-content .entry-content, + .site-content .entry-summary, + .site-content .entry-meta, + .page-content, + .archive-header, + .page-header, + .contributor-info, + .comments-area, + .attachment .entry-attachment .attachment { + max-width: 100%; + } + + #site-header img, + .search-toggle, + .site-navigation, + .site-content nav, + .edit-link, + .page-links, + .widget-area, + .more-link, + .post-format-archive-link, + .comment-respond, + .comment-list .reply, + .comment-reply-login, + #secondary, + .site-footer, + .slider-control-paging, + .slider-direction-nav { + display: none; + } + + .site-title a, + .entry-meta, + .entry-meta a, + .featured-content .hentry, + .featured-content a { + color: #2b2b2b; + } + + .entry-content a, + .entry-summary a, + .page-content a, + .comment-content a { + text-decoration: none; + } + + .site-header, + .post-thumbnail, + a.post-thumbnail:hover, + .site-content .entry-header, + .site-footer, + .featured-content, + .featured-content .entry-header { + background: transparent; + } + + .header-main { + padding: 48px 10px; + } + + .site-title { + float: none; + font-size: 19pt; + } + + .content-area { + padding-top: 0; + } + + .list-view .site-content .hentry { + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + margin-bottom: 48px; + padding-bottom: 24px; + } + + .post-thumbnail img { + margin: 0 10px 24px; + } + + .site-content .has-post-thumbnail .entry-header { + padding-top: 0; + } + + .site-content footer.entry-meta { + margin: 24px auto; + } + + .entry-meta .tag-links a { + color: #fff; + } + + .singular .site-content .hentry.has-post-thumbnail { + margin-top: 0; + } + + .gallery-columns-1.gallery-size-medium, + .gallery-columns-1.gallery-size-thumbnail, + .gallery-columns-2.gallery-size-thumbnail, + .gallery-columns-3.gallery-size-thumbnail { + display: block; + } + + .archive-title, + .page-title { + margin: 0 10px 48px; + } + + .featured-content .hentry { + margin-bottom: 48px; + } + + .featured-content .post-thumbnail, + .slider .featured-content .post-thumbnail { + padding-top: 0; + } + + .featured-content .post-thumbnail img { + position: relative; + } + + .featured-content .entry-header { + padding: 0 10px 24px; + } + + .featured-content .entry-meta { + font-size: 9pt; + margin-bottom: 11px; + } + + .featured-content .cat-links { + font-weight: 900; + } + + .featured-content .entry-title { + font-size: 25pt; + line-height: 36px; + } +} diff --git a/wp-content/themes/twentyfourteen/tag.php b/wp-content/themes/twentyfourteen/tag.php new file mode 100644 index 0000000..8f6e69b --- /dev/null +++ b/wp-content/themes/twentyfourteen/tag.php @@ -0,0 +1,60 @@ + + +
            +
            + + + +
            +

            + + %s
            ', $term_description ); + endif; + ?> + + + + +
            + + + +
            +
            + + + +
            +

            + +

            +
            + + +
            +
            + + + +
            +
            + + + +
            +
            +

            +

            + + +
            +
            + +
            +
            + + \ No newline at end of file diff --git a/wp-content/themes/twentythirteen/archive.php b/wp-content/themes/twentythirteen/archive.php new file mode 100644 index 0000000..9e0dd4d --- /dev/null +++ b/wp-content/themes/twentythirteen/archive.php @@ -0,0 +1,55 @@ + + +
            +
            + + +
            +

            +
            + + + + + + + + + + + + +
            +
            + + + \ No newline at end of file diff --git a/wp-content/themes/twentythirteen/author-bio.php b/wp-content/themes/twentythirteen/author-bio.php new file mode 100644 index 0000000..ae2f522 --- /dev/null +++ b/wp-content/themes/twentythirteen/author-bio.php @@ -0,0 +1,34 @@ + + + \ No newline at end of file diff --git a/wp-content/themes/twentythirteen/author.php b/wp-content/themes/twentythirteen/author.php new file mode 100644 index 0000000..3d76ba3 --- /dev/null +++ b/wp-content/themes/twentythirteen/author.php @@ -0,0 +1,62 @@ + + +
            +
            + + + + + +
            +

            ' . get_the_author() . '' ); ?>

            +
            + + + + + + + + + + + + + + + + + + +
            +
            + + + \ No newline at end of file diff --git a/wp-content/themes/twentythirteen/category.php b/wp-content/themes/twentythirteen/category.php new file mode 100644 index 0000000..a221239 --- /dev/null +++ b/wp-content/themes/twentythirteen/category.php @@ -0,0 +1,41 @@ + + +
            +
            + + +
            +

            + + +
            + +
            + + + + + + + + + + + + +
            +
            + + + \ No newline at end of file diff --git a/wp-content/themes/twentythirteen/comments.php b/wp-content/themes/twentythirteen/comments.php new file mode 100644 index 0000000..3d1aff4 --- /dev/null +++ b/wp-content/themes/twentythirteen/comments.php @@ -0,0 +1,59 @@ + + +
            + + +

            + ' . get_the_title() . '' ); + ?> +

            + +
              + 'ol', + 'short_ping' => true, + 'avatar_size' => 74, + ) ); + ?> +
            + + 1 && get_option( 'page_comments' ) ) : + ?> + + + + +

            + + + + + + +
            \ No newline at end of file diff --git a/wp-content/themes/twentythirteen/content-aside.php b/wp-content/themes/twentythirteen/content-aside.php new file mode 100644 index 0000000..8aa309b --- /dev/null +++ b/wp-content/themes/twentythirteen/content-aside.php @@ -0,0 +1,31 @@ + + +
            > +
            + →', 'twentythirteen' ) ); ?> + '', 'link_before' => '', 'link_after' => '' ) ); ?> +
            + +
            + + + ', '' ); ?> + + + + + + + + ', '' ); ?> + +
            +
            diff --git a/wp-content/themes/twentythirteen/content-audio.php b/wp-content/themes/twentythirteen/content-audio.php new file mode 100644 index 0000000..5ba1862 --- /dev/null +++ b/wp-content/themes/twentythirteen/content-audio.php @@ -0,0 +1,37 @@ + + +
            > +
            + +

            + +

            + +

            + +
            + +
            +
            + →', 'twentythirteen' ) ); ?> + '', 'link_before' => '', 'link_after' => '' ) ); ?> +
            +
            + +
            + + ', '' ); ?> + + + + +
            +
            diff --git a/wp-content/themes/twentythirteen/content-chat.php b/wp-content/themes/twentythirteen/content-chat.php new file mode 100644 index 0000000..b34ab46 --- /dev/null +++ b/wp-content/themes/twentythirteen/content-chat.php @@ -0,0 +1,31 @@ + + +
            > +
            + +

            + +

            + +

            + +
            + +
            + + '', 'link_before' => '', 'link_after' => '' ) ); ?> +
            + +
            + + ', '' ); ?> +
            +
            diff --git a/wp-content/themes/twentythirteen/content-gallery.php b/wp-content/themes/twentythirteen/content-gallery.php new file mode 100644 index 0000000..a4e2464 --- /dev/null +++ b/wp-content/themes/twentythirteen/content-gallery.php @@ -0,0 +1,45 @@ + + +
            > +
            + +

            + +

            + +

            + +
            + +
            + + →', 'twentythirteen' ) ); ?> + '', 'link_before' => '', 'link_after' => '' ) ); ?> + + + +
            + +
            + + + + + ' . __( 'Leave a comment', 'twentythirteen' ) . '', __( 'One comment so far', 'twentythirteen' ), __( 'View all % comments', 'twentythirteen' ) ); ?> + + + ', '' ); ?> + + + + +
            +
            diff --git a/wp-content/themes/twentythirteen/content-image.php b/wp-content/themes/twentythirteen/content-image.php new file mode 100644 index 0000000..972423d --- /dev/null +++ b/wp-content/themes/twentythirteen/content-image.php @@ -0,0 +1,41 @@ + + +
            > +
            + +

            + +

            + +

            + +
            + +
            + →', 'twentythirteen' ) ); ?> + '', 'link_before' => '', 'link_after' => '' ) ); ?> +
            + +
            + + + + + ' . __( 'Leave a comment', 'twentythirteen' ) . '', __( 'One comment so far', 'twentythirteen' ), __( 'View all % comments', 'twentythirteen' ) ); ?> + + + ', '' ); ?> + + + + +
            +
            diff --git a/wp-content/themes/twentythirteen/content-link.php b/wp-content/themes/twentythirteen/content-link.php new file mode 100644 index 0000000..2da7ffb --- /dev/null +++ b/wp-content/themes/twentythirteen/content-link.php @@ -0,0 +1,36 @@ + + +
            > +
            +

            + +

            + + +
            + +
            + →', 'twentythirteen' ) ); ?> + '', 'link_before' => '', 'link_after' => '' ) ); ?> +
            + + +
            + + + + +
            + +
            diff --git a/wp-content/themes/twentythirteen/content-none.php b/wp-content/themes/twentythirteen/content-none.php new file mode 100644 index 0000000..d9549e1 --- /dev/null +++ b/wp-content/themes/twentythirteen/content-none.php @@ -0,0 +1,31 @@ + + + + +
            + + +

            Get started here.', 'twentythirteen' ), admin_url( 'post-new.php' ) ); ?>

            + + + +

            + + + + +

            + + + +
            diff --git a/wp-content/themes/twentythirteen/content-quote.php b/wp-content/themes/twentythirteen/content-quote.php new file mode 100644 index 0000000..307537d --- /dev/null +++ b/wp-content/themes/twentythirteen/content-quote.php @@ -0,0 +1,27 @@ + + +
            > +
            + →', 'twentythirteen' ) ); ?> + '', 'link_before' => '', 'link_after' => '' ) ); ?> +
            + +
            + + + + + ' . __( 'Leave a comment', 'twentythirteen' ) . '', __( 'One comment so far', 'twentythirteen' ), __( 'View all % comments', 'twentythirteen' ) ); ?> + + + ', '' ); ?> +
            +
            diff --git a/wp-content/themes/twentythirteen/content-status.php b/wp-content/themes/twentythirteen/content-status.php new file mode 100644 index 0000000..272f5de --- /dev/null +++ b/wp-content/themes/twentythirteen/content-status.php @@ -0,0 +1,25 @@ + + +
            > +
            + →', 'twentythirteen' ) ); ?> + '', 'link_before' => '', 'link_after' => '' ) ); ?> +
            + +
            + + ', '' ); ?> + + + + +
            +
            diff --git a/wp-content/themes/twentythirteen/content-video.php b/wp-content/themes/twentythirteen/content-video.php new file mode 100644 index 0000000..ac01758 --- /dev/null +++ b/wp-content/themes/twentythirteen/content-video.php @@ -0,0 +1,41 @@ + + +
            > +
            + +

            + +

            + +

            + +
            + +
            + →', 'twentythirteen' ) ); ?> + '', 'link_before' => '', 'link_after' => '' ) ); ?> +
            + +
            + + + + + ' . __( 'Leave a comment', 'twentythirteen' ) . '', __( 'One comment so far', 'twentythirteen' ), __( 'View all % comments', 'twentythirteen' ) ); ?> + + + ', '' ); ?> + + + + +
            +
            diff --git a/wp-content/themes/twentythirteen/content.php b/wp-content/themes/twentythirteen/content.php new file mode 100644 index 0000000..c341740 --- /dev/null +++ b/wp-content/themes/twentythirteen/content.php @@ -0,0 +1,57 @@ + + +
            > +
            + +
            + +
            + + + +

            + +

            + +

            + + + +
            + + +
            + +
            + +
            + →', 'twentythirteen' ) ); ?> + '', 'link_before' => '', 'link_after' => '' ) ); ?> +
            + + +
            + + + + + + + +
            +
            diff --git a/wp-content/themes/twentythirteen/css/editor-style.css b/wp-content/themes/twentythirteen/css/editor-style.css new file mode 100644 index 0000000..5684189 --- /dev/null +++ b/wp-content/themes/twentythirteen/css/editor-style.css @@ -0,0 +1,771 @@ +/* +Theme Name: Twenty Thirteen +Description: Used to style the TinyMCE editor. +*/ + + +/** + * Table of Contents: + * + * 1.0 - Body + * 2.0 - Headings + * 3.0 - Text Elements + * 4.0 - Links + * 5.0 - Alignment + * 6.0 - Tables + * 7.0 - Images + * 8.0 - Galleries + * 9.0 - Audio/Video + * 10.0 - Post Formats + * 11.0 - RTL + * ---------------------------------------------------------------------------- + */ + + +/** + * 1.0 Body + * ---------------------------------------------------------------------------- + */ + +html .mceContentBody { + font-size: 100%; + max-width: 604px; +} + +body { + color: #141412; + font-family: "Source Sans Pro", Helvetica, sans-serif; + line-height: 1.5; + text-rendering: optimizeLegibility; + vertical-align: baseline; +} + + +/** + * 2.0 Headings + * ---------------------------------------------------------------------------- + */ + +h1, +h2, +h3, +h4, +h5, +h6 { + clear: both; + font-family: Bitter, Georgia, serif; + line-height: 1.3; +} + +h1 { + font-size: 48px; + margin: 33px 0; +} + +h2 { + font-size: 30px; + margin: 25px 0; +} + +h3 { + font-size: 22px; + margin: 22px 0; +} + +h4 { + font-size: 20px; + margin: 25px 0; +} + +h5 { + font-size: 18px; + margin: 30px 0; +} + +h6 { + font-size: 16px; + margin: 36px 0; +} + +hr { + background: url(../images/dotted-line.png) repeat center top; + background-size: 4px 4px; + border: 0; + height: 1px; + margin: 0 0 24px; +} + + +/** + * 3.0 Text Elements + * ---------------------------------------------------------------------------- + */ + +p { + margin: 0 0 24px; +} + +ol, +ul { + margin: 16px 0; + padding: 0 0 0 40px; +} + +ul { + list-style-type: square; +} + +ol { + list-style: decimal outside; +} + +li > ul, +li > ol { + margin: 0; +} + +dl { + margin: 0 20px; +} + +dt { + font-weight: bold; +} + +dd { + margin: 0 0 20px; +} + +strong { + font-weight: bold; +} + +code, +kbd, +pre, +samp { + font-family: monospace, serif; + font-size: 14px; +} + +pre { + background: #f5f5f5; + color: #666; + font-family: monospace; + font-size: 14px; + margin: 20px 0; + overflow: auto; + padding: 20px; + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; +} + +blockquote, +q { + quotes: none; +} + +blockquote:before, +blockquote:after, +q:before, +q:after { + content: ""; + content: none; +} + +blockquote { + font-size: 24px; + font-style: italic; + font-weight: 300; + margin: 24px 40px; +} + +blockquote blockquote { + margin-right: 0; +} + +blockquote cite, +blockquote small { + font-size: 14px; + font-weight: normal; + text-transform: uppercase; +} + +cite { + border-bottom: 0; +} + +abbr[title] { + border-bottom: 1px dotted; +} + +address { + font-style: italic; + margin: 0 0 24px; +} + +del { + color: #333; +} + +ins { + background: #fff9c0; + border: none; + color: #333; + text-decoration: none; +} + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + + +/** + * 4.0 Links + * ---------------------------------------------------------------------------- + */ + +a { + color: #ca3c08; + text-decoration: none; +} + +a:visited { + color: #ac0404; +} + +a:focus { + outline: thin dotted; +} + +a:active, +a:hover { + color: #ea9629; + outline: 0; +} + +a:hover { + text-decoration: underline; +} + + +/** + * 5.0 Alignment + * ---------------------------------------------------------------------------- + */ + +.alignleft { + float: left; + margin: 5px 20px 5px 0; +} + +.alignright { + float: right; + margin: 5px 0 5px 20px; +} + +.aligncenter { + display: block; + margin: 5px auto; +} + +img.alignnone { + margin: 5px 0; +} + + +/** + * 6.0 Tables + * ---------------------------------------------------------------------------- + */ + +table { + border-bottom: 1px solid #ededed; + border-collapse: collapse; + border-spacing: 0; + font-size: 14px; + line-height: 2; + margin: 0 0 20px; + width: 100%; +} + +caption, +th, +td { + font-weight: normal; + text-align: left; +} + +caption { + font-size: 16px; + margin: 20px 0; +} + +th { + font-weight: bold; + text-transform: uppercase; +} + +td { + border-top: 1px solid #ededed; + padding: 6px 10px 6px 0; +} + + +/** + * 7.0 Images + * ---------------------------------------------------------------------------- + */ + +img { + height: auto; + max-width: 100%; + vertical-align: middle; +} + +.wp-caption { + background: transparent; + border: none; + margin: 0; + padding: 0; + text-align: left; +} + +.html5-captions .wp-caption { + padding: 0; +} + +.wp-caption.alignleft { + margin: 5px 10px 5px 0; +} + +.html5-captions .wp-caption.alignleft { + margin-right: 20px; +} + +.wp-caption.alignright { + margin: 5px 0 5px 10px; +} + +.wp-caption.alignright img, +.wp-caption.alignright .wp-caption-dd { + padding-left: 10px; +} + +.html5-captions .wp-caption.alignright { + margin-left: 20px; +} + +.html5-captions .wp-caption.alignright img, +.html5-captions .wp-caption.alignright .wp-caption-dd { + padding: 0; +} + +.wp-caption-dt { + margin: 0; +} + +.wp-caption .wp-caption-text, +.wp-caption-dd { + color: #220e10; + font-size: 18px; + font-style: italic; + font-weight: 300; + line-height: 1.5; + margin-bottom: 24px; + padding: 0; +} + +.mceTemp + ul, +.mceTemp + ol { + list-style-position: inside; +} + + +/** + * 8.0 Galleries + * ---------------------------------------------------------------------------- + */ + +.gallery .gallery-item { + float: left; + margin: 0 4px 4px 0; + overflow: hidden; + padding: 0; + position: relative; +} + +.gallery-columns-1 .gallery-item { + max-width: 100%; + width: auto; +} + +.gallery-columns-2 .gallery-item { + max-width: 48%; + max-width: -webkit-calc(50% - 14px); + max-width: calc(50% - 14px); + width: auto; +} + +.gallery-columns-3 .gallery-item { + max-width: 32%; + max-width: -webkit-calc(33.3% - 11px); + max-width: calc(33.3% - 11px); + width: auto; +} + +.gallery-columns-4 .gallery-item { + max-width: 23%; + max-width: -webkit-calc(25% - 9px); + max-width: calc(25% - 9px); + width: auto; +} + +.gallery-columns-5 .gallery-item { + max-width: 19%; + max-width: -webkit-calc(20% - 8px); + max-width: calc(20% - 8px); + width: auto; +} + +.gallery-columns-6 .gallery-item { + max-width: 15%; + max-width: -webkit-calc(16.7% - 7px); + max-width: calc(16.7% - 7px); + width: auto; +} + +.gallery-columns-7 .gallery-item { + max-width: 13%; + max-width: -webkit-calc(14.28% - 7px); + max-width: calc(14.28% - 7px); + width: auto; +} + +.gallery-columns-8 .gallery-item { + max-width: 11%; + max-width: -webkit-calc(12.5% - 6px); + max-width: calc(12.5% - 6px); + width: auto; +} + +.gallery-columns-9 .gallery-item { + max-width: 9%; + max-width: -webkit-calc(11.1% - 6px); + max-width: calc(11.1% - 6px); + width: auto; +} + +.gallery-columns-1 .gallery-item:nth-of-type(1n), +.gallery-columns-2 .gallery-item:nth-of-type(2n), +.gallery-columns-3 .gallery-item:nth-of-type(3n), +.gallery-columns-4 .gallery-item:nth-of-type(4n), +.gallery-columns-5 .gallery-item:nth-of-type(5n), +.gallery-columns-6 .gallery-item:nth-of-type(6n), +.gallery-columns-7 .gallery-item:nth-of-type(7n), +.gallery-columns-8 .gallery-item:nth-of-type(8n), +.gallery-columns-9 .gallery-item:nth-of-type(9n) { + margin-right: 0; +} + +.gallery-columns-1 .gallery-item:nth-of-type(1n), +.gallery-columns-2 .gallery-item:nth-of-type(2n - 1), +.gallery-columns-3 .gallery-item:nth-of-type(3n - 2), +.gallery-columns-4 .gallery-item:nth-of-type(4n - 3), +.gallery-columns-5 .gallery-item:nth-of-type(5n - 4), +.gallery-columns-6 .gallery-item:nth-of-type(6n - 5), +.gallery-columns-7 .gallery-item:nth-of-type(7n - 6), +.gallery-columns-8 .gallery-item:nth-of-type(8n - 7), +.gallery-columns-9 .gallery-item:nth-of-type(9n - 8) { + margin-left: 12px; /* Compensate for the default negative margin on .gallery, which can't be changed. */ +} + +.gallery .gallery-caption { + background-color: rgba(0, 0, 0, 0.7); + box-sizing: border-box; + color: #fff; + font-size: 14px; + line-height: 1.3; + margin: 0; + max-height: 50%; + opacity: 0; + padding: 2px 8px; + position: absolute; + bottom: 0; + left: 0; + text-align: left; + -webkit-transition: opacity 400ms ease; + transition: opacity 400ms ease; + width: 100%; +} + +.gallery .gallery-caption:before { + box-shadow: 0 -10px 15px #000 inset; + content: ""; + height: 100%; + min-height: 49px; + position: absolute; + left: 0; + top: 0; + width: 100%; +} + +.gallery-item:hover .gallery-caption { + opacity: 1; +} + +.gallery-columns-7 .gallery-caption, +.gallery-columns-8 .gallery-caption, +.gallery-columns-9 .gallery-caption { + display: none; +} + + +/** + * 9.0 Audio/Video + * ---------------------------------------------------------------------------- + */ +.mejs-mediaelement, +.mejs-container .mejs-controls { + background: #220e10; +} + +.mejs-controls .mejs-time-rail .mejs-time-loaded, +.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current { + background: #fff; +} + +.mejs-controls .mejs-time-rail .mejs-time-current { + background: #ea9629; +} + +.mejs-controls .mejs-time-rail .mejs-time-total, +.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total { + background: #595959; +} + +.mejs-controls .mejs-time-rail span, +.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total, +.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current { + border-radius: 0; +} + + +/** + * 10.0 Post Formats + * ---------------------------------------------------------------------------- + */ + +/* Aside */ +.post-format-aside { + background-color: #f7f5e7; +} + +.post-format-aside blockquote { + font-size: 100%; + font-weight: normal; +} + +.post-format-aside cite { + font-size: 100%; + text-transform: none; +} + +.post-format-aside cite:before { + content: "\2014"; + margin-right: 5px; +} + +/* Audio */ +.post-format-audio { + background-color: #db572f; +} + +.post-format-audio a { + color: #fbfaf3; +} + +.post-format-audio:before { + background: url(../images/dotted-line.png) repeat-y 85px 0; + background-size: 4px 4px; + content: "\f109"; + display: block; + float: left; + font-family: Genericons; + font-size: 64px; + -webkit-font-smoothing: antialiased; + height: 100%; + line-height: 1; + width: 120px; +} + +/* Chat */ +.post-format-chat { + background-color: #eadaa6; +} + +.post-format-chat a { + color: #722d19; +} + +/* Gallery */ +.post-format-gallery { + background-color: #fbca3c; +} + +.post-format-gallery a { + color: #722d19; +} + +/* Image: same as Standard/Defaults */ + +/* Link */ +.post-format-link { + background-color: #f7f5e7; +} + +/* Quote */ +.post-format-quote { + background-color: #210d10; + color: #f7f5e7; +} + +.post-format-quote a { + color: #e63f2a; +} + +.post-format-quote blockquote { + font-size: 28px; + font-style: italic; + font-weight: 300; + margin: 0; + padding-left: 75px; + position: relative; +} + +.post-format-quote blockquote:before { + content: '\201C'; + font-size: 140px; + font-weight: 400; + line-height: .8; + padding-right: 25px; + position: absolute; + left: -15px; + top: -3px; +} + +.post-format-quote blockquote small, +.post-format-quote blockquote cite { + display: block; + font-size: 16px; +} + +.format-quote .entry-content cite a { + border-bottom: 1px dotted #fff; + color: #fff; +} + +.format-quote .entry-content cite a:hover { + text-decoration: none; +} + + +/* Status */ +.post-format-status { + background-color: #722d19; + color: #f7f5e7; + font-style: italic; + font-weight: 300; + padding: 0; + padding-left: 35px; +} + +.post-format-status.mceContentBody { + font-size: 24px; +} + +.post-format-status:before { + background: url(../images/dotted-line.png) repeat-y left bottom; + background-size: 4px 4px; + content: ""; + display: block; + float: left; + height: 100%; + position: relative; + left: -30px; + width: 1px; +} + +.post-format-status > p:first-child:before { + background-color: rgba(0, 0, 0, 0.65); + content: ""; + height: 3px; + width: 13px; + margin-top: 13px; + position: absolute; + left: 9px; +} + +.post-format-status a { + color: #eadaa6; +} + +/* Video */ +.post-format-video { + background-color: #db572f; +} + +.post-format-video a { + color: #fbfaf3; +} + + +/** + * 11.0 RTL + * ---------------------------------------------------------------------------- + */ + +html .mceContentBody.rtl { + direction: rtl; + unicode-bidi: embed; +} + +.rtl ol, +.rtl ul { + padding: 0 40px 0 0; +} + +.rtl .wp-caption, +.rtl tr th { + text-align: right; +} + +.rtl td { + padding: 6px 0 6px 10px; + text-align: right; +} + +.rtl blockquote blockquote { + margin-left: 0; + margin-right: 24px; +} + +.rtl.post-format-audio:before, +.rtl.post-format-status:before, +.rtl.post-format-status > p:first-child:before { + background: none; + content: none; +} diff --git a/wp-content/themes/twentythirteen/css/ie.css b/wp-content/themes/twentythirteen/css/ie.css new file mode 100644 index 0000000..2ea67d4 --- /dev/null +++ b/wp-content/themes/twentythirteen/css/ie.css @@ -0,0 +1,290 @@ +/* +Styles for older IE versions (previous to IE9). +*/ + +.site { + min-width: 1040px; +} + +.genericon:before:hover, +.menu-toggle:after:hover, +.date a:before:hover, +.entry-meta .author a:before:hover, +.format-audio .entry-content:before:hover, +.comments-link a:before:hover, +.tags-links a:first-child:before:hover, +.categories-links a:first-child:before:hover, +.edit-link > a:before:hover, +.attachment-meta:before:hover, +.attachment-meta a:before:hover, +.comment-awaiting-moderation:before:hover, +.comment-reply-link:before:hover, +.comment-reply-title small a:before:hover, +.bypostauthor > .comment-body .fn:before:hover { + text-decoration: none; +} + +.nav-menu .sub-menu ul, +.nav-menu .children ul { + left: 100%; +} + +.site-header .home-link { + max-width: 1040px; +} + +.site-header .search-form [type="search"], +.site-header .search-form [type="text"] { + padding-top: 6px; +} + +img.alignright { + margin-right: 0; +} + +img.alignleft { + margin-left: 0; +} + +.site-main .sidebar-inner { + width: 1040px; +} + +.site-main .widget-area { + margin-right: 60px; +} + +.format-image .entry-content .size-full { + margin: 0; + max-width: 604px; +} + +.gallery-columns-1 .gallery-item, +.gallery-columns-2 .gallery-item, +.gallery-columns-3 .gallery-item { + max-width: none; +} + +.gallery img { + width: auto; +} + +.gallery-caption { + background: #000; + filter: alpha(opacity=0); +} + +.gallery-item:hover .gallery-caption { + filter: alpha(opacity=70); +} + +.comment { + clear: both; +} + +.comment-meta, +.comment-content, +.comment-list .reply { + width: 480px; +} + +.depth-2 .comment-meta, +.depth-2 .comment-content, +.comment-list .depth-2 .reply { + width: 460px; +} + +.depth-3 .comment-meta, +.depth-3 .comment-content, +.comment-list .depth-3 .reply { + width: 440px; +} + +.depth-4 .comment-meta, +.depth-4 .comment-content, +.comment-list .depth-4 .reply { + width: 420px; +} + +.depth-5 .comment-meta, +.depth-5 .comment-content, +.comment-list .depth-5 .reply { + width: 400px; +} + +.comment-meta { + margin-bottom: 0; +} + +.widget { + background: #f7f5e7; +} + +.site-footer .widget { + background: none; +} + +/* Internet Explorer 8 */ +.ie8 .site { + border: 0; +} + +.ie8 img.size-full, +.ie8 img.size-large { + height: auto; + width: auto; +} + +.ie8 .sidebar .entry-header, +.ie8 .sidebar .entry-content, +.ie8 .sidebar .entry-summary, +.ie8 .sidebar .entry-meta { + max-width: 724px; +} + +.ie8 .author-info { + margin-left: 0; +} + +.ie8 .paging-navigation .nav-previous .meta-nav { + padding: 5px 0 8px; + width: 40px; +} + +.ie8 .paging-navigation .nav-next { + line-height: 1; +} + +.ie8 .format-status .entry-content:before, +.ie8 .format-status .entry-meta:before { + content: none; +} + +.ie8 .site-main .widget-area { + margin-right: 0; +} + +/* Internet Explorer 7 */ +.ie7 audio, +.ie7 canvas, +.ie7 video { + display: inline; + zoom: 1; +} + +.ie7 legend { + margin-left: -7px; +} + +.ie7 button, +.ie7 input, +.ie7 select, +.ie7 textarea { + vertical-align: middle; +} + +.ie7 button, +.ie7 input[type="button"], +.ie7 input[type="reset"], +.ie7 input[type="submit"] { + overflow: visible; +} + +.ie7 input[type="checkbox"], +.ie7 input[type="radio"] { + height: 13px; + width: 13px; +} + +.ie7 .screen-reader-text { + clip: rect(1px 1px 1px 1px); /* IE7 */ +} + +.ie7 .site-header { + position: relative; + z-index: 1; +} + +.ie7 .main-navigation { + max-width: 930px; + padding-right: 150px; +} + +.ie7 .nav-menu li a, +.ie7 .nav-menu li { + display: block; + float: left; +} + +.ie7 .nav-menu ul { + top: 40px; +} + +.ie7 .nav-menu .sub-menu, +.ie7 .nav-menu .children { + display: none; + overflow: visible; +} + +.ie7 ul.nav-menu li:hover > ul, +.ie7 .nav-menu ul li:hover > ul { + display: block; +} + +.ie7 .site-header .search-form [type="search"], +.ie7 .site-header .search-form [type="text"] { + background-color: #fff; + border: 2px solid #c3c0ab; + cursor: text; + height: 28px; + outline: 0; + width: 150px; +} + +.ie7 .entry-header, +.ie7 .entry-content, +.ie7 .entry-summary, +.ie7 .entry-meta { + width: 604px; +} + +.ie7 .format-status .entry-content, +.ie7 .format-status .entry-meta { + padding-left: 60px; +} + +.ie7 .sidebar .format-status .entry-content, +.ie7 .sidebar .format-status .entry-meta { + padding-left: 60px; +} + +.ie7 .sidebar .post-navigation .nav-links, +.ie7 .sidebar .paging-navigation .nav-links { + width: 604px; +} + +.ie7 .paging-navigation .meta-nav { + padding: 0 0 10px; + vertical-align: middle; + width: 40px; +} + +.ie7 .comments-title, +.ie7 .comment-list, +.ie7 .comment-reply-title, +.ie7 .comment-respond .comment-form { + width: 604px; +} + +.ie7 .site-footer .widget-area { + max-width: none; + left: auto; +} + +/* RTL for Internet Explorer 7 & 8 */ +.rtl .format-audio .entry-content:before, +.rtl .comment-reply-link:before, +.rtl .comment-reply-login:before { + -ms-filter: "FlipH"; + filter: FlipH; +} \ No newline at end of file diff --git a/wp-content/themes/twentythirteen/fonts/COPYING.txt b/wp-content/themes/twentythirteen/fonts/COPYING.txt new file mode 100644 index 0000000..aece214 --- /dev/null +++ b/wp-content/themes/twentythirteen/fonts/COPYING.txt @@ -0,0 +1,9 @@ +Genericons 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. + +The fonts are distributed 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. + +As a special exception, if you create a document which uses this font, and embed this font or unaltered portions of this font into the document, this font does not by itself cause the resulting document to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the document might be covered by the GNU General Public License. If you modify this font, you may extend this exception to your version of the font, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. + +This license does not convey any intellectual property rights to third party trademarks that may be included in the icon font; such marks remain subject to all rights and guidelines of use of their owner. \ No newline at end of file diff --git a/wp-content/themes/twentythirteen/fonts/LICENSE.txt b/wp-content/themes/twentythirteen/fonts/LICENSE.txt new file mode 100644 index 0000000..d159169 --- /dev/null +++ b/wp-content/themes/twentythirteen/fonts/LICENSE.txt @@ -0,0 +1,339 @@ + 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 + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +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 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 +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +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 + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +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 +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +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 + + 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 +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +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 + + 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. diff --git a/wp-content/themes/twentythirteen/fonts/genericons-regular-webfont.eot b/wp-content/themes/twentythirteen/fonts/genericons-regular-webfont.eot new file mode 100644 index 0000000..defbbe5 Binary files /dev/null and b/wp-content/themes/twentythirteen/fonts/genericons-regular-webfont.eot differ diff --git a/wp-content/themes/twentythirteen/fonts/genericons-regular-webfont.svg b/wp-content/themes/twentythirteen/fonts/genericons-regular-webfont.svg new file mode 100644 index 0000000..32ff53b --- /dev/null +++ b/wp-content/themes/twentythirteen/fonts/genericons-regular-webfont.svg @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/wp-content/themes/twentythirteen/fonts/genericons-regular-webfont.ttf b/wp-content/themes/twentythirteen/fonts/genericons-regular-webfont.ttf new file mode 100644 index 0000000..a21dcb6 Binary files /dev/null and b/wp-content/themes/twentythirteen/fonts/genericons-regular-webfont.ttf differ diff --git a/wp-content/themes/twentythirteen/fonts/genericons-regular-webfont.woff b/wp-content/themes/twentythirteen/fonts/genericons-regular-webfont.woff new file mode 100644 index 0000000..b57e62c Binary files /dev/null and b/wp-content/themes/twentythirteen/fonts/genericons-regular-webfont.woff differ diff --git a/wp-content/themes/twentythirteen/fonts/genericons.css b/wp-content/themes/twentythirteen/fonts/genericons.css new file mode 100644 index 0000000..2fde399 --- /dev/null +++ b/wp-content/themes/twentythirteen/fonts/genericons.css @@ -0,0 +1,157 @@ +/** + + Genericons Helper CSS + +*/ + + +/** + * The font was graciously generated by Font Squirrel (http://www.fontsquirrel.com). We love those guys. + */ +@font-face { + font-family: 'Genericons'; + src: url('genericons-regular-webfont.eot'); +} + +@font-face { + font-family: 'Genericons'; + src: url(data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAC98ABEAAAAATZgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABgAAAABwAAAAcaBk2X0dERUYAAAGcAAAAHQAAACAAjwAET1MvMgAAAbwAAABCAAAAYFFfaIFjbWFwAAACAAAAAIcAAAGayK6UdGN2dCAAAAKIAAAABgAAAAYAfwEJZnBnbQAAApAAAAGxAAACZVO0L6dnYXNwAAAERAAAAAgAAAAI//8AA2dseWYAAARMAAAmfwAAPpi5AaxsaGVhZAAAKswAAAArAAAANgMOxuZoaGVhAAAq+AAAABwAAAAkEAMH3WhtdHgAACsUAAAAcAAAAM5JOTFAbG9jYQAAK4QAAADGAAAAxk3HPlxtYXhwAAAsTAAAACAAAAAgAYoBJW5hbWUAACxsAAABZgAAAwhJCWWYcG9zdAAALdQAAAFwAAAD3pfLCKFwcmVwAAAvRAAAAC4AAAAusPIrFHdlYmYAAC90AAAABgAAAAYLT1HIAAAAAQAAAADMPaLPAAAAAM3t18IAAAAAze27zXjaY2BkYGDgA2IJBhBgYmAEwkQgZgHzGAAIdQCUAAAAeNpjYGZ/zziBgZWBhdWY5QwDA8NMCM10hsEIzAdKYQeh3uF+DA4PGL4ys6X9S2Ng4GBg0AAKMyIpUWBgBACF8guRAAB42mNgYGBmgGAZBkYGEJgC5DGC+SwMFUBaikEAKML1gOEj5yfOT2KfOb5wfpH8ovnF8ovnl5CvzP//MzAA5Rg+MXwS+MzwheGLwBfFLwZfHL4EfGX4/1+BmZ+Fj4+Pg1eeR4NHiUeaR5SHn4eTOw5qFw7AyMYAV8DIBCSY0BUwDHsAAB/OIGwAAAABCQB/AAB42l1Ru05bQRDdDQ8DgcTYIDnaFLOZkMZ7oQUJxNWNYmQ7heUIaTdykYtxAR9AgUQN2q8ZoKGkSJsGIRdIfEI+IRIza4iiNDs7s3POmTNLypGqd+lrz1PnJJDC3QbNNv1OSLWzAPek6+uNjLSDB1psZvTKdfv+Cwab0ZQ7agDlPW8pDxlNO4FatKf+0fwKhvv8H/M7GLQ00/TUOgnpIQTmm3FLg+8ZzbrLD/qC1eFiMDCkmKbiLj+mUv63NOdqy7C1kdG8gzMR+ck0QFNrbQSa/tQh1fNxFEuQy6axNpiYsv4kE8GFyXRVU7XM+NrBXbKz6GCDKs2BB9jDVnkMHg4PJhTStyTKLA0R9mKrxAgRkxwKOeXcyf6kQPlIEsa8SUo744a1BsaR18CgNk+z/zybTW1vHcL4WRzBd78ZSzr4yIbaGBFiO2IpgAlEQkZV+YYaz70sBuRS+89AlIDl8Y9/nQi07thEPJe1dQ4xVgh6ftvc8suKu1a5zotCd2+qaqjSKc37Xs6+xwOeHgvDQWPBm8/7/kqB+jwsrjRoDgRDejd6/6K16oirvBc+sifTv7FaAAAAAAAAAf//AAJ42q17CXgb5bX2d2ak0WJbmtFqy5YsyVqc2LESrXYWRyQsSRxCICFrgRCWNC4FwlYopUxZmrCFXrhNKaQkpC3Q5aczckLa5nJxKf17KYjlwc3llrZ/0+dpWVp66b2UQmJN/nO+kRyFpKX3ea5tzfLNaPyd853lPcswYE0/sxiTBCYwiVlVJjIba2Fu5mVB9kmmsYwGVc2S0eScZq1qSlazZzRfTnNUNX9Wa81obVXQ2jOa5WCF2Vuz2axmq1ZsFmffWNkmOmjb4ujTbLLugz4tWNVdnmy24gvSdZ/s6NM7oI/NnAWFmP9kHwGnU2PAjjJBrakWVlMF9SieC0xVoelj1PdMALxqw1+kwcsWMM2Z0dxVzYsTxHn6kJiDOGOtTdYVnI+tqvuhT1faFM+YxeEUE8EhpnvdeAaSjeHZzFlM9iSiFo8sWKIJ5gtki/lUHNiLcCHsgQtffNHYZZxv7ILsjokdOybETPPgiy8KO2l0B7HYwlRQbaqkcu76WZjdxHmLcwtntI4qTU2sjjlFn71Pa6lqdpxtpGm2QZxtZ1XrlHUPHklVvRvn3QaKR7c7h4a0oKIJQ1onUiH63DhvzaNoVqSlI6x49rYieUCDPqUiWKWhISTLqyS9MW9MISZ7ZJbLMpn1xAW5GA3IUlRF/vK/D5GrZbD94IcgGYd/+IOtB8B54IDxPqgi8fsom2SW6O4NxleN7caHYIOrwFar33KA0ywwe7NMLSSadXtrLkdC5ciSXKFQtWVBkzMaO6hZssgFTZR1O3A2SFmtRdZb8cRdpRVjNHOcdf2Tww/y1cDpGLjHncDo1NwazLw0qTIGNCQR/wU8UfDUgl+wokDRNTpUUWbaWJ6B5uJTwXlZq2MOK8MFcVZJjhxV3Y1cdzLFg9zWrQ7ci0MkvXlkm98n2RSrMoBPOwTDh+7dcpRtudeq7jp0aNfnnu2tvakKD/Q+i/KJEmxr8ISBNwa4DIBzF5Cd9Z2gktTTh4lwqyBaa9JNXB/72HKmKRnizLQMygNo/VxGbFXSsCSyqbuqz8A5Jm2Kp+wULS7FF2jvjMW5YE9roUEmtrn8wfZIrM+U7/x8CNokXzcEsvwongEHBMFbKmZxzOeGdKmYz0Aq7ga4dWTb+m2p1LrUaBIPRiZG1oMMo+uMHQNb6WRkZNu6rfXLwnsTI1vXbUuO4mkKD0bwXje/V1hKJ3g/PqJ+mdGqsHEbrYGH9bB+psUymjen+askGK05rr2JjNZ+UAtXiVCmW2RkfwdS0IHsz8WyAb/ik3pioPTEU1CKZYsFxRzrw+XevcHCNuxGSS0bZXXDbpG08fHXaEQ1yiQJ/CJujTKM7zY2qK89DuqxEVqHhvxYUY7D7Iy6ZeRaam9oqRdXoKOum3a0Ik637CfF8yp6IDyESwAoO09KjtY2j7eDsx+lGKeXLObTpQigBAWHIZ+iY7/PhQqF/5TLcwE5Vpgzp7DujLPOOmP9mosGVswWGYn0EfyMEO+Ld++8u7jujAMvHzhj/dq3b1n96D1zyO6Qnc/bUQvZJvYppl2S0c6vatNJ60D7JJfzYlUrynonkJTrm3HmRZxjZeTM5WgntE7lSavsn3vquRu5BJ1/CRoceSNemK6UW5zeMOvtz5cXr7qAiLR69sYTyZlZTpeS97BELmthHr/MrFKqkC8W8ulhC22EVHoAXIItlZZsA6IbpKDk90XEoGRzwQCkByzp6eCCQDBiCUZsxZKPVCudYHvACze+/ArcCJ49xg3G84k4nHbmDeqq0mbJaXd7LW25uReVrrvzzutKG4czTufsmZtLq9QblhZau+avWR0VHOF4MWxp7XAoIdERDsXbQGzzdCeK884ZgHjCeN64wcJehs/hw/cYfzJuf8XQa3/YZOvusDx79i1zHN2LRp+46pEt7t5FF8wCweKZlYwJQiw5S5EE4b6brt511ROji6L2zLo2FwyWLG09ne2CrSXkQdq6B2OiPdTR3RFwis7s9Zb2qLRJCNDa2GjD18bNOrnUz0a5Ws6uYZU2xvq0VJUca3dVGzTX62yu6zKqhKyfheu1IEsm6RxcsrNQF8pt1tY2S6CrO9E7ozBnEV+v9hRpvIN5pw/PLy9YvpSWqVvZa4eu8Bw6HvRUYplTuUNoB1ywKK6XjKYRXZ3o8wSLrJRKt6IBCCRKQlpiEIhlS4IoMW/AO2wppRI9cQkiQrBoCQppl+CNAH7HU0p8g1YKduLH+41vGO8YtxsX4+edxDWX3QTffUMuG783tvw1+gy8d+c9Y88YfwblNVi070Dse782tr1/6c+k3WfetXna5439P4iqsDwQTkvfhqWfDX3xjCf/utI1e3145wvtxh/F7InP/wb+X2HxY8ZL11eheOZMdVW2/UuBRQMQev9c48CRB8eXQz/ctsR4xbr5UeNRYXZ0eEHi8/fJtSvDuZWtMakTwmNDF4waezofMH72lctg5fhAXX/G7cxWZlnGlEAuWkIJDeSyuJuHIjoAhXwpYLGSfOeygWCxJNnogyLrhFboiWazkPzdHf/e298zVPin8VWbV10y9DA8A0LL+0+s3TVn++cyd3zu2pWfFzb+zHjTuP43xiNwk7RX2HOzzR1+4wHrTOvs71+2ZeMzb7bNyjzx/unDnSM7VrhzN69LeB83njCe/9N2mp/KEFfYVJZmpzIykWgs41XNlSU/Ec1pgaoWMsWnF7HaQQJwCN0cMmIxLYj4I6dPQwEKIkTQQkPcvTZbUwWd0zyyr8FSqifuEsLQQ043nlJ3jFrZ6I4do8bvwdVq/L5vwaPSss3n37em3zBq/aM7yLfS5SO4FX4KlvHWuSX4L2fp/GtP/aMxWRsiUISekqnWN3DunWwZt6dBjgv82QoDAoisA6EjemN7VWtFiNCV0UIHNSFLcEnJVjpCdE9H0NFXCXXQYYghngybeBJnmR8WcEm6QUQpDVtiIhKjCOqv85d+59Ol0VDI9qOlOVjsMn5ijIvPQQaEZXdeXpZE0fh9+TRRcLxkvDK5X1xMKmqd4rEbkdsqdj7i4u1Ma8toa6taNKOnCohnuqr69Ayi35Umszc36eo81NWzs9ql1cq8S2me85YiWZfK+kYcRwUeRf7PIwV2kAJ7A6vXX8CVN7qWlBrsDubz9gwuOv+CjZeSznYpewP9i5deTMcrPfq0WaS9HtlTRO0NoPZKqL0p0l6QvNlctjgfigHJJtnAK6LZLQYD5lgEzMFhoZAno+vgEhwknbYACXgqLULRg/YaZdmmbn8XlsJlsPTd7dvfNfYa/2zsfTd/+AVDPf32cDB5WU/c73X5+mdBSrvpXJ/b57v9rNSnenpkL7jlvlnQs7xD8QXbfYLXKkutVrsoLhsS7Zcbbz30svE1OOvKa+78gih8AFv3/8dG6zxxyUf+Dx4Jwh+NGy+2hHeCyyqI0B0XrcLkVwQF1tiEeBScNOjtCAg4+jC0njX0idjA2kLcEnF2trS7AorPObQKLrni2cNfjQ1IVuGx2vZRuPr1l8Z6p2990MTmU+t7GlvLLmE7mbY6o/XmtMVVkj+EpAsRbuU0X7Wy0EdLuDCCS9iBMnmpuc7ZOgSL45KGsloCLXe2Ek/QrfFBlMpNuMY2ROtjouv09bRycaXstLZEpvUtGFm56kK+3otXo99lfaejOdZFFx7bBgbJBy9U9oMc60nM+cRG7lq9Ci0PuUwIxqWeuFgwNTYMMaVHiflNWEzaiy4XXa0dr5f4Ya4Ui0viMATRt1qDtK6oyd5UMYhPCkgoHepN1Ug4GuqOeBZ793/FVPGjjEdcCPdR2a3W8+4Ve9wJb1hR7ANL965bsXtr7ZGbf3fa0C/UlUu8qxJzw2GbDWp7z912iv/eG294KuBXb7zpOfg9/O5mcd5QbG4yDBbpFLIMPH7gj57E/9IVuPeJTwmh1i6l09fud+ZPn3PP/i37Z27fePjr524G6Gib0zErPqsjnJTtl1iKj/yHxfK7r+8et1heZoTNECRJy6Qga8UoJs3OZeQ3oxhHZBDTcMPHGhiZoj5PVUtmNY8JelBvyQDaEPTobS5kfacHTWGU9K8dYyfZnUylTaTmC8wBRJUDgPYEIycE7kq+NAy5rB/Znefm0VaIgXr2KbBwhbB8wcJzZLBhWPRVsNvl03K3g/2xO7JnD8Zl4wPr9tlnnTV77pnLjuwXOybfgAMzvL2DY8Ya+On3nmzvT3VceZxMdrEoK1G8iBYH0W+sD83MTB44RaMHFa2Y07wYq8haCGkd5LSGq2R6wrIeQQpjVS1mSmZfVeuT9X7T7Awh1ZEwN/taTNHbgyhqcY9WGNL6FH1mkdBqFC/rvQUzXmx2C4iw/zFuTLkJ8gPA/gHWNDuOHZbrP45PwL6DQGo5YqhT2HdZJUC4yZ3RplWJQxIyZAFnSKGqFWS9CylH3xiXKUbCIEpfiLti6IfDLe8uYf4+p0vrQC6O6z74UEuNj3l8KW9fBbfRO6N39kiokkNsr8fXEUoN0A80HWvlEOhdBVTa4NA8Utq4UpECM+lohkd3TyNuzpyG+t/CuodNLUb3RAA54PH7BAvGLGkB7XE6VfLWsQQPACSy1miEGfHT70NFtRFKTqeE75zx5Veg7wkNMi9c823j33560ffii+X4eV+2hff03nPpijXJea7gDZdc+4OLjLc/uOudr61Z4bHZZIetJ3DzrZY/fvqXLz58wQ3PGUfuft+47tB5ZePXQzfeX3zsRkE7+zN3HfjUObn7nhm66Evfh1lPHgTXRY+9fv39F/tD7fN622VHDqyNuMLErqvY7aziIr4j1Fic0QarWrfpA1dz1idR22Q9h5xeWtWWyvrpeDSnqs2R9ZAZc6xBQVyaQ970ZVasJNt4urLfZfV2D54iL6fTOR49MJ8YGHBR9LESeboYow+Hk3lDyWm5OfOXfyTiIATbE08XSwhITfYNCMg/0e8LBANFFNJSMZVGLnN8QGxG7pfID6LUollFyIBLETw+4DBjgvvvXRJe1LV9+Z7anec/+tft9/zXtz47NLrJE7YIsmi1uk49Qx3f8tyh5TvOP+cib8usyBkLz7latju2eNslRKlPHBdfGOfj5097pl+zCUKFkf0w/9+umvj6xjO/8OjY2jtfnW53eR1lhzegLPvshZWtZ7/+xD//9cvXLh94+LrpC1Y/sKXvbK/XSK648M7rYZJR7Lxb2GDbYN2NEYWb9TJu93Jk8FxmYgXMbIasO5DjbY1EikcORItyKmqp73e/B2vee894XLi7fmD5rvH4e/VjvufrjnbbdjOGLglWYFoLZSE0f0ZTcL2TCIUoMu9sQatiG9L8SoVJXtIBXFy5O9pjCn4QpduLUYMnlwXm9SQTIg6gWJMrS4mkBZK68gbfJ8725fO+y75Wg8vhwlbZ+KNx122nlbfJ9iu3DC6e68vPemWt9nnrRZetNA4tfurpRcYh+Hf4MYiw3t5qrAg/8AlNA/cyWAwZr/2BLZQwrOffFOZjHgY0aZROT1UP1NNKUwYOBSIWHwCrA9RDuyxs16FN+icn2Sf1TYJKWUgKvCmrY9DQJr2dvA8DeI2pUi/a6zhGcpojgwYYtJ6M1nWQOBTI6glijUw5ozbyJjnFx90uuvJiSUHa0ySTCoHUHkJmiM1e+7+h0G0XnHfT5evXXP/FO5bO7VcU+Lax6qgyY+biJZ+y7KnddcOCU66Kdgd8gxBak+iYMfAgvAAd8JO71p43r9xznA/pYX1sDruF+xD0FpGMlq5qHRktntMy6BUoPapZZFRe0OZyxpjQNYoCYyrwtKkEJKUiczz0nEeZpihSFB/SpiljkXA/jyo7KS/D9I40LntnNNlLYxlFT0w7mSPB8D7HkzUxVEV0dBhPxRJ1iUyaTgYDkFQfoGoe503UkYKVFUaMd2VjwlhjTMjGu8Azb4eMZ4TukYJaGOGb4xzKKA2KbMHwhDEB/RPDC7qNZw7Rlxp3jxTQrAEup41JBkpKEGOTbuReGvk3gLE5aBnOHj9KvUzJay3C4V4vbqfcykzkS4cfqQ+0d0WJ+oSyV7IShguSPxiLJ6f3E+SjOCVfgmI2CMQPG5AYQGo+pL2gJMVgUhGDJTxOWxVryQHBArCw8K9KryL8azhcW6D4PN7agvBt3/xmQbAav33jDYg89tbbby8QrG8Yv4XIG7Uj8OVvigF4tbsdXm1pMWa0dxszogGjv6UFJgI7L7/ceNx4HPJPw+CDT0Ou9vTOnTtrcVjz0NNC19MPwpra05f/EhlBeTkmUV7Oz5qScd4MZfRNEk5IvyFUtJjRIeXbRneIqCL8FLeUT9uBz1UFJqkS5el7eOyHUanEobaAT2/N6G2kLw7GTQnPkwUR2ooIYYEUDh9SU1W1LI4fRXVESUckibpp5v8lmq8F0WA7owoFZelQ7J0H8em6i0/agXAFjqXzSaVrlEkbHRkZFfHUwFNLgc5GpnJ/NsrTdLMkO49rkZ9n7snPpbiFVTAoNRWmp6r1mLKBOpJGWYgqKAttFl8YF13v6FE8+1r91q5EksP+MArKPoryYslGweG4UM7jiwjZYQF9WNwFFNdSWvCKp8AKEbA+dcUVTxlHjN8aR55S1j/087d//tB6cwffVGH6OlH/yE14JDiO3YU7Yyf8wlhvHFyPfoTnyHFVGLKdRfiqoFlQzBqPJ6O1HKQ0vPcjy87yxWzAJ8UFdmgXoGWsMV4MwVXiZvIoE3eYZZBjfGxBrepnn25UQPooy1Xp66ZwqS+NkRXCd6GqWx1ZXg6woRebwbWutaq1yrqAnDX9GRmlRLUyjQItNi2M30QllDjjNYeZjkV1HKhPOFbI+flHgYbRQZePIZHfki+ioeEiHEcj3BMnKUJjjyQcYWgwuGGY5MYkFVJDqVQ+hYAPDQuKIKVgGV0X+F3r8qlUyGB4T6gpb1ynuci+0qC5kNHyOUrunUhr6aS0nkDWYB28drx7K4FXLT/g0nLjer/woTZjnFX6Z+QIpI7hPj8FUSUrCltXKt07bToXvoIb9Ssz9LHcycXmCOitwqLPJiL8HICS9+8zCVATxUBMFFRpRijUZbvsib/NLyEaFAQQrE5kW5cN7wedtR7Ht4YFzrAcRkJz2Hy2kO1vcLIroydm5nK8MDALuRjNVHrzc3M4EkPRKMyjmmR/Rh8s48gMjHtOwfMTmX5qE9MxTtCFKF7rruqWOO1lct96bz8ep6v69AHay9zO5wfxOFfVi7NpL+tzcUwq4/H8qm5fQPupBTvtY+XQi6Mifhr7v3X8tzivnuTn5Gwn4wmm1TyhiNo8TjDfrKkSjhDRAjJeHcJAV8mBn+w9r8YabBwVvszLV8a4StYdx0Q8KgNaU9UYN5qeRalvLwtT1g89SpDWkFtSs+Jp+taQaT+plhIiX2q1uGTynw5Fa0HJDVL5x0XpsDFgLY56LWtYyEYwTrIB96UDcKy0Caxu8q6A/1QN5avfv/bnDyWPVTYtI3WreO33v2ooKvznFesfEsRjZU3GTF0+NvcYu7Qx+wjP0tdpiJ9IQ0+dhn1EQyR6Eioiyhjzt3Tw/LxHcxBZFQj5eGb+71ElUp3871O2VVA/jjjDXOjj6ZvGxproS3Jb1ZOtRLiVjvQ6+irdETrsjqHZrdM+vYn2XqQ9SuqixbOVdC/dmk7it3rTdNhLCbT0FIf6SLuQQ5plSEsrlWCXTGFDyKNbXUP/m8yi1Jif0mQfxzQe56AS/AOsm8pjmXV+Bv12Jk2wNl7T6SMpwSjJU6VgIF33dbxhwqzehg82AexYvXobRllpUcT2CEeM05S9Toun2yzipgk+2Fz+rhj1J1CuJhwlwhUg1BB0AIGGtIh+P1tEzEghra1R1vc0AM/hS6AF+qHlYjhiSJcYf0EE/ZeL/wBXnfmT155dCtca9zz8m8t+MmKpo+ldHBZZGBzedPXVlxpWw7rpqqs3wWHjnmUrVpwJ18DVj5yzrPaOefMhoQGbmHWKF9RN0om8yLEyIyFBDjhMDuQzeoGAXvd0xVORu5QhvtxlJ7O5g6FwMjWDyomaxVORPN6hBp25bNDGCYOgG41RGnjqGlLeEqVLSpAuERt64l6g0mGPSe+OH33z3k1XIlnG3e9uS66zsnWTMw7t6i8a/a4QXSDC/7wNrucM2fGjC2DChZdNqi+4d+CcZfS91+l7tRW7DrmM/mJt/70DRP+ftxrbiCewESaK/bsOMbO2Iagch7agxRQIvTvA5qBWg7LBrWIZbSLfGOMiO/6c31Ov7fAcCz7D64Cph6hieXIcN2JZnRznm8lxBLHHnfN7GrlRwnQtaLFmsNsYZWcIxQWz2YqbK7PbhWqp+DvIUfKitu5Mcp/JdXoAIT/hPs0t6zLKKEaP3kY3jxaUMf6lwFDPoNzKiCYqQryHMthBH+UOMeTT2hXUUab3U7OK4KA1hEKyDh6tfkK0zb9mVMhMx8jdIgHJkQIQsGCTrO7VyIPRACENwlpHWYjcHI/i1BoTxmvl5g+OW9x5wm20NmjnIhjTfBlxLnozEf8g1kKjv9wPr8Pr++GXtX379lpuNp6svQVLjb1CEBYLwdrb3H+ZcQv1AbhYL8aD7owmHdRcVc0l6y1mRgvZpLdQBt9iB+QFxRsCLptXcQAP8KkHRCB/S9YDf4+iBbHwDid8OI6qZtXf4Fu0KeRheQwm4YxdiM0ZFCBYAn8Sn0geIAlo0ITy+LhQPsygauQkCmdyUBVYDpBbhpqrCpcaVajmcgYO5Wq87sFlY1wax39u57lzBorDUoIS6RR9VAzcxidJMMnCzdggrNhgnElb/Oa4qBrlST57XCB+rdZG23rMiE/Gp0Y5ShNRjhzcN2AE5iR9FymwkzjwJJ44iACTLdTiJSCYqPEQr6YSikY5rucytiIjfCxBnV22jO4KI6ZDAGfn4aM/owV4Ggr/kW73owibyNmNq2KuD6XDESamzPxXPW4RFd6mEMsL6VQCTxB6hhDZ5J3A+kE1Y5d34UmY9y/GYzdf9xnjxcf+G16GO2DkjS8Yj33yAFrPHxt3QIDfJ47A2n8xfmQs+vO3If+Zz9wsXARrv/CWsde41hh47ydwA8yHtgObOT1+pOcPtgHkO6U9zEhV5n1g7UhELEMZe5xlMVWCYQgEIYCK0YhYRdoTakTMuOyqNcIHQw89NFv465qrHvvwD8Kd3FzX/9QXtlt+ft7Checd6dv+AuzjYyYOhHq2g/O2nhsLoIUosBFG/rwXcTH5LdCKGS1zkDBuCeU6l0Es5unqtXFv1NuFy9g+pNnIZDvb/MHuWN/MPG9AI1c9c5YXtZiXBYKBbKmYT1O9wGJDQoKUm02UUB3ilNGm/Ffc1nBQKnxpxmnO2Eu3PXhNanMqmVzz1i3PGM+MGM/DA8m1b97yDAyPQMG40rxn55bUaOrHfJ0srDT9pj1XpVKp0eTaiye+W3vB3AMfvzqZguvrHXm8H4z3fKWpspKiYgEVyj3ViofXlT1+BCitVEZqFJDMxrQu3otGxvCYCbTzoJ/XkdzIkIo1lCI/5lP01m5qzkPv1ZGkEbuit0Qpld3qIWMI3BiS0QtEG8upmEubq4eivLNMIQlBQE2tdVfuvhKtmIo7OjM+JCgilslh3H7gwO2CuvzKK5fXw89njbl0JjC6UlN/QJjFxOAq3CcRznPhig8wLWBa+mBTzdpn4jI07rpPJpIsraYlqwMsn4QGLdVIIYNaR1Nrlxubjc3LH6s3AU6hp7dfXW6Mwo7laJveP0AXTR+5gXyk9Tdk2sjoBKFH2KD+BsYpFLFE1XGBbaAeOHKFdpqv2UcYaepKtdaVfyplRP1gxxoE7ewDZn6g3kV6bEs5KBH/v0Xl2lh/JiWLLBnd2ojV0FhbyAzSF6bsP02Y5tLbyJHYzCyT3WxipFQqPYGsnWPqQUmqkuHDJhm1JFLSapKCOMKMK4SynVn/Hz7Ry1HjLYzSLShc+PQubuG6MVCVSUZjWa0TPbLZDic1J/aPpSRN+YybgDLZSEa2Kp4WSkDFyUt3RbppPXUxiFfsbn87T9wqYw6Xz2xM8+JqEFAu5ochGwGfC+Kphno66tdWwLVXGn+B+9XxVfc/cf8q2kzf8vCWLQ/DnsYVsSzsGja60ZWxzfVbVq2CIbppi6FOXWuKPWy8G+oTZN+pz9HN89UdGZ4W7Gqkpu1ZElI/UthKVp66PnSZSriCDbGHFcnVRYnoc7fgoZXhYIcXjyx1lQPqujupOSU3JPLGUeo7bjalwtQ4zvhkltRhYq1677GJ/hvZige4pLTyXq5QThuikgBl2uM5bV6VcsjljDY9p51S1VK8cyfDe5ZdOSSb+mSLpoY2JymQ+DFB6UokgtQQU4lScgKPZMoL6XMpAzGnOuZwDy+gG+bIpBz1JIQ+ZxBZkc0NmRnoWB2LcQnt8ccKPQ3PKHxk72lCZd7mTu3jEJqoEpBRUxxuNf2ta8Jq66COboDnJ4h/R1DlEcFNPspvh9Rxu1/w3WRTgsKsRSEuohxyJ8swst6oKN5sReQGXHRQ97mI2JbLDVo2MtbVeoOQhzJ+ZqU1SO6JmiFyRCSSpu4YtdkO3P7F8zMHrtp1KBisVw8EdBzhntsPbLjkxkO7hheYjd1kS9GL2Cy8P5c6i9Op/Hwzpe9zgwvSCP4pY/1TWLLkrZGJJRDB/ZJXRowh2A1sN/X8QpSuToy8tWSJ8duRV0feWiwsMobEl4+y3TyoBMpIWymcspHts3E6RdPc1Et7DTvTyMWKZg62kXnltg5etb5j/T9oCkNTvauOjInGqC1Vs3JkHqMwI81No/Gt1fCO4V0Nq6nbe/Uqw2t4V8FqtNteeFVS+bNQ6EsQw2+lcfCd1ca3yLbB6tXiOL+XvsZz/WWJ5k8RIUUx1O8M42jna+MWRKdlfsTvI39Qpvs4YqYvChgTlY2yiPi2hpHRuFGeqj+LOEn0iwqr4Akus5hBBSc2YJQomo3fgNYdp/k37kMrQMbdbBFvYHuryl+F8PA6KsWoCDTtZtWAp1s4Sj2CcxSYWQ4kYZTpxKpK7Lj3J06Wufw+cb8iR2fmeBd8RYnNIsW1ZCq+RJ7GrNWKP1mgMXum0t47SGOOaqVj2hCNtWYqXf08u9lWrYRnUHYTyHiwgxht8PcvxGpFcrr4EY/YKr72LjrzViuBUIQf8TpFJWGajJ5qJUUZzSxVLWbieH5wbpYnNSvF2cN4pJ9Sf0fjWCLyo4nJf+RcYOrf/xHU41/qqLH/2TkXCYHXf3ithmzwfF6rQc3v5Oi6/h5IV1OJU2nk1amtsCPDXUkHZZp8QydUt+IpanVpuA2B7RgVzDIX1SPNN1W4ryDnTuPU2bQDRkU22VxLMucnoS6n2K0ca8erhECd1YozRabLaUfsacIRXq6ttHlpuM1NtizN+83dWXopoS1LbU5OM/Bsr2rtMtUiExlKvulRJ/WbWSXBrEBqFnSHzMkVXQM61dro/QUzI41xJAJR9AExf0/heJITU2Uy87UKjPeIVLWZ+HrpzMJ4oHiU8XcvuGpMsWFXIy3EcxKM5/apztTBFvG3dDw5CtL8KM0hXqsz62lSC9U/KlaJGGAFR19FstIhRsJ9BHw8LbzjvtOU0JiP2RBppRgtG1EQq+/JyRi/+tVR9ivjV3yN+MaivmE8MsP4b2ibARfAJtOPk08y9xzvYdxp+phuXK2VrJKiTpdIRuvINbxN5KPeBlcodhAXgq9CIoa+tiVFWCSSQuAVjSUoEhCVSidPlPxdV0TZgriV7zASHZWkj3glesfFUEdhFDi+RUCF1j4abfZRPDtJG5OeYz4zTv3CUU5IBNUjW4lEeWaXExJBQrSobJJIfQxm+0IkisQEGZ+/DoGPnT2VWbk/PXHmfLoE/QzTs3501qakUU2ynm9xoEW+jnsuK0f+qBz87bNKaxvNu1Um1nunXt1pLpjJHBNXZDfdKLc6+ii84bWwiuD0ULaK92VQjtlCg3ZzsBVwUDEVxEaLUFIc5OsofUzTUimSwBUQUsY6PKj9QjCxD3Dxf11I0vGjtV807JKZh7MwJ2tDSapTYuco12n6Y1fT9OtvQLWYhFjMd49a7PzdI01StFacLT8VhzSnYjaV0MskSVNccmnySICeTeSMFtjzz3MtwBFV4Gmb5+v4xdRFBa3l6Yzwtp/arUkLpVyTtcTYQ+IWx1sdc0r0VlQ7z2M7TfTtbEfRCHQMHTOaSk9cogYOP9qQIiHHVL5E2TzqDaCEXKE8abZxiOhjJl8smEbzCFkSlaxF6b4S721iu20bbBswTi3S+qOdzFYJD7urvFIqHtRmVrWZsp6n1lteFdVnilRSt9pbp80g25dXxuREG29DCXn2Kf72ru4enr3IokLuC7NYopfehdKKyhhY27vo0O3ZJznbZG/QjIVKKOCldMlaLImlIGK7UlAMBJNBavO3BW1Jyea1pal3w5b2ptLWhn/Y/abd/uZsmJWZ67/ruYXywufuDgzmYNZsPmy81D8/gMMO+8Ln7vIP5oyXhBRHa8IfGoNzMye7mR5ivDS7/mwcF5x1kCce9+4jX03z7cfQlNeDRvQQNN9+pJULYmC4j95+VHycKyE3cU+yMY//hDcgvT6Wy5ZA8kKRNyWe8CZkFvontn6udtqimnBgkTExse2EdyKzE8bEIuHA5yFXO+3GbRPQf8K8L2ekxxgluXmUhDTYGr0hddzaxT1EK++6FrIVp417TXIJTpkch82MDTsoUOQ02tDv6S4vtaIputtD4aCfe0Lz3VNqX/VTYUiu4+dEfU92yIKqMkkYse7b9/GdRDVSinMs7PDzTVEia+6jICzYxRp5ATOBZDE5fywvwN9LoDCAmcEQQcsjZn6ETeUaIsfnJxqPqzYlKkh/zKxCvc6KWs3nIPF+N1v9S3UsS9/wmllXJMH8vyawbfqucOy7IlmAqe8CfwvTfKvVfI2yxp9Qf8+SNb9nyRrvWYrAX3qyN7DZKfX3nP730Bk0obNjTUiTvPeYGFOHKYTA6MJhE55Z2eGpmpXI/T3N0cRnN7FKF83xf4jQbE0I7W/AswSK5F7BKlm6udadFJl5G8gsVv89OTJrvO+qmlQePY5y4aPQrIbrbHBPYDZlHW5GZ1Rzonhp/KTxUo5qT+P0O1k2YzA8tfO3N3GeNMovmzjDUua1K4HXrvi4nU2W8SpYyvW6lkDxo2LBQfp8oLL/D/oHFeoAeNpjYGRgYGBi8vVdNXdGPL/NVwZ5DgYQOPt29zlkmoOBA0IxgSgAVvoK5QB42mNgZGDgYPh/A0QyMPz/DySBIiiAFQBj/AP1eNpNTrENgDAMc0IHdsQ//MADnGKJRzrDQxzCxEScFolUtWIncYIHGX4AdgMjHAYQdDiNtkO8BZ2qmPAMXpNd8aPHEjX9f+mdM72D6T7L3+gbpBCrKuoapE6poQR6c2S/SFlte9qm71pdV5YXStwa2gAAAAAAAAAAAAgAbAC4ATIBeAGGAbwB1AJIApgC9APCBJQE5AVCBZYGhgdmB9AIZAkgCeYKHAp4CqgK8guODBQMQAxsDJYNCg06DbQOUA8WDzwPmhAKEKwRMhGwEdIR9BJ+EpwS1hMCEy4TWBPAFAYUgBT+FUIVVhWCFZwVxhZIFqoXYhekF9YX+BgeGDYYShhgGHQYihioGWwZvBo+GpQa/BtUG7gcBBxUHOodRh2uHdId8B4OHiweOh6MHwwfIh8wHz4fTAAAAAEAAABiAGkAEAAAAAAAAgABAAIAFgAAAQAAuAAAAAB42o1Ru04CQRQ9s6AJMbEwxMJqEym0YFnUNbpWFGiCSohG6UzALIuRfQgr4C/4ZfoDln6EpZVnZodIWAoymZlzzz33NQNgA+/IQeQLAL65UyxQpJViA5v40TgHV8w0eZSEq/EapuJB43XyXxoXsCN+Nd5CyShq/IFt40TjT9hGExdo4QomxvAwxAhPiBDSPuCOyJjo0H7jPSBKlCqrnhAl6BP1FJMQeZjikWdMa6bboybhiuGiwjVRy4JP7ytvWdEnP2CEjA1Zw+OukI3Jlpm/gxcqZZ6AzC7OdcV6pt4+p5M5ZK8yX6Ty3dD2WU3OM+ScFmyuU5zhDpdoo0m0LK68ELlMYy5o7jOv+l+thVsy0ppn+1QmOt+Y/qryWXBwTG/ArM/MKTU9svKdujre4l3FIU9npf4b5D3VVY3egPxIvXa40mRtWt253077vNZzNqhL5z1SMzr8b5u9udTZirdlr3+3BnfZAAB42m3Rx1JVQRSF4fNfA+Ys5ixGxNO7d3PBhAmMmCPGcubEma/pKxm4P4zsqlNrdL5aq3Y36Jbf719ddP973/5+dAMGrGEt61jPGBvYyCY2s4WtbGM7O9jJLnazh72Ms4/9HOAghzjMEY5yjOOc4CSnOM0EZzjLOc5zgYtMcokpLtNTCCpJY5ohM8xyhatc4zo3mOMmt7jNHe4yzwL3uM8DHvKIxyzyhKc84zkveMkrXvOGt7zjPUt84COf+MwXvo79/PF9vu/7f7lQVrOYYVYzzWZOm0NzxpxdztALvdALvdALvdALvdCLFa/oFb2iV/SKXtErI6/ao9qj2qPao9qj2qP2K/8NzVGP1Emd1Emd1Emd1EmdXHVGe9I96Z50T7on3ZPuSfdk0St6RS90Qid0Qid0Qid0Qid0qr2qXtWrelWv6lW9qlf1ql7qpV7qpV7qpV7qpV7qpV7Ta3pNr+m1kde8V/NezXu1vv4BRRflZLgB/4WwAY0AS7AIUFixAQGOWbFGBitYIbAQWUuwFFJYIbCAWR2wBitcWFmwFCsAAAABUcgLTgAA) format('woff'), + url('genericons-regular-webfont.ttf') format('truetype'), + url('genericons-regular-webfont.svg#genericonsregular') format('svg'); + font-weight: normal; + font-style: normal; +} + + +/** + * All Genericons. + */ +[class*="genericon"] { + display: inline-block; + width: 16px; + height: 16px; + -webkit-font-smoothing: antialiased; + font-size: 16px; + line-height: 1; + font-family: 'Genericons'; + text-decoration: inherit; + font-weight: normal; + font-style: normal; + vertical-align: top; +} + +/* IE7 */ +[class*="genericon"] { + *overflow: auto; + *zoom: 1; + *display: inline; +} + +/** + * Individual icons. + */ + +/* Post formats */ +.genericon-standard:before { content: '\f100'; } +.genericon-aside:before { content: '\f101'; } +.genericon-image:before { content: '\f102'; } +.genericon-gallery:before { content: '\f103'; } +.genericon-video:before { content: '\f104'; } +.genericon-status:before { content: '\f105'; } +.genericon-quote:before { content: '\f106'; } +.genericon-link:before { content: '\f107'; } +.genericon-chat:before { content: '\f108'; } +.genericon-audio:before { content: '\f109'; } + +/* Social icons */ +.genericon-github:before { content: '\f200'; } +.genericon-dribbble:before { content: '\f201'; } +.genericon-twitter:before { content: '\f202'; } +.genericon-facebook:before { content: '\f203'; } +.genericon-facebook-alt:before { content: '\f204'; } +.genericon-wordpress:before { content: '\f205'; } +.genericon-googleplus:before { content: '\f206'; } +.genericon-linkedin:before { content: '\f207'; } +.genericon-linkedin-alt:before { content: '\f208'; } +.genericon-pinterest:before { content: '\f209'; } +.genericon-pinterest-alt:before { content: '\f210'; } +.genericon-flickr:before { content: '\f211'; } +.genericon-vimeo:before { content: '\f212'; } +.genericon-youtube:before { content: '\f213'; } +.genericon-tumblr:before { content: '\f214'; } +.genericon-instagram:before { content: '\f215'; } +.genericon-codepen:before { content: '\f216'; } + +/* Meta icons */ +.genericon-comment:before { content: '\f300'; } +.genericon-category:before { content: '\f301'; } +.genericon-tag:before { content: '\f302'; } +.genericon-time:before { content: '\f303'; } +.genericon-user:before { content: '\f304'; } +.genericon-day:before { content: '\f305'; } +.genericon-week:before { content: '\f306'; } +.genericon-month:before { content: '\f307'; } +.genericon-pinned:before { content: '\f308'; } + +/* Other icons */ +.genericon-search:before { content: '\f400'; } +.genericon-unzoom:before { content: '\f401'; } +.genericon-zoom:before { content: '\f402'; } +.genericon-show:before { content: '\f403'; } +.genericon-hide:before { content: '\f404'; } +.genericon-close:before { content: '\f405'; } +.genericon-close-alt:before { content: '\f406'; } +.genericon-trash:before { content: '\f407'; } +.genericon-star:before { content: '\f408'; } +.genericon-home:before { content: '\f409'; } +.genericon-mail:before { content: '\f410'; } +.genericon-edit:before { content: '\f411'; } +.genericon-reply:before { content: '\f412'; } +.genericon-feed:before { content: '\f413'; } +.genericon-warning:before { content: '\f414'; } +.genericon-share:before { content: '\f415'; } +.genericon-attachment:before { content: '\f416'; } +.genericon-location:before { content: '\f417'; } +.genericon-checkmark:before { content: '\f418'; } +.genericon-menu:before { content: '\f419'; } +.genericon-top:before { content: '\f420'; } +.genericon-minimize:before { content: '\f421'; } +.genericon-maximize:before { content: '\f422'; } +.genericon-404:before { content: '\f423'; } +.genericon-spam:before { content: '\f424'; } +.genericon-summary:before { content: '\f425'; } +.genericon-cloud:before { content: '\f426'; } +.genericon-key:before { content: '\f427'; } +.genericon-dot:before { content: '\f428'; } +.genericon-next:before { content: '\f429'; } +.genericon-previous:before { content: '\f430'; } +.genericon-expand:before { content: '\f431'; } +.genericon-collapse:before { content: '\f432'; } +.genericon-dropdown:before { content: '\f433'; } +.genericon-dropdown-left:before { content: '\f434'; } +.genericon-top:before { content: '\f435'; } +.genericon-draggable:before { content: '\f436'; } +.genericon-phone:before { content: '\f437'; } +.genericon-send-to-phone:before { content: '\f438'; } +.genericon-plugin:before { content: '\f439'; } +.genericon-cloud-download:before { content: '\f440'; } +.genericon-cloud-upload:before { content: '\f441'; } +.genericon-external:before { content: '\f442'; } +.genericon-document:before { content: '\f443'; } +.genericon-book:before { content: '\f444'; } +.genericon-cog:before { content: '\f445'; } +.genericon-unapprove:before { content: '\f446'; } +.genericon-cart:before { content: '\f447'; } +.genericon-pause:before { content: '\f448'; } +.genericon-stop:before { content: '\f449'; } +.genericon-skip-back:before { content: '\f450'; } +.genericon-skip-ahead:before { content: '\f451'; } +.genericon-play:before { content: '\f452'; } +.genericon-tablet:before { content: '\f453'; } +.genericon-send-to-tablet:before { content: '\f454'; } + +/* Generic shapes */ +.genericon-uparrow:before { content: '\f500'; } +.genericon-rightarrow:before { content: '\f501'; } +.genericon-downarrow:before { content: '\f502'; } +.genericon-leftarrow:before { content: '\f503'; } diff --git a/wp-content/themes/twentythirteen/footer.php b/wp-content/themes/twentythirteen/footer.php new file mode 100644 index 0000000..725251c --- /dev/null +++ b/wp-content/themes/twentythirteen/footer.php @@ -0,0 +1,26 @@ + + + +
            + + +
            + + +
            +
            + + + + + \ No newline at end of file diff --git a/wp-content/themes/twentythirteen/functions.php b/wp-content/themes/twentythirteen/functions.php new file mode 100644 index 0000000..2cfd20f --- /dev/null +++ b/wp-content/themes/twentythirteen/functions.php @@ -0,0 +1,531 @@ + for posts and comments. + add_theme_support( 'automatic-feed-links' ); + + /* + * Switches default core markup for search form, comment form, + * and comments to output valid HTML5. + */ + add_theme_support( 'html5', array( + 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' + ) ); + + /* + * This theme supports all available post formats by default. + * See http://codex.wordpress.org/Post_Formats + */ + add_theme_support( 'post-formats', array( + 'aside', 'audio', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video' + ) ); + + // This theme uses wp_nav_menu() in one location. + register_nav_menu( 'primary', __( 'Navigation Menu', 'twentythirteen' ) ); + + /* + * This theme uses a custom image size for featured images, displayed on + * "standard" posts and pages. + */ + add_theme_support( 'post-thumbnails' ); + set_post_thumbnail_size( 604, 270, true ); + + // This theme uses its own gallery styles. + add_filter( 'use_default_gallery_style', '__return_false' ); +} +add_action( 'after_setup_theme', 'twentythirteen_setup' ); + +/** + * Return the Google font stylesheet URL, if available. + * + * The use of Source Sans Pro and Bitter by default is localized. For languages + * that use characters not supported by the font, the font can be disabled. + * + * @since Twenty Thirteen 1.0 + * + * @return string Font stylesheet or empty string if disabled. + */ +function twentythirteen_fonts_url() { + $fonts_url = ''; + + /* Translators: If there are characters in your language that are not + * supported by Source Sans Pro, translate this to 'off'. Do not translate + * into your own language. + */ + $source_sans_pro = _x( 'on', 'Source Sans Pro font: on or off', 'twentythirteen' ); + + /* Translators: If there are characters in your language that are not + * supported by Bitter, translate this to 'off'. Do not translate into your + * own language. + */ + $bitter = _x( 'on', 'Bitter font: on or off', 'twentythirteen' ); + + if ( 'off' !== $source_sans_pro || 'off' !== $bitter ) { + $font_families = array(); + + if ( 'off' !== $source_sans_pro ) + $font_families[] = 'Source Sans Pro:300,400,700,300italic,400italic,700italic'; + + if ( 'off' !== $bitter ) + $font_families[] = 'Bitter:400,700'; + + $query_args = array( + 'family' => urlencode( implode( '|', $font_families ) ), + 'subset' => urlencode( 'latin,latin-ext' ), + ); + $fonts_url = add_query_arg( $query_args, "//fonts.googleapis.com/css" ); + } + + return $fonts_url; +} + +/** + * Enqueue scripts and styles for the front end. + * + * @since Twenty Thirteen 1.0 + */ +function twentythirteen_scripts_styles() { + /* + * Adds JavaScript to pages with the comment form to support + * sites with threaded comments (when in use). + */ + if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) + wp_enqueue_script( 'comment-reply' ); + + // Adds Masonry to handle vertical alignment of footer widgets. + if ( is_active_sidebar( 'sidebar-1' ) ) + wp_enqueue_script( 'jquery-masonry' ); + + // Loads JavaScript file with functionality specific to Twenty Thirteen. + wp_enqueue_script( 'twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '2014-03-18', true ); + + // Add Source Sans Pro and Bitter fonts, used in the main stylesheet. + wp_enqueue_style( 'twentythirteen-fonts', twentythirteen_fonts_url(), array(), null ); + + // Add Genericons font, used in the main stylesheet. + wp_enqueue_style( 'genericons', get_template_directory_uri() . '/fonts/genericons.css', array(), '2.09' ); + + // Loads our main stylesheet. + wp_enqueue_style( 'twentythirteen-style', get_stylesheet_uri(), array(), '2013-07-18' ); + + // Loads the Internet Explorer specific stylesheet. + wp_enqueue_style( 'twentythirteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentythirteen-style' ), '2013-07-18' ); + wp_style_add_data( 'twentythirteen-ie', 'conditional', 'lt IE 9' ); +} +add_action( 'wp_enqueue_scripts', 'twentythirteen_scripts_styles' ); + +/** + * Filter the page title. + * + * Creates a nicely formatted and more specific title element text for output + * in head of document, based on current view. + * + * @since Twenty Thirteen 1.0 + * + * @param string $title Default title text for current view. + * @param string $sep Optional separator. + * @return string The filtered title. + */ +function twentythirteen_wp_title( $title, $sep ) { + global $paged, $page; + + if ( is_feed() ) + return $title; + + // Add the site name. + $title .= get_bloginfo( 'name', 'display' ); + + // Add the site description for the home/front page. + $site_description = get_bloginfo( 'description', 'display' ); + if ( $site_description && ( is_home() || is_front_page() ) ) + $title = "$title $sep $site_description"; + + // Add a page number if necessary. + if ( $paged >= 2 || $page >= 2 ) + $title = "$title $sep " . sprintf( __( 'Page %s', 'twentythirteen' ), max( $paged, $page ) ); + + return $title; +} +add_filter( 'wp_title', 'twentythirteen_wp_title', 10, 2 ); + +/** + * Register two widget areas. + * + * @since Twenty Thirteen 1.0 + */ +function twentythirteen_widgets_init() { + register_sidebar( array( + 'name' => __( 'Main Widget Area', 'twentythirteen' ), + 'id' => 'sidebar-1', + 'description' => __( 'Appears in the footer section of the site.', 'twentythirteen' ), + 'before_widget' => '', + 'before_title' => '

            ', + 'after_title' => '

            ', + ) ); + + register_sidebar( array( + 'name' => __( 'Secondary Widget Area', 'twentythirteen' ), + 'id' => 'sidebar-2', + 'description' => __( 'Appears on posts and pages in the sidebar.', 'twentythirteen' ), + 'before_widget' => '', + 'before_title' => '

            ', + 'after_title' => '

            ', + ) ); +} +add_action( 'widgets_init', 'twentythirteen_widgets_init' ); + +if ( ! function_exists( 'twentythirteen_paging_nav' ) ) : +/** + * Display navigation to next/previous set of posts when applicable. + * + * @since Twenty Thirteen 1.0 + */ +function twentythirteen_paging_nav() { + global $wp_query; + + // Don't print empty markup if there's only one page. + if ( $wp_query->max_num_pages < 2 ) + return; + ?> + + post_parent ) : get_adjacent_post( false, '', true ); + $next = get_adjacent_post( false, '', false ); + + if ( ! $next && ! $previous ) + return; + ?> + + ' . __( 'Sticky', 'twentythirteen' ) . ''; + + if ( ! has_post_format( 'link' ) && 'post' == get_post_type() ) + twentythirteen_entry_date(); + + // Translators: used between list items, there is a space after the comma. + $categories_list = get_the_category_list( __( ', ', 'twentythirteen' ) ); + if ( $categories_list ) { + echo '' . $categories_list . ''; + } + + // Translators: used between list items, there is a space after the comma. + $tag_list = get_the_tag_list( '', __( ', ', 'twentythirteen' ) ); + if ( $tag_list ) { + echo '' . $tag_list . ''; + } + + // Post author + if ( 'post' == get_post_type() ) { + printf( '', + esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), + esc_attr( sprintf( __( 'View all posts by %s', 'twentythirteen' ), get_the_author() ) ), + get_the_author() + ); + } +} +endif; + +if ( ! function_exists( 'twentythirteen_entry_date' ) ) : +/** + * Print HTML with date information for current post. + * + * Create your own twentythirteen_entry_date() to override in a child theme. + * + * @since Twenty Thirteen 1.0 + * + * @param boolean $echo (optional) Whether to echo the date. Default true. + * @return string The HTML-formatted post date. + */ +function twentythirteen_entry_date( $echo = true ) { + if ( has_post_format( array( 'chat', 'status' ) ) ) + $format_prefix = _x( '%1$s on %2$s', '1: post format name. 2: date', 'twentythirteen' ); + else + $format_prefix = '%2$s'; + + $date = sprintf( '', + esc_url( get_permalink() ), + esc_attr( sprintf( __( 'Permalink to %s', 'twentythirteen' ), the_title_attribute( 'echo=0' ) ) ), + esc_attr( get_the_date( 'c' ) ), + esc_html( sprintf( $format_prefix, get_post_format_string( get_post_format() ), get_the_date() ) ) + ); + + if ( $echo ) + echo $date; + + return $date; +} +endif; + +if ( ! function_exists( 'twentythirteen_the_attached_image' ) ) : +/** + * Print the attached image with a link to the next attached image. + * + * @since Twenty Thirteen 1.0 + */ +function twentythirteen_the_attached_image() { + /** + * Filter the image attachment size to use. + * + * @since Twenty thirteen 1.0 + * + * @param array $size { + * @type int The attachment height in pixels. + * @type int The attachment width in pixels. + * } + */ + $attachment_size = apply_filters( 'twentythirteen_attachment_size', array( 724, 724 ) ); + $next_attachment_url = wp_get_attachment_url(); + $post = get_post(); + + /* + * Grab the IDs of all the image attachments in a gallery so we can get the URL + * of the next adjacent image in a gallery, or the first image (if we're + * looking at the last image in a gallery), or, in a gallery of one, just the + * link to that image file. + */ + $attachment_ids = get_posts( array( + 'post_parent' => $post->post_parent, + 'fields' => 'ids', + 'numberposts' => -1, + 'post_status' => 'inherit', + 'post_type' => 'attachment', + 'post_mime_type' => 'image', + 'order' => 'ASC', + 'orderby' => 'menu_order ID' + ) ); + + // If there is more than 1 attachment in a gallery... + if ( count( $attachment_ids ) > 1 ) { + foreach ( $attachment_ids as $attachment_id ) { + if ( $attachment_id == $post->ID ) { + $next_id = current( $attachment_ids ); + break; + } + } + + // get the URL of the next image attachment... + if ( $next_id ) + $next_attachment_url = get_attachment_link( $next_id ); + + // or get the URL of the first image attachment. + else + $next_attachment_url = get_attachment_link( array_shift( $attachment_ids ) ); + } + + printf( '%3$s', + esc_url( $next_attachment_url ), + the_title_attribute( array( 'echo' => false ) ), + wp_get_attachment_image( $post->ID, $attachment_size ) + ); +} +endif; + +/** + * Return the post URL. + * + * @uses get_url_in_content() to get the URL in the post meta (if it exists) or + * the first link found in the post content. + * + * Falls back to the post permalink if no URL is found in the post. + * + * @since Twenty Thirteen 1.0 + * + * @return string The Link format URL. + */ +function twentythirteen_get_link_url() { + $content = get_the_content(); + $has_url = get_url_in_content( $content ); + + return ( $has_url ) ? $has_url : apply_filters( 'the_permalink', get_permalink() ); +} + +/** + * Extend the default WordPress body classes. + * + * Adds body classes to denote: + * 1. Single or multiple authors. + * 2. Active widgets in the sidebar to change the layout and spacing. + * 3. When avatars are disabled in discussion settings. + * + * @since Twenty Thirteen 1.0 + * + * @param array $classes A list of existing body class values. + * @return array The filtered body class list. + */ +function twentythirteen_body_class( $classes ) { + if ( ! is_multi_author() ) + $classes[] = 'single-author'; + + if ( is_active_sidebar( 'sidebar-2' ) && ! is_attachment() && ! is_404() ) + $classes[] = 'sidebar'; + + if ( ! get_option( 'show_avatars' ) ) + $classes[] = 'no-avatars'; + + return $classes; +} +add_filter( 'body_class', 'twentythirteen_body_class' ); + +/** + * Adjust content_width value for video post formats and attachment templates. + * + * @since Twenty Thirteen 1.0 + */ +function twentythirteen_content_width() { + global $content_width; + + if ( is_attachment() ) + $content_width = 724; + elseif ( has_post_format( 'audio' ) ) + $content_width = 484; +} +add_action( 'template_redirect', 'twentythirteen_content_width' ); + +/** + * Add postMessage support for site title and description for the Customizer. + * + * @since Twenty Thirteen 1.0 + * + * @param WP_Customize_Manager $wp_customize Customizer object. + */ +function twentythirteen_customize_register( $wp_customize ) { + $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; + $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; + $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; +} +add_action( 'customize_register', 'twentythirteen_customize_register' ); + +/** + * Enqueue Javascript postMessage handlers for the Customizer. + * + * Binds JavaScript handlers to make the Customizer preview + * reload changes asynchronously. + * + * @since Twenty Thirteen 1.0 + */ +function twentythirteen_customize_preview_js() { + wp_enqueue_script( 'twentythirteen-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20130226', true ); +} +add_action( 'customize_preview_init', 'twentythirteen_customize_preview_js' ); diff --git a/wp-content/themes/twentythirteen/header.php b/wp-content/themes/twentythirteen/header.php new file mode 100644 index 0000000..e19703c --- /dev/null +++ b/wp-content/themes/twentythirteen/header.php @@ -0,0 +1,51 @@ + section and everything up till
            + * + * @package WordPress + * @subpackage Twenty_Thirteen + * @since Twenty Thirteen 1.0 + */ +?> + + + +> + + + + + <?php wp_title( '|', true, 'right' ); ?> + + + + + + +> +
            + + +
            diff --git a/wp-content/themes/twentythirteen/image.php b/wp-content/themes/twentythirteen/image.php new file mode 100644 index 0000000..b2d86bf --- /dev/null +++ b/wp-content/themes/twentythirteen/image.php @@ -0,0 +1,82 @@ + + +
            +
            +
            > +
            +

            + + +
            + +
            + + +
            +
            + + + +
            + +
            + +
            +
            + + post_content ) ) : ?> +
            + + '' ) ); ?> +
            + + +
            +
            + + + +
            +
            + + \ No newline at end of file diff --git a/wp-content/themes/twentythirteen/images/dotted-line-2x.png b/wp-content/themes/twentythirteen/images/dotted-line-2x.png new file mode 100644 index 0000000..07f6c93 Binary files /dev/null and b/wp-content/themes/twentythirteen/images/dotted-line-2x.png differ diff --git a/wp-content/themes/twentythirteen/images/dotted-line-light-2x.png b/wp-content/themes/twentythirteen/images/dotted-line-light-2x.png new file mode 100644 index 0000000..059d4ec Binary files /dev/null and b/wp-content/themes/twentythirteen/images/dotted-line-light-2x.png differ diff --git a/wp-content/themes/twentythirteen/images/dotted-line-light.png b/wp-content/themes/twentythirteen/images/dotted-line-light.png new file mode 100644 index 0000000..b7f82cd Binary files /dev/null and b/wp-content/themes/twentythirteen/images/dotted-line-light.png differ diff --git a/wp-content/themes/twentythirteen/images/dotted-line.png b/wp-content/themes/twentythirteen/images/dotted-line.png new file mode 100644 index 0000000..115b583 Binary files /dev/null and b/wp-content/themes/twentythirteen/images/dotted-line.png differ diff --git a/wp-content/themes/twentythirteen/images/headers/circle-thumbnail.png b/wp-content/themes/twentythirteen/images/headers/circle-thumbnail.png new file mode 100644 index 0000000..2f9344c Binary files /dev/null and b/wp-content/themes/twentythirteen/images/headers/circle-thumbnail.png differ diff --git a/wp-content/themes/twentythirteen/images/headers/circle.png b/wp-content/themes/twentythirteen/images/headers/circle.png new file mode 100644 index 0000000..0bd9401 Binary files /dev/null and b/wp-content/themes/twentythirteen/images/headers/circle.png differ diff --git a/wp-content/themes/twentythirteen/images/headers/diamond-thumbnail.png b/wp-content/themes/twentythirteen/images/headers/diamond-thumbnail.png new file mode 100644 index 0000000..82777a0 Binary files /dev/null and b/wp-content/themes/twentythirteen/images/headers/diamond-thumbnail.png differ diff --git a/wp-content/themes/twentythirteen/images/headers/diamond.png b/wp-content/themes/twentythirteen/images/headers/diamond.png new file mode 100644 index 0000000..a14de61 Binary files /dev/null and b/wp-content/themes/twentythirteen/images/headers/diamond.png differ diff --git a/wp-content/themes/twentythirteen/images/headers/star-thumbnail.png b/wp-content/themes/twentythirteen/images/headers/star-thumbnail.png new file mode 100644 index 0000000..693bb76 Binary files /dev/null and b/wp-content/themes/twentythirteen/images/headers/star-thumbnail.png differ diff --git a/wp-content/themes/twentythirteen/images/headers/star.png b/wp-content/themes/twentythirteen/images/headers/star.png new file mode 100644 index 0000000..24ca626 Binary files /dev/null and b/wp-content/themes/twentythirteen/images/headers/star.png differ diff --git a/wp-content/themes/twentythirteen/images/search-icon-2x.png b/wp-content/themes/twentythirteen/images/search-icon-2x.png new file mode 100644 index 0000000..02b63b8 Binary files /dev/null and b/wp-content/themes/twentythirteen/images/search-icon-2x.png differ diff --git a/wp-content/themes/twentythirteen/images/search-icon.png b/wp-content/themes/twentythirteen/images/search-icon.png new file mode 100644 index 0000000..11d8dc8 Binary files /dev/null and b/wp-content/themes/twentythirteen/images/search-icon.png differ diff --git a/wp-content/themes/twentythirteen/inc/back-compat.php b/wp-content/themes/twentythirteen/inc/back-compat.php new file mode 100644 index 0000000..329bcaa --- /dev/null +++ b/wp-content/themes/twentythirteen/inc/back-compat.php @@ -0,0 +1,63 @@ +

            %s

            ', $message ); +} + +/** + * Prevent the Theme Customizer from being loaded on WordPress versions prior to 3.6. + * + * @since Twenty Thirteen 1.0 + */ +function twentythirteen_customize() { + wp_die( sprintf( __( 'Twenty Thirteen requires at least WordPress version 3.6. You are running version %s. Please upgrade and try again.', 'twentythirteen' ), $GLOBALS['wp_version'] ), '', array( + 'back_link' => true, + ) ); +} +add_action( 'load-customize.php', 'twentythirteen_customize' ); + +/** + * Prevent the Theme Preview from being loaded on WordPress versions prior to 3.4. + * + * @since Twenty Thirteen 1.0 + */ +function twentythirteen_preview() { + if ( isset( $_GET['preview'] ) ) { + wp_die( sprintf( __( 'Twenty Thirteen requires at least WordPress version 3.6. You are running version %s. Please upgrade and try again.', 'twentythirteen' ), $GLOBALS['wp_version'] ) ); + } +} +add_action( 'template_redirect', 'twentythirteen_preview' ); diff --git a/wp-content/themes/twentythirteen/inc/custom-header.php b/wp-content/themes/twentythirteen/inc/custom-header.php new file mode 100644 index 0000000..2fabe5b --- /dev/null +++ b/wp-content/themes/twentythirteen/inc/custom-header.php @@ -0,0 +1,217 @@ + '220e10', + 'default-image' => '%s/images/headers/circle.png', + + // Set height and width, with a maximum value for the width. + 'height' => 230, + 'width' => 1600, + + // Callbacks for styling the header and the admin preview. + 'wp-head-callback' => 'twentythirteen_header_style', + 'admin-head-callback' => 'twentythirteen_admin_header_style', + 'admin-preview-callback' => 'twentythirteen_admin_header_image', + ); + + add_theme_support( 'custom-header', $args ); + + /* + * Default custom headers packaged with the theme. + * %s is a placeholder for the theme template directory URI. + */ + register_default_headers( array( + 'circle' => array( + 'url' => '%s/images/headers/circle.png', + 'thumbnail_url' => '%s/images/headers/circle-thumbnail.png', + 'description' => _x( 'Circle', 'header image description', 'twentythirteen' ) + ), + 'diamond' => array( + 'url' => '%s/images/headers/diamond.png', + 'thumbnail_url' => '%s/images/headers/diamond-thumbnail.png', + 'description' => _x( 'Diamond', 'header image description', 'twentythirteen' ) + ), + 'star' => array( + 'url' => '%s/images/headers/star.png', + 'thumbnail_url' => '%s/images/headers/star-thumbnail.png', + 'description' => _x( 'Star', 'header image description', 'twentythirteen' ) + ), + ) ); +} +add_action( 'after_setup_theme', 'twentythirteen_custom_header_setup', 11 ); + +/** + * Load our special font CSS files. + * + * @since Twenty Thirteen 1.0 + */ +function twentythirteen_custom_header_fonts() { + // Add Source Sans Pro and Bitter fonts. + wp_enqueue_style( 'twentythirteen-fonts', twentythirteen_fonts_url(), array(), null ); + + // Add Genericons font. + wp_enqueue_style( 'genericons', get_template_directory_uri() . '/fonts/genericons.css', array(), '2.09' ); +} +add_action( 'admin_print_styles-appearance_page_custom-header', 'twentythirteen_custom_header_fonts' ); + +/** + * Style the header text displayed on the blog. + * + * get_header_textcolor() options: Hide text (returns 'blank'), or any hex value. + * + * @since Twenty Thirteen 1.0 + */ +function twentythirteen_header_style() { + $header_image = get_header_image(); + $text_color = get_header_textcolor(); + + // If no custom options for text are set, let's bail. + if ( empty( $header_image ) && $text_color == get_theme_support( 'custom-header', 'default-text-color' ) ) + return; + + // If we get this far, we have custom styles. + ?> + + Header admin panel. + * + * @since Twenty Thirteen 1.0 + */ +function twentythirteen_admin_header_style() { + $header_image = get_header_image(); +?> + + Header admin panel. + * + * This callback overrides the default markup displayed there. + * + * @since Twenty Thirteen 1.0 + */ +function twentythirteen_admin_header_image() { + ?> + + + +
            +
            + + + + + + + + + + + + + +
            +
            + + + \ No newline at end of file diff --git a/wp-content/themes/twentythirteen/js/functions.js b/wp-content/themes/twentythirteen/js/functions.js new file mode 100644 index 0000000..78c8c84 --- /dev/null +++ b/wp-content/themes/twentythirteen/js/functions.js @@ -0,0 +1,90 @@ +/** + * Functionality specific to Twenty Thirteen. + * + * Provides helper functions to enhance the theme experience. + */ + +( function( $ ) { + var body = $( 'body' ), + _window = $( window ); + + /** + * Adds a top margin to the footer if the sidebar widget area is higher + * than the rest of the page, to help the footer always visually clear + * the sidebar. + */ + $( function() { + if ( body.is( '.sidebar' ) ) { + var sidebar = $( '#secondary .widget-area' ), + secondary = ( 0 === sidebar.length ) ? -40 : sidebar.height(), + margin = $( '#tertiary .widget-area' ).height() - $( '#content' ).height() - secondary; + + if ( margin > 0 && _window.innerWidth() > 999 ) { + $( '#colophon' ).css( 'margin-top', margin + 'px' ); + } + } + } ); + + /** + * Enables menu toggle for small screens. + */ + ( function() { + var nav = $( '#site-navigation' ), button, menu; + if ( ! nav ) { + return; + } + + button = nav.find( '.menu-toggle' ); + if ( ! button ) { + return; + } + + // Hide button if menu is missing or empty. + menu = nav.find( '.nav-menu' ); + if ( ! menu || ! menu.children().length ) { + button.hide(); + return; + } + + button.on( 'click.twentythirteen', function() { + nav.toggleClass( 'toggled-on' ); + } ); + + // Better focus for hidden submenu items for accessibility. + menu.find( 'a' ).on( 'focus.twentythirteen blur.twentythirteen', function() { + $( this ).parents( '.menu-item, .page_item' ).toggleClass( 'focus' ); + } ); + } )(); + + /** + * Makes "skip to content" link work correctly in IE9 and Chrome for better + * accessibility. + * + * @link http://www.nczonline.net/blog/2013/01/15/fixing-skip-to-content-links/ + */ + _window.on( 'hashchange.twentythirteen', function() { + var element = document.getElementById( location.hash.substring( 1 ) ); + + if ( element ) { + if ( ! /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) { + element.tabIndex = -1; + } + + element.focus(); + } + } ); + + /** + * Arranges footer widgets vertically. + */ + if ( $.isFunction( $.fn.masonry ) ) { + var columnWidth = body.is( '.sidebar' ) ? 228 : 245; + + $( '#secondary .widget-area' ).masonry( { + itemSelector: '.widget', + columnWidth: columnWidth, + gutterWidth: 20, + isRTL: body.is( '.rtl' ) + } ); + } +} )( jQuery ); \ No newline at end of file diff --git a/wp-content/themes/twentythirteen/js/html5.js b/wp-content/themes/twentythirteen/js/html5.js new file mode 100644 index 0000000..6168aac --- /dev/null +++ b/wp-content/themes/twentythirteen/js/html5.js @@ -0,0 +1,8 @@ +/* + HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag(); +a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x"; +c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| +"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f); +if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d\n" +"Language-Team: LANGUAGE \n" + +#: 404.php:16 +msgid "Not Found" +msgstr "" + +#: 404.php:21 +msgid "This is somewhat embarrassing, isn’t it?" +msgstr "" + +#: 404.php:22 +msgid "It looks like nothing was found at this location. Maybe try a search?" +msgstr "" + +#: archive.php:29 +msgid "Daily Archives: %s" +msgstr "" + +#: archive.php:31 +msgid "Monthly Archives: %s" +msgstr "" + +#: archive.php:31 +msgctxt "monthly archives date format" +msgid "F Y" +msgstr "" + +#: archive.php:33 +msgid "Yearly Archives: %s" +msgstr "" + +#: archive.php:33 +msgctxt "yearly archives date format" +msgid "Y" +msgstr "" + +#: archive.php:35 +msgid "Archives" +msgstr "" + +#: author-bio.php:26 +msgid "About %s" +msgstr "" + +#: author-bio.php:30 +msgid "View all posts by %s " +msgstr "" + +#: author.php:31 +msgid "All posts by %s" +msgstr "" + +#: category.php:19 +msgid "Category Archives: %s" +msgstr "" + +#: comments.php:25 +msgctxt "comments title" +msgid "One thought on “%2$s”" +msgid_plural "%1$s thoughts on “%2$s”" +msgstr[0] "" +msgstr[1] "" + +#: comments.php:45 +msgid "Comment navigation" +msgstr "" + +#: comments.php:46 +msgid "← Older Comments" +msgstr "" + +#: comments.php:47 +msgid "Newer Comments →" +msgstr "" + +#: comments.php:52 +msgid "Comments are closed." +msgstr "" + +#: content-aside.php:13 content-audio.php:24 content-gallery.php:24 +#: content-image.php:23 content-link.php:24 content-quote.php:13 +#: content-status.php:13 content-video.php:23 content.php:41 +msgid "Continue reading " +msgstr "" + +#: content-aside.php:14 content-audio.php:25 content-chat.php:24 +#: content-gallery.php:25 content-image.php:24 content-link.php:25 +#: content-quote.php:14 content-status.php:14 content-video.php:24 +#: content.php:42 image.php:70 page.php:35 +msgid "Pages:" +msgstr "" + +#: content-aside.php:20 content-aside.php:28 content-audio.php:31 +#: content-chat.php:29 content-gallery.php:39 content-image.php:35 +#: content-link.php:19 content-quote.php:25 content-status.php:19 +#: content-video.php:35 content.php:31 image.php:44 page.php:39 +msgid "Edit" +msgstr "" + +#: content-gallery.php:36 content-image.php:32 content-quote.php:22 +#: content-video.php:32 content.php:49 +msgid "Leave a comment" +msgstr "" + +#: content-gallery.php:36 content-image.php:32 content-quote.php:22 +#: content-video.php:32 content.php:49 +msgid "One comment so far" +msgstr "" + +#: content-gallery.php:36 content-image.php:32 content-quote.php:22 +#: content-video.php:32 content.php:49 +msgid "View all % comments" +msgstr "" + +#: content-none.php:12 +msgid "Nothing Found" +msgstr "" + +#: content-none.php:18 +msgid "" +"Ready to publish your first post? Get started here." +msgstr "" + +#: content-none.php:22 +msgid "" +"Sorry, but nothing matched your search terms. Please try again with " +"different keywords." +msgstr "" + +#: content-none.php:27 +msgid "" +"It seems we can’t find what you’re looking for. Perhaps " +"searching can help." +msgstr "" + +#. #-#-#-#-# twentythirteen.pot (Twenty Thirteen 1.1) #-#-#-#-# +#. Author URI of the plugin/theme +#: footer.php:19 +msgid "http://wordpress.org/" +msgstr "" + +#: footer.php:19 +msgid "Semantic Personal Publishing Platform" +msgstr "" + +#: footer.php:19 +msgid "Proudly powered by %s" +msgstr "" + +#: functions.php:97 +msgid "Navigation Menu" +msgstr "" + +#. Translators: If there are characters in your language that are not +#. * supported by Source Sans Pro, translate this to 'off'. Do not translate +#. * into your own language. +#: functions.php:128 +msgctxt "Source Sans Pro font: on or off" +msgid "on" +msgstr "" + +#. Translators: If there are characters in your language that are not +#. * supported by Bitter, translate this to 'off'. Do not translate into your +#. * own language. +#: functions.php:134 +msgctxt "Bitter font: on or off" +msgid "on" +msgstr "" + +#: functions.php:218 +msgid "Page %s" +msgstr "" + +#: functions.php:231 +msgid "Main Widget Area" +msgstr "" + +#: functions.php:233 +msgid "Appears in the footer section of the site." +msgstr "" + +#: functions.php:241 +msgid "Secondary Widget Area" +msgstr "" + +#: functions.php:243 +msgid "Appears on posts and pages in the sidebar." +msgstr "" + +#: functions.php:266 +msgid "Posts navigation" +msgstr "" + +#: functions.php:270 +msgid " Older posts" +msgstr "" + +#: functions.php:274 +msgid "Newer posts " +msgstr "" + +#: functions.php:300 +msgid "Post navigation" +msgstr "" + +#: functions.php:303 +msgctxt "Previous post link" +msgid " %title" +msgstr "" + +#: functions.php:304 +msgctxt "Next post link" +msgid "%title " +msgstr "" + +#: functions.php:322 +msgid "Sticky" +msgstr "" + +#. Translators: used between list items, there is a space after the comma. +#: functions.php:328 functions.php:334 +msgid ", " +msgstr "" + +#: functions.php:343 +msgid "View all posts by %s" +msgstr "" + +#: functions.php:363 +msgctxt "1: post format name. 2: date" +msgid "%1$s on %2$s" +msgstr "" + +#: functions.php:369 +msgid "Permalink to %s" +msgstr "" + +#: header.php:43 +msgid "Menu" +msgstr "" + +#: header.php:44 +msgid "Skip to content" +msgstr "" + +#: image.php:22 +msgid "" +"Published on in %5$s" +msgstr "" + +#: image.php:38 +msgid "Link to full-size image" +msgstr "" + +#: image.php:39 +msgid "Full resolution" +msgstr "" + +#: image.php:51 +msgid " Previous" +msgstr "" + +#: image.php:52 +msgid "Next " +msgstr "" + +#: inc/back-compat.php:37 inc/back-compat.php:47 inc/back-compat.php:60 +msgid "" +"Twenty Thirteen requires at least WordPress version 3.6. You are running " +"version %s. Please upgrade and try again." +msgstr "" + +#: inc/custom-header.php:49 +msgctxt "header image description" +msgid "Circle" +msgstr "" + +#: inc/custom-header.php:54 +msgctxt "header image description" +msgid "Diamond" +msgstr "" + +#: inc/custom-header.php:59 +msgctxt "header image description" +msgid "Star" +msgstr "" + +#: search.php:18 +msgid "Search Results for: %s" +msgstr "" + +#: tag.php:21 +msgid "Tag Archives: %s" +msgstr "" + +#: taxonomy-post_format.php:23 +msgid "%s Archives" +msgstr "" + +#. Theme Name of the plugin/theme +msgid "Twenty Thirteen" +msgstr "" + +#. Theme URI of the plugin/theme +msgid "http://wordpress.org/themes/twentythirteen" +msgstr "" + +#. Description of the plugin/theme +msgid "" +"The 2013 theme for WordPress takes us back to the blog, featuring a full " +"range of post formats, each displayed beautifully in their own unique way. " +"Design details abound, starting with a vibrant color scheme and matching " +"header images, beautiful typography and icons, and a flexible layout that " +"looks great on any device, big or small." +msgstr "" + +#. Author of the plugin/theme +msgid "the WordPress team" +msgstr "" diff --git a/wp-content/themes/twentythirteen/page.php b/wp-content/themes/twentythirteen/page.php new file mode 100644 index 0000000..5545367 --- /dev/null +++ b/wp-content/themes/twentythirteen/page.php @@ -0,0 +1,50 @@ + + +
            +
            + + + + +
            > +
            + +
            + +
            + + +

            +
            + +
            + + '', 'link_before' => '', 'link_after' => '' ) ); ?> +
            + +
            + ', '' ); ?> +
            +
            + + + + +
            +
            + + + \ No newline at end of file diff --git a/wp-content/themes/twentythirteen/rtl.css b/wp-content/themes/twentythirteen/rtl.css new file mode 100644 index 0000000..5428630 --- /dev/null +++ b/wp-content/themes/twentythirteen/rtl.css @@ -0,0 +1,766 @@ +/* +Theme Name: Twenty Thirteen +Description: Adds support for languages written in a Right To Left (RTL) direction. +It's easy, just a matter of overwriting all the horizontal positioning attributes +of your CSS stylesheet in a separate stylesheet file named rtl.css. + +See http://codex.wordpress.org/Right_to_Left_Language_Support +*/ + +/** + * Table of Contents: + * + * 1.0 - Reset + * 4.0 - Header + * 4.1 - Site Header + * 4.2 - Navigation + * 5.0 - Content + * 5.2 - Entry Meta + * 5.4 - Galleries + * 5.5 - Post Formats + * 5.6 - Attachments + * 5.7 - Post/Paging Navigation + * 5.8 - Author Bio + * 5.9 - Archives + * 5.10 - Search Results/No posts + * 5.12 - Comments + * 6.0 - Sidebar + * 6.1 - Widgets + * 7.0 - Footer + * 8.0 - Media Queries + * 9.0 - Print + * ---------------------------------------------------------------------------- + */ + + +/** + * 1.0 Reset + * ---------------------------------------------------------------------------- + */ + +body { + direction: rtl; + unicode-bidi: embed; +} + +a { + display: inline-block; +} + +blockquote blockquote { + margin-left: 0; + margin-right: 24px; +} + +menu, +ol, +ul { + padding: 0 40px 0 0; +} + +caption, +th, +td { + text-align: right; +} + +td { + padding-left: 10px; + padding-right: 0; +} + +.assistive-text:focus { + left: auto; + right: 5px; +} + + +/** + * 4.0 Header + * ---------------------------------------------------------------------------- + */ + +/** + * 4.1 Site Header + * ---------------------------------------------------------------------------- + */ + +.site-header > a:first-child { + display: inherit; +} + +.site-description { + font-style: normal; +} + + +/** + * 4.2 Navigation + * ---------------------------------------------------------------------------- + */ + +/* Navbar */ +ul.nav-menu, +div.nav-menu > ul { + margin: 0 -20px 0 0; + padding: 0 0 0 40px; +} + +.nav-menu .sub-menu, +.nav-menu .children { + float: right; + left: auto; + right: -2px; +} + +.nav-menu .sub-menu ul, +.nav-menu .children ul { + border-left: 2px solid #f7f5e7; + border-right: 0; + left: auto; + right: 100%; +} + +.main-navigation .search-form { + left: 0; + right: auto; +} + +.site-header .search-field { + background-position: 98% center; + padding: 0 34px 0 0; +} + +.nav-menu .current_page_item > a, +.nav-menu .current_page_ancestor > a, +.nav-menu .current-menu-item > a, +.nav-menu .current-menu-ancestor > a { + font-style: normal; +} + +.menu-toggle { + padding-left: 0; + padding-right: 20px; +} + + +/** + * 5.0 Content + * ---------------------------------------------------------------------------- + */ + +.sidebar .entry-header, +.sidebar .entry-content, +.sidebar .entry-summary, +.sidebar .entry-meta { + padding-left: 376px; + padding-right: 60px; +} + + +/** + * 5.2 Entry Meta + * ---------------------------------------------------------------------------- + */ + +.entry-meta > span { + margin-left: 20px; + margin-right: auto; +} + +.entry-meta > span:last-child { + margin-left: 0; + margin-right: auto; +} + +.featured-post:before { + margin-left: 2px; + margin-right: auto; +} + +.entry-meta .date a:before { + margin-left: 2px; +} + +.comments-link a:before { + margin-left: 2px; + margin-right: auto; +} + +.tags-links a:first-child:before { + margin-left: 2px; +} + +.edit-link a:before { + margin-left: 2px; +} + +.page-links .page-links-title { + margin-left: 20px; + margin-right: auto; +} + +/** + * 5.4 Galleries + * ---------------------------------------------------------------------------- + */ + +.gallery { + margin-left: auto; + margin-right: -4px; +} + +.gallery-item { + float: right; + margin: 0 0 4px 4px; +} + +.gallery-item a { + display: inline; +} + + +/** + * 5.5 Post Formats + * ---------------------------------------------------------------------------- + */ + +.entry-content a { + display: inline; +} + +.format-aside cite:before { + content: normal; + margin-right: auto; +} + +.format-aside cite:after { + content: "\2014"; + margin-left: 5px; +} + +.format-audio .entry-content:before { + float: right; + -webkit-transform: scaleX(-1); + -moz-transform: scaleX(-1); + -ms-transform: scaleX(-1); + -o-transform: scaleX(-1); + transform: scaleX(-1); +} + +.format-audio .audio-content { + background-position: right top; + float: left; + padding-left: 0; + padding-right: 35px; +} + +.format-chat .entry-meta .date a:before { + margin-left: 4px; + margin-right: auto; +} + +.format-image .wp-caption-text { + text-align: right; +} + +.format-link .entry-title { + margin-left: 20px; + margin-right: auto; +} + +.format-status .entry-content, +.format-status .entry-meta { + padding-left: 0; + padding-right: 35px; +} + +.sidebar .format-status .entry-content, +.sidebar .format-status .entry-meta { + padding-left: 376px; + padding-right: 95px; +} + +.format-status .entry-content:before, +.format-status .entry-meta:before { + left: auto; + right: 10px; +} + +.sidebar .format-status .entry-content:before, +.sidebar .format-status .entry-meta:before { + left: auto; + right: 70px; +} + +.format-status .entry-content p:first-child:before { + left: auto; + right: 4px; +} + +.sidebar .format-status .entry-content p:first-child:before { + left: auto; + right: 64px; +} + +.format-quote blockquote { + padding-left: 0; + padding-right: 75px; +} + +.format-quote blockquote:before { + content: '\201D'; + padding-left: 25px; + padding-right: 0; + left: auto; + right: -15px; +} + + +/** + * 5.6 Attachments + * ---------------------------------------------------------------------------- + */ + +.attachment .entry-title { + float: right; +} + +.attachment .entry-title:before { + margin-left: 10px; + margin-right: auto; +} + +.attachment .entry-meta { + float: left; +} + +.image-navigation .nav-previous { + left: auto; + right: 0; +} + +.image-navigation .nav-next { + left: 0; + right: auto; +} + +.attachment .entry-caption { + text-align: right; +} + + +/** + * 5.7 Post/Paging Navigation + * ---------------------------------------------------------------------------- + */ + +.navigation .nav-previous { + float: right; +} + +.navigation .nav-next { + float: left; +} + +.sidebar .paging-navigation .nav-links, +.sidebar .post-navigation .nav-links { + padding-left: 376px; + padding-right: 60px; +} + +.paging-navigation .nav-previous .meta-nav { + margin-left: 10px; + margin-right: auto; +} + +.paging-navigation .nav-next .meta-nav { + margin-left: auto; + margin-right: 10px; +} + +.post-navigation a[rel="next"] { + float: left; + text-align: left; +} + + +/** + * 5.8 Author Bio + * ---------------------------------------------------------------------------- + */ + +.author-info { + text-align: right; /* gallery & video post formats */ +} + +.author.sidebar .author-info { + padding-left: 376px; + padding-right: 60px; +} + +.author-avatar .avatar { + float: right; + margin: 0 0 30px 30px; +} + +.author-link { + margin-left: auto; + margin-right: 2px; +} + + +/** + * 5.9 Archives + * ---------------------------------------------------------------------------- + */ + +.sidebar .archive-meta { + padding-left: 316px; + padding-right: 0; +} + + +/** + * 5.10 Search Results/No posts + * ---------------------------------------------------------------------------- + */ + +.sidebar .page-content { + padding-left: 376px; + padding-right: 60px; +} + +/** + * 5.12 Comments + * ---------------------------------------------------------------------------- + */ + +.sidebar .comments-title, +.sidebar .comment-list, +.sidebar .comment-reply-title, +.sidebar .comment-navigation, +.sidebar .comment-respond .comment-form { + padding-left: 376px; + padding-right: 60px; +} + +.comment-list .children { + margin-left: auto; + margin-right: 20px; +} + +.comment-author { + float: right; + margin-left: 50px; + margin-right: auto; +} + +.comment-list .edit-link { + margin-left: auto; + margin-right: 20px; +} + +.comment-metadata, +.comment-content, +.comment-list .reply, +.comment-awaiting-moderation { + float: left; +} + +.comment-awaiting-moderation:before { + margin-left: 5px; + margin-right: auto; +} + +.comment-reply-link:before, +.comment-reply-login:before { + margin-left: 3px; + margin-right: auto; + -webkit-transform: scaleX(-1); + -moz-transform: scaleX(-1); + -ms-transform: scaleX(-1); + -o-transform: scaleX(-1); + transform: scaleX(-1); +} + +.comment-reply-title small a { + float: left; +} + +.comment-form [for="author"], +.comment-form [for="email"], +.comment-form [for="url"], +.comment-form [for="comment"] { + float: right; +} + +.form-allowed-tags code { + margin-left: auto; + margin-right: 3px; +} + +.sidebar .no-comments { + padding-left: 376px; + padding-right: 60px; +} + + +/** + * 6.0 Sidebar + * ---------------------------------------------------------------------------- + */ + +.site-main .widget-area { + float: left; +} + +.widget-area a { + max-width: 100%; +} + + +/** + * 6.1 Widgets + * ---------------------------------------------------------------------------- + */ + +.widget .widget-title { + font-style: normal; +} + +.widget li > ul, +.widget li > ol { + margin-left: auto; + margin-right: 20px; +} + +/** + * 7.0 Footer + * ---------------------------------------------------------------------------- + */ + +.site-footer .widget-area, +.sidebar .site-footer { + text-align: right; +} +.sidebar .site-footer .widget-area { + left: auto; + right: -158px; +} + +.site-footer .widget { + float: right; + margin-left: 20px; + margin-right: auto; +} + +.sidebar .site-footer .widget:nth-of-type(4), +.sidebar .site-footer .widget:nth-of-type(3) { + margin-left: 0; + margin-right: auto; +} + + +/** + * 8.0 Media Queries + * ---------------------------------------------------------------------------- + */ + +@media (max-width: 1069px) { + ul.nav-menu, + div.nav-menu > ul { + margin-left: auto; + margin-right: 0; + } + + .error404 .page-header, + .sidebar .format-image .entry-content img.size-full, + .sidebar .format-image .wp-caption:first-child .wp-caption-text { + margin-right: auto; + } + + .main-navigation .search-form { + left: 20px; + right: auto; + } + + .site-main .widget-area { + margin-left: 60px; + margin-right: auto; + } +} + +@media (max-width: 999px) { + .sidebar .entry-header, + .sidebar .entry-content, + .sidebar .entry-summary, + .sidebar .entry-meta, + .sidebar .comment-list, + .sidebar .comment-reply-title, + .sidebar .comment-navigation, + .sidebar .comment-respond .comment-form, + .sidebar .featured-gallery, + .sidebar .post-navigation .nav-links, + .author.sidebar .author-info, + .sidebar .format-image .entry-content { + max-width: 604px; + padding-left: 0; + padding-right: 0; + } + + .site-main .widget-area { + float: none; + margin-left: auto; + } + + .attachment .entry-meta { + float: right; + text-align: right; + } + + .sidebar .format-status .entry-content, + .sidebar .format-status .entry-meta { + padding-left: 0; + padding-right: 35px; + } + + .sidebar .format-status .entry-content:before, + .sidebar .format-status .entry-meta:before { + left: auto; + right: 10px; + } + + .sidebar .format-status .entry-content p:first-child:before { + left: auto; + right: 4px; + } + + .sidebar .site-footer .widget-area { + left: auto; + right: 0; + } + + .sidebar .paging-navigation .nav-links { + padding: 0 60px; + } +} + +@media (max-width: 767px) { + .format-image .entry-content img:first-of-type, + .format-image .wp-caption:first-child .wp-caption-text { + margin-right: auto; + } +} + +@media (max-width: 643px) { + .sidebar .entry-header, + .sidebar .entry-content, + .sidebar .entry-summary, + .sidebar .entry-meta, + .sidebar .comment-list, + .sidebar .comment-navigation, + .sidebar .featured-gallery, + .sidebar .post-navigation .nav-links, + .sidebar .format-image .entry-content { + padding-left: 20px; + padding-right: 20px; + } + + #content .format-status .entry-content, + #content .format-status .entry-met { + padding-left: 0; + padding-right: 35px; + } + + .menu-toggle:after { + padding-left: 0; + padding-right: 8px; + } + + .toggled-on .nav-menu, + .toggled-on .nav-menu > ul { + margin-left: auto; + margin-right: 0; + } + + .toggled-on .nav-menu li > ul { + margin-left: auto; + margin-right: 20px; + right: auto; + } + + #content .featured-gallery { + padding-left: 0; + padding-right: 24px; + } + + .gallery-columns-1 .gallery-item { + margin-left: 0; + margin-right: auto; + } + + .comment-author { + margin-left: 30px; + margin-right: auto; + } + + .format-audio .audio-content { + background: none; + float: none; + padding-left: 0; + padding-right: 0; + } + + .gallery-columns-3 .gallery-item:nth-of-type(3n) { + margin-left: 4px; + margin-right: auto; + } +} + +@media (max-width: 359px) { + .gallery { + margin-left: auto; + margin-right: 0; + } + + .gallery .gallery-item:nth-of-type(even) { + margin-left: 0; + margin-right: auto; + } + + .gallery .gallery-item, + .gallery.gallery-columns-3 .gallery-item:nth-of-type(even), + .gallery-columns-3 .gallery-item:nth-of-type(3n), + .gallery-columns-5 .gallery-item:nth-of-type(5n), + .gallery-columns-7 .gallery-item:nth-of-type(7n), + .gallery-columns-9 .gallery-item:nth-of-type(9n) { + margin-left: 4px; + margin-right: auto; + } + + .comment-author .avatar { + margin-left: 5px; + margin-right: auto; + } +} + + +/** + * 9.0 Print + * ---------------------------------------------------------------------------- + */ + +@media print { + .entry-content img.alignleft, + .entry-content .wp-caption.alignleft { + margin-left: auto; + margin-right: 0; + } + + .entry-content img.alignright, + .entry-content .wp-caption.alignright { + margin-left: 0; + margin-right: auto; + } +} \ No newline at end of file diff --git a/wp-content/themes/twentythirteen/screenshot.png b/wp-content/themes/twentythirteen/screenshot.png new file mode 100644 index 0000000..e53088b Binary files /dev/null and b/wp-content/themes/twentythirteen/screenshot.png differ diff --git a/wp-content/themes/twentythirteen/search.php b/wp-content/themes/twentythirteen/search.php new file mode 100644 index 0000000..1519c13 --- /dev/null +++ b/wp-content/themes/twentythirteen/search.php @@ -0,0 +1,36 @@ + + +
            +
            + + + + + + + + + + + + + + + + +
            +
            + + + \ No newline at end of file diff --git a/wp-content/themes/twentythirteen/sidebar-main.php b/wp-content/themes/twentythirteen/sidebar-main.php new file mode 100644 index 0000000..3c700ad --- /dev/null +++ b/wp-content/themes/twentythirteen/sidebar-main.php @@ -0,0 +1,18 @@ + + + \ No newline at end of file diff --git a/wp-content/themes/twentythirteen/sidebar.php b/wp-content/themes/twentythirteen/sidebar.php new file mode 100644 index 0000000..cb5cf98 --- /dev/null +++ b/wp-content/themes/twentythirteen/sidebar.php @@ -0,0 +1,22 @@ + + + \ No newline at end of file diff --git a/wp-content/themes/twentythirteen/single.php b/wp-content/themes/twentythirteen/single.php new file mode 100644 index 0000000..1694a0d --- /dev/null +++ b/wp-content/themes/twentythirteen/single.php @@ -0,0 +1,28 @@ + + +
            +
            + + + + + + + + + + +
            +
            + + + \ No newline at end of file diff --git a/wp-content/themes/twentythirteen/style.css b/wp-content/themes/twentythirteen/style.css new file mode 100644 index 0000000..28df920 --- /dev/null +++ b/wp-content/themes/twentythirteen/style.css @@ -0,0 +1,3179 @@ +/* +Theme Name: Twenty Thirteen +Theme URI: http://wordpress.org/themes/twentythirteen +Author: the WordPress team +Author URI: http://wordpress.org/ +Description: The 2013 theme for WordPress takes us back to the blog, featuring a full range of post formats, each displayed beautifully in their own unique way. Design details abound, starting with a vibrant color scheme and matching header images, beautiful typography and icons, and a flexible layout that looks great on any device, big or small. +Version: 1.2 +License: GNU General Public License v2 or later +License URI: http://www.gnu.org/licenses/gpl-2.0.html +Tags: black, brown, orange, tan, white, yellow, light, one-column, two-columns, right-sidebar, fluid-layout, responsive-layout, custom-header, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, translation-ready +Text Domain: twentythirteen + +This theme, like WordPress, is licensed under the GPL. +Use it to make something cool, have fun, and share what you've learned with others. +*/ + + +/** + * Table of Contents: + * + * 1.0 - Reset + * 2.0 - Repeatable Patterns + * 3.0 - Basic Structure + * 4.0 - Header + * 4.1 - Site Header + * 4.2 - Navigation + * 5.0 - Content + * 5.1 - Entry Header + * 5.2 - Entry Meta + * 5.3 - Entry Content + * 5.4 - Galleries + * 5.5 - Post Formats + * 5.6 - Attachments + * 5.7 - Post/Paging Navigation + * 5.8 - Author Bio + * 5.9 - Archives + * 5.10 - Search Results/No posts + * 5.11 - 404 + * 5.12 - Comments + * 5.13 - Multisite + * 6.0 - Sidebar + * 6.1 - Widgets + * 7.0 - Footer + * 8.0 - Media Queries + * 9.0 - Print + * ---------------------------------------------------------------------------- + */ + + +/** + * 1.0 Reset + * + * Modified from Normalize.css to provide cross-browser consistency and a smart + * default styling of HTML elements. + * + * @see http://git.io/normalize + * ---------------------------------------------------------------------------- + */ + +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +article, +aside, +details, +figcaption, +figure, +footer, +header, +nav, +section, +summary { + display: block; +} + +audio, +canvas, +video { + display: inline-block; +} + +audio:not([controls]) { + display: none; + height: 0; +} + +[hidden] { + display: none; +} + +html { + font-size: 100%; + overflow-y: scroll; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} + +html, +button, +input, +select, +textarea { + font-family: "Source Sans Pro", Helvetica, sans-serif; +} + +body { + color: #141412; + line-height: 1.5; + margin: 0; +} + +a { + color: #ca3c08; + text-decoration: none; +} + +a:visited { + color: #ac0404; +} + +a:focus { + outline: thin dotted; +} + +a:active, +a:hover { + color: #ea9629; + outline: 0; +} + +a:hover { + text-decoration: underline; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + clear: both; + font-family: Bitter, Georgia, serif; + line-height: 1.3; +} + +h1 { + font-size: 48px; + margin: 33px 0; +} + +h2 { + font-size: 30px; + margin: 25px 0; +} + +h3 { + font-size: 22px; + margin: 22px 0; +} + +h4 { + font-size: 20px; + margin: 25px 0; +} + +h5 { + font-size: 18px; + margin: 30px 0; +} + +h6 { + font-size: 16px; + margin: 36px 0; +} + +address { + font-style: italic; + margin: 0 0 24px; +} + +abbr[title] { + border-bottom: 1px dotted; +} + +b, +strong { + font-weight: bold; +} + +dfn { + font-style: italic; +} + +mark { + background: #ff0; + color: #000; +} + +p { + margin: 0 0 24px; +} + +code, +kbd, +pre, +samp { + font-family: monospace, serif; + font-size: 14px; + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} + +pre { + background: #f5f5f5; + color: #666; + font-family: monospace; + font-size: 14px; + margin: 20px 0; + overflow: auto; + padding: 20px; + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; +} + +blockquote, +q { + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; + quotes: none; +} + +blockquote:before, +blockquote:after, +q:before, +q:after { + content: ""; + content: none; +} + +blockquote { + font-size: 18px; + font-style: italic; + font-weight: 300; + margin: 24px 40px; +} + +blockquote blockquote { + margin-right: 0; +} + +blockquote cite, +blockquote small { + font-size: 14px; + font-weight: normal; + text-transform: uppercase; +} + +blockquote em, +blockquote i { + font-style: normal; + font-weight: 300; +} + +blockquote strong, +blockquote b { + font-weight: 400; +} + +small { + font-size: smaller; +} + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +dl { + margin: 0 20px; +} + +dt { + font-weight: bold; +} + +dd { + margin: 0 0 20px; +} + +menu, +ol, +ul { + margin: 16px 0; + padding: 0 0 0 40px; +} + +ul { + list-style-type: square; +} + +nav ul, +nav ol { + list-style: none; + list-style-image: none; +} + +li > ul, +li > ol { + margin: 0; +} + +img { + -ms-interpolation-mode: bicubic; + border: 0; + vertical-align: middle; +} + +svg:not(:root) { + overflow: hidden; +} + +figure { + margin: 0; +} + +form { + margin: 0; +} + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +legend { + border: 0; + padding: 0; + white-space: normal; +} + +button, +input, +select, +textarea { + font-size: 100%; + margin: 0; + max-width: 100%; + vertical-align: baseline; +} + +button, +input { + line-height: normal; +} + +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + cursor: pointer; +} + +button[disabled], +input[disabled] { + cursor: default; +} + +input[type="checkbox"], +input[type="radio"] { + padding: 0; +} + +input[type="search"] { + -webkit-appearance: textfield; + padding-right: 2px; /* Don't cut off the webkit search cancel button */ + width: 270px; +} + +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +textarea { + overflow: auto; + vertical-align: top; +} + +table { + border-bottom: 1px solid #ededed; + border-collapse: collapse; + border-spacing: 0; + font-size: 14px; + line-height: 2; + margin: 0 0 20px; + width: 100%; +} + +caption, +th, +td { + font-weight: normal; + text-align: left; +} + +caption { + font-size: 16px; + margin: 20px 0; +} + +th { + font-weight: bold; + text-transform: uppercase; +} + +td { + border-top: 1px solid #ededed; + padding: 6px 10px 6px 0; +} + +del { + color: #333; +} + +ins { + background: #fff9c0; + text-decoration: none; +} + +hr { + background: url(images/dotted-line.png) repeat center top; + background-size: 4px 4px; + border: 0; + height: 1px; + margin: 0 0 24px; +} + + +/** + * 2.0 Repeatable Patterns + * ---------------------------------------------------------------------------- + */ + +.genericon:before, +.menu-toggle:after, +.featured-post:before, +.date a:before, +.entry-meta .author a:before, +.format-audio .entry-content:before, +.comments-link a:before, +.tags-links a:first-child:before, +.categories-links a:first-child:before, +.edit-link a:before, +.attachment .entry-title:before, +.attachment-meta:before, +.attachment-meta a:before, +.comment-awaiting-moderation:before, +.comment-reply-link:before, +.comment-reply-login:before, +.comment-reply-title small a:before, +.bypostauthor > .comment-body .fn:before, +.error404 .page-title:before { + -webkit-font-smoothing: antialiased; + display: inline-block; + font: normal 16px/1 Genericons; + vertical-align: text-bottom; +} + +/* Clearing floats */ +.clear:after, +.attachment .entry-header:after, +.site-footer .widget-area:after, +.entry-content:after, +.page-content:after, +.navigation:after, +.nav-links:after, +.gallery:after, +.comment-form-author:after, +.comment-form-email:after, +.comment-form-url:after, +.comment-body:after { + clear: both; +} + +.clear:before, +.clear:after, +.attachment .entry-header:before, +.attachment .entry-header:after, +.site-footer .widget-area:before, +.site-footer .widget-area:after, +.entry-content:before, +.entry-content:after, +.page-content:before, +.page-content:after, +.navigation:before, +.navigation:after, +.nav-links:before, +.nav-links:after, +.gallery:before, +.gallery:after, +.comment-form-author:before, +.comment-form-author:after, +.comment-form-email:before, +.comment-form-email:after, +.comment-form-url:before, +.comment-form-url:after, +.comment-body:before, +.comment-body:after { + content: ""; + display: table; +} + +/* Assistive text */ +.screen-reader-text { + clip: rect(1px, 1px, 1px, 1px); + position: absolute !important; +} + +.screen-reader-text:focus { + background-color: #f1f1f1; + border-radius: 3px; + box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6); + clip: auto !important; + color: #21759b; + display: block; + font-size: 14px; + font-weight: bold; + height: auto; + line-height: normal; + padding: 15px 23px 14px; + position: absolute; + left: 5px; + top: 5px; + text-decoration: none; + width: auto; + z-index: 100000; /* Above WP toolbar */ +} + +/* Form fields, general styles first. */ +button, +input, +textarea { + border: 2px solid #d4d0ba; + font-family: inherit; + padding: 5px; +} + +input, +textarea { + color: #141412; +} + +input:focus, +textarea:focus { + border: 2px solid #c3c0ab; + outline: 0; +} + +/* Buttons */ +button, +input[type="submit"], +input[type="button"], +input[type="reset"] { + background: #e05d22; /* Old browsers */ + background: -webkit-linear-gradient(top, #e05d22 0%, #d94412 100%); /* Chrome 10+, Safari 5.1+ */ + background: linear-gradient(to bottom, #e05d22 0%, #d94412 100%); /* W3C */ + border: none; + border-bottom: 3px solid #b93207; + border-radius: 2px; + color: #fff; + display: inline-block; + padding: 11px 24px 10px; + text-decoration: none; +} + +button:hover, +button:focus, +input[type="submit"]:hover, +input[type="button"]:hover, +input[type="reset"]:hover, +input[type="submit"]:focus, +input[type="button"]:focus, +input[type="reset"]:focus { + background: #ed6a31; /* Old browsers */ + background: -webkit-linear-gradient(top, #ed6a31 0%, #e55627 100%); /* Chrome 10+, Safari 5.1+ */ + background: linear-gradient(to bottom, #ed6a31 0%, #e55627 100%); /* W3C */ + outline: none; +} + +button:active, +input[type="submit"]:active, +input[type="button"]:active, +input[type="reset"]:active { + background: #d94412; /* Old browsers */ + background: -webkit-linear-gradient(top, #d94412 0%, #e05d22 100%); /* Chrome 10+, Safari 5.1+ */ + background: linear-gradient(to bottom, #d94412 0%, #e05d22 100%); /* W3C */ + border: none; + border-top: 3px solid #b93207; + padding: 10px 24px 11px; +} + +.post-password-required input[type="submit"] { + padding: 7px 24px 4px; + vertical-align: bottom; +} + +.post-password-required input[type="submit"]:active { + padding: 5px 24px 6px; +} + +/* Placeholder text color -- selectors need to be separate to work. */ +::-webkit-input-placeholder { + color: #7d7b6d; +} + +:-moz-placeholder { + color: #7d7b6d; +} + +::-moz-placeholder { + color: #7d7b6d; +} + +:-ms-input-placeholder { + color: #7d7b6d; +} + +/* + * Responsive images + * + * Fluid images for posts, comments, and widgets + */ +.entry-content img, +.entry-summary img, +.comment-content img, +.widget img, +.wp-caption { + max-width: 100%; +} + +/* Make sure images with WordPress-added height and width attributes are scaled correctly. */ +.entry-content img, +.entry-summary img, +.comment-content img[height], +img[class*="align"], +img[class*="wp-image-"], +img[class*="attachment-"] { + height: auto; +} + +img.size-full, +img.size-large, +img.wp-post-image { + height: auto; + max-width: 100%; +} + +/* Make sure videos and embeds fit their containers. */ +embed, +iframe, +object, +video { + max-width: 100%; +} + +/* Override the Twitter embed fixed width. */ +.entry-content .twitter-tweet-rendered { + max-width: 100% !important; +} + +/* Images */ +.alignleft { + float: left; +} + +.alignright { + float: right; +} + +.aligncenter { + display: block; + margin-left: auto; + margin-right: auto; +} + +figure.wp-caption.alignleft, +img.alignleft { + margin: 5px 20px 5px 0; +} + +.wp-caption.alignleft { + margin: 5px 10px 5px 0; +} + +figure.wp-caption.alignright, +img.alignright { + margin: 5px 0 5px 20px; +} + +.wp-caption.alignright { + margin: 5px 0 5px 10px; +} + +img.aligncenter { + margin: 5px auto; +} + +img.alignnone { + margin: 5px 0; +} + +.wp-caption .wp-caption-text, +.entry-caption, +.gallery-caption { + color: #220e10; + font-size: 18px; + font-style: italic; + font-weight: 300; + margin: 0 0 24px; +} + +div.wp-caption.alignright img[class*="wp-image-"] { + float: right; +} + +div.wp-caption.alignright .wp-caption-text { + padding-left: 10px; +} + +img.wp-smiley, +.rsswidget img { + border: 0; + border-radius: 0; + box-shadow: none; + margin-bottom: 0; + margin-top: 0; + padding: 0; +} + +.wp-caption.alignleft + ul, +.wp-caption.alignleft + ol { + list-style-position: inside; +} + + +/** + * 3.0 Basic Structure + * ---------------------------------------------------------------------------- + */ + +.site { + background-color: #fff; + border-left: 1px solid #f2f2f2; + border-right: 1px solid #f2f2f2; + margin: 0 auto; + max-width: 1600px; + width: 100%; +} + +.site-main { + position: relative; +} + +.site-main .sidebar-container { + height: 0; + position: absolute; + top: 40px; + width: 100%; + z-index: 1; +} + +.site-main .sidebar-inner { + margin: 0 auto; + max-width: 1040px; +} + + +/** + * 4.0 Header + * ---------------------------------------------------------------------------- + */ + +/** + * 4.1 Site Header + * ---------------------------------------------------------------------------- + */ + +.site-header { + position: relative; +} + +.site-header .home-link { + color: #141412; + display: block; + margin: 0 auto; + max-width: 1080px; + min-height: 230px; + padding: 0 20px; + text-decoration: none; + width: 100%; +} + +.site-header .site-title:hover { + text-decoration: underline; +} + +.site-title { + font-size: 60px; + font-weight: bold; + line-height: 1; + margin: 0; + padding: 58px 0 10px; +} + +.site-description { + font: 300 italic 24px "Source Sans Pro", Helvetica, sans-serif; + margin: 0; +} + + +/** + * 4.2 Navigation + * ---------------------------------------------------------------------------- + */ + +.main-navigation { + clear: both; + margin: 0 auto; + max-width: 1080px; + min-height: 45px; + position: relative; +} + +ul.nav-menu, +div.nav-menu > ul { + margin: 0; + padding: 0 40px 0 0; +} + +.nav-menu li { + display: inline-block; + position: relative; +} + +.nav-menu li a { + color: #141412; + display: block; + font-size: 15px; + line-height: 1; + padding: 15px 20px; + text-decoration: none; +} + +.nav-menu li:hover > a, +.nav-menu li a:hover, +.nav-menu li:focus > a, +.nav-menu li a:focus { + background-color: #220e10; + color: #fff; +} + +.nav-menu .sub-menu, +.nav-menu .children { + background-color: #220e10; + border: 2px solid #f7f5e7; + border-top: 0; + padding: 0; + position: absolute; + left: -2px; + z-index: 99999; + height: 1px; + width: 1px; + overflow: hidden; + clip: rect(1px, 1px, 1px, 1px); +} + +.nav-menu .sub-menu ul, +.nav-menu .children ul { + border-left: 0; + left: 100%; + top: 0; +} + +ul.nav-menu ul a, +.nav-menu ul ul a { + color: #fff; + margin: 0; + width: 200px; +} + +ul.nav-menu ul a:hover, +.nav-menu ul ul a:hover, +ul.nav-menu ul a:focus, +.nav-menu ul ul a:focus { + background-color: #db572f; +} + +ul.nav-menu li:hover > ul, +.nav-menu ul li:hover > ul, +ul.nav-menu .focus > ul, +.nav-menu .focus > ul { + clip: inherit; + overflow: inherit; + height: inherit; + width: inherit; +} + +.nav-menu .current_page_item > a, +.nav-menu .current_page_ancestor > a, +.nav-menu .current-menu-item > a, +.nav-menu .current-menu-ancestor > a { + color: #bc360a; + font-style: italic; +} + +.menu-toggle { + display: none; +} + +/* Navbar */ +.navbar { + background-color: #f7f5e7; + margin: 0 auto; + max-width: 1600px; + width: 100%; +} + +.site-header .search-form { + position: absolute; + right: 20px; + top: 1px; +} + +.site-header .search-field { + background-color: transparent; + background-image: url(images/search-icon.png); + background-position: 5px center; + background-repeat: no-repeat; + background-size: 24px 24px; + border: none; + cursor: pointer; + height: 37px; + margin: 3px 0; + padding: 0 0 0 34px; + position: relative; + -webkit-transition: width 400ms ease, background 400ms ease; + transition: width 400ms ease, background 400ms ease; + width: 0; +} + +.site-header .search-field:focus { + background-color: #fff; + border: 2px solid #c3c0ab; + cursor: text; + outline: 0; + width: 230px; +} + + +/** + * 5.0 Content + * ---------------------------------------------------------------------------- + */ + +.hentry { + padding: 40px 0; +} + +.entry-header, +.entry-content, +.entry-summary, +.entry-meta { + margin: 0 auto; + max-width: 604px; + width: 100%; +} + +.sidebar .entry-header, +.sidebar .entry-content, +.sidebar .entry-summary, +.sidebar .entry-meta { + max-width: 1040px; + padding: 0 376px 0 60px; +} + + +/** + * 5.1 Entry Header + * ---------------------------------------------------------------------------- + */ + +.sidebar .entry-header .entry-meta { + padding: 0; +} + +.entry-thumbnail img { + display: block; + margin: 0 auto 10px; +} + +.entry-header { + margin-bottom: 30px; +} + +.entry-title { + font-weight: normal; + margin: 0 0 5px; +} + +.entry-title a { + color: #141412; +} + +.entry-title a:hover { + color: #ea9629; +} + + +/** + * 5.2 Entry Meta + * ---------------------------------------------------------------------------- + */ + +.entry-meta { + clear: both; + font-size: 14px; +} + +.entry-meta a { + color: #bc360a; +} + +.entry-meta a:hover { + color: #bc360a; +} + +.entry-meta > span { + margin-right: 20px; +} + +.entry-meta > span:last-child { + margin-right: 0; +} + +.featured-post:before { + content: "\f308"; + margin-right: 2px; +} + +.entry-meta .date a:before { + content: "\f303"; +} + +.comments-link a:before { + content: "\f300"; + margin-right: 2px; + position: relative; + top: -1px; +} + +.entry-meta .author a:before { + content: "\f304"; + position: relative; + top: -1px; +} + +.categories-links a:first-child:before { + content: "\f301"; +} + +.tags-links a:first-child:before { + content: "\f302"; + position: relative; + top: -1px; +} + +.edit-link a:before { + content: "\f411"; + position: relative; + top: -1px; +} + +.single-author .entry-meta .author, +.sticky.format-standard .entry-meta .date, +.sticky.format-audio .entry-meta .date, +.sticky.format-chat .entry-meta .date, +.sticky.format-image .entry-meta .date, +.sticky.format-gallery .entry-meta .date { + display: none; +} + + +/** + * 5.3 Entry Content + * ---------------------------------------------------------------------------- + */ + +.entry-content { + -webkit-hyphens: auto; + -moz-hyphens: auto; + -ms-hyphens: auto; + hyphens: auto; + word-wrap: break-word; +} + +.entry-content a, +.comment-content a { + color: #bc360a; +} + +.entry-content a:hover, +.comment-content a:hover { + color: #ea9629; +} + +.entry-content blockquote { + font-size: 24px; +} + +.entry-content blockquote cite, +.entry-content blockquote small { + font-size: 16px; +} + +.entry-content img.alignleft, +.entry-content .wp-caption.alignleft { + margin-left: -60px; +} + +.entry-content img.alignright, +.entry-content .wp-caption.alignright { + margin-right: -60px; +} + +footer.entry-meta { + margin-top: 24px; +} + +.format-standard footer.entry-meta { + margin-top: 0; +} + +/* Page links */ +.page-links { + clear: both; + font-size: 16px; + font-style: italic; + font-weight: normal; + line-height: 2.2; + margin: 20px 0; + text-transform: uppercase; +} + +.page-links a, +.page-links > span { + background: #fff; + border: 1px solid #fff; + padding: 5px 10px; + text-decoration: none; +} + +.format-status .entry-content .page-links a, +.format-gallery .entry-content .page-links a, +.format-chat .entry-content .page-links a, +.format-quote .entry-content .page-links a, +.page-links a { + background: #e63f2a; + border: 1px solid #e63f2a; + color: #fff; +} + +.format-gallery .entry-content .page-links a:hover, +.format-audio .entry-content .page-links a:hover, +.format-status .entry-content .page-links a:hover, +.format-video .entry-content .page-links a:hover, +.format-chat .entry-content .page-links a:hover, +.format-quote .entry-content .page-links a:hover, +.page-links a:hover { + background: #fff; + color: #e63f2a; +} + +.format-status .entry-content .page-links > span, +.format-quote .entry-content .page-links > span { + background: none; +} + +.page-links .page-links-title { + background: transparent; + border: none; + margin-right: 20px; + padding: 0; +} + +/* Mediaelements */ +.hentry .mejs-mediaelement, +.hentry .mejs-container .mejs-controls { + background: #220e10; +} + +.hentry .mejs-controls .mejs-time-rail .mejs-time-loaded, +.hentry .mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current { + background: #fff; +} + +.hentry .mejs-controls .mejs-time-rail .mejs-time-current { + background: #ea9629; +} + +.hentry .mejs-controls .mejs-time-rail .mejs-time-total, +.hentry .mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total { + background: #595959; +} + +.hentry .mejs-controls .mejs-time-rail span, +.hentry .mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total, +.hentry .mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current { + border-radius: 0; +} + + +/** + * 5.4 Galleries + * ---------------------------------------------------------------------------- + */ + +.gallery { + margin-bottom: 20px; + margin-left: -4px; +} + +.gallery-item { + float: left; + margin: 0 4px 4px 0; + overflow: hidden; + position: relative; +} + +.gallery-columns-1.gallery-size-medium, +.gallery-columns-1.gallery-size-thumbnail, +.gallery-columns-2.gallery-size-thumbnail, +.gallery-columns-3.gallery-size-thumbnail { + display: table; + margin: 0 auto 20px; +} + +.gallery-columns-1 .gallery-item, +.gallery-columns-2 .gallery-item, +.gallery-columns-3 .gallery-item { + text-align: center; +} + +.gallery-columns-4 .gallery-item { + max-width: 23%; + max-width: -webkit-calc(25% - 4px); + max-width: calc(25% - 4px); +} + +.gallery-columns-5 .gallery-item { + max-width: 19%; + max-width: -webkit-calc(20% - 4px); + max-width: calc(20% - 4px); +} + +.gallery-columns-6 .gallery-item { + max-width: 15%; + max-width: -webkit-calc(16.7% - 4px); + max-width: calc(16.7% - 4px); +} + +.gallery-columns-7 .gallery-item { + max-width: 13%; + max-width: -webkit-calc(14.28% - 4px); + max-width: calc(14.28% - 4px); +} + +.gallery-columns-8 .gallery-item { + max-width: 11%; + max-width: -webkit-calc(12.5% - 4px); + max-width: calc(12.5% - 4px); +} + +.gallery-columns-9 .gallery-item { + max-width: 9%; + max-width: -webkit-calc(11.1% - 4px); + max-width: calc(11.1% - 4px); +} + +.gallery-columns-1 .gallery-item:nth-of-type(1n), +.gallery-columns-2 .gallery-item:nth-of-type(2n), +.gallery-columns-3 .gallery-item:nth-of-type(3n), +.gallery-columns-4 .gallery-item:nth-of-type(4n), +.gallery-columns-5 .gallery-item:nth-of-type(5n), +.gallery-columns-6 .gallery-item:nth-of-type(6n), +.gallery-columns-7 .gallery-item:nth-of-type(7n), +.gallery-columns-8 .gallery-item:nth-of-type(8n), +.gallery-columns-9 .gallery-item:nth-of-type(9n) { + margin-right: 0; +} + +.gallery-columns-1.gallery-size-medium figure.gallery-item:nth-of-type(1n+1), +.gallery-columns-1.gallery-size-thumbnail figure.gallery-item:nth-of-type(1n+1), +.gallery-columns-2.gallery-size-thumbnail figure.gallery-item:nth-of-type(2n+1), +.gallery-columns-3.gallery-size-thumbnail figure.gallery-item:nth-of-type(3n+1) { + clear: left; +} + +.gallery-caption { + background-color: rgba(0, 0, 0, 0.7); + box-sizing: border-box; + color: #fff; + font-size: 14px; + line-height: 1.3; + margin: 0; + max-height: 50%; + opacity: 0; + padding: 2px 8px; + position: absolute; + bottom: 0; + left: 0; + text-align: left; + -webkit-transition: opacity 400ms ease; + transition: opacity 400ms ease; + width: 100%; +} + +.gallery-caption:before { + box-shadow: 0 -10px 15px #000 inset; + content: ""; + height: 100%; + min-height: 49px; + position: absolute; + left: 0; + top: 0; + width: 100%; +} + +.gallery-item:hover .gallery-caption { + opacity: 1; +} + +.gallery-columns-7 .gallery-caption, +.gallery-columns-8 .gallery-caption, +.gallery-columns-9 .gallery-caption { + display: none; +} + + +/** + * 5.5 Post Formats + * ---------------------------------------------------------------------------- + */ + +/* Aside */ +.format-aside { + background-color: #f7f5e7; +} + +.blog .format-aside:first-of-type, +.single .format-aside:first-of-type, +.format-aside + .format-aside, +.format-aside + .format-link, +.format-link + .format-aside { + box-shadow: inset 0 2px 2px rgba(173, 165, 105, 0.2); +} + +.format-aside .entry-meta { + margin-top: 0; +} + +.format-aside blockquote { + font-size: 100%; + font-weight: normal; +} + +.format-aside cite { + font-size: 100%; + text-transform: none; +} + +.format-aside cite:before { + content: "\2014"; + margin-right: 5px; +} + +/* Audio */ +.format-audio { + background-color: #db572f; +} + +.format-audio .entry-title { + font-size: 28px; + font-weight: bold; +} + +.format-audio .entry-content:before { + content: "\f109"; + float: left; + font-size: 64px; + position: relative; + top: 4px; +} + +.format-audio .entry-content a, +.format-audio .entry-meta a, +.format-audio .entry-content a:hover, +.format-audio .entry-meta a:hover { + color: #fbfaf3; +} + +.format-audio .audio-content { + background: url(images/dotted-line.png) repeat-y left top; + background-size: 4px 4px; + float: right; + padding-left: 35px; + width: 80%; + width: -webkit-calc(100% - 85px); + width: calc(100% - 85px); +} + +.format-audio .wp-audio-shortcode { + height: 30px !important; /* Override mediaelement.js style */ + margin: 20px 0; + max-width: 400px !important; /* Override mediaelement.js style */ +} + +.format-audio audio { + max-width: 100% !important; /* Avoid player width overflow. */ +} + +/* Chat */ +.format-chat { + background-color: #eadaa6; +} + +.format-chat .entry-title { + font-size: 28px; + font-weight: bold; +} + +.format-chat .entry-meta a, +.format-chat .entry-content a { + color: #722d19; +} + +.format-chat .entry-meta .date a:before { + content: "\f108"; + margin-right: 2px; +} + +.format-chat .entry-meta .author { + display: none; +} + +.format-chat .chat { + margin: 0; +} + +.format-chat .chat .chat-timestamp { + color: #722d19; + float: right; + font-size: 12px; + font-weight: normal; + margin: 5px 10px 0; +} + +.format-chat .chat .fn { + font-style: normal; +} + +/* Gallery */ +.format-gallery { + background-color: #fbca3c; +} + +.format-gallery .entry-header { + margin-bottom: 15px; +} + +.format-gallery .entry-title { + font-size: 50px; + font-weight: 400; + margin: 0; +} + +.format-gallery .entry-meta a, +.format-gallery .entry-content a { + color: #722d19; +} + +/* Image */ +.format-image .entry-title { + font-size: 28px; + font-weight: bold; +} + +.format-image .categories-links, +.format-image .tags-links { + display: none; +} + +/* Link */ +.format-link { + background-color: #f7f5e7; +} + +.blog .format-link:first-of-type, +.single .format-link:first-of-type { + box-shadow: inset 0 2px 2px rgba(173, 165, 105, 0.2); +} + +.format-link .entry-header, +.format-link .entry-content p:last-child { + margin-bottom: 0; +} + +.format-link .entry-title { + color: #ca3c08; + display: inline; + font: 300 italic 20px "Source Sans Pro", Helvetica, sans-serif; + margin-right: 20px; +} + +.format-link .entry-title a { + color: #bc360a; +} + +.format-link div.entry-meta { + display: inline; +} + +/* Quote */ +.format-quote { + background-color: #210d10; +} + +.format-quote .entry-content, +.format-quote .entry-meta { + color: #f7f5e7; +} + +.format-quote .entry-content blockquote { + font-size: 28px; + margin: 0; +} + +.format-quote .entry-content a, +.format-quote .entry-meta a, +.format-quote .linked { + color: #e63f2a; +} + +.format-quote .entry-content cite a { + border-bottom: 1px dotted #fff; + color: #fff; +} + +.format-quote .entry-content cite a:hover { + text-decoration: none; +} + +.format-quote blockquote small, +.format-quote blockquote cite { + display: block; + font-size: 16px; +} + +.format-quote blockquote { + font-style: italic; + font-weight: 300; + padding-left: 75px; + position: relative; +} + +.format-quote blockquote:before { + content: '\201C'; + font-size: 140px; + font-weight: 400; + line-height: .8; + padding-right: 25px; + position: absolute; + left: -15px; + top: -3px; +} + +.format-quote .entry-meta .author { + display: none; +} + +/* Status */ +.format-status { + background-color: #722d19; + padding: 0; +} + +.format-status .entry-content, +.format-status .entry-meta { + padding-left: 35px; + position: relative; +} + +.format-status .entry-content a { + color: #eadaa6; +} + +.format-status .entry-meta a { + color: #f7f5e7; +} + +.sidebar .format-status .entry-content, +.sidebar .format-status .entry-meta { + padding-left: 95px; +} + +.format-status .entry-content:before, +.format-status .entry-meta:before { + background: url(images/dotted-line.png) repeat-y left bottom; + background-size: 4px 4px; + content: ""; + display: block; + height: 100%; + position: absolute; + left: 10px; + top: 0; + width: 1px; +} + +.sidebar .format-status .entry-content:before, +.sidebar .format-status .entry-meta:before { + left: 70px; +} + +.format-status .categories-links, +.format-status .tags-links { + display: none; +} + +/* Ensures the dots in the dot background are in lockstep. */ +.format-status .entry-meta:before { + background-position: left top; +} + +.format-status .entry-content { + color: #f7f5e7; + font-size: 24px; + font-style: italic; + font-weight: 300; + padding-bottom: 30px; + padding-top: 40px; + position: relative; +} + +.format-status .entry-content p:first-child:before { + background-color: rgba(0, 0, 0, 0.65); + content: ""; + height: 3px; + margin-top: 13px; + position: absolute; + left: 4px; + width: 13px; +} + +.sidebar .format-status .entry-content > p:first-child:before { + left: 64px; +} + +.format-status .entry-content p:last-child { + margin-bottom: 0; +} + +.format-status .entry-meta { + margin-top: 0; + padding-bottom: 40px; +} + +.format-status .entry-meta .date a:before { + content: "\f105"; +} + +/* Video */ +.format-video { + background-color: #db572f; +} + +.format-video .entry-content a, +.format-video .entry-meta a, +.format-video .entry-content a:hover, +.format-video .entry-meta a:hover { + color: #fbfaf3; +} + +.format-video .entry-title { + font-size: 50px; + font-weight: 400; +} + +.format-video .entry-meta { + color: #220e10; +} + + +/** + * 5.6 Attachments + * ---------------------------------------------------------------------------- + */ + +.attachment .hentry { + background-color: #e8e5ce; + margin: 0; + padding: 0; +} + +.attachment .entry-header { + margin-bottom: 0; + max-width: 1040px; + padding: 30px 0; +} + +.attachment .entry-title { + display: inline-block; + float: left; + font: 300 italic 30px "Source Sans Pro", Helvetica, sans-serif; + margin: 0; +} + +.attachment .entry-title:before { + content: "\f416"; + font-size: 32px; + margin-right: 10px; +} + +.attachment .entry-meta { + clear: none; + color: inherit; + float: right; + max-width: 604px; + padding: 9px 0 0; + text-align: right; +} + +.hentry.attachment:not(.image-attachment) .entry-meta { + max-width: 104px; +} + +.attachment footer.entry-meta { + display: none; +} + +.attachment-meta:before { + content: "\f307"; +} + +.full-size-link a:before { + content: "\f402"; +} + +.full-size-link:before { + content: none; +} + +.attachment .entry-meta a, +.attachment .entry-meta .edit-link:before, +.attachment .full-size-link:before { + color: #ca3c08; +} + +.attachment .entry-content { + background-color: #fff; + max-width: 100%; + padding: 40px 0; +} + +.image-navigation { + margin: 0 auto; + max-width: 1040px; + position: relative; +} + +.image-navigation a:hover { + text-decoration: none; +} + +.image-navigation .nav-previous, +.image-navigation .nav-next { + position: absolute; + top: 50px; +} + +.image-navigation .nav-previous { + left: 0; +} + +.image-navigation .nav-next { + right: 0; +} + +.image-navigation .meta-nav { + font-size: 32px; + font-weight: 300; + vertical-align: -4px; +} + +.attachment .entry-attachment, +.attachment .type-attachment p { + margin: 0 auto; + max-width: 724px; + text-align: center; +} + +.attachment .entry-attachment .attachment { + display: inline-block; +} + +.attachment .entry-caption { + text-align: left; +} + +.attachment .entry-description { + margin: 20px auto 0; + max-width: 604px; +} + +.attachment .entry-caption p:last-child, +.attachment .entry-description p:last-child { + margin: 0; +} + +.attachment .site-main .sidebar-container { + display: none; +} + +.attachment .entry-content .mejs-audio { + max-width: 400px; + margin: 0 auto; +} + +.attachment .entry-content .wp-video { + margin: 0 auto; +} + +.attachment .entry-content .mejs-container { + margin-bottom: 24px; +} + +/** + * 5.7 Post/Paging Navigation + * ---------------------------------------------------------------------------- + */ + +.navigation .nav-previous { + float: left; +} + +.navigation .nav-next { + float: right; +} + +.navigation a { + color: #bc360a; +} + +.navigation a:hover { + color: #ea9629; + text-decoration: none; +} + +.paging-navigation { + background-color: #e8e5ce; + padding: 40px 0; +} + +.paging-navigation .nav-links { + margin: 0 auto; + max-width: 604px; + width: 100%; +} + +.sidebar .paging-navigation .nav-links { + max-width: 1040px; + padding: 0 376px 0 60px; +} + +.paging-navigation .nav-next { + padding: 13px 0; +} + +.paging-navigation a { + font-size: 22px; + font-style: italic; + font-weight: 300; +} + +.paging-navigation .meta-nav { + background-color: #e63f2a; + border-radius: 50%; + color: #fff; + display: inline-block; + font-size: 26px; + padding: 3px 0 8px; + text-align: center; + width: 50px; +} + +.paging-navigation .nav-previous .meta-nav { + margin-right: 10px; + padding: 17px 0 23px; + width: 80px; +} + +.paging-navigation .nav-next .meta-nav { + margin-left: 10px; +} + +.paging-navigation a:hover .meta-nav { + background-color: #ea9629; + text-decoration: none; +} + +.post-navigation { + background-color: #fff; + color: #ca3c08; + font-size: 20px; + font-style: italic; + font-weight: 300; + padding: 20px 0; +} + +.post-navigation .nav-links { + margin: 0 auto; + max-width: 1040px; +} + +.sidebar .post-navigation .nav-links { + padding: 0 376px 0 60px; +} + +.post-navigation a[rel="next"] { + float: right; + text-align: right; +} + + +/** + * 5.8 Author Bio + * ---------------------------------------------------------------------------- + */ + +.author-info { + margin: 0 auto; + max-width: 604px; + padding: 30px 0 10px; + text-align: left; /* gallery & video post formats */ + width: 100%; +} + +.author.sidebar .author-info { + max-width: 1040px; + padding: 30px 376px 10px 60px; +} + +.single .author-info { + padding: 50px 0 0; +} + +.author-avatar .avatar { + float: left; + margin: 0 30px 30px 0; +} + +.single-format-status .author-description { + color: #f7f5e7; +} + +.author-description .author-title { + clear: none; + font: 300 italic 20px "Source Sans Pro", Helvetica, sans-serif; + margin: 0 0 8px; +} + +.author-link { + color: #ca3c08; + margin-left: 2px; +} + +.author.archive .author-link { + display: none; +} + + +/** + * 5.9 Archives + * ---------------------------------------------------------------------------- + */ + +.archive-header { + background-color: #e8e5ce; +} + +.archive-title, +.archive-meta { + font: 300 italic 30px "Source Sans Pro", Helvetica, sans-serif; + margin: 0 auto; + max-width: 1040px; + padding: 30px 0; + width: 100%; +} + +.archive-meta { + font-size: 16px; + font-style: normal; + font-weight: normal; + margin-top: -15px; + padding: 0 0 11px; +} + +.sidebar .archive-meta { + padding-right: 316px; +} + + +/** + * 5.10 Search Results/No posts + * ---------------------------------------------------------------------------- + */ + +.page-header { + background-color: #e8e5ce; +} + +.page-title { + font: 300 italic 30px "Source Sans Pro", Helvetica, sans-serif; + margin: 0 auto; + max-width: 1040px; + padding: 30px 0; + width: 100%; +} + +.page-content { + margin: 0 auto; + max-width: 604px; + padding: 40px 0; + width: 100%; +} + +.sidebar .page-content { + margin: 0 auto; + max-width: 1040px; + padding: 40px 376px 40px 60px; +} + + +/** + * 5.11 404 + * ---------------------------------------------------------------------------- + */ + +.error404 .page-header { + background-color: #fff; +} + +.error404 .page-title { + line-height: 0.6; + margin: 0; + padding: 300px; + position: relative; + text-align: center; + width: auto; +} + +.error404 .page-title:before { + color: #e8e5ce; + content: "\f423"; + font-size: 964px; + line-height: 0.6; + overflow: hidden; + position: absolute; + left: 7px; + top: 28px; +} + +.error404 .page-wrapper { + background-color: #e8e5ce; +} + +.error404 .page-header, +.error404 .page-content { + margin: 0 auto; + max-width: 1040px; + padding-bottom: 40px; + width: 100%; +} + + +/** + * 5.12 Comments + * ---------------------------------------------------------------------------- + */ + +.comments-title, +.comment-list, +.comment-reply-title, +.must-log-in, +.comment-respond .comment-form, +.comment-respond iframe { + display: block; + margin-left: auto; + margin-right: auto; + max-width: 604px; + width: 100%; +} + +.sidebar .comments-title, +.sidebar .comment-list, +.sidebar .must-log-in, +.sidebar .comment-reply-title, +.sidebar .comment-navigation, +.sidebar .comment-respond .comment-form { + max-width: 1040px; + padding-left: 60px; + padding-right: 376px; +} + +.comments-title { + font: 300 italic 28px "Source Sans Pro", Helvetica, sans-serif; +} + +.comment-list, +.comment-list .children { + list-style-type: none; + padding: 0; +} + +.comment-list .children { + margin-left: 20px; +} + +.comment-list > li:after, +.comment-list .children > li:before { + background: url(images/dotted-line.png) repeat left top; + background-size: 4px 4px; + content: ""; + display: block; + height: 1px; + width: 100%; +} + +.comment-list > li:last-child:after { + display: none; +} + +.comment-body { + padding: 24px 0; + position: relative; +} + +.comment-author { + float: left; + max-width: 74px; +} + +.comment-author .avatar { + display: block; + margin-bottom: 10px; +} + +.comment-author .fn { + word-wrap: break-word; +} + +.comment-author .fn, +.comment-author .url, +.comment-reply-link, +.comment-reply-login { + color: #bc360a; + font-size: 14px; + font-style: normal; + font-weight: normal; +} + +.says { + display: none; +} + +.no-avatars .comment-author { + margin: 0 0 5px; + max-width: 100%; + position: relative; +} + +.no-avatars .comment-metadata, +.no-avatars .comment-content, +.no-avatars .comment-list .reply { + width: 100%; +} + +.bypostauthor > .comment-body .fn:before { + content: "\f408"; + vertical-align: text-top; +} + +.comment-list .edit-link { + margin-left: 20px; +} + +.comment-metadata, +.comment-awaiting-moderation, +.comment-content, +.comment-list .reply { + float: right; + width: 79%; + width: -webkit-calc(100% - 124px); + width: calc(100% - 124px); + word-wrap: break-word; +} + +.comment-meta, +.comment-meta a { + color: #a2a2a2; + font-size: 13px; +} + +.comment-meta a:hover { + color: #ea9629; +} + +.comment-metadata { + margin-bottom: 20px; +} + +.ping-meta { + color: #a2a2a2; + font-size: 13px; + line-height: 2; +} + +.comment-awaiting-moderation { + color: #a2a2a2; +} + +.comment-awaiting-moderation:before { + content: "\f414"; + margin-right: 5px; + position: relative; + top: -2px; +} + +.comment-reply-link:before, +.comment-reply-login:before { + content: "\f412"; + margin-right: 3px; +} + +/* Comment form */ +.comment-respond { + background-color: #f7f5e7; + padding: 30px 0; +} + +.comment .comment-respond { + margin-bottom: 20px; + padding: 20px; +} + +.comment-reply-title { + font: 300 italic 28px "Source Sans Pro", Helvetica, sans-serif; +} + +.comment-reply-title small a { + color: #131310; + display: inline-block; + float: right; + height: 16px; + overflow: hidden; + width: 16px; +} + +.comment-reply-title small a:hover { + color: #ed331c; + text-decoration: none; +} + +.comment-reply-title small a:before { + content: "\f406"; + vertical-align: top; +} + +.sidebar .comment-list .comment-reply-title, +.sidebar .comment-list .comment-respond .comment-form { + padding: 0; +} + +.comment-form .comment-notes { + margin-bottom: 15px; +} + +.comment-form .comment-form-author, +.comment-form .comment-form-email, +.comment-form .comment-form-url { + margin-bottom: 8px; +} + +.comment-form [for="author"], +.comment-form [for="email"], +.comment-form [for="url"], +.comment-form [for="comment"] { + float: left; + padding: 5px 0; + width: 120px; +} + +.comment-form .required { + color: #ed331c; +} + +.comment-form input[type="text"], +.comment-form input[type="email"], +.comment-form input[type="url"] { + max-width: 270px; + width: 60%; +} + +.comment-form textarea { + width: 100%; +} + +.form-allowed-tags, +.form-allowed-tags code { + color: #686758; + font-size: 12px; +} + +.form-allowed-tags code { + font-size: 10px; + margin-left: 3px; +} + +.comment-list .pingback, +.comment-list .trackback { + padding-top: 24px; +} + +.comment-navigation { + font-size: 20px; + font-style: italic; + font-weight: 300; + margin: 0 auto; + max-width: 604px; + padding: 20px 0 30px; + width: 100%; +} + +.no-comments { + background-color: #f7f5e7; + font-size: 20px; + font-style: italic; + font-weight: 300; + margin: 0; + padding: 40px 0; + text-align: center; +} + +.sidebar .no-comments { + padding-left: 60px; + padding-right: 376px; +} + + +/** + * 5.13 Multisite + * ---------------------------------------------------------------------------- + */ + +.site-main .mu_register { + margin: 0 auto; + max-width: 604px; + width: 100%; +} + +.mu_alert { + margin-top: 25px; +} + +.site-main .mu_register input[type="submit"], +.site-main .mu_register #blog_title, +.site-main .mu_register #user_email, +.site-main .mu_register #blogname, +.site-main .mu_register #user_name { + font-size: inherit; + width: 270px; +} + +.site-main .mu_register input[type="submit"] { + width: auto; +} + + +/** + * 6.0 Sidebar + * ---------------------------------------------------------------------------- + */ + +.site-main .widget-area { + float: right; + width: 300px; +} + + +/** + * 6.1 Widgets + * ---------------------------------------------------------------------------- + */ + +.widget { + background-color: rgba(247, 245, 231, 0.7); + font-size: 14px; + -webkit-hyphens: auto; + -moz-hyphens: auto; + -ms-hyphens: auto; + hyphens: auto; + margin: 0 0 24px; + padding: 20px; + word-wrap: break-word; +} + +.widget .widget-title { + font: 300 italic 20px "Source Sans Pro", Helvetica, sans-serif; + margin: 0 0 10px; +} + +.widget ul, +.widget ol { + list-style-type: none; + margin: 0; + padding: 0; +} + +.widget li { + padding: 5px 0; +} + +.widget .children li:last-child { + padding-bottom: 0; +} + +.widget li > ul, +.widget li > ol { + margin-left: 20px; +} + +.widget a { + color: #bc360a; +} + +.widget a:hover { + color: #ea9629; +} + +/* Search widget */ +.search-form .search-submit { + display: none; +} + +/* RSS Widget */ +.widget_rss .rss-date { + display: block; +} + +.widget_rss .rss-date, +.widget_rss li > cite { + color: #a2a2a2; +} + +/* Calendar Widget */ +.widget_calendar table, +.widget_calendar td { + border: 0; + border-collapse: separate; + border-spacing: 1px; +} + +.widget_calendar caption { + font-size: 14px; + margin: 0; +} + +.widget_calendar th, +.widget_calendar td { + padding: 0; + text-align: center; +} + +.widget_calendar a { + display: block; +} + +.widget_calendar a:hover { + background-color: rgba(0, 0, 0, 0.15); +} + +.widget_calendar tbody td { + background-color: rgba(255, 255, 255, 0.5); +} + +.site-footer .widget_calendar tbody td { + background-color: rgba(255, 255, 255, 0.05); +} + +.widget_calendar tbody .pad, .site-footer .widget_calendar tbody .pad { + background-color: transparent; +} + + +/** + * 7.0 Footer + * ---------------------------------------------------------------------------- + */ + +.site-footer { + background-color: #e8e5ce; + color: #686758; + font-size: 14px; + text-align: center; +} + +.site-footer .widget-area, +.sidebar .site-footer { + text-align: left; +} + +.site-footer a { + color: #686758; +} + +.site-footer .sidebar-container { + background-color: #220e10; + padding: 20px 0; +} + +.site-footer .widget-area { + margin: 0 auto; + max-width: 1040px; + width: 100%; +} + +.sidebar .site-footer .widget-area { + max-width: 724px; + position: relative; + left: -158px; +} + +.site-footer .widget { + background: transparent; + color: #fff; + float: left; + margin-right: 20px; + width: 245px; +} + +.sidebar .site-footer .widget { + width: 228px; +} + +.sidebar .site-footer .widget:nth-of-type(4), +.sidebar .site-footer .widget:nth-of-type(3) { + margin-right: 0; +} + +.site-footer .widget a { + color: #e6402a; +} + +.site-footer .widget-title, +.site-footer .widget-title a, +.site-footer .wp-caption-text { + color: #fff; +} + +.site-info { + margin: 0 auto; + max-width: 1040px; + padding: 30px 0; + width: 100%; +} + +#wpstats { + display: block; + margin: -10px auto 0; +} + + +/** + * 8.0 Media Queries + * ---------------------------------------------------------------------------- + */ + +/* Does the same thing as , + * but in the future W3C standard way. -ms- prefix is required for IE10+ to + * render responsive styling in Windows 8 "snapped" views; IE10+ does not honor + * the meta tag. See http://core.trac.wordpress.org/ticket/25888. + */ +@-ms-viewport { + width: device-width; +} +@viewport { + width: device-width; +} + +@media (max-width: 1599px) { + .site { + border: 0; + } +} + +@media (max-width: 1069px) { + .sidebar img.alignleft, + .sidebar .wp-caption.alignleft { + margin-left: 0; + } + + .sidebar img.alignright, + .sidebar .wp-caption.alignright { + margin-right: 0; + } + + .error404 .page-header { + margin-left: auto; + max-width: 604px; + width: 100%; + } + + .archive-header, + .search .page-header, + .archive .page-header, + .blog .page-header, + .error404 .page-content, + .search .page-content, + .archive .page-content, + .attachment .entry-header, + .attachment .entry-content, + .post-navigation .nav-links, + .sidebar .site-info, + .site-footer .widget-area { + padding-left: 20px; + padding-right: 20px; + } + + .error404 .page-title { + font-size: 24px; + padding: 180px; + } + + .error404 .page-title:before { + font-size: 554px; + } + + .attachment .image-navigation { + max-width: 724px; + } + + .image-navigation .nav-previous, + .image-navigation .nav-next { + position: static; + } + + .site-main .widget-area { + margin-right: 60px; + } +} + +@media (max-width: 999px) { + .sidebar .entry-header, + .sidebar .entry-content, + .sidebar .entry-summary, + .sidebar .entry-meta, + .sidebar .comment-list, + .sidebar .comment-reply-title, + .sidebar .comment-navigation, + .sidebar .comment-respond .comment-form, + .sidebar .featured-gallery, + .sidebar .post-navigation .nav-links, + .author.sidebar .author-info { + max-width: 604px; + padding-left: 0; + padding-right: 0; + } + + .sidebar .site-info, + .search.sidebar .page-content, + .blog.sidebar .page-content, + .attachment .entry-header, + .sidebar .comments-title { + max-width: 604px; + } + + .sidebar .archive-meta, + .attachment .entry-header, + .search.sidebar .page-content, + .blog.sidebar .page-content, + .sidebar .site-info, + .sidebar .comments-title, + .sidebar .no-comments { + padding-left: 0; + padding-right: 0; + } + + .attachment .entry-meta { + float: left; + text-align: left; + width: 100%; + } + + .attachment .entry-content { + max-width: 100%; + padding: 40px 0; + } + + .format-status .entry-content { + padding-top: 40px; + } + + .format-status .entry-meta { + padding-bottom: 40px; + } + + .sidebar .format-status .entry-content, + .sidebar .format-status .entry-meta { + padding-left: 35px; + } + + .sidebar .format-status .entry-content:before, + .sidebar .format-status .entry-meta:before { + left: 10px; + } + + .sidebar .format-status .entry-content p:first-child:before { + left: 4px; + } + + .sidebar .paging-navigation .nav-links { + padding: 0 60px; + } + + .site-main .sidebar-container { + height: auto; + margin: 0 auto; + max-width: 604px; + position: relative; + top: 20px; + } + + .site-main .widget-area { + float: none; + margin: 0; + width: 100%; + } + + .sidebar .site-footer .widget-area { + max-width: 100%; + left: 0; + } +} + +/* Collapse oversized image and pulled images after iPad breakpoint. */ +@media (max-width: 767px) { + .entry-content img.alignleft, + .entry-content .wp-caption.alignleft { + margin-left: 0; + } + + .entry-content img.alignright, + .entry-content .wp-caption.alignright { + margin-right: 0; + } + + .attachment .image-navigation, + .attachment .entry-attachment .attachment { + max-width: 604px; + padding: 0; + width: 100%; + } + + .gallery-caption { + display: none; + } +} + +@media (max-width: 643px) { + .site-title { + font-size: 30px; + } + + #content .entry-header, + #content .entry-content, + #content .entry-summary, + #content footer.entry-meta, + #content .featured-gallery, + .search.sidebar .page-content, + .blog.sidebar .page-content, + .sidebar .post-navigation .nav-links, + .paging-navigation .nav-links, + #content .author-info, + .comments-area .comments-title, + .comments-area .comment-list, + .comments-area .comment-navigation, + .comment-respond, + .sidebar .site-info, + .sidebar .paging-navigation .nav-links { + padding-left: 20px; + padding-right: 20px; + } + + #content .format-status .entry-content, + #content .format-status .entry-met { + padding-left: 35px; + } + + /* Small menu */ + .menu-toggle { + cursor: pointer; + display: inline-block; + font: bold 16px/1.3 "Source Sans Pro", Helvetica, sans-serif; + margin: 0; + padding: 12px 0 12px 20px; + } + + .menu-toggle:after { + content: "\f502"; + font-size: 12px; + padding-left: 8px; + vertical-align: -4px; + } + + .toggled-on .menu-toggle:after { + content: "\f500"; + vertical-align: 2px; + } + + .toggled-on .nav-menu, + .toggled-on .nav-menu > ul { + display: block; + margin-left: 0; + padding: 0; + width: 100%; + } + + .toggled-on li, + .toggled-on .children { + display: block; + } + + .toggled-on .nav-menu li > ul { + background-color: transparent; + display: block; + float: none; + margin-left: 20px; + position: relative; + left: auto; + top: auto; + } + + .toggled-on .nav-menu li > ul a { + color: #141412; + width: auto; + } + + .toggled-on .nav-menu li:hover > a, + .toggled-on .nav-menu .children a { + background-color: transparent; + color: #141412; + } + + .toggled-on .nav-menu li a:hover, + .toggled-on .nav-menu ul a:hover { + background-color: #db572f; + color: #fff; + } + + ul.nav-menu, + div.nav-menu > ul { + display: none; + } + + #content .featured-gallery { + padding-left: 24px; + } + + .gallery-columns-1 .gallery-item { + margin-right: 0; + width: 100%; + } + + .entry-title, + .format-chat .entry-title, + .format-image .entry-title, + .format-gallery .entry-title, + .format-video .entry-title { + font-size: 22px; + font-weight: bold; + } + + .format-quote blockquote, + .format-status .entry-content { + font-size: 18px; + } + + .format-quote blockquote small, + .format-quote blockquote cite { + font-size: 13px; + } + + .error404 .page-title { + padding: 40px 0 0; + } + + .error404 .page-title:before { + content: normal; + } + + .comment-author { + margin-right: 30px; + } + + .comment-author .avatar { + height: auto; + max-width: 100%; + } + + .comment-metadata, + .comment-content, + .comment-list .reply { + width: 70%; + width: -webkit-calc(100% - 104px); + width: calc(100% - 104px); + } + + .comment-form input[type="text"], + .comment-form input[type="email"], + .comment-form input[type="url"] { + width: -webkit-calc(100% - 120px); + width: calc(100% - 120px); + } + + .comment-form textarea { + height: 80px; /* Smaller field for mobile. */ + } + + /* Audio */ + .format-audio .entry-content:before { + display: none; + } + + .format-audio .audio-content { + background-image: none; + float: none; + padding-left: 0; + width: auto; + } +} + +/* Mobile devices */ +@media (max-width: 359px) { + .gallery { + margin-left: 0; + } + + .gallery .gallery-item, + .gallery-columns-2.gallery-size-thumbnail .gallery-item { + max-width: none; + width: 49%; + width: -webkit-calc(50% - 4px); + width: calc(50% - 4px); + } + + .gallery-columns-1.gallery-size-medium, + .gallery-columns-1.gallery-size-thumbnail, + .gallery-columns-2.gallery-size-thumbnail, + .gallery-columns-3.gallery-size-thumbnail { + display: block; + } + + .gallery-columns-1 .gallery-item, + .gallery-columns-1.gallery-size-medium .gallery-item, + .gallery-columns-1.gallery-size-thumbnail .gallery-item { + text-align: center; + width: 98%; + width: -webkit-calc(100% - 4px); + width: calc(100% - 4px); + } + + .gallery-columns-3 .gallery-item:nth-of-type(3n), + .gallery-columns-5 .gallery-item:nth-of-type(5n), + .gallery-columns-7 .gallery-item:nth-of-type(7n), + .gallery-columns-9 .gallery-item:nth-of-type(9n) { + margin-right: 4px; + } + + .gallery br { + display: none; + } + + .gallery .gallery-item:nth-of-type(even) { + margin-right: 0; + } + + /* Comments */ + .comment-author { + margin: 0 0 5px; + max-width: 100%; + } + + .comment-author .avatar { + display: inline; + margin: 0 5px 0 0; + max-width: 20px; + } + + .comment-metadata, + .comment-content, + .comment-list .reply { + width: 100%; + } +} + + +/** + * 9.0 Print + * ---------------------------------------------------------------------------- + */ + +/* Retina-specific styles. */ +@media print, + (-o-min-device-pixel-ratio: 5/4), + (-webkit-min-device-pixel-ratio: 1.25), + (min-resolution: 120dpi) { + + .site-header .search-field { + background-image: url(images/search-icon-2x.png); + } + + .format-audio .audio-content, + .format-status .entry-content:before, + .format-status .entry-meta:before, + .comment-list > li:after, + .comment-list .children > li:before { + background-image: url(images/dotted-line-2x.png); + } +} + +@media print { + body { + background: none !important; + color: #000; + font-size: 10pt; + } + + footer a[rel="bookmark"]:link:after, + footer a[rel="bookmark"]:visited:after { + content: " [" attr(href) "] "; /* Show URLs */ + } + + .site { + max-width: 98%; + } + + .site-header { + background-image: none !important; + } + + .site-header .home-link { + max-width: none; + min-height: 0; + } + + .site-title { + color: #000; + font-size: 21pt; + } + + .site-description { + font-size: 10pt; + } + + .author-avatar, + .site-footer, + .comment-respond, + .comments-area .comment-edit-link, + .comments-area .reply, + .comments-link, + .entry-meta .edit-link, + .page-links, + .site-content nav, + .widget-area, + .main-navigation, + .navbar, + .more-link { + display: none; + } + + .entry-header, + .entry-content, + .entry-summary, + .entry-meta { + margin: 0; + width: 100%; + } + + .page-title, + .entry-title { + font-size: 21pt; + } + + .entry-meta, + .entry-meta a { + color: #444; + font-size: 10pt; + } + + .entry-content img.alignleft, + .entry-content .wp-caption.alignleft { + margin-left: 0; + } + + .entry-content img.alignright, + .entry-content .wp-caption.alignright { + margin-right: 0; + } + + .format-image .entry-content .size-full { + margin: 0; + } + + /* Remove colors from post formats */ + .hentry { + background-color: #fff; + } + + /* Comments */ + .comments-area > li.comment { + background: none; + position: relative; + width: auto; + } + + .comment-metadata { + float: none; + } + + .comment-author .fn, + .comment-reply-link, + .comment-reply-login { + color: #333; + } +} \ No newline at end of file diff --git a/wp-content/themes/twentythirteen/tag.php b/wp-content/themes/twentythirteen/tag.php new file mode 100644 index 0000000..2929321 --- /dev/null +++ b/wp-content/themes/twentythirteen/tag.php @@ -0,0 +1,43 @@ + + +
            +
            + + +
            +

            + + +
            + +
            + + + + + + + + + + + + +
            +
            + + + \ No newline at end of file diff --git a/wp-content/themes/twentythirteen/taxonomy-post_format.php b/wp-content/themes/twentythirteen/taxonomy-post_format.php new file mode 100644 index 0000000..bbec046 --- /dev/null +++ b/wp-content/themes/twentythirteen/taxonomy-post_format.php @@ -0,0 +1,41 @@ + + +
            +
            + + +
            +

            ' . get_post_format_string( get_post_format() ) . '' ); ?>

            +
            + + + + + + + + + + + + +
            +
            + + + \ No newline at end of file diff --git a/wp-content/themes/twentytwelve/404.php b/wp-content/themes/twentytwelve/404.php new file mode 100644 index 0000000..db3ef81 --- /dev/null +++ b/wp-content/themes/twentytwelve/404.php @@ -0,0 +1,29 @@ + + +
            +
            + +
            +
            +

            +
            + +
            +

            + +
            +
            + +
            +
            + + \ No newline at end of file diff --git a/wp-content/themes/twentytwelve/archive.php b/wp-content/themes/twentytwelve/archive.php new file mode 100644 index 0000000..2d442bd --- /dev/null +++ b/wp-content/themes/twentytwelve/archive.php @@ -0,0 +1,63 @@ + + +
            +
            + + +
            +

            ' . get_the_date() . '' ); + elseif ( is_month() ) : + printf( __( 'Monthly Archives: %s', 'twentytwelve' ), '' . get_the_date( _x( 'F Y', 'monthly archives date format', 'twentytwelve' ) ) . '' ); + elseif ( is_year() ) : + printf( __( 'Yearly Archives: %s', 'twentytwelve' ), '' . get_the_date( _x( 'Y', 'yearly archives date format', 'twentytwelve' ) ) . '' ); + else : + _e( 'Archives', 'twentytwelve' ); + endif; + ?>

            +
            + + + + + + + +
            +
            + + + \ No newline at end of file diff --git a/wp-content/themes/twentytwelve/author.php b/wp-content/themes/twentytwelve/author.php new file mode 100644 index 0000000..6570108 --- /dev/null +++ b/wp-content/themes/twentytwelve/author.php @@ -0,0 +1,84 @@ + + +
            +
            + + + + + +
            +

            ' . get_the_author() . '' ); ?>

            +
            + + + + + + +
            +
            + +
            +
            +

            +

            +
            +
            + + + + + + + + + + + + + +
            +
            + + + \ No newline at end of file diff --git a/wp-content/themes/twentytwelve/category.php b/wp-content/themes/twentytwelve/category.php new file mode 100644 index 0000000..0376977 --- /dev/null +++ b/wp-content/themes/twentytwelve/category.php @@ -0,0 +1,51 @@ + + +
            +
            + + +
            +

            ' . single_cat_title( '', false ) . '' ); ?>

            + + +
            + +
            + + + + + + + +
            +
            + + + \ No newline at end of file diff --git a/wp-content/themes/twentytwelve/comments.php b/wp-content/themes/twentytwelve/comments.php new file mode 100644 index 0000000..d6a733e --- /dev/null +++ b/wp-content/themes/twentytwelve/comments.php @@ -0,0 +1,60 @@ + + +
            + + + + +

            + ' . get_the_title() . '' ); + ?> +

            + +
              + 'twentytwelve_comment', 'style' => 'ol' ) ); ?> +
            + + 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?> + + + + +

            + + + + + + +
            \ No newline at end of file diff --git a/wp-content/themes/twentytwelve/content-aside.php b/wp-content/themes/twentytwelve/content-aside.php new file mode 100644 index 0000000..4a84ae7 --- /dev/null +++ b/wp-content/themes/twentytwelve/content-aside.php @@ -0,0 +1,28 @@ + + +
            > +
            +

            +
            + →', 'twentytwelve' ) ); ?> +
            +
            + +
            + + + + + ', '' ); ?> +
            +
            diff --git a/wp-content/themes/twentytwelve/content-image.php b/wp-content/themes/twentytwelve/content-image.php new file mode 100644 index 0000000..a683b83 --- /dev/null +++ b/wp-content/themes/twentytwelve/content-image.php @@ -0,0 +1,28 @@ + + +
            > +
            + →', 'twentytwelve' ) ); ?> +
            + +
            + +

            +

            +
            + + + + ', '' ); ?> +
            +
            diff --git a/wp-content/themes/twentytwelve/content-link.php b/wp-content/themes/twentytwelve/content-link.php new file mode 100644 index 0000000..31e4ec9 --- /dev/null +++ b/wp-content/themes/twentytwelve/content-link.php @@ -0,0 +1,26 @@ + + +
            > +
            +
            + →', 'twentytwelve' ) ); ?> +
            + +
            + + + + + ', '' ); ?> +
            +
            diff --git a/wp-content/themes/twentytwelve/content-none.php b/wp-content/themes/twentytwelve/content-none.php new file mode 100644 index 0000000..b775782 --- /dev/null +++ b/wp-content/themes/twentytwelve/content-none.php @@ -0,0 +1,20 @@ + + +
            +
            +

            +
            + +
            +

            + +
            +
            diff --git a/wp-content/themes/twentytwelve/content-page.php b/wp-content/themes/twentytwelve/content-page.php new file mode 100644 index 0000000..0abcbf7 --- /dev/null +++ b/wp-content/themes/twentytwelve/content-page.php @@ -0,0 +1,26 @@ + + +
            > +
            + + + +

            +
            + +
            + + '' ) ); ?> +
            +
            + ', '' ); ?> +
            +
            diff --git a/wp-content/themes/twentytwelve/content-quote.php b/wp-content/themes/twentytwelve/content-quote.php new file mode 100644 index 0000000..0a98a96 --- /dev/null +++ b/wp-content/themes/twentytwelve/content-quote.php @@ -0,0 +1,25 @@ + + +
            > +
            + →', 'twentytwelve' ) ); ?> +
            + +
            + + + + + ', '' ); ?> +
            +
            diff --git a/wp-content/themes/twentytwelve/content-status.php b/wp-content/themes/twentytwelve/content-status.php new file mode 100644 index 0000000..55b72db --- /dev/null +++ b/wp-content/themes/twentytwelve/content-status.php @@ -0,0 +1,42 @@ + + +
            > +
            +
            +

            +

            +
            + +
            + +
            + →', 'twentytwelve' ) ); ?> +
            + +
            + + + + ', '' ); ?> +
            +
            diff --git a/wp-content/themes/twentytwelve/content.php b/wp-content/themes/twentytwelve/content.php new file mode 100644 index 0000000..56493ed --- /dev/null +++ b/wp-content/themes/twentytwelve/content.php @@ -0,0 +1,73 @@ + + +
            > + +
            + +
            + +
            + + + +

            + +

            + +

            + + + + +
            + + +
            + +
            + +
            + →', 'twentytwelve' ) ); ?> + '' ) ); ?> +
            + + + +
            diff --git a/wp-content/themes/twentytwelve/css/ie.css b/wp-content/themes/twentytwelve/css/ie.css new file mode 100644 index 0000000..4d4f542 --- /dev/null +++ b/wp-content/themes/twentytwelve/css/ie.css @@ -0,0 +1,258 @@ +/* +Styles for older IE versions (previous to IE9). +*/ + +body { + background-color: #e6e6e6; +} +body.custom-background-empty { + background-color: #fff; +} +body.custom-background-empty .site, +body.custom-background-white .site { + box-shadow: none; + margin-bottom: 0; + margin-top: 0; + padding: 0; +} +.assistive-text, +.site .screen-reader-text { + clip: rect(1px 1px 1px 1px); /* IE7 */ +} +.full-width .site-content { + float: none; + width: 100%; +} +img.size-full, +img.size-large, +img.header-image, +img.wp-post-image, +img[class*="align"], +img[class*="wp-image-"], +img[class*="attachment-"] { + width: auto; /* Prevent stretching of full-size and large-size images with height and width attributes in IE8 */ +} +.author-avatar { + float: left; + margin-top: 8px; + margin-top: 0.571428571rem; +} +.author-description { + float: right; + width: 80%; +} +.site { + box-shadow: 0 2px 6px rgba(100, 100, 100, 0.3); + margin: 48px auto; + max-width: 960px; + overflow: hidden; + padding: 0 40px; +} +.site-content { + float: left; + width: 65.104166667%; +} +body.template-front-page .site-content, +body.attachment .site-content, +body.full-width .site-content { + width: 100%; +} +.widget-area { + float: right; + width: 26.041666667%; +} +.site-header h1, +.site-header h2 { + text-align: left; +} +.site-header h1 { + font-size: 26px; + line-height: 1.846153846; +} +.main-navigation ul.nav-menu, +.main-navigation div.nav-menu > ul { + border-bottom: 1px solid #ededed; + border-top: 1px solid #ededed; + display: inline-block !important; + text-align: left; + width: 100%; +} +.main-navigation ul { + margin: 0; + text-indent: 0; +} +.main-navigation li a, +.main-navigation li { + display: inline-block; + text-decoration: none; +} +.ie7 .main-navigation li a, +.ie7 .main-navigation li { + display: inline; +} +.main-navigation li a { + border-bottom: 0; + color: #6a6a6a; + line-height: 3.692307692; + text-transform: uppercase; +} +.main-navigation li a:hover { + color: #000; +} +.main-navigation li { + margin: 0 40px 0 0; + position: relative; +} +.main-navigation li ul { + margin: 0; + padding: 0; + position: absolute; + top: 100%; + z-index: 1; + height: 1px; + width: 1px; + overflow: hidden; + clip: rect(1px, 1px, 1px, 1px); +} +.ie7 .main-navigation li ul { + clip: inherit; + display: none; + left: 0; + overflow: visible; +} +.main-navigation li ul ul, +.ie7 .main-navigation li ul ul { + top: 0; + left: 100%; +} +.main-navigation ul li:hover > ul, +.main-navigation ul li:focus > ul, +.main-navigation .focus > ul { + border-left: 0; + clip: inherit; + overflow: inherit; + height: inherit; + width: inherit; +} +.ie7 .main-navigation ul li:hover > ul, +.ie7 .main-navigation ul li:focus > ul { + display: block; +} +.main-navigation li ul li a { + background: #efefef; + border-bottom: 1px solid #ededed; + display: block; + font-size: 11px; + line-height: 2.181818182; + padding: 8px 10px; + width: 180px; +} +.main-navigation li ul li a:hover { + background: #e3e3e3; + color: #444; +} +.main-navigation .current-menu-item > a, +.main-navigation .current-menu-ancestor > a, +.main-navigation .current_page_item > a, +.main-navigation .current_page_ancestor > a { + color: #636363; + font-weight: bold; +} +.menu-toggle { + display: none; +} +.entry-header .entry-title { + font-size: 22px; +} +#respond form input[type="text"] { + width: 46.333333333%; +} +#respond form textarea.blog-textarea { + width: 79.666666667%; +} +.template-front-page .site-content, +.template-front-page article { + overflow: hidden; +} +.template-front-page.has-post-thumbnail article { + float: left; + width: 47.916666667%; +} +.entry-page-image { + float: right; + margin-bottom: 0; + width: 47.916666667%; +} +.template-front-page .widget-area .widget, +.template-front-page.two-sidebars .widget-area .front-widgets { + float: left; + margin-bottom: 24px; + width: 51.875%; +} +.template-front-page .widget-area .widget:nth-child(odd) { + clear: right; +} +.template-front-page .widget-area .widget:nth-child(even), +.template-front-page.two-sidebars .widget-area .front-widgets + .front-widgets { + float: right; + margin: 0 0 24px; + width: 39.0625%; +} +.template-front-page.two-sidebars .widget, +.template-front-page.two-sidebars .widget:nth-child(even) { + float: none; + width: auto; +} + +/* =RTL overrides for IE7 and IE8 +-------------------------------------------------------------- */ +.rtl .site-header h1, +.rtl .site-header h2 { + text-align: right; +} +.rtl .widget-area, +.rtl .author-description { + float: left; +} +.rtl .author-avatar, +.rtl .site-content { + float: right; +} +.rtl .main-navigation ul.nav-menu, +.rtl .main-navigation div.nav-menu > ul { + text-align: right; +} +.rtl .main-navigation ul li ul li, +.rtl .main-navigation ul li ul li ul li { + margin-left: 40px; + margin-right: auto; +} +.rtl .main-navigation li ul ul { + position: absolute; + bottom: 0; + right: 100%; + z-index: 1; +} +.ie7 .rtl .main-navigation li ul ul { + position: absolute; + bottom: 0; + right: 100%; + z-index: 1; +} +.ie7 .rtl .main-navigation ul li { + z-index: 99; +} +.ie7 .rtl .main-navigation li ul { + position: absolute; + bottom: 100%; + right: 0; + z-index: 1; +} +.ie7 .rtl .main-navigation li { + margin-right: auto; + margin-left: 40px; +} +.ie7 .rtl .main-navigation li ul ul ul { + position: relative; + z-index: 1; +} \ No newline at end of file diff --git a/wp-content/themes/twentytwelve/editor-style-rtl.css b/wp-content/themes/twentytwelve/editor-style-rtl.css new file mode 100644 index 0000000..5fd832c --- /dev/null +++ b/wp-content/themes/twentytwelve/editor-style-rtl.css @@ -0,0 +1,28 @@ +/* +Theme Name: Twenty Twelve +Description: Used to style the TinyMCE editor for RTL languages. +See also rtl.css file. +*/ + +html .mceContentBody { + direction: rtl; + unicode-bidi: embed; +} +li { + margin: 0 24px 0 0; + margin: 0 1.714285714rem 0 0; +} +dl { + margin: 0 24px; + margin: 0 1.714285714rem; +} +tr th { + text-align: right; +} +td { + padding: 6px 0 6px 10px; + text-align: right; +} +.wp-caption { + text-align: right; +} \ No newline at end of file diff --git a/wp-content/themes/twentytwelve/editor-style.css b/wp-content/themes/twentytwelve/editor-style.css new file mode 100644 index 0000000..24e9b24 --- /dev/null +++ b/wp-content/themes/twentytwelve/editor-style.css @@ -0,0 +1,342 @@ +/* +Theme Name: Twenty Twelve +Description: Used to style the TinyMCE editor. +*/ + +html { + font-size: 87.5%; +} +html .mceContentBody { + max-width: 625px; +} +body { + color: #444; + font-family: "Open Sans", Helvetica, Arial, sans-serif; + font-size: 14px; + font-size: 1rem; + line-height: 1; + text-rendering: optimizeLegibility; + vertical-align: baseline; +} + + +/* =Headings +-------------------------------------------------------------- */ + +h1, +h2, +h3, +h4, +h5, +h6 { + clear: both; + line-height: 1.846153846; + margin: 24px 0; + margin: 1.714285714rem 0; +} +h1 { + font-size: 21px; + font-size: 1.5rem; + line-height: 1.5; +} +h2 { + font-size: 18px; + font-size: 1.285714286rem; + line-height: 1.6; +} +h3 { + font-size: 16px; + font-size: 1.142857143rem; +} +h4 { + font-size: 14px; + font-size: 1rem; +} +h5 { + font-size: 13px; + font-size: 0.928571429rem; +} +h6 { + font-size: 12px; + font-size: 0.857142857rem; +} +hr { + background-color: #ccc; + border: 0; + height: 1px; + margin: 24px; + margin-bottom: 1.714285714rem; +} + + +/* =Text elements +-------------------------------------------------------------- */ + +p { + line-height: 1.714285714; + margin: 0 0 24px; + margin: 0 0 1.714285714rem; +} +ul, +ol { + margin: 0 0 24px; + margin: 0 0 1.714285714rem; + line-height: 1.714285714; + padding: 0; +} +ul { + list-style: disc outside; +} +ol { + list-style: decimal outside; +} +ul ul, +ol ol, +ul ol, +ol ul { + margin-bottom: 0; +} +li { + margin: 0 0 0 24px; + margin: 0 0 0 1.714285714rem; +} +dl { + margin: 0 24px; + margin: 0 1.714285714rem; +} +dt { + font-weight: bold; + margin-bottom: 24px; + margin-bottom: 1.714285714rem; +} +dd { + line-height: 1.714285714; + margin: 0 0 24px; + margin: 0 0 1.714285714rem; +} +strong { + font-weight: bold; +} +cite, +em, +i { + font-style: italic; +} +cite { + border: none; +} +big { + font-size: 128.571429%; +} +.mceContentBody blockquote { + font-style: italic !important; + font-weight: normal; + margin: 0; + padding: 24px; + padding: 1.714285714rem; +} +pre { + border: 1px solid #ededed; + color: #666; + font-family: Consolas, Monaco, Lucida Console, monospace; + font-size: 12px; + font-size: 0.857142857rem; + line-height: 1.714285714; + margin: 24px 0; + margin: 1.714285714rem 0; + overflow: auto; + padding: 24px; + padding: 1.714285714rem; +} +code, +kbd, +samp, +var { + font-family: Consolas, Monaco, Lucida Console, monospace; + font-size: 12px; + font-size: 0.857142857rem; + line-height: 2; +} +abbr, +acronym, +dfn { + border-bottom: 1px dotted #666; + cursor: help; +} +address { + display: block; + line-height: 1.714285714; + margin: 0 0 24px; + margin: 0 0 1.714285714rem; +} +del { + color: #333; +} +ins { + background: #fff9c0; + border: none; + color: #333; + text-decoration: none; +} +sup, +sub { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} +sup { + top: -0.5em; +} +sub { + bottom: -0.25em; +} +input[type="text"] { + border: 1px solid #ccc; + border-radius: 3px; + font-family: inherit; + padding: 6px; + padding: 0.428571429rem; +} +textarea { + border: 1px solid #d5d2ca; + border-radius: 3px; + font-family: inherit; + font-size: 12px; + font-size: 0.857142857rem; + line-height: 1.714285714; + padding: 10px; + padding: 0.714285714rem; + width: 96%; +} + + +/* =Links +-------------------------------------------------------------- */ + +a, +a em, +a strong { + color: #21759b; + outline: none; +} +a:focus, +a:active, +a:hover { + color: #0f3647; +} + + +/* =Alignment +-------------------------------------------------------------- */ + +.alignleft { + display: inline; + float: left; + margin: 12px 24px 12px 0; + margin: 0.857142857rem 1.714285714rem 0.857142857rem 0; +} +.alignright { + display: inline; + float: right; + margin: 12px 0 12px 24px; + margin: 0.857142857rem 0 0.857142857rem 1.714285714rem; +} +.aligncenter { + clear: both; + display: block; + margin-top: 12px; + margin-top: 0.857142857rem; + margin-bottom: 12px; + margin-bottom: 0.857142857rem; +} + + +/* =Tables +-------------------------------------------------------------- */ + +table { + border-bottom: 1px solid #ededed; + border-collapse: collapse; + border-spacing: 0; + color: #757575; + font-size: 12px; + font-size: 0.857142857rem; + line-height: 2; + margin: 0 0 24px; + margin: 0 0 1.714285714rem; + width: 100%; +} +tr th { + color: #636363; + font-size: 11px; + font-size: 0.785714286rem; + font-weight: bold; + line-height: 2.181818182; + text-align: left; + text-transform: uppercase; +} +td { + border-top: 1px solid #ededed !important; + color: #757575; + font-size: inherit; + font-weight: normal; + padding: 6px 10px 6px 0; + text-align: left; +} + + +/* =Images +-------------------------------------------------------------- */ + +img, +.editor-attachment { + border: 0; + border-radius: 3px; + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); + max-width: 100%; +} +img.size-full { + width: auto/9; /* Prevent stretching of full-size images in IE8 */ +} +img[class*="wp-image-"] { + height: auto; + max-width: 100%; +} +img[class*="align"], +img[class*="wp-image-"], +img[class*="attachment-"] { + height: auto; /* Make sure images with WordPress-added height and width attributes are scaled correctly */ +} +img.mce-wp-nextpage { + border-radius: 0; + box-shadow: none; +} +img.wp-smiley { + border: 0; + border-radius: 0; + box-shadow: none; + margin-bottom: 0; + margin-top: 0; + padding: 0; +} +.wp-caption { + background: transparent; + border: none; + margin: 0; + padding: 4px; + text-align: left; +} +.wp-caption-dt { + margin: 0; +} +.wp-caption .wp-caption-text, +.wp-caption-dd { + color: #757575; + font-style: italic; + font-size: 12px; + font-size: 0.857142857rem; + line-height: 2; + margin: 0 0 24px; + margin: 0 0 1.71429rem; +} diff --git a/wp-content/themes/twentytwelve/footer.php b/wp-content/themes/twentytwelve/footer.php new file mode 100644 index 0000000..79848d3 --- /dev/null +++ b/wp-content/themes/twentytwelve/footer.php @@ -0,0 +1,23 @@ + +
            +
            +
            + + +
            +
            +
            + + + + \ No newline at end of file diff --git a/wp-content/themes/twentytwelve/functions.php b/wp-content/themes/twentytwelve/functions.php new file mode 100644 index 0000000..c4055ba --- /dev/null +++ b/wp-content/themes/twentytwelve/functions.php @@ -0,0 +1,499 @@ + for posts and comments. + add_theme_support( 'automatic-feed-links' ); + + // This theme supports a variety of post formats. + add_theme_support( 'post-formats', array( 'aside', 'image', 'link', 'quote', 'status' ) ); + + // This theme uses wp_nav_menu() in one location. + register_nav_menu( 'primary', __( 'Primary Menu', 'twentytwelve' ) ); + + /* + * This theme supports custom background color and image, + * and here we also set up the default background color. + */ + add_theme_support( 'custom-background', array( + 'default-color' => 'e6e6e6', + ) ); + + // This theme uses a custom image size for featured images, displayed on "standard" posts. + add_theme_support( 'post-thumbnails' ); + set_post_thumbnail_size( 624, 9999 ); // Unlimited height, soft crop +} +add_action( 'after_setup_theme', 'twentytwelve_setup' ); + +/** + * Add support for a custom header image. + */ +require( get_template_directory() . '/inc/custom-header.php' ); + +/** + * Return the Google font stylesheet URL if available. + * + * The use of Open Sans by default is localized. For languages that use + * characters not supported by the font, the font can be disabled. + * + * @since Twenty Twelve 1.2 + * + * @return string Font stylesheet or empty string if disabled. + */ +function twentytwelve_get_font_url() { + $font_url = ''; + + /* translators: If there are characters in your language that are not supported + * by Open Sans, translate this to 'off'. Do not translate into your own language. + */ + if ( 'off' !== _x( 'on', 'Open Sans font: on or off', 'twentytwelve' ) ) { + $subsets = 'latin,latin-ext'; + + /* translators: To add an additional Open Sans character subset specific to your language, + * translate this to 'greek', 'cyrillic' or 'vietnamese'. Do not translate into your own language. + */ + $subset = _x( 'no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)', 'twentytwelve' ); + + if ( 'cyrillic' == $subset ) + $subsets .= ',cyrillic,cyrillic-ext'; + elseif ( 'greek' == $subset ) + $subsets .= ',greek,greek-ext'; + elseif ( 'vietnamese' == $subset ) + $subsets .= ',vietnamese'; + + $protocol = is_ssl() ? 'https' : 'http'; + $query_args = array( + 'family' => 'Open+Sans:400italic,700italic,400,700', + 'subset' => $subsets, + ); + $font_url = add_query_arg( $query_args, "$protocol://fonts.googleapis.com/css" ); + } + + return $font_url; +} + +/** + * Enqueue scripts and styles for front-end. + * + * @since Twenty Twelve 1.0 + */ +function twentytwelve_scripts_styles() { + global $wp_styles; + + /* + * Adds JavaScript to pages with the comment form to support + * sites with threaded comments (when in use). + */ + if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) + wp_enqueue_script( 'comment-reply' ); + + // Adds JavaScript for handling the navigation menu hide-and-show behavior. + wp_enqueue_script( 'twentytwelve-navigation', get_template_directory_uri() . '/js/navigation.js', array( 'jquery' ), '20140318', true ); + + $font_url = twentytwelve_get_font_url(); + if ( ! empty( $font_url ) ) + wp_enqueue_style( 'twentytwelve-fonts', esc_url_raw( $font_url ), array(), null ); + + // Loads our main stylesheet. + wp_enqueue_style( 'twentytwelve-style', get_stylesheet_uri() ); + + // Loads the Internet Explorer specific stylesheet. + wp_enqueue_style( 'twentytwelve-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentytwelve-style' ), '20121010' ); + $wp_styles->add_data( 'twentytwelve-ie', 'conditional', 'lt IE 9' ); +} +add_action( 'wp_enqueue_scripts', 'twentytwelve_scripts_styles' ); + +/** + * Filter TinyMCE CSS path to include Google Fonts. + * + * Adds additional stylesheets to the TinyMCE editor if needed. + * + * @uses twentytwelve_get_font_url() To get the Google Font stylesheet URL. + * + * @since Twenty Twelve 1.2 + * + * @param string $mce_css CSS path to load in TinyMCE. + * @return string Filtered CSS path. + */ +function twentytwelve_mce_css( $mce_css ) { + $font_url = twentytwelve_get_font_url(); + + if ( empty( $font_url ) ) + return $mce_css; + + if ( ! empty( $mce_css ) ) + $mce_css .= ','; + + $mce_css .= esc_url_raw( str_replace( ',', '%2C', $font_url ) ); + + return $mce_css; +} +add_filter( 'mce_css', 'twentytwelve_mce_css' ); + +/** + * Filter the page title. + * + * Creates a nicely formatted and more specific title element text + * for output in head of document, based on current view. + * + * @since Twenty Twelve 1.0 + * + * @param string $title Default title text for current view. + * @param string $sep Optional separator. + * @return string Filtered title. + */ +function twentytwelve_wp_title( $title, $sep ) { + global $paged, $page; + + if ( is_feed() ) + return $title; + + // Add the site name. + $title .= get_bloginfo( 'name', 'display' ); + + // Add the site description for the home/front page. + $site_description = get_bloginfo( 'description', 'display' ); + if ( $site_description && ( is_home() || is_front_page() ) ) + $title = "$title $sep $site_description"; + + // Add a page number if necessary. + if ( $paged >= 2 || $page >= 2 ) + $title = "$title $sep " . sprintf( __( 'Page %s', 'twentytwelve' ), max( $paged, $page ) ); + + return $title; +} +add_filter( 'wp_title', 'twentytwelve_wp_title', 10, 2 ); + +/** + * Filter the page menu arguments. + * + * Makes our wp_nav_menu() fallback -- wp_page_menu() -- show a home link. + * + * @since Twenty Twelve 1.0 + */ +function twentytwelve_page_menu_args( $args ) { + if ( ! isset( $args['show_home'] ) ) + $args['show_home'] = true; + return $args; +} +add_filter( 'wp_page_menu_args', 'twentytwelve_page_menu_args' ); + +/** + * Register sidebars. + * + * Registers our main widget area and the front page widget areas. + * + * @since Twenty Twelve 1.0 + */ +function twentytwelve_widgets_init() { + register_sidebar( array( + 'name' => __( 'Main Sidebar', 'twentytwelve' ), + 'id' => 'sidebar-1', + 'description' => __( 'Appears on posts and pages except the optional Front Page template, which has its own widgets', 'twentytwelve' ), + 'before_widget' => '', + 'before_title' => '

            ', + 'after_title' => '

            ', + ) ); + + register_sidebar( array( + 'name' => __( 'First Front Page Widget Area', 'twentytwelve' ), + 'id' => 'sidebar-2', + 'description' => __( 'Appears when using the optional Front Page template with a page set as Static Front Page', 'twentytwelve' ), + 'before_widget' => '', + 'before_title' => '

            ', + 'after_title' => '

            ', + ) ); + + register_sidebar( array( + 'name' => __( 'Second Front Page Widget Area', 'twentytwelve' ), + 'id' => 'sidebar-3', + 'description' => __( 'Appears when using the optional Front Page template with a page set as Static Front Page', 'twentytwelve' ), + 'before_widget' => '', + 'before_title' => '

            ', + 'after_title' => '

            ', + ) ); +} +add_action( 'widgets_init', 'twentytwelve_widgets_init' ); + +if ( ! function_exists( 'twentytwelve_content_nav' ) ) : +/** + * Displays navigation to next/previous pages when applicable. + * + * @since Twenty Twelve 1.0 + */ +function twentytwelve_content_nav( $html_id ) { + global $wp_query; + + $html_id = esc_attr( $html_id ); + + if ( $wp_query->max_num_pages > 1 ) : ?> + + comment_type ) : + case 'pingback' : + case 'trackback' : + // Display trackbacks differently than normal comments. + ?> +
          5. id="comment-"> +

            ', '' ); ?>

            + +
          6. id="li-comment-"> +
            +
            + %1$s %2$s', + get_comment_author_link(), + // If current post author is also comment author, make it known visually. + ( $comment->user_id === $post->post_author ) ? '' . __( 'Post author', 'twentytwelve' ) . '' : '' + ); + printf( '', + esc_url( get_comment_link( $comment->comment_ID ) ), + get_comment_time( 'c' ), + /* translators: 1: date, 2: time */ + sprintf( __( '%1$s at %2$s', 'twentytwelve' ), get_comment_date(), get_comment_time() ) + ); + ?> +
            + + comment_approved ) : ?> +

            + + +
            + + ', '

            ' ); ?> +
            + +
            + __( 'Reply', 'twentytwelve' ), 'after' => ' ', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?> +
            +
            + ', + esc_url( get_permalink() ), + esc_attr( get_the_time() ), + esc_attr( get_the_date( 'c' ) ), + esc_html( get_the_date() ) + ); + + $author = sprintf( '', + esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), + esc_attr( sprintf( __( 'View all posts by %s', 'twentytwelve' ), get_the_author() ) ), + get_the_author() + ); + + // Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name. + if ( $tag_list ) { + $utility_text = __( 'This entry was posted in %1$s and tagged %2$s on %3$s by %4$s.', 'twentytwelve' ); + } elseif ( $categories_list ) { + $utility_text = __( 'This entry was posted in %1$s on %3$s by %4$s.', 'twentytwelve' ); + } else { + $utility_text = __( 'This entry was posted on %3$s by %4$s.', 'twentytwelve' ); + } + + printf( + $utility_text, + $categories_list, + $tag_list, + $date, + $author + ); +} +endif; + +/** + * Extend the default WordPress body classes. + * + * Extends the default WordPress body class to denote: + * 1. Using a full-width layout, when no active widgets in the sidebar + * or full-width template. + * 2. Front Page template: thumbnail in use and number of sidebars for + * widget areas. + * 3. White or empty background color to change the layout and spacing. + * 4. Custom fonts enabled. + * 5. Single or multiple authors. + * + * @since Twenty Twelve 1.0 + * + * @param array $classes Existing class values. + * @return array Filtered class values. + */ +function twentytwelve_body_class( $classes ) { + $background_color = get_background_color(); + $background_image = get_background_image(); + + if ( ! is_active_sidebar( 'sidebar-1' ) || is_page_template( 'page-templates/full-width.php' ) ) + $classes[] = 'full-width'; + + if ( is_page_template( 'page-templates/front-page.php' ) ) { + $classes[] = 'template-front-page'; + if ( has_post_thumbnail() ) + $classes[] = 'has-post-thumbnail'; + if ( is_active_sidebar( 'sidebar-2' ) && is_active_sidebar( 'sidebar-3' ) ) + $classes[] = 'two-sidebars'; + } + + if ( empty( $background_image ) ) { + if ( empty( $background_color ) ) + $classes[] = 'custom-background-empty'; + elseif ( in_array( $background_color, array( 'fff', 'ffffff' ) ) ) + $classes[] = 'custom-background-white'; + } + + // Enable custom font class only if the font CSS is queued to load. + if ( wp_style_is( 'twentytwelve-fonts', 'queue' ) ) + $classes[] = 'custom-font-enabled'; + + if ( ! is_multi_author() ) + $classes[] = 'single-author'; + + return $classes; +} +add_filter( 'body_class', 'twentytwelve_body_class' ); + +/** + * Adjust content width in certain contexts. + * + * Adjusts content_width value for full-width and single image attachment + * templates, and when there are no active widgets in the sidebar. + * + * @since Twenty Twelve 1.0 + */ +function twentytwelve_content_width() { + if ( is_page_template( 'page-templates/full-width.php' ) || is_attachment() || ! is_active_sidebar( 'sidebar-1' ) ) { + global $content_width; + $content_width = 960; + } +} +add_action( 'template_redirect', 'twentytwelve_content_width' ); + +/** + * Register postMessage support. + * + * Add postMessage support for site title and description for the Customizer. + * + * @since Twenty Twelve 1.0 + * + * @param WP_Customize_Manager $wp_customize Customizer object. + */ +function twentytwelve_customize_register( $wp_customize ) { + $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; + $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; + $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; +} +add_action( 'customize_register', 'twentytwelve_customize_register' ); + +/** + * Enqueue Javascript postMessage handlers for the Customizer. + * + * Binds JS handlers to make the Customizer preview reload changes asynchronously. + * + * @since Twenty Twelve 1.0 + */ +function twentytwelve_customize_preview_js() { + wp_enqueue_script( 'twentytwelve-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20130301', true ); +} +add_action( 'customize_preview_init', 'twentytwelve_customize_preview_js' ); diff --git a/wp-content/themes/twentytwelve/header.php b/wp-content/themes/twentytwelve/header.php new file mode 100644 index 0000000..eb64b68 --- /dev/null +++ b/wp-content/themes/twentytwelve/header.php @@ -0,0 +1,53 @@ + section and everything up till
            + * + * @package WordPress + * @subpackage Twenty_Twelve + * @since Twenty Twelve 1.0 + */ +?> + + + +> + + + + +<?php wp_title( '|', true, 'right' ); ?> + + + + + + + +> +
            + + +
            \ No newline at end of file diff --git a/wp-content/themes/twentytwelve/image.php b/wp-content/themes/twentytwelve/image.php new file mode 100644 index 0000000..285e453 --- /dev/null +++ b/wp-content/themes/twentytwelve/image.php @@ -0,0 +1,116 @@ + + +
            +
            + + + +
            > +
            +

            + +
            + Published at %4$s × %5$s in %8$s.', 'twentytwelve' ), + esc_attr( get_the_date( 'c' ) ), + esc_html( get_the_date() ), + esc_url( wp_get_attachment_url() ), + $metadata['width'], + $metadata['height'], + esc_url( get_permalink( $post->post_parent ) ), + esc_attr( strip_tags( get_the_title( $post->post_parent ) ) ), + get_the_title( $post->post_parent ) + ); + ?> + ', '' ); ?> +
            + + +
            + +
            + +
            +
            + $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); +foreach ( $attachments as $k => $attachment ) : + if ( $attachment->ID == $post->ID ) + break; +endforeach; + +$k++; +// If there is more than 1 attachment in a gallery +if ( count( $attachments ) > 1 ) : + if ( isset( $attachments[ $k ] ) ) : + // get the URL of the next image attachment + $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); + else : + // or get the URL of the first image attachment + $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID ); + endif; +else : + // or, if there's only 1 image, get the URL of the image + $next_attachment_url = wp_get_attachment_url(); +endif; +?> + ID, $attachment_size ); + ?> + + post_excerpt ) ) : ?> +
            + +
            + +
            + +
            + +
            + + '' ) ); ?> +
            + +
            + +
            + + + + + +
            +
            + + \ No newline at end of file diff --git a/wp-content/themes/twentytwelve/inc/custom-header.php b/wp-content/themes/twentytwelve/inc/custom-header.php new file mode 100644 index 0000000..1657eff --- /dev/null +++ b/wp-content/themes/twentytwelve/inc/custom-header.php @@ -0,0 +1,165 @@ + '515151', + 'default-image' => '', + + // Set height and width, with a maximum value for the width. + 'height' => 250, + 'width' => 960, + 'max-width' => 2000, + + // Support flexible height and width. + 'flex-height' => true, + 'flex-width' => true, + + // Random image rotation off by default. + 'random-default' => false, + + // Callbacks for styling the header and the admin preview. + 'wp-head-callback' => 'twentytwelve_header_style', + 'admin-head-callback' => 'twentytwelve_admin_header_style', + 'admin-preview-callback' => 'twentytwelve_admin_header_image', + ); + + add_theme_support( 'custom-header', $args ); +} +add_action( 'after_setup_theme', 'twentytwelve_custom_header_setup' ); + +/** + * Load our special font CSS file. + * + * @since Twenty Twelve 1.2 + */ +function twentytwelve_custom_header_fonts() { + $font_url = twentytwelve_get_font_url(); + if ( ! empty( $font_url ) ) + wp_enqueue_style( 'twentytwelve-fonts', esc_url_raw( $font_url ), array(), null ); +} +add_action( 'admin_print_styles-appearance_page_custom-header', 'twentytwelve_custom_header_fonts' ); + +/** + * Style the header text displayed on the blog. + * + * get_header_textcolor() options: 515151 is default, hide text (returns 'blank'), or any hex value. + * + * @since Twenty Twelve 1.0 + */ +function twentytwelve_header_style() { + $text_color = get_header_textcolor(); + + // If no custom options for text are set, let's bail + if ( $text_color == get_theme_support( 'custom-header', 'default-text-color' ) ) + return; + + // If we get this far, we have custom styles. + ?> + + Header admin panel. + * + * @since Twenty Twelve 1.0 + */ +function twentytwelve_admin_header_style() { +?> + + Header admin panel. + * + * This callback overrides the default markup displayed there. + * + * @since Twenty Twelve 1.0 + */ +function twentytwelve_admin_header_image() { + ?> + + + +
            +
            + + + + + + + + + + + +
            + + +
            +

            +
            + +
            +

            Get started here.', 'twentytwelve' ), admin_url( 'post-new.php' ) ); ?>

            +
            + + +
            +

            +
            + +
            +

            + +
            + + +
            + + + +
            +
            + + + \ No newline at end of file diff --git a/wp-content/themes/twentytwelve/js/html5.js b/wp-content/themes/twentytwelve/js/html5.js new file mode 100644 index 0000000..6168aac --- /dev/null +++ b/wp-content/themes/twentytwelve/js/html5.js @@ -0,0 +1,8 @@ +/* + HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag(); +a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x"; +c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| +"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f); +if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d
            \n"; + else + $output .= "
          7. \n"; + } + + /** + * Output a pingback comment. + * + * @access protected + * @since 3.6.0 + * + * @see wp_list_comments() + * + * @param object $comment The comment object. + * @param int $depth Depth of comment. + * @param array $args An array of arguments. + */ + protected function ping( $comment, $depth, $args ) { + $tag = ( 'div' == $args['style'] ) ? 'div' : 'li'; +?> + < id="comment-" > +
            + ', '' ); ?> +
            + + < id="comment-"> + +
            + +
            + + %s says:' ), get_comment_author_link() ); ?> +
            + comment_approved ) : ?> + +
            + + + + + $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?> + +
            + $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?> +
            + +
            + + + < id="comment-" > +
            +
            +
            + + says:' ), sprintf( '%s', get_comment_author_link() ) ); ?> +
            + + + + comment_approved ) : ?> +

            + +
            + +
            + +
            + +
            + 'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?> +
            +
            +comments + * + * @param string|array $args { + * Optional. Formatting options. + * + * @type string $walker The Walker class used to list comments. Default null. + * @type int $max_depth The maximum comments depth. Default empty. + * @type string $style The style of list ordering. Default 'ul'. Accepts 'ul', 'ol'. + * @type string $callback Callback function to use. Default null. + * @type string $end-callback Callback function to use at the end. Default null. + * @type string $type Type of comments to list. + * Default 'all'. Accepts 'all', 'comment', 'pingback', 'trackback', 'pings'. + * @type int $page Page ID to list comments for. Default empty. + * @type int $per_page Number of comments to list per page. Default empty. + * @type int $avatar_size Height and width dimensions of the avatar size. Default 32. + * @type string $reverse_top_level Ordering of the listed comments. Default null. Accepts 'desc', 'asc'. + * @type bool $reverse_children Whether to reverse child comments in the list. Default null. + * @type string $format How to format the comments list. + * Default 'html5' if the theme supports it. Accepts 'html5', 'xhtml'. + * @type bool $short_ping Whether to output short pings. Default false. + * @type bool $echo Whether to echo the output or return it. Default true. + * } + * @param array $comments Optional. Array of comment objects. + */ +function wp_list_comments( $args = array(), $comments = null ) { + global $wp_query, $comment_alt, $comment_depth, $comment_thread_alt, $overridden_cpage, $in_comment_loop; + + $in_comment_loop = true; + + $comment_alt = $comment_thread_alt = 0; + $comment_depth = 1; + + $defaults = array( + 'walker' => null, + 'max_depth' => '', + 'style' => 'ul', + 'callback' => null, + 'end-callback' => null, + 'type' => 'all', + 'page' => '', + 'per_page' => '', + 'avatar_size' => 32, + 'reverse_top_level' => null, + 'reverse_children' => '', + 'format' => current_theme_supports( 'html5', 'comment-list' ) ? 'html5' : 'xhtml', + 'short_ping' => false, + 'echo' => true, + ); + + $r = wp_parse_args( $args, $defaults ); + + // Figure out what comments we'll be looping through ($_comments) + if ( null !== $comments ) { + $comments = (array) $comments; + if ( empty($comments) ) + return; + if ( 'all' != $r['type'] ) { + $comments_by_type = separate_comments($comments); + if ( empty($comments_by_type[$r['type']]) ) + return; + $_comments = $comments_by_type[$r['type']]; + } else { + $_comments = $comments; + } + } else { + if ( empty($wp_query->comments) ) + return; + if ( 'all' != $r['type'] ) { + if ( empty($wp_query->comments_by_type) ) + $wp_query->comments_by_type = separate_comments($wp_query->comments); + if ( empty($wp_query->comments_by_type[$r['type']]) ) + return; + $_comments = $wp_query->comments_by_type[$r['type']]; + } else { + $_comments = $wp_query->comments; + } + } + + if ( '' === $r['per_page'] && get_option('page_comments') ) + $r['per_page'] = get_query_var('comments_per_page'); + + if ( empty($r['per_page']) ) { + $r['per_page'] = 0; + $r['page'] = 0; + } + + if ( '' === $r['max_depth'] ) { + if ( get_option('thread_comments') ) + $r['max_depth'] = get_option('thread_comments_depth'); + else + $r['max_depth'] = -1; + } + + if ( '' === $r['page'] ) { + if ( empty($overridden_cpage) ) { + $r['page'] = get_query_var('cpage'); + } else { + $threaded = ( -1 != $r['max_depth'] ); + $r['page'] = ( 'newest' == get_option('default_comments_page') ) ? get_comment_pages_count($_comments, $r['per_page'], $threaded) : 1; + set_query_var( 'cpage', $r['page'] ); + } + } + // Validation check + $r['page'] = intval($r['page']); + if ( 0 == $r['page'] && 0 != $r['per_page'] ) + $r['page'] = 1; + + if ( null === $r['reverse_top_level'] ) + $r['reverse_top_level'] = ( 'desc' == get_option('comment_order') ); + + extract( $r, EXTR_SKIP ); + + if ( empty($walker) ) + $walker = new Walker_Comment; + + $output = $walker->paged_walk($_comments, $max_depth, $page, $per_page, $r); + $wp_query->max_num_comment_pages = $walker->max_pages; + + $in_comment_loop = false; + + if ( $r['echo'] ) + echo $output; + else + return $output; +} + +/** + * Output a complete commenting form for use within a template. + * + * Most strings and form fields may be controlled through the $args array passed + * into the function, while you may also choose to use the comment_form_default_fields + * filter to modify the array of default fields if you'd just like to add a new + * one or remove a single field. All fields are also individually passed through + * a filter of the form comment_form_field_$name where $name is the key used + * in the array of fields. + * + * @since 3.0.0 + * + * @param array $args { + * Optional. Default arguments and form fields to override. + * + * @type array $fields { + * Default comment fields, filterable by default via the 'comment_form_default_fields' hook. + * + * @type string $author Comment author field HTML. + * @type string $email Comment author email field HTML. + * @type string $url Comment author URL field HTML. + * } + * @type string $comment_field The comment textarea field HTML. + * @type string $must_log_in HTML element for a 'must be logged in to comment' message. + * @type string $logged_in_as HTML element for a 'logged in as ' message. + * @type string $comment_notes_before HTML element for a message displayed before the comment form. + * Default 'Your email address will not be published.'. + * @type string $comment_notes_after HTML element for a message displayed after the comment form. + * Default 'You may use these HTML tags and attributes ...'. + * @type string $id_form The comment form element id attribute. Default 'commentform'. + * @type string $id_submit The comment submit element id attribute. Default 'submit'. + * @type string $title_reply The translatable 'reply' button label. Default 'Leave a Reply'. + * @type string $title_reply_to The translatable 'reply-to' button label. Default 'Leave a Reply to %s', + * where %s is the author of the comment being replied to. + * @type string $cancel_reply_link The translatable 'cancel reply' button label. Default 'Cancel reply'. + * @type string $label_submit The translatable 'submit' button label. Default 'Post a comment'. + * @type string $format The comment form format. Default 'xhtml'. Accepts 'xhtml', 'html5'. + * } + * @param int|WP_Post $post_id Post ID or WP_Post object to generate the form for. Default current post. + */ +function comment_form( $args = array(), $post_id = null ) { + if ( null === $post_id ) + $post_id = get_the_ID(); + else + $id = $post_id; + + $commenter = wp_get_current_commenter(); + $user = wp_get_current_user(); + $user_identity = $user->exists() ? $user->display_name : ''; + + $args = wp_parse_args( $args ); + if ( ! isset( $args['format'] ) ) + $args['format'] = current_theme_supports( 'html5', 'comment-form' ) ? 'html5' : 'xhtml'; + + $req = get_option( 'require_name_email' ); + $aria_req = ( $req ? " aria-required='true'" : '' ); + $html5 = 'html5' === $args['format']; + $fields = array( + 'author' => '

            ' . ' ' . + '

            ', + 'email' => '', + 'url' => '

            ' . + '

            ', + ); + + $required_text = sprintf( ' ' . __('Required fields are marked %s'), '*' ); + + /** + * Filter the default comment form fields. + * + * @since 3.0.0 + * + * @param array $fields The default comment fields. + */ + $fields = apply_filters( 'comment_form_default_fields', $fields ); + $defaults = array( + 'fields' => $fields, + 'comment_field' => '

            ', + /** This filter is documented in wp-includes/link-template.php */ + 'must_log_in' => '', + /** This filter is documented in wp-includes/link-template.php */ + 'logged_in_as' => '

            ' . sprintf( __( 'Logged in as %2$s. Log out?' ), get_edit_user_link(), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '

            ', + 'comment_notes_before' => '

            ' . __( 'Your email address will not be published.' ) . ( $req ? $required_text : '' ) . '

            ', + 'comment_notes_after' => '

            ' . sprintf( __( 'You may use these HTML tags and attributes: %s' ), ' ' . allowed_tags() . '' ) . '

            ', + 'id_form' => 'commentform', + 'id_submit' => 'submit', + 'title_reply' => __( 'Leave a Reply' ), + 'title_reply_to' => __( 'Leave a Reply to %s' ), + 'cancel_reply_link' => __( 'Cancel reply' ), + 'label_submit' => __( 'Post Comment' ), + 'format' => 'xhtml', + ); + + /** + * Filter the comment form default arguments. + * + * Use 'comment_form_default_fields' to filter the comment fields. + * + * @since 3.0.0 + * + * @param array $defaults The default comment form arguments. + */ + $args = wp_parse_args( $args, apply_filters( 'comment_form_defaults', $defaults ) ); + + ?> + + +
            +

            + + + + +
            > + tag. + * + * @since 3.0.0 + */ + do_action( 'comment_form_top' ); + ?> + + + + + + $field ) { + /** + * Filter a comment form field for display. + * + * The dynamic portion of the filter hook, $name, refers to the name + * of the comment form field. Such as 'author', 'email', or 'url'. + * + * @since 3.0.0 + * + * @param string $field The HTML-formatted output of the comment form field. + */ + echo apply_filters( "comment_form_field_{$name}", $field ) . "\n"; + } + /** + * Fires after the comment fields in the comment form. + * + * @since 3.0.0 + */ + do_action( 'comment_form_after_fields' ); + ?> + + + +

            + + +

            + tag. + * + * @since 1.5.0 + * + * @param int $post_id The post ID. + */ + do_action( 'comment_form', $post_id ); + ?> +
            + +
            + ]*href/i', $comment, $out ); + /** + * Filter the maximum number of links allowed in a comment. + * + * @since 3.0.0 + * + * @param int $num_links The number of links allowed. + * @param string $url Comment author's URL. Included in allowed links total. + */ + $num_links = apply_filters( 'comment_max_links_url', $num_links, $url ); + if ( $num_links >= $max_links ) + return false; + } + + $mod_keys = trim(get_option('moderation_keys')); + if ( !empty($mod_keys) ) { + $words = explode("\n", $mod_keys ); + + foreach ( (array) $words as $word) { + $word = trim($word); + + // Skip empty lines + if ( empty($word) ) + continue; + + // Do some escaping magic so that '#' chars in the + // spam words don't break things: + $word = preg_quote($word, '#'); + + $pattern = "#$word#i"; + if ( preg_match($pattern, $author) ) return false; + if ( preg_match($pattern, $email) ) return false; + if ( preg_match($pattern, $url) ) return false; + if ( preg_match($pattern, $comment) ) return false; + if ( preg_match($pattern, $user_ip) ) return false; + if ( preg_match($pattern, $user_agent) ) return false; + } + } + + // Comment whitelisting: + if ( 1 == get_option('comment_whitelist')) { + if ( 'trackback' != $comment_type && 'pingback' != $comment_type && $author != '' && $email != '' ) { + // expected_slashed ($author, $email) + $ok_to_comment = $wpdb->get_var("SELECT comment_approved FROM $wpdb->comments WHERE comment_author = '$author' AND comment_author_email = '$email' and comment_approved = '1' LIMIT 1"); + if ( ( 1 == $ok_to_comment ) && + ( empty($mod_keys) || false === strpos( $email, $mod_keys) ) ) + return true; + else + return false; + } else { + return false; + } + } + return true; +} + +/** + * Retrieve the approved comments for post $post_id. + * + * @since 2.0.0 + * @uses $wpdb + * + * @param int $post_id The ID of the post + * @return array $comments The approved comments + */ +function get_approved_comments($post_id) { + global $wpdb; + return $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved = '1' ORDER BY comment_date", $post_id)); +} + +/** + * Retrieves comment data given a comment ID or comment object. + * + * If an object is passed then the comment data will be cached and then returned + * after being passed through a filter. If the comment is empty, then the global + * comment variable will be used, if it is set. + * + * @since 2.0.0 + * @uses $wpdb + * + * @param object|string|int $comment Comment to retrieve. + * @param string $output Optional. OBJECT or ARRAY_A or ARRAY_N constants. + * @return object|array|null Depends on $output value. + */ +function get_comment(&$comment, $output = OBJECT) { + global $wpdb; + + if ( empty($comment) ) { + if ( isset($GLOBALS['comment']) ) + $_comment = & $GLOBALS['comment']; + else + $_comment = null; + } elseif ( is_object($comment) ) { + wp_cache_add($comment->comment_ID, $comment, 'comment'); + $_comment = $comment; + } else { + if ( isset($GLOBALS['comment']) && ($GLOBALS['comment']->comment_ID == $comment) ) { + $_comment = & $GLOBALS['comment']; + } elseif ( ! $_comment = wp_cache_get($comment, 'comment') ) { + $_comment = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_ID = %d LIMIT 1", $comment)); + if ( ! $_comment ) + return null; + wp_cache_add($_comment->comment_ID, $_comment, 'comment'); + } + } + + /** + * Fires after a comment is retrieved. + * + * @since 2.3.0 + * + * @param mixed $_comment Comment data. + */ + $_comment = apply_filters( 'get_comment', $_comment ); + + if ( $output == OBJECT ) { + return $_comment; + } elseif ( $output == ARRAY_A ) { + $__comment = get_object_vars($_comment); + return $__comment; + } elseif ( $output == ARRAY_N ) { + $__comment = array_values(get_object_vars($_comment)); + return $__comment; + } else { + return $_comment; + } +} + +/** + * Retrieve a list of comments. + * + * The comment list can be for the blog as a whole or for an individual post. + * + * The list of comment arguments are 'status', 'orderby', 'comment_date_gmt', + * 'order', 'number', 'offset', and 'post_id'. + * + * @since 2.7.0 + * @uses $wpdb + * + * @param mixed $args Optional. Array or string of options to override defaults. + * @return array List of comments. + */ +function get_comments( $args = '' ) { + $query = new WP_Comment_Query; + return $query->query( $args ); +} + +/** + * WordPress Comment Query class. + * + * @since 3.1.0 + */ +class WP_Comment_Query { + /** + * Metadata query container + * + * @since 3.5.0 + * @access public + * @var object WP_Meta_Query + */ + var $meta_query = false; + + /** + * Date query container + * + * @since 3.7.0 + * @access public + * @var object WP_Date_Query + */ + var $date_query = false; + + /** + * Execute the query + * + * @since 3.1.0 + * + * @param string|array $query_vars + * @return int|array + */ + function query( $query_vars ) { + global $wpdb; + + $defaults = array( + 'author_email' => '', + 'ID' => '', + 'karma' => '', + 'number' => '', + 'offset' => '', + 'orderby' => '', + 'order' => 'DESC', + 'parent' => '', + 'post_ID' => '', + 'post_id' => 0, + 'post_author' => '', + 'post_name' => '', + 'post_parent' => '', + 'post_status' => '', + 'post_type' => '', + 'status' => '', + 'type' => '', + 'user_id' => '', + 'search' => '', + 'count' => false, + 'meta_key' => '', + 'meta_value' => '', + 'meta_query' => '', + 'date_query' => null, // See WP_Date_Query + ); + + $groupby = ''; + + $this->query_vars = wp_parse_args( $query_vars, $defaults ); + + // Parse meta query + $this->meta_query = new WP_Meta_Query(); + $this->meta_query->parse_query_vars( $this->query_vars ); + + /** + * Fires before comments are retrieved. + * + * @since 3.1.0 + * + * @param WP_Comment_Query &$this Current instance of WP_Comment_Query, passed by reference. + */ + do_action_ref_array( 'pre_get_comments', array( &$this ) ); + extract( $this->query_vars, EXTR_SKIP ); + + // $args can be whatever, only use the args defined in defaults to compute the key + $key = md5( serialize( compact(array_keys($defaults)) ) ); + $last_changed = wp_cache_get( 'last_changed', 'comment' ); + if ( ! $last_changed ) { + $last_changed = microtime(); + wp_cache_set( 'last_changed', $last_changed, 'comment' ); + } + $cache_key = "get_comments:$key:$last_changed"; + + if ( $cache = wp_cache_get( $cache_key, 'comment' ) ) + return $cache; + + $post_id = absint($post_id); + + if ( 'hold' == $status ) + $approved = "comment_approved = '0'"; + elseif ( 'approve' == $status ) + $approved = "comment_approved = '1'"; + elseif ( ! empty( $status ) && 'all' != $status ) + $approved = $wpdb->prepare( "comment_approved = %s", $status ); + else + $approved = "( comment_approved = '0' OR comment_approved = '1' )"; + + $order = ( 'ASC' == strtoupper($order) ) ? 'ASC' : 'DESC'; + + if ( ! empty( $orderby ) ) { + $ordersby = is_array($orderby) ? $orderby : preg_split('/[,\s]/', $orderby); + $allowed_keys = array( + 'comment_agent', + 'comment_approved', + 'comment_author', + 'comment_author_email', + 'comment_author_IP', + 'comment_author_url', + 'comment_content', + 'comment_date', + 'comment_date_gmt', + 'comment_ID', + 'comment_karma', + 'comment_parent', + 'comment_post_ID', + 'comment_type', + 'user_id', + ); + if ( ! empty( $this->query_vars['meta_key'] ) ) { + $allowed_keys[] = $this->query_vars['meta_key']; + $allowed_keys[] = 'meta_value'; + $allowed_keys[] = 'meta_value_num'; + } + $ordersby = array_intersect( $ordersby, $allowed_keys ); + foreach ( $ordersby as $key => $value ) { + if ( $value == $this->query_vars['meta_key'] || $value == 'meta_value' ) { + $ordersby[ $key ] = "$wpdb->commentmeta.meta_value"; + } elseif ( $value == 'meta_value_num' ) { + $ordersby[ $key ] = "$wpdb->commentmeta.meta_value+0"; + } + } + $orderby = empty( $ordersby ) ? 'comment_date_gmt' : implode(', ', $ordersby); + } else { + $orderby = 'comment_date_gmt'; + } + + $number = absint($number); + $offset = absint($offset); + + if ( !empty($number) ) { + if ( $offset ) + $limits = 'LIMIT ' . $offset . ',' . $number; + else + $limits = 'LIMIT ' . $number; + } else { + $limits = ''; + } + + if ( $count ) + $fields = 'COUNT(*)'; + else + $fields = '*'; + + $join = ''; + $where = $approved; + + if ( ! empty($post_id) ) + $where .= $wpdb->prepare( ' AND comment_post_ID = %d', $post_id ); + if ( '' !== $author_email ) + $where .= $wpdb->prepare( ' AND comment_author_email = %s', $author_email ); + if ( '' !== $karma ) + $where .= $wpdb->prepare( ' AND comment_karma = %d', $karma ); + if ( 'comment' == $type ) { + $where .= " AND comment_type = ''"; + } elseif( 'pings' == $type ) { + $where .= ' AND comment_type IN ("pingback", "trackback")'; + } elseif ( ! empty( $type ) ) { + $where .= $wpdb->prepare( ' AND comment_type = %s', $type ); + } + if ( '' !== $parent ) + $where .= $wpdb->prepare( ' AND comment_parent = %d', $parent ); + + if ( is_array( $user_id ) ) { + $where .= ' AND user_id IN (' . implode( ',', array_map( 'absint', $user_id ) ) . ')'; + } elseif ( '' !== $user_id ) { + $where .= $wpdb->prepare( ' AND user_id = %d', $user_id ); + } + + if ( '' !== $search ) + $where .= $this->get_search_sql( $search, array( 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_author_IP', 'comment_content' ) ); + + $post_fields = array_filter( compact( array( 'post_author', 'post_name', 'post_parent', 'post_status', 'post_type', ) ) ); + if ( ! empty( $post_fields ) ) { + $join = "JOIN $wpdb->posts ON $wpdb->posts.ID = $wpdb->comments.comment_post_ID"; + foreach( $post_fields as $field_name => $field_value ) + $where .= $wpdb->prepare( " AND {$wpdb->posts}.{$field_name} = %s", $field_value ); + } + + if ( ! empty( $this->meta_query->queries ) ) { + $clauses = $this->meta_query->get_sql( 'comment', $wpdb->comments, 'comment_ID', $this ); + $join .= $clauses['join']; + $where .= $clauses['where']; + $groupby = "{$wpdb->comments}.comment_ID"; + } + + if ( ! empty( $date_query ) && is_array( $date_query ) ) { + $date_query_object = new WP_Date_Query( $date_query, 'comment_date' ); + $where .= $date_query_object->get_sql(); + } + + $pieces = array( 'fields', 'join', 'where', 'orderby', 'order', 'limits', 'groupby' ); + /** + * Filter the comment query clauses. + * + * @since 3.1.0 + * + * @param array $pieces A compacted array of comment query clauses. + * @param WP_Comment_Query &$this Current instance of WP_Comment_Query, passed by reference. + */ + $clauses = apply_filters_ref_array( 'comments_clauses', array( compact( $pieces ), &$this ) ); + foreach ( $pieces as $piece ) + $$piece = isset( $clauses[ $piece ] ) ? $clauses[ $piece ] : ''; + + if ( $groupby ) + $groupby = 'GROUP BY ' . $groupby; + + $query = "SELECT $fields FROM $wpdb->comments $join WHERE $where $groupby ORDER BY $orderby $order $limits"; + + if ( $count ) + return $wpdb->get_var( $query ); + + $comments = $wpdb->get_results( $query ); + /** + * Filter the comment query results. + * + * @since 3.1.0 + * + * @param array $comments An array of comments. + * @param WP_Comment_Query &$this Current instance of WP_Comment_Query, passed by reference. + */ + $comments = apply_filters_ref_array( 'the_comments', array( $comments, &$this ) ); + + wp_cache_add( $cache_key, $comments, 'comment' ); + + return $comments; + } + + /** + * Used internally to generate an SQL string for searching across multiple columns + * + * @access protected + * @since 3.1.0 + * + * @param string $string + * @param array $cols + * @return string + */ + function get_search_sql( $string, $cols ) { + $string = esc_sql( like_escape( $string ) ); + + $searches = array(); + foreach ( $cols as $col ) + $searches[] = "$col LIKE '%$string%'"; + + return ' AND (' . implode(' OR ', $searches) . ')'; + } +} + +/** + * Retrieve all of the WordPress supported comment statuses. + * + * Comments have a limited set of valid status values, this provides the comment + * status values and descriptions. + * + * @since 2.7.0 + * + * @return array List of comment statuses. + */ +function get_comment_statuses() { + $status = array( + 'hold' => __('Unapproved'), + /* translators: comment status */ + 'approve' => _x('Approved', 'adjective'), + /* translators: comment status */ + 'spam' => _x('Spam', 'adjective'), + ); + + return $status; +} + +/** + * The date the last comment was modified. + * + * @since 1.5.0 + * @uses $wpdb + * + * @param string $timezone Which timezone to use in reference to 'gmt', 'blog', + * or 'server' locations. + * @return string Last comment modified date. + */ +function get_lastcommentmodified($timezone = 'server') { + global $wpdb; + static $cache_lastcommentmodified = array(); + + if ( isset($cache_lastcommentmodified[$timezone]) ) + return $cache_lastcommentmodified[$timezone]; + + $add_seconds_server = date('Z'); + + switch ( strtolower($timezone)) { + case 'gmt': + $lastcommentmodified = $wpdb->get_var("SELECT comment_date_gmt FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1"); + break; + case 'blog': + $lastcommentmodified = $wpdb->get_var("SELECT comment_date FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1"); + break; + case 'server': + $lastcommentmodified = $wpdb->get_var($wpdb->prepare("SELECT DATE_ADD(comment_date_gmt, INTERVAL %s SECOND) FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1", $add_seconds_server)); + break; + } + + $cache_lastcommentmodified[$timezone] = $lastcommentmodified; + + return $lastcommentmodified; +} + +/** + * The amount of comments in a post or total comments. + * + * A lot like {@link wp_count_comments()}, in that they both return comment + * stats (albeit with different types). The {@link wp_count_comments()} actual + * caches, but this function does not. + * + * @since 2.0.0 + * @uses $wpdb + * + * @param int $post_id Optional. Comment amount in post if > 0, else total comments blog wide. + * @return array The amount of spam, approved, awaiting moderation, and total comments. + */ +function get_comment_count( $post_id = 0 ) { + global $wpdb; + + $post_id = (int) $post_id; + + $where = ''; + if ( $post_id > 0 ) { + $where = $wpdb->prepare("WHERE comment_post_ID = %d", $post_id); + } + + $totals = (array) $wpdb->get_results(" + SELECT comment_approved, COUNT( * ) AS total + FROM {$wpdb->comments} + {$where} + GROUP BY comment_approved + ", ARRAY_A); + + $comment_count = array( + "approved" => 0, + "awaiting_moderation" => 0, + "spam" => 0, + "total_comments" => 0 + ); + + foreach ( $totals as $row ) { + switch ( $row['comment_approved'] ) { + case 'spam': + $comment_count['spam'] = $row['total']; + $comment_count["total_comments"] += $row['total']; + break; + case 1: + $comment_count['approved'] = $row['total']; + $comment_count['total_comments'] += $row['total']; + break; + case 0: + $comment_count['awaiting_moderation'] = $row['total']; + $comment_count['total_comments'] += $row['total']; + break; + default: + break; + } + } + + return $comment_count; +} + +// +// Comment meta functions +// + +/** + * Add meta data field to a comment. + * + * @since 2.9.0 + * @uses add_metadata + * @link http://codex.wordpress.org/Function_Reference/add_comment_meta + * + * @param int $comment_id Comment ID. + * @param string $meta_key Metadata name. + * @param mixed $meta_value Metadata value. + * @param bool $unique Optional, default is false. Whether the same key should not be added. + * @return int|bool Meta ID on success, false on failure. + */ +function add_comment_meta($comment_id, $meta_key, $meta_value, $unique = false) { + return add_metadata('comment', $comment_id, $meta_key, $meta_value, $unique); +} + +/** + * Remove metadata matching criteria from a comment. + * + * You can match based on the key, or key and value. Removing based on key and + * value, will keep from removing duplicate metadata with the same key. It also + * allows removing all metadata matching key, if needed. + * + * @since 2.9.0 + * @uses delete_metadata + * @link http://codex.wordpress.org/Function_Reference/delete_comment_meta + * + * @param int $comment_id comment ID + * @param string $meta_key Metadata name. + * @param mixed $meta_value Optional. Metadata value. + * @return bool True on success, false on failure. + */ +function delete_comment_meta($comment_id, $meta_key, $meta_value = '') { + return delete_metadata('comment', $comment_id, $meta_key, $meta_value); +} + +/** + * Retrieve comment meta field for a comment. + * + * @since 2.9.0 + * @uses get_metadata + * @link http://codex.wordpress.org/Function_Reference/get_comment_meta + * + * @param int $comment_id Comment ID. + * @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. + */ +function get_comment_meta($comment_id, $key = '', $single = false) { + return get_metadata('comment', $comment_id, $key, $single); +} + +/** + * Update comment meta field based on comment ID. + * + * Use the $prev_value parameter to differentiate between meta fields with the + * same key and comment ID. + * + * If the meta field for the comment does not exist, it will be added. + * + * @since 2.9.0 + * @uses update_metadata + * @link http://codex.wordpress.org/Function_Reference/update_comment_meta + * + * @param int $comment_id Comment ID. + * @param string $meta_key Metadata key. + * @param mixed $meta_value Metadata value. + * @param mixed $prev_value Optional. Previous value to check before removing. + * @return int|bool Meta ID if the key didn't exist, true on successful update, false on failure. + */ +function update_comment_meta($comment_id, $meta_key, $meta_value, $prev_value = '') { + return update_metadata('comment', $comment_id, $meta_key, $meta_value, $prev_value); +} + +/** + * Sets the cookies used to store an unauthenticated commentator's identity. Typically used + * to recall previous comments by this commentator that are still held in moderation. + * + * @param object $comment Comment object. + * @param object $user Comment author's object. + * + * @since 3.4.0 + */ +function wp_set_comment_cookies($comment, $user) { + if ( $user->exists() ) + return; + + /** + * Filter the lifetime of the comment cookie in seconds. + * + * @since 2.8.0 + * + * @param int $seconds Comment cookie lifetime. Default 30000000. + */ + $comment_cookie_lifetime = apply_filters( 'comment_cookie_lifetime', 30000000 ); + setcookie('comment_author_' . COOKIEHASH, $comment->comment_author, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN); + setcookie('comment_author_email_' . COOKIEHASH, $comment->comment_author_email, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN); + setcookie('comment_author_url_' . COOKIEHASH, esc_url($comment->comment_author_url), time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN); +} + +/** + * Sanitizes the cookies sent to the user already. + * + * Will only do anything if the cookies have already been created for the user. + * Mostly used after cookies had been sent to use elsewhere. + * + * @since 2.0.4 + */ +function sanitize_comment_cookies() { + if ( isset( $_COOKIE['comment_author_' . COOKIEHASH] ) ) { + /** + * Filter the comment author's name cookie before it is set. + * + * When this filter hook is evaluated in wp_filter_comment(), + * the comment author's name string is passed. + * + * @since 1.5.0 + * + * @param string $author_cookie The comment author name cookie. + */ + $comment_author = apply_filters( 'pre_comment_author_name', $_COOKIE['comment_author_' . COOKIEHASH] ); + $comment_author = wp_unslash($comment_author); + $comment_author = esc_attr($comment_author); + $_COOKIE['comment_author_' . COOKIEHASH] = $comment_author; + } + + if ( isset( $_COOKIE['comment_author_email_' . COOKIEHASH] ) ) { + /** + * Filter the comment author's email cookie before it is set. + * + * When this filter hook is evaluated in wp_filter_comment(), + * the comment author's email string is passed. + * + * @since 1.5.0 + * + * @param string $author_email_cookie The comment author email cookie. + */ + $comment_author_email = apply_filters( 'pre_comment_author_email', $_COOKIE['comment_author_email_' . COOKIEHASH] ); + $comment_author_email = wp_unslash($comment_author_email); + $comment_author_email = esc_attr($comment_author_email); + $_COOKIE['comment_author_email_'.COOKIEHASH] = $comment_author_email; + } + + if ( isset( $_COOKIE['comment_author_url_' . COOKIEHASH] ) ) { + /** + * Filter the comment author's URL cookie before it is set. + * + * When this filter hook is evaluated in wp_filter_comment(), + * the comment author's URL string is passed. + * + * @since 1.5.0 + * + * @param string $author_url_cookie The comment author URL cookie. + */ + $comment_author_url = apply_filters( 'pre_comment_author_url', $_COOKIE['comment_author_url_' . COOKIEHASH] ); + $comment_author_url = wp_unslash($comment_author_url); + $_COOKIE['comment_author_url_'.COOKIEHASH] = $comment_author_url; + } +} + +/** + * Validates whether this comment is allowed to be made. + * + * @since 2.0.0 + * @uses $wpdb + * + * @param array $commentdata Contains information on the comment + * @return mixed Signifies the approval status (0|1|'spam') + */ +function wp_allow_comment($commentdata) { + global $wpdb; + extract($commentdata, EXTR_SKIP); + + // Simple duplicate check + // expected_slashed ($comment_post_ID, $comment_author, $comment_author_email, $comment_content) + $dupe = $wpdb->prepare( "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_parent = %s AND comment_approved != 'trash' AND ( comment_author = %s ", wp_unslash( $comment_post_ID ), wp_unslash( $comment_parent ), wp_unslash( $comment_author ) ); + if ( $comment_author_email ) + $dupe .= $wpdb->prepare( "OR comment_author_email = %s ", wp_unslash( $comment_author_email ) ); + $dupe .= $wpdb->prepare( ") AND comment_content = %s LIMIT 1", wp_unslash( $comment_content ) ); + if ( $wpdb->get_var($dupe) ) { + /** + * Fires immediately after a duplicate comment is detected. + * + * @since 3.0.0 + * + * @param array $commentdata Comment data. + */ + do_action( 'comment_duplicate_trigger', $commentdata ); + if ( defined('DOING_AJAX') ) + die( __('Duplicate comment detected; it looks as though you’ve already said that!') ); + + wp_die( __('Duplicate comment detected; it looks as though you’ve already said that!') ); + } + + /** + * Fires immediately before a comment is marked approved. + * + * Allows checking for comment flooding. + * + * @since 2.3.0 + * + * @param string $comment_author_IP Comment author's IP address. + * @param string $comment_author_email Comment author's email. + * @param string $comment_date_gmt GMT date the comment was posted. + */ + do_action( 'check_comment_flood', $comment_author_IP, $comment_author_email, $comment_date_gmt ); + + if ( ! empty( $user_id ) ) { + $user = get_userdata( $user_id ); + $post_author = $wpdb->get_var($wpdb->prepare("SELECT post_author FROM $wpdb->posts WHERE ID = %d LIMIT 1", $comment_post_ID)); + } + + if ( isset( $user ) && ( $user_id == $post_author || $user->has_cap( 'moderate_comments' ) ) ) { + // The author and the admins get respect. + $approved = 1; + } else { + // Everyone else's comments will be checked. + if ( check_comment($comment_author, $comment_author_email, $comment_author_url, $comment_content, $comment_author_IP, $comment_agent, $comment_type) ) + $approved = 1; + else + $approved = 0; + if ( wp_blacklist_check($comment_author, $comment_author_email, $comment_author_url, $comment_content, $comment_author_IP, $comment_agent) ) + $approved = 'spam'; + } + + /** + * Filter a comment's approval status before it is set. + * + * @since 2.1.0 + * + * @param bool|string $approved The approval status. Accepts 1, 0, or 'spam'. + * @param array $commentdata Comment data. + */ + $approved = apply_filters( 'pre_comment_approved', $approved, $commentdata ); + return $approved; +} + +/** + * Check whether comment flooding is occurring. + * + * Won't run, if current user can manage options, so to not block + * administrators. + * + * @since 2.3.0 + * @uses $wpdb + * + * @param string $ip Comment IP. + * @param string $email Comment author email address. + * @param string $date MySQL time string. + */ +function check_comment_flood_db( $ip, $email, $date ) { + global $wpdb; + if ( current_user_can( 'manage_options' ) ) + return; // don't throttle admins + $hour_ago = gmdate( 'Y-m-d H:i:s', time() - HOUR_IN_SECONDS ); + if ( $lasttime = $wpdb->get_var( $wpdb->prepare( "SELECT `comment_date_gmt` FROM `$wpdb->comments` WHERE `comment_date_gmt` >= %s AND ( `comment_author_IP` = %s OR `comment_author_email` = %s ) ORDER BY `comment_date_gmt` DESC LIMIT 1", $hour_ago, $ip, $email ) ) ) { + $time_lastcomment = mysql2date('U', $lasttime, false); + $time_newcomment = mysql2date('U', $date, false); + /** + * Filter the comment flood status. + * + * @since 2.1.0 + * + * @param bool $bool Whether a comment flood is occurring. Default false. + * @param int $time_lastcomment Timestamp of when the last comment was posted. + * @param int $time_newcomment Timestamp of when the new comment was posted. + */ + $flood_die = apply_filters( 'comment_flood_filter', false, $time_lastcomment, $time_newcomment ); + if ( $flood_die ) { + /** + * Fires before the comment flood message is triggered. + * + * @since 1.5.0 + * + * @param int $time_lastcomment Timestamp of when the last comment was posted. + * @param int $time_newcomment Timestamp of when the new comment was posted. + */ + do_action( 'comment_flood_trigger', $time_lastcomment, $time_newcomment ); + + if ( defined('DOING_AJAX') ) + die( __('You are posting comments too quickly. Slow down.') ); + + wp_die( __('You are posting comments too quickly. Slow down.'), '', array('response' => 403) ); + } + } +} + +/** + * Separates an array of comments into an array keyed by comment_type. + * + * @since 2.7.0 + * + * @param array $comments Array of comments + * @return array Array of comments keyed by comment_type. + */ +function separate_comments(&$comments) { + $comments_by_type = array('comment' => array(), 'trackback' => array(), 'pingback' => array(), 'pings' => array()); + $count = count($comments); + for ( $i = 0; $i < $count; $i++ ) { + $type = $comments[$i]->comment_type; + if ( empty($type) ) + $type = 'comment'; + $comments_by_type[$type][] = &$comments[$i]; + if ( 'trackback' == $type || 'pingback' == $type ) + $comments_by_type['pings'][] = &$comments[$i]; + } + + return $comments_by_type; +} + +/** + * Calculate the total number of comment pages. + * + * @since 2.7.0 + * + * @uses Walker_Comment + * + * @param array $comments Optional array of comment objects. Defaults to $wp_query->comments + * @param int $per_page Optional comments per page. + * @param boolean $threaded Optional control over flat or threaded comments. + * @return int Number of comment pages. + */ +function get_comment_pages_count( $comments = null, $per_page = null, $threaded = null ) { + global $wp_query; + + if ( null === $comments && null === $per_page && null === $threaded && !empty($wp_query->max_num_comment_pages) ) + return $wp_query->max_num_comment_pages; + + if ( ( ! $comments || ! is_array( $comments ) ) && ! empty( $wp_query->comments ) ) + $comments = $wp_query->comments; + + if ( empty($comments) ) + return 0; + + if ( ! get_option( 'page_comments' ) ) + return 1; + + if ( !isset($per_page) ) + $per_page = (int) get_query_var('comments_per_page'); + if ( 0 === $per_page ) + $per_page = (int) get_option('comments_per_page'); + if ( 0 === $per_page ) + return 1; + + if ( !isset($threaded) ) + $threaded = get_option('thread_comments'); + + if ( $threaded ) { + $walker = new Walker_Comment; + $count = ceil( $walker->get_number_of_root_elements( $comments ) / $per_page ); + } else { + $count = ceil( count( $comments ) / $per_page ); + } + + return $count; +} + +/** + * Calculate what page number a comment will appear on for comment paging. + * + * @since 2.7.0 + * @uses get_comment() Gets the full comment of the $comment_ID parameter. + * @uses get_option() Get various settings to control function and defaults. + * @uses get_page_of_comment() Used to loop up to top level comment. + * + * @param int $comment_ID Comment ID. + * @param array $args Optional args. + * @return int|null Comment page number or null on error. + */ +function get_page_of_comment( $comment_ID, $args = array() ) { + global $wpdb; + + if ( !$comment = get_comment( $comment_ID ) ) + return; + + $defaults = array( 'type' => 'all', 'page' => '', 'per_page' => '', 'max_depth' => '' ); + $args = wp_parse_args( $args, $defaults ); + + if ( '' === $args['per_page'] && get_option('page_comments') ) + $args['per_page'] = get_query_var('comments_per_page'); + if ( empty($args['per_page']) ) { + $args['per_page'] = 0; + $args['page'] = 0; + } + if ( $args['per_page'] < 1 ) + return 1; + + if ( '' === $args['max_depth'] ) { + if ( get_option('thread_comments') ) + $args['max_depth'] = get_option('thread_comments_depth'); + else + $args['max_depth'] = -1; + } + + // Find this comment's top level parent if threading is enabled + if ( $args['max_depth'] > 1 && 0 != $comment->comment_parent ) + return get_page_of_comment( $comment->comment_parent, $args ); + + $allowedtypes = array( + 'comment' => '', + 'pingback' => 'pingback', + 'trackback' => 'trackback', + ); + + $comtypewhere = ( 'all' != $args['type'] && isset($allowedtypes[$args['type']]) ) ? " AND comment_type = '" . $allowedtypes[$args['type']] . "'" : ''; + + // Count comments older than this one + $oldercoms = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_parent = 0 AND comment_approved = '1' AND comment_date_gmt < '%s'" . $comtypewhere, $comment->comment_post_ID, $comment->comment_date_gmt ) ); + + // No older comments? Then it's page #1. + if ( 0 == $oldercoms ) + return 1; + + // Divide comments older than this one by comments per page to get this comment's page number + return ceil( ( $oldercoms + 1 ) / $args['per_page'] ); +} + +/** + * Does comment contain blacklisted characters or words. + * + * @since 1.5.0 + * + * @param string $author The author of the comment + * @param string $email The email of the comment + * @param string $url The url used in the comment + * @param string $comment The comment content + * @param string $user_ip The comment author IP address + * @param string $user_agent The author's browser user agent + * @return bool True if comment contains blacklisted content, false if comment does not + */ +function wp_blacklist_check($author, $email, $url, $comment, $user_ip, $user_agent) { + /** + * Fires before the comment is tested for blacklisted characters or words. + * + * @since 1.5.0 + * + * @param string $author Comment author. + * @param string $email Comment author's email. + * @param string $url Comment author's URL. + * @param string $comment Comment content. + * @param string $user_ip Comment author's IP address. + * @param string $user_agent Comment author's browser user agent. + */ + do_action( 'wp_blacklist_check', $author, $email, $url, $comment, $user_ip, $user_agent ); + + $mod_keys = trim( get_option('blacklist_keys') ); + if ( '' == $mod_keys ) + return false; // If moderation keys are empty + $words = explode("\n", $mod_keys ); + + foreach ( (array) $words as $word ) { + $word = trim($word); + + // Skip empty lines + if ( empty($word) ) { continue; } + + // Do some escaping magic so that '#' chars in the + // spam words don't break things: + $word = preg_quote($word, '#'); + + $pattern = "#$word#i"; + if ( + preg_match($pattern, $author) + || preg_match($pattern, $email) + || preg_match($pattern, $url) + || preg_match($pattern, $comment) + || preg_match($pattern, $user_ip) + || preg_match($pattern, $user_agent) + ) + return true; + } + return false; +} + +/** + * Retrieve total comments for blog or single post. + * + * The properties of the returned object contain the 'moderated', 'approved', + * and spam comments for either the entire blog or single post. Those properties + * contain the amount of comments that match the status. The 'total_comments' + * property contains the integer of total comments. + * + * The comment stats are cached and then retrieved, if they already exist in the + * cache. + * + * @since 2.5.0 + * + * @param int $post_id Optional. Post ID. + * @return object Comment stats. + */ +function wp_count_comments( $post_id = 0 ) { + global $wpdb; + + $post_id = (int) $post_id; + + /** + * Filter the comments count for a given post. + * + * @since 2.7.0 + * + * @param array $count An empty array. + * @param int $post_id The post ID. + */ + $stats = apply_filters( 'wp_count_comments', array(), $post_id ); + if ( !empty($stats) ) + return $stats; + + $count = wp_cache_get("comments-{$post_id}", 'counts'); + + if ( false !== $count ) + return $count; + + $where = ''; + if ( $post_id > 0 ) + $where = $wpdb->prepare( "WHERE comment_post_ID = %d", $post_id ); + + $count = $wpdb->get_results( "SELECT comment_approved, COUNT( * ) AS num_comments FROM {$wpdb->comments} {$where} GROUP BY comment_approved", ARRAY_A ); + + $total = 0; + $approved = array('0' => 'moderated', '1' => 'approved', 'spam' => 'spam', 'trash' => 'trash', 'post-trashed' => 'post-trashed'); + foreach ( (array) $count as $row ) { + // Don't count post-trashed toward totals + if ( 'post-trashed' != $row['comment_approved'] && 'trash' != $row['comment_approved'] ) + $total += $row['num_comments']; + if ( isset( $approved[$row['comment_approved']] ) ) + $stats[$approved[$row['comment_approved']]] = $row['num_comments']; + } + + $stats['total_comments'] = $total; + foreach ( $approved as $key ) { + if ( empty($stats[$key]) ) + $stats[$key] = 0; + } + + $stats = (object) $stats; + wp_cache_set("comments-{$post_id}", $stats, 'counts'); + + return $stats; +} + +/** + * Trashes or deletes a comment. + * + * The comment is moved to trash instead of permanently deleted unless trash is + * disabled, item is already in the trash, or $force_delete is true. + * + * The post comment count will be updated if the comment was approved and has a + * post ID available. + * + * @since 2.0.0 + * @uses $wpdb + * @uses wp_transition_comment_status() Passes new and old comment status along with $comment object + * + * @param int $comment_id Comment ID + * @param bool $force_delete Whether to bypass trash and force deletion. Default is false. + * @return bool True on success, false on failure. + */ +function wp_delete_comment($comment_id, $force_delete = false) { + global $wpdb; + if (!$comment = get_comment($comment_id)) + return false; + + if ( !$force_delete && EMPTY_TRASH_DAYS && !in_array( wp_get_comment_status($comment_id), array( 'trash', 'spam' ) ) ) + return wp_trash_comment($comment_id); + + /** + * Fires immediately before a comment is deleted from the database. + * + * @since 1.2.0 + * + * @param int $comment_id The comment ID. + */ + do_action( 'delete_comment', $comment_id ); + + // Move children up a level. + $children = $wpdb->get_col( $wpdb->prepare("SELECT comment_ID FROM $wpdb->comments WHERE comment_parent = %d", $comment_id) ); + if ( !empty($children) ) { + $wpdb->update($wpdb->comments, array('comment_parent' => $comment->comment_parent), array('comment_parent' => $comment_id)); + clean_comment_cache($children); + } + + // Delete metadata + $meta_ids = $wpdb->get_col( $wpdb->prepare( "SELECT meta_id FROM $wpdb->commentmeta WHERE comment_id = %d", $comment_id ) ); + foreach ( $meta_ids as $mid ) + delete_metadata_by_mid( 'comment', $mid ); + + if ( ! $wpdb->delete( $wpdb->comments, array( 'comment_ID' => $comment_id ) ) ) + return false; + + /** + * Fires immediately after a comment is deleted from the database. + * + * @since 2.9.0 + * + * @param int $comment_id The comment ID. + */ + do_action( 'deleted_comment', $comment_id ); + + $post_id = $comment->comment_post_ID; + if ( $post_id && $comment->comment_approved == 1 ) + wp_update_comment_count($post_id); + + clean_comment_cache($comment_id); + + /** + * Fires immediately before changing the comment's status to 'delete'. + * + * @since 1.5.0 + * + * @param int $comment_id The comment ID. + * @param string $status The new 'delete' comment status. + */ + do_action( 'wp_set_comment_status', $comment_id, 'delete' ); + wp_transition_comment_status('delete', $comment->comment_approved, $comment); + return true; +} + +/** + * Moves a comment to the Trash + * + * If trash is disabled, comment is permanently deleted. + * + * @since 2.9.0 + * + * @uses wp_delete_comment() if trash is disabled + * + * @param int $comment_id Comment ID. + * @return bool True on success, false on failure. + */ +function wp_trash_comment($comment_id) { + if ( !EMPTY_TRASH_DAYS ) + return wp_delete_comment($comment_id, true); + + if ( !$comment = get_comment($comment_id) ) + return false; + + /** + * Fires immediately before a comment is sent to the Trash. + * + * @since 2.9.0 + * + * @param int $comment_id The comment ID. + */ + do_action( 'trash_comment', $comment_id ); + + if ( wp_set_comment_status($comment_id, 'trash') ) { + add_comment_meta($comment_id, '_wp_trash_meta_status', $comment->comment_approved); + add_comment_meta($comment_id, '_wp_trash_meta_time', time() ); + + /** + * Fires immediately after a comment is sent to Trash. + * + * @since 2.9.0 + * + * @param int $comment_id The comment ID. + */ + do_action( 'trashed_comment', $comment_id ); + return true; + } + + return false; +} + +/** + * Removes a comment from the Trash + * + * @since 2.9.0 + * + * @param int $comment_id Comment ID. + * @return bool True on success, false on failure. + */ +function wp_untrash_comment($comment_id) { + if ( ! (int)$comment_id ) + return false; + + /** + * Fires immediately before a comment is restored from the Trash. + * + * @since 2.9.0 + * + * @param int $comment_id The comment ID. + */ + do_action( 'untrash_comment', $comment_id ); + + $status = (string) get_comment_meta($comment_id, '_wp_trash_meta_status', true); + if ( empty($status) ) + $status = '0'; + + if ( wp_set_comment_status($comment_id, $status) ) { + delete_comment_meta($comment_id, '_wp_trash_meta_time'); + delete_comment_meta($comment_id, '_wp_trash_meta_status'); + /** + * Fires immediately after a comment is restored from the Trash. + * + * @since 2.9.0 + * + * @param int $comment_id The comment ID. + */ + do_action( 'untrashed_comment', $comment_id ); + return true; + } + + return false; +} + +/** + * Marks a comment as Spam + * + * @since 2.9.0 + * + * @param int $comment_id Comment ID. + * @return bool True on success, false on failure. + */ +function wp_spam_comment($comment_id) { + if ( !$comment = get_comment($comment_id) ) + return false; + + /** + * Fires immediately before a comment is marked as Spam. + * + * @since 2.9.0 + * + * @param int $comment_id The comment ID. + */ + do_action( 'spam_comment', $comment_id ); + + if ( wp_set_comment_status($comment_id, 'spam') ) { + add_comment_meta($comment_id, '_wp_trash_meta_status', $comment->comment_approved); + /** + * Fires immediately after a comment is marked as Spam. + * + * @since 2.9.0 + * + * @param int $comment_id The comment ID. + */ + do_action( 'spammed_comment', $comment_id ); + return true; + } + + return false; +} + +/** + * Removes a comment from the Spam + * + * @since 2.9.0 + * + * @param int $comment_id Comment ID. + * @return bool True on success, false on failure. + */ +function wp_unspam_comment($comment_id) { + if ( ! (int)$comment_id ) + return false; + + /** + * Fires immediately before a comment is unmarked as Spam. + * + * @since 2.9.0 + * + * @param int $comment_id The comment ID. + */ + do_action( 'unspam_comment', $comment_id ); + + $status = (string) get_comment_meta($comment_id, '_wp_trash_meta_status', true); + if ( empty($status) ) + $status = '0'; + + if ( wp_set_comment_status($comment_id, $status) ) { + delete_comment_meta($comment_id, '_wp_trash_meta_status'); + /** + * Fires immediately after a comment is unmarked as Spam. + * + * @since 2.9.0 + * + * @param int $comment_id The comment ID. + */ + do_action( 'unspammed_comment', $comment_id ); + return true; + } + + return false; +} + +/** + * The status of a comment by ID. + * + * @since 1.0.0 + * + * @param int $comment_id Comment ID + * @return string|bool Status might be 'trash', 'approved', 'unapproved', 'spam'. False on failure. + */ +function wp_get_comment_status($comment_id) { + $comment = get_comment($comment_id); + if ( !$comment ) + return false; + + $approved = $comment->comment_approved; + + if ( $approved == null ) + return false; + elseif ( $approved == '1' ) + return 'approved'; + elseif ( $approved == '0' ) + return 'unapproved'; + elseif ( $approved == 'spam' ) + return 'spam'; + elseif ( $approved == 'trash' ) + return 'trash'; + else + return false; +} + +/** + * Call hooks for when a comment status transition occurs. + * + * Calls hooks for comment status transitions. If the new comment status is not the same + * as the previous comment status, then two hooks will be ran, the first is + * 'transition_comment_status' with new status, old status, and comment data. The + * next action called is 'comment_OLDSTATUS_to_NEWSTATUS' the NEWSTATUS is the + * $new_status parameter and the OLDSTATUS is $old_status parameter; it has the + * comment data. + * + * The final action will run whether or not the comment statuses are the same. The + * action is named 'comment_NEWSTATUS_COMMENTTYPE', NEWSTATUS is from the $new_status + * parameter and COMMENTTYPE is comment_type comment data. + * + * @since 2.7.0 + * + * @param string $new_status New comment status. + * @param string $old_status Previous comment status. + * @param object $comment Comment data. + */ +function wp_transition_comment_status($new_status, $old_status, $comment) { + /* + * Translate raw statuses to human readable formats for the hooks. + * This is not a complete list of comment status, it's only the ones + * that need to be renamed + */ + $comment_statuses = array( + 0 => 'unapproved', + 'hold' => 'unapproved', // wp_set_comment_status() uses "hold" + 1 => 'approved', + 'approve' => 'approved', // wp_set_comment_status() uses "approve" + ); + if ( isset($comment_statuses[$new_status]) ) $new_status = $comment_statuses[$new_status]; + if ( isset($comment_statuses[$old_status]) ) $old_status = $comment_statuses[$old_status]; + + // Call the hooks + if ( $new_status != $old_status ) { + /** + * Fires when the comment status is in transition. + * + * @since 2.7.0 + * + * @param int|string $new_status The new comment status. + * @param int|string $old_status The old comment status. + * @param object $comment The comment data. + */ + do_action( 'transition_comment_status', $new_status, $old_status, $comment ); + /** + * Fires when the comment status is in transition from one specific status to another. + * + * The dynamic portions of the hook name, $old_status, and $new_status, + * refer to the old and new comment statuses, respectively. + * + * @since 2.7.0 + * + * @param object $comment Comment object. + */ + do_action( "comment_{$old_status}_to_{$new_status}", $comment ); + } + /** + * Fires when the status of a specific comment type is in transition. + * + * The dynamic portions of the hook name, $new_status, and $comment->comment_type, + * refer to the new comment status, and the type of comment, respectively. + * + * Typical comment types include an empty string (standard comment), 'pingback', + * or 'trackback'. + * + * @since 2.7.0 + * + * @param int $comment_ID The comment ID. + * @param obj $comment Comment object. + */ + do_action( "comment_{$new_status}_{$comment->comment_type}", $comment->comment_ID, $comment ); +} + +/** + * Get current commenter's name, email, and URL. + * + * Expects cookies content to already be sanitized. User of this function might + * wish to recheck the returned array for validity. + * + * @see sanitize_comment_cookies() Use to sanitize cookies + * + * @since 2.0.4 + * + * @return array Comment author, email, url respectively. + */ +function wp_get_current_commenter() { + // Cookies should already be sanitized. + + $comment_author = ''; + if ( isset($_COOKIE['comment_author_'.COOKIEHASH]) ) + $comment_author = $_COOKIE['comment_author_'.COOKIEHASH]; + + $comment_author_email = ''; + if ( isset($_COOKIE['comment_author_email_'.COOKIEHASH]) ) + $comment_author_email = $_COOKIE['comment_author_email_'.COOKIEHASH]; + + $comment_author_url = ''; + if ( isset($_COOKIE['comment_author_url_'.COOKIEHASH]) ) + $comment_author_url = $_COOKIE['comment_author_url_'.COOKIEHASH]; + + /** + * Filter the current commenter's name, email, and URL. + * + * @since 3.1.0 + * + * @param string $comment_author Comment author's name. + * @param string $comment_author_email Comment author's email. + * @param string $comment_author_url Comment author's URL. + */ + return apply_filters( 'wp_get_current_commenter', compact('comment_author', 'comment_author_email', 'comment_author_url') ); +} + +/** + * Inserts a comment to the database. + * + * The available comment data key names are 'comment_author_IP', 'comment_date', + * 'comment_date_gmt', 'comment_parent', 'comment_approved', and 'user_id'. + * + * @since 2.0.0 + * @uses $wpdb + * + * @param array $commentdata Contains information on the comment. + * @return int The new comment's ID. + */ +function wp_insert_comment($commentdata) { + global $wpdb; + extract(wp_unslash($commentdata), EXTR_SKIP); + + if ( ! isset($comment_author_IP) ) + $comment_author_IP = ''; + if ( ! isset($comment_date) ) + $comment_date = current_time('mysql'); + if ( ! isset($comment_date_gmt) ) + $comment_date_gmt = get_gmt_from_date($comment_date); + if ( ! isset($comment_parent) ) + $comment_parent = 0; + if ( ! isset($comment_approved) ) + $comment_approved = 1; + if ( ! isset($comment_karma) ) + $comment_karma = 0; + if ( ! isset($user_id) ) + $user_id = 0; + if ( ! isset($comment_type) ) + $comment_type = ''; + + $data = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_author_IP', 'comment_date', 'comment_date_gmt', 'comment_content', 'comment_karma', 'comment_approved', 'comment_agent', 'comment_type', 'comment_parent', 'user_id'); + $wpdb->insert($wpdb->comments, $data); + + $id = (int) $wpdb->insert_id; + + if ( $comment_approved == 1 ) + wp_update_comment_count($comment_post_ID); + + $comment = get_comment($id); + + /** + * Fires immediately after a comment is inserted into the database. + * + * @since 2.8.0 + * + * @param int $id The comment ID. + * @param obj $comment Comment object. + */ + do_action( 'wp_insert_comment', $id, $comment ); + + wp_cache_set( 'last_changed', microtime(), 'comment' ); + + return $id; +} + +/** + * Filters and sanitizes comment data. + * + * Sets the comment data 'filtered' field to true when finished. This can be + * checked as to whether the comment should be filtered and to keep from + * filtering the same comment more than once. + * + * @since 2.0.0 + * + * @param array $commentdata Contains information on the comment. + * @return array Parsed comment information. + */ +function wp_filter_comment($commentdata) { + if ( isset( $commentdata['user_ID'] ) ) { + /** + * Filter the comment author's user id before it is set. + * + * The first time this filter is evaluated, 'user_ID' is checked + * (for back-compat), followed by the standard 'user_id' value. + * + * @since 1.5.0 + * + * @param int $user_ID The comment author's user ID. + */ + $commentdata['user_id'] = apply_filters( 'pre_user_id', $commentdata['user_ID'] ); + } elseif ( isset( $commentdata['user_id'] ) ) { + /** This filter is documented in wp-includes/comment.php */ + $commentdata['user_id'] = apply_filters( 'pre_user_id', $commentdata['user_id'] ); + } + + /** + * Filter the comment author's browser user agent before it is set. + * + * @since 1.5.0 + * + * @param int $comment_agent The comment author's browser user agent. + */ + $commentdata['comment_agent'] = apply_filters( 'pre_comment_user_agent', ( isset( $commentdata['comment_agent'] ) ? $commentdata['comment_agent'] : '' ) ); + /** This filter is documented in wp-includes/comment.php */ + $commentdata['comment_author'] = apply_filters( 'pre_comment_author_name', $commentdata['comment_author'] ); + /** + * Filter the comment content before it is set. + * + * @since 1.5.0 + * + * @param int $comment_content The comment content. + */ + $commentdata['comment_content'] = apply_filters( 'pre_comment_content', $commentdata['comment_content'] ); + /** + * Filter the comment author's IP before it is set. + * + * @since 1.5.0 + * + * @param int $comment_author_ip The comment author's IP. + */ + $commentdata['comment_author_IP'] = apply_filters( 'pre_comment_user_ip', $commentdata['comment_author_IP'] ); + /** This filter is documented in wp-includes/comment.php */ + $commentdata['comment_author_url'] = apply_filters( 'pre_comment_author_url', $commentdata['comment_author_url'] ); + /** This filter is documented in wp-includes/comment.php */ + $commentdata['comment_author_email'] = apply_filters( 'pre_comment_author_email', $commentdata['comment_author_email'] ); + $commentdata['filtered'] = true; + return $commentdata; +} + +/** + * Whether a comment should be blocked because of comment flood. + * + * @since 2.1.0 + * + * @param bool $block Whether plugin has already blocked comment. + * @param int $time_lastcomment Timestamp for last comment. + * @param int $time_newcomment Timestamp for new comment. + * @return bool Whether comment should be blocked. + */ +function wp_throttle_comment_flood($block, $time_lastcomment, $time_newcomment) { + if ( $block ) // a plugin has already blocked... we'll let that decision stand + return $block; + if ( ($time_newcomment - $time_lastcomment) < 15 ) + return true; + return false; +} + +/** + * Adds a new comment to the database. + * + * Filters new comment to ensure that the fields are sanitized and valid before + * inserting comment into database. Calls 'comment_post' action with comment ID + * and whether comment is approved by WordPress. Also has 'preprocess_comment' + * filter for processing the comment data before the function handles it. + * + * We use REMOTE_ADDR here directly. If you are behind a proxy, you should ensure + * that it is properly set, such as in wp-config.php, for your environment. + * See {@link http://core.trac.wordpress.org/ticket/9235} + * + * @since 1.5.0 + * @param array $commentdata Contains information on the comment. + * @return int The ID of the comment after adding. + */ +function wp_new_comment( $commentdata ) { + /** + * Filter a comment's data before it is sanitized and inserted into the database. + * + * @since 1.5.0 + * + * @param array $commentdata Comment data. + */ + $commentdata = apply_filters( 'preprocess_comment', $commentdata ); + + $commentdata['comment_post_ID'] = (int) $commentdata['comment_post_ID']; + if ( isset($commentdata['user_ID']) ) + $commentdata['user_id'] = $commentdata['user_ID'] = (int) $commentdata['user_ID']; + elseif ( isset($commentdata['user_id']) ) + $commentdata['user_id'] = (int) $commentdata['user_id']; + + $commentdata['comment_parent'] = isset($commentdata['comment_parent']) ? absint($commentdata['comment_parent']) : 0; + $parent_status = ( 0 < $commentdata['comment_parent'] ) ? wp_get_comment_status($commentdata['comment_parent']) : ''; + $commentdata['comment_parent'] = ( 'approved' == $parent_status || 'unapproved' == $parent_status ) ? $commentdata['comment_parent'] : 0; + + $commentdata['comment_author_IP'] = preg_replace( '/[^0-9a-fA-F:., ]/', '',$_SERVER['REMOTE_ADDR'] ); + $commentdata['comment_agent'] = isset( $_SERVER['HTTP_USER_AGENT'] ) ? substr( $_SERVER['HTTP_USER_AGENT'], 0, 254 ) : ''; + + $commentdata['comment_date'] = current_time('mysql'); + $commentdata['comment_date_gmt'] = current_time('mysql', 1); + + $commentdata = wp_filter_comment($commentdata); + + $commentdata['comment_approved'] = wp_allow_comment($commentdata); + + $comment_ID = wp_insert_comment($commentdata); + + /** + * Fires immediately after a comment is inserted into the database. + * + * @since 1.2.0 + * + * @param int $comment_ID The comment ID. + * @param int $comment_approved 1 (true) if the comment is approved, 0 (false) if not. + */ + do_action( 'comment_post', $comment_ID, $commentdata['comment_approved'] ); + + if ( 'spam' !== $commentdata['comment_approved'] ) { // If it's spam save it silently for later crunching + if ( '0' == $commentdata['comment_approved'] ) { + wp_notify_moderator( $comment_ID ); + } + + // wp_notify_postauthor() checks if notifying the author of their own comment. + // By default, it won't, but filters can override this. + if ( get_option( 'comments_notify' ) && $commentdata['comment_approved'] ) { + wp_notify_postauthor( $comment_ID ); + } + } + + return $comment_ID; +} + +/** + * Sets the status of a comment. + * + * The 'wp_set_comment_status' action is called after the comment is handled. + * If the comment status is not in the list, then false is returned. + * + * @since 1.0.0 + * @uses wp_transition_comment_status() Passes new and old comment status along with $comment object + * + * @param int $comment_id Comment ID. + * @param string $comment_status New comment status, either 'hold', 'approve', 'spam', or 'trash'. + * @param bool $wp_error Whether to return a WP_Error object if there is a failure. Default is false. + * @return bool|WP_Error True on success, false or WP_Error on failure. + */ +function wp_set_comment_status($comment_id, $comment_status, $wp_error = false) { + global $wpdb; + + $status = '0'; + switch ( $comment_status ) { + case 'hold': + case '0': + $status = '0'; + break; + case 'approve': + case '1': + $status = '1'; + if ( get_option('comments_notify') ) { + wp_notify_postauthor( $comment_id ); + } + break; + case 'spam': + $status = 'spam'; + break; + case 'trash': + $status = 'trash'; + break; + default: + return false; + } + + $comment_old = clone get_comment($comment_id); + + if ( !$wpdb->update( $wpdb->comments, array('comment_approved' => $status), array('comment_ID' => $comment_id) ) ) { + if ( $wp_error ) + return new WP_Error('db_update_error', __('Could not update comment status'), $wpdb->last_error); + else + return false; + } + + clean_comment_cache($comment_id); + + $comment = get_comment($comment_id); + + /** + * Fires after a comment status has been updated in the database. + * + * The hook also fires immediately before comment status transition hooks are fired. + * + * @since 1.5.0 + * + * @param int $comment_id The comment ID. + * @param string|bool $comment_status The comment status. Possible values include 'hold', + * 'approve', 'spam', 'trash', or false. + */ + do_action( 'wp_set_comment_status', $comment_id, $comment_status ); + wp_transition_comment_status($comment_status, $comment_old->comment_approved, $comment); + + wp_update_comment_count($comment->comment_post_ID); + + return true; +} + +/** + * Updates an existing comment in the database. + * + * Filters the comment and makes sure certain fields are valid before updating. + * + * @since 2.0.0 + * @uses $wpdb + * @uses wp_transition_comment_status() Passes new and old comment status along with $comment object + * + * @param array $commentarr Contains information on the comment. + * @return int Comment was updated if value is 1, or was not updated if value is 0. + */ +function wp_update_comment($commentarr) { + global $wpdb; + + // First, get all of the original fields + $comment = get_comment($commentarr['comment_ID'], ARRAY_A); + if ( empty( $comment ) ) + return 0; + + // Escape data pulled from DB. + $comment = wp_slash($comment); + + $old_status = $comment['comment_approved']; + + // Merge old and new fields with new fields overwriting old ones. + $commentarr = array_merge($comment, $commentarr); + + $commentarr = wp_filter_comment( $commentarr ); + + // Now extract the merged array. + extract(wp_unslash($commentarr), EXTR_SKIP); + + /** + * Filter the comment content before it is updated in the database. + * + * @since 1.5.0 + * + * @param string $comment_content The comment data. + */ + $comment_content = apply_filters( 'comment_save_pre', $comment_content ); + + $comment_date_gmt = get_gmt_from_date($comment_date); + + if ( !isset($comment_approved) ) + $comment_approved = 1; + else if ( 'hold' == $comment_approved ) + $comment_approved = 0; + else if ( 'approve' == $comment_approved ) + $comment_approved = 1; + + $data = compact( 'comment_content', 'comment_author', 'comment_author_email', 'comment_approved', 'comment_karma', 'comment_author_url', 'comment_date', 'comment_date_gmt', 'comment_parent' ); + $rval = $wpdb->update( $wpdb->comments, $data, compact( 'comment_ID' ) ); + + clean_comment_cache($comment_ID); + wp_update_comment_count($comment_post_ID); + /** + * Fires immediately after a comment is updated in the database. + * + * The hook also fires immediately before comment status transition hooks are fired. + * + * @since 1.2.0 + * + * @param int $comment_ID The comment ID. + */ + do_action( 'edit_comment', $comment_ID ); + $comment = get_comment($comment_ID); + wp_transition_comment_status($comment->comment_approved, $old_status, $comment); + return $rval; +} + +/** + * Whether to defer comment counting. + * + * When setting $defer to true, all post comment counts will not be updated + * until $defer is set to false. When $defer is set to false, then all + * previously deferred updated post comment counts will then be automatically + * updated without having to call wp_update_comment_count() after. + * + * @since 2.5.0 + * @staticvar bool $_defer + * + * @param bool $defer + * @return unknown + */ +function wp_defer_comment_counting($defer=null) { + static $_defer = false; + + if ( is_bool($defer) ) { + $_defer = $defer; + // flush any deferred counts + if ( !$defer ) + wp_update_comment_count( null, true ); + } + + return $_defer; +} + +/** + * Updates the comment count for post(s). + * + * When $do_deferred is false (is by default) and the comments have been set to + * be deferred, the post_id will be added to a queue, which will be updated at a + * later date and only updated once per post ID. + * + * If the comments have not be set up to be deferred, then the post will be + * updated. When $do_deferred is set to true, then all previous deferred post + * IDs will be updated along with the current $post_id. + * + * @since 2.1.0 + * @see wp_update_comment_count_now() For what could cause a false return value + * + * @param int $post_id Post ID + * @param bool $do_deferred Whether to process previously deferred post comment counts + * @return bool True on success, false on failure + */ +function wp_update_comment_count($post_id, $do_deferred=false) { + static $_deferred = array(); + + if ( $do_deferred ) { + $_deferred = array_unique($_deferred); + foreach ( $_deferred as $i => $_post_id ) { + wp_update_comment_count_now($_post_id); + unset( $_deferred[$i] ); /** @todo Move this outside of the foreach and reset $_deferred to an array instead */ + } + } + + if ( wp_defer_comment_counting() ) { + $_deferred[] = $post_id; + return true; + } + elseif ( $post_id ) { + return wp_update_comment_count_now($post_id); + } + +} + +/** + * Updates the comment count for the post. + * + * @since 2.5.0 + * @uses $wpdb + * + * @param int $post_id Post ID + * @return bool True on success, false on '0' $post_id or if post with ID does not exist. + */ +function wp_update_comment_count_now($post_id) { + global $wpdb; + $post_id = (int) $post_id; + if ( !$post_id ) + return false; + if ( !$post = get_post($post_id) ) + return false; + + $old = (int) $post->comment_count; + $new = (int) $wpdb->get_var( $wpdb->prepare("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved = '1'", $post_id) ); + $wpdb->update( $wpdb->posts, array('comment_count' => $new), array('ID' => $post_id) ); + + clean_post_cache( $post ); + + /** + * Fires immediately after a post's comment count is updated in the database. + * + * @since 2.3.0 + * + * @param int $post_id Post ID. + * @param int $new The new comment count. + * @param int $old The old comment count. + */ + do_action( 'wp_update_comment_count', $post_id, $new, $old ); + /** This action is documented in wp-includes/post.php */ + do_action( 'edit_post', $post_id, $post ); + + return true; +} + +// +// Ping and trackback functions. +// + +/** + * Finds a pingback server URI based on the given URL. + * + * Checks the HTML for the rel="pingback" link and x-pingback headers. It does + * a check for the x-pingback headers first and returns that, if available. The + * check for the rel="pingback" has more overhead than just the header. + * + * @since 1.5.0 + * + * @param string $url URL to ping. + * @param int $deprecated Not Used. + * @return bool|string False on failure, string containing URI on success. + */ +function discover_pingback_server_uri( $url, $deprecated = '' ) { + if ( !empty( $deprecated ) ) + _deprecated_argument( __FUNCTION__, '2.7' ); + + $pingback_str_dquote = 'rel="pingback"'; + $pingback_str_squote = 'rel=\'pingback\''; + + /** @todo Should use Filter Extension or custom preg_match instead. */ + $parsed_url = parse_url($url); + + if ( ! isset( $parsed_url['host'] ) ) // Not an URL. This should never happen. + return false; + + //Do not search for a pingback server on our own uploads + $uploads_dir = wp_upload_dir(); + if ( 0 === strpos($url, $uploads_dir['baseurl']) ) + return false; + + $response = wp_safe_remote_head( $url, array( 'timeout' => 2, 'httpversion' => '1.0' ) ); + + if ( is_wp_error( $response ) ) + return false; + + if ( wp_remote_retrieve_header( $response, 'x-pingback' ) ) + return wp_remote_retrieve_header( $response, 'x-pingback' ); + + // Not an (x)html, sgml, or xml page, no use going further. + if ( preg_match('#(image|audio|video|model)/#is', wp_remote_retrieve_header( $response, 'content-type' )) ) + return false; + + // Now do a GET since we're going to look in the html headers (and we're sure it's not a binary file) + $response = wp_safe_remote_get( $url, array( 'timeout' => 2, 'httpversion' => '1.0' ) ); + + if ( is_wp_error( $response ) ) + return false; + + $contents = wp_remote_retrieve_body( $response ); + + $pingback_link_offset_dquote = strpos($contents, $pingback_str_dquote); + $pingback_link_offset_squote = strpos($contents, $pingback_str_squote); + if ( $pingback_link_offset_dquote || $pingback_link_offset_squote ) { + $quote = ($pingback_link_offset_dquote) ? '"' : '\''; + $pingback_link_offset = ($quote=='"') ? $pingback_link_offset_dquote : $pingback_link_offset_squote; + $pingback_href_pos = @strpos($contents, 'href=', $pingback_link_offset); + $pingback_href_start = $pingback_href_pos+6; + $pingback_href_end = @strpos($contents, $quote, $pingback_href_start); + $pingback_server_url_len = $pingback_href_end - $pingback_href_start; + $pingback_server_url = substr($contents, $pingback_href_start, $pingback_server_url_len); + + // We may find rel="pingback" but an incomplete pingback URL + if ( $pingback_server_url_len > 0 ) { // We got it! + return $pingback_server_url; + } + } + + return false; +} + +/** + * Perform all pingbacks, enclosures, trackbacks, and send to pingback services. + * + * @since 2.1.0 + * @uses $wpdb + */ +function do_all_pings() { + global $wpdb; + + // Do pingbacks + while ($ping = $wpdb->get_row("SELECT ID, post_content, meta_id FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '_pingme' LIMIT 1")) { + delete_metadata_by_mid( 'post', $ping->meta_id ); + pingback( $ping->post_content, $ping->ID ); + } + + // Do Enclosures + while ($enclosure = $wpdb->get_row("SELECT ID, post_content, meta_id FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '_encloseme' LIMIT 1")) { + delete_metadata_by_mid( 'post', $enclosure->meta_id ); + do_enclose( $enclosure->post_content, $enclosure->ID ); + } + + // Do Trackbacks + $trackbacks = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE to_ping <> '' AND post_status = 'publish'"); + if ( is_array($trackbacks) ) + foreach ( $trackbacks as $trackback ) + do_trackbacks($trackback); + + //Do Update Services/Generic Pings + generic_ping(); +} + +/** + * Perform trackbacks. + * + * @since 1.5.0 + * @uses $wpdb + * + * @param int $post_id Post ID to do trackbacks on. + */ +function do_trackbacks($post_id) { + global $wpdb; + + $post = get_post( $post_id ); + $to_ping = get_to_ping($post_id); + $pinged = get_pung($post_id); + if ( empty($to_ping) ) { + $wpdb->update($wpdb->posts, array('to_ping' => ''), array('ID' => $post_id) ); + return; + } + + if ( empty($post->post_excerpt) ) { + /** This filter is documented in wp-admin/post-template.php */ + $excerpt = apply_filters( 'the_content', $post->post_content, $post->ID ); + } else { + /** This filter is documented in wp-admin/post-template.php */ + $excerpt = apply_filters( 'the_excerpt', $post->post_excerpt ); + } + + $excerpt = str_replace(']]>', ']]>', $excerpt); + $excerpt = wp_html_excerpt($excerpt, 252, '…'); + + /** This filter is documented in wp-includes/post-template.php */ + $post_title = apply_filters( 'the_title', $post->post_title, $post->ID ); + $post_title = strip_tags($post_title); + + if ( $to_ping ) { + foreach ( (array) $to_ping as $tb_ping ) { + $tb_ping = trim($tb_ping); + if ( !in_array($tb_ping, $pinged) ) { + trackback($tb_ping, $post_title, $excerpt, $post_id); + $pinged[] = $tb_ping; + } else { + $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET to_ping = TRIM(REPLACE(to_ping, %s, '')) WHERE ID = %d", $tb_ping, $post_id) ); + } + } + } +} + +/** + * Sends pings to all of the ping site services. + * + * @since 1.2.0 + * + * @param int $post_id Post ID. Not actually used. + * @return int Same as Post ID from parameter + */ +function generic_ping($post_id = 0) { + $services = get_option('ping_sites'); + + $services = explode("\n", $services); + foreach ( (array) $services as $service ) { + $service = trim($service); + if ( '' != $service ) + weblog_ping($service); + } + + return $post_id; +} + +/** + * Pings back the links found in a post. + * + * @since 0.71 + * @uses $wp_version + * @uses IXR_Client + * + * @param string $content Post content to check for links. + * @param int $post_ID Post ID. + */ +function pingback($content, $post_ID) { + global $wp_version; + include_once(ABSPATH . WPINC . '/class-IXR.php'); + include_once(ABSPATH . WPINC . '/class-wp-http-ixr-client.php'); + + // original code by Mort (http://mort.mine.nu:8080) + $post_links = array(); + + $pung = get_pung($post_ID); + + // Step 1 + // Parsing the post, external links (if any) are stored in the $post_links array + $post_links_temp = wp_extract_urls( $content ); + + // Step 2. + // Walking thru the links array + // first we get rid of links pointing to sites, not to specific files + // Example: + // http://dummy-weblog.org + // http://dummy-weblog.org/ + // http://dummy-weblog.org/post.php + // We don't wanna ping first and second types, even if they have a valid + + foreach ( (array) $post_links_temp as $link_test ) : + if ( !in_array($link_test, $pung) && (url_to_postid($link_test) != $post_ID) // If we haven't pung it already and it isn't a link to itself + && !is_local_attachment($link_test) ) : // Also, let's never ping local attachments. + if ( $test = @parse_url($link_test) ) { + if ( isset($test['query']) ) + $post_links[] = $link_test; + elseif ( isset( $test['path'] ) && ( $test['path'] != '/' ) && ( $test['path'] != '' ) ) + $post_links[] = $link_test; + } + endif; + endforeach; + + $post_links = array_unique( $post_links ); + /** + * Fires just before pinging back links found in a post. + * + * @since 2.0.0 + * + * @param array &$post_links An array of post links to be checked, passed by reference. + * @param array &$pung Whether a link has already been pinged, passed by reference. + * @param int $post_ID The post ID. + */ + do_action_ref_array( 'pre_ping', array( &$post_links, &$pung, $post_ID ) ); + + foreach ( (array) $post_links as $pagelinkedto ) { + $pingback_server_url = discover_pingback_server_uri( $pagelinkedto ); + + if ( $pingback_server_url ) { + @ set_time_limit( 60 ); + // Now, the RPC call + $pagelinkedfrom = get_permalink($post_ID); + + // using a timeout of 3 seconds should be enough to cover slow servers + $client = new WP_HTTP_IXR_Client($pingback_server_url); + $client->timeout = 3; + /** + * Filter the user agent sent when pinging-back a URL. + * + * @since 2.9.0 + * + * @param string $concat_useragent The user agent concatenated with ' -- WordPress/' + * and the WordPress version. + * @param string $useragent The useragent. + * @param string $pingback_server_url The server URL being linked to. + * @param string $pagelinkedto URL of page linked to. + * @param string $pagelinkedfrom URL of page linked from. + */ + $client->useragent = apply_filters( 'pingback_useragent', $client->useragent . ' -- WordPress/' . $wp_version, $client->useragent, $pingback_server_url, $pagelinkedto, $pagelinkedfrom ); + // when set to true, this outputs debug messages by itself + $client->debug = false; + + if ( $client->query('pingback.ping', $pagelinkedfrom, $pagelinkedto) || ( isset($client->error->code) && 48 == $client->error->code ) ) // Already registered + add_ping( $post_ID, $pagelinkedto ); + } + } +} + +/** + * Check whether blog is public before returning sites. + * + * @since 2.1.0 + * + * @param mixed $sites Will return if blog is public, will not return if not public. + * @return mixed Empty string if blog is not public, returns $sites, if site is public. + */ +function privacy_ping_filter($sites) { + if ( '0' != get_option('blog_public') ) + return $sites; + else + return ''; +} + +/** + * Send a Trackback. + * + * Updates database when sending trackback to prevent duplicates. + * + * @since 0.71 + * @uses $wpdb + * + * @param string $trackback_url URL to send trackbacks. + * @param string $title Title of post. + * @param string $excerpt Excerpt of post. + * @param int $ID Post ID. + * @return mixed Database query from update. + */ +function trackback($trackback_url, $title, $excerpt, $ID) { + global $wpdb; + + if ( empty($trackback_url) ) + return; + + $options = array(); + $options['timeout'] = 4; + $options['body'] = array( + 'title' => $title, + 'url' => get_permalink($ID), + 'blog_name' => get_option('blogname'), + 'excerpt' => $excerpt + ); + + $response = wp_safe_remote_post( $trackback_url, $options ); + + if ( is_wp_error( $response ) ) + return; + + $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET pinged = CONCAT(pinged, '\n', %s) WHERE ID = %d", $trackback_url, $ID) ); + return $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET to_ping = TRIM(REPLACE(to_ping, %s, '')) WHERE ID = %d", $trackback_url, $ID) ); +} + +/** + * Send a pingback. + * + * @since 1.2.0 + * @uses $wp_version + * @uses IXR_Client + * + * @param string $server Host of blog to connect to. + * @param string $path Path to send the ping. + */ +function weblog_ping($server = '', $path = '') { + global $wp_version; + include_once(ABSPATH . WPINC . '/class-IXR.php'); + include_once(ABSPATH . WPINC . '/class-wp-http-ixr-client.php'); + + // using a timeout of 3 seconds should be enough to cover slow servers + $client = new WP_HTTP_IXR_Client($server, ((!strlen(trim($path)) || ('/' == $path)) ? false : $path)); + $client->timeout = 3; + $client->useragent .= ' -- WordPress/'.$wp_version; + + // when set to true, this outputs debug messages by itself + $client->debug = false; + $home = trailingslashit( home_url() ); + if ( !$client->query('weblogUpdates.extendedPing', get_option('blogname'), $home, get_bloginfo('rss2_url') ) ) // then try a normal ping + $client->query('weblogUpdates.ping', get_option('blogname'), $home); +} + +/** + * Default filter attached to pingback_ping_source_uri to validate the pingback's Source URI + * + * @since 3.5.1 + * @see wp_http_validate_url() + * + * @param string $source_uri + * @return string + */ +function pingback_ping_source_uri( $source_uri ) { + return (string) wp_http_validate_url( $source_uri ); +} + +/** + * Default filter attached to xmlrpc_pingback_error. + * + * Returns a generic pingback error code unless the error code is 48, + * which reports that the pingback is already registered. + * + * @since 3.5.1 + * @link http://www.hixie.ch/specs/pingback/pingback#TOC3 + * + * @param IXR_Error $ixr_error + * @return IXR_Error + */ +function xmlrpc_pingback_error( $ixr_error ) { + if ( $ixr_error->code === 48 ) + return $ixr_error; + return new IXR_Error( 0, '' ); +} + +// +// Cache +// + +/** + * Removes comment ID from the comment cache. + * + * @since 2.3.0 + * + * @param int|array $ids Comment ID or array of comment IDs to remove from cache + */ +function clean_comment_cache($ids) { + foreach ( (array) $ids as $id ) + wp_cache_delete($id, 'comment'); + + wp_cache_set( 'last_changed', microtime(), 'comment' ); +} + +/** + * Updates the comment cache of given comments. + * + * Will add the comments in $comments to the cache. If comment ID already exists + * in the comment cache then it will not be updated. The comment is added to the + * cache using the comment group with the key using the ID of the comments. + * + * @since 2.3.0 + * + * @param array $comments Array of comment row objects + */ +function update_comment_cache($comments) { + foreach ( (array) $comments as $comment ) + wp_cache_add($comment->comment_ID, $comment, 'comment'); +} + +// +// Internal +// + +/** + * Close comments on old posts on the fly, without any extra DB queries. Hooked to the_posts. + * + * @access private + * @since 2.7.0 + * + * @param object $posts Post data object. + * @param object $query Query object. + * @return object + */ +function _close_comments_for_old_posts( $posts, $query ) { + if ( empty( $posts ) || ! $query->is_singular() || ! get_option( 'close_comments_for_old_posts' ) ) + return $posts; + + /** + * Filter the list of post types to automatically close comments for. + * + * @since 3.2.0 + * + * @param array $post_types An array of registered post types. Default array with 'post'. + */ + $post_types = apply_filters( 'close_comments_for_post_types', array( 'post' ) ); + if ( ! in_array( $posts[0]->post_type, $post_types ) ) + return $posts; + + $days_old = (int) get_option( 'close_comments_days_old' ); + if ( ! $days_old ) + return $posts; + + if ( time() - strtotime( $posts[0]->post_date_gmt ) > ( $days_old * DAY_IN_SECONDS ) ) { + $posts[0]->comment_status = 'closed'; + $posts[0]->ping_status = 'closed'; + } + + return $posts; +} + +/** + * Close comments on an old post. Hooked to comments_open and pings_open. + * + * @access private + * @since 2.7.0 + * + * @param bool $open Comments open or closed + * @param int $post_id Post ID + * @return bool $open + */ +function _close_comments_for_old_post( $open, $post_id ) { + if ( ! $open ) + return $open; + + if ( !get_option('close_comments_for_old_posts') ) + return $open; + + $days_old = (int) get_option('close_comments_days_old'); + if ( !$days_old ) + return $open; + + $post = get_post($post_id); + + /** This filter is documented in wp-includes/comment.php */ + $post_types = apply_filters( 'close_comments_for_post_types', array( 'post' ) ); + if ( ! in_array( $post->post_type, $post_types ) ) + return $open; + + if ( time() - strtotime( $post->post_date_gmt ) > ( $days_old * DAY_IN_SECONDS ) ) + return false; + + return $open; +} diff --git a/wp-includes/compat.php b/wp-includes/compat.php new file mode 100644 index 0000000..cb2a559 --- /dev/null +++ b/wp-includes/compat.php @@ -0,0 +1,96 @@ + 'H32', 'sha1' => 'H40'); + + if ( !isset($packs[$algo]) ) + return false; + + $pack = $packs[$algo]; + + if (strlen($key) > 64) + $key = pack($pack, $algo($key)); + + $key = str_pad($key, 64, chr(0)); + + $ipad = (substr($key, 0, 64) ^ str_repeat(chr(0x36), 64)); + $opad = (substr($key, 0, 64) ^ str_repeat(chr(0x5C), 64)); + + $hmac = $algo($opad . pack($pack, $algo($ipad . $data))); + + if ( $raw_output ) + return pack( $pack, $hmac ); + return $hmac; +} + +if ( !function_exists('json_encode') ) { + function json_encode( $string ) { + global $wp_json; + + if ( !is_a($wp_json, 'Services_JSON') ) { + require_once( ABSPATH . WPINC . '/class-json.php' ); + $wp_json = new Services_JSON(); + } + + return $wp_json->encodeUnsafe( $string ); + } +} + +if ( !function_exists('json_decode') ) { + function json_decode( $string, $assoc_array = false ) { + global $wp_json; + + if ( !is_a($wp_json, 'Services_JSON') ) { + require_once( ABSPATH . WPINC . '/class-json.php' ); + $wp_json = new Services_JSON(); + } + + $res = $wp_json->decode( $string ); + if ( $assoc_array ) + $res = _json_decode_object_helper( $res ); + return $res; + } + function _json_decode_object_helper($data) { + if ( is_object($data) ) + $data = get_object_vars($data); + return is_array($data) ? array_map(__FUNCTION__, $data) : $data; + } +} diff --git a/wp-includes/cron.php b/wp-includes/cron.php new file mode 100644 index 0000000..cd39a08 --- /dev/null +++ b/wp-includes/cron.php @@ -0,0 +1,464 @@ + $hook, 'timestamp' => $timestamp, 'schedule' => false, 'args' => $args ); + /** + * Filter a single event before it is scheduled. + * + * @since 3.1.0 + * + * @param object $event An object containing an event's data. + */ + $event = apply_filters( 'schedule_event', $event ); + + // A plugin disallowed this event + if ( ! $event ) + return false; + + $key = md5(serialize($event->args)); + + $crons[$event->timestamp][$event->hook][$key] = array( 'schedule' => $event->schedule, 'args' => $event->args ); + uksort( $crons, "strnatcasecmp" ); + _set_cron_array( $crons ); +} + +/** + * Schedule a periodic event. + * + * Schedules a hook which will be executed by the WordPress actions core on a + * specific interval, specified by you. The action will trigger when someone + * visits your WordPress site, if the scheduled time has passed. + * + * Valid values for the recurrence are hourly, daily and twicedaily. These can + * be extended using the cron_schedules filter in wp_get_schedules(). + * + * Use wp_next_scheduled() to prevent duplicates + * + * @since 2.1.0 + * + * @param int $timestamp Timestamp for when to run the event. + * @param string $recurrence How often the event should recur. + * @param string $hook Action hook to execute when cron is run. + * @param array $args Optional. Arguments to pass to the hook's callback function. + * @return bool|null False on failure, null when complete with scheduling event. + */ +function wp_schedule_event( $timestamp, $recurrence, $hook, $args = array()) { + $crons = _get_cron_array(); + $schedules = wp_get_schedules(); + + if ( !isset( $schedules[$recurrence] ) ) + return false; + + $event = (object) array( 'hook' => $hook, 'timestamp' => $timestamp, 'schedule' => $recurrence, 'args' => $args, 'interval' => $schedules[$recurrence]['interval'] ); + /** This filter is documented in wp-includes/cron.php */ + $event = apply_filters( 'schedule_event', $event ); + + // A plugin disallowed this event + if ( ! $event ) + return false; + + $key = md5(serialize($event->args)); + + $crons[$event->timestamp][$event->hook][$key] = array( 'schedule' => $event->schedule, 'args' => $event->args, 'interval' => $event->interval ); + uksort( $crons, "strnatcasecmp" ); + _set_cron_array( $crons ); +} + +/** + * Reschedule a recurring event. + * + * @since 2.1.0 + * + * @param int $timestamp Timestamp for when to run the event. + * @param string $recurrence How often the event should recur. + * @param string $hook Action hook to execute when cron is run. + * @param array $args Optional. Arguments to pass to the hook's callback function. + * @return bool|null False on failure. Null when event is rescheduled. + */ +function wp_reschedule_event( $timestamp, $recurrence, $hook, $args = array()) { + $crons = _get_cron_array(); + $schedules = wp_get_schedules(); + $key = md5(serialize($args)); + $interval = 0; + + // First we try to get it from the schedule + if ( 0 == $interval ) + $interval = $schedules[$recurrence]['interval']; + // Now we try to get it from the saved interval in case the schedule disappears + if ( 0 == $interval ) + $interval = $crons[$timestamp][$hook][$key]['interval']; + // Now we assume something is wrong and fail to schedule + if ( 0 == $interval ) + return false; + + $now = time(); + + if ( $timestamp >= $now ) + $timestamp = $now + $interval; + else + $timestamp = $now + ($interval - (($now - $timestamp) % $interval)); + + wp_schedule_event( $timestamp, $recurrence, $hook, $args ); +} + +/** + * Unschedule a previously scheduled cron job. + * + * The $timestamp and $hook parameters are required, so that the event can be + * identified. + * + * @since 2.1.0 + * + * @param int $timestamp Timestamp for when to run the event. + * @param string $hook Action hook, the execution of which will be unscheduled. + * @param array $args Arguments to pass to the hook's callback function. + * Although not passed to a callback function, these arguments are used + * to uniquely identify the scheduled event, so they should be the same + * as those used when originally scheduling the event. + */ +function wp_unschedule_event( $timestamp, $hook, $args = array() ) { + $crons = _get_cron_array(); + $key = md5(serialize($args)); + unset( $crons[$timestamp][$hook][$key] ); + if ( empty($crons[$timestamp][$hook]) ) + unset( $crons[$timestamp][$hook] ); + if ( empty($crons[$timestamp]) ) + unset( $crons[$timestamp] ); + _set_cron_array( $crons ); +} + +/** + * Unschedule all cron jobs attached to a specific hook. + * + * @since 2.1.0 + * + * @param string $hook Action hook, the execution of which will be unscheduled. + * @param array $args Optional. Arguments that were to be pass to the hook's callback function. + */ +function wp_clear_scheduled_hook( $hook, $args = array() ) { + // Backward compatibility + // Previously this function took the arguments as discrete vars rather than an array like the rest of the API + if ( !is_array($args) ) { + _deprecated_argument( __FUNCTION__, '3.0', __('This argument has changed to an array to match the behavior of the other cron functions.') ); + $args = array_slice( func_get_args(), 1 ); + } + + // This logic duplicates wp_next_scheduled() + // It's required due to a scenario where wp_unschedule_event() fails due to update_option() failing, + // and, wp_next_scheduled() returns the same schedule in an infinite loop. + $crons = _get_cron_array(); + if ( empty( $crons ) ) + return; + + $key = md5( serialize( $args ) ); + foreach ( $crons as $timestamp => $cron ) { + if ( isset( $cron[ $hook ][ $key ] ) ) { + wp_unschedule_event( $timestamp, $hook, $args ); + } + } +} + +/** + * Retrieve the next timestamp for a cron event. + * + * @since 2.1.0 + * + * @param string $hook Action hook to execute when cron is run. + * @param array $args Optional. Arguments to pass to the hook's callback function. + * @return bool|int The UNIX timestamp of the next time the scheduled event will occur. + */ +function wp_next_scheduled( $hook, $args = array() ) { + $crons = _get_cron_array(); + $key = md5(serialize($args)); + if ( empty($crons) ) + return false; + foreach ( $crons as $timestamp => $cron ) { + if ( isset( $cron[$hook][$key] ) ) + return $timestamp; + } + return false; +} + +/** + * Send request to run cron through HTTP request that doesn't halt page loading. + * + * @since 2.1.0 + * + * @return null Cron could not be spawned, because it is not needed to run. + */ +function spawn_cron( $gmt_time = 0 ) { + + if ( ! $gmt_time ) + $gmt_time = microtime( true ); + + if ( defined('DOING_CRON') || isset($_GET['doing_wp_cron']) ) + return; + + /* + * multiple processes on multiple web servers can run this code concurrently + * try to make this as atomic as possible by setting doing_cron switch + */ + $lock = get_transient('doing_cron'); + + if ( $lock > $gmt_time + 10 * MINUTE_IN_SECONDS ) + $lock = 0; + + // don't run if another process is currently running it or more than once every 60 sec. + if ( $lock + WP_CRON_LOCK_TIMEOUT > $gmt_time ) + return; + + //sanity check + $crons = _get_cron_array(); + if ( !is_array($crons) ) + return; + + $keys = array_keys( $crons ); + if ( isset($keys[0]) && $keys[0] > $gmt_time ) + return; + + if ( defined('ALTERNATE_WP_CRON') && ALTERNATE_WP_CRON ) { + if ( !empty($_POST) || defined('DOING_AJAX') ) + return; + + $doing_wp_cron = sprintf( '%.22F', $gmt_time ); + set_transient( 'doing_cron', $doing_wp_cron ); + + ob_start(); + wp_redirect( add_query_arg( 'doing_wp_cron', $doing_wp_cron, wp_unslash( $_SERVER['REQUEST_URI'] ) ) ); + echo ' '; + + // flush any buffers and send the headers + while ( @ob_end_flush() ); + flush(); + + WP_DEBUG ? include_once( ABSPATH . 'wp-cron.php' ) : @include_once( ABSPATH . 'wp-cron.php' ); + return; + } + + $doing_wp_cron = sprintf( '%.22F', $gmt_time ); + set_transient( 'doing_cron', $doing_wp_cron ); + + /** + * Filter the cron request arguments. + * + * @since 3.5.0 + * + * @param array $cron_request_array { + * An array of cron request URL arguments. + * + * @type string $url The cron request URL. + * @type int $key The 22 digit GMT microtime. + * @type array $args { + * An array of cron request arguments. + * + * @type int $timeout The request timeout in seconds. Default .01 seconds. + * @type bool $blocking Whether to set blocking for the request. Default false. + * @type bool $sslverify Whether to sslverify. Default true. + * } + * } + */ + $cron_request = apply_filters( 'cron_request', array( + 'url' => add_query_arg( 'doing_wp_cron', $doing_wp_cron, site_url( 'wp-cron.php' ) ), + 'key' => $doing_wp_cron, + 'args' => array( + 'timeout' => 0.01, + 'blocking' => false, + /** This filter is documented in wp-includes/class-http.php */ + 'sslverify' => apply_filters( 'https_local_ssl_verify', true ) + ) + ) ); + + wp_remote_post( $cron_request['url'], $cron_request['args'] ); +} + +/** + * Run scheduled callbacks or spawn cron for all scheduled events. + * + * @since 2.1.0 + * + * @return null When doesn't need to run Cron. + */ +function wp_cron() { + + // Prevent infinite loops caused by lack of wp-cron.php + if ( strpos($_SERVER['REQUEST_URI'], '/wp-cron.php') !== false || ( defined('DISABLE_WP_CRON') && DISABLE_WP_CRON ) ) + return; + + if ( false === $crons = _get_cron_array() ) + return; + + $gmt_time = microtime( true ); + $keys = array_keys( $crons ); + if ( isset($keys[0]) && $keys[0] > $gmt_time ) + return; + + $schedules = wp_get_schedules(); + foreach ( $crons as $timestamp => $cronhooks ) { + if ( $timestamp > $gmt_time ) break; + foreach ( (array) $cronhooks as $hook => $args ) { + if ( isset($schedules[$hook]['callback']) && !call_user_func( $schedules[$hook]['callback'] ) ) + continue; + spawn_cron( $gmt_time ); + break 2; + } + } +} + +/** + * Retrieve supported and filtered Cron recurrences. + * + * The supported recurrences are 'hourly' and 'daily'. A plugin may add more by + * hooking into the 'cron_schedules' filter. The filter accepts an array of + * arrays. The outer array has a key that is the name of the schedule or for + * example 'weekly'. The value is an array with two keys, one is 'interval' and + * the other is 'display'. + * + * The 'interval' is a number in seconds of when the cron job should run. So for + * 'hourly', the time is 3600 or 60*60. For weekly, the value would be + * 60*60*24*7 or 604800. The value of 'interval' would then be 604800. + * + * The 'display' is the description. For the 'weekly' key, the 'display' would + * be __('Once Weekly'). + * + * For your plugin, you will be passed an array. you can easily add your + * schedule by doing the following. + * + * // filter parameter variable name is 'array' + * $array['weekly'] = array( + * 'interval' => 604800, + * 'display' => __('Once Weekly') + * ); + * + * + * @since 2.1.0 + * + * @return array + */ +function wp_get_schedules() { + $schedules = array( + 'hourly' => array( 'interval' => HOUR_IN_SECONDS, 'display' => __( 'Once Hourly' ) ), + 'twicedaily' => array( 'interval' => 12 * HOUR_IN_SECONDS, 'display' => __( 'Twice Daily' ) ), + 'daily' => array( 'interval' => DAY_IN_SECONDS, 'display' => __( 'Once Daily' ) ), + ); + /** + * Filter the non-default cron schedules. + * + * @since 2.1.0 + * + * @param array $new_schedules An array of non-default cron schedules. Default empty. + */ + return array_merge( apply_filters( 'cron_schedules', array() ), $schedules ); +} + +/** + * Retrieve Cron schedule for hook with arguments. + * + * @since 2.1.0 + * + * @param string $hook Action hook to execute when cron is run. + * @param array $args Optional. Arguments to pass to the hook's callback function. + * @return string|bool False, if no schedule. Schedule on success. + */ +function wp_get_schedule($hook, $args = array()) { + $crons = _get_cron_array(); + $key = md5(serialize($args)); + if ( empty($crons) ) + return false; + foreach ( $crons as $timestamp => $cron ) { + if ( isset( $cron[$hook][$key] ) ) + return $cron[$hook][$key]['schedule']; + } + return false; +} + +// +// Private functions +// + +/** + * Retrieve cron info array option. + * + * @since 2.1.0 + * @access private + * + * @return array CRON info array. + */ +function _get_cron_array() { + $cron = get_option('cron'); + if ( ! is_array($cron) ) + return false; + + if ( !isset($cron['version']) ) + $cron = _upgrade_cron_array($cron); + + unset($cron['version']); + + return $cron; +} + +/** + * Updates the CRON option with the new CRON array. + * + * @since 2.1.0 + * @access private + * + * @param array $cron Cron info array from {@link _get_cron_array()}. + */ +function _set_cron_array($cron) { + $cron['version'] = 2; + update_option( 'cron', $cron ); +} + +/** + * Upgrade a Cron info array. + * + * This function upgrades the Cron info array to version 2. + * + * @since 2.1.0 + * @access private + * + * @param array $cron Cron info array from {@link _get_cron_array()}. + * @return array An upgraded Cron info array. + */ +function _upgrade_cron_array($cron) { + if ( isset($cron['version']) && 2 == $cron['version']) + return $cron; + + $new_cron = array(); + + foreach ( (array) $cron as $timestamp => $hooks) { + foreach ( (array) $hooks as $hook => $args ) { + $key = md5(serialize($args['args'])); + $new_cron[$timestamp][$hook][$key] = $args; + } + } + + $new_cron['version'] = 2; + update_option( 'cron', $new_cron ); + return $new_cron; +} diff --git a/wp-includes/css/admin-bar-rtl.css b/wp-includes/css/admin-bar-rtl.css new file mode 100644 index 0000000..6a1e827 --- /dev/null +++ b/wp-includes/css/admin-bar-rtl.css @@ -0,0 +1,1100 @@ +#wpadminbar * { + height: auto; + width: auto; + margin: 0; + padding: 0; + position: static; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + font: normal 13px/32px "Open Sans", sans-serif; + -webkit-border-radius: 0; + border-radius: 0; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + -webkit-transition: none; + transition: none; + -webkit-font-smoothing: subpixel-antialiased; /* Prevent Safari from switching to standard antialiasing on hover */ +} + +.rtl #wpadminbar * { + font-family: Tahoma, sans-serif; +} + +html:lang(he-il) .rtl #wpadminbar * { + font-family: Arial, sans-serif; +} + +#wpadminbar a.ab-item, +#wpadminbar > #wp-toolbar span.ab-label, +#wpadminbar > #wp-toolbar span.noticon { + color: #eee; +} + +#wpadminbar #wp-admin-bar-site-name a.ab-item, +#wpadminbar #wp-admin-bar-my-sites a.ab-item { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +#wpadminbar ul li:before, +#wpadminbar ul li:after { + content: normal; +} + +#wpadminbar a, +#wpadminbar a:hover, +#wpadminbar a img, +#wpadminbar a img:hover { + outline: none; + border: none; + text-decoration: none; + background: none; +} + +#wpadminbar a:focus, +#wpadminbar a:active, +#wpadminbar input[type="text"], +#wpadminbar input[type="password"], +#wpadminbar input[type="number"], +#wpadminbar input[type="search"], +#wpadminbar input[type="email"], +#wpadminbar input[type="url"], +#wpadminbar select, +#wpadminbar textarea, +#wpadminbar div { + outline: none; +} + +#wpadminbar { + direction: rtl; + color: #ccc; + font: normal 13px/32px "Open Sans", sans-serif; + height: 32px; + position: fixed; + top: 0; + right: 0; + width: 100%; + min-width: 600px; /* match the min-width of the body in wp-admin.css */ + z-index: 99999; + background: #222; +} + +#wpadminbar .ab-sub-wrapper, +#wpadminbar ul, +#wpadminbar ul li { + background: none; + clear: none; + list-style: none; + margin: 0; + padding: 0; + position: relative; + text-indent: 0; + z-index: 99999; +} + +#wpadminbar ul#wp-admin-bar-root-default>li { + margin-left: 0; +} + +/* Prevent a Chrome bug that inadvertantly activates + :hover states on an element that touches the extreme + top left corner of the viewport. See #18868 */ +#wpadminbar .quicklinks { + border-right: 1px solid transparent; +} + +#wpadminbar .quicklinks ul { + text-align: right; +} + +#wpadminbar li { + float: right; +} + +#wpadminbar .ab-empty-item { + outline: none; +} + +#wpadminbar .quicklinks .ab-top-secondary > li { + float: left; +} + +#wpadminbar .quicklinks a, +#wpadminbar .quicklinks .ab-empty-item, +#wpadminbar .shortlink-input { + height: 32px; + display: block; + padding: 0 10px; + margin: 0; +} + +#wpadminbar .quicklinks > ul > li > a { + padding: 0 7px 0 8px; +} + +#wpadminbar .menupop .ab-sub-wrapper, +#wpadminbar .shortlink-input { + margin: 0; + padding: 0; + -webkit-box-shadow: 0 3px 5px rgba(0,0,0,0.2); + box-shadow: 0 3px 5px rgba(0,0,0,0.2); + background: #333; + display: none; + position: absolute; + float: none; +} + +#wpadminbar.ie7 .menupop .ab-sub-wrapper, +#wpadminbar.ie7 .shortlink-input { + top: 32px; + right: 0; +} + +#wpadminbar .ab-top-menu > .menupop > .ab-sub-wrapper { + min-width: 100%; +} + +#wpadminbar .ab-top-secondary .menupop .ab-sub-wrapper { + left: 0; + right: auto; +} + +#wpadminbar .ab-submenu { + padding: 6px 0; +} + +#wpadminbar .selected .shortlink-input { + display: block; +} + +#wpadminbar .quicklinks .menupop ul li { + float: none; +} + +#wpadminbar .quicklinks .menupop ul li a strong { + font-weight: bold; +} + +#wpadminbar .quicklinks .menupop ul li .ab-item, +#wpadminbar .quicklinks .menupop ul li a strong, +#wpadminbar .quicklinks .menupop.hover ul li .ab-item, +#wpadminbar.nojs .quicklinks .menupop:hover ul li .ab-item, +#wpadminbar .shortlink-input { + line-height: 26px; + height: 26px; + white-space: nowrap; + min-width: 140px; +} + +#wpadminbar .shortlink-input { + width: 200px; +} + +#wpadminbar.nojs li:hover > .ab-sub-wrapper, +#wpadminbar li.hover > .ab-sub-wrapper { + display: block; +} + +#wpadminbar .menupop li:hover > .ab-sub-wrapper, +#wpadminbar .menupop li.hover > .ab-sub-wrapper { + margin-right: 100%; + margin-top: -32px; +} + +#wpadminbar .ab-top-secondary .menupop li:hover > .ab-sub-wrapper, +#wpadminbar .ab-top-secondary .menupop li.hover > .ab-sub-wrapper { + margin-right: 0; + right: inherit; + left: 100%; +} + +#wpadminbar .ab-top-menu > li > .ab-item:focus, +#wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus, +#wpadminbar .ab-top-menu > li:hover > .ab-item, +#wpadminbar .ab-top-menu > li.hover > .ab-item { + background: #333; + color: #2ea2cc; +} + +#wpadminbar > #wp-toolbar li:hover span.ab-label, +#wpadminbar > #wp-toolbar li.hover span.ab-label, +#wpadminbar > #wp-toolbar a:focus span.ab-label { + color: #2ea2cc; +} + +#wpadminbar > #wp-toolbar > #wp-admin-bar-root-default .ab-icon, +#wpadminbar .ab-icon, +#wpadminbar .ab-item:before { + position: relative; + float: right; + font: normal 20px/1 'dashicons'; + speak: none; + padding: 4px 0; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + background-image: none !important; + margin-left: 6px; +} + +#wpadminbar .ab-icon:before, +#wpadminbar .ab-item:before, +#wpadminbar #adminbarsearch:before { + color: #999; +} + +#wpadminbar .ab-icon:before, +#wpadminbar .ab-item:before, +#wpadminbar #adminbarsearch:before { + position: relative; + -webkit-transition: all .1s ease-in-out; + transition: all .1s ease-in-out; +} + +#wpadminbar .ab-label { + display: inline-block; + height: 32px; +} + +#wpadminbar .ab-submenu .ab-item { + color: #eee; +} + +#wpadminbar .quicklinks .menupop ul li a, +#wpadminbar .quicklinks .menupop ul li a strong, +#wpadminbar .quicklinks .menupop.hover ul li a, +#wpadminbar.nojs .quicklinks .menupop:hover ul li a { + color: #eee; +} + +#wpadminbar .quicklinks .menupop ul li a:hover, +#wpadminbar .quicklinks .menupop ul li a:focus, +#wpadminbar .quicklinks .menupop ul li a:hover strong, +#wpadminbar .quicklinks .menupop ul li a:focus strong, +#wpadminbar .quicklinks .menupop.hover ul li a:hover, +#wpadminbar .quicklinks .menupop.hover ul li a:focus, +#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover, +#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus, +#wpadminbar li:hover .ab-icon:before, +#wpadminbar li:hover .ab-item:before, +#wpadminbar li a:focus .ab-icon:before, +#wpadminbar li .ab-item:focus:before, +#wpadminbar li.hover .ab-icon:before, +#wpadminbar li.hover .ab-item:before, +#wpadminbar li:hover #adminbarsearch:before { + color: #2ea2cc; +} + +#wpadminbar .menupop .menupop > .ab-item:before, +#wpadminbar .ab-top-secondary .menupop .menupop > .ab-item:before { + position: absolute; + font: normal 17px/1 'dashicons'; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +#wpadminbar .menupop .menupop > .ab-item { + display: block; + padding-left: 2em; +} + +#wpadminbar .menupop .menupop > .ab-item:before { + top: 1px; + left: 4px; + content: '\f139'; + color: inherit; +} + +#wpadminbar .ab-top-secondary .menupop .menupop > .ab-item { + padding-right: 2em; + padding-left: 1em; +} + +#wpadminbar .ab-top-secondary .menupop .menupop > .ab-item:before { + top: 5px; + right: 3px; + content: '\f141'; +} + +#wpadminbar .quicklinks .menupop ul.ab-sub-secondary { + display: block; + position: relative; + left: auto; + margin: 0; + -webkit-box-shadow: none; + box-shadow: none; +} + +#wpadminbar .quicklinks .menupop ul.ab-sub-secondary, +#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu { + background: #4b4b4b; +} + +#wpadminbar .quicklinks .menupop .ab-sub-secondary > li > a:hover, +#wpadminbar .quicklinks .menupop .ab-sub-secondary > li .ab-item:focus a { + color: #2ea2cc; +} + +#wpadminbar .quicklinks a span#ab-updates { + background: #eee; + color: #333; + display: inline; + padding: 2px 5px; + font-size: 10px; + font-weight: bold; + -webkit-border-radius: 10px; + border-radius: 10px; +} + +#wpadminbar .quicklinks a:hover span#ab-updates { + background: #fff; + color: #000; +} + +#wpadminbar .ab-top-secondary { + float: left; +} + +#wpadminbar ul li:last-child, +#wpadminbar ul li:last-child .ab-item { + -webkit-box-shadow: none; + box-shadow: none; +} + +/** + * My Account + */ +#wp-admin-bar-my-account > ul { + min-width: 198px; +} + +#wp-admin-bar-my-account > .ab-item:before { + content: "\f110"; + top: 2px; + float: left; + margin-right: 6px; + margin-left: 0; +} + +#wp-admin-bar-my-account.with-avatar > .ab-item:before { + display: none; + content: none; +} + +#wp-admin-bar-my-account.with-avatar > ul { + min-width: 270px; +} + +#wpadminbar #wp-admin-bar-user-actions > li { + margin-right: 16px; + margin-left: 16px; +} + +#wpadminbar #wp-admin-bar-user-actions.ab-submenu { + padding: 6px 0 12px; +} + +#wpadminbar #wp-admin-bar-my-account.with-avatar #wp-admin-bar-user-actions > li { + margin-right: 88px; +} + +#wpadminbar #wp-admin-bar-user-info { + margin-top: 6px; + margin-bottom: 15px; + height: auto; + background: none; +} + +#wp-admin-bar-user-info .avatar { + position: absolute; + right: -72px; + top: 4px; + width: 64px; + height: 64px; +} + +#wpadminbar #wp-admin-bar-user-info a { + background: none; + height: auto; +} + +#wpadminbar #wp-admin-bar-user-info span { + background: none; + padding: 0; + height: 18px; +} + +#wpadminbar #wp-admin-bar-user-info .display-name, +#wpadminbar #wp-admin-bar-user-info .username { + display: block; +} + +#wpadminbar #wp-admin-bar-user-info .username { + color: #999; + font-size: 11px; +} + +#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img { + width: 16px; + height: 16px; + padding: 0; + border: 1px solid #888; + background: #eee; + line-height: 24px; + vertical-align: middle; + margin: -4px 6px 0 0; + float: none; + display: inline; +} + +/** + * WP Logo + */ +#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon { + width: 15px; + height: 20px; + margin-left: 0; + padding: 6px 0 5px; +} + +#wpadminbar #wp-admin-bar-wp-logo > .ab-item { + padding: 0 7px; +} + +#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before { + content: '\f120'; + top: 2px; +} + +/* + * My Sites & Site Title + */ +#wpadminbar .quicklinks li .blavatar { + float: right; + font: normal 16px/1 'dashicons' !important; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + color: #eee; +} + +#wpadminbar .quicklinks li a:hover .blavatar { + color: #2ea2cc; +} + +#wpadminbar .quicklinks li .blavatar:before { + content: '\f120'; + height: 16px; + width: 16px; + display: inline-block; + margin: 6px -2px 0 8px; +} + +#wpadminbar #wp-admin-bar-appearance { + margin-top: -12px; +} + +#wpadminbar #wp-admin-bar-my-sites > .ab-item:before, +#wpadminbar #wp-admin-bar-site-name > .ab-item:before { + content: '\f112'; + top: 2px; +} + +#wpadminbar #wp-admin-bar-edit > .ab-item:before { + content: '\f464'; + top: 2px; +} + +#wpadminbar #wp-admin-bar-site-name > .ab-item:before { + content: "\f102"; +} + + + +/** + * Comments + */ +#wpadminbar #wp-admin-bar-comments .ab-icon { + margin-left: 6px; +} + +#wpadminbar #wp-admin-bar-comments .ab-icon:before { + content: '\f101'; + top: 3px; +} + +#wpadminbar #wp-admin-bar-comments .count-0 { + opacity: .5; +} + +/** + * New Content + */ +#wpadminbar #wp-admin-bar-new-content .ab-icon:before { + content: '\f132'; + top: 4px; +} + +/** + * Updates + */ +#wpadminbar #wp-admin-bar-updates .ab-icon:before { + content: '\f463'; + top: 2px; +} + +/** + * Search + */ +#wpadminbar #wp-admin-bar-search .ab-item { + padding: 0; + background: transparent; +} + +#wpadminbar #adminbarsearch { + position: relative; + height: 32px; + padding: 0 2px; +} + +#wpadminbar #adminbarsearch:before { + position: absolute; + top: 6px; + right: 5px; + z-index: 20; + font: normal 20px/1 'dashicons' !important; + content: '\f179'; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +#wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input { + position: relative; + z-index: 30; + font: 13px/24px "Open Sans", sans-serif; + height: 24px; + width: 24px; + padding: 0 24px 0 3px; + margin: 0; + color: #ccc; + background-color: rgba( 255, 255, 255, 0 ); + border: none; + outline: none; + cursor: pointer; + -webkit-box-shadow: none; + box-shadow: none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-transition-duration: 400ms; + transition-duration: 400ms; + -webkit-transition-property: width, background; + transition-property: width, background; + -webkit-transition-timing-function: ease; + transition-timing-function: ease; +} + +#wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input:focus { + z-index: 10; + color: #000; + width: 200px; + background-color: rgba( 255, 255, 255, 0.9 ); + cursor: text; + border: 0; +} + +#wpadminbar.ie7 > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input { + margin-top: 3px; + width: 120px; +} + +#wpadminbar.ie8 > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input { + margin-top: 4px; + background-color: #464646; +} + +#wpadminbar.ie8 > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input:focus { + background-color: #fff; +} + +#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder { + color: #999; +} +#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder { + color: #999; +} +#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder { + color: #999; +} +#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder { + color: #999; +} + +#wpadminbar #adminbarsearch .adminbar-button { + display: none; +} + +/** + * Customize support classes + */ +.no-customize-support .hide-if-no-customize, +.customize-support .hide-if-customize, +.no-customize-support.wp-core-ui .hide-if-no-customize, +.no-customize-support .wp-core-ui .hide-if-no-customize, +.customize-support.wp-core-ui .hide-if-customize, +.customize-support .wp-core-ui .hide-if-customize { + display: none; +} + +/* Skip link */ +#wpadminbar .screen-reader-text, +#wpadminbar .screen-reader-text span { + position: absolute; + right: -1000em; + top: -1000em; + height: 1px; + width: 1px; + overflow: hidden; +} + +#wpadminbar .screen-reader-shortcut { + position: absolute; + top: -1000em; +} + +#wpadminbar .screen-reader-shortcut:focus { + right: 6px; + top: 7px; + height: auto; + width: auto; + display: block; + font-size: 14px; + font-weight: bold; + padding: 15px 23px 14px; + background: #f1f1f1; + color: #21759b; + z-index: 100000; + line-height: normal; + text-decoration: none; + -webkit-box-shadow: 0 0 2px 2px rgba(0,0,0,.6); + box-shadow: 0 0 2px 2px rgba(0,0,0,.6); +} + +/** + * IE 6-targeted rules + */ +* html #wpadminbar { + overflow: hidden; + position: absolute; +} + +* html #wpadminbar .quicklinks ul li a { + float: right; +} + +* html #wpadminbar .menupop a span { + background-image: none; +} + +/* No @font-face support */ +.no-font-face #wpadminbar ul.ab-top-menu > li > a.ab-item { + display: block; + width: 45px; + text-align: center; + overflow: hidden; + margin: 0 3px; +} + +.no-font-face #wpadminbar #wp-admin-bar-my-sites > .ab-item, +.no-font-face #wpadminbar #wp-admin-bar-site-name > .ab-item, +.no-font-face #wpadminbar #wp-admin-bar-edit > .ab-item { + text-indent: 0; +} + +.no-font-face #wpadminbar .ab-icon, +.no-font-face #wpadminbar .ab-icon:before, +.no-font-face #wpadminbar a.ab-item:before, +.no-font-face #wpadminbar #wp-admin-bar-wp-logo > .ab-item { + display: none !important; +} + +.no-font-face #wpadminbar ul.ab-top-menu > li > a > span.ab-label { + display: inline; +} + +.no-font-face #wpadminbar #wp-admin-bar-menu-toggle span.ab-icon { + display: inline !important; +} + +.no-font-face #wpadminbar #wp-admin-bar-menu-toggle span.ab-icon:before { + content: "Menu"; + font: 14px/45px sans-serif !important; + display: inline-block !important; + color: #fff; +} + +.no-font-face #wpadminbar #wp-admin-bar-site-name a.ab-item { + color: #fff; +} +/* End no @font-face */ + +@media screen and ( max-width: 782px ) { + /* Toolbar Touchification*/ + html #wpadminbar { + right: 0 !important; + z-index: 500 !important; + height: 46px; + min-width: 300px; + + /* These rules break dropdown tappability on Chrome/Android. + -webkit-transform: translate3d(0, 0, 0); + -webkit-backface-visibility: hidden; + -webkit-transition: 0; + transform: translate3d(0, 0, 0); + backface-visibility: hidden; + transition: 0; + */ + } + + #wpadminbar * { + font: normal 14px/32px "Open Sans", sans-serif; + } + + #wpadminbar .quicklinks > ul > li > a, + #wpadminbar .quicklinks .ab-empty-item { + padding: 0; + height: 46px; + line-height: 46px; + width: auto; + } + + #wpadminbar .ab-icon { + font: 40px/1 dashicons !important; + margin: 0; + padding: 0; + width: 52px; + height: 46px; + text-align: center; + } + + #wpadminbar .ab-icon:before { + text-align: center; + } + + #wpadminbar .ab-submenu { + padding: 0; + } + + #wpadminbar #wp-admin-bar-site-name a.ab-item, + #wpadminbar #wp-admin-bar-my-sites a.ab-item, + #wpadminbar #wp-admin-bar-my-account a.ab-item { + text-overflow: clip; + } + + #wpadminbar .ab-label { + display: none; + } + + #wpadminbar .menupop li:hover > .ab-sub-wrapper, + #wpadminbar .menupop li.hover > .ab-sub-wrapper { + margin-top: -46px; + } + + #wpadminbar .ab-top-menu .menupop .ab-sub-wrapper .menupop > .ab-item { + padding-left: 30px; + } + + #wpadminbar .menupop .menupop > .ab-item:before { + top: 10px; + left: 6px; + } + + #wpadminbar .ab-top-menu > .menupop > .ab-sub-wrapper .ab-item { + font-size: 16px; + padding: 6px 15px 12px; + } + + #wpadminbar .ab-top-menu > .menupop > .ab-sub-wrapper a:empty { + display: none; + } + + /* WP logo */ + #wpadminbar #wp-admin-bar-wp-logo > .ab-item { + padding: 0; + } + + #wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon { + padding: 0; + width: 52px; + height: 46px; + text-align: center; + vertical-align: top; + } + + #wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before { + font: 28px/1 'dashicons' !important; + top: -3px; + } + + #wpadminbar .ab-icon, + #wpadminbar .ab-item:before { + padding: 0; + } + + /* My Sites and "Site Title" menu */ + #wpadminbar #wp-admin-bar-my-sites > .ab-item, + #wpadminbar #wp-admin-bar-site-name > .ab-item, + #wpadminbar #wp-admin-bar-edit > .ab-item, + #wpadminbar #wp-admin-bar-my-account > .ab-item { + text-indent: 100%; + white-space: nowrap; + overflow: hidden; + width: 52px; + padding: 0; + color: #999; + position: relative; + } + + #wpadminbar > #wp-toolbar > #wp-admin-bar-root-default .ab-icon, + #wpadminbar .ab-icon, + #wpadminbar .ab-item:before { + padding: 0; + margin-left: 0; + } + + #wpadminbar #wp-admin-bar-edit > .ab-item:before, + #wpadminbar #wp-admin-bar-my-sites > .ab-item:before, + #wpadminbar #wp-admin-bar-site-name > .ab-item:before, + #wpadminbar #wp-admin-bar-my-account > .ab-item:before { + display: block; + text-indent: 0; + font: normal 32px/1 'dashicons'; + speak: none; + top: 7px; + width: 52px; + text-align: center; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } + + #wpadminbar #wp-admin-bar-appearance { + margin-top: 0; + } + + #wpadminbar .quicklinks li .blavatar:before { + display: none; + } + + /* Search */ + #wpadminbar #wp-admin-bar-search { + display: none; + } + + /* New Content */ + #wpadminbar #wp-admin-bar-new-content .ab-icon:before { + top: 0; + line-height: 53px; + height: 46px !important; + text-align: center; + width: 52px; + display: block; + } + + /* Updates */ + #wpadminbar #wp-admin-bar-updates { + text-align: center; + } + + #wpadminbar #wp-admin-bar-updates .ab-icon:before { + top: 3px; + } + + /* Comments */ + #wpadminbar #wp-admin-bar-comments .ab-icon { + margin: 0; + } + + #wpadminbar #wp-admin-bar-comments .ab-icon:before { + display: block; + font-size: 34px; + height: 46px; + line-height: 47px; + top: 0; + } + + /* My Account */ + #wpadminbar #wp-admin-bar-my-account > a { + position: relative; + white-space: nowrap; + text-indent: 150%; /* More than 100% indention is needed since this element has padding */ + width: 28px; + padding: 0 10px; + overflow: hidden; /* Prevent link text from forcing horizontal scrolling on mobile */ + } + + #wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img { + position: absolute; + top: 13px; + left: 10px; + width: 26px; + height: 26px; + } + + #wpadminbar #wp-admin-bar-user-actions.ab-submenu { + padding: 0; + } + + #wpadminbar #wp-admin-bar-user-actions.ab-submenu img.avatar { + display: none; + } + + #wpadminbar #wp-admin-bar-my-account.with-avatar #wp-admin-bar-user-actions > li { + margin: 0; + } + + #wpadminbar #wp-admin-bar-user-info .display-name { + height: auto; + font-size: 16px; + line-height: 24px; + color: #eee; + } + + #wpadminbar #wp-admin-bar-user-info a { + padding-top: 4px; + } + + #wpadminbar #wp-admin-bar-user-info .username { + line-height: 0.8 !important; + margin-bottom: -2px; + } + + /* Show only default top level items */ + #wp-toolbar > ul > li { + display: none; + } + + #wpadminbar li#wp-admin-bar-menu-toggle, + #wpadminbar li#wp-admin-bar-wp-logo, + #wpadminbar li#wp-admin-bar-my-sites, + #wpadminbar li#wp-admin-bar-updates, + #wpadminbar li#wp-admin-bar-site-name, + #wpadminbar li#wp-admin-bar-new-content, + #wpadminbar li#wp-admin-bar-edit, + #wpadminbar li#wp-admin-bar-comments, + #wpadminbar li#wp-admin-bar-new-content, + #wpadminbar li#wp-admin-bar-my-account { + display: block; + } + + /* Allow dropdown list items to appear normally */ + #wpadminbar li:hover ul li, + #wpadminbar li.hover ul li, + #wpadminbar li:hover ul li:hover ul li { + display: list-item; + } + + /* Override default min-width so dropdown lists aren't stretched + to 100% viewport width at responsive sizes. */ + #wpadminbar .ab-top-menu > .menupop > .ab-sub-wrapper { + min-width: -webkit-fit-content; + min-width: -moz-fit-content; + min-width: fit-content; + } + + #wpadminbar ul#wp-admin-bar-root-default > li { + margin-left: 0; + } + + /* Experimental fix for touch toolbar dropdown positioning */ + #wpadminbar .ab-top-menu, + #wpadminbar .ab-top-secondary, + #wpadminbar #wp-admin-bar-wp-logo, + #wpadminbar #wp-admin-bar-my-sites, + #wpadminbar #wp-admin-bar-site-name, + #wpadminbar #wp-admin-bar-updates, + #wpadminbar #wp-admin-bar-comments, + #wpadminbar #wp-admin-bar-new-content, + #wpadminbar #wp-admin-bar-edit, + #wpadminbar #wp-admin-bar-my-account { + position: static; + } + + #wpadminbar #wp-admin-bar-my-account { + float: left; + } + + .network-admin #wpadminbar ul#wp-admin-bar-top-secondary > li#wp-admin-bar-my-account { + margin-left: 0; + } + + /* Realign arrows on taller responsive submenus */ + + #wpadminbar .ab-top-secondary .menupop .menupop > .ab-item:before { + top: 10px; + right: 0; + } +} + +/* Smartphone */ +@media screen and (max-width: 600px) { + #wpadminbar { + position: absolute; + } + + #wp-responsive-overlay { + position: fixed; + top: 0; + right: 0; + width: 100%; + height: 100%; + z-index: 400; + } + + #wpadminbar .ab-top-menu > .menupop > .ab-sub-wrapper { + position: fixed; + width: 100%; + right: 0; + } + + #wpadminbar .menupop .menupop > .ab-item:before { + display: none; + } + + #wpadminbar #wp-admin-bar-wp-logo.menupop .ab-sub-wrapper { + margin-right: 0; + } + + #wpadminbar .ab-top-menu > .menupop li > .ab-sub-wrapper { + margin: 0; + width: 100%; + top: auto; + right: auto; + position: relative; + } + + #wpadminbar .ab-top-menu > .menupop li > .ab-sub-wrapper .ab-item { + font-size: 16px; + padding: 6px 30px 19px 15px; + } + + #wpadminbar li:hover ul li ul li { + display: list-item; + } + + #wpadminbar li#wp-admin-bar-wp-logo, + #wpadminbar li#wp-admin-bar-updates { + display: none; + } + + /* Make submenus full-width at this size */ + + #wpadminbar .ab-top-menu > .menupop li > .ab-sub-wrapper { + position: static; + -webkit-box-shadow: none; + box-shadow: none; + } +} diff --git a/wp-includes/css/admin-bar-rtl.min.css b/wp-includes/css/admin-bar-rtl.min.css new file mode 100644 index 0000000..ef223e9 --- /dev/null +++ b/wp-includes/css/admin-bar-rtl.min.css @@ -0,0 +1 @@ +#wpadminbar *{height:auto;width:auto;margin:0;padding:0;position:static;text-shadow:none;text-transform:none;letter-spacing:normal;font:400 13px/32px "Open Sans",sans-serif;-webkit-border-radius:0;border-radius:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-transition:none;transition:none;-webkit-font-smoothing:subpixel-antialiased}.rtl #wpadminbar *{font-family:Tahoma,sans-serif}html:lang(he-il) .rtl #wpadminbar *{font-family:Arial,sans-serif}#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#eee}#wpadminbar #wp-admin-bar-my-sites a.ab-item,#wpadminbar #wp-admin-bar-site-name a.ab-item{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#wpadminbar ul li:after,#wpadminbar ul li:before{content:normal}#wpadminbar a,#wpadminbar a img,#wpadminbar a img:hover,#wpadminbar a:hover{outline:0;border:0;text-decoration:none;background:0 0}#wpadminbar a:active,#wpadminbar a:focus,#wpadminbar div,#wpadminbar input[type=email],#wpadminbar input[type=number],#wpadminbar input[type=password],#wpadminbar input[type=search],#wpadminbar input[type=text],#wpadminbar input[type=url],#wpadminbar select,#wpadminbar textarea{outline:0}#wpadminbar{direction:rtl;color:#ccc;font:400 13px/32px "Open Sans",sans-serif;height:32px;position:fixed;top:0;right:0;width:100%;min-width:600px;z-index:99999;background:#222}#wpadminbar .ab-sub-wrapper,#wpadminbar ul,#wpadminbar ul li{background:0 0;clear:none;list-style:none;margin:0;padding:0;position:relative;text-indent:0;z-index:99999}#wpadminbar ul#wp-admin-bar-root-default>li{margin-left:0}#wpadminbar .quicklinks{border-right:1px solid transparent}#wpadminbar .quicklinks ul{text-align:right}#wpadminbar li{float:right}#wpadminbar .ab-empty-item{outline:0}#wpadminbar .quicklinks .ab-top-secondary>li{float:left}#wpadminbar .quicklinks .ab-empty-item,#wpadminbar .quicklinks a,#wpadminbar .shortlink-input{height:32px;display:block;padding:0 10px;margin:0}#wpadminbar .quicklinks>ul>li>a{padding:0 7px 0 8px}#wpadminbar .menupop .ab-sub-wrapper,#wpadminbar .shortlink-input{margin:0;padding:0;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2);background:#333;display:none;position:absolute;float:none}#wpadminbar.ie7 .menupop .ab-sub-wrapper,#wpadminbar.ie7 .shortlink-input{top:32px;right:0}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper{min-width:100%}#wpadminbar .ab-top-secondary .menupop .ab-sub-wrapper{left:0;right:auto}#wpadminbar .ab-submenu{padding:6px 0}#wpadminbar .selected .shortlink-input{display:block}#wpadminbar .quicklinks .menupop ul li{float:none}#wpadminbar .quicklinks .menupop ul li a strong{font-weight:700}#wpadminbar .quicklinks .menupop ul li .ab-item,#wpadminbar .quicklinks .menupop ul li a strong,#wpadminbar .quicklinks .menupop.hover ul li .ab-item,#wpadminbar .shortlink-input,#wpadminbar.nojs .quicklinks .menupop:hover ul li .ab-item{line-height:26px;height:26px;white-space:nowrap;min-width:140px}#wpadminbar .shortlink-input{width:200px}#wpadminbar li.hover>.ab-sub-wrapper,#wpadminbar.nojs li:hover>.ab-sub-wrapper{display:block}#wpadminbar .menupop li.hover>.ab-sub-wrapper,#wpadminbar .menupop li:hover>.ab-sub-wrapper{margin-right:100%;margin-top:-32px}#wpadminbar .ab-top-secondary .menupop li.hover>.ab-sub-wrapper,#wpadminbar .ab-top-secondary .menupop li:hover>.ab-sub-wrapper{margin-right:0;right:inherit;left:100%}#wpadminbar .ab-top-menu>li.hover>.ab-item,#wpadminbar .ab-top-menu>li:hover>.ab-item,#wpadminbar .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus{background:#333;color:#2ea2cc}#wpadminbar>#wp-toolbar a:focus span.ab-label,#wpadminbar>#wp-toolbar li.hover span.ab-label,#wpadminbar>#wp-toolbar li:hover span.ab-label{color:#2ea2cc}#wpadminbar .ab-icon,#wpadminbar .ab-item:before,#wpadminbar>#wp-toolbar>#wp-admin-bar-root-default .ab-icon{position:relative;float:right;font:400 20px/1 dashicons;speak:none;padding:4px 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-image:none!important;margin-left:6px}#wpadminbar #adminbarsearch:before,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:before{color:#999;position:relative;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#wpadminbar .ab-label{display:inline-block;height:32px}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop ul li a strong,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#eee}#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover{color:#2ea2cc}#wpadminbar .ab-top-secondary .menupop .menupop>.ab-item:before,#wpadminbar .menupop .menupop>.ab-item:before{position:absolute;font:400 17px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#wpadminbar .menupop .menupop>.ab-item{display:block;padding-left:2em}#wpadminbar .menupop .menupop>.ab-item:before{top:1px;left:4px;content:'\f139';color:inherit}#wpadminbar .ab-top-secondary .menupop .menupop>.ab-item{padding-right:2em;padding-left:1em}#wpadminbar .ab-top-secondary .menupop .menupop>.ab-item:before{top:5px;right:3px;content:'\f141'}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary{display:block;position:relative;left:auto;margin:0;-webkit-box-shadow:none;box-shadow:none}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#4b4b4b}#wpadminbar .quicklinks .menupop .ab-sub-secondary>li .ab-item:focus a,#wpadminbar .quicklinks .menupop .ab-sub-secondary>li>a:hover{color:#2ea2cc}#wpadminbar .quicklinks a span#ab-updates{background:#eee;color:#333;display:inline;padding:2px 5px;font-size:10px;font-weight:700;-webkit-border-radius:10px;border-radius:10px}#wpadminbar .quicklinks a:hover span#ab-updates{background:#fff;color:#000}#wpadminbar .ab-top-secondary{float:left}#wpadminbar ul li:last-child,#wpadminbar ul li:last-child .ab-item{-webkit-box-shadow:none;box-shadow:none}#wp-admin-bar-my-account>ul{min-width:198px}#wp-admin-bar-my-account>.ab-item:before{content:"\f110";top:2px;float:left;margin-right:6px;margin-left:0}#wp-admin-bar-my-account.with-avatar>.ab-item:before{display:none;content:none}#wp-admin-bar-my-account.with-avatar>ul{min-width:270px}#wpadminbar #wp-admin-bar-user-actions>li{margin-right:16px;margin-left:16px}#wpadminbar #wp-admin-bar-user-actions.ab-submenu{padding:6px 0 12px}#wpadminbar #wp-admin-bar-my-account.with-avatar #wp-admin-bar-user-actions>li{margin-right:88px}#wpadminbar #wp-admin-bar-user-info{margin-top:6px;margin-bottom:15px;height:auto;background:0 0}#wp-admin-bar-user-info .avatar{position:absolute;right:-72px;top:4px;width:64px;height:64px}#wpadminbar #wp-admin-bar-user-info a{background:0 0;height:auto}#wpadminbar #wp-admin-bar-user-info span{background:0 0;padding:0;height:18px}#wpadminbar #wp-admin-bar-user-info .display-name,#wpadminbar #wp-admin-bar-user-info .username{display:block}#wpadminbar #wp-admin-bar-user-info .username{color:#999;font-size:11px}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{width:16px;height:16px;padding:0;border:1px solid #888;background:#eee;line-height:24px;vertical-align:middle;margin:-4px 6px 0 0;float:none;display:inline}#wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon{width:15px;height:20px;margin-left:0;padding:6px 0 5px}#wpadminbar #wp-admin-bar-wp-logo>.ab-item{padding:0 7px}#wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon:before{content:'\f120';top:2px}#wpadminbar .quicklinks li .blavatar{float:right;font:400 16px/1 dashicons!important;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#eee}#wpadminbar .quicklinks li a:hover .blavatar{color:#2ea2cc}#wpadminbar .quicklinks li .blavatar:before{content:'\f120';height:16px;width:16px;display:inline-block;margin:6px -2px 0 8px}#wpadminbar #wp-admin-bar-appearance{margin-top:-12px}#wpadminbar #wp-admin-bar-my-sites>.ab-item:before,#wpadminbar #wp-admin-bar-site-name>.ab-item:before{content:'\f112';top:2px}#wpadminbar #wp-admin-bar-edit>.ab-item:before{content:'\f464';top:2px}#wpadminbar #wp-admin-bar-site-name>.ab-item:before{content:"\f102"}#wpadminbar #wp-admin-bar-comments .ab-icon{margin-left:6px}#wpadminbar #wp-admin-bar-comments .ab-icon:before{content:'\f101';top:3px}#wpadminbar #wp-admin-bar-comments .count-0{opacity:.5}#wpadminbar #wp-admin-bar-new-content .ab-icon:before{content:'\f132';top:4px}#wpadminbar #wp-admin-bar-updates .ab-icon:before{content:'\f463';top:2px}#wpadminbar #wp-admin-bar-search .ab-item{padding:0;background:0 0}#wpadminbar #adminbarsearch{position:relative;height:32px;padding:0 2px}#wpadminbar #adminbarsearch:before{position:absolute;top:6px;right:5px;z-index:20;font:400 20px/1 dashicons!important;content:'\f179';speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input{position:relative;z-index:30;font:13px/24px "Open Sans",sans-serif;height:24px;width:24px;padding:0 24px 0 3px;margin:0;color:#ccc;background-color:rgba(255,255,255,0);border:0;outline:0;cursor:pointer;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition-duration:400ms;transition-duration:400ms;-webkit-transition-property:width,background;transition-property:width,background;-webkit-transition-timing-function:ease;transition-timing-function:ease}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{z-index:10;color:#000;width:200px;background-color:rgba(255,255,255,.9);cursor:text;border:0}#wpadminbar.ie7>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input{margin-top:3px;width:120px}#wpadminbar.ie8>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input{margin-top:4px;background-color:#464646}#wpadminbar.ie8>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{background-color:#fff}#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder{color:#999}#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder{color:#999}#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder{color:#999}#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder{color:#999}#wpadminbar #adminbarsearch .adminbar-button,.customize-support .hide-if-customize,.customize-support .wp-core-ui .hide-if-customize,.customize-support.wp-core-ui .hide-if-customize,.no-customize-support .hide-if-no-customize,.no-customize-support .wp-core-ui .hide-if-no-customize,.no-customize-support.wp-core-ui .hide-if-no-customize{display:none}#wpadminbar .screen-reader-text,#wpadminbar .screen-reader-text span{position:absolute;right:-1000em;top:-1000em;height:1px;width:1px;overflow:hidden}#wpadminbar .screen-reader-shortcut{position:absolute;top:-1000em}#wpadminbar .screen-reader-shortcut:focus{right:6px;top:7px;height:auto;width:auto;display:block;font-size:14px;font-weight:700;padding:15px 23px 14px;background:#f1f1f1;color:#21759b;z-index:100000;line-height:normal;text-decoration:none;-webkit-box-shadow:0 0 2px 2px rgba(0,0,0,.6);box-shadow:0 0 2px 2px rgba(0,0,0,.6)}* html #wpadminbar{overflow:hidden;position:absolute}* html #wpadminbar .quicklinks ul li a{float:right}* html #wpadminbar .menupop a span{background-image:none}.no-font-face #wpadminbar ul.ab-top-menu>li>a.ab-item{display:block;width:45px;text-align:center;overflow:hidden;margin:0 3px}.no-font-face #wpadminbar #wp-admin-bar-edit>.ab-item,.no-font-face #wpadminbar #wp-admin-bar-my-sites>.ab-item,.no-font-face #wpadminbar #wp-admin-bar-site-name>.ab-item{text-indent:0}.no-font-face #wpadminbar #wp-admin-bar-wp-logo>.ab-item,.no-font-face #wpadminbar .ab-icon,.no-font-face #wpadminbar .ab-icon:before,.no-font-face #wpadminbar a.ab-item:before{display:none!important}.no-font-face #wpadminbar ul.ab-top-menu>li>a>span.ab-label{display:inline}.no-font-face #wpadminbar #wp-admin-bar-menu-toggle span.ab-icon{display:inline!important}.no-font-face #wpadminbar #wp-admin-bar-menu-toggle span.ab-icon:before{content:"Menu";font:14px/45px sans-serif!important;display:inline-block!important;color:#fff}.no-font-face #wpadminbar #wp-admin-bar-site-name a.ab-item{color:#fff}@media screen and (max-width:782px){html #wpadminbar{right:0!important;z-index:500!important;height:46px;min-width:300px}#wpadminbar *{font:400 14px/32px "Open Sans",sans-serif}#wpadminbar .quicklinks .ab-empty-item,#wpadminbar .quicklinks>ul>li>a{padding:0;height:46px;line-height:46px;width:auto}#wpadminbar .ab-icon{font:40px/1 dashicons!important;margin:0;width:52px;height:46px;text-align:center}#wpadminbar .ab-icon:before{text-align:center}#wpadminbar .ab-submenu{padding:0}#wpadminbar #wp-admin-bar-my-account a.ab-item,#wpadminbar #wp-admin-bar-my-sites a.ab-item,#wpadminbar #wp-admin-bar-site-name a.ab-item{text-overflow:clip}#wpadminbar .ab-label{display:none}#wpadminbar .menupop li.hover>.ab-sub-wrapper,#wpadminbar .menupop li:hover>.ab-sub-wrapper{margin-top:-46px}#wpadminbar .ab-top-menu .menupop .ab-sub-wrapper .menupop>.ab-item{padding-left:30px}#wpadminbar .menupop .menupop>.ab-item:before{top:10px;left:6px}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper .ab-item{font-size:16px;padding:6px 15px 12px}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper a:empty{display:none}#wpadminbar #wp-admin-bar-wp-logo>.ab-item{padding:0}#wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon{padding:0;width:52px;height:46px;text-align:center;vertical-align:top}#wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon:before{font:28px/1 dashicons!important;top:-3px}#wpadminbar #wp-admin-bar-edit>.ab-item,#wpadminbar #wp-admin-bar-my-account>.ab-item,#wpadminbar #wp-admin-bar-my-sites>.ab-item,#wpadminbar #wp-admin-bar-site-name>.ab-item{text-indent:100%;white-space:nowrap;overflow:hidden;width:52px;padding:0;color:#999;position:relative}#wpadminbar .ab-icon,#wpadminbar .ab-item:before,#wpadminbar>#wp-toolbar>#wp-admin-bar-root-default .ab-icon{padding:0;margin-left:0}#wpadminbar #wp-admin-bar-edit>.ab-item:before,#wpadminbar #wp-admin-bar-my-account>.ab-item:before,#wpadminbar #wp-admin-bar-my-sites>.ab-item:before,#wpadminbar #wp-admin-bar-site-name>.ab-item:before{display:block;text-indent:0;font:400 32px/1 dashicons;speak:none;top:7px;width:52px;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#wpadminbar #wp-admin-bar-appearance{margin-top:0}#wpadminbar #wp-admin-bar-search,#wpadminbar .quicklinks li .blavatar:before{display:none}#wpadminbar #wp-admin-bar-new-content .ab-icon:before{top:0;line-height:53px;height:46px!important;text-align:center;width:52px;display:block}#wpadminbar #wp-admin-bar-updates{text-align:center}#wpadminbar #wp-admin-bar-updates .ab-icon:before{top:3px}#wpadminbar #wp-admin-bar-comments .ab-icon{margin:0}#wpadminbar #wp-admin-bar-comments .ab-icon:before{display:block;font-size:34px;height:46px;line-height:47px;top:0}#wpadminbar #wp-admin-bar-my-account>a{position:relative;white-space:nowrap;text-indent:150%;width:28px;padding:0 10px;overflow:hidden}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{position:absolute;top:13px;left:10px;width:26px;height:26px}#wpadminbar #wp-admin-bar-user-actions.ab-submenu{padding:0}#wpadminbar #wp-admin-bar-user-actions.ab-submenu img.avatar{display:none}#wpadminbar #wp-admin-bar-my-account.with-avatar #wp-admin-bar-user-actions>li{margin:0}#wpadminbar #wp-admin-bar-user-info .display-name{height:auto;font-size:16px;line-height:24px;color:#eee}#wpadminbar #wp-admin-bar-user-info a{padding-top:4px}#wpadminbar #wp-admin-bar-user-info .username{line-height:.8!important;margin-bottom:-2px}#wp-toolbar>ul>li{display:none}#wpadminbar li#wp-admin-bar-comments,#wpadminbar li#wp-admin-bar-edit,#wpadminbar li#wp-admin-bar-menu-toggle,#wpadminbar li#wp-admin-bar-my-account,#wpadminbar li#wp-admin-bar-my-sites,#wpadminbar li#wp-admin-bar-new-content,#wpadminbar li#wp-admin-bar-site-name,#wpadminbar li#wp-admin-bar-updates,#wpadminbar li#wp-admin-bar-wp-logo{display:block}#wpadminbar li.hover ul li,#wpadminbar li:hover ul li,#wpadminbar li:hover ul li:hover ul li{display:list-item}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper{min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content}#wpadminbar ul#wp-admin-bar-root-default>li{margin-left:0}#wpadminbar #wp-admin-bar-comments,#wpadminbar #wp-admin-bar-edit,#wpadminbar #wp-admin-bar-my-account,#wpadminbar #wp-admin-bar-my-sites,#wpadminbar #wp-admin-bar-new-content,#wpadminbar #wp-admin-bar-site-name,#wpadminbar #wp-admin-bar-updates,#wpadminbar #wp-admin-bar-wp-logo,#wpadminbar .ab-top-menu,#wpadminbar .ab-top-secondary{position:static}#wpadminbar #wp-admin-bar-my-account{float:left}.network-admin #wpadminbar ul#wp-admin-bar-top-secondary>li#wp-admin-bar-my-account{margin-left:0}#wpadminbar .ab-top-secondary .menupop .menupop>.ab-item:before{top:10px;right:0}}@media screen and (max-width:600px){#wpadminbar{position:absolute}#wp-responsive-overlay{position:fixed;top:0;right:0;width:100%;height:100%;z-index:400}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper{position:fixed;width:100%;right:0}#wpadminbar .menupop .menupop>.ab-item:before{display:none}#wpadminbar #wp-admin-bar-wp-logo.menupop .ab-sub-wrapper{margin-right:0}#wpadminbar .ab-top-menu>.menupop li>.ab-sub-wrapper{margin:0;width:100%;top:auto;right:auto}#wpadminbar .ab-top-menu>.menupop li>.ab-sub-wrapper .ab-item{font-size:16px;padding:6px 30px 19px 15px}#wpadminbar li:hover ul li ul li{display:list-item}#wpadminbar li#wp-admin-bar-updates,#wpadminbar li#wp-admin-bar-wp-logo{display:none}#wpadminbar .ab-top-menu>.menupop li>.ab-sub-wrapper{position:static;-webkit-box-shadow:none;box-shadow:none}} \ No newline at end of file diff --git a/wp-includes/css/admin-bar.css b/wp-includes/css/admin-bar.css new file mode 100644 index 0000000..e9f0299 --- /dev/null +++ b/wp-includes/css/admin-bar.css @@ -0,0 +1,1100 @@ +#wpadminbar * { + height: auto; + width: auto; + margin: 0; + padding: 0; + position: static; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + font: normal 13px/32px "Open Sans", sans-serif; + -webkit-border-radius: 0; + border-radius: 0; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + -webkit-transition: none; + transition: none; + -webkit-font-smoothing: subpixel-antialiased; /* Prevent Safari from switching to standard antialiasing on hover */ +} + +.rtl #wpadminbar * { + font-family: Tahoma, sans-serif; +} + +html:lang(he-il) .rtl #wpadminbar * { + font-family: Arial, sans-serif; +} + +#wpadminbar a.ab-item, +#wpadminbar > #wp-toolbar span.ab-label, +#wpadminbar > #wp-toolbar span.noticon { + color: #eee; +} + +#wpadminbar #wp-admin-bar-site-name a.ab-item, +#wpadminbar #wp-admin-bar-my-sites a.ab-item { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +#wpadminbar ul li:before, +#wpadminbar ul li:after { + content: normal; +} + +#wpadminbar a, +#wpadminbar a:hover, +#wpadminbar a img, +#wpadminbar a img:hover { + outline: none; + border: none; + text-decoration: none; + background: none; +} + +#wpadminbar a:focus, +#wpadminbar a:active, +#wpadminbar input[type="text"], +#wpadminbar input[type="password"], +#wpadminbar input[type="number"], +#wpadminbar input[type="search"], +#wpadminbar input[type="email"], +#wpadminbar input[type="url"], +#wpadminbar select, +#wpadminbar textarea, +#wpadminbar div { + outline: none; +} + +#wpadminbar { + direction: ltr; + color: #ccc; + font: normal 13px/32px "Open Sans", sans-serif; + height: 32px; + position: fixed; + top: 0; + left: 0; + width: 100%; + min-width: 600px; /* match the min-width of the body in wp-admin.css */ + z-index: 99999; + background: #222; +} + +#wpadminbar .ab-sub-wrapper, +#wpadminbar ul, +#wpadminbar ul li { + background: none; + clear: none; + list-style: none; + margin: 0; + padding: 0; + position: relative; + text-indent: 0; + z-index: 99999; +} + +#wpadminbar ul#wp-admin-bar-root-default>li { + margin-right: 0; +} + +/* Prevent a Chrome bug that inadvertantly activates + :hover states on an element that touches the extreme + top left corner of the viewport. See #18868 */ +#wpadminbar .quicklinks { + border-left: 1px solid transparent; +} + +#wpadminbar .quicklinks ul { + text-align: left; +} + +#wpadminbar li { + float: left; +} + +#wpadminbar .ab-empty-item { + outline: none; +} + +#wpadminbar .quicklinks .ab-top-secondary > li { + float: right; +} + +#wpadminbar .quicklinks a, +#wpadminbar .quicklinks .ab-empty-item, +#wpadminbar .shortlink-input { + height: 32px; + display: block; + padding: 0 10px; + margin: 0; +} + +#wpadminbar .quicklinks > ul > li > a { + padding: 0 8px 0 7px; +} + +#wpadminbar .menupop .ab-sub-wrapper, +#wpadminbar .shortlink-input { + margin: 0; + padding: 0; + -webkit-box-shadow: 0 3px 5px rgba(0,0,0,0.2); + box-shadow: 0 3px 5px rgba(0,0,0,0.2); + background: #333; + display: none; + position: absolute; + float: none; +} + +#wpadminbar.ie7 .menupop .ab-sub-wrapper, +#wpadminbar.ie7 .shortlink-input { + top: 32px; + left: 0; +} + +#wpadminbar .ab-top-menu > .menupop > .ab-sub-wrapper { + min-width: 100%; +} + +#wpadminbar .ab-top-secondary .menupop .ab-sub-wrapper { + right: 0; + left: auto; +} + +#wpadminbar .ab-submenu { + padding: 6px 0; +} + +#wpadminbar .selected .shortlink-input { + display: block; +} + +#wpadminbar .quicklinks .menupop ul li { + float: none; +} + +#wpadminbar .quicklinks .menupop ul li a strong { + font-weight: bold; +} + +#wpadminbar .quicklinks .menupop ul li .ab-item, +#wpadminbar .quicklinks .menupop ul li a strong, +#wpadminbar .quicklinks .menupop.hover ul li .ab-item, +#wpadminbar.nojs .quicklinks .menupop:hover ul li .ab-item, +#wpadminbar .shortlink-input { + line-height: 26px; + height: 26px; + white-space: nowrap; + min-width: 140px; +} + +#wpadminbar .shortlink-input { + width: 200px; +} + +#wpadminbar.nojs li:hover > .ab-sub-wrapper, +#wpadminbar li.hover > .ab-sub-wrapper { + display: block; +} + +#wpadminbar .menupop li:hover > .ab-sub-wrapper, +#wpadminbar .menupop li.hover > .ab-sub-wrapper { + margin-left: 100%; + margin-top: -32px; +} + +#wpadminbar .ab-top-secondary .menupop li:hover > .ab-sub-wrapper, +#wpadminbar .ab-top-secondary .menupop li.hover > .ab-sub-wrapper { + margin-left: 0; + left: inherit; + right: 100%; +} + +#wpadminbar .ab-top-menu > li > .ab-item:focus, +#wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus, +#wpadminbar .ab-top-menu > li:hover > .ab-item, +#wpadminbar .ab-top-menu > li.hover > .ab-item { + background: #333; + color: #2ea2cc; +} + +#wpadminbar > #wp-toolbar li:hover span.ab-label, +#wpadminbar > #wp-toolbar li.hover span.ab-label, +#wpadminbar > #wp-toolbar a:focus span.ab-label { + color: #2ea2cc; +} + +#wpadminbar > #wp-toolbar > #wp-admin-bar-root-default .ab-icon, +#wpadminbar .ab-icon, +#wpadminbar .ab-item:before { + position: relative; + float: left; + font: normal 20px/1 'dashicons'; + speak: none; + padding: 4px 0; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + background-image: none !important; + margin-right: 6px; +} + +#wpadminbar .ab-icon:before, +#wpadminbar .ab-item:before, +#wpadminbar #adminbarsearch:before { + color: #999; +} + +#wpadminbar .ab-icon:before, +#wpadminbar .ab-item:before, +#wpadminbar #adminbarsearch:before { + position: relative; + -webkit-transition: all .1s ease-in-out; + transition: all .1s ease-in-out; +} + +#wpadminbar .ab-label { + display: inline-block; + height: 32px; +} + +#wpadminbar .ab-submenu .ab-item { + color: #eee; +} + +#wpadminbar .quicklinks .menupop ul li a, +#wpadminbar .quicklinks .menupop ul li a strong, +#wpadminbar .quicklinks .menupop.hover ul li a, +#wpadminbar.nojs .quicklinks .menupop:hover ul li a { + color: #eee; +} + +#wpadminbar .quicklinks .menupop ul li a:hover, +#wpadminbar .quicklinks .menupop ul li a:focus, +#wpadminbar .quicklinks .menupop ul li a:hover strong, +#wpadminbar .quicklinks .menupop ul li a:focus strong, +#wpadminbar .quicklinks .menupop.hover ul li a:hover, +#wpadminbar .quicklinks .menupop.hover ul li a:focus, +#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover, +#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus, +#wpadminbar li:hover .ab-icon:before, +#wpadminbar li:hover .ab-item:before, +#wpadminbar li a:focus .ab-icon:before, +#wpadminbar li .ab-item:focus:before, +#wpadminbar li.hover .ab-icon:before, +#wpadminbar li.hover .ab-item:before, +#wpadminbar li:hover #adminbarsearch:before { + color: #2ea2cc; +} + +#wpadminbar .menupop .menupop > .ab-item:before, +#wpadminbar .ab-top-secondary .menupop .menupop > .ab-item:before { + position: absolute; + font: normal 17px/1 'dashicons'; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +#wpadminbar .menupop .menupop > .ab-item { + display: block; + padding-right: 2em; +} + +#wpadminbar .menupop .menupop > .ab-item:before { + top: 1px; + right: 4px; + content: '\f139'; + color: inherit; +} + +#wpadminbar .ab-top-secondary .menupop .menupop > .ab-item { + padding-left: 2em; + padding-right: 1em; +} + +#wpadminbar .ab-top-secondary .menupop .menupop > .ab-item:before { + top: 5px; + left: 3px; + content: '\f141'; +} + +#wpadminbar .quicklinks .menupop ul.ab-sub-secondary { + display: block; + position: relative; + right: auto; + margin: 0; + -webkit-box-shadow: none; + box-shadow: none; +} + +#wpadminbar .quicklinks .menupop ul.ab-sub-secondary, +#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu { + background: #4b4b4b; +} + +#wpadminbar .quicklinks .menupop .ab-sub-secondary > li > a:hover, +#wpadminbar .quicklinks .menupop .ab-sub-secondary > li .ab-item:focus a { + color: #2ea2cc; +} + +#wpadminbar .quicklinks a span#ab-updates { + background: #eee; + color: #333; + display: inline; + padding: 2px 5px; + font-size: 10px; + font-weight: bold; + -webkit-border-radius: 10px; + border-radius: 10px; +} + +#wpadminbar .quicklinks a:hover span#ab-updates { + background: #fff; + color: #000; +} + +#wpadminbar .ab-top-secondary { + float: right; +} + +#wpadminbar ul li:last-child, +#wpadminbar ul li:last-child .ab-item { + -webkit-box-shadow: none; + box-shadow: none; +} + +/** + * My Account + */ +#wp-admin-bar-my-account > ul { + min-width: 198px; +} + +#wp-admin-bar-my-account > .ab-item:before { + content: "\f110"; + top: 2px; + float: right; + margin-left: 6px; + margin-right: 0; +} + +#wp-admin-bar-my-account.with-avatar > .ab-item:before { + display: none; + content: none; +} + +#wp-admin-bar-my-account.with-avatar > ul { + min-width: 270px; +} + +#wpadminbar #wp-admin-bar-user-actions > li { + margin-left: 16px; + margin-right: 16px; +} + +#wpadminbar #wp-admin-bar-user-actions.ab-submenu { + padding: 6px 0 12px; +} + +#wpadminbar #wp-admin-bar-my-account.with-avatar #wp-admin-bar-user-actions > li { + margin-left: 88px; +} + +#wpadminbar #wp-admin-bar-user-info { + margin-top: 6px; + margin-bottom: 15px; + height: auto; + background: none; +} + +#wp-admin-bar-user-info .avatar { + position: absolute; + left: -72px; + top: 4px; + width: 64px; + height: 64px; +} + +#wpadminbar #wp-admin-bar-user-info a { + background: none; + height: auto; +} + +#wpadminbar #wp-admin-bar-user-info span { + background: none; + padding: 0; + height: 18px; +} + +#wpadminbar #wp-admin-bar-user-info .display-name, +#wpadminbar #wp-admin-bar-user-info .username { + display: block; +} + +#wpadminbar #wp-admin-bar-user-info .username { + color: #999; + font-size: 11px; +} + +#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img { + width: 16px; + height: 16px; + padding: 0; + border: 1px solid #888; + background: #eee; + line-height: 24px; + vertical-align: middle; + margin: -4px 0 0 6px; + float: none; + display: inline; +} + +/** + * WP Logo + */ +#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon { + width: 15px; + height: 20px; + margin-right: 0; + padding: 6px 0 5px; +} + +#wpadminbar #wp-admin-bar-wp-logo > .ab-item { + padding: 0 7px; +} + +#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before { + content: '\f120'; + top: 2px; +} + +/* + * My Sites & Site Title + */ +#wpadminbar .quicklinks li .blavatar { + float: left; + font: normal 16px/1 'dashicons' !important; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + color: #eee; +} + +#wpadminbar .quicklinks li a:hover .blavatar { + color: #2ea2cc; +} + +#wpadminbar .quicklinks li .blavatar:before { + content: '\f120'; + height: 16px; + width: 16px; + display: inline-block; + margin: 6px 8px 0 -2px; +} + +#wpadminbar #wp-admin-bar-appearance { + margin-top: -12px; +} + +#wpadminbar #wp-admin-bar-my-sites > .ab-item:before, +#wpadminbar #wp-admin-bar-site-name > .ab-item:before { + content: '\f112'; + top: 2px; +} + +#wpadminbar #wp-admin-bar-edit > .ab-item:before { + content: '\f464'; + top: 2px; +} + +#wpadminbar #wp-admin-bar-site-name > .ab-item:before { + content: "\f102"; +} + + + +/** + * Comments + */ +#wpadminbar #wp-admin-bar-comments .ab-icon { + margin-right: 6px; +} + +#wpadminbar #wp-admin-bar-comments .ab-icon:before { + content: '\f101'; + top: 3px; +} + +#wpadminbar #wp-admin-bar-comments .count-0 { + opacity: .5; +} + +/** + * New Content + */ +#wpadminbar #wp-admin-bar-new-content .ab-icon:before { + content: '\f132'; + top: 4px; +} + +/** + * Updates + */ +#wpadminbar #wp-admin-bar-updates .ab-icon:before { + content: '\f463'; + top: 2px; +} + +/** + * Search + */ +#wpadminbar #wp-admin-bar-search .ab-item { + padding: 0; + background: transparent; +} + +#wpadminbar #adminbarsearch { + position: relative; + height: 32px; + padding: 0 2px; +} + +#wpadminbar #adminbarsearch:before { + position: absolute; + top: 6px; + left: 5px; + z-index: 20; + font: normal 20px/1 'dashicons' !important; + content: '\f179'; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +#wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input { + position: relative; + z-index: 30; + font: 13px/24px "Open Sans", sans-serif; + height: 24px; + width: 24px; + padding: 0 3px 0 24px; + margin: 0; + color: #ccc; + background-color: rgba( 255, 255, 255, 0 ); + border: none; + outline: none; + cursor: pointer; + -webkit-box-shadow: none; + box-shadow: none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-transition-duration: 400ms; + transition-duration: 400ms; + -webkit-transition-property: width, background; + transition-property: width, background; + -webkit-transition-timing-function: ease; + transition-timing-function: ease; +} + +#wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input:focus { + z-index: 10; + color: #000; + width: 200px; + background-color: rgba( 255, 255, 255, 0.9 ); + cursor: text; + border: 0; +} + +#wpadminbar.ie7 > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input { + margin-top: 3px; + width: 120px; +} + +#wpadminbar.ie8 > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input { + margin-top: 4px; + background-color: #464646; +} + +#wpadminbar.ie8 > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input:focus { + background-color: #fff; +} + +#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder { + color: #999; +} +#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder { + color: #999; +} +#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder { + color: #999; +} +#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder { + color: #999; +} + +#wpadminbar #adminbarsearch .adminbar-button { + display: none; +} + +/** + * Customize support classes + */ +.no-customize-support .hide-if-no-customize, +.customize-support .hide-if-customize, +.no-customize-support.wp-core-ui .hide-if-no-customize, +.no-customize-support .wp-core-ui .hide-if-no-customize, +.customize-support.wp-core-ui .hide-if-customize, +.customize-support .wp-core-ui .hide-if-customize { + display: none; +} + +/* Skip link */ +#wpadminbar .screen-reader-text, +#wpadminbar .screen-reader-text span { + position: absolute; + left: -1000em; + top: -1000em; + height: 1px; + width: 1px; + overflow: hidden; +} + +#wpadminbar .screen-reader-shortcut { + position: absolute; + top: -1000em; +} + +#wpadminbar .screen-reader-shortcut:focus { + left: 6px; + top: 7px; + height: auto; + width: auto; + display: block; + font-size: 14px; + font-weight: bold; + padding: 15px 23px 14px; + background: #f1f1f1; + color: #21759b; + z-index: 100000; + line-height: normal; + text-decoration: none; + -webkit-box-shadow: 0 0 2px 2px rgba(0,0,0,.6); + box-shadow: 0 0 2px 2px rgba(0,0,0,.6); +} + +/** + * IE 6-targeted rules + */ +* html #wpadminbar { + overflow: hidden; + position: absolute; +} + +* html #wpadminbar .quicklinks ul li a { + float: left; +} + +* html #wpadminbar .menupop a span { + background-image: none; +} + +/* No @font-face support */ +.no-font-face #wpadminbar ul.ab-top-menu > li > a.ab-item { + display: block; + width: 45px; + text-align: center; + overflow: hidden; + margin: 0 3px; +} + +.no-font-face #wpadminbar #wp-admin-bar-my-sites > .ab-item, +.no-font-face #wpadminbar #wp-admin-bar-site-name > .ab-item, +.no-font-face #wpadminbar #wp-admin-bar-edit > .ab-item { + text-indent: 0; +} + +.no-font-face #wpadminbar .ab-icon, +.no-font-face #wpadminbar .ab-icon:before, +.no-font-face #wpadminbar a.ab-item:before, +.no-font-face #wpadminbar #wp-admin-bar-wp-logo > .ab-item { + display: none !important; +} + +.no-font-face #wpadminbar ul.ab-top-menu > li > a > span.ab-label { + display: inline; +} + +.no-font-face #wpadminbar #wp-admin-bar-menu-toggle span.ab-icon { + display: inline !important; +} + +.no-font-face #wpadminbar #wp-admin-bar-menu-toggle span.ab-icon:before { + content: "Menu"; + font: 14px/45px sans-serif !important; + display: inline-block !important; + color: #fff; +} + +.no-font-face #wpadminbar #wp-admin-bar-site-name a.ab-item { + color: #fff; +} +/* End no @font-face */ + +@media screen and ( max-width: 782px ) { + /* Toolbar Touchification*/ + html #wpadminbar { + left: 0 !important; + z-index: 500 !important; + height: 46px; + min-width: 300px; + + /* These rules break dropdown tappability on Chrome/Android. + -webkit-transform: translate3d(0, 0, 0); + -webkit-backface-visibility: hidden; + -webkit-transition: 0; + transform: translate3d(0, 0, 0); + backface-visibility: hidden; + transition: 0; + */ + } + + #wpadminbar * { + font: normal 14px/32px "Open Sans", sans-serif; + } + + #wpadminbar .quicklinks > ul > li > a, + #wpadminbar .quicklinks .ab-empty-item { + padding: 0; + height: 46px; + line-height: 46px; + width: auto; + } + + #wpadminbar .ab-icon { + font: 40px/1 dashicons !important; + margin: 0; + padding: 0; + width: 52px; + height: 46px; + text-align: center; + } + + #wpadminbar .ab-icon:before { + text-align: center; + } + + #wpadminbar .ab-submenu { + padding: 0; + } + + #wpadminbar #wp-admin-bar-site-name a.ab-item, + #wpadminbar #wp-admin-bar-my-sites a.ab-item, + #wpadminbar #wp-admin-bar-my-account a.ab-item { + text-overflow: clip; + } + + #wpadminbar .ab-label { + display: none; + } + + #wpadminbar .menupop li:hover > .ab-sub-wrapper, + #wpadminbar .menupop li.hover > .ab-sub-wrapper { + margin-top: -46px; + } + + #wpadminbar .ab-top-menu .menupop .ab-sub-wrapper .menupop > .ab-item { + padding-right: 30px; + } + + #wpadminbar .menupop .menupop > .ab-item:before { + top: 10px; + right: 6px; + } + + #wpadminbar .ab-top-menu > .menupop > .ab-sub-wrapper .ab-item { + font-size: 16px; + padding: 6px 15px 12px; + } + + #wpadminbar .ab-top-menu > .menupop > .ab-sub-wrapper a:empty { + display: none; + } + + /* WP logo */ + #wpadminbar #wp-admin-bar-wp-logo > .ab-item { + padding: 0; + } + + #wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon { + padding: 0; + width: 52px; + height: 46px; + text-align: center; + vertical-align: top; + } + + #wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before { + font: 28px/1 'dashicons' !important; + top: -3px; + } + + #wpadminbar .ab-icon, + #wpadminbar .ab-item:before { + padding: 0; + } + + /* My Sites and "Site Title" menu */ + #wpadminbar #wp-admin-bar-my-sites > .ab-item, + #wpadminbar #wp-admin-bar-site-name > .ab-item, + #wpadminbar #wp-admin-bar-edit > .ab-item, + #wpadminbar #wp-admin-bar-my-account > .ab-item { + text-indent: 100%; + white-space: nowrap; + overflow: hidden; + width: 52px; + padding: 0; + color: #999; + position: relative; + } + + #wpadminbar > #wp-toolbar > #wp-admin-bar-root-default .ab-icon, + #wpadminbar .ab-icon, + #wpadminbar .ab-item:before { + padding: 0; + margin-right: 0; + } + + #wpadminbar #wp-admin-bar-edit > .ab-item:before, + #wpadminbar #wp-admin-bar-my-sites > .ab-item:before, + #wpadminbar #wp-admin-bar-site-name > .ab-item:before, + #wpadminbar #wp-admin-bar-my-account > .ab-item:before { + display: block; + text-indent: 0; + font: normal 32px/1 'dashicons'; + speak: none; + top: 7px; + width: 52px; + text-align: center; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } + + #wpadminbar #wp-admin-bar-appearance { + margin-top: 0; + } + + #wpadminbar .quicklinks li .blavatar:before { + display: none; + } + + /* Search */ + #wpadminbar #wp-admin-bar-search { + display: none; + } + + /* New Content */ + #wpadminbar #wp-admin-bar-new-content .ab-icon:before { + top: 0; + line-height: 53px; + height: 46px !important; + text-align: center; + width: 52px; + display: block; + } + + /* Updates */ + #wpadminbar #wp-admin-bar-updates { + text-align: center; + } + + #wpadminbar #wp-admin-bar-updates .ab-icon:before { + top: 3px; + } + + /* Comments */ + #wpadminbar #wp-admin-bar-comments .ab-icon { + margin: 0; + } + + #wpadminbar #wp-admin-bar-comments .ab-icon:before { + display: block; + font-size: 34px; + height: 46px; + line-height: 47px; + top: 0; + } + + /* My Account */ + #wpadminbar #wp-admin-bar-my-account > a { + position: relative; + white-space: nowrap; + text-indent: 150%; /* More than 100% indention is needed since this element has padding */ + width: 28px; + padding: 0 10px; + overflow: hidden; /* Prevent link text from forcing horizontal scrolling on mobile */ + } + + #wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img { + position: absolute; + top: 13px; + right: 10px; + width: 26px; + height: 26px; + } + + #wpadminbar #wp-admin-bar-user-actions.ab-submenu { + padding: 0; + } + + #wpadminbar #wp-admin-bar-user-actions.ab-submenu img.avatar { + display: none; + } + + #wpadminbar #wp-admin-bar-my-account.with-avatar #wp-admin-bar-user-actions > li { + margin: 0; + } + + #wpadminbar #wp-admin-bar-user-info .display-name { + height: auto; + font-size: 16px; + line-height: 24px; + color: #eee; + } + + #wpadminbar #wp-admin-bar-user-info a { + padding-top: 4px; + } + + #wpadminbar #wp-admin-bar-user-info .username { + line-height: 0.8 !important; + margin-bottom: -2px; + } + + /* Show only default top level items */ + #wp-toolbar > ul > li { + display: none; + } + + #wpadminbar li#wp-admin-bar-menu-toggle, + #wpadminbar li#wp-admin-bar-wp-logo, + #wpadminbar li#wp-admin-bar-my-sites, + #wpadminbar li#wp-admin-bar-updates, + #wpadminbar li#wp-admin-bar-site-name, + #wpadminbar li#wp-admin-bar-new-content, + #wpadminbar li#wp-admin-bar-edit, + #wpadminbar li#wp-admin-bar-comments, + #wpadminbar li#wp-admin-bar-new-content, + #wpadminbar li#wp-admin-bar-my-account { + display: block; + } + + /* Allow dropdown list items to appear normally */ + #wpadminbar li:hover ul li, + #wpadminbar li.hover ul li, + #wpadminbar li:hover ul li:hover ul li { + display: list-item; + } + + /* Override default min-width so dropdown lists aren't stretched + to 100% viewport width at responsive sizes. */ + #wpadminbar .ab-top-menu > .menupop > .ab-sub-wrapper { + min-width: -webkit-fit-content; + min-width: -moz-fit-content; + min-width: fit-content; + } + + #wpadminbar ul#wp-admin-bar-root-default > li { + margin-right: 0; + } + + /* Experimental fix for touch toolbar dropdown positioning */ + #wpadminbar .ab-top-menu, + #wpadminbar .ab-top-secondary, + #wpadminbar #wp-admin-bar-wp-logo, + #wpadminbar #wp-admin-bar-my-sites, + #wpadminbar #wp-admin-bar-site-name, + #wpadminbar #wp-admin-bar-updates, + #wpadminbar #wp-admin-bar-comments, + #wpadminbar #wp-admin-bar-new-content, + #wpadminbar #wp-admin-bar-edit, + #wpadminbar #wp-admin-bar-my-account { + position: static; + } + + #wpadminbar #wp-admin-bar-my-account { + float: right; + } + + .network-admin #wpadminbar ul#wp-admin-bar-top-secondary > li#wp-admin-bar-my-account { + margin-right: 0; + } + + /* Realign arrows on taller responsive submenus */ + + #wpadminbar .ab-top-secondary .menupop .menupop > .ab-item:before { + top: 10px; + left: 0; + } +} + +/* Smartphone */ +@media screen and (max-width: 600px) { + #wpadminbar { + position: absolute; + } + + #wp-responsive-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 400; + } + + #wpadminbar .ab-top-menu > .menupop > .ab-sub-wrapper { + position: fixed; + width: 100%; + left: 0; + } + + #wpadminbar .menupop .menupop > .ab-item:before { + display: none; + } + + #wpadminbar #wp-admin-bar-wp-logo.menupop .ab-sub-wrapper { + margin-left: 0; + } + + #wpadminbar .ab-top-menu > .menupop li > .ab-sub-wrapper { + margin: 0; + width: 100%; + top: auto; + left: auto; + position: relative; + } + + #wpadminbar .ab-top-menu > .menupop li > .ab-sub-wrapper .ab-item { + font-size: 16px; + padding: 6px 15px 19px 30px; + } + + #wpadminbar li:hover ul li ul li { + display: list-item; + } + + #wpadminbar li#wp-admin-bar-wp-logo, + #wpadminbar li#wp-admin-bar-updates { + display: none; + } + + /* Make submenus full-width at this size */ + + #wpadminbar .ab-top-menu > .menupop li > .ab-sub-wrapper { + position: static; + -webkit-box-shadow: none; + box-shadow: none; + } +} diff --git a/wp-includes/css/admin-bar.min.css b/wp-includes/css/admin-bar.min.css new file mode 100644 index 0000000..e09e520 --- /dev/null +++ b/wp-includes/css/admin-bar.min.css @@ -0,0 +1 @@ +#wpadminbar *{height:auto;width:auto;margin:0;padding:0;position:static;text-shadow:none;text-transform:none;letter-spacing:normal;font:400 13px/32px "Open Sans",sans-serif;-webkit-border-radius:0;border-radius:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-transition:none;transition:none;-webkit-font-smoothing:subpixel-antialiased}.rtl #wpadminbar *{font-family:Tahoma,sans-serif}html:lang(he-il) .rtl #wpadminbar *{font-family:Arial,sans-serif}#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#eee}#wpadminbar #wp-admin-bar-my-sites a.ab-item,#wpadminbar #wp-admin-bar-site-name a.ab-item{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#wpadminbar ul li:after,#wpadminbar ul li:before{content:normal}#wpadminbar a,#wpadminbar a img,#wpadminbar a img:hover,#wpadminbar a:hover{outline:0;border:0;text-decoration:none;background:0 0}#wpadminbar a:active,#wpadminbar a:focus,#wpadminbar div,#wpadminbar input[type=email],#wpadminbar input[type=number],#wpadminbar input[type=password],#wpadminbar input[type=search],#wpadminbar input[type=text],#wpadminbar input[type=url],#wpadminbar select,#wpadminbar textarea{outline:0}#wpadminbar{direction:ltr;color:#ccc;font:400 13px/32px "Open Sans",sans-serif;height:32px;position:fixed;top:0;left:0;width:100%;min-width:600px;z-index:99999;background:#222}#wpadminbar .ab-sub-wrapper,#wpadminbar ul,#wpadminbar ul li{background:0 0;clear:none;list-style:none;margin:0;padding:0;position:relative;text-indent:0;z-index:99999}#wpadminbar ul#wp-admin-bar-root-default>li{margin-right:0}#wpadminbar .quicklinks{border-left:1px solid transparent}#wpadminbar .quicklinks ul{text-align:left}#wpadminbar li{float:left}#wpadminbar .ab-empty-item{outline:0}#wpadminbar .quicklinks .ab-top-secondary>li{float:right}#wpadminbar .quicklinks .ab-empty-item,#wpadminbar .quicklinks a,#wpadminbar .shortlink-input{height:32px;display:block;padding:0 10px;margin:0}#wpadminbar .quicklinks>ul>li>a{padding:0 8px 0 7px}#wpadminbar .menupop .ab-sub-wrapper,#wpadminbar .shortlink-input{margin:0;padding:0;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2);background:#333;display:none;position:absolute;float:none}#wpadminbar.ie7 .menupop .ab-sub-wrapper,#wpadminbar.ie7 .shortlink-input{top:32px;left:0}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper{min-width:100%}#wpadminbar .ab-top-secondary .menupop .ab-sub-wrapper{right:0;left:auto}#wpadminbar .ab-submenu{padding:6px 0}#wpadminbar .selected .shortlink-input{display:block}#wpadminbar .quicklinks .menupop ul li{float:none}#wpadminbar .quicklinks .menupop ul li a strong{font-weight:700}#wpadminbar .quicklinks .menupop ul li .ab-item,#wpadminbar .quicklinks .menupop ul li a strong,#wpadminbar .quicklinks .menupop.hover ul li .ab-item,#wpadminbar .shortlink-input,#wpadminbar.nojs .quicklinks .menupop:hover ul li .ab-item{line-height:26px;height:26px;white-space:nowrap;min-width:140px}#wpadminbar .shortlink-input{width:200px}#wpadminbar li.hover>.ab-sub-wrapper,#wpadminbar.nojs li:hover>.ab-sub-wrapper{display:block}#wpadminbar .menupop li.hover>.ab-sub-wrapper,#wpadminbar .menupop li:hover>.ab-sub-wrapper{margin-left:100%;margin-top:-32px}#wpadminbar .ab-top-secondary .menupop li.hover>.ab-sub-wrapper,#wpadminbar .ab-top-secondary .menupop li:hover>.ab-sub-wrapper{margin-left:0;left:inherit;right:100%}#wpadminbar .ab-top-menu>li.hover>.ab-item,#wpadminbar .ab-top-menu>li:hover>.ab-item,#wpadminbar .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus{background:#333;color:#2ea2cc}#wpadminbar>#wp-toolbar a:focus span.ab-label,#wpadminbar>#wp-toolbar li.hover span.ab-label,#wpadminbar>#wp-toolbar li:hover span.ab-label{color:#2ea2cc}#wpadminbar .ab-icon,#wpadminbar .ab-item:before,#wpadminbar>#wp-toolbar>#wp-admin-bar-root-default .ab-icon{position:relative;float:left;font:400 20px/1 dashicons;speak:none;padding:4px 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-image:none!important;margin-right:6px}#wpadminbar #adminbarsearch:before,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:before{color:#999;position:relative;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#wpadminbar .ab-label{display:inline-block;height:32px}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop ul li a strong,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#eee}#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover{color:#2ea2cc}#wpadminbar .ab-top-secondary .menupop .menupop>.ab-item:before,#wpadminbar .menupop .menupop>.ab-item:before{position:absolute;font:400 17px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#wpadminbar .menupop .menupop>.ab-item{display:block;padding-right:2em}#wpadminbar .menupop .menupop>.ab-item:before{top:1px;right:4px;content:'\f139';color:inherit}#wpadminbar .ab-top-secondary .menupop .menupop>.ab-item{padding-left:2em;padding-right:1em}#wpadminbar .ab-top-secondary .menupop .menupop>.ab-item:before{top:5px;left:3px;content:'\f141'}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary{display:block;position:relative;right:auto;margin:0;-webkit-box-shadow:none;box-shadow:none}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#4b4b4b}#wpadminbar .quicklinks .menupop .ab-sub-secondary>li .ab-item:focus a,#wpadminbar .quicklinks .menupop .ab-sub-secondary>li>a:hover{color:#2ea2cc}#wpadminbar .quicklinks a span#ab-updates{background:#eee;color:#333;display:inline;padding:2px 5px;font-size:10px;font-weight:700;-webkit-border-radius:10px;border-radius:10px}#wpadminbar .quicklinks a:hover span#ab-updates{background:#fff;color:#000}#wpadminbar .ab-top-secondary{float:right}#wpadminbar ul li:last-child,#wpadminbar ul li:last-child .ab-item{-webkit-box-shadow:none;box-shadow:none}#wp-admin-bar-my-account>ul{min-width:198px}#wp-admin-bar-my-account>.ab-item:before{content:"\f110";top:2px;float:right;margin-left:6px;margin-right:0}#wp-admin-bar-my-account.with-avatar>.ab-item:before{display:none;content:none}#wp-admin-bar-my-account.with-avatar>ul{min-width:270px}#wpadminbar #wp-admin-bar-user-actions>li{margin-left:16px;margin-right:16px}#wpadminbar #wp-admin-bar-user-actions.ab-submenu{padding:6px 0 12px}#wpadminbar #wp-admin-bar-my-account.with-avatar #wp-admin-bar-user-actions>li{margin-left:88px}#wpadminbar #wp-admin-bar-user-info{margin-top:6px;margin-bottom:15px;height:auto;background:0 0}#wp-admin-bar-user-info .avatar{position:absolute;left:-72px;top:4px;width:64px;height:64px}#wpadminbar #wp-admin-bar-user-info a{background:0 0;height:auto}#wpadminbar #wp-admin-bar-user-info span{background:0 0;padding:0;height:18px}#wpadminbar #wp-admin-bar-user-info .display-name,#wpadminbar #wp-admin-bar-user-info .username{display:block}#wpadminbar #wp-admin-bar-user-info .username{color:#999;font-size:11px}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{width:16px;height:16px;padding:0;border:1px solid #888;background:#eee;line-height:24px;vertical-align:middle;margin:-4px 0 0 6px;float:none;display:inline}#wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon{width:15px;height:20px;margin-right:0;padding:6px 0 5px}#wpadminbar #wp-admin-bar-wp-logo>.ab-item{padding:0 7px}#wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon:before{content:'\f120';top:2px}#wpadminbar .quicklinks li .blavatar{float:left;font:400 16px/1 dashicons!important;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#eee}#wpadminbar .quicklinks li a:hover .blavatar{color:#2ea2cc}#wpadminbar .quicklinks li .blavatar:before{content:'\f120';height:16px;width:16px;display:inline-block;margin:6px 8px 0 -2px}#wpadminbar #wp-admin-bar-appearance{margin-top:-12px}#wpadminbar #wp-admin-bar-my-sites>.ab-item:before,#wpadminbar #wp-admin-bar-site-name>.ab-item:before{content:'\f112';top:2px}#wpadminbar #wp-admin-bar-edit>.ab-item:before{content:'\f464';top:2px}#wpadminbar #wp-admin-bar-site-name>.ab-item:before{content:"\f102"}#wpadminbar #wp-admin-bar-comments .ab-icon{margin-right:6px}#wpadminbar #wp-admin-bar-comments .ab-icon:before{content:'\f101';top:3px}#wpadminbar #wp-admin-bar-comments .count-0{opacity:.5}#wpadminbar #wp-admin-bar-new-content .ab-icon:before{content:'\f132';top:4px}#wpadminbar #wp-admin-bar-updates .ab-icon:before{content:'\f463';top:2px}#wpadminbar #wp-admin-bar-search .ab-item{padding:0;background:0 0}#wpadminbar #adminbarsearch{position:relative;height:32px;padding:0 2px}#wpadminbar #adminbarsearch:before{position:absolute;top:6px;left:5px;z-index:20;font:400 20px/1 dashicons!important;content:'\f179';speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input{position:relative;z-index:30;font:13px/24px "Open Sans",sans-serif;height:24px;width:24px;padding:0 3px 0 24px;margin:0;color:#ccc;background-color:rgba(255,255,255,0);border:0;outline:0;cursor:pointer;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition-duration:400ms;transition-duration:400ms;-webkit-transition-property:width,background;transition-property:width,background;-webkit-transition-timing-function:ease;transition-timing-function:ease}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{z-index:10;color:#000;width:200px;background-color:rgba(255,255,255,.9);cursor:text;border:0}#wpadminbar.ie7>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input{margin-top:3px;width:120px}#wpadminbar.ie8>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input{margin-top:4px;background-color:#464646}#wpadminbar.ie8>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{background-color:#fff}#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder{color:#999}#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder{color:#999}#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder{color:#999}#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder{color:#999}#wpadminbar #adminbarsearch .adminbar-button,.customize-support .hide-if-customize,.customize-support .wp-core-ui .hide-if-customize,.customize-support.wp-core-ui .hide-if-customize,.no-customize-support .hide-if-no-customize,.no-customize-support .wp-core-ui .hide-if-no-customize,.no-customize-support.wp-core-ui .hide-if-no-customize{display:none}#wpadminbar .screen-reader-text,#wpadminbar .screen-reader-text span{position:absolute;left:-1000em;top:-1000em;height:1px;width:1px;overflow:hidden}#wpadminbar .screen-reader-shortcut{position:absolute;top:-1000em}#wpadminbar .screen-reader-shortcut:focus{left:6px;top:7px;height:auto;width:auto;display:block;font-size:14px;font-weight:700;padding:15px 23px 14px;background:#f1f1f1;color:#21759b;z-index:100000;line-height:normal;text-decoration:none;-webkit-box-shadow:0 0 2px 2px rgba(0,0,0,.6);box-shadow:0 0 2px 2px rgba(0,0,0,.6)}* html #wpadminbar{overflow:hidden;position:absolute}* html #wpadminbar .quicklinks ul li a{float:left}* html #wpadminbar .menupop a span{background-image:none}.no-font-face #wpadminbar ul.ab-top-menu>li>a.ab-item{display:block;width:45px;text-align:center;overflow:hidden;margin:0 3px}.no-font-face #wpadminbar #wp-admin-bar-edit>.ab-item,.no-font-face #wpadminbar #wp-admin-bar-my-sites>.ab-item,.no-font-face #wpadminbar #wp-admin-bar-site-name>.ab-item{text-indent:0}.no-font-face #wpadminbar #wp-admin-bar-wp-logo>.ab-item,.no-font-face #wpadminbar .ab-icon,.no-font-face #wpadminbar .ab-icon:before,.no-font-face #wpadminbar a.ab-item:before{display:none!important}.no-font-face #wpadminbar ul.ab-top-menu>li>a>span.ab-label{display:inline}.no-font-face #wpadminbar #wp-admin-bar-menu-toggle span.ab-icon{display:inline!important}.no-font-face #wpadminbar #wp-admin-bar-menu-toggle span.ab-icon:before{content:"Menu";font:14px/45px sans-serif!important;display:inline-block!important;color:#fff}.no-font-face #wpadminbar #wp-admin-bar-site-name a.ab-item{color:#fff}@media screen and (max-width:782px){html #wpadminbar{left:0!important;z-index:500!important;height:46px;min-width:300px}#wpadminbar *{font:400 14px/32px "Open Sans",sans-serif}#wpadminbar .quicklinks .ab-empty-item,#wpadminbar .quicklinks>ul>li>a{padding:0;height:46px;line-height:46px;width:auto}#wpadminbar .ab-icon{font:40px/1 dashicons!important;margin:0;width:52px;height:46px;text-align:center}#wpadminbar .ab-icon:before{text-align:center}#wpadminbar .ab-submenu{padding:0}#wpadminbar #wp-admin-bar-my-account a.ab-item,#wpadminbar #wp-admin-bar-my-sites a.ab-item,#wpadminbar #wp-admin-bar-site-name a.ab-item{text-overflow:clip}#wpadminbar .ab-label{display:none}#wpadminbar .menupop li.hover>.ab-sub-wrapper,#wpadminbar .menupop li:hover>.ab-sub-wrapper{margin-top:-46px}#wpadminbar .ab-top-menu .menupop .ab-sub-wrapper .menupop>.ab-item{padding-right:30px}#wpadminbar .menupop .menupop>.ab-item:before{top:10px;right:6px}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper .ab-item{font-size:16px;padding:6px 15px 12px}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper a:empty{display:none}#wpadminbar #wp-admin-bar-wp-logo>.ab-item{padding:0}#wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon{padding:0;width:52px;height:46px;text-align:center;vertical-align:top}#wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon:before{font:28px/1 dashicons!important;top:-3px}#wpadminbar #wp-admin-bar-edit>.ab-item,#wpadminbar #wp-admin-bar-my-account>.ab-item,#wpadminbar #wp-admin-bar-my-sites>.ab-item,#wpadminbar #wp-admin-bar-site-name>.ab-item{text-indent:100%;white-space:nowrap;overflow:hidden;width:52px;padding:0;color:#999;position:relative}#wpadminbar .ab-icon,#wpadminbar .ab-item:before,#wpadminbar>#wp-toolbar>#wp-admin-bar-root-default .ab-icon{padding:0;margin-right:0}#wpadminbar #wp-admin-bar-edit>.ab-item:before,#wpadminbar #wp-admin-bar-my-account>.ab-item:before,#wpadminbar #wp-admin-bar-my-sites>.ab-item:before,#wpadminbar #wp-admin-bar-site-name>.ab-item:before{display:block;text-indent:0;font:400 32px/1 dashicons;speak:none;top:7px;width:52px;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#wpadminbar #wp-admin-bar-appearance{margin-top:0}#wpadminbar #wp-admin-bar-search,#wpadminbar .quicklinks li .blavatar:before{display:none}#wpadminbar #wp-admin-bar-new-content .ab-icon:before{top:0;line-height:53px;height:46px!important;text-align:center;width:52px;display:block}#wpadminbar #wp-admin-bar-updates{text-align:center}#wpadminbar #wp-admin-bar-updates .ab-icon:before{top:3px}#wpadminbar #wp-admin-bar-comments .ab-icon{margin:0}#wpadminbar #wp-admin-bar-comments .ab-icon:before{display:block;font-size:34px;height:46px;line-height:47px;top:0}#wpadminbar #wp-admin-bar-my-account>a{position:relative;white-space:nowrap;text-indent:150%;width:28px;padding:0 10px;overflow:hidden}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{position:absolute;top:13px;right:10px;width:26px;height:26px}#wpadminbar #wp-admin-bar-user-actions.ab-submenu{padding:0}#wpadminbar #wp-admin-bar-user-actions.ab-submenu img.avatar{display:none}#wpadminbar #wp-admin-bar-my-account.with-avatar #wp-admin-bar-user-actions>li{margin:0}#wpadminbar #wp-admin-bar-user-info .display-name{height:auto;font-size:16px;line-height:24px;color:#eee}#wpadminbar #wp-admin-bar-user-info a{padding-top:4px}#wpadminbar #wp-admin-bar-user-info .username{line-height:.8!important;margin-bottom:-2px}#wp-toolbar>ul>li{display:none}#wpadminbar li#wp-admin-bar-comments,#wpadminbar li#wp-admin-bar-edit,#wpadminbar li#wp-admin-bar-menu-toggle,#wpadminbar li#wp-admin-bar-my-account,#wpadminbar li#wp-admin-bar-my-sites,#wpadminbar li#wp-admin-bar-new-content,#wpadminbar li#wp-admin-bar-site-name,#wpadminbar li#wp-admin-bar-updates,#wpadminbar li#wp-admin-bar-wp-logo{display:block}#wpadminbar li.hover ul li,#wpadminbar li:hover ul li,#wpadminbar li:hover ul li:hover ul li{display:list-item}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper{min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content}#wpadminbar ul#wp-admin-bar-root-default>li{margin-right:0}#wpadminbar #wp-admin-bar-comments,#wpadminbar #wp-admin-bar-edit,#wpadminbar #wp-admin-bar-my-account,#wpadminbar #wp-admin-bar-my-sites,#wpadminbar #wp-admin-bar-new-content,#wpadminbar #wp-admin-bar-site-name,#wpadminbar #wp-admin-bar-updates,#wpadminbar #wp-admin-bar-wp-logo,#wpadminbar .ab-top-menu,#wpadminbar .ab-top-secondary{position:static}#wpadminbar #wp-admin-bar-my-account{float:right}.network-admin #wpadminbar ul#wp-admin-bar-top-secondary>li#wp-admin-bar-my-account{margin-right:0}#wpadminbar .ab-top-secondary .menupop .menupop>.ab-item:before{top:10px;left:0}}@media screen and (max-width:600px){#wpadminbar{position:absolute}#wp-responsive-overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:400}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper{position:fixed;width:100%;left:0}#wpadminbar .menupop .menupop>.ab-item:before{display:none}#wpadminbar #wp-admin-bar-wp-logo.menupop .ab-sub-wrapper{margin-left:0}#wpadminbar .ab-top-menu>.menupop li>.ab-sub-wrapper{margin:0;width:100%;top:auto;left:auto}#wpadminbar .ab-top-menu>.menupop li>.ab-sub-wrapper .ab-item{font-size:16px;padding:6px 15px 19px 30px}#wpadminbar li:hover ul li ul li{display:list-item}#wpadminbar li#wp-admin-bar-updates,#wpadminbar li#wp-admin-bar-wp-logo{display:none}#wpadminbar .ab-top-menu>.menupop li>.ab-sub-wrapper{position:static;-webkit-box-shadow:none;box-shadow:none}} \ No newline at end of file diff --git a/wp-includes/css/buttons-rtl.css b/wp-includes/css/buttons-rtl.css new file mode 100644 index 0000000..c24eade --- /dev/null +++ b/wp-includes/css/buttons-rtl.css @@ -0,0 +1,335 @@ +/* ---------------------------------------------------------------------------- + +NOTE: If you edit this file, you should make sure that the CSS rules for +buttons in the following files are updated. + +* jquery-ui-dialog.css +* editor.css + +WordPress-style Buttons +======================= +Create a button by adding the %60.button` class to an element. For backwards +compatibility, we support several other classes (such as `.button-secondary`), +but these will *not* work with the stackable classes described below. + +Button Styles +------------- +To display a primary button style, add the `.button-primary` class to a button. + +Button Sizes +------------ +Adjust a button's size by adding the `.button-large` or `.button-small` class. + +Button States +------------- +Lock the state of a button by adding the name of the pseudoclass as +an actual class (e.g. `.hover` for `:hover`). + + +TABLE OF CONTENTS: +------------------ + 1.0 - Button Layouts + 2.0 - Default Button Style + 3.0 - Primary Button Style + 4.0 - Button Groups + 5.0 - Responsive Button Styles + +---------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------------- + 1.0 - Button Layouts +---------------------------------------------------------------------------- */ + +.wp-core-ui .button, +.wp-core-ui .button-primary, +.wp-core-ui .button-secondary { + display: inline-block; + text-decoration: none; + font-size: 13px; + line-height: 26px; + height: 28px; + margin: 0; + padding: 0 10px 1px; + cursor: pointer; + border-width: 1px; + border-style: solid; + -webkit-appearance: none; + -webkit-border-radius: 3px; + border-radius: 3px; + white-space: nowrap; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +/* Remove the dotted border on :focus and the extra padding in Firefox */ +.wp-core-ui button::-moz-focus-inner, +.wp-core-ui input[type="reset"]::-moz-focus-inner, +.wp-core-ui input[type="button"]::-moz-focus-inner, +.wp-core-ui input[type="submit"]::-moz-focus-inner { + border-width: 1px 0; + border-style: solid none; + border-color: transparent; + padding: 0; +} + +.wp-core-ui .button.button-large, +.wp-core-ui .button-group.button-large .button { + height: 30px; + line-height: 28px; + padding: 0 12px 2px; +} + +.wp-core-ui .button.button-small, +.wp-core-ui .button-group.button-small .button { + height: 24px; + line-height: 22px; + padding: 0 8px 1px; + font-size: 11px; +} + +.wp-core-ui .button.button-hero, +.wp-core-ui .button-group.button-hero .button { + font-size: 14px; + height: 46px; + line-height: 44px; + padding: 0 36px; +} + +.wp-core-ui .button:active { + outline: none; +} + +.wp-core-ui .button.hidden { + display: none; +} + +/* Style Reset buttons as simple text links */ + +.wp-core-ui input[type="reset"], +.wp-core-ui input[type="reset"]:hover, +.wp-core-ui input[type="reset"]:active, +.wp-core-ui input[type="reset"]:focus { + background: none; + border: none; + -webkit-box-shadow: none; + box-shadow: none; + padding: 0 2px 1px; + width: auto; +} + +/* ---------------------------------------------------------------------------- + 2.0 - Default Button Style +---------------------------------------------------------------------------- */ + +.wp-core-ui .button, +.wp-core-ui .button-secondary { + color: #555; + border-color: #cccccc; + background: #f7f7f7; + -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.08); + box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.08); + vertical-align: top; +} + +.wp-core-ui p .button { + vertical-align: baseline; +} + +.wp-core-ui .button.hover, +.wp-core-ui .button:hover, +.wp-core-ui .button-secondary:hover, +.wp-core-ui .button.focus, +.wp-core-ui .button:focus, +.wp-core-ui .button-secondary:focus { + background: #fafafa; + border-color: #999; + color: #222; +} + +.wp-core-ui .button.focus, +.wp-core-ui .button:focus, +.wp-core-ui .button-secondary:focus { + -webkit-box-shadow: 1px 1px 1px rgba(0,0,0,.2); + box-shadow: 1px 1px 1px rgba(0,0,0,.2); +} + +.wp-core-ui .button.active, +.wp-core-ui .button.active:hover, +.wp-core-ui .button.active:focus, +.wp-core-ui .button:active, +.wp-core-ui .button-secondary:active { + background: #eee; + border-color: #999; + color: #333; + -webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 ); + box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 ); +} + +.wp-core-ui .button[disabled], +.wp-core-ui .button:disabled, +.wp-core-ui .button.disabled, +.wp-core-ui .button-secondary[disabled], +.wp-core-ui .button-secondary:disabled, +.wp-core-ui .button-secondary.disabled, +.wp-core-ui .button-disabled { + color: #aaa !important; + border-color: #ddd !important; + background: #f7f7f7 !important; + -webkit-box-shadow: none !important; + box-shadow: none !important; + text-shadow: 0 1px 0 #fff !important; + cursor: default; +} + +/* ---------------------------------------------------------------------------- + 3.0 - Primary Button Style +---------------------------------------------------------------------------- */ + +.wp-core-ui .button-primary { + background: #2ea2cc; + border-color: #0074a2; + -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.5), 0 1px 0 rgba(0,0,0,.15); + box-shadow: inset 0 1px 0 rgba(120,200,230,0.5), 0 1px 0 rgba(0,0,0,.15); + color: #fff; + text-decoration: none; +} + +.wp-core-ui .button-primary.hover, +.wp-core-ui .button-primary:hover, +.wp-core-ui .button-primary.focus, +.wp-core-ui .button-primary:focus { + background: #1e8cbe; + border-color: #0074a2; + -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6); + box-shadow: inset 0 1px 0 rgba(120,200,230,0.6); + color: #fff; +} + +.wp-core-ui .button-primary.focus, +.wp-core-ui .button-primary:focus { + border-color: #0e3950; + -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6), 1px 1px 2px rgba(0,0,0,0.4); + box-shadow: inset 0 1px 0 rgba(120,200,230,0.6), 1px 1px 2px rgba(0,0,0,0.4); +} + +.wp-core-ui .button-primary.active, +.wp-core-ui .button-primary.active:hover, +.wp-core-ui .button-primary.active:focus, +.wp-core-ui .button-primary:active { + background: #1b7aa6; + border-color: #005684; + color: rgba(255,255,255,0.95); + -webkit-box-shadow: inset 0 1px 0 rgba(0,0,0,0.1); + box-shadow: inset 0 1px 0 rgba(0,0,0,0.1); + vertical-align: top; +} + +.wp-core-ui .button-primary[disabled], +.wp-core-ui .button-primary:disabled, +.wp-core-ui .button-primary-disabled, +.wp-core-ui .button-primary.disabled { + color: #94cde7 !important; + background: #298cba !important; + border-color: #1b607f !important; + -webkit-box-shadow: none !important; + box-shadow: none !important; + text-shadow: 0 -1px 0 rgba(0,0,0,0.1) !important; + cursor: default; +} + +/* ---------------------------------------------------------------------------- + 4.0 - Button Groups +---------------------------------------------------------------------------- */ + +.wp-core-ui .button-group { + position: relative; + display: inline-block; + white-space: nowrap; + font-size: 0; + vertical-align: middle; +} + +.wp-core-ui .button-group > .button { + display: inline-block; + -webkit-border-radius: 0; + border-radius: 0; + margin-left: -1px; + z-index: 10; +} + +.wp-core-ui .button-group > .button-primary { + z-index: 100; +} + +.wp-core-ui .button-group > .button:hover { + z-index: 20; +} + +.wp-core-ui .button-group > .button:first-child { + -webkit-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} + +.wp-core-ui .button-group > .button:last-child { + -webkit-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; +} + +/* ---------------------------------------------------------------------------- + 5.0 - Responsive Button Styles +---------------------------------------------------------------------------- */ + +@media screen and ( max-width: 782px ) { + + .wp-core-ui .button, + .wp-core-ui .button.button-large, + .wp-core-ui .button.button-small, + input#publish, + input#save-post, + a.preview { + padding: 6px 14px; + line-height: normal; + font-size: 14px; + vertical-align: middle; + height: auto; + margin-bottom: 4px; + } + + #media-upload.wp-core-ui .button { + padding: 0 10px 1px; + height: 24px; + line-height: 22px; + font-size: 13px; + } + + /* Publish Metabox Options */ + .wp-core-ui .save-post-status.button { + position: relative; + margin: 0 10px 0 14px; /* 14px right margin to match all other buttons */ + } + + /* Reset responsive styles in Press This, Customizer */ + + .wp-core-ui.wp-customizer .button, + .press-this.wp-core-ui .button, + .press-this input#publish, + .press-this input#save-post, + .press-this a.preview { + padding: 0 10px 1px; + font-size: 13px; + line-height: 26px; + height: 28px; + margin: 0; + vertical-align: inherit; + } + + /* Reset responsive styles on Log in button on iframed login form */ + + .interim-login .button.button-large { + height: 30px; + line-height: 28px; + padding: 0 12px 2px; + } + +} diff --git a/wp-includes/css/buttons-rtl.min.css b/wp-includes/css/buttons-rtl.min.css new file mode 100644 index 0000000..f708de8 --- /dev/null +++ b/wp-includes/css/buttons-rtl.min.css @@ -0,0 +1 @@ +.wp-core-ui .button,.wp-core-ui .button-primary,.wp-core-ui .button-secondary{display:inline-block;text-decoration:none;font-size:13px;line-height:26px;height:28px;margin:0;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-core-ui button::-moz-focus-inner,.wp-core-ui input[type=button]::-moz-focus-inner,.wp-core-ui input[type=reset]::-moz-focus-inner,.wp-core-ui input[type=submit]::-moz-focus-inner{border-width:1px 0;border-style:solid none;border-color:transparent;padding:0}.wp-core-ui .button-group.button-large .button,.wp-core-ui .button.button-large{height:30px;line-height:28px;padding:0 12px 2px}.wp-core-ui .button-group.button-small .button,.wp-core-ui .button.button-small{height:24px;line-height:22px;padding:0 8px 1px;font-size:11px}.wp-core-ui .button-group.button-hero .button,.wp-core-ui .button.button-hero{font-size:14px;height:46px;line-height:44px;padding:0 36px}.wp-core-ui .button:active{outline:0}.wp-core-ui .button.hidden{display:none}.wp-core-ui input[type=reset],.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:focus,.wp-core-ui input[type=reset]:hover{background:0 0;border:0;-webkit-box-shadow:none;box-shadow:none;padding:0 2px 1px;width:auto}.wp-core-ui .button,.wp-core-ui .button-secondary{color:#555;border-color:#ccc;background:#f7f7f7;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);vertical-align:top}.wp-core-ui p .button{vertical-align:baseline}.wp-core-ui .button-secondary:focus,.wp-core-ui .button-secondary:hover,.wp-core-ui .button.focus,.wp-core-ui .button.hover,.wp-core-ui .button:focus,.wp-core-ui .button:hover{background:#fafafa;border-color:#999;color:#222}.wp-core-ui .button-secondary:focus,.wp-core-ui .button.focus,.wp-core-ui .button:focus{-webkit-box-shadow:1px 1px 1px rgba(0,0,0,.2);box-shadow:1px 1px 1px rgba(0,0,0,.2)}.wp-core-ui .button-secondary:active,.wp-core-ui .button.active,.wp-core-ui .button.active:focus,.wp-core-ui .button.active:hover,.wp-core-ui .button:active{background:#eee;border-color:#999;color:#333;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.wp-core-ui .button-disabled,.wp-core-ui .button-secondary.disabled,.wp-core-ui .button-secondary:disabled,.wp-core-ui .button-secondary[disabled],.wp-core-ui .button.disabled,.wp-core-ui .button:disabled,.wp-core-ui .button[disabled]{color:#aaa!important;border-color:#ddd!important;background:#f7f7f7!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 1px 0 #fff!important;cursor:default}.wp-core-ui .button-primary{background:#2ea2cc;border-color:#0074a2;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);color:#fff;text-decoration:none}.wp-core-ui .button-primary.focus,.wp-core-ui .button-primary.hover,.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#1e8cbe;border-color:#0074a2;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.6);box-shadow:inset 0 1px 0 rgba(120,200,230,.6);color:#fff}.wp-core-ui .button-primary.focus,.wp-core-ui .button-primary:focus{border-color:#0e3950;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.6),1px 1px 2px rgba(0,0,0,.4);box-shadow:inset 0 1px 0 rgba(120,200,230,.6),1px 1px 2px rgba(0,0,0,.4)}.wp-core-ui .button-primary.active,.wp-core-ui .button-primary.active:focus,.wp-core-ui .button-primary.active:hover,.wp-core-ui .button-primary:active{background:#1b7aa6;border-color:#005684;color:rgba(255,255,255,.95);-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(0,0,0,.1);vertical-align:top}.wp-core-ui .button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#94cde7!important;background:#298cba!important;border-color:#1b607f!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 -1px 0 rgba(0,0,0,.1)!important;cursor:default}.wp-core-ui .button-group{position:relative;display:inline-block;white-space:nowrap;font-size:0;vertical-align:middle}.wp-core-ui .button-group>.button{display:inline-block;-webkit-border-radius:0;border-radius:0;margin-left:-1px;z-index:10}.wp-core-ui .button-group>.button-primary{z-index:100}.wp-core-ui .button-group>.button:hover{z-index:20}.wp-core-ui .button-group>.button:first-child{-webkit-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.wp-core-ui .button-group>.button:last-child{-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}@media screen and (max-width:782px){.wp-core-ui .button,.wp-core-ui .button.button-large,.wp-core-ui .button.button-small,a.preview,input#publish,input#save-post{padding:6px 14px;line-height:normal;font-size:14px;vertical-align:middle;height:auto;margin-bottom:4px}#media-upload.wp-core-ui .button{padding:0 10px 1px;height:24px;line-height:22px;font-size:13px}.wp-core-ui .save-post-status.button{position:relative;margin:0 10px 0 14px}.press-this a.preview,.press-this input#publish,.press-this input#save-post,.press-this.wp-core-ui .button,.wp-core-ui.wp-customizer .button{padding:0 10px 1px;font-size:13px;line-height:26px;height:28px;margin:0;vertical-align:inherit}.interim-login .button.button-large{height:30px;line-height:28px;padding:0 12px 2px}} \ No newline at end of file diff --git a/wp-includes/css/buttons.css b/wp-includes/css/buttons.css new file mode 100644 index 0000000..1642491 --- /dev/null +++ b/wp-includes/css/buttons.css @@ -0,0 +1,335 @@ +/* ---------------------------------------------------------------------------- + +NOTE: If you edit this file, you should make sure that the CSS rules for +buttons in the following files are updated. + +* jquery-ui-dialog.css +* editor.css + +WordPress-style Buttons +======================= +Create a button by adding the `.button` class to an element. For backwards +compatibility, we support several other classes (such as `.button-secondary`), +but these will *not* work with the stackable classes described below. + +Button Styles +------------- +To display a primary button style, add the `.button-primary` class to a button. + +Button Sizes +------------ +Adjust a button's size by adding the `.button-large` or `.button-small` class. + +Button States +------------- +Lock the state of a button by adding the name of the pseudoclass as +an actual class (e.g. `.hover` for `:hover`). + + +TABLE OF CONTENTS: +------------------ + 1.0 - Button Layouts + 2.0 - Default Button Style + 3.0 - Primary Button Style + 4.0 - Button Groups + 5.0 - Responsive Button Styles + +---------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------------- + 1.0 - Button Layouts +---------------------------------------------------------------------------- */ + +.wp-core-ui .button, +.wp-core-ui .button-primary, +.wp-core-ui .button-secondary { + display: inline-block; + text-decoration: none; + font-size: 13px; + line-height: 26px; + height: 28px; + margin: 0; + padding: 0 10px 1px; + cursor: pointer; + border-width: 1px; + border-style: solid; + -webkit-appearance: none; + -webkit-border-radius: 3px; + border-radius: 3px; + white-space: nowrap; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +/* Remove the dotted border on :focus and the extra padding in Firefox */ +.wp-core-ui button::-moz-focus-inner, +.wp-core-ui input[type="reset"]::-moz-focus-inner, +.wp-core-ui input[type="button"]::-moz-focus-inner, +.wp-core-ui input[type="submit"]::-moz-focus-inner { + border-width: 1px 0; + border-style: solid none; + border-color: transparent; + padding: 0; +} + +.wp-core-ui .button.button-large, +.wp-core-ui .button-group.button-large .button { + height: 30px; + line-height: 28px; + padding: 0 12px 2px; +} + +.wp-core-ui .button.button-small, +.wp-core-ui .button-group.button-small .button { + height: 24px; + line-height: 22px; + padding: 0 8px 1px; + font-size: 11px; +} + +.wp-core-ui .button.button-hero, +.wp-core-ui .button-group.button-hero .button { + font-size: 14px; + height: 46px; + line-height: 44px; + padding: 0 36px; +} + +.wp-core-ui .button:active { + outline: none; +} + +.wp-core-ui .button.hidden { + display: none; +} + +/* Style Reset buttons as simple text links */ + +.wp-core-ui input[type="reset"], +.wp-core-ui input[type="reset"]:hover, +.wp-core-ui input[type="reset"]:active, +.wp-core-ui input[type="reset"]:focus { + background: none; + border: none; + -webkit-box-shadow: none; + box-shadow: none; + padding: 0 2px 1px; + width: auto; +} + +/* ---------------------------------------------------------------------------- + 2.0 - Default Button Style +---------------------------------------------------------------------------- */ + +.wp-core-ui .button, +.wp-core-ui .button-secondary { + color: #555; + border-color: #cccccc; + background: #f7f7f7; + -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.08); + box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.08); + vertical-align: top; +} + +.wp-core-ui p .button { + vertical-align: baseline; +} + +.wp-core-ui .button.hover, +.wp-core-ui .button:hover, +.wp-core-ui .button-secondary:hover, +.wp-core-ui .button.focus, +.wp-core-ui .button:focus, +.wp-core-ui .button-secondary:focus { + background: #fafafa; + border-color: #999; + color: #222; +} + +.wp-core-ui .button.focus, +.wp-core-ui .button:focus, +.wp-core-ui .button-secondary:focus { + -webkit-box-shadow: 1px 1px 1px rgba(0,0,0,.2); + box-shadow: 1px 1px 1px rgba(0,0,0,.2); +} + +.wp-core-ui .button.active, +.wp-core-ui .button.active:hover, +.wp-core-ui .button.active:focus, +.wp-core-ui .button:active, +.wp-core-ui .button-secondary:active { + background: #eee; + border-color: #999; + color: #333; + -webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 ); + box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 ); +} + +.wp-core-ui .button[disabled], +.wp-core-ui .button:disabled, +.wp-core-ui .button.disabled, +.wp-core-ui .button-secondary[disabled], +.wp-core-ui .button-secondary:disabled, +.wp-core-ui .button-secondary.disabled, +.wp-core-ui .button-disabled { + color: #aaa !important; + border-color: #ddd !important; + background: #f7f7f7 !important; + -webkit-box-shadow: none !important; + box-shadow: none !important; + text-shadow: 0 1px 0 #fff !important; + cursor: default; +} + +/* ---------------------------------------------------------------------------- + 3.0 - Primary Button Style +---------------------------------------------------------------------------- */ + +.wp-core-ui .button-primary { + background: #2ea2cc; + border-color: #0074a2; + -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.5), 0 1px 0 rgba(0,0,0,.15); + box-shadow: inset 0 1px 0 rgba(120,200,230,0.5), 0 1px 0 rgba(0,0,0,.15); + color: #fff; + text-decoration: none; +} + +.wp-core-ui .button-primary.hover, +.wp-core-ui .button-primary:hover, +.wp-core-ui .button-primary.focus, +.wp-core-ui .button-primary:focus { + background: #1e8cbe; + border-color: #0074a2; + -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6); + box-shadow: inset 0 1px 0 rgba(120,200,230,0.6); + color: #fff; +} + +.wp-core-ui .button-primary.focus, +.wp-core-ui .button-primary:focus { + border-color: #0e3950; + -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6), 1px 1px 2px rgba(0,0,0,0.4); + box-shadow: inset 0 1px 0 rgba(120,200,230,0.6), 1px 1px 2px rgba(0,0,0,0.4); +} + +.wp-core-ui .button-primary.active, +.wp-core-ui .button-primary.active:hover, +.wp-core-ui .button-primary.active:focus, +.wp-core-ui .button-primary:active { + background: #1b7aa6; + border-color: #005684; + color: rgba(255,255,255,0.95); + -webkit-box-shadow: inset 0 1px 0 rgba(0,0,0,0.1); + box-shadow: inset 0 1px 0 rgba(0,0,0,0.1); + vertical-align: top; +} + +.wp-core-ui .button-primary[disabled], +.wp-core-ui .button-primary:disabled, +.wp-core-ui .button-primary-disabled, +.wp-core-ui .button-primary.disabled { + color: #94cde7 !important; + background: #298cba !important; + border-color: #1b607f !important; + -webkit-box-shadow: none !important; + box-shadow: none !important; + text-shadow: 0 -1px 0 rgba(0,0,0,0.1) !important; + cursor: default; +} + +/* ---------------------------------------------------------------------------- + 4.0 - Button Groups +---------------------------------------------------------------------------- */ + +.wp-core-ui .button-group { + position: relative; + display: inline-block; + white-space: nowrap; + font-size: 0; + vertical-align: middle; +} + +.wp-core-ui .button-group > .button { + display: inline-block; + -webkit-border-radius: 0; + border-radius: 0; + margin-right: -1px; + z-index: 10; +} + +.wp-core-ui .button-group > .button-primary { + z-index: 100; +} + +.wp-core-ui .button-group > .button:hover { + z-index: 20; +} + +.wp-core-ui .button-group > .button:first-child { + -webkit-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; +} + +.wp-core-ui .button-group > .button:last-child { + -webkit-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} + +/* ---------------------------------------------------------------------------- + 5.0 - Responsive Button Styles +---------------------------------------------------------------------------- */ + +@media screen and ( max-width: 782px ) { + + .wp-core-ui .button, + .wp-core-ui .button.button-large, + .wp-core-ui .button.button-small, + input#publish, + input#save-post, + a.preview { + padding: 6px 14px; + line-height: normal; + font-size: 14px; + vertical-align: middle; + height: auto; + margin-bottom: 4px; + } + + #media-upload.wp-core-ui .button { + padding: 0 10px 1px; + height: 24px; + line-height: 22px; + font-size: 13px; + } + + /* Publish Metabox Options */ + .wp-core-ui .save-post-status.button { + position: relative; + margin: 0 14px 0 10px; /* 14px right margin to match all other buttons */ + } + + /* Reset responsive styles in Press This, Customizer */ + + .wp-core-ui.wp-customizer .button, + .press-this.wp-core-ui .button, + .press-this input#publish, + .press-this input#save-post, + .press-this a.preview { + padding: 0 10px 1px; + font-size: 13px; + line-height: 26px; + height: 28px; + margin: 0; + vertical-align: inherit; + } + + /* Reset responsive styles on Log in button on iframed login form */ + + .interim-login .button.button-large { + height: 30px; + line-height: 28px; + padding: 0 12px 2px; + } + +} diff --git a/wp-includes/css/buttons.min.css b/wp-includes/css/buttons.min.css new file mode 100644 index 0000000..514460a --- /dev/null +++ b/wp-includes/css/buttons.min.css @@ -0,0 +1 @@ +.wp-core-ui .button,.wp-core-ui .button-primary,.wp-core-ui .button-secondary{display:inline-block;text-decoration:none;font-size:13px;line-height:26px;height:28px;margin:0;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-core-ui button::-moz-focus-inner,.wp-core-ui input[type=button]::-moz-focus-inner,.wp-core-ui input[type=reset]::-moz-focus-inner,.wp-core-ui input[type=submit]::-moz-focus-inner{border-width:1px 0;border-style:solid none;border-color:transparent;padding:0}.wp-core-ui .button-group.button-large .button,.wp-core-ui .button.button-large{height:30px;line-height:28px;padding:0 12px 2px}.wp-core-ui .button-group.button-small .button,.wp-core-ui .button.button-small{height:24px;line-height:22px;padding:0 8px 1px;font-size:11px}.wp-core-ui .button-group.button-hero .button,.wp-core-ui .button.button-hero{font-size:14px;height:46px;line-height:44px;padding:0 36px}.wp-core-ui .button:active{outline:0}.wp-core-ui .button.hidden{display:none}.wp-core-ui input[type=reset],.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:focus,.wp-core-ui input[type=reset]:hover{background:0 0;border:0;-webkit-box-shadow:none;box-shadow:none;padding:0 2px 1px;width:auto}.wp-core-ui .button,.wp-core-ui .button-secondary{color:#555;border-color:#ccc;background:#f7f7f7;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);vertical-align:top}.wp-core-ui p .button{vertical-align:baseline}.wp-core-ui .button-secondary:focus,.wp-core-ui .button-secondary:hover,.wp-core-ui .button.focus,.wp-core-ui .button.hover,.wp-core-ui .button:focus,.wp-core-ui .button:hover{background:#fafafa;border-color:#999;color:#222}.wp-core-ui .button-secondary:focus,.wp-core-ui .button.focus,.wp-core-ui .button:focus{-webkit-box-shadow:1px 1px 1px rgba(0,0,0,.2);box-shadow:1px 1px 1px rgba(0,0,0,.2)}.wp-core-ui .button-secondary:active,.wp-core-ui .button.active,.wp-core-ui .button.active:focus,.wp-core-ui .button.active:hover,.wp-core-ui .button:active{background:#eee;border-color:#999;color:#333;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.wp-core-ui .button-disabled,.wp-core-ui .button-secondary.disabled,.wp-core-ui .button-secondary:disabled,.wp-core-ui .button-secondary[disabled],.wp-core-ui .button.disabled,.wp-core-ui .button:disabled,.wp-core-ui .button[disabled]{color:#aaa!important;border-color:#ddd!important;background:#f7f7f7!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 1px 0 #fff!important;cursor:default}.wp-core-ui .button-primary{background:#2ea2cc;border-color:#0074a2;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);color:#fff;text-decoration:none}.wp-core-ui .button-primary.focus,.wp-core-ui .button-primary.hover,.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#1e8cbe;border-color:#0074a2;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.6);box-shadow:inset 0 1px 0 rgba(120,200,230,.6);color:#fff}.wp-core-ui .button-primary.focus,.wp-core-ui .button-primary:focus{border-color:#0e3950;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.6),1px 1px 2px rgba(0,0,0,.4);box-shadow:inset 0 1px 0 rgba(120,200,230,.6),1px 1px 2px rgba(0,0,0,.4)}.wp-core-ui .button-primary.active,.wp-core-ui .button-primary.active:focus,.wp-core-ui .button-primary.active:hover,.wp-core-ui .button-primary:active{background:#1b7aa6;border-color:#005684;color:rgba(255,255,255,.95);-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(0,0,0,.1);vertical-align:top}.wp-core-ui .button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#94cde7!important;background:#298cba!important;border-color:#1b607f!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 -1px 0 rgba(0,0,0,.1)!important;cursor:default}.wp-core-ui .button-group{position:relative;display:inline-block;white-space:nowrap;font-size:0;vertical-align:middle}.wp-core-ui .button-group>.button{display:inline-block;-webkit-border-radius:0;border-radius:0;margin-right:-1px;z-index:10}.wp-core-ui .button-group>.button-primary{z-index:100}.wp-core-ui .button-group>.button:hover{z-index:20}.wp-core-ui .button-group>.button:first-child{-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.wp-core-ui .button-group>.button:last-child{-webkit-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}@media screen and (max-width:782px){.wp-core-ui .button,.wp-core-ui .button.button-large,.wp-core-ui .button.button-small,a.preview,input#publish,input#save-post{padding:6px 14px;line-height:normal;font-size:14px;vertical-align:middle;height:auto;margin-bottom:4px}#media-upload.wp-core-ui .button{padding:0 10px 1px;height:24px;line-height:22px;font-size:13px}.wp-core-ui .save-post-status.button{position:relative;margin:0 14px 0 10px}.press-this a.preview,.press-this input#publish,.press-this input#save-post,.press-this.wp-core-ui .button,.wp-core-ui.wp-customizer .button{padding:0 10px 1px;font-size:13px;line-height:26px;height:28px;margin:0;vertical-align:inherit}.interim-login .button.button-large{height:30px;line-height:28px;padding:0 12px 2px}} \ No newline at end of file diff --git a/wp-includes/css/dashicons.css b/wp-includes/css/dashicons.css new file mode 100644 index 0000000..4fe64f2 --- /dev/null +++ b/wp-includes/css/dashicons.css @@ -0,0 +1,877 @@ +@font-face { + font-family: "dashicons"; + src: url(../fonts/dashicons.eot); +} + +@font-face { + font-family: "dashicons"; + src: url(data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAFc4AA4AAAAAjggAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABRAAAABwAAAAcawcIzEdERUYAAAFgAAAAHgAAACABHAAET1MvMgAAAYAAAABAAAAAYJAJaUVjbWFwAAABwAAAAS4AAAKKV1hH9Wdhc3AAAALwAAAACAAAAAgAAAAQZ2x5ZgAAAvgAAEvGAAB3YGyqygJoZWFkAABOwAAAAC4AAAA2BbfszmhoZWEAAE7wAAAAGgAAACQPogiYaG10eAAATwwAAAEZAAADvOx/y5tsb2NhAABQKAAAAdgAAAHgTh5scG1heHAAAFIAAAAAHwAAACABQgC1bmFtZQAAUiAAAAF1AAADBki4ZWJwb3N0AABTmAAAA5gAAAlhlodeP3dlYmYAAFcwAAAABgAAAAYe1VM/AAAAAQAAAADMPaLPAAAAAM9klqgAAAAAz2TPVHjaY2BkYGDgA2IJBhBgYmAEwndAzALmMQAADoQBIQAAeNpjYGZvZpzAwMrAwirCsoGBgWEahGbaw2DEFAHkA6Wwg1DvcD8GBwWGr+zsF0B8IKkBpBiRlCgwMAIA9nYJQHja3ZA/SwNBFMTf5mIkyd67iH8gYLEgKVIZLMTrzoiYFIoQUaJFooIaRDCVpBACamFn67fwy9hoEVFQLGd3rzJyHolY2Ns48OYxMPyKISKHhjdNInYSl3ESg5wUR/HfpIBGaEpl1KxqFPpIYxx5zKCIEubhYwnLqKCOXbTQwZUWOq3zuqh9HeiySZu8KRrfVG3Vbtm6bdqW7dhrexsmw9EoIlL0zSXkMAmFQsydwwKCmLuCGprYRxtdTdrROa10acAVJmeUKZnAVuz6gLtnT23X3oQUpqLoyen1encPE96Yl/UyXtJz+JP7/MEhWzb8zi/8zI98zzu8zRu8xhUu86J74Z67Z27bPZYn8lAeyKZsyLqsydXsW/Z1uM9fSKToBy4SsSV+F+jf6wtwHn6WAAAAAQAB//8AD3jarb0HfBRl+jg+78zOzG76ZlvabnazLWVTt4WUTYDQQwstFpCy9IBRpEngFCOiUmLDhh0Re1TkLBxnO107chFPDz1sHKfeqXd8PUiyr7/neWc32SDe977/zz/JzPvOOzPvvPXpzxNO5OCHnOIPcgIncRouhUvnuEqtTSvobDqTltiSiVZHTvU+Qh+LPEJ3kOmPRB7hD0abyPXcz7TnZ0KjH3I/Ew/luZ85wiX8VHIcz4W5qPyC1At1+jlOQ4IhYjRZiMkiBIIaIkv6fGLUy2m8LMHJwodIMBAM8cFAFZRXBcV90fpd2eturil9YFpJ3eyWFTXRh6L1T5nNy8zm3FGLjSPsvikV8tgll1ziK/CmNvvyzNPg1jSzsIl/dVdeqt1l2VKWlWdLJSnRh/hXn2J3p5tzA2MzKu2+Sy5ZMlaumOwraNKuHJnL6uQI8XARqVFWc5kwJrYqo0Grl0oI0doLXH6tL0BOCZ0ta9a0RGhKBFJZvaYl2tSyhqaQU2ta+IMta6DbAvdvqONj6SiMZRqrxyRriFtD/F6RwLDiITXeviy6Prp+Gf8j6YpE9/GtfVMEK21Xbbp9GX8NK6ftkTuiD0cf5WfQdHKKpkC9EW6X3CbXcFmci6uDeo0Z6SSNuEkDCfjcroJ0QlwByFs17FqSiaQ3GQMyMUrpRLK6XRkNJERMrLRK+semTbe3fLGMSM3NDQ0NTzdMpE+Yh7Xc9huysP9b3pifX9CaH/0WkzJytwVv0N2/UV6h8xsbG56WDmLJbS3DLESc2AwVNDY20yeWfdFy+6a+WVDB+flW3hL9hqVvkHvYjU2byKJN8IqZzmt4urGB41SwPsLQpzZOx+VyRbhGiNbnKiFum2wvkGD0jV5bVYCrMuqlApdPtGlZGvBWmbQ2GNCBS1FfW/TQ1bT96oeKamuLhJNFtdHGwzfeePhG4QA5BcmNS0y5tAfGVMkLnfzBotpIpLYo2gQv8M9g8WFV34kl+I5IzlB5Kb2fXXD8wJoQYEY5nD7RZrBpvXyrcLJvv2Dtz4qQU6K+97twRNTj/H/DnZC+kk5yauiTA1e9mwRw1YtBIqcRu02WCtwuXwP0NKBR7shEzKcHXyRNORe63Jn9r18gXL226tt5tKPD0+HxeDrqBYk0ZeO9HHpQylMe1bldF7zd3r9hetUIeKhko6eDdM49RffArUy4lUNfhP0X4V6XolI/Z+Bs0HZJ5SY4YkHiygwGHCYNb5Rwo7H1A7tR6lxA/3F59MvxR24ez2/z+RbMIao19C8kh1iKqnt3W6abLRbzdItZ+HmBzxe9bPzNR8bxlstJ5oI51R76F3qC5K/+OZpvNsce5ATiIR5ZLe2B/V/CjVFm124bnFnixaktIQacyHpix9msxYGBrRe/8uOVOf4km3K/rK4t6v0O51rUF9X2Z4UxGzYXmwcy5NQ5yrpU3Zjvm4KTbq5tqd1lMJsNuyDDuzBH708si36COQYeuS7ufnm03AozyhGYRpeEW88kw3CqYCiJO2gM4O5S6Q/wHb+d9MqoCU06329/pCcD9MPAW35i+hEKmyaM0kn3H4hefcCnGzVh1MuTD/xI/xZ4K0BK4YF/ssKmV2C96WG9HYT1lsVVwLcLylTlxBUSvFWwTtJEwQmpmaSp7AVlfDkMToh4VcYLpwY82VpBkKSShkWhxVvL0ohKm1Xi30QyLvvjxnT/g3u+WLjo8yducLsv++BylddVP25cvU4XXL5gQumaR2bL2WOGTxlG/3pgy5EVZ8R0tyXLZCtIST7T/t5mBYaHZTW0x82VQ+/tkgz9lmSDze9yy+6gy23XegNBd9AUCPptBqMpaJKNJi9XFfC5CiS9rP4kJ3jHkTtaF9Oexa139NwRzPrkY9MwKJnRRjysZJjp4/6q093dp7sF6/KZcAce+SQrCHdaF5OihbOhJJAbK5m9kA7vxmdZuyJygTwVYCzMCmfMBCyicguiYHMryzuzKuBnbZAaXho1am47fXPri/TDXbQnLOSOqVw1l/DlKydNWjlJLnuJUvrz3HZ/I302n26LCOR60rBq7qjo8UnVQXgCv0UK5TZYx1rc0aRKZZLLYH1KsldDvIFMh67A4Q5aYI0GgnYNsacJwsk7iHb+o6EXlt31Y8FJej+9/3DWK6T08TvpDwOlZA6Zczhzw4HvpT2b2l9tmfvaLbSddO0jmXf3dsYKSBdt3/TpvbM5hJUR6K+yl7JhNxf9cjdxVpVJUlkd7oCK9dtYRQBS+eGX7ZetbL+sg/0SJC3Et2EDfYc+Qd/ZsIF/cM2eNWv2wPr19G4lHsGKoA0f7s+CszDu7h077objOD60JrovHA5De1K5COztNlgX6QC9TTAH+bBCSmCNBLlargF2+4Rz7Heb1qaDJnljRxyyB6GdTrg35BruqxKu5Tbog4P14VhRba+DgVziUf76VhSbYYdHcMD4VkSY/dGEkoNDnyBdCDZiIET1MRR4IuyHppjZU+Ew4HRPPA83YlnoN+KDsLSH0QiWoVSCLUYluIOwMWCXwFYAiuFkjGKgPZAR9vT2huN/SD/0H4/TD4K1ZU3/Ewm3EZdwMOeH4VsyjHI+4hKdXQe0hIPNbsAnOI0ml71AJbsc9gI5EBRORo1lkYqbhZPCyf7hLbUAxcJ8aXuWr+ggfXn2bPrywUJ/VrtwkhT3HVCtrsWxCLOuRf/wl1uelZ/fvft5+dlbFJwnj5TXADWoRQoGiDREfDag3xCdydLt281m2tK3X1Wy3zIt+lc+e0f05Bi5dTvQWHRq/zDx2H4z6b+Rz9oR/WsPB3Ql/EA/DsNKsXOtsHOXce1QlMGXEYdVlUb4jEwLgZUbIrCGjZkZPC5jF5QGGM3okiV7gTvg8MLGc0kGPVCQRpMRkAbQPCGCgJc94QJAKRnziU5DQio33Oc1xMX7fUSHr8uHFz7/E32fvkDf/+n5hZAnlWQ0qfzp+b7XyUoy8ccdO36kz9Ab6TOYI/X0/aX6NJ3hyuk23Uoy/707iKnNN9tkzBGFqgarlf5ocKnV+nS9fvN0+1K7Qw/Z6e3kOSIKaqNGTprzYe8xsumt/xGKv169cfFiYZTyqYVnNUGcNeSjE1lD+ooEv5r3lpMksveVlQvkCePNwwuL1OKsLXXHW1r4fxC1SuCDPpIs8QLxB4maHo7m8c/L2S0tVwx75I9/ptuEG/tOLiDXfPsMfTu6s9jCibE12wYrSuaS2Y7lcC8SgNhDDo+4rnerqrn/ONA17OBbo/vkttOnxXWwJ3oGD4CJM0iXLMppQFuUQG0+dxngxcygO01lQkgYDDh/WSTMHFv1+Ljs9+57YP6zd6+oysj58pFb580XnjxXKX9084UNroydZPjUr8q37H/3zBV/7G9t3XWuQlxe4gAtqQLKK4XLwD7qgN62EQAk7IAOaogNkFl0X98U4lF1901RdUf3RfcJVoQYclvflOg+8Rh0sB0BAKbkFNbNJ9CpLsSBBZJ5kCvwMhAwAAe0JFauam6Zei3tQU6hhW9tWYMHQoKeMKTiuh3jn6M9xLOmhZzCctoORwoAg4Ey2DIMx+F3NQBvtTDS2ZyZs2K/8GtO+IgoeHU2u+Al8QO2qYYHgrWo9vTpWvJ8JAxgOhwJAz0UPyGQP6XMa23RmZd4KVRUG8bPDh5A157szxI6aTttZ/SP0v8wwiDiDAA5Bl21ujIYJS5q07DLyoUvwL+omlRY+y797N13bxg3sb8jM9J5A8tWS7sjUkNJpO8fcE0K3rXzqyL9nVc8xvJCbaE/gR9IZxzB8HhP9ZI9Dlyhf1wcu/lCsnfgXpVFlQ/7vsrCmz6X0nzjxvnO/BPO4r97t/IHFQR3PxGTDOaympYKBbcVTazx2bMlSZVR3bikffFIb7LcFnvNh1WceQm3g9DLEB/tUee0TGmbPWdkMcOLRfxBz5gZM8YYjSlFiycPhxJDfK1EGF7UMWrxrPZ7Ac9x1kCGyypliMeIyxMKec68g2fiAmq5i95Imr/5hu7/RmoMefoWlDY1laru8oQivd99o9zAb0jwjV0DfJMd9p8XcC4HsNPC69N4gJ1lvC/EZ8ZoMNVZaRzLSrFUyCV3kJo3r/D5rniTvk4X0deVvNzR2trRyuckJlGJJb9nuEVuG7nq4Re+eOHhVSPjmai9lT2Q8BfdzJL2WnwHeOwucorhz2SFm4r/SnsQRyIuBCikj+cY76vwYMo7JnzL7kcWDJgwf9BgN9j9dr8X6AlpD2yu/g5VM6BsQNphUQ94PdzrEDoj7DoSYWPHAd1yGOioQVgIdWrj0BAybj8jmxhElA+frlDgH3AZtEdW4wY5fVraA+viJBIMDIcy2qGd1S9C/VlQf1cirE2s3XlWzbjTACQ18Qeh2q6zqlUq/V/rdJ9Vp6yG1kabZPWvVgnrNLFOpTY4YQ3isf4sfA3Gv0vZ/0gSiuvEdfiWhscrAJTr6Aq6iiP8Qbh3TNWt3BOPYSmCVb41dk8ff0/UYymQZzeR7ezeQfEYsMzsHpBoUIrPR/f9x3uyQgfLNTAG+Yze9DKKk+EzrS3GLSqpwWZAMqme4LIXE/JsHrR2OCsH7ETPmZeIBxYq6YJTf4dC8PEHlZTgaHRF+Fb8kxp7twI6DLW2hsLs3It84tBT7yqhs78jjIKy+IHjCL1fIDnFR9gqNBE7CZrEe7ZE/7qFHtnyrfjInKiJ3LAR+fY/cX+STkunFSwG/MYgTeT3ZToAxwgn7yUFRzo6jtDP6Ev0syMdPWQpuTP6gnR6sKjjCCm490Oy9Ehfm6Cmv+GYPCDCeLl0xjOdTWvxQFrKGmLSEEawFB79zW+O0j8BufInzAm/x7UPWwxwGiKJiMLdJz5CCtlr/V68FRn6+BA8qsF+aYhIBPgWcRKdSHROUUecwknaE91H7roEF0o72R3dR3u+IR/QV2ZRD/XMoq+QD+S26L4JtCq6FGvlbyXvTSDraEkN3R2NfvMNkEThGi4BZ+G32JeAKmT1Ew/fSsPtiPcvoQv41l9Wh+3Ecrb+cO/ZSBEhQBVlIUSCFqbASoY5ZeOJvHEbl6bwhcYMRmniQgwRXYz/NOhNKCwwIndIjOJrWw4d2mJzLgMc+4Jm/9Wzr7rqhaty6SH71ZmCbH3KQppgB/+enjqkXtb3pXjshjujf+68cHZn5+xAJTz0WqZqAzyCQJDsI/ukQqmIwVFFxBjUoHxP92f6CL35PdJGH/mEzCJt79Kb+TXvkRX0YXb5Hr2ZzPyEPsz9r+uBs4ZIRhmxppEM47kWBBlJMk5s2XKC/gDncy6EvuVbTgw8A/wM6YrJ0kywd0uh3d6h2JHJfqxGg6BlA6cl7hCJjaHRJMOmG+BKi8KIDyOAl4nH4S6HPVvudqiaYxK9IpTvEc/eb77Zi4uQ0Vc90aaPMsd5cMN6xmV+NJRmRLrKyTVxE4e2qZ4k0ngIYQZoj5DkhWkGaiMfs0h1AFpirxmkxtdK6utLek+V1LOMmFJS3/udqrlvPznFUCGx8mqzNTBsYlF/R3WLy0gIEVIzbe7agvIJRXki/1K4vqT/CqlRqaO+5DWljvqSvumqZhpheJX2JDmWXLRq2jCk0aFT+fmq9CJXmc2EhEi0AlbrFSX1wLBqEmgqE6MW3AxmIo/OBYEn9yfw6JkxigB5b/6/yDM6E4lIOEcYSSCu69v/43/MhWuLBt+SGhlVUIto6T/lEudqsB+c82wJSLxtMDV8Ql6hdPGj+OkzfedoVmJXJFH5LqKr/uODeY5TeHJsx2Hg/w1c1lAaBpEorANYKCb8KJDPPf3HUd4AQOcg0OEogwYkTLoEK2YxZURfO7sXbQJqB+9ynCIbV3jmJPhSFpeHfAcsRH8BZ7Br4h8VWYKiE/7gqztvO0l/eJpI0nSaAki/U7ACJAVATFOAlj8pHrv29iP0b5/Sx/kve7fSFOEk0EXRJmBHAKv+yvc08EnObqgykljvdCwRkFyrfZU0Eulp+sPJ23b2FmFtWCtDCmH8Gn2cTPuUmI7cTuT+DgSdqm44wzj0d8THUsXG8jDMaTLTlQABTQwKGsez06ZBAZZoI/Jh2gO19yB/2neCP0jv5w8iEqb3w5jNUTVHkFmNIL8aIV3RNeFeRrbE+oRzhTSTUn8M5wPtCN2wawWNABMF77EaqvBNmJWTtB0pPOWDiBfwY8AY56AkD+V2DJ0DjolwR+QkaL+J6WNkJ0B8twt/7VqYoyoUU0gvTp5MvwkGffPnbezcjl1/54UDW68TPnuBLnlhdef2HZs3zp/nD8K3XiGv0KOTJ163Van7dahbHas7EIRfL9ZZIEv4C0hFdGUQAzx94IV3kDLa3tkxf74vGKTfTBY+gw9MnEyKaYiGiCfonzd/4+Yd2ztXv0BuYzwKDH9EXAdwOIOtYL0ka1GYoi1DabvVqGLCJVeBuO7hq8JVVVc9jLA2uo9tBHHddUcLond4wnl5QlnB0esAxmazDcL2hrJH1QMSShtuQgW6M3E+wlGgzogtvjsdsZRvFTrjwD2CGeIpqgU2oL2/o53BO+GYwoYcxFbAcmMJrt/2BFYjxhtFzpJL2s/NRzJJJKrkYulQENC7FUWLghVFBZAMFaHi9urvEKxhhXFuV9IY3YFUkXiMcX8WVG2wb/oCQTwBjxxiGEYvvnv1gXdv6M+64d3uzdKNSyrLqn5/6d5vhK/TXr8G+eWrX9Pm5C25Ubdg3Td7K5SxJdcATfJHgOgmlLhwVs4kwckdEH245NLgU0hjcFZHsIyg+As4dL8vmEZkI/8K30y+uvxymhfdT/Muv1z4H1+h1lrZ1OwPTKA2cpLcuXTUD7tX/J0+/fcVu38YtVT8Iz1y+jQ9QspOn1Z7mlJ4XjXO629ujt76z4MbHi1afc9Df//7Q/esLnp0w0EFjw7SETrGjTb+Uvbrhk0nsum3a70GPAZng2P8sNEqmCyKLgiHa+iIh3EL9gVVOfmeMPx48vtO5Hs8QivyyrA8904MNgEx0BTEHctku7E34cmNQIHSno3weD6+HuVjLDZ/cFVWuB6Jg/pwFtsXRE+IdFA6xHm4atzRmbIiaoz/yjCYkrLBY7+Sw+3KCAYcKiGQ4XZZZSnDZLSqDl3vWipkqwvKQ6p6W6XdYTKqhBEVlVU+n7fS5uFLrVlZ+jvobZvvvXcZySW59kWLFtPPFi1evIgUSGXX0/X3CEYp11qiKrVVItVYWjFCEIwGl73SVic0lFkt+mm+K+8jb967bMKEaM5iYlsMP/QvixcjzEMALO1J4G8HMJQQTzuRe4vuiyiJqhnBBx6KuI+xWbCPgNeBdbxuKJ+scE5eLSICoNbsA5LDU8LJ3u8iAIORFe5RaoFNDSA5HK8UD9KFWwUQujSgV00HuJzP8HmJAjEU9s0LJHSVUbSVwZgQW3zrJnJtqm4EEr3fIbDQ7ty/k15JPBkz5s+gc5EQ7O9AEhCwKf4BnVEUBupx5qWXziwZNow+HCMihzJo6oF1jH3OiMnbbEAZckhFQLOQR1aUziY/bGInQ1SDh6xGkRGKFfs7iAcVVcdR7oc4JX7gTeg3PKdHcqCnAxVfkciaFhQ3AsWDwkcuTpuzeZQUvIVMIDL7+kEC3SGc3EmEFy+GeTt48Ys0Sr+g0RcvvvhFIggnlZKdMOZNO+OlAI7gaY7ZEgz2M1npXXxcZTVrB/5hM5FsxVlktA/w7h7xmNQIuDQPRwWaUxVUcJ4fKXW3yyZoAcQh8LHL3iqDXpZKgOslr7+/dp3Xt2rGotWraHT91hU+75wlu+79k7dq+T5gp78LL3h604TmXE36rssemzQ5GiU2q238lNF/vu+CEoR0hLwDa1oF30Vex068si3oJfagTXz9Q3qyJxSdHTpKsj4M8Q+I6/o7YBF24vrqYvugkfVQxzgOO+pTXSgZ0KNGif+1fJihkzCC+IPnzIp6RaQFpNPZGSafg2/nsLlDua0PYMlibjmTW8kmQOQyUDYGm+C3+4MMr/tRUG5XELsJ8TwbQLxMJwb2KAws3FfuGZjCPP4MsJsut8HoHZgGeMaEfWgddWVhWUomT/KwwRse81anGTRJGWl1drNRm23ILc0yGLJMKamSnJJcvoDsxKeudDobJgULc3V6Q42nIj/fm2XSG4pzLdm5VU1TiktysisLs01XKgNAuhZ7nUmZxfRfkXD08dGqCp8ux2TKs8EhCSkppoAuOSk5JSs9PUObWhmueTVMPy7LzimsyxTlsvysESkpZmt6ulpOHW+02WoLs7IkXpOX1xQGGOwgXdInMG96RkEMKhF4/peKhYEy4dn6kptDhievu37ZizeP1RpfveGK6dME52DhTVD4Chbyey+Z6LelXU4yR73q3f02jW7d/9GE8VdeMjFgPbuQ+xV4epbWBHc7ExR3Kql4TJGyxY//pg5YuMdVzYruBdP/L3VIe4Ak6UQ8GUvPrkP8RR06BaKTmMTTFpMnIvGLZC9qAODoQZ0BTjlyL4qmFCE5I7Lj8rgMzsK5uBpuFPDQrdwclIYAxgy6lHXNSJOgX1IWLFAlAeIV7II36NVph6xdzNhl/8DyFu2wQ6AiMV5SQpiYSqpw2HNc9kkXzBwxvKBgW2frWGuxy3FeaXlFZf8TS44vO7645usjHy+srrbkDa/Ky6sObJwyo8mcb86rp9OeCJg06WoN2bKgscBqzQ8toWlo2RVGVk06mKzWTnU7nWOaLrrl7pzpSRr1sED70rq6KFOZ7CVPR/eVeVrq7PYUlcbu9E5yOE7v1WWWlOn1i3YPL/XlZG8zmcq8WVnRF4DFsoaRA0P6KGYHI7JRNzDaUNY5ZW0R0bpFHbMqMjkFUxEJCmJQy7du/JxeuxEQXNdGeu3n/W/wrX37N5K1n2+k7arujZ+TtRulPXhnI84CXvefYeJd9lrsQQ4wWJwWTsThuQPYNi47bYitAkYLo2x96HHueza/wNaLco1SZ2kPylAj5FTCX9dZxcD4poRxieMFauIAO6YoHHBk4AcYVljAiNUAM7cOlPYoKdJpp5B/ARrbyOUgRkDqgPEYWr1FqAoJfi3bUpFtS5fdEskevuCeyH0LRuTA7jwW/cPOO3dv4+ujz9av3TC7ZtgFl6+tj6KAQTUwRwP7SwedTPxl+HDIsScSbxK2iZwS/8bwTRJKkRBP6Wxum04sOUQXwAY8uJzcX0JfvgU4YRQFee4gJwbtOmCORMAVdrT50TBtZVx7o1jEmaAomGATRwR7Mur7cgn8qY4SCXhr9auMERM6a4vuCPRNCd4Zp51x5MLhwy9FUDESRh1GOIzbmzF0fQa0imr4+z9CMcsoYRwTRKQAm52CqaIDTWxnOuD+0oR2xkR0zl9I89BKSGC6Gq92aCP5q+8cpNLvDAJN1H8clsBg22qK8U5xMTaquKamWGnk36NXMVXGqbhdntQNa8DNbBTMRC8TqaCcd9UTX5AgGkVTyHKCMIgwW9Mq8ZaV9fXRpXVP1F0MGf7Wulkz6ynPbzabj5pLis3RTZiZIYkX183qmVUXXVpfv5Jl6/ld9fV9EXhwuuWoGZ6zTIcHcVy0jM5oZLqpX99fI2P2MAzEahmoje8mlBbLsbx4Vvqf7kmNSGYjbEaqrD8rLJwMh9E6B1IgugfO5yqT1eFwryMcRq1+mBm7nGKZyMDpXGVoH8vwx0qGmRWAnMYm2YagGxggG3BAWj3Aa+wocKEM1AsnDy0Mj7KtmAJ7feeNI8Y/uBcI1c8ffHBc6GZ6I986faVlZHiBuL+t7d2Xrgkt8EYiC6++/QBJvvPOu3bT08/etnlZJBIMh67+3XvL25BGDyfgMJQaIQywcAUKPhRRC2b3o7mtMwE12mMprOl2RI/hCNLiEeFkfwcCGaasAVRnpT1SYzis6PPup/fHwY6ygRjfomZaj7Zf+z7awBEvft+e+H3vgIEF4BkEd8wOKYI6dmQ+ENxBMW4BRNph9q1faQDS4QN4PB3WWD2zpHHYC1QSMAVGlbfKQew47sE4Pi2Q3QlEJWBjISaKYCUF0p6D9NChAS5h5yEygo7enWUcUa/X5+V5W9sbr7px3dgx5tzpwYz0m3J93vK83NzcuUIx6SAjXxxkPF4kK0qqi91VJXk5DqdBN+yK8TU180aUltYXmox2+nZOeVVVTk5FeXZuTGbA75f+JJq4Jm4Sdx43G2hkWFPQZoNC1Npj6N5vN9nddtketPuBXDB5Y7RBOvEqQrEqk+xyK2QGLDpg0onsdePSc0tOgzc+BFCNQXTbDQqxIZUVFtgKR7deNbpWMyczOGzBR9tnL679qmbJ7NlXzV524dNPrQoFc9VXqk2OUOOs2c1IaTimVdg1xEk/1thL+05kLjbwyaoUPo08vdadnWexjKQXPc7/TnhpSZ01X5BlOXV6zuSR7dbyKWWlvb0PPdQbPnOmt8gx0WfXhCrG2J2uqakpybWekeGJxdVkXKBeLEgpSqqtfUBI15UX6zLpaUIIv8+UVVWGY6XwpYqeIg+gSwEX4IZxdQxvoxW4JLsbeMUIXHArNuC8F1VrThI0yTHbb1O6YvodFDWAmnQaIjIj8NKGDx+O24A37xmeX4Y24L2tKDuOMON0ZgV0vHH8dYoJ+PXfjroNDcAbhDMoLkDCEoXkglX6B7MIL8sfviduEN788NEGz+2bEE4p9kSMfoy+Merb6xVj8OvGN97OHp2s1AEboAs+Gusz6WL4OBXoJdTOlEGvQ9xohKIBrY93Oayw4A0ZcZm/6iyJoiZmKzxQEE8HVDjrVMe7B5VW/L8ZYqKPKkj0AuVqApmKth9j2JXqW6VQUUuQrj+T7AfiSrEH6F+FD1n5dkVhwP5oBnkjug9FTDM+Siw+EReZxm0bGDzRIiduB1orBJx6IKhNI2U8kk2eaT0fH6crp333l5/fiYjHeh0oWMkjZjOf23/cri7IVyswoYvxuzGenjATCeVQ7Lrih9QYYRKxSOz7fKu0h+noRcTpWlgaWBZBelf4mtzEJg5V/fBsFyEM1yGtj/pCHhVzFhEAfiAYEoMoA+BVVmMGGgeproeB/e6+bZeo3PpCszPjarP56gynuVDvVl2y7b7oiyTvrbfoV2/J6vvodw/sODNfsGU6zcWGJ+bNe8JQbHZm2oT5Z3Y8QPQX4VNvkbwBuYV0lEsB7hCtL3UJ+sG48oo4taJT1DpFnahfXTfuxsM3jqsLMt6djCBjaVZ0NzMtefRx/gm+xbZ69JIbb1wyerWNXMo4eLru6v6Ot99GGcL2qGuQv0H8jrAe5UElsBKRm2daBCZBhhbYfC4sIpDa0cLArnUMUEbEX1Amwr2uCBA6kb4paN5Fulb3/xgWrJBOQxvQsHDL3tWoz+xa+PC6lSvXPbwwpm3uoT2oOFF1r2mZthp2CJJknmmr10RnYjaMb8OdaF/E5m9s9NtoSlwGDmsqmWnL0GbMxSwk7AY7EmN+ZicWl4UAhaZFfQWak2APTgHlHOndGomI+r4pwlFm/RTu2x/G1vRn8QchK+3p2x+JKIoXwJ2kixlYRaugP4jLgC5JYVlFbo37uJHZ5Flh1cTEwoyOheVG5LMExYK1toimFNXWu8mpIv4mxtfUFvUfZ64d1qJa8RkU/RfXIAaHgUGzDLwV3QdnZmNATsltwBvEuNuhlQOrRXAk0W9H8dlRxJMHFes8tldJMw3BuIdQBhfD9enMk+esupzQ9rY1Lb3f4ZuivmVN3360PVYsfvuz4HwAQZ6iJ4pIR2ENOZmVgAKXgk7JHvNmcbqYvQpyMW7RqJfFgPgIEwxq6PjzOiHXsfkCckCDAkXI0fEaDTlwnmBl1wX2Ewsgs+CEvYC9ApkmKFJkiG9wb7K1m898CVDPYyPKtwC5mvDTJEYKBA1GQUuMivQ96MaWEFntLerNJXsNsDPErtIRQGIvqm0NZeeJRdvpb7GUPFBYkZVLX5LuvXCCtvdz/j6nGxXsWn1DlYa/0jM+1JqkSdb2jlCdH31GuSWPNSdRQdHNKbwpwhKE7ZwzcTcj1Q54LTBYEAf0ZwN8WU1KA7D+Grx0ga8xFDYdTVu9d7W/lB6VTAzM9l2vsBydijJZ9U7uBQGcotp5WdGVrqbq2wuc01avnhY4Pzf6vXiMAejob1jyo2KzhmtYA+vgDaY3xwk1ppEELYBCVcVoKyBDtLZAcOA3rjuIox3RhU5wA7/BhEf9gSC8izqG+G/8C9JMu2nJeruhwJHvLCwuPv/CkqJCp81WYMzSkpRk6iVJGqG40lvXMHzM6FtvHT1meEOdt5IeYH5N0WJ49/IC5V1HxayLKhz4bn52Tjq8S96lP/Fy7OXGibfeOrGRvSxu860fbfLlOwoM2Rk6Wa/TZGZkG20FNkchz1uKiSdDFar0FpbkWlKt1lRLbkmhtzJ6gDldPeK7fHRW7M2MJJ0uKQPfzHcU2fFN2sOnxV7NzbBaM3LZq2yvKfg+BfUMABjSVHIm4EMCjC+qLVSyDbjDlJlX33HFtSEjmU+a0NQv0usQnqT/eIgeUXUDQCjh01wNbeNJKqkwkCqAUfdGD6uaK27DPbiMaOVF0iF0TASKCVZ6EpFUdqvT6LUyhRmQhmWkHuYGtaBBo8oU2xmBoCQH5EUT2sjM7lP0kVfpYRqtKOR+jqx90eG2lFf+5qEpMye0Vl1Hrv086aPb7m3btLxk7XIps31SuvUm+jH95+GOB8W7+B0Xy6k5b3WqSgTvfXPC0x9+O7nUfetHl+U0dI5OZnpDcl1MH5KPUmoEMrI+01TFIA2DO35tLAc4dv8TG8i3n/NJAq+Z2dExM3rcwodY5hVZvWFW/2WS8AH9WSIdT2xwk/INT3S8N0uxXVDw5/fAt+QiRnDafEmE8xC7tiqF5BDR5uM5B1yoTMZMcQB7GcUe4lv1PvTlPjrv4yPkOhL6/qroceLbR7+m64/uIhnLl10S/Vvrxo3dGzsiR8lt5Dxif+cSeuTKb+kbdMP7fyRXEtOD9Ej7kiX0nzdePmvmhg0zZ10e058ruNWRaCmr9QKtz1y/XMzSGqj2Ad8Km7jT6fU66ZLD+d9Xjb5ixLodD3/wQZR3+gAMeJ297Q4f3/bjHbW1f9I8dNvTP0Zv9jnELqdXsb3jIuKt8C099lvr1dnYN7Sxb2i9wiTi/B8nPVHbcutFHQ+98dNPEf4Tkndg1Cju5+Q/PHOEfoXjB7hFkRFpmGeEIi+FHc8N6LFpj3isvyNCUwQ1c2pChq4/C1FlhwKxT3MS0cBcvy49CxgxD3jpam4s14qr0iJ4q0I80wZIomQhVSHiRv0X5r3xC0EXYA+YdMzjiEAGEYlbcOFqlZxVRllAi2y3LgCgIyDYZdFRMb6oqrXClJpxycimdtqSWnDepecVpKbNvXSusAQuqocpVxeN2+gMHbjm/VeGbdJubJ6wMfrk8uHt/pHDl6Yvr9jTXeRKFiq7H6xcnr50+Ej/xSNXpKa7pMzCC2ZPKB+7bF3F2AsuuD+4ddGircH6SZPqB3J9zeSJTU/P/+Q52uJvahIqbuqhV+cPKyMrdj8nJWuf201vKhuWT9Z/dGNmusTWxETugLxWWs5szU0EPcw0KNYhzG/R6TBZNCbpm+30wR3TA/OoN/pP8zTLOrNZNe6vtJvs/im7yu3N8+mCyTWC2LqDPrqj5cpF0RW02Gxej67Bx28QNl6UlGsqMVbrRqZOEADu3EaqpZulx7hiroZp7NMEAMshVRCJcJOF8AiPVWU4KyFZx+B1HOabjMIsPZ/lyEs2u0zN4y9onpLtvmDB7HxbRulFT16ymkZ/+rTbazZkeMbMWrzysoufsMy9oGWuQFJy5l84fY7MS3fLlqKKoL/apM2qmjhmZJoxI2PSyLHHaLT/5JjxjVmzH1s1YtcNu675TbilODW6uCklZezMhQX5w63maXMmZig6QrKT0VYoieBITLaks6GhiI10KUwVMHJoTIkGj0DY9U1+E+VFNAWpSEV+T0pYHakAd21cOXCWI5kd3BAuiyg0AyxxcSBHAo4GkkZ4xaF1sNx5jtzZzNZBhRWiKUpKXnOS0V1dltm/czZ0N4SoUSnmW4empORTknU/KWIs10f305NCO5MS1tTcHUvpUeeTo0Y1vkzvdDY0hJ6aHysuPitV5JmK7WYm89NF3bOXmZSjS2UV0kYWYkDJjQ/lrkiYlBAggAgACyiT9oTPvBTecmLr0osuWrr1xJa+KZFFfEe3cLK7g19Ee8JA6Pfth00Pt4qL4bFIZM/Wbnow0tG9dU+E7D2/MxLp5EQS4KZId8haZn/phDZUMn/xfGDbG2DllxPZLZMCBQ/hOLoL4oSiKLt1QS8xBQW3nRwKBN7ccOLEhjcDgUjHia83kgUPffPt3ge/+eahjiefPP1UNxGuOBzd1tv39sYP+7b1iu+c+LoDHn2z4+sTHW8GA5Fo0jcPwcMP7v02/ORGRkOuPF4eff4Yb/jcG/3dMQ7WVqK+OAmutQBF45JOF0AwD/qG6mI25GKQJU430Mcmt8yMxoqgRFTuCUG3aNKmE1tEEb0BQ2HZRXvQCQcy5NSuXb27iCcSbZIamWwsi6aoNqHb5q5dZA67p5jL49G7S5FRQ9pDPLt2Ve1CBgXvMAHmrl20fRf8EE/vLkVuFvODitufGs7yzsDJt1qIaLAx3Ef8CRSpQTw2QNi3KHat0SbG+ZCswAhIRgRgfyWyFjj7bO6hoO/xj7MW1CGdWbcg62PGSwMOGM58+3DvMj7Sq4UxAkZMK64fulFhKBRBTGsE9zHuZy6xDkmpQ3k3pspHaSYqJVD8ElE99Sa+pICBSBwwKDiY6T0amXc7MxAxQUPQpf3MS/xBmIawqO/PEvUR5OYGbbzQDrOWm8RkjwqQQNmj1REgDneAc6bxRpNUpkIYCb8WlcyLgTLRHRKIRZUmpJMyFYDQtp1x77edO+Peb/0j6ZZHxpPrCWcryyz22Zsq/a4KfWtZ1dOhsfOumVScQiTazudW1o+orUxO0rpGCJvzyy0ZskpMV6tlQ6i2ujTJLVSyunYOqb/XfegHUp0c3LH7dq9odBVbRO2oqa3V+lRtuW/cqCp69LGZW6Y3FNkKTcXesXXkrYoFMy8cPdU7Ijcry3teXXVjwbVD/Xtscapl0C89Zras5O0FZQSWk4bnC/m/MmuTAQlQyYbD69cfFt5mbmdqKFCc2RPc04v46esP/3R4fd8UlIix767k3pZFWQQ4UcXwVCbSrw4UdQYZogoJZYD3ZRMRTCHiUDHGzm/PJcQZdIkzbnjvQuPNp+lxeuiG616v2lNwz6qLfzr2u0szx971GaTDDlKt++nxZ4iNDKfHzCoybx4ppyE+Veoef5r+hf6efvbubOP4MV9tX7zutbph2jF3w1uHLoX04nn0HX70BVC9qX+fuViVIpDPaT59uYeXAcZqYG29DPQS+mrUceNxvJBwyQTk6rWh2BYuZdEWUtUCW2wisBGrAkFdgBG57GY6j08AiiHKQ2hn3UUPWUpUu593qIfZeNVoWVdLn80rlcnrsDAknT439UNDVXr0vsqJkrMwqN4nFubS37lz6VaTJylpDB2TXai6J1Wr+pCO5zU52Y70r/UFhnRBPFbu7M/mjz/lKDhsGlVg2apKK8gxVmX3bZ7gcQvNdtdN6S5zetqOXFN0fsOFwnJ222A2J3OJPvIq4F5wF2lI3AFe1YwgLNqkeoXJURB0IYiKSUyYb0/M7jYTqMAZ3IVoswp7ioM9xfEGPTrGeqscnPOcjrCq/+QGK4YEH3ODlTOJi9P6gjAd7P1M+fA99BTdQZfR7fTU3cwX9oG3yaUkpe9j+ujqrAxj1g0XOg3ryfV/fYwEL69ZrlFnJdlVwdF2O/0gqwiu4ImuOe7L3O4sY0bWhZuEtJRko6xZ+o+3/t33yhf0+7FkCvkH4a++bn1b3sOCmezCuu9h33z7Aeb8ejdJcQo3qYVqP0kmL/zp8nbNjJZMd055Ro00d9eI3gsvFEYRtUrFh2pJiiQIpC5E1PTRMqvlgskbm14++T/0osv4W6LNK8gBIr32QP9icm90dKltGvm7YoMZ95uecS4fA9TH/FdlaITmH+LlyWxvMCermS8CZfQHOov+6hU6c7Jr0sWuUfYH5E8xPVpcW1tMiosxEMmvXwEWUXJKKeAXZc2EmVzKxOUA3TqZm6V4pcqCTfCiDCHRa8GuE882fvVDt5C2AbgBnAJGIIFtB9yEK8Q3AL3hDpGg7HJ7YWG5VM23ls3KOZ9+/v3D40kueqgquI02vBUmr2IuhvEEN331MvrqFZoR/sZrrKKYTELPtUw72EBUkiTwtm3DvcM1/9Oc/UHOeJUg6t35JC3aFEGvV6UOYN6dLyciT5rS9vHHbSO2Vec4cnLGGodXVQ1Pc7tsycnOnOptw18evaFjlMAjPrqB65Ib5Ma4PYuGGCWZiDouGDCiLxPvJmKETCoizn5XtGWn8HCFfTP9ODrlWv4Rms53d0Yny3r6lGedq9+xk+8WHqt0quim6MRr+ef7t/PPwG38xlPcSjlfjACWNaPuk2PyM+Qc04miYUi85Kyczs1Mc+VMfune1Xljw56ZBkMe/+5gnl7Nl5HXz+9spldRD72qufN8MbJ6mq9CnySKFT4kEwbyfbmkiajLPqM/kIzPyuhppGPQ1uCYeGxA1p9oSXQMrf2VA7D2oPWPwm8rNK9OoXbjywRyEso0pcZI73cobkShLsNIzWi90d2h6u7o7t2KKotBnyctjAXTMgytRRdHgkbgTVlgHKwQU6jwx5g/nSeSUCda8KPjXN9+OCfoRGD/mjkv4jqVV59E0nggG2TeDxxyUAfYwA80hNZmEfKJcDKl9KY7TrRP7Ljllg63S5M/98JNK1ZOqmz/8oGrbAXkFIPV+lG/vfWWPJqS17H1iuJiWa3OHeUvOU4vpX8/cf1cnU6VHprQeeuf/0VGPIUeNP2nVJmTFr3QrkovLW3IizYpVcV0r6ekPecee7SbGtC0nDX2CX06V4/+Yx/+t9ay+s+QM+JH4kfYJg0/4BAmfkTvJvO307vpPTvIPHYi88XxcH339vj1vB30HjJP4QUVWb0A1HElQE/Uy86LxQqICSkbgBX0MxY4ZrIIv/mJEs0qRue72U3zgPk0Kl4xuheqbRUnCbsY09cznb0aTWr6ntelpSWlqkRRInJySoHda87NSdcmJfGE53kVoK/k1JR0na5C+ImmRE9cV+/355n1OeYid8GIoK9qWEVVIC/Dwaeq860+f42wJW7Agt6bqm5am5yakZmTnGrI4iVSWloC2DslU5+VlZvp1CSnWYRMHRCDao0LVQ7TWq02ny+4UVRLSbIsS5KoSZKFJBW/Mejz22zvM5uICAuFApTzIH+E4+aPjdtCbimTNf0fxi5uw/B/GT8yZAz7zf/tGJYpw0OfGDKO1d6zx5E/FI8MgMbLwOkCN/LRfzeURGKD9Nv/PJjL2UNo+aMM6OD+L+Kmw+pzu+ISci9zqUGN98AvMxaI/RJmBBQXoMfvYJgkZehMstYU1LqDUAv/iQB0hdFosVX56hc3jTIaUwWSJKemGjLN2cXu8rKi4uzsLGNKmqwRbqkyy3WWlcEZK9sXLrzk/DZPe0lDbtnwGeVPT35o5KL5TQ9+MHWuuE4X9FdXVDncBlNt3fQZs3VJLpujACY6x6jTGcx5LofTnWeL3jfjyjMqDa8Fiio9JSVFrVPnJOmSz2yZuspvznnoatrT1kY8Vz/kq2fjcAD41VyAtTaEg5xVlWnQI9BII9DPmIeiz+UuU/l9mTpYAUie4AEQGcgWYTKpIsKtxbV1BkO2XSFI7Nnq3NF+z652vtVakh0sj5T5skusctutlN7u61wVNltsy4qUiFlFy2zJ7lXLrvHdTvje8KxZ/rqygL+8LoFn3MOpmccWcxomshqZlbDCfLermplpwEFgIRUfcmY7vo7ZQCrwSVzHbIzwefEYsrnsaW4IrIT6nXYtgjKZDKkxguJ+Zr4f85cjA3psVj+8kVCpEhIoHHPDHtp+GDeEk24ypEqhk1k/NAGNEqt/aPvhjYRKER+TU+zxX7Qf8Cx6VAfJkCqHDtYv2w9vJFSaMFQJcnzmO2E6p+duTNekQzHAOTx3+fKYY+U5vXbp6+ym4g0S83nEmAmD/gIDFqGxiAHxA/3omf/2wBljCyTE/kHPoPHA41yiRKsg0Og0DPxThiGAQiQmR0ghVgeXmZGE10P6JRbI6CAkM6mMqARBghyRkQrw+sqAXXSnIe9jCwBx8GtRd/hb6CZ678+7dnE/k7lkM5nLQf7naBU5n9R+tWXLV/QPdC/9A+b43dPGrrkzuGDzo/T29Y8++s/HHiXl3hHzy828cIXRWen3VzqTP+3paVo5BuClgOB1elJeTfPkkYZfjTbk3fUzvfcX369K/CqpZS1xlua9tDE8y3jPkvWPhh/756OPrr/8UZpcqztvwex8S/PG6SMc2WqBtHzwgcpVO2Hq1LFBbcaiPQsnFOhJzG49tgZNMO7lLPqeTYmo52KKD0azsqh64oCXni+g+0W+hCmFGUxBSSiUi6OjTajKvUfTGgqHWjX3wEV/SoLwYntC+LAfFe38itizK+CCeU+YDViFwYwuFTFZcE9CGr/NrGRQVvuuvFieCdx1DleGdk+cqyAW4DJIAqbEC5+OoCoGo1SxUIcoLpWJD6PlpaG5CvQ8oGps7fBE3/J4yjaU8AHP956NJQNXJQ3kfk/rxhI65ylPR6sHbsO575GCykqtNt0zYeIwa2isRFvx9Q6Ph+D7qzxwVbLR4+GL4f2N0W10Dr5E7n8KKvLwfg9+rad0Vbg1Jyd/wZ8C5688D/bF3UBHV0lfcFO487n53KXcldx27nbULetR26FPk+Qy0a90gvkOopQHGDPFZiAeFTGWKhOlPIDzCjkSD39njEcLI5LBQrD7QaAfYEJFHxPAyJJiziDGFY1wbfJiHp6BvPRJa/eZ1gJdTrmr3l6nSZ7om1BWUNB6prt1UdtWdWbnIv9NTi1ybRheDQ7Mah23Vy7qzFRvrVhi7r/ZFcKZJZuU6T2g4/N0YV0er0tPD6cTjS49g/ZkpOvMBuIxmOn9eDYbaA+c14cxiyfhbfygb8Rl05pLK412SV3hmHr+Ta0+bNrIhue+LPdf9XVLXo20Zs+aKnynSjnDpVSf3fL1Vf7yL5/LG55JLqsrLGKQT1HzU22OLjdXZzAm95oAHWuBO/laYVFiId9iNiDI79RyI5mcFsUChoBXG4tIaVZkf/VEssfDWMbSArchJglUNI1xkZBgjTx32QUrMAxUC659b2WsQZVeDNjW3RHhy2PxdQBXrHp+5kzagyY4hKbiVvokkznIRpRz5ieKbCHc0Y2YSDFYYD5IcVl3EmcACFDJzWKWC74BR1HnYJZZtsQMW9CuJfEKvUtj/SiA1ttjvWWvmix8VQgFUxxLhCDcRFjt11rQMUfoDBfW4YBD85QMbUf1Cx6kazB36F6AAuqCjAI1pPceumuP9fbOjs7brQ/cHRU3XXurs2nh2GLzi/R3tJP+7kXniI2z7LdLey5sK7zM42yoK4xnoofJHLQaovcz26HBfP2K5/w/ITghJYTQDzH3k/+5FSuf9CU1ulzDk7xP0snuUJKucoS/lPaseG758udWEE/NuInZSSFOzXwNjjFfaRuM4nBuFDeOm8hNxbFkQEXFAss4Ey8Um31lCHHDOc+6JkGD7IRDjKXCcofXl5kpZ9WVuWY+PZNvHXIZfRnmmU12EWrCBvLo6obuEdF9SirudC+bOyM7J6lg3nlt7vkTJsw/67rvZ7SfSrSliuX5KzFiErPyVlLkc18B/JEmGzg9l8cVolwljS8oAzoJDp0RAY0OEC/yJW5JAJjiZjpn2agaT16rOHjk8JGDFeSVYZ/t+umN+d7Vi377Eg3MHjPtjd0Lt86+qXfi/Im9N806r+E2sbj/rbnbGhu3zRWqZi9TEcf2Q1MWWegXZTTz4YyLDkyLfhqe2T1zoWHV1Li/fUS6B+aCSQWAC8D4x3YiAQmMLJZJwuDSkqzTov1viLCQqUTW6phEK+AOSJrzJloba9+cSU8vpf+e8UF9o3XSeU0TeI3+nuWWmjcXPaPTj+0+1T1Wr3tm0fsNjhX36zX8OPGisn2vnD9tsZqmkn+lLJl1/iv7SguEUO2VP4VmuulVfCDvZGfnV9u2fdXZeTIv+ntyhW1e/ZnNtQ18QnyVVIynwLFoIUAyhQQgUGWdU3DHou3cvO/Lt5/xB868pB/z7kHhNL2erC75Iqv/prI3bGQ13VfIr+W3y+rFN93k9aFWUd/0WGfvY8RBspybyZM+WnNRPj1Jvywht9F53FlxdtJ/GWfnP8XY+U/BdTB2l9ApNaqaGUWIdqVdLIhecwRxdDf3CbNjLeNquNHcBTHv9zQe9SB+nwNAiRexmORCiSoqWW2y3RjzIYBd4zYGmNk2zqGYENWL4TF3mQS4CkXeRuGu1tF1Kx5dsunIb4jquTRfSr1JnSfd+vLFv11AXlvYNU1fcoXfNvmt1kXp6V2teL5BNYWF/+q//7HdoirVlOky+FKqq696/VGhKdS5ILRqdrBhw+Qr/kDqh5eUEOGVbbPumReeZW6Yes2C4ipn3ow3hLtXXXq/wN9x6aq9w5U4YtGa3yw3Zmfk5unMaQ51Jr99bng7G/cpZKx8hbSV0zJ7yypVpgkjxCqxYt0Bh66gjHfbiTHTZFeixZokldD/OCl9JeswmvufLPjxrmUvhB6dT7SXbv7+wIZMAGm1f6sZKKY/SFvvpv/Yh6aPt7w2t+XV9k29L82+99NNpGsk/WlkrAj2bhXxSndL951LJirEZKIrSHoBsfT/JdpzGX/abV76ffSDi/liuoIvWx79QNpIf7DPz+//7DK+jO8rtAj0jej7F/P+qI+vaIseVmwLgYtpYz65Spw7AG7MSsmnIcxSBda2C7hwo4lcJZYePNj7x4NCC3+/IUVvGJMdfT36RvYYgz7FIDU+03/gmWeE8c/07+GLtMNsFllPN5HNQMPYhmkTv5PO4g+fbSyKUAC6xyABxmMGfh94MwUcaEhAbmsN9V6DIF9cH2q9Kl1MTaLLyJYcvcaloROOfkgnQEafQ7bQZUmpYnphkG/nLwnyLqET3+nvgLPwbro9K4luo8sshmReTVa/+iq9Xs0nAzG1i1yWlGVPLyynanK6nO33FbJGngNttSltlRFRQluDMCawB8t4QJb5ROQgMRllzZqWvsko7FU9NW31zuie6GI5RZOssaUk82vIl3kpjmybcKmw4LypNmq3PXF+/93nT7GRT22PC039F5B3xHRzekYy+npf7khPTjWhz/4AX2hkNvMeJjc4W0Ork2RniBDR5dZZSNwKWHQaTUIZEYVAUASgec64XuNvmVdKr/cfUuno9aXzbtlwiKqYVqv/WbKaXQsL4Amy2n/oXFynalL8rTdiT0X3MS3Yq7Fq/xWr5WweNxfxzy+jUzngEvoFFwSjQ5Fk4tUDhDhnqCrsgP6+++h3zCb9PtKepuHJK/SDefOI6tyhq+T7iD7xJdKeJPI9pAHVmySDL2ay4DhtgLvM+MtojyzKiI2guf4grv06uo+5AA2Nb9E3JRZyM0WxU1B4t/9c75CA5qrV/VnMlvnsSCUKiGb1DoypeVB7rdSL2i8l7gLqwoZ+JRZRg6YgzZEFpAdaZ9eK9X1TmDM8fo+FbVFCLESUAPyKYxXGPhiwtQHcEPeWOlfcZAyrb2LxfhTEwshjmsJMslV3I94Lo/wRQzwCFtpz9v9eiBEuZECGrY5Z9KAtlNQY6duPzyL+6u+gPahVj8Wkiz8vxiXnKgAg6PmM8pl9KPZhJuixmIftzOGFb0XLc+Yfg/EKB2JZlDEuG4WP6AQHtJ6WudxgkK1gAP2WBq7jXs/isaixY8nSuvr6uqWLN5aY86fkW/BktuBpYaHFYsmX1XWhxYtPL15SVx99rBAD7BepuoE9MecXwtRbMBX1lrxiyA6BAQXcRdwKbj235Zy7J5AZhwsG1lhUrmcgukZiSUFPAWaErQugtVsaMQYDFmYNZ2C6LjkzyG4EHMQbsBB2Ax3LOBYOFtXR3ioxIW8URpOmuO0WPUg/YrutCn4Nb65d+yb9lr5Hv31z7eVFgSXk8Wt79y9fvr/32vf2TbrRr193weZPc8yXbixd5F7CJ6dWP5qZqs0EBKySkgHGD7uybKE7LAjJqcXXziEauljKyU0TUpPJwlreVbZ2erBJW5C+oq6FLzeuwwt7eltdS5Dt+sF2FLG29V6y9k1iGGzS7X95sb56qZgDTaH/gCZdomqur5ne3fGbx4rzyV/S0lXpWt6SR4hKayoLlAjkX7Oh/N3M1AxVcvqKDfQjojYVj6zgCa3cfOP79KbDW1smPNQ485slSrqZxSs62+9YibMSC1psOytFGT8CCqmRshCGsJqPY1ARdEVWfPMHz8D5hRnu3HNO/++BuDDxVHfW9+J+3hj5EO0WcC/K6r794f7jsho2UTsGEcPo6hF0q5T2DIQ5SRmIJKy0pScc+4nFMfIwfB6XJcIXdLFYpuhFHlaijmDX8FU0lsAX1UDTzpbflV/nsrkipmMZxtUzbgx9f0MEVyb7bzIEZT+K4MckkyBTHZThf5iRVIqJbkCU8X84DD1Ue7dV3bR8bbMpPV3aZjb3L7VMM/f/ZDYLt5mnzaoh39dkaQQpWVWxcFxp+XJSXFMzvaYm+sEYfuPo/p9G8x1j+n9i+X+PiefHyA9vk9LTTc1rl99Utc0MtS2B2pLM0yzCrWZaQ7U1E5aXl45bWKFKlgRNIdY3vWb46OhVY8j3Y6Kdo8n3A3l2vmqMYu8FwwN0fQrjgAY0rci06znZ4B0U3qH1NBc3HMQHlLyqe/Xe1Wtapl8G0/TlRxE0iWSOM0WRo/QL5Ma/fXDvN5hiVKBpq9dORfC7duqn9GnHB4p47gMHmfQpvoHRFZnLDbRrOrFIHdI7MKNuph1XHLF8jgaiYvYpFbpMWUIGuULm3czKwCE8osQx5Mn4Bx/kbz7efnHtBR7t5FktublznyrVql0lWi1tlN5p7TjvvA7aYXaJquTh5tEGPX0vGtXKi+68q7r6ZfpIRtqD0e9mzJjAxWxZFVkNysVxjdSzeBTc2fx4PPqYQk0a4qqURLoS9kP8vyg44p4bRmswjVhdqu5BHvzHmMs9BpicP4r+NGo+i/Pfgugr3LuVb2ViJDJOibL/5q3km1szvqDvfIGScoZUe+BMZiie+G78HwC2UfPnj7Ip/xlgDf8IYqAfBz0Haw2TJzdjoCcV7OU0+ffyAS6LaYfqOE6Hku8Q4UIwxFw6KVOL5/jXM2f/5xmd8a2L281hknri2w0ZFpp14mtVelXpqEBTcan4Pf3Ds6Q2+zynK7P/01ah7bLKr+bQa9aXrJtZsr6W/yF2K4f+Qbwi8/Rlq6CW9H/236vR0hte+r2gNmc5sy0p6uX0DwfgyUyX87w/rOi/ZWpl4/qSmes868i6OX+nj5PaHLjTmk1fg/lLicUDRFsoKzc+JhndxN3I3cbdw+3jnsJQxH6FqTAI0PQQARKWBJBtVMkSxupyCEYT/vMjCahrWHc6E3CVaBCVhlrWfCIrBW4UCIiBoK6MEB0qFpF/EHR6E2oM0ZauFmEiE6DatV5ZRL7TildOk6TUI6A1lp1ZU8k+rMepOCUH9Ygvg4BNc4neaIIH5MMLJ+0y542ZvLDXsmDSruoxkxYJrxTYr1+0m35YjemdxBO5ulGVVapJSteka6rHqwvT1GnD7K1ykqiSgLi9HQrktGq7oBvTTXdm+1VjS8lvj1TqVXJavu2mB3hSV1dZRCYcyVw2kpx5aRps76V55LGlGLSPj666OZmkZuqqJ11VpJHUmlpnulo32frohReTBx5LybPvn9eyUpZ9Aq1qu5iQutpy8QA9QfLGTpq0K4/QE3wOMeWN2X1LHsnvv6Xtzb3O4I47297a6wju4FdXbOA12Vl5DaHi3HELyW3JQp4qPdUhSJoUQa1+4DVyp1JC5EDe6XEBmjL2DXo9kYPDkrLPn3XhBlJBD6l4Q6aFPjChcSogi0J0ZCQVU25bdTtCFlXK3/1CFuHJHd+RLQJJTxOJ+cvm0bS49ImfQmZrXuu6T+bvLSchfY5OS3eRGvoBEQgGyuJ+R6yyTnqMRc0KAMeb6XahFAgXiSxlmoyccPIHsnTxPN30rq8XHBo//tCCr7um6xYsJEuJdSEZ9/vfkuaVz8rC5MbGyYL87Eq6/7e/p78FbHUfrE2TPB+40JHM3kqJBmfHX5sOVhvAEOA9BbtbYlpn1PbH9f641QR7zBcdWWNJMYwVAso/ssBr5aUQkU0jmvLXT8rIklKkjGjrZ4I21UCPGFK1Qvhy3tlin5pty8+dzAudepUmXZc/8ZEJzWu/5GvKZuZVXVGzuebyiopA7fpNnRbrCEdxiqU6pyG7Rp+Vk1QmbvrbR3OvNEk8H/0kMyMjQ6vlXbzKZpu0cuXKOQ6ez0tRSVKS2ugf2RSJ+tKql0QuXPbGxuqKDNtDu//U076W/1JKyhs7fY7HMTVVbcquuXDaeXZvon/sUBqDWYNnE5sWIyLoEqgMmxJp8cxLQD2zP6Sk8UBXWAw+poQWYnQDM09IUeLGYYgYoNhVAzGEVfC9XOW/orDgbETQxhUajMz2YmwyUSsbMIwO/oM1fD8MtDLtQRo6v5B4IFWCjrQDBdWIX8DALMrd2FN15BSKQzl1wneHxvpQvm9iZAyzHCcJdi0iiw+F3wcGggU2QaYIOxy30VJYNqUFYSWO5KAxxKCNiTRgd6WMczzqeYL1kVNE/0Mtsy1Bkp6ZjGid8QJGBOAQJVgrOdCbHA3LJU10X2ZyRn5o6rDq6mFTx1VXa8i/iosuHDbs0qlTLs3I6K9W5iBOZ+LxWjvQ4lnUnzasumVq9bCKSiBaLqZ7dMOq4ZVLp/BPZ2dkRh+O0aLyWe3PZTEzXGf14Gw+t5Sc3VjlP/zEgoV2MORJJtJnYJ20n92+SKKkO9oUi6ShmGP9/8L3ZQxZE+jfrGeRc63AWxdyHq6CxX6rw2iYmri6XGQktZ2R1/+XvLKIgKdmanXmns+iCf9X2cQVDoMQHgzscs4kFsMuYZ9lxmOcxPcaCwQse4MmrzsuQHLGWIfE7cai+ig106jiwtOFK3xwySubDgcZWQXiUUIoKEwDtiPpV/cd42HOsffMvI2FrHImbMVzb0H0kGL+FegpxfxGzr0RY1csG7dS4oeMz8C4JHY+sYsJsc9VwJdlxN9wB90aYtMA1JeVVwHcRNjXMK4QOhINTB563LOQkSzEMq5iYUgbShNnB7a5rPoFNPDDoLiYbAKvhsDFlCQtXZXnyPAMcxcWuocNz28knlnD3O7CJigYMlmUF7UpKfwYWS6lT8ru4kCwsDBnWJA0153IGeZuL3S7i8+aN/QZSmX/y8AI3JtLiXGltFQ0BE2yyZlwFqpQD1DOI5UX9x7z+xLbStv3r9u/n/YMnnc1XqThs5OT3yiVxTnmRo+n0ZPY5KpIuCocTjzT9nkjtFOs1pWvNtcu+b4031paas0HmPA+974MRLESD58o/1PO4Xbx+P/kVEP+W4nnrvb2u+6m59Pz72Y5spfspT+wEHkssrfkOesm5nrP4KzGH2L+pArvjysiG0fFbyM2vxcO0WaS3XYscAdNyPcjBELOOoJWQRiUeFX74gj2j6ZAjnSJa+mHsN1YBNaP9/8hOhIuIVVik8XjBcX+s6nWDSuP2HRa5lktY0hYeC16eDs/jy6JRDDiZwRhaf/xMPFFP9jOz8cIFJFok6oZTgn2UzhKOq0QBDQv2pwmrc0kaHVQn+y0iW6tTXJ/jpHoNpK1gO7XYu5zDFm3kV4LDb8WcmIpWdu7degtALZ4ayN7dYi/kQlw3i+k2f8dt3luX6N3/xsW9FzORKqT/yVb+v8AUeQdbgAAeNpjYGRgYGBk7JRy5JSM57f5ysDNfgEownA+5XwIMs1+ASzOwcAE4gEAF4EJ7wAAeNpjYGRgYL/w/waIZGAAk4wMqOA9AHazBU4AAHjabVIrDgIxEJ0uYoOGAyCQKAS3IEFAwgFWIeAeqOIIggSHBIMCg4AVJKzkCATdhIBi+tntdOgmL6+dz5vPVigwX7ICqD0B0sKztgn0i74FfJEl8syy8SkTm6WF6CC/ETm5v+zdnCVy0/oq5MQPjEcslkFIH09Ra6VFcgyhayRj5Ifvj/Ygto4l80HkrPMvTi+LaDVdX7nnEjpH3FzvGm0bQ1HF6xmV01HhrqrZs0hezjRlqMl3D1dmm2DOPOzZaNaR+4glq9VjfUlWa4qokx2WWCD2kdlKfJj9QHZIZub3Ur+6r4kG1hJntmPd7w4xwHPX7ePKZlT/O/77v/xtDp294Xo6ITb+nQX/hdhigDurlyVjgB9mnjO1AAAAeNpjYGBQIwD1GNoYVjBcYbRjnMC4gvEdkx7TJKYTzALMMcyTmK+wyLDMYDnHysVqxPqJTYYthW0S2zl2IXY39hXstzgsOII4KjhWcFzi+MMpxKnAqcdpw+nFGcG5jfMU5zcuM64cri6ueVx3uP5xm3HXcX/gCeGZwXOGl4XXjjePdx7vGd5ffGp8GXwr+K7wK/G38b8Q4BGwEWgTOCPwS1BMMEgwR3CVkIfQBKFNQleEvgkrCG8SficSJdIiskTkgKiIaIzoAjExsQixGWK3xG3EL0n4SByQeCLJICkmGSY5QfKVlIFUhlSf1Capd9I20pNkXGRKZI7IfJO1ky2RnSa7S85DrkHunjyDfI38PgUhhTKFPQr3FBkUJRRnKF5R0lNapHRAOUv5lkqCyiSVWyrfVCVUvVRnqG5RfaLGprZI3Uv9nIaUhomGl0aKRpXGFI1VGkc0bmkKaRpovtEK0tqjPUH7jc4EXR7dMN11uq/0xPRU9JbpvdKX0Q/QX6b/zMDHYJ7BKYNvhkaGGYYNhosMXxgdMHpnbGEcYnzNRMkkzeSOqZtZhtkUcwXzCPMp5lcsTCxqLOZZ8lgGWM6x3GJ5z0rHqs1qn9UnaynrAOsN1hsAt7aMyXjaY2BkYGB4z7CJQZABBJiAmJEBJOYA5jMAAC5XAfgAeNqNUstOwkAUPS1oQjQuXLgwLhrdqAkPFaHCykRxITFEo3VbBEoj0goV8Bf8Mt35BX6D8QOMZy5TQujG3Ezn3DPnPmZuAazgDSkY6QyAL64pNrBOb4pNrOFb4xRs/GqcxrZR0ngJE+Ne42XynxpnsG/8aLyKTXNL43dsmHHsBwpmHRdooA4LI7QxwBA+AvTpH3IFZCy49F+594giUSXVY6IIXaKOMBFRGxM88BvSi3W71ES0EBXkaWOxHDyevnBXFT3yPUao2D5rtLnyZEOyWeZ38UylyvNEZgc1XfE8UW8PZ1QPqVXZAsl2TYXHWuo2AxwwU4FWQhW3uISDK6JkVHYhLqmwFhR3Cy80X6mBGzLKm2e7VEY632gWkUOZ3yrv6uKROZWmQ1a9UJNTyuFYlo0jeif/6N2RV26xi4G8req9JciXOVgyZZcVx1oZzpTxhBz6zblZT3ut8cyndyoRFq0oZ2VOW92xwg5t+bfUzYt/4ZJ4UQAAAHjabZT1k1xVGAW3F0lwd3eHefe7z/AQ2ODuHiCQQFiChBAsuLu7u1twJ7i7u1vxJ0Bgen5jqra6Xu27fWdPnbN9/X3/ff6e3Jf6/u/z19Qf+vrpZxqmZTqmZwhDmYEZmYmZmYVZmY3ZmYM5mYu5mYd5mY/5WYAFWYiFWYRFWYzFWYIlWYqlWYZlWY7lWYEVWYmVWYVVWY0OBYkgU1JR09CyOmuwJmuxNuuwLsNYj+GszwYMMIIN2YiN2YRN2YzN2YIt2Yqt2YZt2Y7t2YEd2Ymd2YVd2Y3d2YM9Gcle7M0+jGJf9mM0Y9ifAxjLgQxyEOM4mEM4lMMYz+FM4AgmciRHcTTHcCyTOI7jOYETOYmTOYVTOY3TOYMzOYuzOYdzOY/zuYALuYiLuYRLuYzLuYIruYqruYZruY7ruYEbuYmbuYVbuY3buYM7uYu7uYd7uY/7eYAHeYjJPMwjPMpjPM4TPMlTPM0zPMtzPM8LTOFFXuJlXuFVXuN13uBN3uJt3uFd3uN9PuBDPuJjPuFTPuNzvuBLvuJrvuFbvuN7fuBHfuJnfuFXfuN3/uDPIeMHx6ROpyMLmWTILEtZyVo2spXDukwDXZZdlgPD/+VA0b1vKguZZMgsS1nJWjay7bLQV+gr9BX6Cj2FnkJPoafQk/QkPUlP0pP0JD1JT9KT9ISe8Hx4Pvy7Qk/oCc+H57Pns98j68l6suez92fPl/6+9J7S90rvKX2/7L3vfZX3Vd5X6an0VHoqPZWeSk+lp/Z87fet9dR6aj21nlpPrafW0/h9Gn2NvkZfo6/p+pJ9SvYp2aNkj1Kn914la9nI7r3JHiV7lOxRskep0Gefkn1K9inZp2Sfkn1K9inZp2SfUtJnr5K9SvYq2atkr5K9SqHPfiX7lexXsl/JfqXQZ8+SPUv2LNmvML/o9J5DZlnKStaykV1vmGOYY5hjmGOYY5hjmGOYY5hjmGOYY5hjmGOYY5hjmGOYY5hjmGOYY5hjmGOYY5hjmGOYY5hjmGOYY5hjmGO41+jl6V4j63O3kfW533C/kbu+7HPuPZcdWcgkQ2ZZykrWUo87z5Xn3Xl259mdZ3ee3Xl259md51qPe8/uPbv37N6ze8/uPbv37N6ze8/uPbv37N6ze8/uPbv33Ohr9DX6Gn2tvlZfq6/V1+pr9bX6Wn2tvrbrK/3/UrqP0n2U7qN0H6W7KDv10MFRE0aMnThu9D9zrnmnAAFTPx7UAAA=) format('woff'), + url(../fonts/dashicons.ttf) format("truetype"), + url(../fonts/dashicons.svg#dashicons) format("svg"); + font-weight: normal; + font-style: normal; +} + +.dashicons, +.dashicons-before:before { + display: inline-block; + width: 20px; + height: 20px; + font-size: 20px; + line-height: 1; + font-family: "dashicons"; + text-decoration: inherit; + font-weight: normal; + font-style: normal; + vertical-align: top; + text-align: center; + -webkit-transition: color .1s ease-in 0; + transition: color .1s ease-in 0; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +/* Admin Menu Icons */ + +.dashicons-menu:before { + content:"\f333"; +} + +.dashicons-admin-site:before { + content:"\f319"; +} + +.dashicons-dashboard:before { + content:"\f226"; +} + +.dashicons-admin-media:before { + content: "\f104"; +} + +.dashicons-admin-page:before { + content: "\f105"; +} + +.dashicons-admin-comments:before { + content: "\f101"; +} + +.dashicons-admin-appearance:before { + content: "\f100"; +} + +.dashicons-admin-plugins:before { + content: "\f106"; +} + +.dashicons-admin-users:before { + content: "\f110"; +} + +.dashicons-admin-tools:before { + content: "\f107"; +} + +.dashicons-admin-settings:before { + content: "\f108"; +} + +.dashicons-admin-network:before { + content: "\f112"; +} + +.dashicons-admin-generic:before { + content: "\f111"; +} + +.dashicons-admin-home:before { + content: "\f102"; +} + +.dashicons-admin-collapse:before { + content:"\f148"; +} + + +/* Both Admin Menu and Post Formats */ + +.dashicons-admin-links:before, +.dashicons-format-links:before { + content: "\f103"; +} + +.dashicons-admin-post:before, +.dashicons-format-standard:before { + content: "\f109"; +} + + +/* Post Format Icons */ + +.dashicons-format-image:before { + content: "\f128"; +} + +.dashicons-format-gallery:before { + content: "\f161"; +} + +.dashicons-format-audio:before { + content: "\f127"; +} + +.dashicons-format-video:before { + content: "\f126"; +} + +.dashicons-format-chat:before { + content: "\f125"; +} + +.dashicons-format-status:before { + content: "\f130"; +} + +.dashicons-format-aside:before { + content: "\f123"; +} + +.dashicons-format-quote:before { + content: "\f122"; +} + + +/* Welcome Screen Icons */ + +.dashicons-welcome-write-blog:before, +.dashicons-welcome-edit-page:before { + content:"\f119"; +} + +.dashicons-welcome-add-page:before { + content:"\f133"; +} + +.dashicons-welcome-view-site:before { + content:"\f115"; +} + +.dashicons-welcome-widgets-menus:before { + content:"\f116"; +} + +.dashicons-welcome-comments:before { + content:"\f117"; +} + +.dashicons-welcome-learn-more:before { + content:"\f118"; +} + + +/* Image Editing Icons */ + +.dashicons-image-crop:before { + content:"\f165"; +} + +.dashicons-image-rotate-left:before { + content:"\f166"; +} + +.dashicons-image-rotate-right:before { + content:"\f167"; +} + +.dashicons-image-flip-vertical:before { + content:"\f168"; +} + +.dashicons-image-flip-horizontal:before { + content:"\f169"; +} + + +/* Both Image Editing and TinyMCE */ + +.dashicons-undo:before { + content:"\f171"; +} + +.dashicons-redo:before { + content:"\f172"; +} + +/* TinyMCE Icons */ + +.dashicons-editor-bold:before { + content:"\f200"; +} + +.dashicons-editor-italic:before { + content:"\f201"; +} + +.dashicons-editor-ul:before { + content:"\f203"; +} + +.dashicons-editor-ol:before { + content:"\f204"; +} + +.dashicons-editor-quote:before { + content:"\f205"; +} + +.dashicons-editor-alignleft:before { + content:"\f206"; +} + +.dashicons-editor-aligncenter:before { + content:"\f207"; +} + +.dashicons-editor-alignright:before { + content:"\f208"; +} + +.dashicons-editor-insertmore:before { + content:"\f209"; +} + +.dashicons-editor-spellcheck:before { + content:"\f210"; +} + +.dashicons-editor-distractionfree:before, +.dashicons-editor-expand:before { + content: "\f211"; +} + +.dashicons-editor-contract:before { + content: "\f506"; +} + +.dashicons-editor-kitchensink:before { + content:"\f212"; +} + +.dashicons-editor-underline:before { + content:"\f213"; +} + +.dashicons-editor-justify:before { + content:"\f214"; +} + +.dashicons-editor-textcolor:before { + content:"\f215"; +} + +.dashicons-editor-paste-word:before { + content:"\f216"; +} + +.dashicons-editor-paste-text:before { + content:"\f217"; +} + +.dashicons-editor-removeformatting:before { + content:"\f218"; +} + +.dashicons-editor-video:before { + content:"\f219"; +} + +.dashicons-editor-customchar:before { + content:"\f220"; +} + +.dashicons-editor-outdent:before { + content:"\f221"; +} + +.dashicons-editor-indent:before { + content:"\f222"; +} + +.dashicons-editor-help:before { + content:"\f223"; +} + +.dashicons-editor-strikethrough:before { + content:"\f224"; +} + +.dashicons-editor-unlink:before { + content:"\f225"; +} + +.dashicons-editor-rtl:before { + content:"\f320"; +} + +.dashicons-editor-break:before { + content:"\f474"; +} + +.dashicons-editor-code:before { + content:"\f475"; +} + +.dashicons-editor-paragraph:before { + content:"\f476"; +} + +/* Post Icons */ + +.dashicons-align-left:before { + content:"\f135"; +} + +.dashicons-align-right:before { + content:"\f136"; +} + +.dashicons-align-center:before { + content:"\f134"; +} + +.dashicons-align-none:before { + content:"\f138"; +} + +.dashicons-lock:before { + content:"\f160"; +} + +.dashicons-calendar:before { + content:"\f145"; +} + +.dashicons-visibility:before { + content:"\f177"; +} + +.dashicons-post-status:before { + content:"\f173"; +} + +.dashicons-edit:before { + content:"\f464"; +} + +.dashicons-post-trash:before, +.dashicons-trash:before { + content:"\f182"; +} + + +/* Sorting */ + +.dashicons-external:before { + content: "\f504"; +} + +.dashicons-arrow-up:before { + content:"\f142"; +} + +.dashicons-arrow-down:before { + content:"\f140"; +} + +.dashicons-arrow-left:before { + content:"\f141"; +} + +.dashicons-arrow-right:before { + content:"\f139"; +} + +.dashicons-arrow-up-alt:before { + content:"\f342"; +} + +.dashicons-arrow-down-alt:before { + content:"\f346"; +} + +.dashicons-arrow-left-alt:before { + content:"\f340"; +} + +.dashicons-arrow-right-alt:before { + content:"\f344"; +} + +.dashicons-arrow-up-alt2:before { + content:"\f343"; +} + +.dashicons-arrow-down-alt2:before { + content:"\f347"; +} + +.dashicons-arrow-left-alt2:before { + content:"\f341"; +} + +.dashicons-arrow-right-alt2:before { + content:"\f345"; +} + +.dashicons-leftright:before { + content:"\f229"; +} + +.dashicons-sort:before { + content:"\f156"; +} + +.dashicons-randomize:before { + content: "\f503" +} + +.dashicons-list-view:before { + content:"\f163"; +} + +.dashicons-exerpt-view:before { + content:"\f164"; +} + + +/* WPorg specific icons: Jobs, Profiles, WordCamps */ + +.dashicons-hammer:before { + content: "\f308"; +} + +.dashicons-art:before { + content: "\f309"; +} + +.dashicons-migrate:before { + content: "\f310"; +} + +.dashicons-performance:before { + content: "\f311"; +} + +.dashicons-universal-access:before { + content: "\f483"; +} + +.dashicons-universal-access-alt:before { + content: "\f507"; +} + +.dashicons-tickets:before { + content: "\f486"; +} + +.dashicons-nametag:before { + content: "\f484"; +} + +.dashicons-clipboard:before { + content: "\f481"; +} + +.dashicons-heart:before { + content: "\f487"; +} + +.dashicons-megaphone:before { + content: "\f488"; +} + +.dashicons-schedule:before { + content: "\f489"; +} + + +/* Internal/Products */ + +.dashicons-wordpress:before { + content:"\f120"; +} + +.dashicons-wordpress-alt:before { + content:"\f324"; +} + +.dashicons-pressthis:before { + content:"\f157"; +} + +.dashicons-update:before { + content:"\f463"; +} + +.dashicons-screenoptions:before { + content:"\f180"; +} + +.dashicons-info:before { + content:"\f348"; +} + +.dashicons-cart:before { + content:"\f174"; +} + +.dashicons-feedback:before { + content:"\f175"; +} + +.dashicons-cloud:before { + content:"\f176"; +} + +.dashicons-translation:before { + content:"\f326"; +} + + +/* Taxonomies */ + +.dashicons-tag:before { + content:"\f323"; +} + +.dashicons-category:before { + content:"\f318"; +} + + +/* Widget icons */ + +.dashicons-archive:before { + content:"\f480"; +} + +.dashicons-tagcloud:before { + content:"\f479"; +} + +.dashicons-text:before { + content:"\f478"; +} + + +/* Media icons */ + +.dashicons-media-archive:before { + content: "\f501" +} + +.dashicons-media-audio:before { + content: "\f500" +} + +.dashicons-media-code:before { + content: "\f499" +} + +.dashicons-media-default:before { + content: "\f498" +} + +.dashicons-media-document:before { + content: "\f497" +} + +.dashicons-media-interactive:before { + content: "\f496" +} + +.dashicons-media-spreadsheet:before { + content: "\f495" +} + +.dashicons-media-text:before { + content: "\f491" +} + +.dashicons-media-video:before { + content: "\f490" +} + +.dashicons-playlist-audio:before { + content: "\f492" +} + +.dashicons-playlist-video:before { + content: "\f493" +} + + +/* Alerts/Notifications/Flags */ + +.dashicons-yes:before { + content:"\f147"; +} + +.dashicons-no:before { + content:"\f158"; +} + +.dashicons-no-alt:before { + content:"\f335"; +} + +.dashicons-plus:before { + content:"\f132"; +} + +.dashicons-plus-alt:before { + content: "\f502" +} + +.dashicons-minus:before { + content:"\f460"; +} + +.dashicons-dismiss:before { + content:"\f153"; +} + +.dashicons-marker:before { + content:"\f159"; +} + +.dashicons-star-filled:before { + content:"\f155"; +} + +.dashicons-star-half:before { + content:"\f459"; +} + +.dashicons-star-empty:before { + content:"\f154"; +} + +.dashicons-flag:before { + content:"\f227"; +} + + +/* Social Icons */ + +.dashicons-share:before { + content:"\f237"; +} + +.dashicons-share1:before { + content:"\f237"; +} + +.dashicons-share-alt:before { + content:"\f240"; +} + +.dashicons-share-alt2:before { + content:"\f242"; +} + +.dashicons-twitter:before { + content:"\f301"; +} + +.dashicons-rss:before { + content:"\f303"; +} + +.dashicons-email:before { + content:"\f465"; +} + +.dashicons-email-alt:before { + content:"\f466"; +} + +.dashicons-facebook:before { + content:"\f304"; +} + +.dashicons-facebook-alt:before { + content:"\f305"; +} + +.dashicons-networking:before { + content:"\f325"; +} + +.dashicons-googleplus:before { + content:"\f462"; +} + + +/* Misc/CPT */ + +.dashicons-location:before { + content:"\f230"; +} + +.dashicons-location-alt:before { + content:"\f231"; +} + +.dashicons-camera:before { + content:"\f306"; +} + +.dashicons-images-alt:before { + content:"\f232"; +} + +.dashicons-images-alt2:before { + content:"\f233"; +} + +.dashicons-video-alt:before { + content:"\f234"; +} + +.dashicons-video-alt2:before { + content:"\f235"; +} + +.dashicons-video-alt3:before { + content:"\f236"; +} + +.dashicons-vault:before { + content:"\f178"; +} + +.dashicons-shield:before { + content:"\f332"; +} + +.dashicons-shield-alt:before { + content:"\f334"; +} + +.dashicons-sos:before { + content:"\f468"; +} + +.dashicons-search:before { + content:"\f179"; +} + +.dashicons-slides:before { + content:"\f181"; +} + +.dashicons-analytics:before { + content:"\f183"; +} + +.dashicons-chart-pie:before { + content:"\f184"; +} + +.dashicons-chart-bar:before { + content:"\f185"; +} + +.dashicons-chart-line:before { + content:"\f238"; +} + +.dashicons-chart-area:before { + content:"\f239"; +} + +.dashicons-groups:before { + content:"\f307"; +} + +.dashicons-businessman:before { + content:"\f338"; +} + +.dashicons-id:before { + content:"\f336"; +} + +.dashicons-id-alt:before { + content:"\f337"; +} + +.dashicons-products:before { + content:"\f312"; +} + +.dashicons-awards:before { + content:"\f313"; +} + +.dashicons-forms:before { + content:"\f314"; +} + +.dashicons-testimonial:before { + content:"\f473"; +} + +.dashicons-portfolio:before { + content:"\f322"; +} + +.dashicons-book:before { + content:"\f330"; +} + +.dashicons-book-alt:before { + content:"\f331"; +} + +.dashicons-download:before { + content:"\f316"; +} + +.dashicons-upload:before { + content:"\f317"; +} + +.dashicons-backup:before { + content:"\f321"; +} + +.dashicons-clock:before { + content:"\f469"; +} + +.dashicons-lightbulb:before { + content:"\f339"; +} + +.dashicons-microphone:before { + content: "\f482"; +} + +.dashicons-desktop:before { + content:"\f472"; +} + +.dashicons-tablet:before { + content:"\f471"; +} + +.dashicons-smartphone:before { + content:"\f470"; +} + +.dashicons-smiley:before { + content:"\f328"; +} diff --git a/wp-includes/css/dashicons.min.css b/wp-includes/css/dashicons.min.css new file mode 100644 index 0000000..51afaf0 --- /dev/null +++ b/wp-includes/css/dashicons.min.css @@ -0,0 +1 @@ +@font-face{font-family:dashicons;src:url(../fonts/dashicons.eot)}@font-face{font-family:dashicons;src:url(data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAFc4AA4AAAAAjggAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABRAAAABwAAAAcawcIzEdERUYAAAFgAAAAHgAAACABHAAET1MvMgAAAYAAAABAAAAAYJAJaUVjbWFwAAABwAAAAS4AAAKKV1hH9Wdhc3AAAALwAAAACAAAAAgAAAAQZ2x5ZgAAAvgAAEvGAAB3YGyqygJoZWFkAABOwAAAAC4AAAA2BbfszmhoZWEAAE7wAAAAGgAAACQPogiYaG10eAAATwwAAAEZAAADvOx/y5tsb2NhAABQKAAAAdgAAAHgTh5scG1heHAAAFIAAAAAHwAAACABQgC1bmFtZQAAUiAAAAF1AAADBki4ZWJwb3N0AABTmAAAA5gAAAlhlodeP3dlYmYAAFcwAAAABgAAAAYe1VM/AAAAAQAAAADMPaLPAAAAAM9klqgAAAAAz2TPVHjaY2BkYGDgA2IJBhBgYmAEwndAzALmMQAADoQBIQAAeNpjYGZvZpzAwMrAwirCsoGBgWEahGbaw2DEFAHkA6Wwg1DvcD8GBwWGr+zsF0B8IKkBpBiRlCgwMAIA9nYJQHja3ZA/SwNBFMTf5mIkyd67iH8gYLEgKVIZLMTrzoiYFIoQUaJFooIaRDCVpBACamFn67fwy9hoEVFQLGd3rzJyHolY2Ns48OYxMPyKISKHhjdNInYSl3ESg5wUR/HfpIBGaEpl1KxqFPpIYxx5zKCIEubhYwnLqKCOXbTQwZUWOq3zuqh9HeiySZu8KRrfVG3Vbtm6bdqW7dhrexsmw9EoIlL0zSXkMAmFQsydwwKCmLuCGprYRxtdTdrROa10acAVJmeUKZnAVuz6gLtnT23X3oQUpqLoyen1encPE96Yl/UyXtJz+JP7/MEhWzb8zi/8zI98zzu8zRu8xhUu86J74Z67Z27bPZYn8lAeyKZsyLqsydXsW/Z1uM9fSKToBy4SsSV+F+jf6wtwHn6WAAAAAQAB//8AD3jarb0HfBRl+jg+78zOzG76ZlvabnazLWVTt4WUTYDQQwstFpCy9IBRpEngFCOiUmLDhh0Re1TkLBxnO107chFPDz1sHKfeqXd8PUiyr7/neWc32SDe977/zz/JzPvOOzPvvPXpzxNO5OCHnOIPcgIncRouhUvnuEqtTSvobDqTltiSiVZHTvU+Qh+LPEJ3kOmPRB7hD0abyPXcz7TnZ0KjH3I/Ew/luZ85wiX8VHIcz4W5qPyC1At1+jlOQ4IhYjRZiMkiBIIaIkv6fGLUy2m8LMHJwodIMBAM8cFAFZRXBcV90fpd2eturil9YFpJ3eyWFTXRh6L1T5nNy8zm3FGLjSPsvikV8tgll1ziK/CmNvvyzNPg1jSzsIl/dVdeqt1l2VKWlWdLJSnRh/hXn2J3p5tzA2MzKu2+Sy5ZMlaumOwraNKuHJnL6uQI8XARqVFWc5kwJrYqo0Grl0oI0doLXH6tL0BOCZ0ta9a0RGhKBFJZvaYl2tSyhqaQU2ta+IMta6DbAvdvqONj6SiMZRqrxyRriFtD/F6RwLDiITXeviy6Prp+Gf8j6YpE9/GtfVMEK21Xbbp9GX8NK6ftkTuiD0cf5WfQdHKKpkC9EW6X3CbXcFmci6uDeo0Z6SSNuEkDCfjcroJ0QlwByFs17FqSiaQ3GQMyMUrpRLK6XRkNJERMrLRK+semTbe3fLGMSM3NDQ0NTzdMpE+Yh7Xc9huysP9b3pifX9CaH/0WkzJytwVv0N2/UV6h8xsbG56WDmLJbS3DLESc2AwVNDY20yeWfdFy+6a+WVDB+flW3hL9hqVvkHvYjU2byKJN8IqZzmt4urGB41SwPsLQpzZOx+VyRbhGiNbnKiFum2wvkGD0jV5bVYCrMuqlApdPtGlZGvBWmbQ2GNCBS1FfW/TQ1bT96oeKamuLhJNFtdHGwzfeePhG4QA5BcmNS0y5tAfGVMkLnfzBotpIpLYo2gQv8M9g8WFV34kl+I5IzlB5Kb2fXXD8wJoQYEY5nD7RZrBpvXyrcLJvv2Dtz4qQU6K+97twRNTj/H/DnZC+kk5yauiTA1e9mwRw1YtBIqcRu02WCtwuXwP0NKBR7shEzKcHXyRNORe63Jn9r18gXL226tt5tKPD0+HxeDrqBYk0ZeO9HHpQylMe1bldF7zd3r9hetUIeKhko6eDdM49RffArUy4lUNfhP0X4V6XolI/Z+Bs0HZJ5SY4YkHiygwGHCYNb5Rwo7H1A7tR6lxA/3F59MvxR24ez2/z+RbMIao19C8kh1iKqnt3W6abLRbzdItZ+HmBzxe9bPzNR8bxlstJ5oI51R76F3qC5K/+OZpvNsce5ATiIR5ZLe2B/V/CjVFm124bnFnixaktIQacyHpix9msxYGBrRe/8uOVOf4km3K/rK4t6v0O51rUF9X2Z4UxGzYXmwcy5NQ5yrpU3Zjvm4KTbq5tqd1lMJsNuyDDuzBH708si36COQYeuS7ufnm03AozyhGYRpeEW88kw3CqYCiJO2gM4O5S6Q/wHb+d9MqoCU06329/pCcD9MPAW35i+hEKmyaM0kn3H4hefcCnGzVh1MuTD/xI/xZ4K0BK4YF/ssKmV2C96WG9HYT1lsVVwLcLylTlxBUSvFWwTtJEwQmpmaSp7AVlfDkMToh4VcYLpwY82VpBkKSShkWhxVvL0ohKm1Xi30QyLvvjxnT/g3u+WLjo8yducLsv++BylddVP25cvU4XXL5gQumaR2bL2WOGTxlG/3pgy5EVZ8R0tyXLZCtIST7T/t5mBYaHZTW0x82VQ+/tkgz9lmSDze9yy+6gy23XegNBd9AUCPptBqMpaJKNJi9XFfC5CiS9rP4kJ3jHkTtaF9Oexa139NwRzPrkY9MwKJnRRjysZJjp4/6q093dp7sF6/KZcAce+SQrCHdaF5OihbOhJJAbK5m9kA7vxmdZuyJygTwVYCzMCmfMBCyicguiYHMryzuzKuBnbZAaXho1am47fXPri/TDXbQnLOSOqVw1l/DlKydNWjlJLnuJUvrz3HZ/I302n26LCOR60rBq7qjo8UnVQXgCv0UK5TZYx1rc0aRKZZLLYH1KsldDvIFMh67A4Q5aYI0GgnYNsacJwsk7iHb+o6EXlt31Y8FJej+9/3DWK6T08TvpDwOlZA6Zczhzw4HvpT2b2l9tmfvaLbSddO0jmXf3dsYKSBdt3/TpvbM5hJUR6K+yl7JhNxf9cjdxVpVJUlkd7oCK9dtYRQBS+eGX7ZetbL+sg/0SJC3Et2EDfYc+Qd/ZsIF/cM2eNWv2wPr19G4lHsGKoA0f7s+CszDu7h077objOD60JrovHA5De1K5COztNlgX6QC9TTAH+bBCSmCNBLlargF2+4Rz7Heb1qaDJnljRxyyB6GdTrg35BruqxKu5Tbog4P14VhRba+DgVziUf76VhSbYYdHcMD4VkSY/dGEkoNDnyBdCDZiIET1MRR4IuyHppjZU+Ew4HRPPA83YlnoN+KDsLSH0QiWoVSCLUYluIOwMWCXwFYAiuFkjGKgPZAR9vT2huN/SD/0H4/TD4K1ZU3/Ewm3EZdwMOeH4VsyjHI+4hKdXQe0hIPNbsAnOI0ml71AJbsc9gI5EBRORo1lkYqbhZPCyf7hLbUAxcJ8aXuWr+ggfXn2bPrywUJ/VrtwkhT3HVCtrsWxCLOuRf/wl1uelZ/fvft5+dlbFJwnj5TXADWoRQoGiDREfDag3xCdydLt281m2tK3X1Wy3zIt+lc+e0f05Bi5dTvQWHRq/zDx2H4z6b+Rz9oR/WsPB3Ql/EA/DsNKsXOtsHOXce1QlMGXEYdVlUb4jEwLgZUbIrCGjZkZPC5jF5QGGM3okiV7gTvg8MLGc0kGPVCQRpMRkAbQPCGCgJc94QJAKRnziU5DQio33Oc1xMX7fUSHr8uHFz7/E32fvkDf/+n5hZAnlWQ0qfzp+b7XyUoy8ccdO36kz9Ab6TOYI/X0/aX6NJ3hyuk23Uoy/707iKnNN9tkzBGFqgarlf5ocKnV+nS9fvN0+1K7Qw/Z6e3kOSIKaqNGTprzYe8xsumt/xGKv169cfFiYZTyqYVnNUGcNeSjE1lD+ooEv5r3lpMksveVlQvkCePNwwuL1OKsLXXHW1r4fxC1SuCDPpIs8QLxB4maHo7m8c/L2S0tVwx75I9/ptuEG/tOLiDXfPsMfTu6s9jCibE12wYrSuaS2Y7lcC8SgNhDDo+4rnerqrn/ONA17OBbo/vkttOnxXWwJ3oGD4CJM0iXLMppQFuUQG0+dxngxcygO01lQkgYDDh/WSTMHFv1+Ljs9+57YP6zd6+oysj58pFb580XnjxXKX9084UNroydZPjUr8q37H/3zBV/7G9t3XWuQlxe4gAtqQLKK4XLwD7qgN62EQAk7IAOaogNkFl0X98U4lF1901RdUf3RfcJVoQYclvflOg+8Rh0sB0BAKbkFNbNJ9CpLsSBBZJ5kCvwMhAwAAe0JFauam6Zei3tQU6hhW9tWYMHQoKeMKTiuh3jn6M9xLOmhZzCctoORwoAg4Ey2DIMx+F3NQBvtTDS2ZyZs2K/8GtO+IgoeHU2u+Al8QO2qYYHgrWo9vTpWvJ8JAxgOhwJAz0UPyGQP6XMa23RmZd4KVRUG8bPDh5A157szxI6aTttZ/SP0v8wwiDiDAA5Bl21ujIYJS5q07DLyoUvwL+omlRY+y797N13bxg3sb8jM9J5A8tWS7sjUkNJpO8fcE0K3rXzqyL9nVc8xvJCbaE/gR9IZxzB8HhP9ZI9Dlyhf1wcu/lCsnfgXpVFlQ/7vsrCmz6X0nzjxvnO/BPO4r97t/IHFQR3PxGTDOaympYKBbcVTazx2bMlSZVR3bikffFIb7LcFnvNh1WceQm3g9DLEB/tUee0TGmbPWdkMcOLRfxBz5gZM8YYjSlFiycPhxJDfK1EGF7UMWrxrPZ7Ac9x1kCGyypliMeIyxMKec68g2fiAmq5i95Imr/5hu7/RmoMefoWlDY1laru8oQivd99o9zAb0jwjV0DfJMd9p8XcC4HsNPC69N4gJ1lvC/EZ8ZoMNVZaRzLSrFUyCV3kJo3r/D5rniTvk4X0deVvNzR2trRyuckJlGJJb9nuEVuG7nq4Re+eOHhVSPjmai9lT2Q8BfdzJL2WnwHeOwucorhz2SFm4r/SnsQRyIuBCikj+cY76vwYMo7JnzL7kcWDJgwf9BgN9j9dr8X6AlpD2yu/g5VM6BsQNphUQ94PdzrEDoj7DoSYWPHAd1yGOioQVgIdWrj0BAybj8jmxhElA+frlDgH3AZtEdW4wY5fVraA+viJBIMDIcy2qGd1S9C/VlQf1cirE2s3XlWzbjTACQ18Qeh2q6zqlUq/V/rdJ9Vp6yG1kabZPWvVgnrNLFOpTY4YQ3isf4sfA3Gv0vZ/0gSiuvEdfiWhscrAJTr6Aq6iiP8Qbh3TNWt3BOPYSmCVb41dk8ff0/UYymQZzeR7ezeQfEYsMzsHpBoUIrPR/f9x3uyQgfLNTAG+Yze9DKKk+EzrS3GLSqpwWZAMqme4LIXE/JsHrR2OCsH7ETPmZeIBxYq6YJTf4dC8PEHlZTgaHRF+Fb8kxp7twI6DLW2hsLs3It84tBT7yqhs78jjIKy+IHjCL1fIDnFR9gqNBE7CZrEe7ZE/7qFHtnyrfjInKiJ3LAR+fY/cX+STkunFSwG/MYgTeT3ZToAxwgn7yUFRzo6jtDP6Ev0syMdPWQpuTP6gnR6sKjjCCm490Oy9Ehfm6Cmv+GYPCDCeLl0xjOdTWvxQFrKGmLSEEawFB79zW+O0j8BufInzAm/x7UPWwxwGiKJiMLdJz5CCtlr/V68FRn6+BA8qsF+aYhIBPgWcRKdSHROUUecwknaE91H7roEF0o72R3dR3u+IR/QV2ZRD/XMoq+QD+S26L4JtCq6FGvlbyXvTSDraEkN3R2NfvMNkEThGi4BZ+G32JeAKmT1Ew/fSsPtiPcvoQv41l9Wh+3Ecrb+cO/ZSBEhQBVlIUSCFqbASoY5ZeOJvHEbl6bwhcYMRmniQgwRXYz/NOhNKCwwIndIjOJrWw4d2mJzLgMc+4Jm/9Wzr7rqhaty6SH71ZmCbH3KQppgB/+enjqkXtb3pXjshjujf+68cHZn5+xAJTz0WqZqAzyCQJDsI/ukQqmIwVFFxBjUoHxP92f6CL35PdJGH/mEzCJt79Kb+TXvkRX0YXb5Hr2ZzPyEPsz9r+uBs4ZIRhmxppEM47kWBBlJMk5s2XKC/gDncy6EvuVbTgw8A/wM6YrJ0kywd0uh3d6h2JHJfqxGg6BlA6cl7hCJjaHRJMOmG+BKi8KIDyOAl4nH4S6HPVvudqiaYxK9IpTvEc/eb77Zi4uQ0Vc90aaPMsd5cMN6xmV+NJRmRLrKyTVxE4e2qZ4k0ngIYQZoj5DkhWkGaiMfs0h1AFpirxmkxtdK6utLek+V1LOMmFJS3/udqrlvPznFUCGx8mqzNTBsYlF/R3WLy0gIEVIzbe7agvIJRXki/1K4vqT/CqlRqaO+5DWljvqSvumqZhpheJX2JDmWXLRq2jCk0aFT+fmq9CJXmc2EhEi0AlbrFSX1wLBqEmgqE6MW3AxmIo/OBYEn9yfw6JkxigB5b/6/yDM6E4lIOEcYSSCu69v/43/MhWuLBt+SGhlVUIto6T/lEudqsB+c82wJSLxtMDV8Ql6hdPGj+OkzfedoVmJXJFH5LqKr/uODeY5TeHJsx2Hg/w1c1lAaBpEorANYKCb8KJDPPf3HUd4AQOcg0OEogwYkTLoEK2YxZURfO7sXbQJqB+9ynCIbV3jmJPhSFpeHfAcsRH8BZ7Br4h8VWYKiE/7gqztvO0l/eJpI0nSaAki/U7ACJAVATFOAlj8pHrv29iP0b5/Sx/kve7fSFOEk0EXRJmBHAKv+yvc08EnObqgykljvdCwRkFyrfZU0Eulp+sPJ23b2FmFtWCtDCmH8Gn2cTPuUmI7cTuT+DgSdqm44wzj0d8THUsXG8jDMaTLTlQABTQwKGsez06ZBAZZoI/Jh2gO19yB/2neCP0jv5w8iEqb3w5jNUTVHkFmNIL8aIV3RNeFeRrbE+oRzhTSTUn8M5wPtCN2wawWNABMF77EaqvBNmJWTtB0pPOWDiBfwY8AY56AkD+V2DJ0DjolwR+QkaL+J6WNkJ0B8twt/7VqYoyoUU0gvTp5MvwkGffPnbezcjl1/54UDW68TPnuBLnlhdef2HZs3zp/nD8K3XiGv0KOTJ163Van7dahbHas7EIRfL9ZZIEv4C0hFdGUQAzx94IV3kDLa3tkxf74vGKTfTBY+gw9MnEyKaYiGiCfonzd/4+Yd2ztXv0BuYzwKDH9EXAdwOIOtYL0ka1GYoi1DabvVqGLCJVeBuO7hq8JVVVc9jLA2uo9tBHHddUcLond4wnl5QlnB0esAxmazDcL2hrJH1QMSShtuQgW6M3E+wlGgzogtvjsdsZRvFTrjwD2CGeIpqgU2oL2/o53BO+GYwoYcxFbAcmMJrt/2BFYjxhtFzpJL2s/NRzJJJKrkYulQENC7FUWLghVFBZAMFaHi9urvEKxhhXFuV9IY3YFUkXiMcX8WVG2wb/oCQTwBjxxiGEYvvnv1gXdv6M+64d3uzdKNSyrLqn5/6d5vhK/TXr8G+eWrX9Pm5C25Ubdg3Td7K5SxJdcATfJHgOgmlLhwVs4kwckdEH245NLgU0hjcFZHsIyg+As4dL8vmEZkI/8K30y+uvxymhfdT/Muv1z4H1+h1lrZ1OwPTKA2cpLcuXTUD7tX/J0+/fcVu38YtVT8Iz1y+jQ9QspOn1Z7mlJ4XjXO629ujt76z4MbHi1afc9Df//7Q/esLnp0w0EFjw7SETrGjTb+Uvbrhk0nsum3a70GPAZng2P8sNEqmCyKLgiHa+iIh3EL9gVVOfmeMPx48vtO5Hs8QivyyrA8904MNgEx0BTEHctku7E34cmNQIHSno3weD6+HuVjLDZ/cFVWuB6Jg/pwFtsXRE+IdFA6xHm4atzRmbIiaoz/yjCYkrLBY7+Sw+3KCAYcKiGQ4XZZZSnDZLSqDl3vWipkqwvKQ6p6W6XdYTKqhBEVlVU+n7fS5uFLrVlZ+jvobZvvvXcZySW59kWLFtPPFi1evIgUSGXX0/X3CEYp11qiKrVVItVYWjFCEIwGl73SVic0lFkt+mm+K+8jb967bMKEaM5iYlsMP/QvixcjzEMALO1J4G8HMJQQTzuRe4vuiyiJqhnBBx6KuI+xWbCPgNeBdbxuKJ+scE5eLSICoNbsA5LDU8LJ3u8iAIORFe5RaoFNDSA5HK8UD9KFWwUQujSgV00HuJzP8HmJAjEU9s0LJHSVUbSVwZgQW3zrJnJtqm4EEr3fIbDQ7ty/k15JPBkz5s+gc5EQ7O9AEhCwKf4BnVEUBupx5qWXziwZNow+HCMihzJo6oF1jH3OiMnbbEAZckhFQLOQR1aUziY/bGInQ1SDh6xGkRGKFfs7iAcVVcdR7oc4JX7gTeg3PKdHcqCnAxVfkciaFhQ3AsWDwkcuTpuzeZQUvIVMIDL7+kEC3SGc3EmEFy+GeTt48Ys0Sr+g0RcvvvhFIggnlZKdMOZNO+OlAI7gaY7ZEgz2M1npXXxcZTVrB/5hM5FsxVlktA/w7h7xmNQIuDQPRwWaUxVUcJ4fKXW3yyZoAcQh8LHL3iqDXpZKgOslr7+/dp3Xt2rGotWraHT91hU+75wlu+79k7dq+T5gp78LL3h604TmXE36rssemzQ5GiU2q238lNF/vu+CEoR0hLwDa1oF30Vex068si3oJfagTXz9Q3qyJxSdHTpKsj4M8Q+I6/o7YBF24vrqYvugkfVQxzgOO+pTXSgZ0KNGif+1fJihkzCC+IPnzIp6RaQFpNPZGSafg2/nsLlDua0PYMlibjmTW8kmQOQyUDYGm+C3+4MMr/tRUG5XELsJ8TwbQLxMJwb2KAws3FfuGZjCPP4MsJsut8HoHZgGeMaEfWgddWVhWUomT/KwwRse81anGTRJGWl1drNRm23ILc0yGLJMKamSnJJcvoDsxKeudDobJgULc3V6Q42nIj/fm2XSG4pzLdm5VU1TiktysisLs01XKgNAuhZ7nUmZxfRfkXD08dGqCp8ux2TKs8EhCSkppoAuOSk5JSs9PUObWhmueTVMPy7LzimsyxTlsvysESkpZmt6ulpOHW+02WoLs7IkXpOX1xQGGOwgXdInMG96RkEMKhF4/peKhYEy4dn6kptDhievu37ZizeP1RpfveGK6dME52DhTVD4Chbyey+Z6LelXU4yR73q3f02jW7d/9GE8VdeMjFgPbuQ+xV4epbWBHc7ExR3Kql4TJGyxY//pg5YuMdVzYruBdP/L3VIe4Ak6UQ8GUvPrkP8RR06BaKTmMTTFpMnIvGLZC9qAODoQZ0BTjlyL4qmFCE5I7Lj8rgMzsK5uBpuFPDQrdwclIYAxgy6lHXNSJOgX1IWLFAlAeIV7II36NVph6xdzNhl/8DyFu2wQ6AiMV5SQpiYSqpw2HNc9kkXzBwxvKBgW2frWGuxy3FeaXlFZf8TS44vO7645usjHy+srrbkDa/Ky6sObJwyo8mcb86rp9OeCJg06WoN2bKgscBqzQ8toWlo2RVGVk06mKzWTnU7nWOaLrrl7pzpSRr1sED70rq6KFOZ7CVPR/eVeVrq7PYUlcbu9E5yOE7v1WWWlOn1i3YPL/XlZG8zmcq8WVnRF4DFsoaRA0P6KGYHI7JRNzDaUNY5ZW0R0bpFHbMqMjkFUxEJCmJQy7du/JxeuxEQXNdGeu3n/W/wrX37N5K1n2+k7arujZ+TtRulPXhnI84CXvefYeJd9lrsQQ4wWJwWTsThuQPYNi47bYitAkYLo2x96HHueza/wNaLco1SZ2kPylAj5FTCX9dZxcD4poRxieMFauIAO6YoHHBk4AcYVljAiNUAM7cOlPYoKdJpp5B/ARrbyOUgRkDqgPEYWr1FqAoJfi3bUpFtS5fdEskevuCeyH0LRuTA7jwW/cPOO3dv4+ujz9av3TC7ZtgFl6+tj6KAQTUwRwP7SwedTPxl+HDIsScSbxK2iZwS/8bwTRJKkRBP6Wxum04sOUQXwAY8uJzcX0JfvgU4YRQFee4gJwbtOmCORMAVdrT50TBtZVx7o1jEmaAomGATRwR7Mur7cgn8qY4SCXhr9auMERM6a4vuCPRNCd4Zp51x5MLhwy9FUDESRh1GOIzbmzF0fQa0imr4+z9CMcsoYRwTRKQAm52CqaIDTWxnOuD+0oR2xkR0zl9I89BKSGC6Gq92aCP5q+8cpNLvDAJN1H8clsBg22qK8U5xMTaquKamWGnk36NXMVXGqbhdntQNa8DNbBTMRC8TqaCcd9UTX5AgGkVTyHKCMIgwW9Mq8ZaV9fXRpXVP1F0MGf7Wulkz6ynPbzabj5pLis3RTZiZIYkX183qmVUXXVpfv5Jl6/ld9fV9EXhwuuWoGZ6zTIcHcVy0jM5oZLqpX99fI2P2MAzEahmoje8mlBbLsbx4Vvqf7kmNSGYjbEaqrD8rLJwMh9E6B1IgugfO5yqT1eFwryMcRq1+mBm7nGKZyMDpXGVoH8vwx0qGmRWAnMYm2YagGxggG3BAWj3Aa+wocKEM1AsnDy0Mj7KtmAJ7feeNI8Y/uBcI1c8ffHBc6GZ6I986faVlZHiBuL+t7d2Xrgkt8EYiC6++/QBJvvPOu3bT08/etnlZJBIMh67+3XvL25BGDyfgMJQaIQywcAUKPhRRC2b3o7mtMwE12mMprOl2RI/hCNLiEeFkfwcCGaasAVRnpT1SYzis6PPup/fHwY6ygRjfomZaj7Zf+z7awBEvft+e+H3vgIEF4BkEd8wOKYI6dmQ+ENxBMW4BRNph9q1faQDS4QN4PB3WWD2zpHHYC1QSMAVGlbfKQew47sE4Pi2Q3QlEJWBjISaKYCUF0p6D9NChAS5h5yEygo7enWUcUa/X5+V5W9sbr7px3dgx5tzpwYz0m3J93vK83NzcuUIx6SAjXxxkPF4kK0qqi91VJXk5DqdBN+yK8TU180aUltYXmox2+nZOeVVVTk5FeXZuTGbA75f+JJq4Jm4Sdx43G2hkWFPQZoNC1Npj6N5vN9nddtketPuBXDB5Y7RBOvEqQrEqk+xyK2QGLDpg0onsdePSc0tOgzc+BFCNQXTbDQqxIZUVFtgKR7deNbpWMyczOGzBR9tnL679qmbJ7NlXzV524dNPrQoFc9VXqk2OUOOs2c1IaTimVdg1xEk/1thL+05kLjbwyaoUPo08vdadnWexjKQXPc7/TnhpSZ01X5BlOXV6zuSR7dbyKWWlvb0PPdQbPnOmt8gx0WfXhCrG2J2uqakpybWekeGJxdVkXKBeLEgpSqqtfUBI15UX6zLpaUIIv8+UVVWGY6XwpYqeIg+gSwEX4IZxdQxvoxW4JLsbeMUIXHArNuC8F1VrThI0yTHbb1O6YvodFDWAmnQaIjIj8NKGDx+O24A37xmeX4Y24L2tKDuOMON0ZgV0vHH8dYoJ+PXfjroNDcAbhDMoLkDCEoXkglX6B7MIL8sfviduEN788NEGz+2bEE4p9kSMfoy+Merb6xVj8OvGN97OHp2s1AEboAs+Gusz6WL4OBXoJdTOlEGvQ9xohKIBrY93Oayw4A0ZcZm/6iyJoiZmKzxQEE8HVDjrVMe7B5VW/L8ZYqKPKkj0AuVqApmKth9j2JXqW6VQUUuQrj+T7AfiSrEH6F+FD1n5dkVhwP5oBnkjug9FTDM+Siw+EReZxm0bGDzRIiduB1orBJx6IKhNI2U8kk2eaT0fH6crp333l5/fiYjHeh0oWMkjZjOf23/cri7IVyswoYvxuzGenjATCeVQ7Lrih9QYYRKxSOz7fKu0h+noRcTpWlgaWBZBelf4mtzEJg5V/fBsFyEM1yGtj/pCHhVzFhEAfiAYEoMoA+BVVmMGGgeproeB/e6+bZeo3PpCszPjarP56gynuVDvVl2y7b7oiyTvrbfoV2/J6vvodw/sODNfsGU6zcWGJ+bNe8JQbHZm2oT5Z3Y8QPQX4VNvkbwBuYV0lEsB7hCtL3UJ+sG48oo4taJT1DpFnahfXTfuxsM3jqsLMt6djCBjaVZ0NzMtefRx/gm+xbZ69JIbb1wyerWNXMo4eLru6v6Ot99GGcL2qGuQv0H8jrAe5UElsBKRm2daBCZBhhbYfC4sIpDa0cLArnUMUEbEX1Amwr2uCBA6kb4paN5Fulb3/xgWrJBOQxvQsHDL3tWoz+xa+PC6lSvXPbwwpm3uoT2oOFF1r2mZthp2CJJknmmr10RnYjaMb8OdaF/E5m9s9NtoSlwGDmsqmWnL0GbMxSwk7AY7EmN+ZicWl4UAhaZFfQWak2APTgHlHOndGomI+r4pwlFm/RTu2x/G1vRn8QchK+3p2x+JKIoXwJ2kixlYRaugP4jLgC5JYVlFbo37uJHZ5Flh1cTEwoyOheVG5LMExYK1toimFNXWu8mpIv4mxtfUFvUfZ64d1qJa8RkU/RfXIAaHgUGzDLwV3QdnZmNATsltwBvEuNuhlQOrRXAk0W9H8dlRxJMHFes8tldJMw3BuIdQBhfD9enMk+esupzQ9rY1Lb3f4ZuivmVN3360PVYsfvuz4HwAQZ6iJ4pIR2ENOZmVgAKXgk7JHvNmcbqYvQpyMW7RqJfFgPgIEwxq6PjzOiHXsfkCckCDAkXI0fEaDTlwnmBl1wX2Ewsgs+CEvYC9ApkmKFJkiG9wb7K1m898CVDPYyPKtwC5mvDTJEYKBA1GQUuMivQ96MaWEFntLerNJXsNsDPErtIRQGIvqm0NZeeJRdvpb7GUPFBYkZVLX5LuvXCCtvdz/j6nGxXsWn1DlYa/0jM+1JqkSdb2jlCdH31GuSWPNSdRQdHNKbwpwhKE7ZwzcTcj1Q54LTBYEAf0ZwN8WU1KA7D+Grx0ga8xFDYdTVu9d7W/lB6VTAzM9l2vsBydijJZ9U7uBQGcotp5WdGVrqbq2wuc01avnhY4Pzf6vXiMAejob1jyo2KzhmtYA+vgDaY3xwk1ppEELYBCVcVoKyBDtLZAcOA3rjuIox3RhU5wA7/BhEf9gSC8izqG+G/8C9JMu2nJeruhwJHvLCwuPv/CkqJCp81WYMzSkpRk6iVJGqG40lvXMHzM6FtvHT1meEOdt5IeYH5N0WJ49/IC5V1HxayLKhz4bn52Tjq8S96lP/Fy7OXGibfeOrGRvSxu860fbfLlOwoM2Rk6Wa/TZGZkG20FNkchz1uKiSdDFar0FpbkWlKt1lRLbkmhtzJ6gDldPeK7fHRW7M2MJJ0uKQPfzHcU2fFN2sOnxV7NzbBaM3LZq2yvKfg+BfUMABjSVHIm4EMCjC+qLVSyDbjDlJlX33HFtSEjmU+a0NQv0usQnqT/eIgeUXUDQCjh01wNbeNJKqkwkCqAUfdGD6uaK27DPbiMaOVF0iF0TASKCVZ6EpFUdqvT6LUyhRmQhmWkHuYGtaBBo8oU2xmBoCQH5EUT2sjM7lP0kVfpYRqtKOR+jqx90eG2lFf+5qEpMye0Vl1Hrv086aPb7m3btLxk7XIps31SuvUm+jH95+GOB8W7+B0Xy6k5b3WqSgTvfXPC0x9+O7nUfetHl+U0dI5OZnpDcl1MH5KPUmoEMrI+01TFIA2DO35tLAc4dv8TG8i3n/NJAq+Z2dExM3rcwodY5hVZvWFW/2WS8AH9WSIdT2xwk/INT3S8N0uxXVDw5/fAt+QiRnDafEmE8xC7tiqF5BDR5uM5B1yoTMZMcQB7GcUe4lv1PvTlPjrv4yPkOhL6/qroceLbR7+m64/uIhnLl10S/Vvrxo3dGzsiR8lt5Dxif+cSeuTKb+kbdMP7fyRXEtOD9Ej7kiX0nzdePmvmhg0zZ10e058ruNWRaCmr9QKtz1y/XMzSGqj2Ad8Km7jT6fU66ZLD+d9Xjb5ixLodD3/wQZR3+gAMeJ297Q4f3/bjHbW1f9I8dNvTP0Zv9jnELqdXsb3jIuKt8C099lvr1dnYN7Sxb2i9wiTi/B8nPVHbcutFHQ+98dNPEf4Tkndg1Cju5+Q/PHOEfoXjB7hFkRFpmGeEIi+FHc8N6LFpj3isvyNCUwQ1c2pChq4/C1FlhwKxT3MS0cBcvy49CxgxD3jpam4s14qr0iJ4q0I80wZIomQhVSHiRv0X5r3xC0EXYA+YdMzjiEAGEYlbcOFqlZxVRllAi2y3LgCgIyDYZdFRMb6oqrXClJpxycimdtqSWnDepecVpKbNvXSusAQuqocpVxeN2+gMHbjm/VeGbdJubJ6wMfrk8uHt/pHDl6Yvr9jTXeRKFiq7H6xcnr50+Ej/xSNXpKa7pMzCC2ZPKB+7bF3F2AsuuD+4ddGircH6SZPqB3J9zeSJTU/P/+Q52uJvahIqbuqhV+cPKyMrdj8nJWuf201vKhuWT9Z/dGNmusTWxETugLxWWs5szU0EPcw0KNYhzG/R6TBZNCbpm+30wR3TA/OoN/pP8zTLOrNZNe6vtJvs/im7yu3N8+mCyTWC2LqDPrqj5cpF0RW02Gxej67Bx28QNl6UlGsqMVbrRqZOEADu3EaqpZulx7hiroZp7NMEAMshVRCJcJOF8AiPVWU4KyFZx+B1HOabjMIsPZ/lyEs2u0zN4y9onpLtvmDB7HxbRulFT16ymkZ/+rTbazZkeMbMWrzysoufsMy9oGWuQFJy5l84fY7MS3fLlqKKoL/apM2qmjhmZJoxI2PSyLHHaLT/5JjxjVmzH1s1YtcNu675TbilODW6uCklZezMhQX5w63maXMmZig6QrKT0VYoieBITLaks6GhiI10KUwVMHJoTIkGj0DY9U1+E+VFNAWpSEV+T0pYHakAd21cOXCWI5kd3BAuiyg0AyxxcSBHAo4GkkZ4xaF1sNx5jtzZzNZBhRWiKUpKXnOS0V1dltm/czZ0N4SoUSnmW4empORTknU/KWIs10f305NCO5MS1tTcHUvpUeeTo0Y1vkzvdDY0hJ6aHysuPitV5JmK7WYm89NF3bOXmZSjS2UV0kYWYkDJjQ/lrkiYlBAggAgACyiT9oTPvBTecmLr0osuWrr1xJa+KZFFfEe3cLK7g19Ee8JA6Pfth00Pt4qL4bFIZM/Wbnow0tG9dU+E7D2/MxLp5EQS4KZId8haZn/phDZUMn/xfGDbG2DllxPZLZMCBQ/hOLoL4oSiKLt1QS8xBQW3nRwKBN7ccOLEhjcDgUjHia83kgUPffPt3ge/+eahjiefPP1UNxGuOBzd1tv39sYP+7b1iu+c+LoDHn2z4+sTHW8GA5Fo0jcPwcMP7v02/ORGRkOuPF4eff4Yb/jcG/3dMQ7WVqK+OAmutQBF45JOF0AwD/qG6mI25GKQJU430Mcmt8yMxoqgRFTuCUG3aNKmE1tEEb0BQ2HZRXvQCQcy5NSuXb27iCcSbZIamWwsi6aoNqHb5q5dZA67p5jL49G7S5FRQ9pDPLt2Ve1CBgXvMAHmrl20fRf8EE/vLkVuFvODitufGs7yzsDJt1qIaLAx3Ef8CRSpQTw2QNi3KHat0SbG+ZCswAhIRgRgfyWyFjj7bO6hoO/xj7MW1CGdWbcg62PGSwMOGM58+3DvMj7Sq4UxAkZMK64fulFhKBRBTGsE9zHuZy6xDkmpQ3k3pspHaSYqJVD8ElE99Sa+pICBSBwwKDiY6T0amXc7MxAxQUPQpf3MS/xBmIawqO/PEvUR5OYGbbzQDrOWm8RkjwqQQNmj1REgDneAc6bxRpNUpkIYCb8WlcyLgTLRHRKIRZUmpJMyFYDQtp1x77edO+Peb/0j6ZZHxpPrCWcryyz22Zsq/a4KfWtZ1dOhsfOumVScQiTazudW1o+orUxO0rpGCJvzyy0ZskpMV6tlQ6i2ujTJLVSyunYOqb/XfegHUp0c3LH7dq9odBVbRO2oqa3V+lRtuW/cqCp69LGZW6Y3FNkKTcXesXXkrYoFMy8cPdU7Ijcry3teXXVjwbVD/Xtscapl0C89Zras5O0FZQSWk4bnC/m/MmuTAQlQyYbD69cfFt5mbmdqKFCc2RPc04v46esP/3R4fd8UlIix767k3pZFWQQ4UcXwVCbSrw4UdQYZogoJZYD3ZRMRTCHiUDHGzm/PJcQZdIkzbnjvQuPNp+lxeuiG616v2lNwz6qLfzr2u0szx971GaTDDlKt++nxZ4iNDKfHzCoybx4ppyE+Veoef5r+hf6efvbubOP4MV9tX7zutbph2jF3w1uHLoX04nn0HX70BVC9qX+fuViVIpDPaT59uYeXAcZqYG29DPQS+mrUceNxvJBwyQTk6rWh2BYuZdEWUtUCW2wisBGrAkFdgBG57GY6j08AiiHKQ2hn3UUPWUpUu593qIfZeNVoWVdLn80rlcnrsDAknT439UNDVXr0vsqJkrMwqN4nFubS37lz6VaTJylpDB2TXai6J1Wr+pCO5zU52Y70r/UFhnRBPFbu7M/mjz/lKDhsGlVg2apKK8gxVmX3bZ7gcQvNdtdN6S5zetqOXFN0fsOFwnJ222A2J3OJPvIq4F5wF2lI3AFe1YwgLNqkeoXJURB0IYiKSUyYb0/M7jYTqMAZ3IVoswp7ioM9xfEGPTrGeqscnPOcjrCq/+QGK4YEH3ODlTOJi9P6gjAd7P1M+fA99BTdQZfR7fTU3cwX9oG3yaUkpe9j+ujqrAxj1g0XOg3ryfV/fYwEL69ZrlFnJdlVwdF2O/0gqwiu4ImuOe7L3O4sY0bWhZuEtJRko6xZ+o+3/t33yhf0+7FkCvkH4a++bn1b3sOCmezCuu9h33z7Aeb8ejdJcQo3qYVqP0kmL/zp8nbNjJZMd055Ro00d9eI3gsvFEYRtUrFh2pJiiQIpC5E1PTRMqvlgskbm14++T/0osv4W6LNK8gBIr32QP9icm90dKltGvm7YoMZ95uecS4fA9TH/FdlaITmH+LlyWxvMCermS8CZfQHOov+6hU6c7Jr0sWuUfYH5E8xPVpcW1tMiosxEMmvXwEWUXJKKeAXZc2EmVzKxOUA3TqZm6V4pcqCTfCiDCHRa8GuE882fvVDt5C2AbgBnAJGIIFtB9yEK8Q3AL3hDpGg7HJ7YWG5VM23ls3KOZ9+/v3D40kueqgquI02vBUmr2IuhvEEN331MvrqFZoR/sZrrKKYTELPtUw72EBUkiTwtm3DvcM1/9Oc/UHOeJUg6t35JC3aFEGvV6UOYN6dLyciT5rS9vHHbSO2Vec4cnLGGodXVQ1Pc7tsycnOnOptw18evaFjlMAjPrqB65Ib5Ma4PYuGGCWZiDouGDCiLxPvJmKETCoizn5XtGWn8HCFfTP9ODrlWv4Rms53d0Yny3r6lGedq9+xk+8WHqt0quim6MRr+ef7t/PPwG38xlPcSjlfjACWNaPuk2PyM+Qc04miYUi85Kyczs1Mc+VMfune1Xljw56ZBkMe/+5gnl7Nl5HXz+9spldRD72qufN8MbJ6mq9CnySKFT4kEwbyfbmkiajLPqM/kIzPyuhppGPQ1uCYeGxA1p9oSXQMrf2VA7D2oPWPwm8rNK9OoXbjywRyEso0pcZI73cobkShLsNIzWi90d2h6u7o7t2KKotBnyctjAXTMgytRRdHgkbgTVlgHKwQU6jwx5g/nSeSUCda8KPjXN9+OCfoRGD/mjkv4jqVV59E0nggG2TeDxxyUAfYwA80hNZmEfKJcDKl9KY7TrRP7Ljllg63S5M/98JNK1ZOqmz/8oGrbAXkFIPV+lG/vfWWPJqS17H1iuJiWa3OHeUvOU4vpX8/cf1cnU6VHprQeeuf/0VGPIUeNP2nVJmTFr3QrkovLW3IizYpVcV0r6ekPecee7SbGtC0nDX2CX06V4/+Yx/+t9ay+s+QM+JH4kfYJg0/4BAmfkTvJvO307vpPTvIPHYi88XxcH339vj1vB30HjJP4QUVWb0A1HElQE/Uy86LxQqICSkbgBX0MxY4ZrIIv/mJEs0qRue72U3zgPk0Kl4xuheqbRUnCbsY09cznb0aTWr6ntelpSWlqkRRInJySoHda87NSdcmJfGE53kVoK/k1JR0na5C+ImmRE9cV+/355n1OeYid8GIoK9qWEVVIC/Dwaeq860+f42wJW7Agt6bqm5am5yakZmTnGrI4iVSWloC2DslU5+VlZvp1CSnWYRMHRCDao0LVQ7TWq02ny+4UVRLSbIsS5KoSZKFJBW/Mejz22zvM5uICAuFApTzIH+E4+aPjdtCbimTNf0fxi5uw/B/GT8yZAz7zf/tGJYpw0OfGDKO1d6zx5E/FI8MgMbLwOkCN/LRfzeURGKD9Nv/PJjL2UNo+aMM6OD+L+Kmw+pzu+ISci9zqUGN98AvMxaI/RJmBBQXoMfvYJgkZehMstYU1LqDUAv/iQB0hdFosVX56hc3jTIaUwWSJKemGjLN2cXu8rKi4uzsLGNKmqwRbqkyy3WWlcEZK9sXLrzk/DZPe0lDbtnwGeVPT35o5KL5TQ9+MHWuuE4X9FdXVDncBlNt3fQZs3VJLpujACY6x6jTGcx5LofTnWeL3jfjyjMqDa8Fiio9JSVFrVPnJOmSz2yZuspvznnoatrT1kY8Vz/kq2fjcAD41VyAtTaEg5xVlWnQI9BII9DPmIeiz+UuU/l9mTpYAUie4AEQGcgWYTKpIsKtxbV1BkO2XSFI7Nnq3NF+z652vtVakh0sj5T5skusctutlN7u61wVNltsy4qUiFlFy2zJ7lXLrvHdTvje8KxZ/rqygL+8LoFn3MOpmccWcxomshqZlbDCfLermplpwEFgIRUfcmY7vo7ZQCrwSVzHbIzwefEYsrnsaW4IrIT6nXYtgjKZDKkxguJ+Zr4f85cjA3psVj+8kVCpEhIoHHPDHtp+GDeEk24ypEqhk1k/NAGNEqt/aPvhjYRKER+TU+zxX7Qf8Cx6VAfJkCqHDtYv2w9vJFSaMFQJcnzmO2E6p+duTNekQzHAOTx3+fKYY+U5vXbp6+ym4g0S83nEmAmD/gIDFqGxiAHxA/3omf/2wBljCyTE/kHPoPHA41yiRKsg0Og0DPxThiGAQiQmR0ghVgeXmZGE10P6JRbI6CAkM6mMqARBghyRkQrw+sqAXXSnIe9jCwBx8GtRd/hb6CZ678+7dnE/k7lkM5nLQf7naBU5n9R+tWXLV/QPdC/9A+b43dPGrrkzuGDzo/T29Y8++s/HHiXl3hHzy828cIXRWen3VzqTP+3paVo5BuClgOB1elJeTfPkkYZfjTbk3fUzvfcX369K/CqpZS1xlua9tDE8y3jPkvWPhh/756OPrr/8UZpcqztvwex8S/PG6SMc2WqBtHzwgcpVO2Hq1LFBbcaiPQsnFOhJzG49tgZNMO7lLPqeTYmo52KKD0azsqh64oCXni+g+0W+hCmFGUxBSSiUi6OjTajKvUfTGgqHWjX3wEV/SoLwYntC+LAfFe38itizK+CCeU+YDViFwYwuFTFZcE9CGr/NrGRQVvuuvFieCdx1DleGdk+cqyAW4DJIAqbEC5+OoCoGo1SxUIcoLpWJD6PlpaG5CvQ8oGps7fBE3/J4yjaU8AHP956NJQNXJQ3kfk/rxhI65ylPR6sHbsO575GCykqtNt0zYeIwa2isRFvx9Q6Ph+D7qzxwVbLR4+GL4f2N0W10Dr5E7n8KKvLwfg9+rad0Vbg1Jyd/wZ8C5688D/bF3UBHV0lfcFO487n53KXcldx27nbULetR26FPk+Qy0a90gvkOopQHGDPFZiAeFTGWKhOlPIDzCjkSD39njEcLI5LBQrD7QaAfYEJFHxPAyJJiziDGFY1wbfJiHp6BvPRJa/eZ1gJdTrmr3l6nSZ7om1BWUNB6prt1UdtWdWbnIv9NTi1ybRheDQ7Mah23Vy7qzFRvrVhi7r/ZFcKZJZuU6T2g4/N0YV0er0tPD6cTjS49g/ZkpOvMBuIxmOn9eDYbaA+c14cxiyfhbfygb8Rl05pLK412SV3hmHr+Ta0+bNrIhue+LPdf9XVLXo20Zs+aKnynSjnDpVSf3fL1Vf7yL5/LG55JLqsrLGKQT1HzU22OLjdXZzAm95oAHWuBO/laYVFiId9iNiDI79RyI5mcFsUChoBXG4tIaVZkf/VEssfDWMbSArchJglUNI1xkZBgjTx32QUrMAxUC659b2WsQZVeDNjW3RHhy2PxdQBXrHp+5kzagyY4hKbiVvokkznIRpRz5ieKbCHc0Y2YSDFYYD5IcVl3EmcACFDJzWKWC74BR1HnYJZZtsQMW9CuJfEKvUtj/SiA1ttjvWWvmix8VQgFUxxLhCDcRFjt11rQMUfoDBfW4YBD85QMbUf1Cx6kazB36F6AAuqCjAI1pPceumuP9fbOjs7brQ/cHRU3XXurs2nh2GLzi/R3tJP+7kXniI2z7LdLey5sK7zM42yoK4xnoofJHLQaovcz26HBfP2K5/w/ITghJYTQDzH3k/+5FSuf9CU1ulzDk7xP0snuUJKucoS/lPaseG758udWEE/NuInZSSFOzXwNjjFfaRuM4nBuFDeOm8hNxbFkQEXFAss4Ey8Um31lCHHDOc+6JkGD7IRDjKXCcofXl5kpZ9WVuWY+PZNvHXIZfRnmmU12EWrCBvLo6obuEdF9SirudC+bOyM7J6lg3nlt7vkTJsw/67rvZ7SfSrSliuX5KzFiErPyVlLkc18B/JEmGzg9l8cVolwljS8oAzoJDp0RAY0OEC/yJW5JAJjiZjpn2agaT16rOHjk8JGDFeSVYZ/t+umN+d7Vi377Eg3MHjPtjd0Lt86+qXfi/Im9N806r+E2sbj/rbnbGhu3zRWqZi9TEcf2Q1MWWegXZTTz4YyLDkyLfhqe2T1zoWHV1Li/fUS6B+aCSQWAC8D4x3YiAQmMLJZJwuDSkqzTov1viLCQqUTW6phEK+AOSJrzJloba9+cSU8vpf+e8UF9o3XSeU0TeI3+nuWWmjcXPaPTj+0+1T1Wr3tm0fsNjhX36zX8OPGisn2vnD9tsZqmkn+lLJl1/iv7SguEUO2VP4VmuulVfCDvZGfnV9u2fdXZeTIv+ntyhW1e/ZnNtQ18QnyVVIynwLFoIUAyhQQgUGWdU3DHou3cvO/Lt5/xB868pB/z7kHhNL2erC75Iqv/prI3bGQ13VfIr+W3y+rFN93k9aFWUd/0WGfvY8RBspybyZM+WnNRPj1Jvywht9F53FlxdtJ/GWfnP8XY+U/BdTB2l9ApNaqaGUWIdqVdLIhecwRxdDf3CbNjLeNquNHcBTHv9zQe9SB+nwNAiRexmORCiSoqWW2y3RjzIYBd4zYGmNk2zqGYENWL4TF3mQS4CkXeRuGu1tF1Kx5dsunIb4jquTRfSr1JnSfd+vLFv11AXlvYNU1fcoXfNvmt1kXp6V2teL5BNYWF/+q//7HdoirVlOky+FKqq696/VGhKdS5ILRqdrBhw+Qr/kDqh5eUEOGVbbPumReeZW6Yes2C4ipn3ow3hLtXXXq/wN9x6aq9w5U4YtGa3yw3Zmfk5unMaQ51Jr99bng7G/cpZKx8hbSV0zJ7yypVpgkjxCqxYt0Bh66gjHfbiTHTZFeixZokldD/OCl9JeswmvufLPjxrmUvhB6dT7SXbv7+wIZMAGm1f6sZKKY/SFvvpv/Yh6aPt7w2t+XV9k29L82+99NNpGsk/WlkrAj2bhXxSndL951LJirEZKIrSHoBsfT/JdpzGX/abV76ffSDi/liuoIvWx79QNpIf7DPz+//7DK+jO8rtAj0jej7F/P+qI+vaIseVmwLgYtpYz65Spw7AG7MSsmnIcxSBda2C7hwo4lcJZYePNj7x4NCC3+/IUVvGJMdfT36RvYYgz7FIDU+03/gmWeE8c/07+GLtMNsFllPN5HNQMPYhmkTv5PO4g+fbSyKUAC6xyABxmMGfh94MwUcaEhAbmsN9V6DIF9cH2q9Kl1MTaLLyJYcvcaloROOfkgnQEafQ7bQZUmpYnphkG/nLwnyLqET3+nvgLPwbro9K4luo8sshmReTVa/+iq9Xs0nAzG1i1yWlGVPLyynanK6nO33FbJGngNttSltlRFRQluDMCawB8t4QJb5ROQgMRllzZqWvsko7FU9NW31zuie6GI5RZOssaUk82vIl3kpjmybcKmw4LypNmq3PXF+/93nT7GRT22PC039F5B3xHRzekYy+npf7khPTjWhz/4AX2hkNvMeJjc4W0Ork2RniBDR5dZZSNwKWHQaTUIZEYVAUASgec64XuNvmVdKr/cfUuno9aXzbtlwiKqYVqv/WbKaXQsL4Amy2n/oXFynalL8rTdiT0X3MS3Yq7Fq/xWr5WweNxfxzy+jUzngEvoFFwSjQ5Fk4tUDhDhnqCrsgP6+++h3zCb9PtKepuHJK/SDefOI6tyhq+T7iD7xJdKeJPI9pAHVmySDL2ay4DhtgLvM+MtojyzKiI2guf4grv06uo+5AA2Nb9E3JRZyM0WxU1B4t/9c75CA5qrV/VnMlvnsSCUKiGb1DoypeVB7rdSL2i8l7gLqwoZ+JRZRg6YgzZEFpAdaZ9eK9X1TmDM8fo+FbVFCLESUAPyKYxXGPhiwtQHcEPeWOlfcZAyrb2LxfhTEwshjmsJMslV3I94Lo/wRQzwCFtpz9v9eiBEuZECGrY5Z9KAtlNQY6duPzyL+6u+gPahVj8Wkiz8vxiXnKgAg6PmM8pl9KPZhJuixmIftzOGFb0XLc+Yfg/EKB2JZlDEuG4WP6AQHtJ6WudxgkK1gAP2WBq7jXs/isaixY8nSuvr6uqWLN5aY86fkW/BktuBpYaHFYsmX1XWhxYtPL15SVx99rBAD7BepuoE9MecXwtRbMBX1lrxiyA6BAQXcRdwKbj235Zy7J5AZhwsG1lhUrmcgukZiSUFPAWaErQugtVsaMQYDFmYNZ2C6LjkzyG4EHMQbsBB2Ax3LOBYOFtXR3ioxIW8URpOmuO0WPUg/YrutCn4Nb65d+yb9lr5Hv31z7eVFgSXk8Wt79y9fvr/32vf2TbrRr193weZPc8yXbixd5F7CJ6dWP5qZqs0EBKySkgHGD7uybKE7LAjJqcXXziEauljKyU0TUpPJwlreVbZ2erBJW5C+oq6FLzeuwwt7eltdS5Dt+sF2FLG29V6y9k1iGGzS7X95sb56qZgDTaH/gCZdomqur5ne3fGbx4rzyV/S0lXpWt6SR4hKayoLlAjkX7Oh/N3M1AxVcvqKDfQjojYVj6zgCa3cfOP79KbDW1smPNQ485slSrqZxSs62+9YibMSC1psOytFGT8CCqmRshCGsJqPY1ARdEVWfPMHz8D5hRnu3HNO/++BuDDxVHfW9+J+3hj5EO0WcC/K6r794f7jsho2UTsGEcPo6hF0q5T2DIQ5SRmIJKy0pScc+4nFMfIwfB6XJcIXdLFYpuhFHlaijmDX8FU0lsAX1UDTzpbflV/nsrkipmMZxtUzbgx9f0MEVyb7bzIEZT+K4MckkyBTHZThf5iRVIqJbkCU8X84DD1Ue7dV3bR8bbMpPV3aZjb3L7VMM/f/ZDYLt5mnzaoh39dkaQQpWVWxcFxp+XJSXFMzvaYm+sEYfuPo/p9G8x1j+n9i+X+PiefHyA9vk9LTTc1rl99Utc0MtS2B2pLM0yzCrWZaQ7U1E5aXl45bWKFKlgRNIdY3vWb46OhVY8j3Y6Kdo8n3A3l2vmqMYu8FwwN0fQrjgAY0rci06znZ4B0U3qH1NBc3HMQHlLyqe/Xe1Wtapl8G0/TlRxE0iWSOM0WRo/QL5Ma/fXDvN5hiVKBpq9dORfC7duqn9GnHB4p47gMHmfQpvoHRFZnLDbRrOrFIHdI7MKNuph1XHLF8jgaiYvYpFbpMWUIGuULm3czKwCE8osQx5Mn4Bx/kbz7efnHtBR7t5FktublznyrVql0lWi1tlN5p7TjvvA7aYXaJquTh5tEGPX0vGtXKi+68q7r6ZfpIRtqD0e9mzJjAxWxZFVkNysVxjdSzeBTc2fx4PPqYQk0a4qqURLoS9kP8vyg44p4bRmswjVhdqu5BHvzHmMs9BpicP4r+NGo+i/Pfgugr3LuVb2ViJDJOibL/5q3km1szvqDvfIGScoZUe+BMZiie+G78HwC2UfPnj7Ip/xlgDf8IYqAfBz0Haw2TJzdjoCcV7OU0+ffyAS6LaYfqOE6Hku8Q4UIwxFw6KVOL5/jXM2f/5xmd8a2L281hknri2w0ZFpp14mtVelXpqEBTcan4Pf3Ds6Q2+zynK7P/01ah7bLKr+bQa9aXrJtZsr6W/yF2K4f+Qbwi8/Rlq6CW9H/236vR0hte+r2gNmc5sy0p6uX0DwfgyUyX87w/rOi/ZWpl4/qSmes868i6OX+nj5PaHLjTmk1fg/lLicUDRFsoKzc+JhndxN3I3cbdw+3jnsJQxH6FqTAI0PQQARKWBJBtVMkSxupyCEYT/vMjCahrWHc6E3CVaBCVhlrWfCIrBW4UCIiBoK6MEB0qFpF/EHR6E2oM0ZauFmEiE6DatV5ZRL7TildOk6TUI6A1lp1ZU8k+rMepOCUH9Ygvg4BNc4neaIIH5MMLJ+0y542ZvLDXsmDSruoxkxYJrxTYr1+0m35YjemdxBO5ulGVVapJSteka6rHqwvT1GnD7K1ykqiSgLi9HQrktGq7oBvTTXdm+1VjS8lvj1TqVXJavu2mB3hSV1dZRCYcyVw2kpx5aRps76V55LGlGLSPj666OZmkZuqqJ11VpJHUmlpnulo32frohReTBx5LybPvn9eyUpZ9Aq1qu5iQutpy8QA9QfLGTpq0K4/QE3wOMeWN2X1LHsnvv6Xtzb3O4I47297a6wju4FdXbOA12Vl5DaHi3HELyW3JQp4qPdUhSJoUQa1+4DVyp1JC5EDe6XEBmjL2DXo9kYPDkrLPn3XhBlJBD6l4Q6aFPjChcSogi0J0ZCQVU25bdTtCFlXK3/1CFuHJHd+RLQJJTxOJ+cvm0bS49ImfQmZrXuu6T+bvLSchfY5OS3eRGvoBEQgGyuJ+R6yyTnqMRc0KAMeb6XahFAgXiSxlmoyccPIHsnTxPN30rq8XHBo//tCCr7um6xYsJEuJdSEZ9/vfkuaVz8rC5MbGyYL87Eq6/7e/p78FbHUfrE2TPB+40JHM3kqJBmfHX5sOVhvAEOA9BbtbYlpn1PbH9f641QR7zBcdWWNJMYwVAso/ssBr5aUQkU0jmvLXT8rIklKkjGjrZ4I21UCPGFK1Qvhy3tlin5pty8+dzAudepUmXZc/8ZEJzWu/5GvKZuZVXVGzuebyiopA7fpNnRbrCEdxiqU6pyG7Rp+Vk1QmbvrbR3OvNEk8H/0kMyMjQ6vlXbzKZpu0cuXKOQ6ez0tRSVKS2ugf2RSJ+tKql0QuXPbGxuqKDNtDu//U076W/1JKyhs7fY7HMTVVbcquuXDaeXZvon/sUBqDWYNnE5sWIyLoEqgMmxJp8cxLQD2zP6Sk8UBXWAw+poQWYnQDM09IUeLGYYgYoNhVAzGEVfC9XOW/orDgbETQxhUajMz2YmwyUSsbMIwO/oM1fD8MtDLtQRo6v5B4IFWCjrQDBdWIX8DALMrd2FN15BSKQzl1wneHxvpQvm9iZAyzHCcJdi0iiw+F3wcGggU2QaYIOxy30VJYNqUFYSWO5KAxxKCNiTRgd6WMczzqeYL1kVNE/0Mtsy1Bkp6ZjGid8QJGBOAQJVgrOdCbHA3LJU10X2ZyRn5o6rDq6mFTx1VXa8i/iosuHDbs0qlTLs3I6K9W5iBOZ+LxWjvQ4lnUnzasumVq9bCKSiBaLqZ7dMOq4ZVLp/BPZ2dkRh+O0aLyWe3PZTEzXGf14Gw+t5Sc3VjlP/zEgoV2MORJJtJnYJ20n92+SKKkO9oUi6ShmGP9/8L3ZQxZE+jfrGeRc63AWxdyHq6CxX6rw2iYmri6XGQktZ2R1/+XvLKIgKdmanXmns+iCf9X2cQVDoMQHgzscs4kFsMuYZ9lxmOcxPcaCwQse4MmrzsuQHLGWIfE7cai+ig106jiwtOFK3xwySubDgcZWQXiUUIoKEwDtiPpV/cd42HOsffMvI2FrHImbMVzb0H0kGL+FegpxfxGzr0RY1csG7dS4oeMz8C4JHY+sYsJsc9VwJdlxN9wB90aYtMA1JeVVwHcRNjXMK4QOhINTB563LOQkSzEMq5iYUgbShNnB7a5rPoFNPDDoLiYbAKvhsDFlCQtXZXnyPAMcxcWuocNz28knlnD3O7CJigYMlmUF7UpKfwYWS6lT8ru4kCwsDBnWJA0153IGeZuL3S7i8+aN/QZSmX/y8AI3JtLiXGltFQ0BE2yyZlwFqpQD1DOI5UX9x7z+xLbStv3r9u/n/YMnnc1XqThs5OT3yiVxTnmRo+n0ZPY5KpIuCocTjzT9nkjtFOs1pWvNtcu+b4031paas0HmPA+974MRLESD58o/1PO4Xbx+P/kVEP+W4nnrvb2u+6m59Pz72Y5spfspT+wEHkssrfkOesm5nrP4KzGH2L+pArvjysiG0fFbyM2vxcO0WaS3XYscAdNyPcjBELOOoJWQRiUeFX74gj2j6ZAjnSJa+mHsN1YBNaP9/8hOhIuIVVik8XjBcX+s6nWDSuP2HRa5lktY0hYeC16eDs/jy6JRDDiZwRhaf/xMPFFP9jOz8cIFJFok6oZTgn2UzhKOq0QBDQv2pwmrc0kaHVQn+y0iW6tTXJ/jpHoNpK1gO7XYu5zDFm3kV4LDb8WcmIpWdu7degtALZ4ayN7dYi/kQlw3i+k2f8dt3luX6N3/xsW9FzORKqT/yVb+v8AUeQdbgAAeNpjYGRgYGBk7JRy5JSM57f5ysDNfgEownA+5XwIMs1+ASzOwcAE4gEAF4EJ7wAAeNpjYGRgYL/w/waIZGAAk4wMqOA9AHazBU4AAHjabVIrDgIxEJ0uYoOGAyCQKAS3IEFAwgFWIeAeqOIIggSHBIMCg4AVJKzkCATdhIBi+tntdOgmL6+dz5vPVigwX7ICqD0B0sKztgn0i74FfJEl8syy8SkTm6WF6CC/ETm5v+zdnCVy0/oq5MQPjEcslkFIH09Ra6VFcgyhayRj5Ifvj/Ygto4l80HkrPMvTi+LaDVdX7nnEjpH3FzvGm0bQ1HF6xmV01HhrqrZs0hezjRlqMl3D1dmm2DOPOzZaNaR+4glq9VjfUlWa4qokx2WWCD2kdlKfJj9QHZIZub3Ur+6r4kG1hJntmPd7w4xwHPX7ePKZlT/O/77v/xtDp294Xo6ITb+nQX/hdhigDurlyVjgB9mnjO1AAAAeNpjYGBQIwD1GNoYVjBcYbRjnMC4gvEdkx7TJKYTzALMMcyTmK+wyLDMYDnHysVqxPqJTYYthW0S2zl2IXY39hXstzgsOII4KjhWcFzi+MMpxKnAqcdpw+nFGcG5jfMU5zcuM64cri6ueVx3uP5xm3HXcX/gCeGZwXOGl4XXjjePdx7vGd5ffGp8GXwr+K7wK/G38b8Q4BGwEWgTOCPwS1BMMEgwR3CVkIfQBKFNQleEvgkrCG8SficSJdIiskTkgKiIaIzoAjExsQixGWK3xG3EL0n4SByQeCLJICkmGSY5QfKVlIFUhlSf1Capd9I20pNkXGRKZI7IfJO1ky2RnSa7S85DrkHunjyDfI38PgUhhTKFPQr3FBkUJRRnKF5R0lNapHRAOUv5lkqCyiSVWyrfVCVUvVRnqG5RfaLGprZI3Uv9nIaUhomGl0aKRpXGFI1VGkc0bmkKaRpovtEK0tqjPUH7jc4EXR7dMN11uq/0xPRU9JbpvdKX0Q/QX6b/zMDHYJ7BKYNvhkaGGYYNhosMXxgdMHpnbGEcYnzNRMkkzeSOqZtZhtkUcwXzCPMp5lcsTCxqLOZZ8lgGWM6x3GJ5z0rHqs1qn9UnaynrAOsN1hsAt7aMyXjaY2BkYGB4z7CJQZABBJiAmJEBJOYA5jMAAC5XAfgAeNqNUstOwkAUPS1oQjQuXLgwLhrdqAkPFaHCykRxITFEo3VbBEoj0goV8Bf8Mt35BX6D8QOMZy5TQujG3Ezn3DPnPmZuAazgDSkY6QyAL64pNrBOb4pNrOFb4xRs/GqcxrZR0ngJE+Ne42XynxpnsG/8aLyKTXNL43dsmHHsBwpmHRdooA4LI7QxwBA+AvTpH3IFZCy49F+594giUSXVY6IIXaKOMBFRGxM88BvSi3W71ES0EBXkaWOxHDyevnBXFT3yPUao2D5rtLnyZEOyWeZ38UylyvNEZgc1XfE8UW8PZ1QPqVXZAsl2TYXHWuo2AxwwU4FWQhW3uISDK6JkVHYhLqmwFhR3Cy80X6mBGzLKm2e7VEY632gWkUOZ3yrv6uKROZWmQ1a9UJNTyuFYlo0jeif/6N2RV26xi4G8req9JciXOVgyZZcVx1oZzpTxhBz6zblZT3ut8cyndyoRFq0oZ2VOW92xwg5t+bfUzYt/4ZJ4UQAAAHjabZT1k1xVGAW3F0lwd3eHefe7z/AQ2ODuHiCQQFiChBAsuLu7u1twJ7i7u1vxJ0Bgen5jqra6Xu27fWdPnbN9/X3/ff6e3Jf6/u/z19Qf+vrpZxqmZTqmZwhDmYEZmYmZmYVZmY3ZmYM5mYu5mYd5mY/5WYAFWYiFWYRFWYzFWYIlWYqlWYZlWY7lWYEVWYmVWYVVWY0OBYkgU1JR09CyOmuwJmuxNuuwLsNYj+GszwYMMIIN2YiN2YRN2YzN2YIt2Yqt2YZt2Y7t2YEd2Ymd2YVd2Y3d2YM9Gcle7M0+jGJf9mM0Y9ifAxjLgQxyEOM4mEM4lMMYz+FM4AgmciRHcTTHcCyTOI7jOYETOYmTOYVTOY3TOYMzOYuzOYdzOY/zuYALuYiLuYRLuYzLuYIruYqruYZruY7ruYEbuYmbuYVbuY3buYM7uYu7uYd7uY/7eYAHeYjJPMwjPMpjPM4TPMlTPM0zPMtzPM8LTOFFXuJlXuFVXuN13uBN3uJt3uFd3uN9PuBDPuJjPuFTPuNzvuBLvuJrvuFbvuN7fuBHfuJnfuFXfuN3/uDPIeMHx6ROpyMLmWTILEtZyVo2spXDukwDXZZdlgPD/+VA0b1vKguZZMgsS1nJWjay7bLQV+gr9BX6Cj2FnkJPoafQk/QkPUlP0pP0JD1JT9KT9ISe8Hx4Pvy7Qk/oCc+H57Pns98j68l6suez92fPl/6+9J7S90rvKX2/7L3vfZX3Vd5X6an0VHoqPZWeSk+lp/Z87fet9dR6aj21nlpPrafW0/h9Gn2NvkZfo6/p+pJ9SvYp2aNkj1Kn914la9nI7r3JHiV7lOxRskep0Gefkn1K9inZp2Sfkn1K9inZp2SfUtJnr5K9SvYq2atkr5K9SqHPfiX7lexXsl/JfqXQZ8+SPUv2LNmvML/o9J5DZlnKStaykV1vmGOYY5hjmGOYY5hjmGOYY5hjmGOYY5hjmGOYY5hjmGOYY5hjmGOYY5hjmGOYY5hjmGOYY5hjmGOYY5hjmGO41+jl6V4j63O3kfW533C/kbu+7HPuPZcdWcgkQ2ZZykrWUo87z5Xn3Xl259mdZ3ee3Xl259md51qPe8/uPbv37N6ze8/uPbv37N6ze8/uPbv37N6ze8/uPbv33Ohr9DX6Gn2tvlZfq6/V1+pr9bX6Wn2tvrbrK/3/UrqP0n2U7qN0H6W7KDv10MFRE0aMnThu9D9zrnmnAAFTPx7UAAA=) format('woff'),url(../fonts/dashicons.ttf) format("truetype"),url(../fonts/dashicons.svg#dashicons) format("svg");font-weight:400;font-style:normal}.dashicons,.dashicons-before:before{display:inline-block;width:20px;height:20px;font-size:20px;line-height:1;font-family:dashicons;text-decoration:inherit;font-weight:400;font-style:normal;vertical-align:top;text-align:center;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.dashicons-menu:before{content:"\f333"}.dashicons-admin-site:before{content:"\f319"}.dashicons-dashboard:before{content:"\f226"}.dashicons-admin-media:before{content:"\f104"}.dashicons-admin-page:before{content:"\f105"}.dashicons-admin-comments:before{content:"\f101"}.dashicons-admin-appearance:before{content:"\f100"}.dashicons-admin-plugins:before{content:"\f106"}.dashicons-admin-users:before{content:"\f110"}.dashicons-admin-tools:before{content:"\f107"}.dashicons-admin-settings:before{content:"\f108"}.dashicons-admin-network:before{content:"\f112"}.dashicons-admin-generic:before{content:"\f111"}.dashicons-admin-home:before{content:"\f102"}.dashicons-admin-collapse:before{content:"\f148"}.dashicons-admin-links:before,.dashicons-format-links:before{content:"\f103"}.dashicons-admin-post:before,.dashicons-format-standard:before{content:"\f109"}.dashicons-format-image:before{content:"\f128"}.dashicons-format-gallery:before{content:"\f161"}.dashicons-format-audio:before{content:"\f127"}.dashicons-format-video:before{content:"\f126"}.dashicons-format-chat:before{content:"\f125"}.dashicons-format-status:before{content:"\f130"}.dashicons-format-aside:before{content:"\f123"}.dashicons-format-quote:before{content:"\f122"}.dashicons-welcome-edit-page:before,.dashicons-welcome-write-blog:before{content:"\f119"}.dashicons-welcome-add-page:before{content:"\f133"}.dashicons-welcome-view-site:before{content:"\f115"}.dashicons-welcome-widgets-menus:before{content:"\f116"}.dashicons-welcome-comments:before{content:"\f117"}.dashicons-welcome-learn-more:before{content:"\f118"}.dashicons-image-crop:before{content:"\f165"}.dashicons-image-rotate-left:before{content:"\f166"}.dashicons-image-rotate-right:before{content:"\f167"}.dashicons-image-flip-vertical:before{content:"\f168"}.dashicons-image-flip-horizontal:before{content:"\f169"}.dashicons-undo:before{content:"\f171"}.dashicons-redo:before{content:"\f172"}.dashicons-editor-bold:before{content:"\f200"}.dashicons-editor-italic:before{content:"\f201"}.dashicons-editor-ul:before{content:"\f203"}.dashicons-editor-ol:before{content:"\f204"}.dashicons-editor-quote:before{content:"\f205"}.dashicons-editor-alignleft:before{content:"\f206"}.dashicons-editor-aligncenter:before{content:"\f207"}.dashicons-editor-alignright:before{content:"\f208"}.dashicons-editor-insertmore:before{content:"\f209"}.dashicons-editor-spellcheck:before{content:"\f210"}.dashicons-editor-distractionfree:before,.dashicons-editor-expand:before{content:"\f211"}.dashicons-editor-contract:before{content:"\f506"}.dashicons-editor-kitchensink:before{content:"\f212"}.dashicons-editor-underline:before{content:"\f213"}.dashicons-editor-justify:before{content:"\f214"}.dashicons-editor-textcolor:before{content:"\f215"}.dashicons-editor-paste-word:before{content:"\f216"}.dashicons-editor-paste-text:before{content:"\f217"}.dashicons-editor-removeformatting:before{content:"\f218"}.dashicons-editor-video:before{content:"\f219"}.dashicons-editor-customchar:before{content:"\f220"}.dashicons-editor-outdent:before{content:"\f221"}.dashicons-editor-indent:before{content:"\f222"}.dashicons-editor-help:before{content:"\f223"}.dashicons-editor-strikethrough:before{content:"\f224"}.dashicons-editor-unlink:before{content:"\f225"}.dashicons-editor-rtl:before{content:"\f320"}.dashicons-editor-break:before{content:"\f474"}.dashicons-editor-code:before{content:"\f475"}.dashicons-editor-paragraph:before{content:"\f476"}.dashicons-align-left:before{content:"\f135"}.dashicons-align-right:before{content:"\f136"}.dashicons-align-center:before{content:"\f134"}.dashicons-align-none:before{content:"\f138"}.dashicons-lock:before{content:"\f160"}.dashicons-calendar:before{content:"\f145"}.dashicons-visibility:before{content:"\f177"}.dashicons-post-status:before{content:"\f173"}.dashicons-edit:before{content:"\f464"}.dashicons-post-trash:before,.dashicons-trash:before{content:"\f182"}.dashicons-external:before{content:"\f504"}.dashicons-arrow-up:before{content:"\f142"}.dashicons-arrow-down:before{content:"\f140"}.dashicons-arrow-left:before{content:"\f141"}.dashicons-arrow-right:before{content:"\f139"}.dashicons-arrow-up-alt:before{content:"\f342"}.dashicons-arrow-down-alt:before{content:"\f346"}.dashicons-arrow-left-alt:before{content:"\f340"}.dashicons-arrow-right-alt:before{content:"\f344"}.dashicons-arrow-up-alt2:before{content:"\f343"}.dashicons-arrow-down-alt2:before{content:"\f347"}.dashicons-arrow-left-alt2:before{content:"\f341"}.dashicons-arrow-right-alt2:before{content:"\f345"}.dashicons-leftright:before{content:"\f229"}.dashicons-sort:before{content:"\f156"}.dashicons-randomize:before{content:"\f503"}.dashicons-list-view:before{content:"\f163"}.dashicons-exerpt-view:before{content:"\f164"}.dashicons-hammer:before{content:"\f308"}.dashicons-art:before{content:"\f309"}.dashicons-migrate:before{content:"\f310"}.dashicons-performance:before{content:"\f311"}.dashicons-universal-access:before{content:"\f483"}.dashicons-universal-access-alt:before{content:"\f507"}.dashicons-tickets:before{content:"\f486"}.dashicons-nametag:before{content:"\f484"}.dashicons-clipboard:before{content:"\f481"}.dashicons-heart:before{content:"\f487"}.dashicons-megaphone:before{content:"\f488"}.dashicons-schedule:before{content:"\f489"}.dashicons-wordpress:before{content:"\f120"}.dashicons-wordpress-alt:before{content:"\f324"}.dashicons-pressthis:before{content:"\f157"}.dashicons-update:before{content:"\f463"}.dashicons-screenoptions:before{content:"\f180"}.dashicons-info:before{content:"\f348"}.dashicons-cart:before{content:"\f174"}.dashicons-feedback:before{content:"\f175"}.dashicons-cloud:before{content:"\f176"}.dashicons-translation:before{content:"\f326"}.dashicons-tag:before{content:"\f323"}.dashicons-category:before{content:"\f318"}.dashicons-archive:before{content:"\f480"}.dashicons-tagcloud:before{content:"\f479"}.dashicons-text:before{content:"\f478"}.dashicons-media-archive:before{content:"\f501"}.dashicons-media-audio:before{content:"\f500"}.dashicons-media-code:before{content:"\f499"}.dashicons-media-default:before{content:"\f498"}.dashicons-media-document:before{content:"\f497"}.dashicons-media-interactive:before{content:"\f496"}.dashicons-media-spreadsheet:before{content:"\f495"}.dashicons-media-text:before{content:"\f491"}.dashicons-media-video:before{content:"\f490"}.dashicons-playlist-audio:before{content:"\f492"}.dashicons-playlist-video:before{content:"\f493"}.dashicons-yes:before{content:"\f147"}.dashicons-no:before{content:"\f158"}.dashicons-no-alt:before{content:"\f335"}.dashicons-plus:before{content:"\f132"}.dashicons-plus-alt:before{content:"\f502"}.dashicons-minus:before{content:"\f460"}.dashicons-dismiss:before{content:"\f153"}.dashicons-marker:before{content:"\f159"}.dashicons-star-filled:before{content:"\f155"}.dashicons-star-half:before{content:"\f459"}.dashicons-star-empty:before{content:"\f154"}.dashicons-flag:before{content:"\f227"}.dashicons-share1:before,.dashicons-share:before{content:"\f237"}.dashicons-share-alt:before{content:"\f240"}.dashicons-share-alt2:before{content:"\f242"}.dashicons-twitter:before{content:"\f301"}.dashicons-rss:before{content:"\f303"}.dashicons-email:before{content:"\f465"}.dashicons-email-alt:before{content:"\f466"}.dashicons-facebook:before{content:"\f304"}.dashicons-facebook-alt:before{content:"\f305"}.dashicons-networking:before{content:"\f325"}.dashicons-googleplus:before{content:"\f462"}.dashicons-location:before{content:"\f230"}.dashicons-location-alt:before{content:"\f231"}.dashicons-camera:before{content:"\f306"}.dashicons-images-alt:before{content:"\f232"}.dashicons-images-alt2:before{content:"\f233"}.dashicons-video-alt:before{content:"\f234"}.dashicons-video-alt2:before{content:"\f235"}.dashicons-video-alt3:before{content:"\f236"}.dashicons-vault:before{content:"\f178"}.dashicons-shield:before{content:"\f332"}.dashicons-shield-alt:before{content:"\f334"}.dashicons-sos:before{content:"\f468"}.dashicons-search:before{content:"\f179"}.dashicons-slides:before{content:"\f181"}.dashicons-analytics:before{content:"\f183"}.dashicons-chart-pie:before{content:"\f184"}.dashicons-chart-bar:before{content:"\f185"}.dashicons-chart-line:before{content:"\f238"}.dashicons-chart-area:before{content:"\f239"}.dashicons-groups:before{content:"\f307"}.dashicons-businessman:before{content:"\f338"}.dashicons-id:before{content:"\f336"}.dashicons-id-alt:before{content:"\f337"}.dashicons-products:before{content:"\f312"}.dashicons-awards:before{content:"\f313"}.dashicons-forms:before{content:"\f314"}.dashicons-testimonial:before{content:"\f473"}.dashicons-portfolio:before{content:"\f322"}.dashicons-book:before{content:"\f330"}.dashicons-book-alt:before{content:"\f331"}.dashicons-download:before{content:"\f316"}.dashicons-upload:before{content:"\f317"}.dashicons-backup:before{content:"\f321"}.dashicons-clock:before{content:"\f469"}.dashicons-lightbulb:before{content:"\f339"}.dashicons-microphone:before{content:"\f482"}.dashicons-desktop:before{content:"\f472"}.dashicons-tablet:before{content:"\f471"}.dashicons-smartphone:before{content:"\f470"}.dashicons-smiley:before{content:"\f328"} \ No newline at end of file diff --git a/wp-includes/css/editor-rtl.css b/wp-includes/css/editor-rtl.css new file mode 100644 index 0000000..50d139d --- /dev/null +++ b/wp-includes/css/editor-rtl.css @@ -0,0 +1,1888 @@ +/*------------------------------------------------------------------------------ + TinyMCE and Quicklinks toolbars +------------------------------------------------------------------------------*/ + +/* TinyMCE widgets/containers */ + +.mce-container, +.mce-container *, +.mce-widget, +.mce-widget * { + color: inherit; + font-family: inherit; +} + +/* TinyMCE windows */ +#mce-modal-block.mce-in { + opacity: 0.7; + filter: alpha(opacity=70); +} + +.mce-window { + -webkit-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); + box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); + -webkit-font-smoothing: subpixel-antialiased; +} + +.mce-window .mce-container-body.mce-abs-layout { + overflow: visible; +} + +.mce-window .mce-window-head { + background: #fcfcfc; + border-bottom: 1px solid #dfdfdf; + padding: 0; + min-height: 36px; +} + +.mce-window .mce-window-head .mce-title { + color: #444; + font-size: 18px; + font-weight: 600; + line-height: 36px; + margin: 0; + padding: 0 16px 0 36px; +} + +.mce-window .mce-window-head .mce-close { + color: transparent; + top: 0; + left: 0; + width: 36px; + height: 36px; + line-height: 36px; + text-align: center; +} + +.mce-window .mce-window-head .mce-close:before { + font: normal 20px/36px 'dashicons'; + text-align: center; + color: #666; + width: 36px; + height: 36px; + display: block; +} + +.mce-window .mce-window-head .mce-close:hover:before { + color: #2ea2cc; +} + +.mce-window .mce-window-head .mce-dragh { + width: -webkit-calc( 100% - 36px ); + width: calc( 100% - 36px ); +} + +.mce-wp-help .mce-window-head { + border-bottom: none; +} + +.mce-textbox, +.mce-checkbox i.mce-i-checkbox { + border: 1px solid #ddd; + -webkit-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.07); + box-shadow: inset 0 1px 2px rgba(0,0,0,0.07); + -webkit-transition: .05s border-color ease-in-out; + transition: .05s border-color ease-in-out; +} + +.mce-textbox:focus, +.mce-textbox.mce-focus, +.mce-checkbox:focus i.mce-i-checkbox { + border-color: #5b9dd9; + -webkit-box-shadow: 0 0 2px rgba(30,140,190,0.8); + box-shadow: 0 0 2px rgba(30,140,190,0.8); +} + +/* TinyMCE menus */ +.mce-menu, +.mce-floatpanel.mce-popover { + border-color: rgba(0,0,0,0.15); + -webkit-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: 0 3px 5px rgba( 0, 0, 0, 0.2 ); + box-shadow: 0 3px 5px rgba( 0, 0, 0, 0.2 ); +} + +.mce-floatpanel.mce-popover.mce-bottom { + margin-top: 2px; +} + +.mce-floatpanel .mce-arrow { + display: none; +} + +.mce-menu .mce-container-body { + min-width: 160px; +} + +.mce-menu-item { + border: none; + margin-bottom: 2px; +} + +.mce-menu-has-icons i.mce-ico { + line-height: 20px; +} + +/* TinyMCE panel */ +div.mce-panel { + border: 0; + background: #fff; + -webkit-filter: none; + filter: none; +} + +.mce-panel.mce-menu { + border: 1px solid #ddd; +} + +div.mce-tab { + line-height: 13px; +} + +/* TinyMCE toolbars */ +div.mce-toolbar-grp { + border-bottom: 1px solid #dedede; + background: #f5f5f5; + padding: 3px; + position: relative; +} + +.has-dfw div.mce-toolbar-grp .mce-toolbar.mce-first { + padding-left: 32px; +} + +.mce-toolbar .mce-btn-group { + margin: 0; +} + +div.mce-statusbar { + border-top: 1px solid #eee; +} + +div.mce-path { + padding: 0 8px 2px; + margin: 0; +} + +.mce-toolbar .mce-btn, +.qt-fullscreen { + border-color: transparent; + background: transparent; + -webkit-box-shadow: none; + box-shadow: none; + text-shadow: none; + cursor: pointer; +} + +#wp-fullscreen-buttons .mce-btn, +.mce-toolbar .mce-btn-group .mce-btn, +.qt-fullscreen { + border: 1px solid transparent; + margin: 2px; + background-image: none; + -webkit-border-radius: 2px; + border-radius: 2px; + -webkit-filter: none; + filter: none; +} + +#wp-fullscreen-buttons .mce-btn:hover, +.mce-toolbar .mce-btn-group .mce-btn:hover, +#wp-fullscreen-buttons .mce-btn:focus, +.mce-toolbar .mce-btn-group .mce-btn:focus, +.qt-fullscreen:hover, +.qt-fullscreen:focus { + background: #fafafa; + border-color: #999; + color: #222; + -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba( 0, 0, 0, 0.08 ); + box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba( 0, 0, 0, 0.08 ); +} + +.mce-toolbar .mce-btn-group .mce-btn.mce-active, +#wp-fullscreen-buttons .mce-btn.mce-active, +.mce-toolbar .mce-btn-group .mce-btn:active, +#wp-fullscreen-buttons .mce-btn:active { + background: #ebebeb; + border-color: #999; + -webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.3 ); + box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.3 ); +} + +.mce-toolbar .mce-btn-group .mce-btn.mce-active:hover { + border-color: #555; +} + +.mce-toolbar .mce-btn-group .mce-btn.mce-active:hover i.mce-ico { + color: #555; +} + +.mce-toolbar .mce-btn-group .mce-btn.mce-disabled:hover, +#wp-fullscreen-buttons .mce-btn.mce-disabled:hover, +.mce-toolbar .mce-btn-group .mce-btn.mce-disabled:focus, +#wp-fullscreen-buttons .mce-btn.mce-disabled:focus { + color: #aaa; + background: none; + border-color: #ddd; + text-shadow: 0 1px 0 #fff; + -webkit-box-shadow: none; + box-shadow: none; +} + +.mce-toolbar .mce-btn-group .mce-first, +.mce-toolbar .mce-btn-group .mce-last { + border-color: transparent; +} + +.mce-toolbar .mce-btn button, +.qt-fullscreen { + padding: 2px 3px; + line-height: normal; +} + +.mce-toolbar .mce-btn i { + text-shadow: none; +} + +.mce-toolbar .mce-btn-group > div { + white-space: normal; +} + +.mce-toolbar .mce-colorbutton .mce-open { + border-left: 0; +} + +.mce-toolbar .mce-colorbutton .mce-preview { + margin-right: -17px; + padding: 0; + width: 18px; +} + +/* mce listbox */ +.mce-toolbar .mce-btn-group .mce-btn.mce-listbox { + -webkit-border-radius: 0; + border-radius: 0; + direction: rtl; + background: #fff; + border: 1px solid #ddd; + -webkit-box-shadow: inset 0 1px 1px -1px rgba(0, 0, 0, .2); + box-shadow: inset 0 1px 1px -1px rgba(0, 0, 0, .2); +} + +.mce-toolbar .mce-btn-group .mce-btn.mce-listbox:hover { + background-image: none; + border-color: #bbb; +} + +.mce-toolbar .mce-btn-group .mce-btn.mce-listbox span { + font-size: 13px; +} + +.mce-panel .mce-btn i.mce-caret { + border-top: 6px solid #777; + margin-right: 2px; + margin-left: 2px; +} + +.mce-listbox i.mce-caret { + left: 6px; +} + +.mce-panel .mce-btn button.mce-open i.mce-caret, +.mce-panel .mce-btn.mce-listbox i.mce-caret { + margin-right: 0; + margin-left: 0; +} + +.mce-panel .mce-btn:hover i.mce-caret { + border-top-color: #333; +} + +.mce-panel .mce-active i.mce-caret { + border-top: 0; + border-bottom: 6px solid #333; + margin-top: 7px; +} + +.mce-listbox.mce-active i.mce-caret { + margin-top: -3px; +} + +.mce-toolbar .mce-splitbtn:hover .mce-open { + border-left-color: transparent; +} + +.mce-toolbar .mce-splitbtn .mce-open.mce-active{ + -webkit-box-shadow: none; + box-shadow: none; +} + +.mce-menu .mce-menu-item-normal.mce-active { + background-color: #e5e5e5; + -webkit-filter: none; + filter: none; +} + +.mce-menu .mce-menu-item:hover, +.mce-menu .mce-menu-item.mce-selected, +.mce-menu .mce-menu-item:focus { + color: #000; + background-color: #bbb; + background-image: none; + -webkit-filter: none; + filter: none; +} + +.mce-menu .mce-menu-item:hover .mce-ico, +.mce-menu .mce-menu-item.mce-selected .mce-ico, +.mce-menu .mce-menu-item:focus .mce-ico, +.mce-menu .mce-menu-item:hover .mce-text, +.mce-menu .mce-menu-item.mce-active:hover .mce-text, +.mce-menu .mce-menu-item.mce-selected .mce-text { + color: #000; +} + +/* Menubar */ +.mce-menubar { + border-color: #e5e5e5; +} + +.mce-menubar .mce-btn:focus { + outline: 0; +} + +div.mce-menu .mce-menu-item-sep, +.mce-menu-item-sep:hover { + margin: 5px 0 4px; +} + +.mce-menubtn span { + margin-left: 0; + padding-right: 3px; +} + +.mce-menu-has-icons i.mce-ico:before { + margin-right: -2px; +} + +/* Buttons in modals */ +.mce-primary button, +.mce-primary button i { + text-align: center; + color: #fff; + text-shadow: none; + padding: 0; + line-height: 26px; +} + +.mce-window .mce-btn { + color: #555; + background: #f7f7f7; + text-decoration: none; + font-size: 13px; + line-height: 26px; + height: 28px; + margin: 0; + padding: 0; + cursor: pointer; + border: 1px solid #ccc; + -webkit-appearance: none; + -webkit-border-radius: 3px; + border-radius: 3px; + white-space: nowrap; + -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.08); + box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.08); + background-image: none; +} + +/* Remove the dotted border on :focus and the extra padding in Firefox */ +.mce-window .mce-btn::-moz-focus-inner { + border-width: 1px 0; + border-style: solid none; + border-color: transparent; + padding: 0; +} + +.mce-window .mce-btn:hover { + background: #fafafa; + border-color: #999; + color: #222; +} + +.mce-window .mce-btn:focus { + -webkit-box-shadow: 1px 1px 1px rgba(0,0,0,.2); + box-shadow: 1px 1px 1px rgba(0,0,0,.2); +} + +.mce-window .mce-btn:active { + background: #eee; + border-color: #999; + color: #333; + -webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 ); + box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 ); +} + +.mce-window .mce-btn.mce-disabled { + color: #aaa; + border-color: #ddd; + -webkit-box-shadow: none; + box-shadow: none; + text-shadow: 0 1px 0 #fff; + cursor: default; +} + +.mce-window .mce-btn.mce-primary { + background: #2ea2cc; + border-color: #0074a2; + -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.5), 0 1px 0 rgba(0,0,0,.15); + box-shadow: inset 0 1px 0 rgba(120,200,230,0.5), 0 1px 0 rgba(0,0,0,.15); + color: #fff; + text-decoration: none; +} + +.mce-window .mce-btn.mce-primary:hover { + background: #1e8cbe; + border-color: #0074a2; + -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6); + box-shadow: inset 0 1px 0 rgba(120,200,230,0.6); + color: #fff; +} + +.mce-window .mce-btn.mce-primary:focus { + border-color: #0e3950; + -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6), 1px 1px 2px rgba(0,0,0,0.4); + box-shadow: inset 0 1px 0 rgba(120,200,230,0.6), 1px 1px 2px rgba(0,0,0,0.4); +} + +.mce-window .mce-btn.mce-primary:active { + background: #1b7aa6; + border-color: #005684; + color: rgba(255,255,255,0.95); + -webkit-box-shadow: inset 0 1px 0 rgba(0,0,0,0.1); + box-shadow: inset 0 1px 0 rgba(0,0,0,0.1); +} + +.mce-window .mce-btn.mce-primary.mce-disabled { + color: #94cde7; + background: #298cba; + border-color: #1b607f; + text-shadow: 0 -1px 0 rgba(0,0,0,0.1); +} + +.mce-menubtn.mce-fixed-width button span { + max-width: 80px; + padding-left: 16px; +} + +/* Charmap modal */ +.mce-charmap { + margin: 3px; +} + +.mce-charmap td { + padding: 0; + border-color: #dfdfdf; + cursor: pointer; +} + +.mce-charmap td:hover { + background: #f3f3f3; +} + +.mce-charmap td div { + width: 18px; + height: 22px; + line-height: 22px; +} + +/* TinyMCE tooltips */ +.mce-tooltip { + margin-top: 2px; +} + +.mce-tooltip-inner { + -webkit-box-shadow: 0 3px 5px rgba( 0, 0, 0, 0.2 ); + box-shadow: 0 3px 5px rgba( 0, 0, 0, 0.2 ); + color: #fff; + font-size: 12px; +} + +/* TinyMCE icons */ +.mce-ico { + font-family: 'tinymce', Arial; +} + +.mce-btn-small .mce-ico { + font-family: 'tinymce-small', Arial; +} + +.mce-toolbar .mce-ico { + color: #777; + line-height: 20px; + width: 20px; + height: 20px; + text-align: center; + text-shadow: none; + margin: 0; + padding: 0; +} + +.qt-fullscreen { + color: #777; + line-height: 20px; + width: 28px; + height: 26px; + text-align: center; + text-shadow: none; +} + +.mce-toolbar .mce-btn .mce-open { + line-height: 20px; +} + +.mce-toolbar .mce-btn:hover .mce-open, +.mce-toolbar .mce-btn:focus .mce-open, +.mce-toolbar .mce-btn.mce-active .mce-open { + border-right-color: #999; +} + +i.mce-i-bold, +i.mce-i-italic, +i.mce-i-bullist, +i.mce-i-numlist, +i.mce-i-blockquote, +i.mce-i-alignleft, +i.mce-i-aligncenter, +i.mce-i-alignright, +i.mce-i-link, +i.mce-i-unlink, +i.mce-i-wp_more, +i.mce-i-strikethrough, +i.mce-i-spellchecker, +i.mce-i-fullscreen, +i.mce-i-wp_fullscreen, +i.mce-i-wp_adv, +i.mce-i-underline, +i.mce-i-alignjustify, +i.mce-i-forecolor, +i.mce-i-pastetext, +i.mce-i-pasteword, +i.mce-i-removeformat, +i.mce-i-charmap, +i.mce-i-outdent, +i.mce-i-indent, +i.mce-i-undo, +i.mce-i-redo, +i.mce-i-help, +i.mce-i-wp_help, +i.mce-i-wp-media-library, +i.mce-i-ltr, +i.mce-i-wp_page, +i.mce-i-hr, +.mce-close { + font: normal 20px/1 'dashicons'; + padding: 0; + vertical-align: top; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + margin-right: -2px; + padding-left: 2px; +} + +.qt-fullscreen { + font: normal 20px/1 'dashicons'; + vertical-align: top; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +i.mce-i-bold:before { + content: '\f200'; +} + +i.mce-i-italic:before { + content: '\f201'; +} + +i.mce-i-bullist:before { + content: '\f203'; +} + +i.mce-i-numlist:before { + content: '\f204'; +} + +i.mce-i-blockquote:before { + content: '\f205'; +} + +i.mce-i-alignleft:before { + content: '\f206'; +} + +i.mce-i-aligncenter:before { + content: '\f207'; +} + +i.mce-i-alignright:before { + content: '\f208'; +} + +i.mce-i-link:before { + content: '\f103'; +} + +i.mce-i-unlink:before { + content: '\f225'; +} + +i.mce-i-wp_more:before { + content: '\f209'; +} + +i.mce-i-strikethrough:before { + content: '\f224'; +} + +i.mce-i-spellchecker:before { + content: '\f210'; +} + +i.mce-i-fullscreen:before, +i.mce-i-wp_fullscreen:before, +.qt-fullscreen:before { + content: '\f211'; +} + +i.mce-i-wp_adv:before { + content: '\f212'; +} + +i.mce-i-underline:before { + content: '\f213'; +} + +i.mce-i-alignjustify:before { + content: '\f214'; +} + +i.mce-i-forecolor:before { + content: '\f215'; +} + +i.mce-i-pastetext:before { + content: '\f217'; +} + +i.mce-i-removeformat:before { + content: '\f218'; +} + +i.mce-i-charmap:before { + content: '\f220'; +} + +i.mce-i-outdent:before { + content: '\f221'; +} + +i.mce-i-indent:before { + content: '\f222'; +} + +i.mce-i-undo:before { + content: '\f171'; +} + +i.mce-i-redo:before { + content: '\f172'; +} + +i.mce-i-help:before, +i.mce-i-wp_help:before { + content: '\f223'; +} + +i.mce-i-wp-media-library:before { + content: '\f104'; +} + +i.mce-i-ltr:before { + content: '\f320'; +} + +i.mce-i-wp_page:before { + content: '\f105'; +} + +i.mce-i-hr:before { + content: '\f460'; +} + +.mce-close:before { + content: '\f158'; +} + +.mce-i-wp_code:before { + content: '\e017'; +} + +/* Editors */ +.wp-editor-wrap { + position: relative; +} + +.wp-editor-tools { + position: relative; + z-index: 1; +} + +.wp-editor-container { + clear: both; +} + +.wp-editor-area { + font-family: Consolas, Monaco, monospace; + font-size: 13px; + padding: 10px; + margin: 1px 0 0; + line-height: 150%; + border: 0 none; + outline: none; + display: block; + resize: vertical; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.wp-editor-tools { + padding: 0; +} + +.wp-editor-container textarea.wp-editor-area { + width: 100%; + margin: 0; + -webkit-box-shadow: none; + box-shadow: none; +} + +.wp-editor-tabs { + float: left; +} + +.wp-switch-editor { + background: #ebebeb; + border: 1px solid #dedede; + color: #777; + cursor: pointer; + float: left; + font: 13px/19px "Open Sans", sans-serif; + height: 19px; + margin: 5px 5px 0 0; + padding: 3px 8px 4px; + position: relative; + top: 1px; +} + +.wp-switch-editor:active { + background-color: #f1f1f1; +} + +.wp-switch-editor:hover { + text-decoration: none !important; + background: #fff; +} + +.js .tmce-active .wp-editor-area { + color: white; +} + +.tmce-active .quicktags-toolbar { + display: none; +} + +.tmce-active .switch-tmce, +.html-active .switch-html { + background: #f5f5f5; + color: #555; + height: 20px; + border-bottom: none; +} + +.wp-media-buttons { + float: right; +} + +.wp-media-buttons .button { + margin-left: 5px; + margin-bottom: 4px; + padding-right: 7px; + padding-left: 7px; +} + +.wp-media-buttons .button:active { + position: relative; + top: 1px; + margin-top: -1px; + margin-bottom: 1px; +} + +.wp-media-buttons .insert-media { + padding-right: 5px; +} + +.wp-media-buttons a { + text-decoration: none; + color: #464646; + font-size: 12px; +} + +.wp-media-buttons img { + padding: 0 4px; + vertical-align: middle; +} + +.wp-media-buttons span.wp-media-buttons-icon { + display: inline-block; + width: 18px; + height: 18px; + vertical-align: text-top; + margin: 0 2px; +} + +.wp-media-buttons .add_media span.wp-media-buttons-icon { + background: none; +} + +.wp-media-buttons .add_media span.wp-media-buttons-icon:before { + font: normal 18px/1 'dashicons'; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.wp-media-buttons .add_media span.wp-media-buttons-icon:before { + content: '\f104'; +} + +/* Quicktags */ +.quicktags-toolbar { + padding: 3px; + position: relative; + border-bottom: 1px solid #dedede; + background: #f5f5f5; +} + +.has-dfw .quicktags-toolbar { + padding-left: 35px; +} + +.wp-core-ui .quicktags-toolbar input.button.button-small { + margin: 2px; +} + +.quicktags-toolbar input[value="link"] { + text-decoration: underline; +} + +.quicktags-toolbar input[value="del"] { + text-decoration: line-through; +} + +.quicktags-toolbar input[value="i"] { + font-style: italic; +} + +.quicktags-toolbar input[value="b"] { + font-weight: bold; +} + +.mce-toolbar .mce-btn-group .mce-btn.mce-wp-fullscreen, +.qt-fullscreen { + position: absolute; + top: 0; + left: 0; + margin-top: 5px; + margin-left: 5px; +} + +@media screen and ( max-width: 782px ) { + .mce-toolbar .mce-btn button, + .qt-fullscreen { + padding: 7px 8px; + } + + .qt-fullscreen { + width: 38px; + height: 34px; + } + + .mce-toolbar .mce-colorbutton .mce-preview { + margin-right: -21px; + } + + .mce-window .mce-btn { + padding: 2px 0; + } + + div.mce-toolbar-grp, + .quicktags-toolbar { + padding-left: 46px; + } +} + +@media screen and ( min-width: 782px ) { + .wp-core-ui .quicktags-toolbar input.button.button-small { + /* .button-small is normaly 11px, but a bit too small for these buttons. */ + font-size: 12px; + height: 26px; + line-height: 24px; + } +} + +#wp_editbtns, +#wp_gallerybtns { + padding: 2px; + position: absolute; + display: none; + z-index: 100020; +} + +#wp_editimgbtn, +#wp_delimgbtn, +#wp_editgallery, +#wp_delgallery { + border-color: #999; + background-color: #eee; + margin: 2px; + padding: 2px; + border-width: 1px; + border-style: solid; + -webkit-border-radius: 3px; + border-radius: 3px; +} + +#wp_editimgbtn:hover, +#wp_delimgbtn:hover, +#wp_editgallery:hover, +#wp_delgallery:hover { + border-color: #555; + background-color: #ccc; +} + +/*------------------------------------------------------------------------------ + wp-link +------------------------------------------------------------------------------*/ + +#wp-link-wrap { + display: none; + background-color: #fff; + -webkit-box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); + box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); + width: 500px; + height: 250px; + overflow: hidden; + margin-right: -250px; + margin-top: -125px; + position: fixed; + top: 50%; + right: 50%; + z-index: 100105; + -webkit-transition: height 0.2s, margin-top 0.2s; + transition: height 0.2s, margin-top 0.2s; +} + +#wp-link-backdrop { + display: none; + position: fixed; + top: 0; + right: 0; + left: 0; + bottom: 0; + min-height: 360px; + background: #000; + opacity: 0.7; + filter: alpha(opacity=70); + z-index: 100100; +} + +#wp-link { + position: relative; + height: 100%; +} + +#wp-link-wrap.search-panel-visible { + height: 500px; + margin-top: -250px; +} + +#link-modal-title { + background: #fcfcfc; + border-bottom: 1px solid #dfdfdf; + height: 36px; + font-size: 18px; + font-weight: 600; + line-height: 36px; + padding: 0 16px 0 36px; + top: 0; + left: 0; + right: 0; +} + +#wp-link-close { + color: #666; + cursor: pointer; + padding: 0; + position: absolute; + top: 0; + left: 0; + width: 36px; + height: 36px; + text-align: center; +} + +#wp-link-close:before { + font: normal 20px/36px 'dashicons'; + vertical-align: top; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + width: 36px; + height: 36px; + content: '\f158'; +} + +#wp-link-close:hover, +#wp-link-close:focus { + color: #2ea2cc; +} + +#link-selector { + padding: 0 16px 50px; +} + +#wp-link-wrap.search-panel-visible #link-selector { + padding: 0 16px; + position: absolute; + top: 36px; + right: 0; + left: 0; + bottom: 44px; +} + +#wp-link ol, +#wp-link ul { + list-style: none; + margin: 0; + padding: 0; +} + +#wp-link-search-toggle::after { + font: normal 20px/1 'dashicons'; + vertical-align: top; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + content: '\f140'; +} + +.search-panel-visible #wp-link-search-toggle::after { + content: '\f142'; +} + +#wp-link input[type="text"] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +#wp-link #link-options { + padding: 8px 0 12px; +} + +#wp-link p.howto { + margin: 3px 0; +} + +#wp-link-search-toggle { + cursor: pointer; +} + +#wp-link label input[type="text"] { + margin-top: 5px; + width: 70%; +} + +#wp-link #link-options label span, +#wp-link #search-panel label span.search-label { + display: inline-block; + width: 80px; + text-align: left; + padding-left: 5px; + max-width: 24%; +} + +#wp-link .link-search-field { + float: right; + width: 250px; + max-width: 70%; +} + +#wp-link .link-search-wrapper { + margin: 5px 0 9px; + display: block; + overflow: hidden; +} + +#wp-link .link-search-wrapper span { + float: right; + margin-top: 4px; +} + +#wp-link .link-search-wrapper .spinner { + display: none; + vertical-align: text-bottom; +} + +#wp-link .link-target { + padding: 3px 0 0; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +#wp-link .link-target label { + max-width: 70%; +} + +#wp-link .query-results { + border: 1px #dfdfdf solid; + margin: 0; + background: #fff; + overflow: auto; + position: absolute; + right: 16px; + left: 16px; + bottom: 16px; + top: 205px; +} + +#wp-link li, +#wp-link .query-notice { + clear: both; + margin-bottom: 0; + border-bottom: 1px solid #f1f1f1; + color: #333; + padding: 4px 6px; + cursor: pointer; + position: relative; +} + +#wp-link li:hover { + background: #eaf2fa; + color: #151515; +} + +#wp-link li.unselectable { + border-bottom: 1px solid #dfdfdf; +} + +#wp-link li.unselectable:hover { + background: #fff; + cursor: auto; + color: #333; +} + +#wp-link li.selected { + background: #ddd; + color: #333; +} + +#wp-link li.selected .item-title { + font-weight: bold; +} + +#wp-link li:last-child { + border: none; +} + +#wp-link .item-title { + display: inline-block; + width: 80%; + width: -webkit-calc(100% - 68px); + width: calc(100% - 68px); +} + +#wp-link .item-info { + text-transform: uppercase; + color: #666; + font-size: 11px; + position: absolute; + left: 5px; + top: 5px; +} + +#wp-link #search-results, +#wp-link #search-panel { + display: none; +} + +#wp-link-wrap.search-panel-visible #search-panel { + display: block; +} + +#wp-link .river-waiting { + display: none; + padding: 10px 0; +} + +#wp-link .river-waiting .spinner { + margin: 0 auto; + display: block; + float: none; +} + +#wp-link .submitbox { + padding: 8px 16px; + background: #fcfcfc; + border-top: 1px solid #dfdfdf; + position: absolute; + bottom: 0; + right: 0; + left: 0; +} + +#wp-link-cancel { + line-height: 25px; +} + +#wp-link-update { + line-height: 23px; + float: left; +} + +#wp-link-submit { + float: left; + margin-bottom: 0; +} + +@media screen and ( max-width: 782px ) { + #wp-link-wrap { + height: 280px; + margin-top: -140px; + } + + #wp-link-wrap.search-panel-visible .query-results { + top: 235px; + } + + #link-selector { + padding: 0 16px 60px; + } + + #wp-link-wrap.search-panel-visible #link-selector { + bottom: 52px; + } + + #wp-link-cancel { + line-height: 32px; + } +} + +@media screen and ( max-width: 520px ) { + #wp-link-wrap { + width: auto; + margin-right: 0; + right: 10px; + left: 10px; + max-width: 500px; + } +} + +@media screen and ( max-height: 520px ) { + #wp-link-wrap { + -webkit-transition: none; + transition: none; + } + + #wp-link-wrap.search-panel-visible { + height: auto; + margin-top: 0; + top: 10px; + bottom: 10px; + } + + .search-panel-visible #link-selector { + overflow: auto; + } + + .search-panel-visible #search-panel .query-results { + position: static; + } +} + +@media screen and ( max-height: 290px ) { + #wp-link-wrap { + height: auto; + margin-top: 0; + top: 10px; + bottom: 10px; + } + + #link-selector { + overflow: auto; + height: -webkit-calc(100% - 92px); + height: calc(100% - 92px); + padding-bottom: 2px; + } + + #search-panel .query-results { + position: static; + } +} + +/* Old TinyMCE 3.x modal */ +/* +.clearlooks2 .mceTop { + border-bottom: 1px solid #ccc; +} + +.clearlooks2 .mceTop span { + font: 13px/24px "Open Sans", sans-serif; + color: #e5e5e5; +} + +.clearlooks2 .mceTop .mceLeft { + background: #444444; + border-color: transparent; +} + +.clearlooks2 .mceTop .mceRight { + background: #444444; + border-color: transparent; +} + +.clearlooks2 .mceMiddle { + clip: rect(24px auto auto auto); +} + +.clearlooks2 .mceMiddle .mceLeft { + background: #f1f1f1; + border-color: transparent; +} + +.clearlooks2 .mceMiddle .mceRight { + background: #f1f1f1; + border-color: transparent; +} + +.clearlooks2 .mceBottom { + background: #f1f1f1; + border-color: transparent; +} + +.clearlooks2 .mceBottom .mceLeft { + background: #f1f1f1; + border-color: transparent; +} + +.clearlooks2 .mceBottom .mceCenter { + background: #f1f1f1; + border-color: transparent; +} + +.clearlooks2 .mceBottom .mceRight { + background: #f1f1f1; + border-color: transparent; +} + +.clearlooks2 .mceClose, +.clearlooks2 .mceFocus .mceClose, +.clearlooks2 .mceFocus .mceClose:hover { + background-image: none; +} +.clearlooks2 .mceClose:before { + content: '\f158'; + font: normal 20px/1 'dashicons'; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + color: #999; + padding-left: 12px; +} + +/* from colors.css +.clearlooks2 { + box-shadow: 0 5px 15px rgba(0,0,0,0.7); +} + +.clearlooks2 .mceMiddle span, +.clearlooks2 .mceMiddle .mceLeft, +.clearlooks2 .mceMiddle .mceRight, +.clearlooks2 .mceBottom, +.clearlooks2 .mceBottom .mceLeft, +.clearlooks2 .mceBottom .mceCenter, +.clearlooks2 .mceBottom .mceRight { + background-color: #fcfcfc; +} + +.clearlooks2 .mceTop span, +.clearlooks2 .mceFocus .mceTop span { + color: #222; +} + +.clearlooks2 .mceClose:before { + color: #999; +} + +.clearlooks2 .mceClose:hover:before { + color: #2ea2cc; +} +*/ +/* Distraction Free Writing mode + * =Overlay Styles +-------------------------------------------------------------- */ +.fullscreen-overlay { + z-index: 100005; + display: none; + position: fixed; + top: 0; + bottom: 0; + right: 0; + left: 0; + -webkit-filter: inherit; + filter: inherit; +} + +.wp-fullscreen-active .fullscreen-overlay, +.wp-fullscreen-active #wp-fullscreen-body { + display: block; +} + +.fullscreen-fader { + z-index: 200000; +} + +.wp-fullscreen-active .fullscreen-fader, +.wp-core-ui.wp-fullscreen-active .postbox-container { + display: none; +} + +/* =Overlay Body +-------------------------------------------------------------- */ + +#wp-fullscreen-body, +.mce-fullscreen { + z-index: 100010; +} + +#wp-fullscreen-body { + display: none; +} + +.wp-fullscreen-wrap { + margin: 0; + padding: 0; + position: absolute; + right: 0; + left: 0; + bottom: 30px; + top: 60px; + z-index: 100015; +} + +.wp-fullscreen-wrap .wp-editor-container, +.wp-fullscreen-title, +#wp-fullscreen-central-toolbar { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + max-width: 100%; +} + +.wp-fullscreen-active .wp-editor-tools, +.wp-fullscreen-active .quicktags-toolbar, +.wp-fullscreen-active .mce-toolbar-grp, +.wp-fullscreen-active .mce-statusbar { + display: none; +} + +#wp-fullscreen-statusbar { + position: fixed; + right: 0; + left: 0; + bottom: 0; + height: 30px; + z-index: 100020; + background: #fff; + -webkit-transition: height 0.2s; + transition: height 0.2s; +} + +#wp-fullscreen-status { + margin: 0 auto; + padding: 0; +} + +.wp-fullscreen-active .wp-fullscreen-title, +.wp-fullscreen-active .wp-fullscreen-title:focus, +.wp-fullscreen-active .wp-editor-container { + -webkit-border-radius: 0; + border-radius: 0; + border: 1px dashed transparent; + background: transparent; + -webkit-box-shadow: none; + box-shadow: none; + -webkit-transition: border-color 0.4s; + transition: border-color 0.4s; +} + +.wp-fullscreen-active .wp-editor-container { + margin: 0 auto 40px; +} + +.wp-fullscreen-active .wp-fullscreen-title { + font-size: 1.7em; + line-height: 100%; + outline: medium none; + padding: 3px 7px; + margin: 10px auto 30px; + display: block; +} + +#wp-fullscreen-tagline { + color: #888; + font-size: 18px; + float: left; + padding: 4px 0 0; +} + +/* =Top bar +-------------------------------------------------------------- */ +#fullscreen-topbar { + background: #f5f5f5; + border-bottom: 1px solid #dedede; + height: 45px; + position: fixed; + right: 0; + left: 0; + top: 0; + width: 100%; + z-index: 100020; + -webkit-transition: opacity 0.4s; + transition: opacity 0.4s; +} + +#wp-fullscreen-toolbar { + padding: 6px 10px 0; + clear: both; + max-width: 1100px; + margin: 0 auto; +} + +#wp-fullscreen-mode-bar, +#wp-fullscreen-button-bar, +#wp-fullscreen-close { + float: right; +} + +#wp-fullscreen-count, +#wp-fullscreen-tagline { + display: inline-block; +} + +#wp-fullscreen-button-bar { + margin-top: 2px; +} + +#wp-fullscreen-save { + float: left; + padding: 2px 0 0; + min-width: 95px; +} + +#wp-fullscreen-count, +#wp-fullscreen-close { + padding: 5px 0 0; +} + +#wp-fullscreen-central-toolbar { + margin: auto; + padding: 0; + min-width: 620px; +} + +#wp-fullscreen-buttons > div { + float: right; +} + +#wp-fullscreen-mode-bar { + padding: 3px 0 0 14px; +} + +#wp-fullscreen-buttons .hidden { + display: none; +} + +#wp-fullscreen-buttons .disabled { + opacity: 0.5; +} + +#wp-fullscreen-buttons .mce-btn button { + margin: 0; + outline: 0 none; + border: 0 none; + white-space: nowrap; + width: auto; + background: none; + color: #333333; + cursor: pointer; + font-size: 18px; + line-height: 20px; + overflow: visible; + text-align: center; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.wp-html-mode #wp-fullscreen-buttons div { + display: none; +} + +.wp-html-mode #wp-fullscreen-buttons div.wp-fullscreen-both { + display: block; +} + +#wp-fullscreen-save img { + vertical-align: middle; +} + +#wp-fullscreen-save span { + display: none; + margin: 5px 6px 0; + float: right; +} + +/* =Thickbox Adjustments +-------------------------------------------------------------- */ +.wp-fullscreen-active #TB_overlay { + z-index: 100050; +} + +.wp-fullscreen-active #TB_window { + z-index: 100051; +} + +/* Colors */ +.fullscreen-overlay { + background: #fff; +} + +/* =CSS 3 transitions +-------------------------------------------------------------- */ + +.wp-fullscreen-active #fullscreen-topbar { + -webkit-transition-duration: 0.8s; + transition-duration: 0.8s; + opacity: 0; + filter: alpha(opacity=0); +} + +.wp-fullscreen-active #wp-fullscreen-statusbar { + height: 0; +} + +.wp-fullscreen-active.wp-dfw-show-ui #fullscreen-topbar { + -webkit-transition-duration: 0.4s; + transition-duration: 0.4s; + opacity: 1; + filter: alpha(opacity=100); +} + +.wp-fullscreen-active.wp-dfw-show-ui #wp-fullscreen-statusbar { + height: 29px; + background: #f8f8f8; + border-top: 1px solid #eee; +} + +.wp-fullscreen-active .wp-fullscreen-title, +.wp-fullscreen-active .wp-editor-container { + -webkit-transition-duration: 0.8s; + transition-duration: 0.8s; + border-color: transparent; +} + +.wp-fullscreen-active.wp-dfw-show-ui .wp-fullscreen-title, +.wp-fullscreen-active.wp-dfw-show-ui .wp-editor-container { + -webkit-transition-duration: 0.4s; + transition-duration: 0.4s; + border-color: #ccc; +} + +.fade-1000, +.fade-600, +.fade-400, +.fade-300 { + opacity: 0; + -webkit-transition-property: opacity; + transition-property: opacity; +} + +.fade-1000 { + -webkit-transition-duration: 1s; + transition-duration: 1s; +} + +.fade-600 { + -webkit-transition-duration: 0.6s; + transition-duration: 0.6s; +} + +.fade-400 { + -webkit-transition-duration: 0.4s; + transition-duration: 0.4s; +} + +.fade-300 { + -webkit-transition-duration: 0.3s; + transition-duration: 0.3s; +} + +.fade-trigger { + opacity: 1; +} + +/* DFW on touch screen devices */ +.wp-dfw-touch #fullscreen-topbar { + position: absolute; + opacity: 1; +} + +.wp-dfw-touch .wp-fullscreen-wrap .wp-editor-container, +.wp-dfw-touch .wp-fullscreen-title { + max-width: 700px; +} + +.wp-fullscreen-active.wp-dfw-touch .wp-fullscreen-title, +.wp-fullscreen-active.wp-dfw-touch .wp-editor-container { + border-color: #ccc; +} + +.wp-dfw-touch #wp-fullscreen-statusbar { + height: 30px; +} + +@media screen and ( max-width: 782px ) { + #wp-fullscreen-close, + #wp-fullscreen-central-toolbar, + #wp-fullscreen-mode-bar, + #wp-fullscreen-button-bar, + #wp-fullscreen-save { + display: inline-block; + } + + #fullscreen-topbar { + height: 85px; + } + + #wp-fullscreen-central-toolbar { + width: auto !important; + min-width: 0; + } + + #wp-fullscreen-close { + line-height: 30px; + vertical-align: top; + padding: 0 12px; + } + + #wp-fullscreen-button-bar { + position: absolute; + top: 45px; + right: 0; + } + + .wp-fullscreen-wrap { + top: 95px; + } + + #wp-fullscreen-save { + position: absolute; + left: 10px; + } +} + +@media screen and ( max-width: 480px ) { + #wp_fs_help { + display: none; + } + + .wp-fullscreen-wrap .wp-editor-container, + .wp-fullscreen-title { + width: 480px !important; + } + + body.wp-fullscreen-active { + width: 480px; + overflow: auto; + } + + #fullscreen-topbar, + .wp-fullscreen-wrap { + width: 480px; + } + + #fullscreen-topbar { + position: absolute; + } + + #wp-fullscreen-status { + width: auto !important; + max-width: 100%; + padding: 0 10px; + } +} + +/* =Localization +-------------------------------------------------------------- */ +.rtl .wp-switch-editor, +.rtl .quicktags-toolbar input { + font-family: Tahoma, sans-serif; +} + +/* @noflip */ +.mce-rtl .mce-flow-layout .mce-flow-layout-item > div { + direction: rtl; +} + +/* @noflip */ +.mce-rtl .mce-listbox i.mce-caret { + left: 6px; +} + +html:lang(he-il) .rtl .wp-switch-editor, +html:lang(he-il) .rtl .quicktags-toolbar input { + font-family: Arial, sans-serif; +} + +/* HiDPI */ +@media print, + (-o-min-device-pixel-ratio: 5/4), + (-webkit-min-device-pixel-ratio: 1.25), + (min-resolution: 120dpi) { + .wp-media-buttons .add_media span.wp-media-buttons-icon, + #wp-fullscreen-buttons #wp_fs_image span.mce_image { + background: none; + } +} + +/* TODO: DFW responsive */ diff --git a/wp-includes/css/editor-rtl.min.css b/wp-includes/css/editor-rtl.min.css new file mode 100644 index 0000000..cf18046 --- /dev/null +++ b/wp-includes/css/editor-rtl.min.css @@ -0,0 +1 @@ +.mce-container,.mce-container *,.mce-widget,.mce-widget *{color:inherit;font-family:inherit}#mce-modal-block.mce-in{opacity:.7;filter:alpha(opacity=70)}.mce-window{-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3);-webkit-font-smoothing:subpixel-antialiased}.mce-window .mce-container-body.mce-abs-layout{overflow:visible}.mce-window .mce-window-head{background:#fcfcfc;border-bottom:1px solid #dfdfdf;padding:0;min-height:36px}.mce-window .mce-window-head .mce-title{color:#444;font-size:18px;font-weight:600;line-height:36px;margin:0;padding:0 16px 0 36px}.mce-window .mce-window-head .mce-close{color:transparent;top:0;left:0;width:36px;height:36px;line-height:36px;text-align:center}.mce-window .mce-window-head .mce-close:before{font:400 20px/36px dashicons;text-align:center;color:#666;width:36px;height:36px;display:block}.mce-window .mce-window-head .mce-close:hover:before{color:#2ea2cc}.mce-window .mce-window-head .mce-dragh{width:-webkit-calc(100% - 36px);width:calc(100% - 36px)}.mce-wp-help .mce-window-head{border-bottom:0}.mce-checkbox i.mce-i-checkbox,.mce-textbox{border:1px solid #ddd;-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}.mce-checkbox:focus i.mce-i-checkbox,.mce-textbox.mce-focus,.mce-textbox:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}.mce-floatpanel.mce-popover,.mce-menu{border-color:rgba(0,0,0,.15);-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}.mce-floatpanel.mce-popover.mce-bottom{margin-top:2px}.mce-floatpanel .mce-arrow{display:none}.mce-menu .mce-container-body{min-width:160px}.mce-menu-item{border:0;margin-bottom:2px}.mce-menu-has-icons i.mce-ico{line-height:20px}div.mce-panel{border:0;background:#fff;-webkit-filter:none;filter:none}.mce-panel.mce-menu{border:1px solid #ddd}div.mce-tab{line-height:13px}div.mce-toolbar-grp{border-bottom:1px solid #dedede;background:#f5f5f5;padding:3px;position:relative}.has-dfw div.mce-toolbar-grp .mce-toolbar.mce-first{padding-left:32px}.mce-toolbar .mce-btn-group{margin:0}div.mce-statusbar{border-top:1px solid #eee}div.mce-path{padding:0 8px 2px;margin:0}.mce-toolbar .mce-btn,.qt-fullscreen{border-color:transparent;background:0 0;-webkit-box-shadow:none;box-shadow:none;text-shadow:none;cursor:pointer}#wp-fullscreen-buttons .mce-btn,.mce-toolbar .mce-btn-group .mce-btn,.qt-fullscreen{border:1px solid transparent;margin:2px;background-image:none;-webkit-border-radius:2px;border-radius:2px;-webkit-filter:none;filter:none}#wp-fullscreen-buttons .mce-btn:focus,#wp-fullscreen-buttons .mce-btn:hover,.mce-toolbar .mce-btn-group .mce-btn:focus,.mce-toolbar .mce-btn-group .mce-btn:hover,.qt-fullscreen:focus,.qt-fullscreen:hover{background:#fafafa;border-color:#999;color:#222;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08)}#wp-fullscreen-buttons .mce-btn.mce-active,#wp-fullscreen-buttons .mce-btn:active,.mce-toolbar .mce-btn-group .mce-btn.mce-active,.mce-toolbar .mce-btn-group .mce-btn:active{background:#ebebeb;border-color:#999;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.3);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.3)}.mce-toolbar .mce-btn-group .mce-btn.mce-active:hover{border-color:#555}.mce-toolbar .mce-btn-group .mce-btn.mce-active:hover i.mce-ico{color:#555}#wp-fullscreen-buttons .mce-btn.mce-disabled:focus,#wp-fullscreen-buttons .mce-btn.mce-disabled:hover,.mce-toolbar .mce-btn-group .mce-btn.mce-disabled:focus,.mce-toolbar .mce-btn-group .mce-btn.mce-disabled:hover{color:#aaa;background:0 0;border-color:#ddd;text-shadow:0 1px 0 #fff;-webkit-box-shadow:none;box-shadow:none}.mce-toolbar .mce-btn-group .mce-first,.mce-toolbar .mce-btn-group .mce-last{border-color:transparent}.mce-toolbar .mce-btn button,.qt-fullscreen{padding:2px 3px;line-height:normal}.mce-toolbar .mce-btn i{text-shadow:none}.mce-toolbar .mce-btn-group>div{white-space:normal}.mce-toolbar .mce-colorbutton .mce-open{border-left:0}.mce-toolbar .mce-colorbutton .mce-preview{margin-right:-17px;padding:0;width:18px}.mce-toolbar .mce-btn-group .mce-btn.mce-listbox{-webkit-border-radius:0;border-radius:0;direction:rtl;background:#fff;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 1px -1px rgba(0,0,0,.2);box-shadow:inset 0 1px 1px -1px rgba(0,0,0,.2)}.mce-toolbar .mce-btn-group .mce-btn.mce-listbox:hover{background-image:none;border-color:#bbb}.mce-toolbar .mce-btn-group .mce-btn.mce-listbox span{font-size:13px}.mce-panel .mce-btn i.mce-caret{border-top:6px solid #777;margin-right:2px;margin-left:2px}.mce-listbox i.mce-caret{left:6px}.mce-panel .mce-btn button.mce-open i.mce-caret,.mce-panel .mce-btn.mce-listbox i.mce-caret{margin-right:0;margin-left:0}.mce-panel .mce-btn:hover i.mce-caret{border-top-color:#333}.mce-panel .mce-active i.mce-caret{border-top:0;border-bottom:6px solid #333;margin-top:7px}.mce-listbox.mce-active i.mce-caret{margin-top:-3px}.mce-toolbar .mce-splitbtn:hover .mce-open{border-left-color:transparent}.mce-toolbar .mce-splitbtn .mce-open.mce-active{-webkit-box-shadow:none;box-shadow:none}.mce-menu .mce-menu-item-normal.mce-active{background-color:#e5e5e5;-webkit-filter:none;filter:none}.mce-menu .mce-menu-item.mce-selected,.mce-menu .mce-menu-item:focus,.mce-menu .mce-menu-item:hover{color:#000;background-color:#bbb;background-image:none;-webkit-filter:none;filter:none}.mce-menu .mce-menu-item.mce-active:hover .mce-text,.mce-menu .mce-menu-item.mce-selected .mce-ico,.mce-menu .mce-menu-item.mce-selected .mce-text,.mce-menu .mce-menu-item:focus .mce-ico,.mce-menu .mce-menu-item:hover .mce-ico,.mce-menu .mce-menu-item:hover .mce-text{color:#000}.mce-menubar{border-color:#e5e5e5}.mce-menubar .mce-btn:focus{outline:0}.mce-menu-item-sep:hover,div.mce-menu .mce-menu-item-sep{margin:5px 0 4px}.mce-menubtn span{margin-left:0;padding-right:3px}.mce-menu-has-icons i.mce-ico:before{margin-right:-2px}.mce-primary button,.mce-primary button i{text-align:center;color:#fff;text-shadow:none;padding:0;line-height:26px}.mce-window .mce-btn{color:#555;background:#f7f7f7;text-decoration:none;font-size:13px;line-height:26px;height:28px;margin:0;padding:0;cursor:pointer;border:1px solid #ccc;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);background-image:none}.mce-window .mce-btn::-moz-focus-inner{border-width:1px 0;border-style:solid none;border-color:transparent;padding:0}.mce-window .mce-btn:hover{background:#fafafa;border-color:#999;color:#222}.mce-window .mce-btn:focus{-webkit-box-shadow:1px 1px 1px rgba(0,0,0,.2);box-shadow:1px 1px 1px rgba(0,0,0,.2)}.mce-window .mce-btn:active{background:#eee;border-color:#999;color:#333;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.mce-window .mce-btn.mce-disabled{color:#aaa;border-color:#ddd;-webkit-box-shadow:none;box-shadow:none;text-shadow:0 1px 0 #fff;cursor:default}.mce-window .mce-btn.mce-primary{background:#2ea2cc;border-color:#0074a2;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);color:#fff;text-decoration:none}.mce-window .mce-btn.mce-primary:hover{background:#1e8cbe;border-color:#0074a2;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.6);box-shadow:inset 0 1px 0 rgba(120,200,230,.6);color:#fff}.mce-window .mce-btn.mce-primary:focus{border-color:#0e3950;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.6),1px 1px 2px rgba(0,0,0,.4);box-shadow:inset 0 1px 0 rgba(120,200,230,.6),1px 1px 2px rgba(0,0,0,.4)}.mce-window .mce-btn.mce-primary:active{background:#1b7aa6;border-color:#005684;color:rgba(255,255,255,.95);-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(0,0,0,.1)}.mce-window .mce-btn.mce-primary.mce-disabled{color:#94cde7;background:#298cba;border-color:#1b607f;text-shadow:0 -1px 0 rgba(0,0,0,.1)}.mce-menubtn.mce-fixed-width button span{max-width:80px;padding-left:16px}.mce-charmap{margin:3px}.mce-charmap td{padding:0;border-color:#dfdfdf;cursor:pointer}.mce-charmap td:hover{background:#f3f3f3}.mce-charmap td div{width:18px;height:22px;line-height:22px}.mce-tooltip{margin-top:2px}.mce-tooltip-inner{-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2);color:#fff;font-size:12px}.mce-ico{font-family:tinymce,Arial}.mce-btn-small .mce-ico{font-family:tinymce-small,Arial}.mce-toolbar .mce-ico{color:#777;line-height:20px;width:20px;height:20px;text-align:center;text-shadow:none;margin:0;padding:0}.qt-fullscreen{color:#777;line-height:20px;width:28px;height:26px;text-align:center;text-shadow:none}.mce-toolbar .mce-btn .mce-open{line-height:20px}.mce-toolbar .mce-btn.mce-active .mce-open,.mce-toolbar .mce-btn:focus .mce-open,.mce-toolbar .mce-btn:hover .mce-open{border-right-color:#999}.mce-close,i.mce-i-aligncenter,i.mce-i-alignjustify,i.mce-i-alignleft,i.mce-i-alignright,i.mce-i-blockquote,i.mce-i-bold,i.mce-i-bullist,i.mce-i-charmap,i.mce-i-forecolor,i.mce-i-fullscreen,i.mce-i-help,i.mce-i-hr,i.mce-i-indent,i.mce-i-italic,i.mce-i-link,i.mce-i-ltr,i.mce-i-numlist,i.mce-i-outdent,i.mce-i-pastetext,i.mce-i-pasteword,i.mce-i-redo,i.mce-i-removeformat,i.mce-i-spellchecker,i.mce-i-strikethrough,i.mce-i-underline,i.mce-i-undo,i.mce-i-unlink,i.mce-i-wp-media-library,i.mce-i-wp_adv,i.mce-i-wp_fullscreen,i.mce-i-wp_help,i.mce-i-wp_more,i.mce-i-wp_page{font:400 20px/1 dashicons;padding:0;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-right:-2px;padding-left:2px}.qt-fullscreen{font:400 20px/1 dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}i.mce-i-bold:before{content:'\f200'}i.mce-i-italic:before{content:'\f201'}i.mce-i-bullist:before{content:'\f203'}i.mce-i-numlist:before{content:'\f204'}i.mce-i-blockquote:before{content:'\f205'}i.mce-i-alignleft:before{content:'\f206'}i.mce-i-aligncenter:before{content:'\f207'}i.mce-i-alignright:before{content:'\f208'}i.mce-i-link:before{content:'\f103'}i.mce-i-unlink:before{content:'\f225'}i.mce-i-wp_more:before{content:'\f209'}i.mce-i-strikethrough:before{content:'\f224'}i.mce-i-spellchecker:before{content:'\f210'}.qt-fullscreen:before,i.mce-i-fullscreen:before,i.mce-i-wp_fullscreen:before{content:'\f211'}i.mce-i-wp_adv:before{content:'\f212'}i.mce-i-underline:before{content:'\f213'}i.mce-i-alignjustify:before{content:'\f214'}i.mce-i-forecolor:before{content:'\f215'}i.mce-i-pastetext:before{content:'\f217'}i.mce-i-removeformat:before{content:'\f218'}i.mce-i-charmap:before{content:'\f220'}i.mce-i-outdent:before{content:'\f221'}i.mce-i-indent:before{content:'\f222'}i.mce-i-undo:before{content:'\f171'}i.mce-i-redo:before{content:'\f172'}i.mce-i-help:before,i.mce-i-wp_help:before{content:'\f223'}i.mce-i-wp-media-library:before{content:'\f104'}i.mce-i-ltr:before{content:'\f320'}i.mce-i-wp_page:before{content:'\f105'}i.mce-i-hr:before{content:'\f460'}.mce-close:before{content:'\f158'}.mce-i-wp_code:before{content:'\e017'}.wp-editor-wrap{position:relative}.wp-editor-tools{position:relative;z-index:1}.wp-editor-container{clear:both}.wp-editor-area{font-family:Consolas,Monaco,monospace;font-size:13px;padding:10px;margin:1px 0 0;line-height:150%;border:0 none;outline:0;display:block;resize:vertical;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-editor-tools{padding:0}.wp-editor-container textarea.wp-editor-area{width:100%;margin:0;-webkit-box-shadow:none;box-shadow:none}.wp-editor-tabs{float:left}.wp-switch-editor{background:#ebebeb;border:1px solid #dedede;color:#777;cursor:pointer;float:left;font:13px/19px "Open Sans",sans-serif;height:19px;margin:5px 5px 0 0;padding:3px 8px 4px;position:relative;top:1px}.wp-switch-editor:active{background-color:#f1f1f1}.wp-switch-editor:hover{text-decoration:none!important;background:#fff}.js .tmce-active .wp-editor-area{color:#fff}.tmce-active .quicktags-toolbar{display:none}.html-active .switch-html,.tmce-active .switch-tmce{background:#f5f5f5;color:#555;height:20px;border-bottom:0}.wp-media-buttons{float:right}.wp-media-buttons .button{margin-left:5px;margin-bottom:4px;padding-right:7px;padding-left:7px}.wp-media-buttons .button:active{position:relative;top:1px;margin-top:-1px;margin-bottom:1px}.wp-media-buttons .insert-media{padding-right:5px}.wp-media-buttons a{text-decoration:none;color:#464646;font-size:12px}.wp-media-buttons img{padding:0 4px;vertical-align:middle}.wp-media-buttons span.wp-media-buttons-icon{display:inline-block;width:18px;height:18px;vertical-align:text-top;margin:0 2px}.wp-media-buttons .add_media span.wp-media-buttons-icon{background:0 0}.wp-media-buttons .add_media span.wp-media-buttons-icon:before{font:400 18px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:'\f104'}.quicktags-toolbar{padding:3px;position:relative;border-bottom:1px solid #dedede;background:#f5f5f5}.has-dfw .quicktags-toolbar{padding-left:35px}.wp-core-ui .quicktags-toolbar input.button.button-small{margin:2px}.quicktags-toolbar input[value=link]{text-decoration:underline}.quicktags-toolbar input[value=del]{text-decoration:line-through}.quicktags-toolbar input[value="i"]{font-style:italic}.quicktags-toolbar input[value="b"]{font-weight:700}.mce-toolbar .mce-btn-group .mce-btn.mce-wp-fullscreen,.qt-fullscreen{position:absolute;top:0;left:0;margin-top:5px;margin-left:5px}@media screen and (max-width:782px){.mce-toolbar .mce-btn button,.qt-fullscreen{padding:7px 8px}.qt-fullscreen{width:38px;height:34px}.mce-toolbar .mce-colorbutton .mce-preview{margin-right:-21px}.mce-window .mce-btn{padding:2px 0}.quicktags-toolbar,div.mce-toolbar-grp{padding-left:46px}}@media screen and (min-width:782px){.wp-core-ui .quicktags-toolbar input.button.button-small{font-size:12px;height:26px;line-height:24px}}#wp_editbtns,#wp_gallerybtns{padding:2px;position:absolute;display:none;z-index:100020}#wp_delgallery,#wp_delimgbtn,#wp_editgallery,#wp_editimgbtn{border-color:#999;background-color:#eee;margin:2px;padding:2px;border-width:1px;border-style:solid;-webkit-border-radius:3px;border-radius:3px}#wp_delgallery:hover,#wp_delimgbtn:hover,#wp_editgallery:hover,#wp_editimgbtn:hover{border-color:#555;background-color:#ccc}#wp-link-wrap{display:none;background-color:#fff;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3);width:500px;height:250px;overflow:hidden;margin-right:-250px;margin-top:-125px;position:fixed;top:50%;right:50%;z-index:100105;-webkit-transition:height .2s,margin-top .2s;transition:height .2s,margin-top .2s}#wp-link-backdrop{display:none;position:fixed;top:0;right:0;left:0;bottom:0;min-height:360px;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:100100}#wp-link{position:relative;height:100%}#wp-link-wrap.search-panel-visible{height:500px;margin-top:-250px}#link-modal-title{background:#fcfcfc;border-bottom:1px solid #dfdfdf;height:36px;font-size:18px;font-weight:600;line-height:36px;padding:0 16px 0 36px;top:0;left:0;right:0}#wp-link-close{color:#666;cursor:pointer;padding:0;position:absolute;top:0;left:0;width:36px;height:36px;text-align:center}#wp-link-close:before{font:400 20px/36px dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:36px;height:36px;content:'\f158'}#wp-link-close:focus,#wp-link-close:hover{color:#2ea2cc}#link-selector{padding:0 16px 50px}#wp-link-wrap.search-panel-visible #link-selector{padding:0 16px;position:absolute;top:36px;right:0;left:0;bottom:44px}#wp-link ol,#wp-link ul{list-style:none;margin:0;padding:0}#wp-link-search-toggle::after{font:400 20px/1 dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:'\f140'}.search-panel-visible #wp-link-search-toggle::after{content:'\f142'}#wp-link input[type=text]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wp-link #link-options{padding:8px 0 12px}#wp-link p.howto{margin:3px 0}#wp-link-search-toggle{cursor:pointer}#wp-link label input[type=text]{margin-top:5px;width:70%}#wp-link #link-options label span,#wp-link #search-panel label span.search-label{display:inline-block;width:80px;text-align:left;padding-left:5px;max-width:24%}#wp-link .link-search-field{float:right;width:250px;max-width:70%}#wp-link .link-search-wrapper{margin:5px 0 9px;display:block;overflow:hidden}#wp-link .link-search-wrapper span{float:right;margin-top:4px}#wp-link .link-search-wrapper .spinner{display:none;vertical-align:text-bottom}#wp-link .link-target{padding:3px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#wp-link .link-target label{max-width:70%}#wp-link .query-results{border:1px #dfdfdf solid;margin:0;background:#fff;overflow:auto;position:absolute;right:16px;left:16px;bottom:16px;top:205px}#wp-link .query-notice,#wp-link li{clear:both;margin-bottom:0;border-bottom:1px solid #f1f1f1;color:#333;padding:4px 6px;cursor:pointer;position:relative}#wp-link li:hover{background:#eaf2fa;color:#151515}#wp-link li.unselectable{border-bottom:1px solid #dfdfdf}#wp-link li.unselectable:hover{background:#fff;cursor:auto;color:#333}#wp-link li.selected{background:#ddd;color:#333}#wp-link li.selected .item-title{font-weight:700}#wp-link li:last-child{border:0}#wp-link .item-title{display:inline-block;width:80%;width:-webkit-calc(100% - 68px);width:calc(100% - 68px)}#wp-link .item-info{text-transform:uppercase;color:#666;font-size:11px;position:absolute;left:5px;top:5px}#wp-link #search-panel,#wp-link #search-results{display:none}#wp-link-wrap.search-panel-visible #search-panel{display:block}#wp-link .river-waiting{display:none;padding:10px 0}#wp-link .river-waiting .spinner{margin:0 auto;display:block;float:none}#wp-link .submitbox{padding:8px 16px;background:#fcfcfc;border-top:1px solid #dfdfdf;position:absolute;bottom:0;right:0;left:0}#wp-link-cancel{line-height:25px}#wp-link-update{line-height:23px;float:left}#wp-link-submit{float:left;margin-bottom:0}@media screen and (max-width:782px){#wp-link-wrap{height:280px;margin-top:-140px}#wp-link-wrap.search-panel-visible .query-results{top:235px}#link-selector{padding:0 16px 60px}#wp-link-wrap.search-panel-visible #link-selector{bottom:52px}#wp-link-cancel{line-height:32px}}@media screen and (max-width:520px){#wp-link-wrap{width:auto;margin-right:0;right:10px;left:10px;max-width:500px}}@media screen and (max-height:520px){#wp-link-wrap{-webkit-transition:none;transition:none}#wp-link-wrap.search-panel-visible{height:auto;margin-top:0;top:10px;bottom:10px}.search-panel-visible #link-selector{overflow:auto}.search-panel-visible #search-panel .query-results{position:static}}@media screen and (max-height:290px){#wp-link-wrap{height:auto;margin-top:0;top:10px;bottom:10px}#link-selector{overflow:auto;height:-webkit-calc(100% - 92px);height:calc(100% - 92px);padding-bottom:2px}#search-panel .query-results{position:static}}.fullscreen-overlay{z-index:100005;display:none;position:fixed;top:0;bottom:0;right:0;left:0;-webkit-filter:inherit;filter:inherit}.wp-fullscreen-active #wp-fullscreen-body,.wp-fullscreen-active .fullscreen-overlay{display:block}.fullscreen-fader{z-index:200000}.wp-core-ui.wp-fullscreen-active .postbox-container,.wp-fullscreen-active .fullscreen-fader{display:none}#wp-fullscreen-body,.mce-fullscreen{z-index:100010}#wp-fullscreen-body{display:none}.wp-fullscreen-wrap{margin:0;padding:0;position:absolute;right:0;left:0;bottom:30px;top:60px;z-index:100015}#wp-fullscreen-central-toolbar,.wp-fullscreen-title,.wp-fullscreen-wrap .wp-editor-container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;max-width:100%}.wp-fullscreen-active .mce-statusbar,.wp-fullscreen-active .mce-toolbar-grp,.wp-fullscreen-active .quicktags-toolbar,.wp-fullscreen-active .wp-editor-tools{display:none}#wp-fullscreen-statusbar{position:fixed;right:0;left:0;bottom:0;height:30px;z-index:100020;background:#fff;-webkit-transition:height .2s;transition:height .2s}#wp-fullscreen-status{margin:0 auto;padding:0}.wp-fullscreen-active .wp-editor-container,.wp-fullscreen-active .wp-fullscreen-title,.wp-fullscreen-active .wp-fullscreen-title:focus{-webkit-border-radius:0;border-radius:0;border:1px dashed transparent;background:0 0;-webkit-box-shadow:none;box-shadow:none;-webkit-transition:border-color .4s;transition:border-color .4s}.wp-fullscreen-active .wp-editor-container{margin:0 auto 40px}.wp-fullscreen-active .wp-fullscreen-title{font-size:1.7em;line-height:100%;outline:medium none;padding:3px 7px;margin:10px auto 30px;display:block}#wp-fullscreen-tagline{color:#888;font-size:18px;float:left;padding:4px 0 0}#fullscreen-topbar{background:#f5f5f5;border-bottom:1px solid #dedede;height:45px;position:fixed;right:0;left:0;top:0;width:100%;z-index:100020;-webkit-transition:opacity .4s;transition:opacity .4s}#wp-fullscreen-toolbar{padding:6px 10px 0;clear:both;max-width:1100px;margin:0 auto}#wp-fullscreen-button-bar,#wp-fullscreen-close,#wp-fullscreen-mode-bar{float:right}#wp-fullscreen-count,#wp-fullscreen-tagline{display:inline-block}#wp-fullscreen-button-bar{margin-top:2px}#wp-fullscreen-save{float:left;padding:2px 0 0;min-width:95px}#wp-fullscreen-close,#wp-fullscreen-count{padding:5px 0 0}#wp-fullscreen-central-toolbar{margin:auto;padding:0;min-width:620px}#wp-fullscreen-buttons>div{float:right}#wp-fullscreen-mode-bar{padding:3px 0 0 14px}#wp-fullscreen-buttons .hidden{display:none}#wp-fullscreen-buttons .disabled{opacity:.5}#wp-fullscreen-buttons .mce-btn button{margin:0;outline:0 none;border:0 none;white-space:nowrap;width:auto;background:0 0;color:#333;cursor:pointer;font-size:18px;line-height:20px;overflow:visible;text-align:center;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-html-mode #wp-fullscreen-buttons div{display:none}.wp-html-mode #wp-fullscreen-buttons div.wp-fullscreen-both{display:block}#wp-fullscreen-save img{vertical-align:middle}#wp-fullscreen-save span{display:none;margin:5px 6px 0;float:right}.wp-fullscreen-active #TB_overlay{z-index:100050}.wp-fullscreen-active #TB_window{z-index:100051}.fullscreen-overlay{background:#fff}.wp-fullscreen-active #fullscreen-topbar{-webkit-transition-duration:.8s;transition-duration:.8s;opacity:0;filter:alpha(opacity=0)}.wp-fullscreen-active #wp-fullscreen-statusbar{height:0}.wp-fullscreen-active.wp-dfw-show-ui #fullscreen-topbar{-webkit-transition-duration:.4s;transition-duration:.4s;opacity:1;filter:alpha(opacity=100)}.wp-fullscreen-active.wp-dfw-show-ui #wp-fullscreen-statusbar{height:29px;background:#f8f8f8;border-top:1px solid #eee}.wp-fullscreen-active .wp-editor-container,.wp-fullscreen-active .wp-fullscreen-title{-webkit-transition-duration:.8s;transition-duration:.8s;border-color:transparent}.wp-fullscreen-active.wp-dfw-show-ui .wp-editor-container,.wp-fullscreen-active.wp-dfw-show-ui .wp-fullscreen-title{-webkit-transition-duration:.4s;transition-duration:.4s;border-color:#ccc}.fade-1000,.fade-300,.fade-400,.fade-600{opacity:0;-webkit-transition-property:opacity;transition-property:opacity}.fade-1000{-webkit-transition-duration:1s;transition-duration:1s}.fade-600{-webkit-transition-duration:.6s;transition-duration:.6s}.fade-400{-webkit-transition-duration:.4s;transition-duration:.4s}.fade-300{-webkit-transition-duration:.3s;transition-duration:.3s}.fade-trigger{opacity:1}.wp-dfw-touch #fullscreen-topbar{position:absolute;opacity:1}.wp-dfw-touch .wp-fullscreen-title,.wp-dfw-touch .wp-fullscreen-wrap .wp-editor-container{max-width:700px}.wp-fullscreen-active.wp-dfw-touch .wp-editor-container,.wp-fullscreen-active.wp-dfw-touch .wp-fullscreen-title{border-color:#ccc}.wp-dfw-touch #wp-fullscreen-statusbar{height:30px}@media screen and (max-width:782px){#wp-fullscreen-button-bar,#wp-fullscreen-central-toolbar,#wp-fullscreen-close,#wp-fullscreen-mode-bar,#wp-fullscreen-save{display:inline-block}#fullscreen-topbar{height:85px}#wp-fullscreen-central-toolbar{width:auto!important;min-width:0}#wp-fullscreen-close{line-height:30px;vertical-align:top;padding:0 12px}#wp-fullscreen-button-bar{position:absolute;top:45px;right:0}.wp-fullscreen-wrap{top:95px}#wp-fullscreen-save{position:absolute;left:10px}}@media screen and (max-width:480px){#wp_fs_help{display:none}.wp-fullscreen-title,.wp-fullscreen-wrap .wp-editor-container{width:480px!important}body.wp-fullscreen-active{width:480px;overflow:auto}#fullscreen-topbar,.wp-fullscreen-wrap{width:480px}#fullscreen-topbar{position:absolute}#wp-fullscreen-status{width:auto!important;max-width:100%;padding:0 10px}}.rtl .quicktags-toolbar input,.rtl .wp-switch-editor{font-family:Tahoma,sans-serif}.mce-rtl .mce-flow-layout .mce-flow-layout-item>div{direction:rtl}.mce-rtl .mce-listbox i.mce-caret{left:6px}html:lang(he-il) .rtl .quicktags-toolbar input,html:lang(he-il) .rtl .wp-switch-editor{font-family:Arial,sans-serif}@media print,(-o-min-device-pixel-ratio:5/4),(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){#wp-fullscreen-buttons #wp_fs_image span.mce_image,.wp-media-buttons .add_media span.wp-media-buttons-icon{background:0 0}} \ No newline at end of file diff --git a/wp-includes/css/editor.css b/wp-includes/css/editor.css new file mode 100644 index 0000000..57f78d1 --- /dev/null +++ b/wp-includes/css/editor.css @@ -0,0 +1,1888 @@ +/*------------------------------------------------------------------------------ + TinyMCE and Quicklinks toolbars +------------------------------------------------------------------------------*/ + +/* TinyMCE widgets/containers */ + +.mce-container, +.mce-container *, +.mce-widget, +.mce-widget * { + color: inherit; + font-family: inherit; +} + +/* TinyMCE windows */ +#mce-modal-block.mce-in { + opacity: 0.7; + filter: alpha(opacity=70); +} + +.mce-window { + -webkit-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); + box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); + -webkit-font-smoothing: subpixel-antialiased; +} + +.mce-window .mce-container-body.mce-abs-layout { + overflow: visible; +} + +.mce-window .mce-window-head { + background: #fcfcfc; + border-bottom: 1px solid #dfdfdf; + padding: 0; + min-height: 36px; +} + +.mce-window .mce-window-head .mce-title { + color: #444; + font-size: 18px; + font-weight: 600; + line-height: 36px; + margin: 0; + padding: 0 36px 0 16px; +} + +.mce-window .mce-window-head .mce-close { + color: transparent; + top: 0; + right: 0; + width: 36px; + height: 36px; + line-height: 36px; + text-align: center; +} + +.mce-window .mce-window-head .mce-close:before { + font: normal 20px/36px 'dashicons'; + text-align: center; + color: #666; + width: 36px; + height: 36px; + display: block; +} + +.mce-window .mce-window-head .mce-close:hover:before { + color: #2ea2cc; +} + +.mce-window .mce-window-head .mce-dragh { + width: -webkit-calc( 100% - 36px ); + width: calc( 100% - 36px ); +} + +.mce-wp-help .mce-window-head { + border-bottom: none; +} + +.mce-textbox, +.mce-checkbox i.mce-i-checkbox { + border: 1px solid #ddd; + -webkit-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.07); + box-shadow: inset 0 1px 2px rgba(0,0,0,0.07); + -webkit-transition: .05s border-color ease-in-out; + transition: .05s border-color ease-in-out; +} + +.mce-textbox:focus, +.mce-textbox.mce-focus, +.mce-checkbox:focus i.mce-i-checkbox { + border-color: #5b9dd9; + -webkit-box-shadow: 0 0 2px rgba(30,140,190,0.8); + box-shadow: 0 0 2px rgba(30,140,190,0.8); +} + +/* TinyMCE menus */ +.mce-menu, +.mce-floatpanel.mce-popover { + border-color: rgba(0,0,0,0.15); + -webkit-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: 0 3px 5px rgba( 0, 0, 0, 0.2 ); + box-shadow: 0 3px 5px rgba( 0, 0, 0, 0.2 ); +} + +.mce-floatpanel.mce-popover.mce-bottom { + margin-top: 2px; +} + +.mce-floatpanel .mce-arrow { + display: none; +} + +.mce-menu .mce-container-body { + min-width: 160px; +} + +.mce-menu-item { + border: none; + margin-bottom: 2px; +} + +.mce-menu-has-icons i.mce-ico { + line-height: 20px; +} + +/* TinyMCE panel */ +div.mce-panel { + border: 0; + background: #fff; + -webkit-filter: none; + filter: none; +} + +.mce-panel.mce-menu { + border: 1px solid #ddd; +} + +div.mce-tab { + line-height: 13px; +} + +/* TinyMCE toolbars */ +div.mce-toolbar-grp { + border-bottom: 1px solid #dedede; + background: #f5f5f5; + padding: 3px; + position: relative; +} + +.has-dfw div.mce-toolbar-grp .mce-toolbar.mce-first { + padding-right: 32px; +} + +.mce-toolbar .mce-btn-group { + margin: 0; +} + +div.mce-statusbar { + border-top: 1px solid #eee; +} + +div.mce-path { + padding: 0 8px 2px; + margin: 0; +} + +.mce-toolbar .mce-btn, +.qt-fullscreen { + border-color: transparent; + background: transparent; + -webkit-box-shadow: none; + box-shadow: none; + text-shadow: none; + cursor: pointer; +} + +#wp-fullscreen-buttons .mce-btn, +.mce-toolbar .mce-btn-group .mce-btn, +.qt-fullscreen { + border: 1px solid transparent; + margin: 2px; + background-image: none; + -webkit-border-radius: 2px; + border-radius: 2px; + -webkit-filter: none; + filter: none; +} + +#wp-fullscreen-buttons .mce-btn:hover, +.mce-toolbar .mce-btn-group .mce-btn:hover, +#wp-fullscreen-buttons .mce-btn:focus, +.mce-toolbar .mce-btn-group .mce-btn:focus, +.qt-fullscreen:hover, +.qt-fullscreen:focus { + background: #fafafa; + border-color: #999; + color: #222; + -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba( 0, 0, 0, 0.08 ); + box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba( 0, 0, 0, 0.08 ); +} + +.mce-toolbar .mce-btn-group .mce-btn.mce-active, +#wp-fullscreen-buttons .mce-btn.mce-active, +.mce-toolbar .mce-btn-group .mce-btn:active, +#wp-fullscreen-buttons .mce-btn:active { + background: #ebebeb; + border-color: #999; + -webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.3 ); + box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.3 ); +} + +.mce-toolbar .mce-btn-group .mce-btn.mce-active:hover { + border-color: #555; +} + +.mce-toolbar .mce-btn-group .mce-btn.mce-active:hover i.mce-ico { + color: #555; +} + +.mce-toolbar .mce-btn-group .mce-btn.mce-disabled:hover, +#wp-fullscreen-buttons .mce-btn.mce-disabled:hover, +.mce-toolbar .mce-btn-group .mce-btn.mce-disabled:focus, +#wp-fullscreen-buttons .mce-btn.mce-disabled:focus { + color: #aaa; + background: none; + border-color: #ddd; + text-shadow: 0 1px 0 #fff; + -webkit-box-shadow: none; + box-shadow: none; +} + +.mce-toolbar .mce-btn-group .mce-first, +.mce-toolbar .mce-btn-group .mce-last { + border-color: transparent; +} + +.mce-toolbar .mce-btn button, +.qt-fullscreen { + padding: 2px 3px; + line-height: normal; +} + +.mce-toolbar .mce-btn i { + text-shadow: none; +} + +.mce-toolbar .mce-btn-group > div { + white-space: normal; +} + +.mce-toolbar .mce-colorbutton .mce-open { + border-right: 0; +} + +.mce-toolbar .mce-colorbutton .mce-preview { + margin-left: -17px; + padding: 0; + width: 18px; +} + +/* mce listbox */ +.mce-toolbar .mce-btn-group .mce-btn.mce-listbox { + -webkit-border-radius: 0; + border-radius: 0; + direction: ltr; + background: #fff; + border: 1px solid #ddd; + -webkit-box-shadow: inset 0 1px 1px -1px rgba(0, 0, 0, .2); + box-shadow: inset 0 1px 1px -1px rgba(0, 0, 0, .2); +} + +.mce-toolbar .mce-btn-group .mce-btn.mce-listbox:hover { + background-image: none; + border-color: #bbb; +} + +.mce-toolbar .mce-btn-group .mce-btn.mce-listbox span { + font-size: 13px; +} + +.mce-panel .mce-btn i.mce-caret { + border-top: 6px solid #777; + margin-left: 2px; + margin-right: 2px; +} + +.mce-listbox i.mce-caret { + right: 6px; +} + +.mce-panel .mce-btn button.mce-open i.mce-caret, +.mce-panel .mce-btn.mce-listbox i.mce-caret { + margin-left: 0; + margin-right: 0; +} + +.mce-panel .mce-btn:hover i.mce-caret { + border-top-color: #333; +} + +.mce-panel .mce-active i.mce-caret { + border-top: 0; + border-bottom: 6px solid #333; + margin-top: 7px; +} + +.mce-listbox.mce-active i.mce-caret { + margin-top: -3px; +} + +.mce-toolbar .mce-splitbtn:hover .mce-open { + border-right-color: transparent; +} + +.mce-toolbar .mce-splitbtn .mce-open.mce-active{ + -webkit-box-shadow: none; + box-shadow: none; +} + +.mce-menu .mce-menu-item-normal.mce-active { + background-color: #e5e5e5; + -webkit-filter: none; + filter: none; +} + +.mce-menu .mce-menu-item:hover, +.mce-menu .mce-menu-item.mce-selected, +.mce-menu .mce-menu-item:focus { + color: #000; + background-color: #bbb; + background-image: none; + -webkit-filter: none; + filter: none; +} + +.mce-menu .mce-menu-item:hover .mce-ico, +.mce-menu .mce-menu-item.mce-selected .mce-ico, +.mce-menu .mce-menu-item:focus .mce-ico, +.mce-menu .mce-menu-item:hover .mce-text, +.mce-menu .mce-menu-item.mce-active:hover .mce-text, +.mce-menu .mce-menu-item.mce-selected .mce-text { + color: #000; +} + +/* Menubar */ +.mce-menubar { + border-color: #e5e5e5; +} + +.mce-menubar .mce-btn:focus { + outline: 0; +} + +div.mce-menu .mce-menu-item-sep, +.mce-menu-item-sep:hover { + margin: 5px 0 4px; +} + +.mce-menubtn span { + margin-right: 0; + padding-left: 3px; +} + +.mce-menu-has-icons i.mce-ico:before { + margin-left: -2px; +} + +/* Buttons in modals */ +.mce-primary button, +.mce-primary button i { + text-align: center; + color: #fff; + text-shadow: none; + padding: 0; + line-height: 26px; +} + +.mce-window .mce-btn { + color: #555; + background: #f7f7f7; + text-decoration: none; + font-size: 13px; + line-height: 26px; + height: 28px; + margin: 0; + padding: 0; + cursor: pointer; + border: 1px solid #ccc; + -webkit-appearance: none; + -webkit-border-radius: 3px; + border-radius: 3px; + white-space: nowrap; + -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.08); + box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.08); + background-image: none; +} + +/* Remove the dotted border on :focus and the extra padding in Firefox */ +.mce-window .mce-btn::-moz-focus-inner { + border-width: 1px 0; + border-style: solid none; + border-color: transparent; + padding: 0; +} + +.mce-window .mce-btn:hover { + background: #fafafa; + border-color: #999; + color: #222; +} + +.mce-window .mce-btn:focus { + -webkit-box-shadow: 1px 1px 1px rgba(0,0,0,.2); + box-shadow: 1px 1px 1px rgba(0,0,0,.2); +} + +.mce-window .mce-btn:active { + background: #eee; + border-color: #999; + color: #333; + -webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 ); + box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 ); +} + +.mce-window .mce-btn.mce-disabled { + color: #aaa; + border-color: #ddd; + -webkit-box-shadow: none; + box-shadow: none; + text-shadow: 0 1px 0 #fff; + cursor: default; +} + +.mce-window .mce-btn.mce-primary { + background: #2ea2cc; + border-color: #0074a2; + -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.5), 0 1px 0 rgba(0,0,0,.15); + box-shadow: inset 0 1px 0 rgba(120,200,230,0.5), 0 1px 0 rgba(0,0,0,.15); + color: #fff; + text-decoration: none; +} + +.mce-window .mce-btn.mce-primary:hover { + background: #1e8cbe; + border-color: #0074a2; + -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6); + box-shadow: inset 0 1px 0 rgba(120,200,230,0.6); + color: #fff; +} + +.mce-window .mce-btn.mce-primary:focus { + border-color: #0e3950; + -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6), 1px 1px 2px rgba(0,0,0,0.4); + box-shadow: inset 0 1px 0 rgba(120,200,230,0.6), 1px 1px 2px rgba(0,0,0,0.4); +} + +.mce-window .mce-btn.mce-primary:active { + background: #1b7aa6; + border-color: #005684; + color: rgba(255,255,255,0.95); + -webkit-box-shadow: inset 0 1px 0 rgba(0,0,0,0.1); + box-shadow: inset 0 1px 0 rgba(0,0,0,0.1); +} + +.mce-window .mce-btn.mce-primary.mce-disabled { + color: #94cde7; + background: #298cba; + border-color: #1b607f; + text-shadow: 0 -1px 0 rgba(0,0,0,0.1); +} + +.mce-menubtn.mce-fixed-width button span { + max-width: 80px; + padding-right: 16px; +} + +/* Charmap modal */ +.mce-charmap { + margin: 3px; +} + +.mce-charmap td { + padding: 0; + border-color: #dfdfdf; + cursor: pointer; +} + +.mce-charmap td:hover { + background: #f3f3f3; +} + +.mce-charmap td div { + width: 18px; + height: 22px; + line-height: 22px; +} + +/* TinyMCE tooltips */ +.mce-tooltip { + margin-top: 2px; +} + +.mce-tooltip-inner { + -webkit-box-shadow: 0 3px 5px rgba( 0, 0, 0, 0.2 ); + box-shadow: 0 3px 5px rgba( 0, 0, 0, 0.2 ); + color: #fff; + font-size: 12px; +} + +/* TinyMCE icons */ +.mce-ico { + font-family: 'tinymce', Arial; +} + +.mce-btn-small .mce-ico { + font-family: 'tinymce-small', Arial; +} + +.mce-toolbar .mce-ico { + color: #777; + line-height: 20px; + width: 20px; + height: 20px; + text-align: center; + text-shadow: none; + margin: 0; + padding: 0; +} + +.qt-fullscreen { + color: #777; + line-height: 20px; + width: 28px; + height: 26px; + text-align: center; + text-shadow: none; +} + +.mce-toolbar .mce-btn .mce-open { + line-height: 20px; +} + +.mce-toolbar .mce-btn:hover .mce-open, +.mce-toolbar .mce-btn:focus .mce-open, +.mce-toolbar .mce-btn.mce-active .mce-open { + border-left-color: #999; +} + +i.mce-i-bold, +i.mce-i-italic, +i.mce-i-bullist, +i.mce-i-numlist, +i.mce-i-blockquote, +i.mce-i-alignleft, +i.mce-i-aligncenter, +i.mce-i-alignright, +i.mce-i-link, +i.mce-i-unlink, +i.mce-i-wp_more, +i.mce-i-strikethrough, +i.mce-i-spellchecker, +i.mce-i-fullscreen, +i.mce-i-wp_fullscreen, +i.mce-i-wp_adv, +i.mce-i-underline, +i.mce-i-alignjustify, +i.mce-i-forecolor, +i.mce-i-pastetext, +i.mce-i-pasteword, +i.mce-i-removeformat, +i.mce-i-charmap, +i.mce-i-outdent, +i.mce-i-indent, +i.mce-i-undo, +i.mce-i-redo, +i.mce-i-help, +i.mce-i-wp_help, +i.mce-i-wp-media-library, +i.mce-i-ltr, +i.mce-i-wp_page, +i.mce-i-hr, +.mce-close { + font: normal 20px/1 'dashicons'; + padding: 0; + vertical-align: top; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + margin-left: -2px; + padding-right: 2px; +} + +.qt-fullscreen { + font: normal 20px/1 'dashicons'; + vertical-align: top; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +i.mce-i-bold:before { + content: '\f200'; +} + +i.mce-i-italic:before { + content: '\f201'; +} + +i.mce-i-bullist:before { + content: '\f203'; +} + +i.mce-i-numlist:before { + content: '\f204'; +} + +i.mce-i-blockquote:before { + content: '\f205'; +} + +i.mce-i-alignleft:before { + content: '\f206'; +} + +i.mce-i-aligncenter:before { + content: '\f207'; +} + +i.mce-i-alignright:before { + content: '\f208'; +} + +i.mce-i-link:before { + content: '\f103'; +} + +i.mce-i-unlink:before { + content: '\f225'; +} + +i.mce-i-wp_more:before { + content: '\f209'; +} + +i.mce-i-strikethrough:before { + content: '\f224'; +} + +i.mce-i-spellchecker:before { + content: '\f210'; +} + +i.mce-i-fullscreen:before, +i.mce-i-wp_fullscreen:before, +.qt-fullscreen:before { + content: '\f211'; +} + +i.mce-i-wp_adv:before { + content: '\f212'; +} + +i.mce-i-underline:before { + content: '\f213'; +} + +i.mce-i-alignjustify:before { + content: '\f214'; +} + +i.mce-i-forecolor:before { + content: '\f215'; +} + +i.mce-i-pastetext:before { + content: '\f217'; +} + +i.mce-i-removeformat:before { + content: '\f218'; +} + +i.mce-i-charmap:before { + content: '\f220'; +} + +i.mce-i-outdent:before { + content: '\f221'; +} + +i.mce-i-indent:before { + content: '\f222'; +} + +i.mce-i-undo:before { + content: '\f171'; +} + +i.mce-i-redo:before { + content: '\f172'; +} + +i.mce-i-help:before, +i.mce-i-wp_help:before { + content: '\f223'; +} + +i.mce-i-wp-media-library:before { + content: '\f104'; +} + +i.mce-i-ltr:before { + content: '\f320'; +} + +i.mce-i-wp_page:before { + content: '\f105'; +} + +i.mce-i-hr:before { + content: '\f460'; +} + +.mce-close:before { + content: '\f158'; +} + +.mce-i-wp_code:before { + content: '\e017'; +} + +/* Editors */ +.wp-editor-wrap { + position: relative; +} + +.wp-editor-tools { + position: relative; + z-index: 1; +} + +.wp-editor-container { + clear: both; +} + +.wp-editor-area { + font-family: Consolas, Monaco, monospace; + font-size: 13px; + padding: 10px; + margin: 1px 0 0; + line-height: 150%; + border: 0 none; + outline: none; + display: block; + resize: vertical; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.wp-editor-tools { + padding: 0; +} + +.wp-editor-container textarea.wp-editor-area { + width: 100%; + margin: 0; + -webkit-box-shadow: none; + box-shadow: none; +} + +.wp-editor-tabs { + float: right; +} + +.wp-switch-editor { + background: #ebebeb; + border: 1px solid #dedede; + color: #777; + cursor: pointer; + float: right; + font: 13px/19px "Open Sans", sans-serif; + height: 19px; + margin: 5px 0 0 5px; + padding: 3px 8px 4px; + position: relative; + top: 1px; +} + +.wp-switch-editor:active { + background-color: #f1f1f1; +} + +.wp-switch-editor:hover { + text-decoration: none !important; + background: #fff; +} + +.js .tmce-active .wp-editor-area { + color: white; +} + +.tmce-active .quicktags-toolbar { + display: none; +} + +.tmce-active .switch-tmce, +.html-active .switch-html { + background: #f5f5f5; + color: #555; + height: 20px; + border-bottom: none; +} + +.wp-media-buttons { + float: left; +} + +.wp-media-buttons .button { + margin-right: 5px; + margin-bottom: 4px; + padding-left: 7px; + padding-right: 7px; +} + +.wp-media-buttons .button:active { + position: relative; + top: 1px; + margin-top: -1px; + margin-bottom: 1px; +} + +.wp-media-buttons .insert-media { + padding-left: 5px; +} + +.wp-media-buttons a { + text-decoration: none; + color: #464646; + font-size: 12px; +} + +.wp-media-buttons img { + padding: 0 4px; + vertical-align: middle; +} + +.wp-media-buttons span.wp-media-buttons-icon { + display: inline-block; + width: 18px; + height: 18px; + vertical-align: text-top; + margin: 0 2px; +} + +.wp-media-buttons .add_media span.wp-media-buttons-icon { + background: none; +} + +.wp-media-buttons .add_media span.wp-media-buttons-icon:before { + font: normal 18px/1 'dashicons'; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.wp-media-buttons .add_media span.wp-media-buttons-icon:before { + content: '\f104'; +} + +/* Quicktags */ +.quicktags-toolbar { + padding: 3px; + position: relative; + border-bottom: 1px solid #dedede; + background: #f5f5f5; +} + +.has-dfw .quicktags-toolbar { + padding-right: 35px; +} + +.wp-core-ui .quicktags-toolbar input.button.button-small { + margin: 2px; +} + +.quicktags-toolbar input[value="link"] { + text-decoration: underline; +} + +.quicktags-toolbar input[value="del"] { + text-decoration: line-through; +} + +.quicktags-toolbar input[value="i"] { + font-style: italic; +} + +.quicktags-toolbar input[value="b"] { + font-weight: bold; +} + +.mce-toolbar .mce-btn-group .mce-btn.mce-wp-fullscreen, +.qt-fullscreen { + position: absolute; + top: 0; + right: 0; + margin-top: 5px; + margin-right: 5px; +} + +@media screen and ( max-width: 782px ) { + .mce-toolbar .mce-btn button, + .qt-fullscreen { + padding: 7px 8px; + } + + .qt-fullscreen { + width: 38px; + height: 34px; + } + + .mce-toolbar .mce-colorbutton .mce-preview { + margin-left: -21px; + } + + .mce-window .mce-btn { + padding: 2px 0; + } + + div.mce-toolbar-grp, + .quicktags-toolbar { + padding-right: 46px; + } +} + +@media screen and ( min-width: 782px ) { + .wp-core-ui .quicktags-toolbar input.button.button-small { + /* .button-small is normaly 11px, but a bit too small for these buttons. */ + font-size: 12px; + height: 26px; + line-height: 24px; + } +} + +#wp_editbtns, +#wp_gallerybtns { + padding: 2px; + position: absolute; + display: none; + z-index: 100020; +} + +#wp_editimgbtn, +#wp_delimgbtn, +#wp_editgallery, +#wp_delgallery { + border-color: #999; + background-color: #eee; + margin: 2px; + padding: 2px; + border-width: 1px; + border-style: solid; + -webkit-border-radius: 3px; + border-radius: 3px; +} + +#wp_editimgbtn:hover, +#wp_delimgbtn:hover, +#wp_editgallery:hover, +#wp_delgallery:hover { + border-color: #555; + background-color: #ccc; +} + +/*------------------------------------------------------------------------------ + wp-link +------------------------------------------------------------------------------*/ + +#wp-link-wrap { + display: none; + background-color: #fff; + -webkit-box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); + box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); + width: 500px; + height: 250px; + overflow: hidden; + margin-left: -250px; + margin-top: -125px; + position: fixed; + top: 50%; + left: 50%; + z-index: 100105; + -webkit-transition: height 0.2s, margin-top 0.2s; + transition: height 0.2s, margin-top 0.2s; +} + +#wp-link-backdrop { + display: none; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + min-height: 360px; + background: #000; + opacity: 0.7; + filter: alpha(opacity=70); + z-index: 100100; +} + +#wp-link { + position: relative; + height: 100%; +} + +#wp-link-wrap.search-panel-visible { + height: 500px; + margin-top: -250px; +} + +#link-modal-title { + background: #fcfcfc; + border-bottom: 1px solid #dfdfdf; + height: 36px; + font-size: 18px; + font-weight: 600; + line-height: 36px; + padding: 0 36px 0 16px; + top: 0; + right: 0; + left: 0; +} + +#wp-link-close { + color: #666; + cursor: pointer; + padding: 0; + position: absolute; + top: 0; + right: 0; + width: 36px; + height: 36px; + text-align: center; +} + +#wp-link-close:before { + font: normal 20px/36px 'dashicons'; + vertical-align: top; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + width: 36px; + height: 36px; + content: '\f158'; +} + +#wp-link-close:hover, +#wp-link-close:focus { + color: #2ea2cc; +} + +#link-selector { + padding: 0 16px 50px; +} + +#wp-link-wrap.search-panel-visible #link-selector { + padding: 0 16px; + position: absolute; + top: 36px; + left: 0; + right: 0; + bottom: 44px; +} + +#wp-link ol, +#wp-link ul { + list-style: none; + margin: 0; + padding: 0; +} + +#wp-link-search-toggle::after { + font: normal 20px/1 'dashicons'; + vertical-align: top; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + content: '\f140'; +} + +.search-panel-visible #wp-link-search-toggle::after { + content: '\f142'; +} + +#wp-link input[type="text"] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +#wp-link #link-options { + padding: 8px 0 12px; +} + +#wp-link p.howto { + margin: 3px 0; +} + +#wp-link-search-toggle { + cursor: pointer; +} + +#wp-link label input[type="text"] { + margin-top: 5px; + width: 70%; +} + +#wp-link #link-options label span, +#wp-link #search-panel label span.search-label { + display: inline-block; + width: 80px; + text-align: right; + padding-right: 5px; + max-width: 24%; +} + +#wp-link .link-search-field { + float: left; + width: 250px; + max-width: 70%; +} + +#wp-link .link-search-wrapper { + margin: 5px 0 9px; + display: block; + overflow: hidden; +} + +#wp-link .link-search-wrapper span { + float: left; + margin-top: 4px; +} + +#wp-link .link-search-wrapper .spinner { + display: none; + vertical-align: text-bottom; +} + +#wp-link .link-target { + padding: 3px 0 0; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +#wp-link .link-target label { + max-width: 70%; +} + +#wp-link .query-results { + border: 1px #dfdfdf solid; + margin: 0; + background: #fff; + overflow: auto; + position: absolute; + left: 16px; + right: 16px; + bottom: 16px; + top: 205px; +} + +#wp-link li, +#wp-link .query-notice { + clear: both; + margin-bottom: 0; + border-bottom: 1px solid #f1f1f1; + color: #333; + padding: 4px 6px; + cursor: pointer; + position: relative; +} + +#wp-link li:hover { + background: #eaf2fa; + color: #151515; +} + +#wp-link li.unselectable { + border-bottom: 1px solid #dfdfdf; +} + +#wp-link li.unselectable:hover { + background: #fff; + cursor: auto; + color: #333; +} + +#wp-link li.selected { + background: #ddd; + color: #333; +} + +#wp-link li.selected .item-title { + font-weight: bold; +} + +#wp-link li:last-child { + border: none; +} + +#wp-link .item-title { + display: inline-block; + width: 80%; + width: -webkit-calc(100% - 68px); + width: calc(100% - 68px); +} + +#wp-link .item-info { + text-transform: uppercase; + color: #666; + font-size: 11px; + position: absolute; + right: 5px; + top: 5px; +} + +#wp-link #search-results, +#wp-link #search-panel { + display: none; +} + +#wp-link-wrap.search-panel-visible #search-panel { + display: block; +} + +#wp-link .river-waiting { + display: none; + padding: 10px 0; +} + +#wp-link .river-waiting .spinner { + margin: 0 auto; + display: block; + float: none; +} + +#wp-link .submitbox { + padding: 8px 16px; + background: #fcfcfc; + border-top: 1px solid #dfdfdf; + position: absolute; + bottom: 0; + left: 0; + right: 0; +} + +#wp-link-cancel { + line-height: 25px; +} + +#wp-link-update { + line-height: 23px; + float: right; +} + +#wp-link-submit { + float: right; + margin-bottom: 0; +} + +@media screen and ( max-width: 782px ) { + #wp-link-wrap { + height: 280px; + margin-top: -140px; + } + + #wp-link-wrap.search-panel-visible .query-results { + top: 235px; + } + + #link-selector { + padding: 0 16px 60px; + } + + #wp-link-wrap.search-panel-visible #link-selector { + bottom: 52px; + } + + #wp-link-cancel { + line-height: 32px; + } +} + +@media screen and ( max-width: 520px ) { + #wp-link-wrap { + width: auto; + margin-left: 0; + left: 10px; + right: 10px; + max-width: 500px; + } +} + +@media screen and ( max-height: 520px ) { + #wp-link-wrap { + -webkit-transition: none; + transition: none; + } + + #wp-link-wrap.search-panel-visible { + height: auto; + margin-top: 0; + top: 10px; + bottom: 10px; + } + + .search-panel-visible #link-selector { + overflow: auto; + } + + .search-panel-visible #search-panel .query-results { + position: static; + } +} + +@media screen and ( max-height: 290px ) { + #wp-link-wrap { + height: auto; + margin-top: 0; + top: 10px; + bottom: 10px; + } + + #link-selector { + overflow: auto; + height: -webkit-calc(100% - 92px); + height: calc(100% - 92px); + padding-bottom: 2px; + } + + #search-panel .query-results { + position: static; + } +} + +/* Old TinyMCE 3.x modal */ +/* +.clearlooks2 .mceTop { + border-bottom: 1px solid #ccc; +} + +.clearlooks2 .mceTop span { + font: 13px/24px "Open Sans", sans-serif; + color: #e5e5e5; +} + +.clearlooks2 .mceTop .mceLeft { + background: #444444; + border-color: transparent; +} + +.clearlooks2 .mceTop .mceRight { + background: #444444; + border-color: transparent; +} + +.clearlooks2 .mceMiddle { + clip: rect(24px auto auto auto); +} + +.clearlooks2 .mceMiddle .mceLeft { + background: #f1f1f1; + border-color: transparent; +} + +.clearlooks2 .mceMiddle .mceRight { + background: #f1f1f1; + border-color: transparent; +} + +.clearlooks2 .mceBottom { + background: #f1f1f1; + border-color: transparent; +} + +.clearlooks2 .mceBottom .mceLeft { + background: #f1f1f1; + border-color: transparent; +} + +.clearlooks2 .mceBottom .mceCenter { + background: #f1f1f1; + border-color: transparent; +} + +.clearlooks2 .mceBottom .mceRight { + background: #f1f1f1; + border-color: transparent; +} + +.clearlooks2 .mceClose, +.clearlooks2 .mceFocus .mceClose, +.clearlooks2 .mceFocus .mceClose:hover { + background-image: none; +} +.clearlooks2 .mceClose:before { + content: '\f158'; + font: normal 20px/1 'dashicons'; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + color: #999; + padding-left: 12px; +} + +/* from colors.css +.clearlooks2 { + box-shadow: 0 5px 15px rgba(0,0,0,0.7); +} + +.clearlooks2 .mceMiddle span, +.clearlooks2 .mceMiddle .mceLeft, +.clearlooks2 .mceMiddle .mceRight, +.clearlooks2 .mceBottom, +.clearlooks2 .mceBottom .mceLeft, +.clearlooks2 .mceBottom .mceCenter, +.clearlooks2 .mceBottom .mceRight { + background-color: #fcfcfc; +} + +.clearlooks2 .mceTop span, +.clearlooks2 .mceFocus .mceTop span { + color: #222; +} + +.clearlooks2 .mceClose:before { + color: #999; +} + +.clearlooks2 .mceClose:hover:before { + color: #2ea2cc; +} +*/ +/* Distraction Free Writing mode + * =Overlay Styles +-------------------------------------------------------------- */ +.fullscreen-overlay { + z-index: 100005; + display: none; + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; + -webkit-filter: inherit; + filter: inherit; +} + +.wp-fullscreen-active .fullscreen-overlay, +.wp-fullscreen-active #wp-fullscreen-body { + display: block; +} + +.fullscreen-fader { + z-index: 200000; +} + +.wp-fullscreen-active .fullscreen-fader, +.wp-core-ui.wp-fullscreen-active .postbox-container { + display: none; +} + +/* =Overlay Body +-------------------------------------------------------------- */ + +#wp-fullscreen-body, +.mce-fullscreen { + z-index: 100010; +} + +#wp-fullscreen-body { + display: none; +} + +.wp-fullscreen-wrap { + margin: 0; + padding: 0; + position: absolute; + left: 0; + right: 0; + bottom: 30px; + top: 60px; + z-index: 100015; +} + +.wp-fullscreen-wrap .wp-editor-container, +.wp-fullscreen-title, +#wp-fullscreen-central-toolbar { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + max-width: 100%; +} + +.wp-fullscreen-active .wp-editor-tools, +.wp-fullscreen-active .quicktags-toolbar, +.wp-fullscreen-active .mce-toolbar-grp, +.wp-fullscreen-active .mce-statusbar { + display: none; +} + +#wp-fullscreen-statusbar { + position: fixed; + left: 0; + right: 0; + bottom: 0; + height: 30px; + z-index: 100020; + background: #fff; + -webkit-transition: height 0.2s; + transition: height 0.2s; +} + +#wp-fullscreen-status { + margin: 0 auto; + padding: 0; +} + +.wp-fullscreen-active .wp-fullscreen-title, +.wp-fullscreen-active .wp-fullscreen-title:focus, +.wp-fullscreen-active .wp-editor-container { + -webkit-border-radius: 0; + border-radius: 0; + border: 1px dashed transparent; + background: transparent; + -webkit-box-shadow: none; + box-shadow: none; + -webkit-transition: border-color 0.4s; + transition: border-color 0.4s; +} + +.wp-fullscreen-active .wp-editor-container { + margin: 0 auto 40px; +} + +.wp-fullscreen-active .wp-fullscreen-title { + font-size: 1.7em; + line-height: 100%; + outline: medium none; + padding: 3px 7px; + margin: 10px auto 30px; + display: block; +} + +#wp-fullscreen-tagline { + color: #888; + font-size: 18px; + float: right; + padding: 4px 0 0; +} + +/* =Top bar +-------------------------------------------------------------- */ +#fullscreen-topbar { + background: #f5f5f5; + border-bottom: 1px solid #dedede; + height: 45px; + position: fixed; + left: 0; + right: 0; + top: 0; + width: 100%; + z-index: 100020; + -webkit-transition: opacity 0.4s; + transition: opacity 0.4s; +} + +#wp-fullscreen-toolbar { + padding: 6px 10px 0; + clear: both; + max-width: 1100px; + margin: 0 auto; +} + +#wp-fullscreen-mode-bar, +#wp-fullscreen-button-bar, +#wp-fullscreen-close { + float: left; +} + +#wp-fullscreen-count, +#wp-fullscreen-tagline { + display: inline-block; +} + +#wp-fullscreen-button-bar { + margin-top: 2px; +} + +#wp-fullscreen-save { + float: right; + padding: 2px 0 0; + min-width: 95px; +} + +#wp-fullscreen-count, +#wp-fullscreen-close { + padding: 5px 0 0; +} + +#wp-fullscreen-central-toolbar { + margin: auto; + padding: 0; + min-width: 620px; +} + +#wp-fullscreen-buttons > div { + float: left; +} + +#wp-fullscreen-mode-bar { + padding: 3px 14px 0 0; +} + +#wp-fullscreen-buttons .hidden { + display: none; +} + +#wp-fullscreen-buttons .disabled { + opacity: 0.5; +} + +#wp-fullscreen-buttons .mce-btn button { + margin: 0; + outline: 0 none; + border: 0 none; + white-space: nowrap; + width: auto; + background: none; + color: #333333; + cursor: pointer; + font-size: 18px; + line-height: 20px; + overflow: visible; + text-align: center; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.wp-html-mode #wp-fullscreen-buttons div { + display: none; +} + +.wp-html-mode #wp-fullscreen-buttons div.wp-fullscreen-both { + display: block; +} + +#wp-fullscreen-save img { + vertical-align: middle; +} + +#wp-fullscreen-save span { + display: none; + margin: 5px 6px 0; + float: left; +} + +/* =Thickbox Adjustments +-------------------------------------------------------------- */ +.wp-fullscreen-active #TB_overlay { + z-index: 100050; +} + +.wp-fullscreen-active #TB_window { + z-index: 100051; +} + +/* Colors */ +.fullscreen-overlay { + background: #fff; +} + +/* =CSS 3 transitions +-------------------------------------------------------------- */ + +.wp-fullscreen-active #fullscreen-topbar { + -webkit-transition-duration: 0.8s; + transition-duration: 0.8s; + opacity: 0; + filter: alpha(opacity=0); +} + +.wp-fullscreen-active #wp-fullscreen-statusbar { + height: 0; +} + +.wp-fullscreen-active.wp-dfw-show-ui #fullscreen-topbar { + -webkit-transition-duration: 0.4s; + transition-duration: 0.4s; + opacity: 1; + filter: alpha(opacity=100); +} + +.wp-fullscreen-active.wp-dfw-show-ui #wp-fullscreen-statusbar { + height: 29px; + background: #f8f8f8; + border-top: 1px solid #eee; +} + +.wp-fullscreen-active .wp-fullscreen-title, +.wp-fullscreen-active .wp-editor-container { + -webkit-transition-duration: 0.8s; + transition-duration: 0.8s; + border-color: transparent; +} + +.wp-fullscreen-active.wp-dfw-show-ui .wp-fullscreen-title, +.wp-fullscreen-active.wp-dfw-show-ui .wp-editor-container { + -webkit-transition-duration: 0.4s; + transition-duration: 0.4s; + border-color: #ccc; +} + +.fade-1000, +.fade-600, +.fade-400, +.fade-300 { + opacity: 0; + -webkit-transition-property: opacity; + transition-property: opacity; +} + +.fade-1000 { + -webkit-transition-duration: 1s; + transition-duration: 1s; +} + +.fade-600 { + -webkit-transition-duration: 0.6s; + transition-duration: 0.6s; +} + +.fade-400 { + -webkit-transition-duration: 0.4s; + transition-duration: 0.4s; +} + +.fade-300 { + -webkit-transition-duration: 0.3s; + transition-duration: 0.3s; +} + +.fade-trigger { + opacity: 1; +} + +/* DFW on touch screen devices */ +.wp-dfw-touch #fullscreen-topbar { + position: absolute; + opacity: 1; +} + +.wp-dfw-touch .wp-fullscreen-wrap .wp-editor-container, +.wp-dfw-touch .wp-fullscreen-title { + max-width: 700px; +} + +.wp-fullscreen-active.wp-dfw-touch .wp-fullscreen-title, +.wp-fullscreen-active.wp-dfw-touch .wp-editor-container { + border-color: #ccc; +} + +.wp-dfw-touch #wp-fullscreen-statusbar { + height: 30px; +} + +@media screen and ( max-width: 782px ) { + #wp-fullscreen-close, + #wp-fullscreen-central-toolbar, + #wp-fullscreen-mode-bar, + #wp-fullscreen-button-bar, + #wp-fullscreen-save { + display: inline-block; + } + + #fullscreen-topbar { + height: 85px; + } + + #wp-fullscreen-central-toolbar { + width: auto !important; + min-width: 0; + } + + #wp-fullscreen-close { + line-height: 30px; + vertical-align: top; + padding: 0 12px; + } + + #wp-fullscreen-button-bar { + position: absolute; + top: 45px; + left: 0; + } + + .wp-fullscreen-wrap { + top: 95px; + } + + #wp-fullscreen-save { + position: absolute; + right: 10px; + } +} + +@media screen and ( max-width: 480px ) { + #wp_fs_help { + display: none; + } + + .wp-fullscreen-wrap .wp-editor-container, + .wp-fullscreen-title { + width: 480px !important; + } + + body.wp-fullscreen-active { + width: 480px; + overflow: auto; + } + + #fullscreen-topbar, + .wp-fullscreen-wrap { + width: 480px; + } + + #fullscreen-topbar { + position: absolute; + } + + #wp-fullscreen-status { + width: auto !important; + max-width: 100%; + padding: 0 10px; + } +} + +/* =Localization +-------------------------------------------------------------- */ +.rtl .wp-switch-editor, +.rtl .quicktags-toolbar input { + font-family: Tahoma, sans-serif; +} + +/* @noflip */ +.mce-rtl .mce-flow-layout .mce-flow-layout-item > div { + direction: rtl; +} + +/* @noflip */ +.mce-rtl .mce-listbox i.mce-caret { + left: 6px; +} + +html:lang(he-il) .rtl .wp-switch-editor, +html:lang(he-il) .rtl .quicktags-toolbar input { + font-family: Arial, sans-serif; +} + +/* HiDPI */ +@media print, + (-o-min-device-pixel-ratio: 5/4), + (-webkit-min-device-pixel-ratio: 1.25), + (min-resolution: 120dpi) { + .wp-media-buttons .add_media span.wp-media-buttons-icon, + #wp-fullscreen-buttons #wp_fs_image span.mce_image { + background: none; + } +} + +/* TODO: DFW responsive */ diff --git a/wp-includes/css/editor.min.css b/wp-includes/css/editor.min.css new file mode 100644 index 0000000..b6efc30 --- /dev/null +++ b/wp-includes/css/editor.min.css @@ -0,0 +1 @@ +.mce-container,.mce-container *,.mce-widget,.mce-widget *{color:inherit;font-family:inherit}#mce-modal-block.mce-in{opacity:.7;filter:alpha(opacity=70)}.mce-window{-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3);-webkit-font-smoothing:subpixel-antialiased}.mce-window .mce-container-body.mce-abs-layout{overflow:visible}.mce-window .mce-window-head{background:#fcfcfc;border-bottom:1px solid #dfdfdf;padding:0;min-height:36px}.mce-window .mce-window-head .mce-title{color:#444;font-size:18px;font-weight:600;line-height:36px;margin:0;padding:0 36px 0 16px}.mce-window .mce-window-head .mce-close{color:transparent;top:0;right:0;width:36px;height:36px;line-height:36px;text-align:center}.mce-window .mce-window-head .mce-close:before{font:400 20px/36px dashicons;text-align:center;color:#666;width:36px;height:36px;display:block}.mce-window .mce-window-head .mce-close:hover:before{color:#2ea2cc}.mce-window .mce-window-head .mce-dragh{width:-webkit-calc(100% - 36px);width:calc(100% - 36px)}.mce-wp-help .mce-window-head{border-bottom:0}.mce-checkbox i.mce-i-checkbox,.mce-textbox{border:1px solid #ddd;-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}.mce-checkbox:focus i.mce-i-checkbox,.mce-textbox.mce-focus,.mce-textbox:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}.mce-floatpanel.mce-popover,.mce-menu{border-color:rgba(0,0,0,.15);-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}.mce-floatpanel.mce-popover.mce-bottom{margin-top:2px}.mce-floatpanel .mce-arrow{display:none}.mce-menu .mce-container-body{min-width:160px}.mce-menu-item{border:0;margin-bottom:2px}.mce-menu-has-icons i.mce-ico{line-height:20px}div.mce-panel{border:0;background:#fff;-webkit-filter:none;filter:none}.mce-panel.mce-menu{border:1px solid #ddd}div.mce-tab{line-height:13px}div.mce-toolbar-grp{border-bottom:1px solid #dedede;background:#f5f5f5;padding:3px;position:relative}.has-dfw div.mce-toolbar-grp .mce-toolbar.mce-first{padding-right:32px}.mce-toolbar .mce-btn-group{margin:0}div.mce-statusbar{border-top:1px solid #eee}div.mce-path{padding:0 8px 2px;margin:0}.mce-toolbar .mce-btn,.qt-fullscreen{border-color:transparent;background:0 0;-webkit-box-shadow:none;box-shadow:none;text-shadow:none;cursor:pointer}#wp-fullscreen-buttons .mce-btn,.mce-toolbar .mce-btn-group .mce-btn,.qt-fullscreen{border:1px solid transparent;margin:2px;background-image:none;-webkit-border-radius:2px;border-radius:2px;-webkit-filter:none;filter:none}#wp-fullscreen-buttons .mce-btn:focus,#wp-fullscreen-buttons .mce-btn:hover,.mce-toolbar .mce-btn-group .mce-btn:focus,.mce-toolbar .mce-btn-group .mce-btn:hover,.qt-fullscreen:focus,.qt-fullscreen:hover{background:#fafafa;border-color:#999;color:#222;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08)}#wp-fullscreen-buttons .mce-btn.mce-active,#wp-fullscreen-buttons .mce-btn:active,.mce-toolbar .mce-btn-group .mce-btn.mce-active,.mce-toolbar .mce-btn-group .mce-btn:active{background:#ebebeb;border-color:#999;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.3);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.3)}.mce-toolbar .mce-btn-group .mce-btn.mce-active:hover{border-color:#555}.mce-toolbar .mce-btn-group .mce-btn.mce-active:hover i.mce-ico{color:#555}#wp-fullscreen-buttons .mce-btn.mce-disabled:focus,#wp-fullscreen-buttons .mce-btn.mce-disabled:hover,.mce-toolbar .mce-btn-group .mce-btn.mce-disabled:focus,.mce-toolbar .mce-btn-group .mce-btn.mce-disabled:hover{color:#aaa;background:0 0;border-color:#ddd;text-shadow:0 1px 0 #fff;-webkit-box-shadow:none;box-shadow:none}.mce-toolbar .mce-btn-group .mce-first,.mce-toolbar .mce-btn-group .mce-last{border-color:transparent}.mce-toolbar .mce-btn button,.qt-fullscreen{padding:2px 3px;line-height:normal}.mce-toolbar .mce-btn i{text-shadow:none}.mce-toolbar .mce-btn-group>div{white-space:normal}.mce-toolbar .mce-colorbutton .mce-open{border-right:0}.mce-toolbar .mce-colorbutton .mce-preview{margin-left:-17px;padding:0;width:18px}.mce-toolbar .mce-btn-group .mce-btn.mce-listbox{-webkit-border-radius:0;border-radius:0;direction:ltr;background:#fff;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 1px -1px rgba(0,0,0,.2);box-shadow:inset 0 1px 1px -1px rgba(0,0,0,.2)}.mce-toolbar .mce-btn-group .mce-btn.mce-listbox:hover{background-image:none;border-color:#bbb}.mce-toolbar .mce-btn-group .mce-btn.mce-listbox span{font-size:13px}.mce-panel .mce-btn i.mce-caret{border-top:6px solid #777;margin-left:2px;margin-right:2px}.mce-listbox i.mce-caret{right:6px}.mce-panel .mce-btn button.mce-open i.mce-caret,.mce-panel .mce-btn.mce-listbox i.mce-caret{margin-left:0;margin-right:0}.mce-panel .mce-btn:hover i.mce-caret{border-top-color:#333}.mce-panel .mce-active i.mce-caret{border-top:0;border-bottom:6px solid #333;margin-top:7px}.mce-listbox.mce-active i.mce-caret{margin-top:-3px}.mce-toolbar .mce-splitbtn:hover .mce-open{border-right-color:transparent}.mce-toolbar .mce-splitbtn .mce-open.mce-active{-webkit-box-shadow:none;box-shadow:none}.mce-menu .mce-menu-item-normal.mce-active{background-color:#e5e5e5;-webkit-filter:none;filter:none}.mce-menu .mce-menu-item.mce-selected,.mce-menu .mce-menu-item:focus,.mce-menu .mce-menu-item:hover{color:#000;background-color:#bbb;background-image:none;-webkit-filter:none;filter:none}.mce-menu .mce-menu-item.mce-active:hover .mce-text,.mce-menu .mce-menu-item.mce-selected .mce-ico,.mce-menu .mce-menu-item.mce-selected .mce-text,.mce-menu .mce-menu-item:focus .mce-ico,.mce-menu .mce-menu-item:hover .mce-ico,.mce-menu .mce-menu-item:hover .mce-text{color:#000}.mce-menubar{border-color:#e5e5e5}.mce-menubar .mce-btn:focus{outline:0}.mce-menu-item-sep:hover,div.mce-menu .mce-menu-item-sep{margin:5px 0 4px}.mce-menubtn span{margin-right:0;padding-left:3px}.mce-menu-has-icons i.mce-ico:before{margin-left:-2px}.mce-primary button,.mce-primary button i{text-align:center;color:#fff;text-shadow:none;padding:0;line-height:26px}.mce-window .mce-btn{color:#555;background:#f7f7f7;text-decoration:none;font-size:13px;line-height:26px;height:28px;margin:0;padding:0;cursor:pointer;border:1px solid #ccc;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);background-image:none}.mce-window .mce-btn::-moz-focus-inner{border-width:1px 0;border-style:solid none;border-color:transparent;padding:0}.mce-window .mce-btn:hover{background:#fafafa;border-color:#999;color:#222}.mce-window .mce-btn:focus{-webkit-box-shadow:1px 1px 1px rgba(0,0,0,.2);box-shadow:1px 1px 1px rgba(0,0,0,.2)}.mce-window .mce-btn:active{background:#eee;border-color:#999;color:#333;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.mce-window .mce-btn.mce-disabled{color:#aaa;border-color:#ddd;-webkit-box-shadow:none;box-shadow:none;text-shadow:0 1px 0 #fff;cursor:default}.mce-window .mce-btn.mce-primary{background:#2ea2cc;border-color:#0074a2;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);color:#fff;text-decoration:none}.mce-window .mce-btn.mce-primary:hover{background:#1e8cbe;border-color:#0074a2;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.6);box-shadow:inset 0 1px 0 rgba(120,200,230,.6);color:#fff}.mce-window .mce-btn.mce-primary:focus{border-color:#0e3950;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.6),1px 1px 2px rgba(0,0,0,.4);box-shadow:inset 0 1px 0 rgba(120,200,230,.6),1px 1px 2px rgba(0,0,0,.4)}.mce-window .mce-btn.mce-primary:active{background:#1b7aa6;border-color:#005684;color:rgba(255,255,255,.95);-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(0,0,0,.1)}.mce-window .mce-btn.mce-primary.mce-disabled{color:#94cde7;background:#298cba;border-color:#1b607f;text-shadow:0 -1px 0 rgba(0,0,0,.1)}.mce-menubtn.mce-fixed-width button span{max-width:80px;padding-right:16px}.mce-charmap{margin:3px}.mce-charmap td{padding:0;border-color:#dfdfdf;cursor:pointer}.mce-charmap td:hover{background:#f3f3f3}.mce-charmap td div{width:18px;height:22px;line-height:22px}.mce-tooltip{margin-top:2px}.mce-tooltip-inner{-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2);color:#fff;font-size:12px}.mce-ico{font-family:tinymce,Arial}.mce-btn-small .mce-ico{font-family:tinymce-small,Arial}.mce-toolbar .mce-ico{color:#777;line-height:20px;width:20px;height:20px;text-align:center;text-shadow:none;margin:0;padding:0}.qt-fullscreen{color:#777;line-height:20px;width:28px;height:26px;text-align:center;text-shadow:none}.mce-toolbar .mce-btn .mce-open{line-height:20px}.mce-toolbar .mce-btn.mce-active .mce-open,.mce-toolbar .mce-btn:focus .mce-open,.mce-toolbar .mce-btn:hover .mce-open{border-left-color:#999}.mce-close,i.mce-i-aligncenter,i.mce-i-alignjustify,i.mce-i-alignleft,i.mce-i-alignright,i.mce-i-blockquote,i.mce-i-bold,i.mce-i-bullist,i.mce-i-charmap,i.mce-i-forecolor,i.mce-i-fullscreen,i.mce-i-help,i.mce-i-hr,i.mce-i-indent,i.mce-i-italic,i.mce-i-link,i.mce-i-ltr,i.mce-i-numlist,i.mce-i-outdent,i.mce-i-pastetext,i.mce-i-pasteword,i.mce-i-redo,i.mce-i-removeformat,i.mce-i-spellchecker,i.mce-i-strikethrough,i.mce-i-underline,i.mce-i-undo,i.mce-i-unlink,i.mce-i-wp-media-library,i.mce-i-wp_adv,i.mce-i-wp_fullscreen,i.mce-i-wp_help,i.mce-i-wp_more,i.mce-i-wp_page{font:400 20px/1 dashicons;padding:0;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-left:-2px;padding-right:2px}.qt-fullscreen{font:400 20px/1 dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}i.mce-i-bold:before{content:'\f200'}i.mce-i-italic:before{content:'\f201'}i.mce-i-bullist:before{content:'\f203'}i.mce-i-numlist:before{content:'\f204'}i.mce-i-blockquote:before{content:'\f205'}i.mce-i-alignleft:before{content:'\f206'}i.mce-i-aligncenter:before{content:'\f207'}i.mce-i-alignright:before{content:'\f208'}i.mce-i-link:before{content:'\f103'}i.mce-i-unlink:before{content:'\f225'}i.mce-i-wp_more:before{content:'\f209'}i.mce-i-strikethrough:before{content:'\f224'}i.mce-i-spellchecker:before{content:'\f210'}.qt-fullscreen:before,i.mce-i-fullscreen:before,i.mce-i-wp_fullscreen:before{content:'\f211'}i.mce-i-wp_adv:before{content:'\f212'}i.mce-i-underline:before{content:'\f213'}i.mce-i-alignjustify:before{content:'\f214'}i.mce-i-forecolor:before{content:'\f215'}i.mce-i-pastetext:before{content:'\f217'}i.mce-i-removeformat:before{content:'\f218'}i.mce-i-charmap:before{content:'\f220'}i.mce-i-outdent:before{content:'\f221'}i.mce-i-indent:before{content:'\f222'}i.mce-i-undo:before{content:'\f171'}i.mce-i-redo:before{content:'\f172'}i.mce-i-help:before,i.mce-i-wp_help:before{content:'\f223'}i.mce-i-wp-media-library:before{content:'\f104'}i.mce-i-ltr:before{content:'\f320'}i.mce-i-wp_page:before{content:'\f105'}i.mce-i-hr:before{content:'\f460'}.mce-close:before{content:'\f158'}.mce-i-wp_code:before{content:'\e017'}.wp-editor-wrap{position:relative}.wp-editor-tools{position:relative;z-index:1}.wp-editor-container{clear:both}.wp-editor-area{font-family:Consolas,Monaco,monospace;font-size:13px;padding:10px;margin:1px 0 0;line-height:150%;border:0 none;outline:0;display:block;resize:vertical;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-editor-tools{padding:0}.wp-editor-container textarea.wp-editor-area{width:100%;margin:0;-webkit-box-shadow:none;box-shadow:none}.wp-editor-tabs{float:right}.wp-switch-editor{background:#ebebeb;border:1px solid #dedede;color:#777;cursor:pointer;float:right;font:13px/19px "Open Sans",sans-serif;height:19px;margin:5px 0 0 5px;padding:3px 8px 4px;position:relative;top:1px}.wp-switch-editor:active{background-color:#f1f1f1}.wp-switch-editor:hover{text-decoration:none!important;background:#fff}.js .tmce-active .wp-editor-area{color:#fff}.tmce-active .quicktags-toolbar{display:none}.html-active .switch-html,.tmce-active .switch-tmce{background:#f5f5f5;color:#555;height:20px;border-bottom:0}.wp-media-buttons{float:left}.wp-media-buttons .button{margin-right:5px;margin-bottom:4px;padding-left:7px;padding-right:7px}.wp-media-buttons .button:active{position:relative;top:1px;margin-top:-1px;margin-bottom:1px}.wp-media-buttons .insert-media{padding-left:5px}.wp-media-buttons a{text-decoration:none;color:#464646;font-size:12px}.wp-media-buttons img{padding:0 4px;vertical-align:middle}.wp-media-buttons span.wp-media-buttons-icon{display:inline-block;width:18px;height:18px;vertical-align:text-top;margin:0 2px}.wp-media-buttons .add_media span.wp-media-buttons-icon{background:0 0}.wp-media-buttons .add_media span.wp-media-buttons-icon:before{font:400 18px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:'\f104'}.quicktags-toolbar{padding:3px;position:relative;border-bottom:1px solid #dedede;background:#f5f5f5}.has-dfw .quicktags-toolbar{padding-right:35px}.wp-core-ui .quicktags-toolbar input.button.button-small{margin:2px}.quicktags-toolbar input[value=link]{text-decoration:underline}.quicktags-toolbar input[value=del]{text-decoration:line-through}.quicktags-toolbar input[value="i"]{font-style:italic}.quicktags-toolbar input[value="b"]{font-weight:700}.mce-toolbar .mce-btn-group .mce-btn.mce-wp-fullscreen,.qt-fullscreen{position:absolute;top:0;right:0;margin-top:5px;margin-right:5px}@media screen and (max-width:782px){.mce-toolbar .mce-btn button,.qt-fullscreen{padding:7px 8px}.qt-fullscreen{width:38px;height:34px}.mce-toolbar .mce-colorbutton .mce-preview{margin-left:-21px}.mce-window .mce-btn{padding:2px 0}.quicktags-toolbar,div.mce-toolbar-grp{padding-right:46px}}@media screen and (min-width:782px){.wp-core-ui .quicktags-toolbar input.button.button-small{font-size:12px;height:26px;line-height:24px}}#wp_editbtns,#wp_gallerybtns{padding:2px;position:absolute;display:none;z-index:100020}#wp_delgallery,#wp_delimgbtn,#wp_editgallery,#wp_editimgbtn{border-color:#999;background-color:#eee;margin:2px;padding:2px;border-width:1px;border-style:solid;-webkit-border-radius:3px;border-radius:3px}#wp_delgallery:hover,#wp_delimgbtn:hover,#wp_editgallery:hover,#wp_editimgbtn:hover{border-color:#555;background-color:#ccc}#wp-link-wrap{display:none;background-color:#fff;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3);width:500px;height:250px;overflow:hidden;margin-left:-250px;margin-top:-125px;position:fixed;top:50%;left:50%;z-index:100105;-webkit-transition:height .2s,margin-top .2s;transition:height .2s,margin-top .2s}#wp-link-backdrop{display:none;position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:100100}#wp-link{position:relative;height:100%}#wp-link-wrap.search-panel-visible{height:500px;margin-top:-250px}#link-modal-title{background:#fcfcfc;border-bottom:1px solid #dfdfdf;height:36px;font-size:18px;font-weight:600;line-height:36px;padding:0 36px 0 16px;top:0;right:0;left:0}#wp-link-close{color:#666;cursor:pointer;padding:0;position:absolute;top:0;right:0;width:36px;height:36px;text-align:center}#wp-link-close:before{font:400 20px/36px dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:36px;height:36px;content:'\f158'}#wp-link-close:focus,#wp-link-close:hover{color:#2ea2cc}#link-selector{padding:0 16px 50px}#wp-link-wrap.search-panel-visible #link-selector{padding:0 16px;position:absolute;top:36px;left:0;right:0;bottom:44px}#wp-link ol,#wp-link ul{list-style:none;margin:0;padding:0}#wp-link-search-toggle::after{font:400 20px/1 dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:'\f140'}.search-panel-visible #wp-link-search-toggle::after{content:'\f142'}#wp-link input[type=text]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wp-link #link-options{padding:8px 0 12px}#wp-link p.howto{margin:3px 0}#wp-link-search-toggle{cursor:pointer}#wp-link label input[type=text]{margin-top:5px;width:70%}#wp-link #link-options label span,#wp-link #search-panel label span.search-label{display:inline-block;width:80px;text-align:right;padding-right:5px;max-width:24%}#wp-link .link-search-field{float:left;width:250px;max-width:70%}#wp-link .link-search-wrapper{margin:5px 0 9px;display:block;overflow:hidden}#wp-link .link-search-wrapper span{float:left;margin-top:4px}#wp-link .link-search-wrapper .spinner{display:none;vertical-align:text-bottom}#wp-link .link-target{padding:3px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#wp-link .link-target label{max-width:70%}#wp-link .query-results{border:1px #dfdfdf solid;margin:0;background:#fff;overflow:auto;position:absolute;left:16px;right:16px;bottom:16px;top:205px}#wp-link .query-notice,#wp-link li{clear:both;margin-bottom:0;border-bottom:1px solid #f1f1f1;color:#333;padding:4px 6px;cursor:pointer;position:relative}#wp-link li:hover{background:#eaf2fa;color:#151515}#wp-link li.unselectable{border-bottom:1px solid #dfdfdf}#wp-link li.unselectable:hover{background:#fff;cursor:auto;color:#333}#wp-link li.selected{background:#ddd;color:#333}#wp-link li.selected .item-title{font-weight:700}#wp-link li:last-child{border:0}#wp-link .item-title{display:inline-block;width:80%;width:-webkit-calc(100% - 68px);width:calc(100% - 68px)}#wp-link .item-info{text-transform:uppercase;color:#666;font-size:11px;position:absolute;right:5px;top:5px}#wp-link #search-panel,#wp-link #search-results{display:none}#wp-link-wrap.search-panel-visible #search-panel{display:block}#wp-link .river-waiting{display:none;padding:10px 0}#wp-link .river-waiting .spinner{margin:0 auto;display:block;float:none}#wp-link .submitbox{padding:8px 16px;background:#fcfcfc;border-top:1px solid #dfdfdf;position:absolute;bottom:0;left:0;right:0}#wp-link-cancel{line-height:25px}#wp-link-update{line-height:23px;float:right}#wp-link-submit{float:right;margin-bottom:0}@media screen and (max-width:782px){#wp-link-wrap{height:280px;margin-top:-140px}#wp-link-wrap.search-panel-visible .query-results{top:235px}#link-selector{padding:0 16px 60px}#wp-link-wrap.search-panel-visible #link-selector{bottom:52px}#wp-link-cancel{line-height:32px}}@media screen and (max-width:520px){#wp-link-wrap{width:auto;margin-left:0;left:10px;right:10px;max-width:500px}}@media screen and (max-height:520px){#wp-link-wrap{-webkit-transition:none;transition:none}#wp-link-wrap.search-panel-visible{height:auto;margin-top:0;top:10px;bottom:10px}.search-panel-visible #link-selector{overflow:auto}.search-panel-visible #search-panel .query-results{position:static}}@media screen and (max-height:290px){#wp-link-wrap{height:auto;margin-top:0;top:10px;bottom:10px}#link-selector{overflow:auto;height:-webkit-calc(100% - 92px);height:calc(100% - 92px);padding-bottom:2px}#search-panel .query-results{position:static}}.fullscreen-overlay{z-index:100005;display:none;position:fixed;top:0;bottom:0;left:0;right:0;-webkit-filter:inherit;filter:inherit}.wp-fullscreen-active #wp-fullscreen-body,.wp-fullscreen-active .fullscreen-overlay{display:block}.fullscreen-fader{z-index:200000}.wp-core-ui.wp-fullscreen-active .postbox-container,.wp-fullscreen-active .fullscreen-fader{display:none}#wp-fullscreen-body,.mce-fullscreen{z-index:100010}#wp-fullscreen-body{display:none}.wp-fullscreen-wrap{margin:0;padding:0;position:absolute;left:0;right:0;bottom:30px;top:60px;z-index:100015}#wp-fullscreen-central-toolbar,.wp-fullscreen-title,.wp-fullscreen-wrap .wp-editor-container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;max-width:100%}.wp-fullscreen-active .mce-statusbar,.wp-fullscreen-active .mce-toolbar-grp,.wp-fullscreen-active .quicktags-toolbar,.wp-fullscreen-active .wp-editor-tools{display:none}#wp-fullscreen-statusbar{position:fixed;left:0;right:0;bottom:0;height:30px;z-index:100020;background:#fff;-webkit-transition:height .2s;transition:height .2s}#wp-fullscreen-status{margin:0 auto;padding:0}.wp-fullscreen-active .wp-editor-container,.wp-fullscreen-active .wp-fullscreen-title,.wp-fullscreen-active .wp-fullscreen-title:focus{-webkit-border-radius:0;border-radius:0;border:1px dashed transparent;background:0 0;-webkit-box-shadow:none;box-shadow:none;-webkit-transition:border-color .4s;transition:border-color .4s}.wp-fullscreen-active .wp-editor-container{margin:0 auto 40px}.wp-fullscreen-active .wp-fullscreen-title{font-size:1.7em;line-height:100%;outline:medium none;padding:3px 7px;margin:10px auto 30px;display:block}#wp-fullscreen-tagline{color:#888;font-size:18px;float:right;padding:4px 0 0}#fullscreen-topbar{background:#f5f5f5;border-bottom:1px solid #dedede;height:45px;position:fixed;left:0;right:0;top:0;width:100%;z-index:100020;-webkit-transition:opacity .4s;transition:opacity .4s}#wp-fullscreen-toolbar{padding:6px 10px 0;clear:both;max-width:1100px;margin:0 auto}#wp-fullscreen-button-bar,#wp-fullscreen-close,#wp-fullscreen-mode-bar{float:left}#wp-fullscreen-count,#wp-fullscreen-tagline{display:inline-block}#wp-fullscreen-button-bar{margin-top:2px}#wp-fullscreen-save{float:right;padding:2px 0 0;min-width:95px}#wp-fullscreen-close,#wp-fullscreen-count{padding:5px 0 0}#wp-fullscreen-central-toolbar{margin:auto;padding:0;min-width:620px}#wp-fullscreen-buttons>div{float:left}#wp-fullscreen-mode-bar{padding:3px 14px 0 0}#wp-fullscreen-buttons .hidden{display:none}#wp-fullscreen-buttons .disabled{opacity:.5}#wp-fullscreen-buttons .mce-btn button{margin:0;outline:0 none;border:0 none;white-space:nowrap;width:auto;background:0 0;color:#333;cursor:pointer;font-size:18px;line-height:20px;overflow:visible;text-align:center;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-html-mode #wp-fullscreen-buttons div{display:none}.wp-html-mode #wp-fullscreen-buttons div.wp-fullscreen-both{display:block}#wp-fullscreen-save img{vertical-align:middle}#wp-fullscreen-save span{display:none;margin:5px 6px 0;float:left}.wp-fullscreen-active #TB_overlay{z-index:100050}.wp-fullscreen-active #TB_window{z-index:100051}.fullscreen-overlay{background:#fff}.wp-fullscreen-active #fullscreen-topbar{-webkit-transition-duration:.8s;transition-duration:.8s;opacity:0;filter:alpha(opacity=0)}.wp-fullscreen-active #wp-fullscreen-statusbar{height:0}.wp-fullscreen-active.wp-dfw-show-ui #fullscreen-topbar{-webkit-transition-duration:.4s;transition-duration:.4s;opacity:1;filter:alpha(opacity=100)}.wp-fullscreen-active.wp-dfw-show-ui #wp-fullscreen-statusbar{height:29px;background:#f8f8f8;border-top:1px solid #eee}.wp-fullscreen-active .wp-editor-container,.wp-fullscreen-active .wp-fullscreen-title{-webkit-transition-duration:.8s;transition-duration:.8s;border-color:transparent}.wp-fullscreen-active.wp-dfw-show-ui .wp-editor-container,.wp-fullscreen-active.wp-dfw-show-ui .wp-fullscreen-title{-webkit-transition-duration:.4s;transition-duration:.4s;border-color:#ccc}.fade-1000,.fade-300,.fade-400,.fade-600{opacity:0;-webkit-transition-property:opacity;transition-property:opacity}.fade-1000{-webkit-transition-duration:1s;transition-duration:1s}.fade-600{-webkit-transition-duration:.6s;transition-duration:.6s}.fade-400{-webkit-transition-duration:.4s;transition-duration:.4s}.fade-300{-webkit-transition-duration:.3s;transition-duration:.3s}.fade-trigger{opacity:1}.wp-dfw-touch #fullscreen-topbar{position:absolute;opacity:1}.wp-dfw-touch .wp-fullscreen-title,.wp-dfw-touch .wp-fullscreen-wrap .wp-editor-container{max-width:700px}.wp-fullscreen-active.wp-dfw-touch .wp-editor-container,.wp-fullscreen-active.wp-dfw-touch .wp-fullscreen-title{border-color:#ccc}.wp-dfw-touch #wp-fullscreen-statusbar{height:30px}@media screen and (max-width:782px){#wp-fullscreen-button-bar,#wp-fullscreen-central-toolbar,#wp-fullscreen-close,#wp-fullscreen-mode-bar,#wp-fullscreen-save{display:inline-block}#fullscreen-topbar{height:85px}#wp-fullscreen-central-toolbar{width:auto!important;min-width:0}#wp-fullscreen-close{line-height:30px;vertical-align:top;padding:0 12px}#wp-fullscreen-button-bar{position:absolute;top:45px;left:0}.wp-fullscreen-wrap{top:95px}#wp-fullscreen-save{position:absolute;right:10px}}@media screen and (max-width:480px){#wp_fs_help{display:none}.wp-fullscreen-title,.wp-fullscreen-wrap .wp-editor-container{width:480px!important}body.wp-fullscreen-active{width:480px;overflow:auto}#fullscreen-topbar,.wp-fullscreen-wrap{width:480px}#fullscreen-topbar{position:absolute}#wp-fullscreen-status{width:auto!important;max-width:100%;padding:0 10px}}.rtl .quicktags-toolbar input,.rtl .wp-switch-editor{font-family:Tahoma,sans-serif}.mce-rtl .mce-flow-layout .mce-flow-layout-item>div{direction:rtl}.mce-rtl .mce-listbox i.mce-caret{left:6px}html:lang(he-il) .rtl .quicktags-toolbar input,html:lang(he-il) .rtl .wp-switch-editor{font-family:Arial,sans-serif}@media print,(-o-min-device-pixel-ratio:5/4),(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){#wp-fullscreen-buttons #wp_fs_image span.mce_image,.wp-media-buttons .add_media span.wp-media-buttons-icon{background:0 0}} \ No newline at end of file diff --git a/wp-includes/css/jquery-ui-dialog-rtl.css b/wp-includes/css/jquery-ui-dialog-rtl.css new file mode 100644 index 0000000..24e2c8b --- /dev/null +++ b/wp-includes/css/jquery-ui-dialog-rtl.css @@ -0,0 +1,334 @@ +/*! + * jQuery UI CSS Framework 1.10.1 + * http://jqueryui.com + * + * Copyright 2013 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + min-height: 0; /* support: IE7 */ +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + right: 0; + position: absolute; + opacity: 0; + filter:Alpha(Opacity=0); +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} + +/*! + * jQuery UI Resizable 1.10.1 + * http://jqueryui.com + * + * Copyright 2013 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Resizable#theming + */ +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; +} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + right: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + right: 0; +} +/* @noflip */ +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +/* @noflip */ +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} +/* @noflip */ +.ui-resizable-se { + cursor: se-resize; + width: 9px; + height: 9px; + right: -5px; + bottom: -5px; +} +/* @noflip */ +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +/* @noflip */ +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +/* @noflip */ +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} + +/* WP buttons: see buttons.css. */ + +.ui-button { + display: inline-block; + text-decoration: none; + font-size: 13px; + line-height: 26px; + height: 28px; + margin: 0; + padding: 0 10px 1px; + cursor: pointer; + border-width: 1px; + border-style: solid; + -webkit-appearance: none; + -webkit-border-radius: 3px; + border-radius: 3px; + white-space: nowrap; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + color: #555; + border-color: #cccccc; + background: #f7f7f7; + -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.08); + box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.08); + vertical-align: top; +} + +/* Remove the dotted border on :focus and the extra padding in Firefox */ +.ui-button::-moz-focus-inner { + border-width: 1px 0; + border-style: solid none; + border-color: transparent; + padding: 0; +} + +.ui-button:hover { + background: #fafafa; + border-color: #999; + color: #222; +} + +.ui-button:focus { + -webkit-box-shadow: 1px 1px 1px rgba(0,0,0,.2); + box-shadow: 1px 1px 1px rgba(0,0,0,.2); +} + +.ui-button:active { + background: #eee; + border-color: #999; + color: #333; + -webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 ); + box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 ); + outline: none; +} + +.ui-button[disabled], +.ui-button:disabled { + color: #aaa !important; + border-color: #ddd !important; + background: #f7f7f7 !important; + -webkit-box-shadow: none !important; + box-shadow: none !important; + text-shadow: 0 1px 0 #fff !important; + cursor: default; +} + +@media screen and ( max-width: 782px ) { + + .ui-button { + padding: 10px 14px; + line-height: 1; + font-size: 14px; + vertical-align: middle; + height: auto; + margin-bottom: 4px; + } + +} + +/* WP Theme */ + +.ui-dialog { + position: absolute; + top: 0; + right: 0; + z-index: 100102; + background-color: #fff; + -webkit-box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); + box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); +} + +.ui-dialog-titlebar { + background: #fcfcfc; + border-bottom: 1px solid #dfdfdf; + height: 36px; + font-size: 18px; + font-weight: 600; + line-height: 36px; + padding: 0 16px 0 36px; +} + +.ui-button.ui-dialog-titlebar-close { + background: none; + border: none; + -webkit-box-shadow: none; + box-shadow: none; + color: #666; + cursor: pointer; + display: block; + padding: 0; + position: absolute; + top: 0; + left: 0; + width: 36px; + height: 36px; + text-align: center; +} + +.ui-dialog-titlebar-close:before { + font: normal 20px/1 'dashicons'; + vertical-align: top; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + line-height: 36px; + width: 36px; + height: 36px; + content: '\f158'; +} + +.ui-button.ui-dialog-titlebar-close:hover { + color: #2ea2cc; +} + +.ui-dialog-titlebar-close .ui-button-text { + display: none; +} + +.ui-dialog-content { + padding: 16px; + overflow: auto; +} + +.ui-dialog-buttonpane { + background: #fcfcfc; + border-top: 1px solid #dfdfdf; + padding: 16px; +} + +.ui-dialog-buttonpane .ui-button { + margin-right: 16px; +} + +.ui-dialog-buttonpane .ui-dialog-buttonset { + float: left; +} + +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} + +.ui-widget-overlay { + position: fixed; + top: 0; + right: 0; + left: 0; + bottom: 0; + min-height: 360px; + background: #000; + opacity: 0.7; + filter: alpha(opacity=70); + z-index: 100101; +} diff --git a/wp-includes/css/jquery-ui-dialog-rtl.min.css b/wp-includes/css/jquery-ui-dialog-rtl.min.css new file mode 100644 index 0000000..e7b4829 --- /dev/null +++ b/wp-includes/css/jquery-ui-dialog-rtl.min.css @@ -0,0 +1,19 @@ +/*! + * jQuery UI CSS Framework 1.10.1 + * http://jqueryui.com + * + * Copyright 2013 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + */.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:after,.ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;right:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}/*! + * jQuery UI Resizable 1.10.1 + * http://jqueryui.com + * + * Copyright 2013 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Resizable#theming + */.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block}.ui-resizable-autohide .ui-resizable-handle,.ui-resizable-disabled .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;right:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;right:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:9px;height:9px;right:-5px;bottom:-5px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-button{display:inline-block;text-decoration:none;font-size:13px;line-height:26px;height:28px;margin:0;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;color:#555;border-color:#ccc;background:#f7f7f7;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);vertical-align:top}.ui-button::-moz-focus-inner{border-width:1px 0;border-style:solid none;border-color:transparent;padding:0}.ui-button:hover{background:#fafafa;border-color:#999;color:#222}.ui-button:focus{-webkit-box-shadow:1px 1px 1px rgba(0,0,0,.2);box-shadow:1px 1px 1px rgba(0,0,0,.2)}.ui-button:active{background:#eee;border-color:#999;color:#333;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);outline:0}.ui-button:disabled,.ui-button[disabled]{color:#aaa!important;border-color:#ddd!important;background:#f7f7f7!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 1px 0 #fff!important;cursor:default}@media screen and (max-width:782px){.ui-button{padding:10px 14px;line-height:1;font-size:14px;vertical-align:middle;height:auto;margin-bottom:4px}}.ui-dialog{position:absolute;top:0;right:0;z-index:100102;background-color:#fff;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3)}.ui-dialog-titlebar{background:#fcfcfc;border-bottom:1px solid #dfdfdf;height:36px;font-size:18px;font-weight:600;line-height:36px;padding:0 16px 0 36px}.ui-button.ui-dialog-titlebar-close{background:0 0;border:0;-webkit-box-shadow:none;box-shadow:none;color:#666;cursor:pointer;display:block;padding:0;position:absolute;top:0;left:0;width:36px;height:36px;text-align:center}.ui-dialog-titlebar-close:before{font:400 20px/1 dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:36px;width:36px;height:36px;content:'\f158'}.ui-button.ui-dialog-titlebar-close:hover{color:#2ea2cc}.ui-dialog-titlebar-close .ui-button-text{display:none}.ui-dialog-content{padding:16px;overflow:auto}.ui-dialog-buttonpane{background:#fcfcfc;border-top:1px solid #dfdfdf;padding:16px}.ui-dialog-buttonpane .ui-button{margin-right:16px}.ui-dialog-buttonpane .ui-dialog-buttonset{float:left}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-widget-overlay{position:fixed;top:0;right:0;left:0;bottom:0;min-height:360px;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:100101} \ No newline at end of file diff --git a/wp-includes/css/jquery-ui-dialog.css b/wp-includes/css/jquery-ui-dialog.css new file mode 100644 index 0000000..94c655f --- /dev/null +++ b/wp-includes/css/jquery-ui-dialog.css @@ -0,0 +1,334 @@ +/*! + * jQuery UI CSS Framework 1.10.1 + * http://jqueryui.com + * + * Copyright 2013 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + min-height: 0; /* support: IE7 */ +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:Alpha(Opacity=0); +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} + +/*! + * jQuery UI Resizable 1.10.1 + * http://jqueryui.com + * + * Copyright 2013 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Resizable#theming + */ +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; +} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +/* @noflip */ +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +/* @noflip */ +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} +/* @noflip */ +.ui-resizable-se { + cursor: se-resize; + width: 9px; + height: 9px; + right: -5px; + bottom: -5px; +} +/* @noflip */ +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +/* @noflip */ +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +/* @noflip */ +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} + +/* WP buttons: see buttons.css. */ + +.ui-button { + display: inline-block; + text-decoration: none; + font-size: 13px; + line-height: 26px; + height: 28px; + margin: 0; + padding: 0 10px 1px; + cursor: pointer; + border-width: 1px; + border-style: solid; + -webkit-appearance: none; + -webkit-border-radius: 3px; + border-radius: 3px; + white-space: nowrap; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + color: #555; + border-color: #cccccc; + background: #f7f7f7; + -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.08); + box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.08); + vertical-align: top; +} + +/* Remove the dotted border on :focus and the extra padding in Firefox */ +.ui-button::-moz-focus-inner { + border-width: 1px 0; + border-style: solid none; + border-color: transparent; + padding: 0; +} + +.ui-button:hover { + background: #fafafa; + border-color: #999; + color: #222; +} + +.ui-button:focus { + -webkit-box-shadow: 1px 1px 1px rgba(0,0,0,.2); + box-shadow: 1px 1px 1px rgba(0,0,0,.2); +} + +.ui-button:active { + background: #eee; + border-color: #999; + color: #333; + -webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 ); + box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 ); + outline: none; +} + +.ui-button[disabled], +.ui-button:disabled { + color: #aaa !important; + border-color: #ddd !important; + background: #f7f7f7 !important; + -webkit-box-shadow: none !important; + box-shadow: none !important; + text-shadow: 0 1px 0 #fff !important; + cursor: default; +} + +@media screen and ( max-width: 782px ) { + + .ui-button { + padding: 10px 14px; + line-height: 1; + font-size: 14px; + vertical-align: middle; + height: auto; + margin-bottom: 4px; + } + +} + +/* WP Theme */ + +.ui-dialog { + position: absolute; + top: 0; + left: 0; + z-index: 100102; + background-color: #fff; + -webkit-box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); + box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); +} + +.ui-dialog-titlebar { + background: #fcfcfc; + border-bottom: 1px solid #dfdfdf; + height: 36px; + font-size: 18px; + font-weight: 600; + line-height: 36px; + padding: 0 36px 0 16px; +} + +.ui-button.ui-dialog-titlebar-close { + background: none; + border: none; + -webkit-box-shadow: none; + box-shadow: none; + color: #666; + cursor: pointer; + display: block; + padding: 0; + position: absolute; + top: 0; + right: 0; + width: 36px; + height: 36px; + text-align: center; +} + +.ui-dialog-titlebar-close:before { + font: normal 20px/1 'dashicons'; + vertical-align: top; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + line-height: 36px; + width: 36px; + height: 36px; + content: '\f158'; +} + +.ui-button.ui-dialog-titlebar-close:hover { + color: #2ea2cc; +} + +.ui-dialog-titlebar-close .ui-button-text { + display: none; +} + +.ui-dialog-content { + padding: 16px; + overflow: auto; +} + +.ui-dialog-buttonpane { + background: #fcfcfc; + border-top: 1px solid #dfdfdf; + padding: 16px; +} + +.ui-dialog-buttonpane .ui-button { + margin-left: 16px; +} + +.ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} + +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} + +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + min-height: 360px; + background: #000; + opacity: 0.7; + filter: alpha(opacity=70); + z-index: 100101; +} diff --git a/wp-includes/css/jquery-ui-dialog.min.css b/wp-includes/css/jquery-ui-dialog.min.css new file mode 100644 index 0000000..51f3922 --- /dev/null +++ b/wp-includes/css/jquery-ui-dialog.min.css @@ -0,0 +1,19 @@ +/*! + * jQuery UI CSS Framework 1.10.1 + * http://jqueryui.com + * + * Copyright 2013 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + */.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:after,.ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}/*! + * jQuery UI Resizable 1.10.1 + * http://jqueryui.com + * + * Copyright 2013 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Resizable#theming + */.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block}.ui-resizable-autohide .ui-resizable-handle,.ui-resizable-disabled .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:9px;height:9px;right:-5px;bottom:-5px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-button{display:inline-block;text-decoration:none;font-size:13px;line-height:26px;height:28px;margin:0;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;color:#555;border-color:#ccc;background:#f7f7f7;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);vertical-align:top}.ui-button::-moz-focus-inner{border-width:1px 0;border-style:solid none;border-color:transparent;padding:0}.ui-button:hover{background:#fafafa;border-color:#999;color:#222}.ui-button:focus{-webkit-box-shadow:1px 1px 1px rgba(0,0,0,.2);box-shadow:1px 1px 1px rgba(0,0,0,.2)}.ui-button:active{background:#eee;border-color:#999;color:#333;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);outline:0}.ui-button:disabled,.ui-button[disabled]{color:#aaa!important;border-color:#ddd!important;background:#f7f7f7!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 1px 0 #fff!important;cursor:default}@media screen and (max-width:782px){.ui-button{padding:10px 14px;line-height:1;font-size:14px;vertical-align:middle;height:auto;margin-bottom:4px}}.ui-dialog{position:absolute;top:0;left:0;z-index:100102;background-color:#fff;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3)}.ui-dialog-titlebar{background:#fcfcfc;border-bottom:1px solid #dfdfdf;height:36px;font-size:18px;font-weight:600;line-height:36px;padding:0 36px 0 16px}.ui-button.ui-dialog-titlebar-close{background:0 0;border:0;-webkit-box-shadow:none;box-shadow:none;color:#666;cursor:pointer;display:block;padding:0;position:absolute;top:0;right:0;width:36px;height:36px;text-align:center}.ui-dialog-titlebar-close:before{font:400 20px/1 dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:36px;width:36px;height:36px;content:'\f158'}.ui-button.ui-dialog-titlebar-close:hover{color:#2ea2cc}.ui-dialog-titlebar-close .ui-button-text{display:none}.ui-dialog-content{padding:16px;overflow:auto}.ui-dialog-buttonpane{background:#fcfcfc;border-top:1px solid #dfdfdf;padding:16px}.ui-dialog-buttonpane .ui-button{margin-left:16px}.ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-widget-overlay{position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:100101} \ No newline at end of file diff --git a/wp-includes/css/media-views-rtl.css b/wp-includes/css/media-views-rtl.css new file mode 100644 index 0000000..e692a78 --- /dev/null +++ b/wp-includes/css/media-views-rtl.css @@ -0,0 +1,2352 @@ +/** + * Base Styles + */ +.media-modal * { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} + +.media-modal, +.media-frame { + font-family: "Open Sans", sans-serif; + font-size: 12px; +} + +.media-frame input, +.media-frame textarea { + padding: 6px 8px; + line-height: 16px; +} + +.media-frame select, +.wp-admin .media-frame select { + line-height: 28px; + margin-top: 3px; +} + +.media-frame a { + border-bottom: none; + color: #21759b; +} + +.media-frame a:hover { + color: #d54e21; +} + +.media-frame a.button { + color: #333; +} + +.media-frame a.button:hover { + color: #222; +} + +.media-frame a.button-primary, +.media-frame a.button-primary:hover { + color: #fff; +} + +.media-frame input[type="text"], +.media-frame input[type="password"], +.media-frame input[type="number"], +.media-frame input[type="search"], +.media-frame input[type="email"], +.media-frame input[type="url"], +.media-frame textarea, +.media-frame select { + font-family: "Open Sans", sans-serif; + font-size: 12px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + border-width: 1px; + border-style: solid; + border-color: #dfdfdf; +} + +.media-frame select { + height: 24px; + padding: 2px; +} + +.media-frame input:disabled, +.media-frame textarea:disabled, +.media-frame input[readonly], +.media-frame textarea[readonly] { + background-color: #eee; +} + +.media-frame input[type="search"] { + -webkit-appearance: textfield; +} + +.media-frame :-moz-placeholder { + color: #a9a9a9; +} + +.media-frame .hidden { + display: none; +} + +/* Enable draggable on IE10 touch events until it's rolled into jQuery UI core */ +.ui-sortable, +.ui-draggable { + -ms-touch-action: none; + touch-action: none; +} + +.meta-box-sortables.ui-sortable { + -ms-touch-action: auto; + touch-action: auto; +} + +.meta-box-sortables.ui-sortable .hndle { + -ms-touch-action: none; + touch-action: none; +} + +/** + * Modal + */ +.media-modal { + position: fixed; + top: 30px; + right: 30px; + left: 30px; + bottom: 30px; + z-index: 160000; +} + +.wp-customizer .media-modal { + z-index: 560000; +} + +.media-modal-backdrop { + position: fixed; + top: 0; + right: 0; + left: 0; + bottom: 0; + min-height: 360px; + background: #000; + opacity: 0.7; + z-index: 159900; +} + +.wp-customizer .media-modal-backdrop { + z-index: 559900; +} + +.media-modal-close { + position: absolute; + text-decoration: none; + top: 5px; + left: 10px; + width: 30px; + height: 30px; + z-index: 1000; +} + +.media-modal-close span.media-modal-icon { + display: block; + margin: 8px auto 0; + width: 15px; + height: 15px; + background-image: none; +} + +.media-modal-close .media-modal-icon:before { + content: '\f158'; + font: normal 20px/1 'dashicons'; + speak: none; + vertical-align: middle; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + color: #666; +} + +.media-modal-close:hover .media-modal-icon:before { + color: #2ea2cc; +} + +.media-modal-close:active { + outline: 0; +} + +.media-modal-content { + position: absolute; + top: 0; + right: 0; + left: 0; + bottom: 0; + overflow: auto; + min-height: 300px; + -webkit-box-shadow: 0 5px 15px rgba(0,0,0,0.7); + box-shadow: 0 5px 15px rgba(0,0,0,0.7); + background: #fcfcfc; + -webkit-font-smoothing: subpixel-antialiased; +} + +.media-modal-icon { + background-image: url(../images/uploader-icons.png); + background-repeat: no-repeat; +} + +/** + * Toolbar + */ +.media-toolbar { + position: absolute; + top: 0; + right: 0; + left: 0; + z-index: 100; + height: 60px; + padding: 0 16px; + border: 0 solid #dfdfdf; + overflow: hidden; +} + +.media-toolbar-primary { + float: left; + height: 100%; +} + +.media-toolbar-secondary { + float: right; + height: 100%; +} + +.media-toolbar-primary > .media-button, +.media-toolbar-primary > .media-button-group { + margin-right: 10px; + float: right; + margin-top: 15px; +} + +.media-toolbar-secondary > .media-button, +.media-toolbar-secondary > .media-button-group { + margin-left: 10px; + float: right; + margin-top: 15px; +} + +/** + * Sidebar + */ +.media-sidebar { + position: absolute; + top: 0; + left: 0; + bottom: 0; + width: 267px; + padding: 0 16px 24px; + z-index: 75; + background: #f3f3f3; + border-right: 1px solid #ddd; + overflow: auto; + -webkit-overflow-scrolling: touch; +} + +.hide-toolbar .media-sidebar { + bottom: 0; +} + +.media-sidebar .sidebar-title { + font-size: 20px; + margin: 0; + padding: 12px 10px 10px; + line-height: 28px; +} + +.media-sidebar .sidebar-content { + padding: 0 10px; + margin-bottom: 130px; +} + +.media-sidebar .search { + display: block; + width: 100%; +} + +.media-sidebar h3, +.image-details h3 { + position: relative; + font-weight: bold; + text-transform: uppercase; + font-size: 12px; + color: #666; + margin: 24px 0 8px; +} + +.media-sidebar .setting { + display: block; + float: right; + width: 100%; + margin: 1px 0; +} + +.media-sidebar .setting label { + display: block; +} + +.media-sidebar .setting .link-to-custom { + margin: 3px 0; +} + +.media-sidebar .setting span { + min-width: 30%; + margin-left: 4%; + font-size: 12px; +} + +.media-sidebar .setting select { + max-width: 65%; +} + +.media-sidebar .setting input[type="checkbox"], +.media-sidebar .field input[type="checkbox"] { + width: 16px; + float: none; + margin: 8px 3px 0; + padding: 0; +} + +.media-sidebar .setting span, +.compat-item label span { + float: right; + min-height: 22px; + padding-top: 8px; + line-height: 16px; + text-align: left; + font-weight: normal; + color: #666; +} + +.media-sidebar .setting input, +.media-sidebar .setting textarea { + margin: 1px; + width: 65%; + float: left; +} + +.media-sidebar .setting textarea, +.compat-item .field textarea { + height: 62px; + resize: vertical; +} + +.media-sidebar select { + margin-top: 3px; +} + +.compat-item { + float: right; + width: 100%; + overflow: hidden; +} + +.compat-item table { + width: 100%; + table-layout: fixed; + border-spacing: 0; + border: 0; +} + +.compat-item tr { + padding: 2px 0; + display: block; + overflow: hidden; +} + +.compat-item .label, +.compat-item .field { + display: block; + margin: 0; + padding: 0; +} + +.compat-item .label { + min-width: 30%; + margin-left: 4%; + float: right; + text-align: left; +} + +.compat-item .label span { + display: block; + width: 100%; +} + +.compat-item .field { + float: left; + width: 66%; +} + +.compat-item .field input { + width: 100%; + margin: 0; +} + + +/** + * Menu + */ +.media-menu { + position: absolute; + top: 0; + right: 0; + left: 0; + bottom: 0; + margin: 0; + padding: 16px 0; + background: #f3f3f3; + border-left-width: 1px; + border-left-style: solid; + border-left-color: #ccc; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.media-menu > a { + display: block; + position: relative; + padding: 8px 20px; + margin: 0; + line-height: 18px; + font-size: 14px; + color: #0074a2; + text-decoration: none; +} + +.media-menu > a:hover { + color: #21759B; + background: rgba( 0, 0, 0, 0.04 ); +} + +.media-menu > a:active { + outline: none; +} + +.media-menu .active, +.media-menu .active:hover { + color: #222; + font-weight: bold; +} + +.media-menu .separator { + height: 0; + margin: 12px 20px; + padding: 0; + border-top: 1px solid #ddd; +} + +/** + * Menu + */ +.media-router { + position: relative; + padding: 0 6px; + margin: 0; + clear: both; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.media-router a { + -webkit-transition: none; + transition: none; +} + +.media-router > a { + position: relative; + float: right; + padding: 8px 10px 9px; + margin: 0; + height: 18px; + line-height: 18px; + font-size: 14px; + text-decoration: none; +} + +.media-router > a:last-child { + border-left: 0; +} + +.media-router > a:active, +.media-router > a:focus { + outline: none; +} + +.media-router .active, +.media-router .active:hover { + color: #333; +} + +.media-router .active, +.media-router > a.active:last-child { + margin: -1px -1px 0; + background: #fff; + border: 1px solid #ddd; + border-bottom: none; +} + +.media-router .active:after { + display: none; +} + +/** + * Frame + */ +.media-frame { + overflow: hidden; + position: absolute; + top: 0; + right: 0; + left: 0; + bottom: 0; +} + +.media-frame-menu { + position: absolute; + top: 0; + right: 0; + bottom: 0; + width: 200px; + z-index: 150; +} + +.media-frame-title { + position: absolute; + top: 0; + right: 200px; + left: 0; + height: 56px; + z-index: 200; +} + +.media-frame-router { + position: absolute; + top: 56px; + right: 200px; + left: 0; + height: 36px; + z-index: 200; +} + +.media-frame-content { + position: absolute; + top: 90px; + right: 200px; + left: 0; + bottom: 61px; + height: auto; + width: auto; + margin: 0; + overflow: auto; + background: #fff; + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; +} + +.media-frame-toolbar { + position: absolute; + right: 200px; + left: 0; + bottom: 0; + height: 60px; + z-index: 100; +} + +.media-frame.hide-menu .media-frame-title, +.media-frame.hide-menu .media-frame-router, +.media-frame.hide-menu .media-frame-toolbar, +.media-frame.hide-menu .media-frame-content { + right: 0; +} + +.media-frame.hide-menu .media-frame-menu { + right: -200px; +} + +.media-frame.hide-toolbar .media-frame-content { + bottom: 0; +} + +.media-frame.hide-toolbar .media-frame-toolbar { + bottom: -61px; +} + +.media-frame.hide-router .media-frame-content { + top: 56px; +} + +.media-frame.hide-router .media-frame-router { + display: none; +} + +.media-frame.hide-router .media-frame-title { + border-bottom: 1px solid #dfdfdf; + -webkit-box-shadow: 0 4px 4px -4px rgba( 0, 0, 0, 0.1 ); + box-shadow: 0 4px 4px -4px rgba( 0, 0, 0, 0.1 ); +} + +.media-frame-title h1 { + padding: 0 16px; + font-size: 22px; + line-height: 60px; + margin: 0; +} + +.media-frame-title .suggested-dimensions { + font-size: 14px; + float: left; + margin-left: 20px; +} + +.media-frame-content .crop-content { + height: 100%; +} + +.media-frame-content .crop-content .crop-image { + display: block; + margin: auto; + max-width: 100%; + max-height: 100%; +} + +.media-frame-content .crop-content .upload-errors +{ + position: absolute; + width: 300px; + top: 50%; + right: 50%; + margin-right: -150px; + margin-left: -150px; + z-index: 600000; +} + +/** + * Iframes + */ +.media-frame .media-iframe { + overflow: hidden; +} + +.media-frame .media-iframe, +.media-frame .media-iframe iframe { + height: 100%; + width: 100%; + border: 0; +} + +/** + * Attachment Browser Filters + */ +.media-frame select.attachment-filters { + margin-top: 11px; + margin-left: 10px; +} + +/** + * Search + */ +.media-frame .search { + margin-top: 11px; + padding: 4px; + line-height: 18px; + font-size: 13px; + color: #464646; + font-family: "Open Sans", sans-serif; + -webkit-appearance: none; +} + +.media-toolbar-secondary .search { + margin-left: 16px; +} + +/** + * Attachments + */ +.attachments { + margin: 0; + padding-left: 16px; + -webkit-overflow-scrolling: touch; +} + +/** + * Attachment + */ +.attachment { + position: relative; + float: right; + padding: 0; + margin: 0 10px 20px; + color: #464646; + list-style: none; + text-align: center; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.selected.attachment { + -webkit-box-shadow: + 0 0 0 1px #fff, + 0 0 0 3px #ccc; + box-shadow: + 0 0 0 1px #fff, + 0 0 0 3px #ccc; +} + +.attachment-preview { + position: relative; + width: 199px; + height: 199px; + -webkit-box-shadow: + inset 0 0 15px rgba( 0, 0, 0, 0.1 ), + inset 0 0 0 1px rgba( 0, 0, 0, 0.05 ); + box-shadow: + inset 0 0 15px rgba( 0, 0, 0, 0.1 ), + inset 0 0 0 1px rgba( 0, 0, 0, 0.05 ); + background: #eee; + cursor: pointer; +} + +.attachment .icon { + margin: 0 auto; + overflow: hidden; + padding-top: 20%; +} + +.attachment .thumbnail { + display: block; + position: absolute; + top: 0; + right: 0; + margin: 0 auto; + overflow: hidden; + max-width: 100%; + max-height: 100%; +} + +.attachment-preview .thumbnail:after { + content: ''; + display: block; + position: absolute; + top: 0; + right: 0; + left: 0; + bottom: 0; + -webkit-box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.1 ); + box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.1 ); + overflow: hidden; +} + +/* @noflip */ +.attachment .thumbnail img { + top: 0; + left: 0; +} + +/* @noflip */ +.attachment .thumbnail .centered { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + -webkit-transform: translate( 50%, 50% ); + -ms-transform: translate( 50%, 50% ); + transform: translate( 50%, 50% ); +} + +.attachment .thumbnail .centered img { + -webkit-transform: translate( -50%, -50% ); + -ms-transform: translate( -50%, -50% ); + transform: translate( -50%, -50% ); +} + +.attachment .filename { + position: absolute; + right: 0; + left: 0; + bottom: 0; + overflow: hidden; + max-height: 100%; + + word-wrap: break-word; + text-align: center; + font-weight: bold; + background: rgba( 255, 255, 255, 0.8 ); + -webkit-box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.15 ); + box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.15 ); +} + +.attachment .filename div { + padding: 5px 10px; +} + +.attachment-preview .thumbnail { + width: 199px; + height: 199px; +} + +.attachment .thumbnail img { + position: absolute; +} + +.attachment .close { + display: none; + position: absolute; + top: 5px; + left: 5px; + height: 22px; + width: 22px; + padding: 0; + font-size: 20px; + line-height: 20px; + text-align: center; + text-decoration: none; + color: #464646; + background-color: #fff; + background-position: -96px 4px; + border-width: 0; + -webkit-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 0 0 1px rgba( 0, 0, 0, 0.3 ); + box-shadow: 0 0 0 1px rgba( 0, 0, 0, 0.3 ); +} + +.attachment .close:hover { + -webkit-box-shadow: 0 0 0 1px rgba( 0, 0, 0, 0.6 ); + box-shadow: 0 0 0 1px rgba( 0, 0, 0, 0.6 ); +} + +.attachment:hover .close { + display: block; +} + +.attachment .check { + display: none; + height: 24px; + width: 24px; + position: absolute; + top: -6px; + left: -6px; + outline: none; + background: #eee; + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 2px rgba( 0, 0, 0, 0.4 ); + box-shadow: 0 0 0 1px #fff, 0 0 0 2px rgba( 0, 0, 0, 0.4 ); +} + +.attachment .check div { + background-position: -1px 0; + height: 15px; + width: 15px; + margin: 5px; +} + +.attachment .check:hover div { + background-position: -40px 0; +} + +.attachment.selected .check { + display: block; +} + +.attachment.details { + -webkit-box-shadow: 0 0 0 1px #fff, + 0 0 0 5px #1e8cbe; + box-shadow: 0 0 0 1px #fff, + 0 0 0 5px #1e8cbe; +} + +.attachment.details .check { + background-color: #1e8cbe; + -webkit-box-shadow: 0 0 0 1px #fff, + 0 0 0 2px #1e8cbe; + box-shadow: 0 0 0 1px #fff, + 0 0 0 2px #1e8cbe; +} + +.attachment.details .check div { + background-position: -21px 0; +} + +.attachment.details .check:hover div { + background-position: -60px 0; +} + +.media-frame .attachment .describe { + position: relative; + display: block; + width: 100%; + margin: -1px 0 0; + padding: 8px; + font-size: 12px; + -webkit-border-radius: 0; + border-radius: 0; +} + +/** + * Attachments Browser + */ +.media-frame .attachments-browser { + position: relative; + width: 100%; + height: 100%; + overflow: hidden; +} + +.attachments-browser .media-toolbar { + left: 300px; + height: 50px; +} + +.attachments-browser .media-toolbar-primary > .media-button, +.attachments-browser .media-toolbar-primary > .media-button-group, +.attachments-browser .media-toolbar-secondary > .media-button, +.attachments-browser .media-toolbar-secondary > .media-button-group { + margin-top: 10px; +} + +.attachments-browser .attachments, +.attachments-browser .uploader-inline { + position: absolute; + top: 50px; + right: 0; + left: 300px; + bottom: 0; + overflow: auto; +} + +.attachments-browser .instructions { + display: inline-block; + margin-top: 16px; + line-height: 18px; + font-size: 13px; + color: #666; + margin-left: 0.5em; +} + +/** + * Progress Bar + */ +.media-progress-bar { + position: relative; + height: 10px; + width: 70%; + margin: 10px auto; + -webkit-border-radius: 10px; + border-radius: 10px; + background: #dfdfdf; + background: rgba( 0, 0, 0, 0.1 ); +} + +.media-progress-bar div { + height: 10px; + min-width: 20px; + width: 0; + background: #1e8cbe; + -webkit-border-radius: 10px; + border-radius: 10px; + -webkit-transition: width 300ms; + transition: width 300ms; +} + +.media-uploader-status .media-progress-bar { + display: none; + width: 100%; +} + +.uploading.media-uploader-status .media-progress-bar { + display: block; +} + +.attachment-preview .media-progress-bar { + position: absolute; + top: 50%; + right: 15%; + width: 70%; + margin: -5px 0 0 0; +} + +.media-uploader-status { + position: relative; + margin: 0 auto; + padding-bottom: 10px; + max-width: 400px; +} + +.media-sidebar .media-uploader-status { + border-bottom: 1px solid #dfdfdf; + -webkit-box-shadow: 0 1px 0 #fff; + box-shadow: 0 1px 0 #fff; +} + +.uploader-inline .media-uploader-status h3 { + display: none; +} + +.media-uploader-status .upload-details { + display: none; + font-size: 12px; + color: #666; +} + +.uploading.media-uploader-status .upload-details { + display: block; +} + +.media-uploader-status .upload-detail-separator { + padding: 0 4px; +} + +.media-uploader-status .upload-count { + color: #464646; +} + +.media-uploader-status .upload-dismiss-errors, +.media-uploader-status .upload-errors { + display: none; +} + +.errors.media-uploader-status .upload-dismiss-errors, +.errors.media-uploader-status .upload-errors { + display: block; +} + +.media-uploader-status .upload-dismiss-errors { + text-decoration: none; +} + +.media-sidebar .media-uploader-status .upload-dismiss-errors { + position: absolute; + top: 0; + left: 0; +} + +.upload-errors .upload-error { + margin: 8px auto 0 auto; + padding: 8px; + border: 1px #c00 solid; + background: #ffebe8; + -webkit-border-radius: 3px; + border-radius: 3px; +} + +.upload-errors .upload-error-label { + padding: 2px 4px; + margin-left: 8px; + font-weight: bold; + color: #fff; + background: #e00; + background-image: -webkit-gradient(linear, right top, right bottom, from(#e00), to(#a00)); + background-image: -webkit-linear-gradient(top, #e00, #a00); + background-image: linear-gradient(to bottom, #e00, #a00); + -webkit-border-radius: 3px; + border-radius: 3px; +} + +.upload-errors .upload-error-message { + display: block; + padding-top: 8px; + color: #b44; + word-wrap: break-word; +} + +.uploader-window { + position: fixed; + top: 0; + right: 0; + left: 0; + bottom: 0; + background: rgba( 0, 86, 132, 0.9 ); + z-index: 250000; + display: none; + text-align: center; + opacity: 0; + -webkit-transition: opacity 250ms; + transition: opacity 250ms; +} + +.uploader-window-content { + position: absolute; + top: 10px; + right: 10px; + left: 10px; + bottom: 10px; + border: 1px dashed #fff; +} + +.uploader-window h3 { + margin: -0.5em 0 0; + position: absolute; + top: 50%; + right: 0; + left: 0; + -webkit-transform: translateY( -50% ); + -ms-transform: translateY( -50% ); + transform: translateY( -50% ); + font-size: 40px; + color: #fff; + padding: 0; +} + +.uploader-window .media-progress-bar { + margin-top: 20px; + max-width: 300px; + background: transparent; + border-color: #fff; + display: none; +} + +.uploader-window .media-progress-bar div { + background: #fff; +} + +.uploading .uploader-window .media-progress-bar { + display: block; +} + +.media-frame .uploader-inline { + margin: 20px; + padding: 20px; + text-align: center; +} + +.uploader-inline-content { + position: absolute; + top: 30%; + right: 0; + left: 0; +} + +.uploader-inline-content .upload-ui { + margin: 4em 0; +} + +.uploader-inline-content .post-upload-ui { + margin-bottom: 2em; +} + +.uploader-inline .has-upload-message .upload-ui { + margin: 0 0 4em; +} + +.uploader-inline h3 { + font-size: 20px; + line-height: 28px; + font-weight: 400; + margin-bottom: 1.6em; +} + +.uploader-inline .has-upload-message .upload-instructions { + font-size: 14px; + color: #464646; + font-weight: normal; +} + +.uploader-inline .drop-instructions { + display: none; +} + +.supports-drag-drop .uploader-inline .drop-instructions { + display: block; +} + +.uploader-inline p { + font-size: 12px; +} + +.uploader-inline .media-progress-bar { + display: none; +} + +.uploading.uploader-inline .media-progress-bar { + display: block; +} + +.uploader-inline .browser { + display: inline-block !important; +} + +/** + * Selection + */ +.media-selection { + position: absolute; + top: 0; + right: 0; + left: 350px; + height: 60px; + padding: 0 16px 0 0; + overflow: hidden; + white-space: nowrap; +} + +.media-selection .selection-info { + display: inline-block; + font-size: 12px; + height: 60px; + margin-left: 10px; + vertical-align: top; +} + +.media-selection.empty, +.media-selection.editing { + display: none; +} + +.media-selection.one .edit-selection { + display: none; +} + +.media-selection .count { + display: block; + padding-top: 12px; + font-size: 14px; + line-height: 20px; + font-weight: bold; +} + +.media-selection .selection-info a { + display: block; + float: right; + padding: 1px 8px; + margin: 1px -8px 1px 8px; + line-height: 16px; + text-decoration: none; + border-left: 1px solid #dfdfdf; + color: #21759B; +} + +.media-selection .selection-info a:hover { + background: #21759B; + color: #fff; + border-color: transparent; +} + +.media-selection .selection-info a:last-child { + border-left: 0; + margin-left: 0; +} + +.media-selection .selection-info .clear-selection { + color: red; +} + +.media-selection .selection-info .clear-selection:hover { + background: red; +} + +.media-selection .selection-view { + display: inline-block; + vertical-align: top; +} + +.media-selection .attachments { + display: inline-block; + height: 48px; + margin-top: 5px; + overflow: hidden; + vertical-align: top; +} + +.media-selection .attachment .icon { + width: 50%; +} + +.attachment.selection.selected { + -webkit-box-shadow: none; + box-shadow: none; +} + +.attachment.selection.details { + -webkit-box-shadow: + 0 0 0 1px #fff, + 0 0 0 4px #1e8cbe; + box-shadow: + 0 0 0 1px #fff, + 0 0 0 4px #1e8cbe; +} + +.media-selection .attachment.selection.details { + -webkit-box-shadow: + 0 0 0 1px #fff, + 0 0 0 3px #1e8cbe; + box-shadow: + 0 0 0 1px #fff, + 0 0 0 3px #1e8cbe; +} + +.media-selection:after { + content: ''; + display: block; + position: absolute; + top: 0; + left: 0; + bottom: 0; + width: 25px; + background-image: -webkit-gradient(linear, left top, right top, from(rgba( 255, 255, 255, 1 )), to(rgba( 255, 255, 255, 0 ))); + background-image: -webkit-linear-gradient(left, rgba( 255, 255, 255, 1 ), rgba( 255, 255, 255, 0 )); + background-image: linear-gradient(to right, rgba( 255, 255, 255, 1 ) , rgba( 255, 255, 255, 0 ) ); +} + +.media-selection .attachment .filename { + display: none; +} + +/** + * Spinner + */ + +.media-frame .spinner { + background: url(../images/spinner.gif) no-repeat; + -webkit-background-size: 20px 20px; + background-size: 20px 20px; + display: none; + opacity: 0.7; + filter: alpha(opacity=70); + width: 20px; + height: 20px; + margin: 0; +} + +.media-toolbar .spinner { + margin-top: 14px; +} + +.media-sidebar .settings-save-status { + background: #f5f5f5; + float: left; + text-transform: none; + z-index: 10; +} + +.media-sidebar .settings-save-status .spinner { + margin: 0 5px 0; +} + +.media-sidebar .settings-save-status .saved { + float: left; + display: none; +} + +.media-sidebar .save-waiting .settings-save-status .spinner, +.media-sidebar .save-complete .settings-save-status .saved { + display: block; +} + +/** + * Attachment Details + */ +.attachment-details { + position: relative; + overflow: auto; +} + +.attachment-info { + overflow: hidden; + min-height: 60px; + margin-bottom: 16px; + line-height: 18px; + color: #666; + border-bottom: 1px solid #ddd; + padding-bottom: 11px; +} + +.attachment-info .filename { + font-weight: bold; + color: #464646; + word-wrap: break-word; +} + +.attachment-info .thumbnail { + position: relative; + float: right; + max-width: 120px; + max-height: 120px; + margin-top: 5px; + margin-left: 10px; + margin-bottom: 5px; +} + +.uploading .attachment-info .thumbnail { + width: 120px; + height: 80px; + -webkit-box-shadow: inset 0 0 15px rgba( 0, 0, 0, 0.1 ); + box-shadow: inset 0 0 15px rgba( 0, 0, 0, 0.1 ); +} + +.uploading .attachment-info .media-progress-bar { + margin-top: 35px; +} + +.attachment-info .thumbnail:after { + content: ''; + display: block; + position: absolute; + top: 0; + right: 0; + left: 0; + bottom: 0; + -webkit-box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.15 ); + box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.15 ); + overflow: hidden; +} + +.attachment-info .thumbnail img { + display: block; + max-width: 120px; + max-height: 120px; + margin: 0 auto; +} + +.attachment-info .details { + float: right; + font-size: 12px; + max-width: 100%; +} + +.attachment-info .edit-attachment, +.attachment-info .refresh-attachment, +.attachment-info .delete-attachment, +.attachment-info .trash-attachment { + display: block; + text-decoration: none; + white-space: nowrap; +} + +.attachment-info .refresh-attachment, +.attachment-details.needs-refresh .attachment-info .edit-attachment { + display: none; +} + +.attachment-details.needs-refresh .attachment-info .refresh-attachment, +.attachment-info .edit-attachment { + display: block; +} + +.attachment-info .delete-attachment, +.attachment-info .trash-attachment { + color: #bc0b0b; +} + +.attachment-info .delete-attachment:hover, +.attachment-info .trash-attachment:hover { + color: red; +} + +/** + * Attachment Display Settings + */ +.attachment-display-settings { + width: 100%; + float: right; + overflow: hidden; +} + +.attachment-display-settings h4 { + margin: 1.4em 0 0.4em; +} + +.collection-settings { + overflow: hidden; +} + +.collection-settings .setting input[type="checkbox"] { + float: right; + margin-left: 8px; +} + +.collection-settings .setting span { + min-width: inherit; +} + +/** + * Image Editor + */ + +.media-frame .imgedit-wrap { + position: static; +} + +.media-frame .imgedit-wait { + height: auto !important; + left: 0; + bottom: 0; + right: 0; +} + +.media-frame .imgedit-wrap .imgedit-panel-content { + padding: 16px; + position: absolute; + top: 0; + left: 282px; + bottom: 0; + right: 0; + overflow: auto; +} + +.media-frame .imgedit-wrap .imgedit-settings { + background: #f3f3f3; + border-right: 1px solid #ddd; + padding: 0 16px 16px; + position: absolute; + top: 0; + left: 0; + bottom: 0; + width: 250px; + overflow: auto; +} + +.media-frame .imgedit-group { + background: none; + border: none; + border-bottom: 1px solid #ddd; + -webkit-box-shadow: none; + box-shadow: none; + margin: 0; + margin-bottom: 16px; + padding: 0; + padding-bottom: 16px; +} + +.media-frame .imgedit-group:last-of-type { + border: none; + margin: 0; + padding: 0; +} + +.media-frame .imgedit-group-top h3 { + text-transform: uppercase; + font-size: 12px; + color: #666; + margin: 0; + margin-top: 24px; +} + +.media-frame .imgedit-group-top h3 a { + text-decoration: none; + color: #666; +} + +.media-frame .imgedit-help-toggle { + margin-top: -2px; + cursor: pointer; + color: #666; +} + +.media-frame .imgedit-help-toggled span.dashicons:before { + content: '\f142'; +} + +.media-frame .imgedit-group img { + margin-top: 5px; +} + +.media-frame .imgedit-wrap div.updated { + margin: 0; + margin-bottom: 16px; +} + + +/** + * Embed from URL and Image Details + */ +.embed-url { + display: block; + position: relative; + padding: 16px; + margin: 0; + z-index: 250; + background: #fff; + font-size: 18px; +} + +.media-frame .embed-url input { + font-size: 18px; + padding: 12px 14px; + width: 100%; + min-width: 200px; + -webkit-box-shadow: inset 2px 2px 4px -2px rgba( 0, 0, 0, 0.1 ); + box-shadow: inset 2px 2px 4px -2px rgba( 0, 0, 0, 0.1 ); +} + +.media-frame .embed-url .spinner { + position: absolute; + top: 16px; + left: 26px; +} + +.media-frame .embed-loading .embed-url .spinner { + display: block; +} + +.embed-link-settings, +.embed-media-settings { + position: absolute; + top: 60px; + right: 0; + left: 0; + bottom: 0; + padding: 16px 16px 32px; + overflow: auto; +} + +.image-details .media-modal { + right: 140px; + left: 140px; +} + +.image-details .media-frame-menu { + display: none; +} + +.image-details .media-frame-title, +.image-details .media-frame-content, +.image-details .media-frame-router { + right: 0; +} + +.image-details .embed-media-settings { + top: 0; + overflow: visible; + padding: 0; +} + +.image-details .column-settings { + background: #f3f3f3; + border-left: 1px solid #ddd; + min-height: 100%; + width: 52%; + position: absolute; + top: 0; + right: 0; +} + +.image-details .column-settings h3 { + margin: 20px; + padding-top: 20px; + border-top: 1px solid #ddd; +} + +.image-details .column-image { + width: 48%; + position: absolute; + right: 52%; + top: 0; +} + +.image-details .image { + margin: 20px; +} + +.image-details .image img { + max-width: 100%; + max-height: 500px; +} + +.image-details .advanced-toggle { + color: #666; + text-decoration: none; + display: block; +} + +.image-details .advanced-toggle::after { + font: normal 20px/1 'dashicons'; + speak: none; + vertical-align: top; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + content: '\f140'; + display: inline-block; + margin-top: -2px; +} + +.image-details .advanced-visible .advanced-toggle::after { + content: '\f142'; + margin-top: 0; +} + +.image-details .embed-media-settings .size { + margin-bottom: 4px; +} + +.image-details .custom-size span { + display: block; +} + +.image-details .custom-size label { + display: block; + float: right; +} + +.image-details .custom-size span small { + color: #999; + font-size: inherit; +} + +.image-details .custom-size input { + width: 5em; +} + +.image-details .custom-size .sep { + float: right; + margin: 26px 6px 0 6px; +} + +.image-details .custom-size::after { + content: ''; + display: table; + clear: both; +} + +.media-embed .thumbnail { + max-width: 100%; + max-height: 200px; + position: relative; + float: right; +} + +.media-embed .thumbnail img { + max-height: 200px; + display: block; +} + +.media-embed .thumbnail:after { + content: ''; + display: block; + position: absolute; + top: 0; + right: 0; + left: 0; + bottom: 0; + -webkit-box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.1 ); + box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.1 ); + overflow: hidden; +} + +.media-embed .setting { + width: 100%; + margin: 10px 0; + float: right; + display: block; + clear: both; +} + +.image-details .embed-media-settings .setting { + float: none; + width: auto; +} + +.image-details .actions { + margin: 10px 0; +} + +.image-details .hidden { + display: none; +} + +.media-embed .setting input[type="text"], +.media-embed .setting textarea { + display: block; + width: 100%; + max-width: 400px; + margin: 1px 0; +} + +.image-details .embed-media-settings .setting input[type="text"], +.image-details .embed-media-settings .setting textarea { + max-width: inherit; + width: 70%; +} + +.image-details .embed-media-settings .setting input.link-to-custom, +.image-details .embed-media-settings .link-target, +.image-details .embed-media-settings .custom-size { + margin-right: 27%; + width: 70%; +} + +.image-details .embed-media-settings .link-target { + margin-top: 24px; +} + +.media-embed .setting input.hidden, +.media-embed .setting textarea.hidden { + display: none; +} + +.media-embed .setting span { + display: block; + width: 200px; + font-size: 13px; + line-height: 24px; + color: #666; +} + +.image-details .embed-media-settings .setting span { + float: right; + width: 25%; + text-align: left; + margin: 8px 1% 0 1%; + line-height: 1.1; +} + +.media-embed .setting .button-group { + margin: 2px 0; +} + +.media-embed-sidebar { + position: absolute; + top: 0; + right: 440px; +} + +.advanced-section, +.link-settings { + margin-top: 10px; +} + +/* Drag & drop on the editor upload */ +#wp-fullscreen-body .uploader-editor, +.wp-editor-wrap .uploader-editor { + background: rgba( 150, 150, 150, 0.9 ); + position: absolute; + top: 0; + right: 0; + width: 100%; + height: 100%; + z-index: 99998; /* under the toolbar */ + display: none; + text-align: center; +} + +#wp-fullscreen-body .uploader-editor { + background: rgba( 0, 86, 132, 0.9 ); + position: fixed; + z-index: 100050; /* above the editor toolbar */ +} + +.wp-editor-wrap.wp-fullscreen-wrap .uploader-editor { + opacity: 0; +} + +#wp-fullscreen-body .uploader-editor-content, +.wp-editor-wrap .uploader-editor-content { + border: 1px dashed #fff; + position: absolute; + top: 10px; + right: 10px; + left: 10px; + bottom: 10px; +} + +#wp-fullscreen-body .uploader-editor .uploader-editor-title, +.wp-editor-wrap .uploader-editor .uploader-editor-title { + position: absolute; + top: 50%; + right: 0; + left: 0; + -webkit-transform: translateY( -50% ); + -ms-transform: translateY( -50% ); + transform: translateY( -50% ); + font-size: 3em; + line-height: 1.3; + font-weight: bold; + color: #fff; + padding: 0; + margin: 0; + display: none; +} + +.wp-editor-wrap .uploader-editor.droppable { + background: rgba( 0, 86, 132, 0.9 ); +} + +#wp-fullscreen-body .uploader-editor .uploader-editor-title, +.wp-editor-wrap .uploader-editor.droppable .uploader-editor-title { + display: block; +} + +/** + * IE7 Fixes + */ +.ie7 .media-frame .attachments-browser { + position: static; +} + +.ie7 .media-frame .embed-url input { + margin-top: 4px; + width: 90%; +} + +.ie7 .compat-item { + width: 99%; +} + +.ie7 .attachment-display-settings { + width: auto; +} + +.ie7 .attachment-preview, +.ie7 .attachment-preview .thumbnail { + width: 120px; + height: 120px; +} + +.ie7 .media-frame .attachment .describe { + width: 102px; +} + +.ie7 .media-sidebar .setting select { + max-width: 55%; +} + +.ie7 .media-sidebar .setting input, +.ie7 .media-sidebar .setting textarea { + width: 55%; +} + +.ie7 .media-sidebar .setting .link-to-custom { + float: right; +} + +/** + * Localization + */ +.rtl .media-modal, +.rtl .media-frame, +.rtl .media-frame .search, +.rtl .media-frame input[type="text"], +.rtl .media-frame input[type="password"], +.rtl .media-frame input[type="number"], +.rtl .media-frame input[type="search"], +.rtl .media-frame input[type="email"], +.rtl .media-frame input[type="url"], +.rtl .media-frame textarea, +.rtl .media-frame select { + font-family: Tahoma, sans-serif; +} + +:lang(he-il) .rtl .media-modal, +:lang(he-il) .rtl .media-frame, +:lang(he-il) .rtl .media-frame .search, +:lang(he-il) .rtl .media-frame input[type="text"], +:lang(he-il) .rtl .media-frame input[type="password"], +:lang(he-il) .rtl .media-frame input[type="number"], +:lang(he-il) .rtl .media-frame input[type="search"], +:lang(he-il) .rtl .media-frame input[type="email"], +:lang(he-il) .rtl .media-frame input[type="url"], +:lang(he-il) .rtl .media-frame textarea, +:lang(he-il) .rtl .media-frame select { + font-family: Arial, sans-serif; +} + + + + +@media only screen and (max-width: 960px) { + .media-frame-content .media-toolbar-primary .search, + .media-frame-content .media-toolbar-secondary .attachment-filters { + max-width: 120px; + } +} + +/** + * Responsive layout + */ +@media only screen and (max-width: 900px) { + .media-frame-menu { + width: 139px; + } + + .media-menu > a { + padding: 4px 5px; + } + + .media-frame-title, + .media-frame-router, + .media-frame-content, + .media-frame-toolbar { + right: 140px; + } + + .media-sidebar { + width: 159px; + padding: 0 10px 24px; + } + + .attachments-browser .attachments, + .attachments-browser .uploader-inline, + .attachments-browser .media-toolbar { + left: 180px; + } + + .media-sidebar .setting input, + .media-sidebar .setting textarea, + .media-sidebar .setting span, + .compat-item label span { + float: none; + } + + .media-sidebar .setting span, + .compat-item label span { + text-align: inherit; + display: block; + min-height: 16px; + margin: 0; + padding: 8px 2px 0; + } + + .media-sidebar .setting input, + .media-sidebar .setting textarea, + .media-sidebar .setting select { + width: 98%; + max-width: none; + } + + .media-sidebar .setting select.columns { + width: auto; + } + + .media-frame input, + .media-frame textarea, + .media-frame .search { + padding: 3px 6px; + } + + .media-frame-content .attachment .icon { + top: 40%; + } + + .image-details .media-modal { + right: 30px; + left: 30px; + } + + .image-details .embed-media-settings .setting { + margin: 20px; + } + + .image-details .embed-media-settings .setting span { + float: none; + text-align: right; + width: 100%; + margin-bottom: 4px; + } + + .image-details .embed-media-settings .setting input.link-to-custom, + .image-details .embed-media-settings .setting input[type="text"], + .image-details .embed-media-settings .setting textarea { + width: 100%; + margin-right: 0; + } + + .image-details .embed-media-settings .custom-size { + margin-right: 20px; + } + + .media-selection { + min-width: 120px; + } + + .media-selection:after { + background: none; + } + + .media-selection .attachments { + display: none; + } + + .media-menu .separator { + margin: 12px 10px; + } + + .media-modal-close { + left: 10px; + } + + /* Text inputs need to be 16px, or they force zooming on iOS */ + .media-frame input[type="text"], + .media-frame input[type="password"], + .media-frame input[type="number"], + .media-frame input[type="search"], + .media-frame input[type="email"], + .media-frame input[type="url"], + .media-frame textarea, + .media-frame select { + font-size: 16px; + } +} + +/* Responsive on portrait and landscape */ +@media only screen and (max-width: 640px), screen and (max-height: 400px) { + + /* Media tabs on the top */ + .media-frame-content .media-toolbar .instructions { + display: none; + } + + .media-frame-menu { + width: auto; + bottom: auto; + left: 0; + height: 60px; + } + + .media-menu { + border-left: none; + position: relative; + border-bottom: 1px solid #dddddd; + overflow: hidden; + padding: 10px 10px 10px 0; + } + + .media-menu a { + float: right; + width: 42%; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + } + + .media-frame-title { + display: none; + } + + .image-details .media-frame-title { + display: block; + top: 0; + font-size: 14px; + } + + .media-frame-toolbar { + position: absolute; + bottom: 0px; + right: 0; + left: 0; + background: #FFF; + border-top: 1px solid #DEDEDE; + } + + .media-toolbar { + position: relative; + } + + .media-frame { + overflow: hidden; + } + + .attachments-browser .attachments { + top: 42px; + } + + .attachment-details h3 { + margin-top: 45px; + } + + /* Shorten right-side links so they don't overlap the close button */ + .media-menu a:nth-child(2), + .media-menu a:last-child { + width: 40%; + } + + .media-menu .separator { + display: none; + } + + .media-frame-title { + top: 72px; + right: auto; + height: auto; + } + + .media-frame-title h1 { + line-height: 3; + font-size: 18px; + } + + .media-frame-router { + top: 84px; + right: 0; + } + + .media-frame-content { + right: 0; + top: 118px; + } + + .image-details .media-frame.hide-router .media-frame-content { + top: 40px; + } + + .media-frame .attachments-browser { + padding-bottom: 300px; + } + + .media-sidebar { + border-bottom: 1px solid #dddddd; + } + + .media-modal { + width: auto; + } + + .media-toolbar-primary, .media-toolbar-secondary { + height: auto; + } + + .uploader-inline h3 { + margin: 0 0 .8em 0; + } + + .uploader-inline-content { + top: auto; + } + + .uploader-inline-content .upload-ui { + margin: 0; + } + + .attachments-browser .attachments, .attachments-browser .uploader-inline { + position: relative; + margin-left: 180px; + } + + /* Full-bleed modal */ + .media-modal, + .image-details .media-modal { + position: fixed; + top: 0; + right: 0; + left: 0; + bottom: 0; + } + + .media-modal-backdrop { + position: fixed; + } + + .attachments-browser .attachment, + .attachments-browser .attachment-preview { + max-width: 100%; + } + + .attachments-browser .media-toolbar-primary input.search { + max-width: 150px; + } + + .uploader-inline-content { + position: relative; + } + + .media-sidebar .setting input[type="checkbox"], + .media-sidebar .field input[type="checkbox"] { + width: 25px; + } + + /* Image From Link */ + .embed-link-settings, + .embed-media-settings { + padding-bottom: 52px; + } + + .image-details .column-settings, + .image-details .column-image { + position: relative; + padding: 10px 0 20px 0; + right: 0; + width: 100%; + min-height: inherit; + } + + + /* Gallery */ + .media-frame.hide-router .media-frame-content { + top: 73px; + border-top: none; + } + + .collection-settings h3 { + margin-top: 45px; + } + +} + +/* Landscape specific header override */ +@media screen and (max-height: 400px) { + .media-menu { + padding: 0 10px 0 0; + } + + .media-menu a { + float: right; + width: 21%; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + padding: 10px inherit; + } + + .media-menu a:nth-child(2), + .media-menu a:last-child { + width: 21%; + } + + .media-modal-close { + top: 2px; + } + + .media-frame-router { + top: 44px; + } + + .media-frame-content { + top: 78px; + } + + .attachments-browser .attachments { + top: 2px; + } + + /* Prevent unnecessary scrolling on title input */ + .embed-link-settings { + overflow: visible; + } +} + +@media only screen and (max-width: 680px) { + .media-frame-content .media-toolbar .search, + .media-frame-content .media-toolbar .attachment-filters { + max-width: 85px; + } +} + +/** + * HiDPI Displays + */ +@media print, + (-o-min-device-pixel-ratio: 5/4), + (-webkit-min-device-pixel-ratio: 1.25), + (min-resolution: 120dpi) { + + .media-modal-icon { + background-image: url(../images/uploader-icons-2x.png); + -webkit-background-size: 134px 15px; + background-size: 134px 15px; + } + + .media-frame .spinner { + background-image: url(../images/spinner-2x.gif); + } +} diff --git a/wp-includes/css/media-views-rtl.min.css b/wp-includes/css/media-views-rtl.min.css new file mode 100644 index 0000000..57fe78d --- /dev/null +++ b/wp-includes/css/media-views-rtl.min.css @@ -0,0 +1 @@ +.media-modal *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.media-frame,.media-modal{font-family:"Open Sans",sans-serif;font-size:12px}.media-frame input,.media-frame textarea{padding:6px 8px;line-height:16px}.media-frame select,.wp-admin .media-frame select{line-height:28px;margin-top:3px}.media-frame a{border-bottom:0;color:#21759b}.media-frame a:hover{color:#d54e21}.media-frame a.button{color:#333}.media-frame a.button:hover{color:#222}.media-frame a.button-primary,.media-frame a.button-primary:hover{color:#fff}.media-frame input[type=email],.media-frame input[type=number],.media-frame input[type=password],.media-frame input[type=search],.media-frame input[type=text],.media-frame input[type=url],.media-frame select,.media-frame textarea{font-family:"Open Sans",sans-serif;font-size:12px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border-width:1px;border-style:solid;border-color:#dfdfdf}.media-frame select{height:24px;padding:2px}.media-frame input:disabled,.media-frame input[readonly],.media-frame textarea:disabled,.media-frame textarea[readonly]{background-color:#eee}.media-frame input[type=search]{-webkit-appearance:textfield}.media-frame :-moz-placeholder{color:#a9a9a9}.media-frame .hidden{display:none}.ui-draggable,.ui-sortable{-ms-touch-action:none;touch-action:none}.meta-box-sortables.ui-sortable{-ms-touch-action:auto;touch-action:auto}.meta-box-sortables.ui-sortable .hndle{-ms-touch-action:none;touch-action:none}.media-modal{position:fixed;top:30px;right:30px;left:30px;bottom:30px;z-index:160000}.wp-customizer .media-modal{z-index:560000}.media-modal-backdrop{position:fixed;top:0;right:0;left:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:159900}.wp-customizer .media-modal-backdrop{z-index:559900}.media-modal-close{position:absolute;text-decoration:none;top:5px;left:10px;width:30px;height:30px;z-index:1000}.media-modal-close span.media-modal-icon{display:block;margin:8px auto 0;width:15px;height:15px;background-image:none}.media-modal-close .media-modal-icon:before{content:'\f158';font:400 20px/1 dashicons;speak:none;vertical-align:middle;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#666}.media-modal-close:hover .media-modal-icon:before{color:#2ea2cc}.media-modal-close:active{outline:0}.media-modal-content{position:absolute;top:0;right:0;left:0;bottom:0;overflow:auto;min-height:300px;-webkit-box-shadow:0 5px 15px rgba(0,0,0,.7);box-shadow:0 5px 15px rgba(0,0,0,.7);background:#fcfcfc;-webkit-font-smoothing:subpixel-antialiased}.media-modal-icon{background-image:url(../images/uploader-icons.png);background-repeat:no-repeat}.media-toolbar{position:absolute;top:0;right:0;left:0;z-index:100;height:60px;padding:0 16px;border:0 solid #dfdfdf;overflow:hidden}.media-toolbar-primary{float:left;height:100%}.media-toolbar-secondary{float:right;height:100%}.media-toolbar-primary>.media-button,.media-toolbar-primary>.media-button-group{margin-right:10px;float:right;margin-top:15px}.media-toolbar-secondary>.media-button,.media-toolbar-secondary>.media-button-group{margin-left:10px;float:right;margin-top:15px}.media-sidebar{position:absolute;top:0;left:0;bottom:0;width:267px;padding:0 16px 24px;z-index:75;background:#f3f3f3;border-right:1px solid #ddd;overflow:auto;-webkit-overflow-scrolling:touch}.hide-toolbar .media-sidebar{bottom:0}.media-sidebar .sidebar-title{font-size:20px;margin:0;padding:12px 10px 10px;line-height:28px}.media-sidebar .sidebar-content{padding:0 10px;margin-bottom:130px}.media-sidebar .search{display:block;width:100%}.image-details h3,.media-sidebar h3{position:relative;font-weight:700;text-transform:uppercase;font-size:12px;color:#666;margin:24px 0 8px}.media-sidebar .setting{display:block;float:right;width:100%;margin:1px 0}.media-sidebar .setting label{display:block}.media-sidebar .setting .link-to-custom{margin:3px 0}.media-sidebar .setting span{min-width:30%;margin-left:4%;font-size:12px}.media-sidebar .setting select{max-width:65%}.media-sidebar .field input[type=checkbox],.media-sidebar .setting input[type=checkbox]{width:16px;float:none;margin:8px 3px 0;padding:0}.compat-item label span,.media-sidebar .setting span{float:right;min-height:22px;padding-top:8px;line-height:16px;text-align:left;font-weight:400;color:#666}.media-sidebar .setting input,.media-sidebar .setting textarea{margin:1px;width:65%;float:left}.compat-item .field textarea,.media-sidebar .setting textarea{height:62px;resize:vertical}.media-sidebar select{margin-top:3px}.compat-item{float:right;width:100%;overflow:hidden}.compat-item table{width:100%;table-layout:fixed;border-spacing:0;border:0}.compat-item tr{padding:2px 0;display:block;overflow:hidden}.compat-item .field,.compat-item .label{display:block;margin:0;padding:0}.compat-item .label{min-width:30%;margin-left:4%;float:right;text-align:left}.compat-item .label span{display:block;width:100%}.compat-item .field{float:left;width:66%}.compat-item .field input{width:100%;margin:0}.media-menu{position:absolute;top:0;right:0;left:0;bottom:0;margin:0;padding:16px 0;background:#f3f3f3;border-left-width:1px;border-left-style:solid;border-left-color:#ccc;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.media-menu>a{display:block;position:relative;padding:8px 20px;margin:0;line-height:18px;font-size:14px;color:#0074a2;text-decoration:none}.media-menu>a:hover{color:#21759B;background:rgba(0,0,0,.04)}.media-menu>a:active{outline:0}.media-menu .active,.media-menu .active:hover{color:#222;font-weight:700}.media-menu .separator{height:0;margin:12px 20px;padding:0;border-top:1px solid #ddd}.media-router{position:relative;padding:0 6px;margin:0;clear:both;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.media-router a{-webkit-transition:none;transition:none}.media-router>a{position:relative;float:right;padding:8px 10px 9px;margin:0;height:18px;line-height:18px;font-size:14px;text-decoration:none}.media-router>a:last-child{border-left:0}.media-router>a:active,.media-router>a:focus{outline:0}.media-router .active,.media-router .active:hover{color:#333}.media-router .active,.media-router>a.active:last-child{margin:-1px -1px 0;background:#fff;border:1px solid #ddd;border-bottom:0}.media-router .active:after{display:none}.media-frame{overflow:hidden;position:absolute;top:0;right:0;left:0;bottom:0}.media-frame-menu{position:absolute;top:0;right:0;bottom:0;width:200px;z-index:150}.media-frame-title{position:absolute;top:0;right:200px;left:0;height:56px;z-index:200}.media-frame-router{position:absolute;top:56px;right:200px;left:0;height:36px;z-index:200}.media-frame-content{position:absolute;top:90px;right:200px;left:0;bottom:61px;height:auto;width:auto;margin:0;overflow:auto;background:#fff;border-top:1px solid #ddd;border-bottom:1px solid #ddd}.media-frame-toolbar{position:absolute;right:200px;left:0;bottom:0;height:60px;z-index:100}.media-frame.hide-menu .media-frame-content,.media-frame.hide-menu .media-frame-router,.media-frame.hide-menu .media-frame-title,.media-frame.hide-menu .media-frame-toolbar{right:0}.media-frame.hide-menu .media-frame-menu{right:-200px}.media-frame.hide-toolbar .media-frame-content{bottom:0}.media-frame.hide-toolbar .media-frame-toolbar{bottom:-61px}.media-frame.hide-router .media-frame-content{top:56px}.media-frame.hide-router .media-frame-router{display:none}.media-frame.hide-router .media-frame-title{border-bottom:1px solid #dfdfdf;-webkit-box-shadow:0 4px 4px -4px rgba(0,0,0,.1);box-shadow:0 4px 4px -4px rgba(0,0,0,.1)}.media-frame-title h1{padding:0 16px;font-size:22px;line-height:60px;margin:0}.media-frame-title .suggested-dimensions{font-size:14px;float:left;margin-left:20px}.media-frame-content .crop-content{height:100%}.media-frame-content .crop-content .crop-image{display:block;margin:auto;max-width:100%;max-height:100%}.media-frame-content .crop-content .upload-errors{position:absolute;width:300px;top:50%;right:50%;margin-right:-150px;margin-left:-150px;z-index:600000}.media-frame .media-iframe{overflow:hidden}.media-frame .media-iframe,.media-frame .media-iframe iframe{height:100%;width:100%;border:0}.media-frame select.attachment-filters{margin-top:11px;margin-left:10px}.media-frame .search{margin-top:11px;padding:4px;line-height:18px;font-size:13px;color:#464646;font-family:"Open Sans",sans-serif;-webkit-appearance:none}.media-toolbar-secondary .search{margin-left:16px}.attachments{margin:0;padding-left:16px;-webkit-overflow-scrolling:touch}.attachment{position:relative;float:right;padding:0;margin:0 10px 20px;color:#464646;list-style:none;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.selected.attachment{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #ccc;box-shadow:0 0 0 1px #fff,0 0 0 3px #ccc}.attachment-preview{position:relative;width:199px;height:199px;-webkit-box-shadow:inset 0 0 15px rgba(0,0,0,.1),inset 0 0 0 1px rgba(0,0,0,.05);box-shadow:inset 0 0 15px rgba(0,0,0,.1),inset 0 0 0 1px rgba(0,0,0,.05);background:#eee;cursor:pointer}.attachment .icon{margin:0 auto;overflow:hidden;padding-top:20%}.attachment .thumbnail{display:block;position:absolute;top:0;right:0;margin:0 auto;overflow:hidden;max-width:100%;max-height:100%}.attachment-preview .thumbnail:after{content:'';display:block;position:absolute;top:0;right:0;left:0;bottom:0;-webkit-box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);overflow:hidden}.attachment .thumbnail img{top:0;left:0}.attachment .thumbnail .centered{position:absolute;top:0;left:0;width:100%;height:100%;-webkit-transform:translate(50%,50%);-ms-transform:translate(50%,50%);transform:translate(50%,50%)}.attachment .thumbnail .centered img{-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.attachment .filename{position:absolute;right:0;left:0;bottom:0;overflow:hidden;max-height:100%;word-wrap:break-word;text-align:center;font-weight:700;background:rgba(255,255,255,.8);-webkit-box-shadow:inset 0 0 0 1px rgba(0,0,0,.15);box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}.attachment .filename div{padding:5px 10px}.attachment-preview .thumbnail{width:199px;height:199px}.attachment .thumbnail img{position:absolute}.attachment .close{display:none;position:absolute;top:5px;left:5px;height:22px;width:22px;padding:0;font-size:20px;line-height:20px;text-align:center;text-decoration:none;color:#464646;background-color:#fff;background-position:-96px 4px;border-width:0;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.3);box-shadow:0 0 0 1px rgba(0,0,0,.3)}.attachment .close:hover{-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.6);box-shadow:0 0 0 1px rgba(0,0,0,.6)}.attachment:hover .close{display:block}.attachment .check{display:none;height:24px;width:24px;position:absolute;top:-6px;left:-6px;outline:0;background:#eee;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px rgba(0,0,0,.4);box-shadow:0 0 0 1px #fff,0 0 0 2px rgba(0,0,0,.4)}.attachment .check div{background-position:-1px 0;height:15px;width:15px;margin:5px}.attachment .check:hover div{background-position:-40px 0}.attachment.selected .check{display:block}.attachment.details{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 5px #1e8cbe;box-shadow:0 0 0 1px #fff,0 0 0 5px #1e8cbe}.attachment.details .check{background-color:#1e8cbe;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #1e8cbe;box-shadow:0 0 0 1px #fff,0 0 0 2px #1e8cbe}.attachment.details .check div{background-position:-21px 0}.attachment.details .check:hover div{background-position:-60px 0}.media-frame .attachment .describe{position:relative;display:block;width:100%;margin:-1px 0 0;padding:8px;font-size:12px;-webkit-border-radius:0;border-radius:0}.media-frame .attachments-browser{position:relative;width:100%;height:100%;overflow:hidden}.attachments-browser .media-toolbar{left:300px;height:50px}.attachments-browser .media-toolbar-primary>.media-button,.attachments-browser .media-toolbar-primary>.media-button-group,.attachments-browser .media-toolbar-secondary>.media-button,.attachments-browser .media-toolbar-secondary>.media-button-group{margin-top:10px}.attachments-browser .attachments,.attachments-browser .uploader-inline{position:absolute;top:50px;right:0;left:300px;bottom:0;overflow:auto}.attachments-browser .instructions{display:inline-block;margin-top:16px;line-height:18px;font-size:13px;color:#666;margin-left:.5em}.media-progress-bar{position:relative;height:10px;width:70%;margin:10px auto;-webkit-border-radius:10px;border-radius:10px;background:#dfdfdf;background:rgba(0,0,0,.1)}.media-progress-bar div{height:10px;min-width:20px;width:0;background:#1e8cbe;-webkit-border-radius:10px;border-radius:10px;-webkit-transition:width 300ms;transition:width 300ms}.media-uploader-status .media-progress-bar{display:none;width:100%}.uploading.media-uploader-status .media-progress-bar{display:block}.attachment-preview .media-progress-bar{position:absolute;top:50%;right:15%;width:70%;margin:-5px 0 0 0}.media-uploader-status{position:relative;margin:0 auto;padding-bottom:10px;max-width:400px}.media-sidebar .media-uploader-status{border-bottom:1px solid #dfdfdf;-webkit-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff}.uploader-inline .media-uploader-status h3{display:none}.media-uploader-status .upload-details{display:none;font-size:12px;color:#666}.uploading.media-uploader-status .upload-details{display:block}.media-uploader-status .upload-detail-separator{padding:0 4px}.media-uploader-status .upload-count{color:#464646}.media-uploader-status .upload-dismiss-errors,.media-uploader-status .upload-errors{display:none}.errors.media-uploader-status .upload-dismiss-errors,.errors.media-uploader-status .upload-errors{display:block}.media-uploader-status .upload-dismiss-errors{text-decoration:none}.media-sidebar .media-uploader-status .upload-dismiss-errors{position:absolute;top:0;left:0}.upload-errors .upload-error{margin:8px auto 0;padding:8px;border:1px #c00 solid;background:#ffebe8;-webkit-border-radius:3px;border-radius:3px}.upload-errors .upload-error-label{padding:2px 4px;margin-left:8px;font-weight:700;color:#fff;background:#e00;background-image:-webkit-gradient(linear,right top,right bottom,from(#e00),to(#a00));background-image:-webkit-linear-gradient(top,#e00,#a00);background-image:linear-gradient(to bottom,#e00,#a00);-webkit-border-radius:3px;border-radius:3px}.upload-errors .upload-error-message{display:block;padding-top:8px;color:#b44;word-wrap:break-word}.uploader-window{position:fixed;top:0;right:0;left:0;bottom:0;background:rgba(0,86,132,.9);z-index:250000;display:none;text-align:center;opacity:0;-webkit-transition:opacity 250ms;transition:opacity 250ms}.uploader-window-content{position:absolute;top:10px;right:10px;left:10px;bottom:10px;border:1px dashed #fff}.uploader-window h3{margin:-.5em 0 0;position:absolute;top:50%;right:0;left:0;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);font-size:40px;color:#fff;padding:0}.uploader-window .media-progress-bar{margin-top:20px;max-width:300px;background:0 0;border-color:#fff;display:none}.uploader-window .media-progress-bar div{background:#fff}.uploading .uploader-window .media-progress-bar{display:block}.media-frame .uploader-inline{margin:20px;padding:20px;text-align:center}.uploader-inline-content{position:absolute;top:30%;right:0;left:0}.uploader-inline-content .upload-ui{margin:4em 0}.uploader-inline-content .post-upload-ui{margin-bottom:2em}.uploader-inline .has-upload-message .upload-ui{margin:0 0 4em}.uploader-inline h3{font-size:20px;line-height:28px;font-weight:400;margin-bottom:1.6em}.uploader-inline .has-upload-message .upload-instructions{font-size:14px;color:#464646;font-weight:400}.uploader-inline .drop-instructions{display:none}.supports-drag-drop .uploader-inline .drop-instructions{display:block}.uploader-inline p{font-size:12px}.uploader-inline .media-progress-bar{display:none}.uploading.uploader-inline .media-progress-bar{display:block}.uploader-inline .browser{display:inline-block!important}.media-selection{position:absolute;top:0;right:0;left:350px;height:60px;padding:0 16px 0 0;overflow:hidden;white-space:nowrap}.media-selection .selection-info{display:inline-block;font-size:12px;height:60px;margin-left:10px;vertical-align:top}.media-selection.editing,.media-selection.empty,.media-selection.one .edit-selection{display:none}.media-selection .count{display:block;padding-top:12px;font-size:14px;line-height:20px;font-weight:700}.media-selection .selection-info a{display:block;float:right;padding:1px 8px;margin:1px -8px 1px 8px;line-height:16px;text-decoration:none;border-left:1px solid #dfdfdf;color:#21759B}.media-selection .selection-info a:hover{background:#21759B;color:#fff;border-color:transparent}.media-selection .selection-info a:last-child{border-left:0;margin-left:0}.media-selection .selection-info .clear-selection{color:red}.media-selection .selection-info .clear-selection:hover{background:red}.media-selection .selection-view{display:inline-block;vertical-align:top}.media-selection .attachments{display:inline-block;height:48px;margin-top:5px;overflow:hidden;vertical-align:top}.media-selection .attachment .icon{width:50%}.attachment.selection.selected{-webkit-box-shadow:none;box-shadow:none}.attachment.selection.details{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 4px #1e8cbe;box-shadow:0 0 0 1px #fff,0 0 0 4px #1e8cbe}.media-selection .attachment.selection.details{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #1e8cbe;box-shadow:0 0 0 1px #fff,0 0 0 3px #1e8cbe}.media-selection:after{content:'';display:block;position:absolute;top:0;left:0;bottom:0;width:25px;background-image:-webkit-gradient(linear,left top,right top,from(rgba(255,255,255,1)),to(rgba(255,255,255,0)));background-image:-webkit-linear-gradient(left,rgba(255,255,255,1),rgba(255,255,255,0));background-image:linear-gradient(to right,rgba(255,255,255,1),rgba(255,255,255,0))}.media-selection .attachment .filename{display:none}.media-frame .spinner{background:url(../images/spinner.gif) no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px;display:none;opacity:.7;filter:alpha(opacity=70);width:20px;height:20px;margin:0}.media-toolbar .spinner{margin-top:14px}.media-sidebar .settings-save-status{background:#f5f5f5;float:left;text-transform:none;z-index:10}.media-sidebar .settings-save-status .spinner{margin:0 5px}.media-sidebar .settings-save-status .saved{float:left;display:none}.media-sidebar .save-complete .settings-save-status .saved,.media-sidebar .save-waiting .settings-save-status .spinner{display:block}.attachment-details{position:relative;overflow:auto}.attachment-info{overflow:hidden;min-height:60px;margin-bottom:16px;line-height:18px;color:#666;border-bottom:1px solid #ddd;padding-bottom:11px}.attachment-info .filename{font-weight:700;color:#464646;word-wrap:break-word}.attachment-info .thumbnail{position:relative;float:right;max-width:120px;max-height:120px;margin-top:5px;margin-left:10px;margin-bottom:5px}.uploading .attachment-info .thumbnail{width:120px;height:80px;-webkit-box-shadow:inset 0 0 15px rgba(0,0,0,.1);box-shadow:inset 0 0 15px rgba(0,0,0,.1)}.uploading .attachment-info .media-progress-bar{margin-top:35px}.attachment-info .thumbnail:after{content:'';display:block;position:absolute;top:0;right:0;left:0;bottom:0;-webkit-box-shadow:inset 0 0 0 1px rgba(0,0,0,.15);box-shadow:inset 0 0 0 1px rgba(0,0,0,.15);overflow:hidden}.attachment-info .thumbnail img{display:block;max-width:120px;max-height:120px;margin:0 auto}.attachment-info .details{float:right;font-size:12px;max-width:100%}.attachment-info .delete-attachment,.attachment-info .edit-attachment,.attachment-info .refresh-attachment,.attachment-info .trash-attachment{display:block;text-decoration:none;white-space:nowrap}.attachment-details.needs-refresh .attachment-info .edit-attachment,.attachment-info .refresh-attachment{display:none}.attachment-details.needs-refresh .attachment-info .refresh-attachment,.attachment-info .edit-attachment{display:block}.attachment-info .delete-attachment,.attachment-info .trash-attachment{color:#bc0b0b}.attachment-info .delete-attachment:hover,.attachment-info .trash-attachment:hover{color:red}.attachment-display-settings{width:100%;float:right;overflow:hidden}.attachment-display-settings h4{margin:1.4em 0 .4em}.collection-settings{overflow:hidden}.collection-settings .setting input[type=checkbox]{float:right;margin-left:8px}.collection-settings .setting span{min-width:inherit}.media-frame .imgedit-wrap{position:static}.media-frame .imgedit-wait{height:auto!important;left:0;bottom:0;right:0}.media-frame .imgedit-wrap .imgedit-panel-content{padding:16px;position:absolute;top:0;left:282px;bottom:0;right:0;overflow:auto}.media-frame .imgedit-wrap .imgedit-settings{background:#f3f3f3;border-right:1px solid #ddd;padding:0 16px 16px;position:absolute;top:0;left:0;bottom:0;width:250px;overflow:auto}.media-frame .imgedit-group{background:0 0;border:0;border-bottom:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none;margin:0;margin-bottom:16px;padding:0;padding-bottom:16px}.media-frame .imgedit-group:last-of-type{border:0;margin:0;padding:0}.media-frame .imgedit-group-top h3{text-transform:uppercase;font-size:12px;color:#666;margin:0;margin-top:24px}.media-frame .imgedit-group-top h3 a{text-decoration:none;color:#666}.media-frame .imgedit-help-toggle{margin-top:-2px;cursor:pointer;color:#666}.media-frame .imgedit-help-toggled span.dashicons:before{content:'\f142'}.media-frame .imgedit-group img{margin-top:5px}.media-frame .imgedit-wrap div.updated{margin:0;margin-bottom:16px}.embed-url{display:block;position:relative;padding:16px;margin:0;z-index:250;background:#fff;font-size:18px}.media-frame .embed-url input{font-size:18px;padding:12px 14px;width:100%;min-width:200px;-webkit-box-shadow:inset 2px 2px 4px -2px rgba(0,0,0,.1);box-shadow:inset 2px 2px 4px -2px rgba(0,0,0,.1)}.media-frame .embed-url .spinner{position:absolute;top:16px;left:26px}.media-frame .embed-loading .embed-url .spinner{display:block}.embed-link-settings,.embed-media-settings{position:absolute;top:60px;right:0;left:0;bottom:0;padding:16px 16px 32px;overflow:auto}.image-details .media-modal{right:140px;left:140px}.image-details .media-frame-menu{display:none}.image-details .media-frame-content,.image-details .media-frame-router,.image-details .media-frame-title{right:0}.image-details .embed-media-settings{top:0;overflow:visible;padding:0}.image-details .column-settings{background:#f3f3f3;border-left:1px solid #ddd;min-height:100%;width:52%;position:absolute;top:0;right:0}.image-details .column-settings h3{margin:20px;padding-top:20px;border-top:1px solid #ddd}.image-details .column-image{width:48%;position:absolute;right:52%;top:0}.image-details .image{margin:20px}.image-details .image img{max-width:100%;max-height:500px}.image-details .advanced-toggle{color:#666;text-decoration:none;display:block}.image-details .advanced-toggle::after{font:400 20px/1 dashicons;speak:none;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:'\f140';display:inline-block;margin-top:-2px}.image-details .advanced-visible .advanced-toggle::after{content:'\f142';margin-top:0}.image-details .embed-media-settings .size{margin-bottom:4px}.image-details .custom-size span{display:block}.image-details .custom-size label{display:block;float:right}.image-details .custom-size span small{color:#999;font-size:inherit}.image-details .custom-size input{width:5em}.image-details .custom-size .sep{float:right;margin:26px 6px 0}.image-details .custom-size::after{content:'';display:table;clear:both}.media-embed .thumbnail{max-width:100%;max-height:200px;position:relative;float:right}.media-embed .thumbnail img{max-height:200px;display:block}.media-embed .thumbnail:after{content:'';display:block;position:absolute;top:0;right:0;left:0;bottom:0;-webkit-box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);overflow:hidden}.media-embed .setting{width:100%;margin:10px 0;float:right;display:block;clear:both}.image-details .embed-media-settings .setting{float:none;width:auto}.image-details .actions{margin:10px 0}.image-details .hidden{display:none}.media-embed .setting input[type=text],.media-embed .setting textarea{display:block;width:100%;max-width:400px;margin:1px 0}.image-details .embed-media-settings .setting input[type=text],.image-details .embed-media-settings .setting textarea{max-width:inherit;width:70%}.image-details .embed-media-settings .custom-size,.image-details .embed-media-settings .link-target,.image-details .embed-media-settings .setting input.link-to-custom{margin-right:27%;width:70%}.image-details .embed-media-settings .link-target{margin-top:24px}.media-embed .setting input.hidden,.media-embed .setting textarea.hidden{display:none}.media-embed .setting span{display:block;width:200px;font-size:13px;line-height:24px;color:#666}.image-details .embed-media-settings .setting span{float:right;width:25%;text-align:left;margin:8px 1% 0;line-height:1.1}.media-embed .setting .button-group{margin:2px 0}.media-embed-sidebar{position:absolute;top:0;right:440px}.advanced-section,.link-settings{margin-top:10px}#wp-fullscreen-body .uploader-editor,.wp-editor-wrap .uploader-editor{background:rgba(150,150,150,.9);position:absolute;top:0;right:0;width:100%;height:100%;z-index:99998;display:none;text-align:center}#wp-fullscreen-body .uploader-editor{background:rgba(0,86,132,.9);position:fixed;z-index:100050}.wp-editor-wrap.wp-fullscreen-wrap .uploader-editor{opacity:0}#wp-fullscreen-body .uploader-editor-content,.wp-editor-wrap .uploader-editor-content{border:1px dashed #fff;position:absolute;top:10px;right:10px;left:10px;bottom:10px}#wp-fullscreen-body .uploader-editor .uploader-editor-title,.wp-editor-wrap .uploader-editor .uploader-editor-title{position:absolute;top:50%;right:0;left:0;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);font-size:3em;line-height:1.3;font-weight:700;color:#fff;padding:0;margin:0;display:none}.wp-editor-wrap .uploader-editor.droppable{background:rgba(0,86,132,.9)}#wp-fullscreen-body .uploader-editor .uploader-editor-title,.wp-editor-wrap .uploader-editor.droppable .uploader-editor-title{display:block}.ie7 .media-frame .attachments-browser{position:static}.ie7 .media-frame .embed-url input{margin-top:4px;width:90%}.ie7 .compat-item{width:99%}.ie7 .attachment-display-settings{width:auto}.ie7 .attachment-preview,.ie7 .attachment-preview .thumbnail{width:120px;height:120px}.ie7 .media-frame .attachment .describe{width:102px}.ie7 .media-sidebar .setting select{max-width:55%}.ie7 .media-sidebar .setting input,.ie7 .media-sidebar .setting textarea{width:55%}.ie7 .media-sidebar .setting .link-to-custom{float:right}.rtl .media-frame,.rtl .media-frame .search,.rtl .media-frame input[type=email],.rtl .media-frame input[type=number],.rtl .media-frame input[type=password],.rtl .media-frame input[type=search],.rtl .media-frame input[type=text],.rtl .media-frame input[type=url],.rtl .media-frame select,.rtl .media-frame textarea,.rtl .media-modal{font-family:Tahoma,sans-serif}:lang(he-il) .rtl .media-frame,:lang(he-il) .rtl .media-frame .search,:lang(he-il) .rtl .media-frame input[type=email],:lang(he-il) .rtl .media-frame input[type=number],:lang(he-il) .rtl .media-frame input[type=password],:lang(he-il) .rtl .media-frame input[type=search],:lang(he-il) .rtl .media-frame input[type=text],:lang(he-il) .rtl .media-frame input[type=url],:lang(he-il) .rtl .media-frame select,:lang(he-il) .rtl .media-frame textarea,:lang(he-il) .rtl .media-modal{font-family:Arial,sans-serif}@media only screen and (max-width:960px){.media-frame-content .media-toolbar-primary .search,.media-frame-content .media-toolbar-secondary .attachment-filters{max-width:120px}}@media only screen and (max-width:900px){.media-frame-menu{width:139px}.media-menu>a{padding:4px 5px}.media-frame-content,.media-frame-router,.media-frame-title,.media-frame-toolbar{right:140px}.media-sidebar{width:159px;padding:0 10px 24px}.attachments-browser .attachments,.attachments-browser .media-toolbar,.attachments-browser .uploader-inline{left:180px}.compat-item label span,.media-sidebar .setting input,.media-sidebar .setting span,.media-sidebar .setting textarea{float:none}.compat-item label span,.media-sidebar .setting span{text-align:inherit;display:block;min-height:16px;margin:0;padding:8px 2px 0}.media-sidebar .setting input,.media-sidebar .setting select,.media-sidebar .setting textarea{width:98%;max-width:none}.media-sidebar .setting select.columns{width:auto}.media-frame .search,.media-frame input,.media-frame textarea{padding:3px 6px}.media-frame-content .attachment .icon{top:40%}.image-details .media-modal{right:30px;left:30px}.image-details .embed-media-settings .setting{margin:20px}.image-details .embed-media-settings .setting span{float:none;text-align:right;width:100%;margin-bottom:4px}.image-details .embed-media-settings .setting input.link-to-custom,.image-details .embed-media-settings .setting input[type=text],.image-details .embed-media-settings .setting textarea{width:100%;margin-right:0}.image-details .embed-media-settings .custom-size{margin-right:20px}.media-selection{min-width:120px}.media-selection:after{background:0 0}.media-selection .attachments{display:none}.media-menu .separator{margin:12px 10px}.media-modal-close{left:10px}.media-frame input[type=email],.media-frame input[type=number],.media-frame input[type=password],.media-frame input[type=search],.media-frame input[type=text],.media-frame input[type=url],.media-frame select,.media-frame textarea{font-size:16px}}@media only screen and (max-width:640px),screen and (max-height:400px){.media-frame-content .media-toolbar .instructions{display:none}.media-frame-menu{width:auto;bottom:auto;left:0;height:60px}.media-menu{border-left:0;position:relative;border-bottom:1px solid #ddd;overflow:hidden;padding:10px 10px 10px 0}.media-menu a{float:right;width:42%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.media-frame-title{display:none}.image-details .media-frame-title{display:block;top:0;font-size:14px}.media-frame-toolbar{position:absolute;bottom:0;right:0;left:0;background:#FFF;border-top:1px solid #DEDEDE}.media-toolbar{position:relative}.media-frame{overflow:hidden}.attachments-browser .attachments{top:42px}.attachment-details h3{margin-top:45px}.media-menu a:last-child,.media-menu a:nth-child(2){width:40%}.media-menu .separator{display:none}.media-frame-title{top:72px;right:auto;height:auto}.media-frame-title h1{line-height:3;font-size:18px}.media-frame-router{top:84px;right:0}.media-frame-content{right:0;top:118px}.image-details .media-frame.hide-router .media-frame-content{top:40px}.media-frame .attachments-browser{padding-bottom:300px}.media-sidebar{border-bottom:1px solid #ddd}.media-modal{width:auto}.media-toolbar-primary,.media-toolbar-secondary{height:auto}.uploader-inline h3{margin:0 0 .8em}.uploader-inline-content{top:auto}.uploader-inline-content .upload-ui{margin:0}.attachments-browser .attachments,.attachments-browser .uploader-inline{position:relative;margin-left:180px}.image-details .media-modal,.media-modal{position:fixed;top:0;right:0;left:0;bottom:0}.media-modal-backdrop{position:fixed}.attachments-browser .attachment,.attachments-browser .attachment-preview{max-width:100%}.attachments-browser .media-toolbar-primary input.search{max-width:150px}.uploader-inline-content{position:relative}.media-sidebar .field input[type=checkbox],.media-sidebar .setting input[type=checkbox]{width:25px}.embed-link-settings,.embed-media-settings{padding-bottom:52px}.image-details .column-image,.image-details .column-settings{position:relative;padding:10px 0 20px;right:0;width:100%;min-height:inherit}.media-frame.hide-router .media-frame-content{top:73px;border-top:0}.collection-settings h3{margin-top:45px}}@media screen and (max-height:400px){.media-menu{padding:0 10px 0 0}.media-menu a{float:right;width:21%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;padding:10px inherit}.media-menu a:last-child,.media-menu a:nth-child(2){width:21%}.media-modal-close{top:2px}.media-frame-router{top:44px}.media-frame-content{top:78px}.attachments-browser .attachments{top:2px}.embed-link-settings{overflow:visible}}@media only screen and (max-width:680px){.media-frame-content .media-toolbar .attachment-filters,.media-frame-content .media-toolbar .search{max-width:85px}}@media print,(-o-min-device-pixel-ratio:5/4),(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.media-modal-icon{background-image:url(../images/uploader-icons-2x.png);-webkit-background-size:134px 15px;background-size:134px 15px}.media-frame .spinner{background-image:url(../images/spinner-2x.gif)}} \ No newline at end of file diff --git a/wp-includes/css/media-views.css b/wp-includes/css/media-views.css new file mode 100644 index 0000000..64893d2 --- /dev/null +++ b/wp-includes/css/media-views.css @@ -0,0 +1,2352 @@ +/** + * Base Styles + */ +.media-modal * { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} + +.media-modal, +.media-frame { + font-family: "Open Sans", sans-serif; + font-size: 12px; +} + +.media-frame input, +.media-frame textarea { + padding: 6px 8px; + line-height: 16px; +} + +.media-frame select, +.wp-admin .media-frame select { + line-height: 28px; + margin-top: 3px; +} + +.media-frame a { + border-bottom: none; + color: #21759b; +} + +.media-frame a:hover { + color: #d54e21; +} + +.media-frame a.button { + color: #333; +} + +.media-frame a.button:hover { + color: #222; +} + +.media-frame a.button-primary, +.media-frame a.button-primary:hover { + color: #fff; +} + +.media-frame input[type="text"], +.media-frame input[type="password"], +.media-frame input[type="number"], +.media-frame input[type="search"], +.media-frame input[type="email"], +.media-frame input[type="url"], +.media-frame textarea, +.media-frame select { + font-family: "Open Sans", sans-serif; + font-size: 12px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + border-width: 1px; + border-style: solid; + border-color: #dfdfdf; +} + +.media-frame select { + height: 24px; + padding: 2px; +} + +.media-frame input:disabled, +.media-frame textarea:disabled, +.media-frame input[readonly], +.media-frame textarea[readonly] { + background-color: #eee; +} + +.media-frame input[type="search"] { + -webkit-appearance: textfield; +} + +.media-frame :-moz-placeholder { + color: #a9a9a9; +} + +.media-frame .hidden { + display: none; +} + +/* Enable draggable on IE10 touch events until it's rolled into jQuery UI core */ +.ui-sortable, +.ui-draggable { + -ms-touch-action: none; + touch-action: none; +} + +.meta-box-sortables.ui-sortable { + -ms-touch-action: auto; + touch-action: auto; +} + +.meta-box-sortables.ui-sortable .hndle { + -ms-touch-action: none; + touch-action: none; +} + +/** + * Modal + */ +.media-modal { + position: fixed; + top: 30px; + left: 30px; + right: 30px; + bottom: 30px; + z-index: 160000; +} + +.wp-customizer .media-modal { + z-index: 560000; +} + +.media-modal-backdrop { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + min-height: 360px; + background: #000; + opacity: 0.7; + z-index: 159900; +} + +.wp-customizer .media-modal-backdrop { + z-index: 559900; +} + +.media-modal-close { + position: absolute; + text-decoration: none; + top: 5px; + right: 10px; + width: 30px; + height: 30px; + z-index: 1000; +} + +.media-modal-close span.media-modal-icon { + display: block; + margin: 8px auto 0; + width: 15px; + height: 15px; + background-image: none; +} + +.media-modal-close .media-modal-icon:before { + content: '\f158'; + font: normal 20px/1 'dashicons'; + speak: none; + vertical-align: middle; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + color: #666; +} + +.media-modal-close:hover .media-modal-icon:before { + color: #2ea2cc; +} + +.media-modal-close:active { + outline: 0; +} + +.media-modal-content { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + overflow: auto; + min-height: 300px; + -webkit-box-shadow: 0 5px 15px rgba(0,0,0,0.7); + box-shadow: 0 5px 15px rgba(0,0,0,0.7); + background: #fcfcfc; + -webkit-font-smoothing: subpixel-antialiased; +} + +.media-modal-icon { + background-image: url(../images/uploader-icons.png); + background-repeat: no-repeat; +} + +/** + * Toolbar + */ +.media-toolbar { + position: absolute; + top: 0; + left: 0; + right: 0; + z-index: 100; + height: 60px; + padding: 0 16px; + border: 0 solid #dfdfdf; + overflow: hidden; +} + +.media-toolbar-primary { + float: right; + height: 100%; +} + +.media-toolbar-secondary { + float: left; + height: 100%; +} + +.media-toolbar-primary > .media-button, +.media-toolbar-primary > .media-button-group { + margin-left: 10px; + float: left; + margin-top: 15px; +} + +.media-toolbar-secondary > .media-button, +.media-toolbar-secondary > .media-button-group { + margin-right: 10px; + float: left; + margin-top: 15px; +} + +/** + * Sidebar + */ +.media-sidebar { + position: absolute; + top: 0; + right: 0; + bottom: 0; + width: 267px; + padding: 0 16px 24px; + z-index: 75; + background: #f3f3f3; + border-left: 1px solid #ddd; + overflow: auto; + -webkit-overflow-scrolling: touch; +} + +.hide-toolbar .media-sidebar { + bottom: 0; +} + +.media-sidebar .sidebar-title { + font-size: 20px; + margin: 0; + padding: 12px 10px 10px; + line-height: 28px; +} + +.media-sidebar .sidebar-content { + padding: 0 10px; + margin-bottom: 130px; +} + +.media-sidebar .search { + display: block; + width: 100%; +} + +.media-sidebar h3, +.image-details h3 { + position: relative; + font-weight: bold; + text-transform: uppercase; + font-size: 12px; + color: #666; + margin: 24px 0 8px; +} + +.media-sidebar .setting { + display: block; + float: left; + width: 100%; + margin: 1px 0; +} + +.media-sidebar .setting label { + display: block; +} + +.media-sidebar .setting .link-to-custom { + margin: 3px 0; +} + +.media-sidebar .setting span { + min-width: 30%; + margin-right: 4%; + font-size: 12px; +} + +.media-sidebar .setting select { + max-width: 65%; +} + +.media-sidebar .setting input[type="checkbox"], +.media-sidebar .field input[type="checkbox"] { + width: 16px; + float: none; + margin: 8px 3px 0; + padding: 0; +} + +.media-sidebar .setting span, +.compat-item label span { + float: left; + min-height: 22px; + padding-top: 8px; + line-height: 16px; + text-align: right; + font-weight: normal; + color: #666; +} + +.media-sidebar .setting input, +.media-sidebar .setting textarea { + margin: 1px; + width: 65%; + float: right; +} + +.media-sidebar .setting textarea, +.compat-item .field textarea { + height: 62px; + resize: vertical; +} + +.media-sidebar select { + margin-top: 3px; +} + +.compat-item { + float: left; + width: 100%; + overflow: hidden; +} + +.compat-item table { + width: 100%; + table-layout: fixed; + border-spacing: 0; + border: 0; +} + +.compat-item tr { + padding: 2px 0; + display: block; + overflow: hidden; +} + +.compat-item .label, +.compat-item .field { + display: block; + margin: 0; + padding: 0; +} + +.compat-item .label { + min-width: 30%; + margin-right: 4%; + float: left; + text-align: right; +} + +.compat-item .label span { + display: block; + width: 100%; +} + +.compat-item .field { + float: right; + width: 66%; +} + +.compat-item .field input { + width: 100%; + margin: 0; +} + + +/** + * Menu + */ +.media-menu { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + margin: 0; + padding: 16px 0; + background: #f3f3f3; + border-right-width: 1px; + border-right-style: solid; + border-right-color: #ccc; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.media-menu > a { + display: block; + position: relative; + padding: 8px 20px; + margin: 0; + line-height: 18px; + font-size: 14px; + color: #0074a2; + text-decoration: none; +} + +.media-menu > a:hover { + color: #21759B; + background: rgba( 0, 0, 0, 0.04 ); +} + +.media-menu > a:active { + outline: none; +} + +.media-menu .active, +.media-menu .active:hover { + color: #222; + font-weight: bold; +} + +.media-menu .separator { + height: 0; + margin: 12px 20px; + padding: 0; + border-top: 1px solid #ddd; +} + +/** + * Menu + */ +.media-router { + position: relative; + padding: 0 6px; + margin: 0; + clear: both; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.media-router a { + -webkit-transition: none; + transition: none; +} + +.media-router > a { + position: relative; + float: left; + padding: 8px 10px 9px; + margin: 0; + height: 18px; + line-height: 18px; + font-size: 14px; + text-decoration: none; +} + +.media-router > a:last-child { + border-right: 0; +} + +.media-router > a:active, +.media-router > a:focus { + outline: none; +} + +.media-router .active, +.media-router .active:hover { + color: #333; +} + +.media-router .active, +.media-router > a.active:last-child { + margin: -1px -1px 0; + background: #fff; + border: 1px solid #ddd; + border-bottom: none; +} + +.media-router .active:after { + display: none; +} + +/** + * Frame + */ +.media-frame { + overflow: hidden; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; +} + +.media-frame-menu { + position: absolute; + top: 0; + left: 0; + bottom: 0; + width: 200px; + z-index: 150; +} + +.media-frame-title { + position: absolute; + top: 0; + left: 200px; + right: 0; + height: 56px; + z-index: 200; +} + +.media-frame-router { + position: absolute; + top: 56px; + left: 200px; + right: 0; + height: 36px; + z-index: 200; +} + +.media-frame-content { + position: absolute; + top: 90px; + left: 200px; + right: 0; + bottom: 61px; + height: auto; + width: auto; + margin: 0; + overflow: auto; + background: #fff; + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; +} + +.media-frame-toolbar { + position: absolute; + left: 200px; + right: 0; + bottom: 0; + height: 60px; + z-index: 100; +} + +.media-frame.hide-menu .media-frame-title, +.media-frame.hide-menu .media-frame-router, +.media-frame.hide-menu .media-frame-toolbar, +.media-frame.hide-menu .media-frame-content { + left: 0; +} + +.media-frame.hide-menu .media-frame-menu { + left: -200px; +} + +.media-frame.hide-toolbar .media-frame-content { + bottom: 0; +} + +.media-frame.hide-toolbar .media-frame-toolbar { + bottom: -61px; +} + +.media-frame.hide-router .media-frame-content { + top: 56px; +} + +.media-frame.hide-router .media-frame-router { + display: none; +} + +.media-frame.hide-router .media-frame-title { + border-bottom: 1px solid #dfdfdf; + -webkit-box-shadow: 0 4px 4px -4px rgba( 0, 0, 0, 0.1 ); + box-shadow: 0 4px 4px -4px rgba( 0, 0, 0, 0.1 ); +} + +.media-frame-title h1 { + padding: 0 16px; + font-size: 22px; + line-height: 60px; + margin: 0; +} + +.media-frame-title .suggested-dimensions { + font-size: 14px; + float: right; + margin-right: 20px; +} + +.media-frame-content .crop-content { + height: 100%; +} + +.media-frame-content .crop-content .crop-image { + display: block; + margin: auto; + max-width: 100%; + max-height: 100%; +} + +.media-frame-content .crop-content .upload-errors +{ + position: absolute; + width: 300px; + top: 50%; + left: 50%; + margin-left: -150px; + margin-right: -150px; + z-index: 600000; +} + +/** + * Iframes + */ +.media-frame .media-iframe { + overflow: hidden; +} + +.media-frame .media-iframe, +.media-frame .media-iframe iframe { + height: 100%; + width: 100%; + border: 0; +} + +/** + * Attachment Browser Filters + */ +.media-frame select.attachment-filters { + margin-top: 11px; + margin-right: 10px; +} + +/** + * Search + */ +.media-frame .search { + margin-top: 11px; + padding: 4px; + line-height: 18px; + font-size: 13px; + color: #464646; + font-family: "Open Sans", sans-serif; + -webkit-appearance: none; +} + +.media-toolbar-secondary .search { + margin-right: 16px; +} + +/** + * Attachments + */ +.attachments { + margin: 0; + padding-right: 16px; + -webkit-overflow-scrolling: touch; +} + +/** + * Attachment + */ +.attachment { + position: relative; + float: left; + padding: 0; + margin: 0 10px 20px; + color: #464646; + list-style: none; + text-align: center; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.selected.attachment { + -webkit-box-shadow: + 0 0 0 1px #fff, + 0 0 0 3px #ccc; + box-shadow: + 0 0 0 1px #fff, + 0 0 0 3px #ccc; +} + +.attachment-preview { + position: relative; + width: 199px; + height: 199px; + -webkit-box-shadow: + inset 0 0 15px rgba( 0, 0, 0, 0.1 ), + inset 0 0 0 1px rgba( 0, 0, 0, 0.05 ); + box-shadow: + inset 0 0 15px rgba( 0, 0, 0, 0.1 ), + inset 0 0 0 1px rgba( 0, 0, 0, 0.05 ); + background: #eee; + cursor: pointer; +} + +.attachment .icon { + margin: 0 auto; + overflow: hidden; + padding-top: 20%; +} + +.attachment .thumbnail { + display: block; + position: absolute; + top: 0; + left: 0; + margin: 0 auto; + overflow: hidden; + max-width: 100%; + max-height: 100%; +} + +.attachment-preview .thumbnail:after { + content: ''; + display: block; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + -webkit-box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.1 ); + box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.1 ); + overflow: hidden; +} + +/* @noflip */ +.attachment .thumbnail img { + top: 0; + left: 0; +} + +/* @noflip */ +.attachment .thumbnail .centered { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + -webkit-transform: translate( 50%, 50% ); + -ms-transform: translate( 50%, 50% ); + transform: translate( 50%, 50% ); +} + +.attachment .thumbnail .centered img { + -webkit-transform: translate( -50%, -50% ); + -ms-transform: translate( -50%, -50% ); + transform: translate( -50%, -50% ); +} + +.attachment .filename { + position: absolute; + left: 0; + right: 0; + bottom: 0; + overflow: hidden; + max-height: 100%; + + word-wrap: break-word; + text-align: center; + font-weight: bold; + background: rgba( 255, 255, 255, 0.8 ); + -webkit-box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.15 ); + box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.15 ); +} + +.attachment .filename div { + padding: 5px 10px; +} + +.attachment-preview .thumbnail { + width: 199px; + height: 199px; +} + +.attachment .thumbnail img { + position: absolute; +} + +.attachment .close { + display: none; + position: absolute; + top: 5px; + right: 5px; + height: 22px; + width: 22px; + padding: 0; + font-size: 20px; + line-height: 20px; + text-align: center; + text-decoration: none; + color: #464646; + background-color: #fff; + background-position: -96px 4px; + border-width: 0; + -webkit-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 0 0 1px rgba( 0, 0, 0, 0.3 ); + box-shadow: 0 0 0 1px rgba( 0, 0, 0, 0.3 ); +} + +.attachment .close:hover { + -webkit-box-shadow: 0 0 0 1px rgba( 0, 0, 0, 0.6 ); + box-shadow: 0 0 0 1px rgba( 0, 0, 0, 0.6 ); +} + +.attachment:hover .close { + display: block; +} + +.attachment .check { + display: none; + height: 24px; + width: 24px; + position: absolute; + top: -6px; + right: -6px; + outline: none; + background: #eee; + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 2px rgba( 0, 0, 0, 0.4 ); + box-shadow: 0 0 0 1px #fff, 0 0 0 2px rgba( 0, 0, 0, 0.4 ); +} + +.attachment .check div { + background-position: -1px 0; + height: 15px; + width: 15px; + margin: 5px; +} + +.attachment .check:hover div { + background-position: -40px 0; +} + +.attachment.selected .check { + display: block; +} + +.attachment.details { + -webkit-box-shadow: 0 0 0 1px #fff, + 0 0 0 5px #1e8cbe; + box-shadow: 0 0 0 1px #fff, + 0 0 0 5px #1e8cbe; +} + +.attachment.details .check { + background-color: #1e8cbe; + -webkit-box-shadow: 0 0 0 1px #fff, + 0 0 0 2px #1e8cbe; + box-shadow: 0 0 0 1px #fff, + 0 0 0 2px #1e8cbe; +} + +.attachment.details .check div { + background-position: -21px 0; +} + +.attachment.details .check:hover div { + background-position: -60px 0; +} + +.media-frame .attachment .describe { + position: relative; + display: block; + width: 100%; + margin: -1px 0 0; + padding: 8px; + font-size: 12px; + -webkit-border-radius: 0; + border-radius: 0; +} + +/** + * Attachments Browser + */ +.media-frame .attachments-browser { + position: relative; + width: 100%; + height: 100%; + overflow: hidden; +} + +.attachments-browser .media-toolbar { + right: 300px; + height: 50px; +} + +.attachments-browser .media-toolbar-primary > .media-button, +.attachments-browser .media-toolbar-primary > .media-button-group, +.attachments-browser .media-toolbar-secondary > .media-button, +.attachments-browser .media-toolbar-secondary > .media-button-group { + margin-top: 10px; +} + +.attachments-browser .attachments, +.attachments-browser .uploader-inline { + position: absolute; + top: 50px; + left: 0; + right: 300px; + bottom: 0; + overflow: auto; +} + +.attachments-browser .instructions { + display: inline-block; + margin-top: 16px; + line-height: 18px; + font-size: 13px; + color: #666; + margin-right: 0.5em; +} + +/** + * Progress Bar + */ +.media-progress-bar { + position: relative; + height: 10px; + width: 70%; + margin: 10px auto; + -webkit-border-radius: 10px; + border-radius: 10px; + background: #dfdfdf; + background: rgba( 0, 0, 0, 0.1 ); +} + +.media-progress-bar div { + height: 10px; + min-width: 20px; + width: 0; + background: #1e8cbe; + -webkit-border-radius: 10px; + border-radius: 10px; + -webkit-transition: width 300ms; + transition: width 300ms; +} + +.media-uploader-status .media-progress-bar { + display: none; + width: 100%; +} + +.uploading.media-uploader-status .media-progress-bar { + display: block; +} + +.attachment-preview .media-progress-bar { + position: absolute; + top: 50%; + left: 15%; + width: 70%; + margin: -5px 0 0 0; +} + +.media-uploader-status { + position: relative; + margin: 0 auto; + padding-bottom: 10px; + max-width: 400px; +} + +.media-sidebar .media-uploader-status { + border-bottom: 1px solid #dfdfdf; + -webkit-box-shadow: 0 1px 0 #fff; + box-shadow: 0 1px 0 #fff; +} + +.uploader-inline .media-uploader-status h3 { + display: none; +} + +.media-uploader-status .upload-details { + display: none; + font-size: 12px; + color: #666; +} + +.uploading.media-uploader-status .upload-details { + display: block; +} + +.media-uploader-status .upload-detail-separator { + padding: 0 4px; +} + +.media-uploader-status .upload-count { + color: #464646; +} + +.media-uploader-status .upload-dismiss-errors, +.media-uploader-status .upload-errors { + display: none; +} + +.errors.media-uploader-status .upload-dismiss-errors, +.errors.media-uploader-status .upload-errors { + display: block; +} + +.media-uploader-status .upload-dismiss-errors { + text-decoration: none; +} + +.media-sidebar .media-uploader-status .upload-dismiss-errors { + position: absolute; + top: 0; + right: 0; +} + +.upload-errors .upload-error { + margin: 8px auto 0 auto; + padding: 8px; + border: 1px #c00 solid; + background: #ffebe8; + -webkit-border-radius: 3px; + border-radius: 3px; +} + +.upload-errors .upload-error-label { + padding: 2px 4px; + margin-right: 8px; + font-weight: bold; + color: #fff; + background: #e00; + background-image: -webkit-gradient(linear, left top, left bottom, from(#e00), to(#a00)); + background-image: -webkit-linear-gradient(top, #e00, #a00); + background-image: linear-gradient(to bottom, #e00, #a00); + -webkit-border-radius: 3px; + border-radius: 3px; +} + +.upload-errors .upload-error-message { + display: block; + padding-top: 8px; + color: #b44; + word-wrap: break-word; +} + +.uploader-window { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba( 0, 86, 132, 0.9 ); + z-index: 250000; + display: none; + text-align: center; + opacity: 0; + -webkit-transition: opacity 250ms; + transition: opacity 250ms; +} + +.uploader-window-content { + position: absolute; + top: 10px; + left: 10px; + right: 10px; + bottom: 10px; + border: 1px dashed #fff; +} + +.uploader-window h3 { + margin: -0.5em 0 0; + position: absolute; + top: 50%; + left: 0; + right: 0; + -webkit-transform: translateY( -50% ); + -ms-transform: translateY( -50% ); + transform: translateY( -50% ); + font-size: 40px; + color: #fff; + padding: 0; +} + +.uploader-window .media-progress-bar { + margin-top: 20px; + max-width: 300px; + background: transparent; + border-color: #fff; + display: none; +} + +.uploader-window .media-progress-bar div { + background: #fff; +} + +.uploading .uploader-window .media-progress-bar { + display: block; +} + +.media-frame .uploader-inline { + margin: 20px; + padding: 20px; + text-align: center; +} + +.uploader-inline-content { + position: absolute; + top: 30%; + left: 0; + right: 0; +} + +.uploader-inline-content .upload-ui { + margin: 4em 0; +} + +.uploader-inline-content .post-upload-ui { + margin-bottom: 2em; +} + +.uploader-inline .has-upload-message .upload-ui { + margin: 0 0 4em; +} + +.uploader-inline h3 { + font-size: 20px; + line-height: 28px; + font-weight: 400; + margin-bottom: 1.6em; +} + +.uploader-inline .has-upload-message .upload-instructions { + font-size: 14px; + color: #464646; + font-weight: normal; +} + +.uploader-inline .drop-instructions { + display: none; +} + +.supports-drag-drop .uploader-inline .drop-instructions { + display: block; +} + +.uploader-inline p { + font-size: 12px; +} + +.uploader-inline .media-progress-bar { + display: none; +} + +.uploading.uploader-inline .media-progress-bar { + display: block; +} + +.uploader-inline .browser { + display: inline-block !important; +} + +/** + * Selection + */ +.media-selection { + position: absolute; + top: 0; + left: 0; + right: 350px; + height: 60px; + padding: 0 0 0 16px; + overflow: hidden; + white-space: nowrap; +} + +.media-selection .selection-info { + display: inline-block; + font-size: 12px; + height: 60px; + margin-right: 10px; + vertical-align: top; +} + +.media-selection.empty, +.media-selection.editing { + display: none; +} + +.media-selection.one .edit-selection { + display: none; +} + +.media-selection .count { + display: block; + padding-top: 12px; + font-size: 14px; + line-height: 20px; + font-weight: bold; +} + +.media-selection .selection-info a { + display: block; + float: left; + padding: 1px 8px; + margin: 1px 8px 1px -8px; + line-height: 16px; + text-decoration: none; + border-right: 1px solid #dfdfdf; + color: #21759B; +} + +.media-selection .selection-info a:hover { + background: #21759B; + color: #fff; + border-color: transparent; +} + +.media-selection .selection-info a:last-child { + border-right: 0; + margin-right: 0; +} + +.media-selection .selection-info .clear-selection { + color: red; +} + +.media-selection .selection-info .clear-selection:hover { + background: red; +} + +.media-selection .selection-view { + display: inline-block; + vertical-align: top; +} + +.media-selection .attachments { + display: inline-block; + height: 48px; + margin-top: 5px; + overflow: hidden; + vertical-align: top; +} + +.media-selection .attachment .icon { + width: 50%; +} + +.attachment.selection.selected { + -webkit-box-shadow: none; + box-shadow: none; +} + +.attachment.selection.details { + -webkit-box-shadow: + 0 0 0 1px #fff, + 0 0 0 4px #1e8cbe; + box-shadow: + 0 0 0 1px #fff, + 0 0 0 4px #1e8cbe; +} + +.media-selection .attachment.selection.details { + -webkit-box-shadow: + 0 0 0 1px #fff, + 0 0 0 3px #1e8cbe; + box-shadow: + 0 0 0 1px #fff, + 0 0 0 3px #1e8cbe; +} + +.media-selection:after { + content: ''; + display: block; + position: absolute; + top: 0; + right: 0; + bottom: 0; + width: 25px; + background-image: -webkit-gradient(linear, right top, left top, from(rgba( 255, 255, 255, 1 )), to(rgba( 255, 255, 255, 0 ))); + background-image: -webkit-linear-gradient(right, rgba( 255, 255, 255, 1 ), rgba( 255, 255, 255, 0 )); + background-image: linear-gradient(to left, rgba( 255, 255, 255, 1 ) , rgba( 255, 255, 255, 0 ) ); +} + +.media-selection .attachment .filename { + display: none; +} + +/** + * Spinner + */ + +.media-frame .spinner { + background: url(../images/spinner.gif) no-repeat; + -webkit-background-size: 20px 20px; + background-size: 20px 20px; + display: none; + opacity: 0.7; + filter: alpha(opacity=70); + width: 20px; + height: 20px; + margin: 0; +} + +.media-toolbar .spinner { + margin-top: 14px; +} + +.media-sidebar .settings-save-status { + background: #f5f5f5; + float: right; + text-transform: none; + z-index: 10; +} + +.media-sidebar .settings-save-status .spinner { + margin: 0 5px 0; +} + +.media-sidebar .settings-save-status .saved { + float: right; + display: none; +} + +.media-sidebar .save-waiting .settings-save-status .spinner, +.media-sidebar .save-complete .settings-save-status .saved { + display: block; +} + +/** + * Attachment Details + */ +.attachment-details { + position: relative; + overflow: auto; +} + +.attachment-info { + overflow: hidden; + min-height: 60px; + margin-bottom: 16px; + line-height: 18px; + color: #666; + border-bottom: 1px solid #ddd; + padding-bottom: 11px; +} + +.attachment-info .filename { + font-weight: bold; + color: #464646; + word-wrap: break-word; +} + +.attachment-info .thumbnail { + position: relative; + float: left; + max-width: 120px; + max-height: 120px; + margin-top: 5px; + margin-right: 10px; + margin-bottom: 5px; +} + +.uploading .attachment-info .thumbnail { + width: 120px; + height: 80px; + -webkit-box-shadow: inset 0 0 15px rgba( 0, 0, 0, 0.1 ); + box-shadow: inset 0 0 15px rgba( 0, 0, 0, 0.1 ); +} + +.uploading .attachment-info .media-progress-bar { + margin-top: 35px; +} + +.attachment-info .thumbnail:after { + content: ''; + display: block; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + -webkit-box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.15 ); + box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.15 ); + overflow: hidden; +} + +.attachment-info .thumbnail img { + display: block; + max-width: 120px; + max-height: 120px; + margin: 0 auto; +} + +.attachment-info .details { + float: left; + font-size: 12px; + max-width: 100%; +} + +.attachment-info .edit-attachment, +.attachment-info .refresh-attachment, +.attachment-info .delete-attachment, +.attachment-info .trash-attachment { + display: block; + text-decoration: none; + white-space: nowrap; +} + +.attachment-info .refresh-attachment, +.attachment-details.needs-refresh .attachment-info .edit-attachment { + display: none; +} + +.attachment-details.needs-refresh .attachment-info .refresh-attachment, +.attachment-info .edit-attachment { + display: block; +} + +.attachment-info .delete-attachment, +.attachment-info .trash-attachment { + color: #bc0b0b; +} + +.attachment-info .delete-attachment:hover, +.attachment-info .trash-attachment:hover { + color: red; +} + +/** + * Attachment Display Settings + */ +.attachment-display-settings { + width: 100%; + float: left; + overflow: hidden; +} + +.attachment-display-settings h4 { + margin: 1.4em 0 0.4em; +} + +.collection-settings { + overflow: hidden; +} + +.collection-settings .setting input[type="checkbox"] { + float: left; + margin-right: 8px; +} + +.collection-settings .setting span { + min-width: inherit; +} + +/** + * Image Editor + */ + +.media-frame .imgedit-wrap { + position: static; +} + +.media-frame .imgedit-wait { + height: auto !important; + right: 0; + bottom: 0; + left: 0; +} + +.media-frame .imgedit-wrap .imgedit-panel-content { + padding: 16px; + position: absolute; + top: 0; + right: 282px; + bottom: 0; + left: 0; + overflow: auto; +} + +.media-frame .imgedit-wrap .imgedit-settings { + background: #f3f3f3; + border-left: 1px solid #ddd; + padding: 0 16px 16px; + position: absolute; + top: 0; + right: 0; + bottom: 0; + width: 250px; + overflow: auto; +} + +.media-frame .imgedit-group { + background: none; + border: none; + border-bottom: 1px solid #ddd; + -webkit-box-shadow: none; + box-shadow: none; + margin: 0; + margin-bottom: 16px; + padding: 0; + padding-bottom: 16px; +} + +.media-frame .imgedit-group:last-of-type { + border: none; + margin: 0; + padding: 0; +} + +.media-frame .imgedit-group-top h3 { + text-transform: uppercase; + font-size: 12px; + color: #666; + margin: 0; + margin-top: 24px; +} + +.media-frame .imgedit-group-top h3 a { + text-decoration: none; + color: #666; +} + +.media-frame .imgedit-help-toggle { + margin-top: -2px; + cursor: pointer; + color: #666; +} + +.media-frame .imgedit-help-toggled span.dashicons:before { + content: '\f142'; +} + +.media-frame .imgedit-group img { + margin-top: 5px; +} + +.media-frame .imgedit-wrap div.updated { + margin: 0; + margin-bottom: 16px; +} + + +/** + * Embed from URL and Image Details + */ +.embed-url { + display: block; + position: relative; + padding: 16px; + margin: 0; + z-index: 250; + background: #fff; + font-size: 18px; +} + +.media-frame .embed-url input { + font-size: 18px; + padding: 12px 14px; + width: 100%; + min-width: 200px; + -webkit-box-shadow: inset 2px 2px 4px -2px rgba( 0, 0, 0, 0.1 ); + box-shadow: inset 2px 2px 4px -2px rgba( 0, 0, 0, 0.1 ); +} + +.media-frame .embed-url .spinner { + position: absolute; + top: 16px; + right: 26px; +} + +.media-frame .embed-loading .embed-url .spinner { + display: block; +} + +.embed-link-settings, +.embed-media-settings { + position: absolute; + top: 60px; + left: 0; + right: 0; + bottom: 0; + padding: 16px 16px 32px; + overflow: auto; +} + +.image-details .media-modal { + left: 140px; + right: 140px; +} + +.image-details .media-frame-menu { + display: none; +} + +.image-details .media-frame-title, +.image-details .media-frame-content, +.image-details .media-frame-router { + left: 0; +} + +.image-details .embed-media-settings { + top: 0; + overflow: visible; + padding: 0; +} + +.image-details .column-settings { + background: #f3f3f3; + border-right: 1px solid #ddd; + min-height: 100%; + width: 52%; + position: absolute; + top: 0; + left: 0; +} + +.image-details .column-settings h3 { + margin: 20px; + padding-top: 20px; + border-top: 1px solid #ddd; +} + +.image-details .column-image { + width: 48%; + position: absolute; + left: 52%; + top: 0; +} + +.image-details .image { + margin: 20px; +} + +.image-details .image img { + max-width: 100%; + max-height: 500px; +} + +.image-details .advanced-toggle { + color: #666; + text-decoration: none; + display: block; +} + +.image-details .advanced-toggle::after { + font: normal 20px/1 'dashicons'; + speak: none; + vertical-align: top; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + content: '\f140'; + display: inline-block; + margin-top: -2px; +} + +.image-details .advanced-visible .advanced-toggle::after { + content: '\f142'; + margin-top: 0; +} + +.image-details .embed-media-settings .size { + margin-bottom: 4px; +} + +.image-details .custom-size span { + display: block; +} + +.image-details .custom-size label { + display: block; + float: left; +} + +.image-details .custom-size span small { + color: #999; + font-size: inherit; +} + +.image-details .custom-size input { + width: 5em; +} + +.image-details .custom-size .sep { + float: left; + margin: 26px 6px 0 6px; +} + +.image-details .custom-size::after { + content: ''; + display: table; + clear: both; +} + +.media-embed .thumbnail { + max-width: 100%; + max-height: 200px; + position: relative; + float: left; +} + +.media-embed .thumbnail img { + max-height: 200px; + display: block; +} + +.media-embed .thumbnail:after { + content: ''; + display: block; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + -webkit-box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.1 ); + box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.1 ); + overflow: hidden; +} + +.media-embed .setting { + width: 100%; + margin: 10px 0; + float: left; + display: block; + clear: both; +} + +.image-details .embed-media-settings .setting { + float: none; + width: auto; +} + +.image-details .actions { + margin: 10px 0; +} + +.image-details .hidden { + display: none; +} + +.media-embed .setting input[type="text"], +.media-embed .setting textarea { + display: block; + width: 100%; + max-width: 400px; + margin: 1px 0; +} + +.image-details .embed-media-settings .setting input[type="text"], +.image-details .embed-media-settings .setting textarea { + max-width: inherit; + width: 70%; +} + +.image-details .embed-media-settings .setting input.link-to-custom, +.image-details .embed-media-settings .link-target, +.image-details .embed-media-settings .custom-size { + margin-left: 27%; + width: 70%; +} + +.image-details .embed-media-settings .link-target { + margin-top: 24px; +} + +.media-embed .setting input.hidden, +.media-embed .setting textarea.hidden { + display: none; +} + +.media-embed .setting span { + display: block; + width: 200px; + font-size: 13px; + line-height: 24px; + color: #666; +} + +.image-details .embed-media-settings .setting span { + float: left; + width: 25%; + text-align: right; + margin: 8px 1% 0 1%; + line-height: 1.1; +} + +.media-embed .setting .button-group { + margin: 2px 0; +} + +.media-embed-sidebar { + position: absolute; + top: 0; + left: 440px; +} + +.advanced-section, +.link-settings { + margin-top: 10px; +} + +/* Drag & drop on the editor upload */ +#wp-fullscreen-body .uploader-editor, +.wp-editor-wrap .uploader-editor { + background: rgba( 150, 150, 150, 0.9 ); + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 99998; /* under the toolbar */ + display: none; + text-align: center; +} + +#wp-fullscreen-body .uploader-editor { + background: rgba( 0, 86, 132, 0.9 ); + position: fixed; + z-index: 100050; /* above the editor toolbar */ +} + +.wp-editor-wrap.wp-fullscreen-wrap .uploader-editor { + opacity: 0; +} + +#wp-fullscreen-body .uploader-editor-content, +.wp-editor-wrap .uploader-editor-content { + border: 1px dashed #fff; + position: absolute; + top: 10px; + left: 10px; + right: 10px; + bottom: 10px; +} + +#wp-fullscreen-body .uploader-editor .uploader-editor-title, +.wp-editor-wrap .uploader-editor .uploader-editor-title { + position: absolute; + top: 50%; + left: 0; + right: 0; + -webkit-transform: translateY( -50% ); + -ms-transform: translateY( -50% ); + transform: translateY( -50% ); + font-size: 3em; + line-height: 1.3; + font-weight: bold; + color: #fff; + padding: 0; + margin: 0; + display: none; +} + +.wp-editor-wrap .uploader-editor.droppable { + background: rgba( 0, 86, 132, 0.9 ); +} + +#wp-fullscreen-body .uploader-editor .uploader-editor-title, +.wp-editor-wrap .uploader-editor.droppable .uploader-editor-title { + display: block; +} + +/** + * IE7 Fixes + */ +.ie7 .media-frame .attachments-browser { + position: static; +} + +.ie7 .media-frame .embed-url input { + margin-top: 4px; + width: 90%; +} + +.ie7 .compat-item { + width: 99%; +} + +.ie7 .attachment-display-settings { + width: auto; +} + +.ie7 .attachment-preview, +.ie7 .attachment-preview .thumbnail { + width: 120px; + height: 120px; +} + +.ie7 .media-frame .attachment .describe { + width: 102px; +} + +.ie7 .media-sidebar .setting select { + max-width: 55%; +} + +.ie7 .media-sidebar .setting input, +.ie7 .media-sidebar .setting textarea { + width: 55%; +} + +.ie7 .media-sidebar .setting .link-to-custom { + float: left; +} + +/** + * Localization + */ +.rtl .media-modal, +.rtl .media-frame, +.rtl .media-frame .search, +.rtl .media-frame input[type="text"], +.rtl .media-frame input[type="password"], +.rtl .media-frame input[type="number"], +.rtl .media-frame input[type="search"], +.rtl .media-frame input[type="email"], +.rtl .media-frame input[type="url"], +.rtl .media-frame textarea, +.rtl .media-frame select { + font-family: Tahoma, sans-serif; +} + +:lang(he-il) .rtl .media-modal, +:lang(he-il) .rtl .media-frame, +:lang(he-il) .rtl .media-frame .search, +:lang(he-il) .rtl .media-frame input[type="text"], +:lang(he-il) .rtl .media-frame input[type="password"], +:lang(he-il) .rtl .media-frame input[type="number"], +:lang(he-il) .rtl .media-frame input[type="search"], +:lang(he-il) .rtl .media-frame input[type="email"], +:lang(he-il) .rtl .media-frame input[type="url"], +:lang(he-il) .rtl .media-frame textarea, +:lang(he-il) .rtl .media-frame select { + font-family: Arial, sans-serif; +} + + + + +@media only screen and (max-width: 960px) { + .media-frame-content .media-toolbar-primary .search, + .media-frame-content .media-toolbar-secondary .attachment-filters { + max-width: 120px; + } +} + +/** + * Responsive layout + */ +@media only screen and (max-width: 900px) { + .media-frame-menu { + width: 139px; + } + + .media-menu > a { + padding: 4px 5px; + } + + .media-frame-title, + .media-frame-router, + .media-frame-content, + .media-frame-toolbar { + left: 140px; + } + + .media-sidebar { + width: 159px; + padding: 0 10px 24px; + } + + .attachments-browser .attachments, + .attachments-browser .uploader-inline, + .attachments-browser .media-toolbar { + right: 180px; + } + + .media-sidebar .setting input, + .media-sidebar .setting textarea, + .media-sidebar .setting span, + .compat-item label span { + float: none; + } + + .media-sidebar .setting span, + .compat-item label span { + text-align: inherit; + display: block; + min-height: 16px; + margin: 0; + padding: 8px 2px 0; + } + + .media-sidebar .setting input, + .media-sidebar .setting textarea, + .media-sidebar .setting select { + width: 98%; + max-width: none; + } + + .media-sidebar .setting select.columns { + width: auto; + } + + .media-frame input, + .media-frame textarea, + .media-frame .search { + padding: 3px 6px; + } + + .media-frame-content .attachment .icon { + top: 40%; + } + + .image-details .media-modal { + left: 30px; + right: 30px; + } + + .image-details .embed-media-settings .setting { + margin: 20px; + } + + .image-details .embed-media-settings .setting span { + float: none; + text-align: left; + width: 100%; + margin-bottom: 4px; + } + + .image-details .embed-media-settings .setting input.link-to-custom, + .image-details .embed-media-settings .setting input[type="text"], + .image-details .embed-media-settings .setting textarea { + width: 100%; + margin-left: 0; + } + + .image-details .embed-media-settings .custom-size { + margin-left: 20px; + } + + .media-selection { + min-width: 120px; + } + + .media-selection:after { + background: none; + } + + .media-selection .attachments { + display: none; + } + + .media-menu .separator { + margin: 12px 10px; + } + + .media-modal-close { + right: 10px; + } + + /* Text inputs need to be 16px, or they force zooming on iOS */ + .media-frame input[type="text"], + .media-frame input[type="password"], + .media-frame input[type="number"], + .media-frame input[type="search"], + .media-frame input[type="email"], + .media-frame input[type="url"], + .media-frame textarea, + .media-frame select { + font-size: 16px; + } +} + +/* Responsive on portrait and landscape */ +@media only screen and (max-width: 640px), screen and (max-height: 400px) { + + /* Media tabs on the top */ + .media-frame-content .media-toolbar .instructions { + display: none; + } + + .media-frame-menu { + width: auto; + bottom: auto; + right: 0; + height: 60px; + } + + .media-menu { + border-right: none; + position: relative; + border-bottom: 1px solid #dddddd; + overflow: hidden; + padding: 10px 0 10px 10px; + } + + .media-menu a { + float: left; + width: 42%; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + } + + .media-frame-title { + display: none; + } + + .image-details .media-frame-title { + display: block; + top: 0; + font-size: 14px; + } + + .media-frame-toolbar { + position: absolute; + bottom: 0px; + left: 0; + right: 0; + background: #FFF; + border-top: 1px solid #DEDEDE; + } + + .media-toolbar { + position: relative; + } + + .media-frame { + overflow: hidden; + } + + .attachments-browser .attachments { + top: 42px; + } + + .attachment-details h3 { + margin-top: 45px; + } + + /* Shorten right-side links so they don't overlap the close button */ + .media-menu a:nth-child(2), + .media-menu a:last-child { + width: 40%; + } + + .media-menu .separator { + display: none; + } + + .media-frame-title { + top: 72px; + left: auto; + height: auto; + } + + .media-frame-title h1 { + line-height: 3; + font-size: 18px; + } + + .media-frame-router { + top: 84px; + left: 0; + } + + .media-frame-content { + left: 0; + top: 118px; + } + + .image-details .media-frame.hide-router .media-frame-content { + top: 40px; + } + + .media-frame .attachments-browser { + padding-bottom: 300px; + } + + .media-sidebar { + border-bottom: 1px solid #dddddd; + } + + .media-modal { + width: auto; + } + + .media-toolbar-primary, .media-toolbar-secondary { + height: auto; + } + + .uploader-inline h3 { + margin: 0 0 .8em 0; + } + + .uploader-inline-content { + top: auto; + } + + .uploader-inline-content .upload-ui { + margin: 0; + } + + .attachments-browser .attachments, .attachments-browser .uploader-inline { + position: relative; + margin-right: 180px; + } + + /* Full-bleed modal */ + .media-modal, + .image-details .media-modal { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + } + + .media-modal-backdrop { + position: fixed; + } + + .attachments-browser .attachment, + .attachments-browser .attachment-preview { + max-width: 100%; + } + + .attachments-browser .media-toolbar-primary input.search { + max-width: 150px; + } + + .uploader-inline-content { + position: relative; + } + + .media-sidebar .setting input[type="checkbox"], + .media-sidebar .field input[type="checkbox"] { + width: 25px; + } + + /* Image From Link */ + .embed-link-settings, + .embed-media-settings { + padding-bottom: 52px; + } + + .image-details .column-settings, + .image-details .column-image { + position: relative; + padding: 10px 0 20px 0; + left: 0; + width: 100%; + min-height: inherit; + } + + + /* Gallery */ + .media-frame.hide-router .media-frame-content { + top: 73px; + border-top: none; + } + + .collection-settings h3 { + margin-top: 45px; + } + +} + +/* Landscape specific header override */ +@media screen and (max-height: 400px) { + .media-menu { + padding: 0 0 0 10px; + } + + .media-menu a { + float: left; + width: 21%; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + padding: 10px inherit; + } + + .media-menu a:nth-child(2), + .media-menu a:last-child { + width: 21%; + } + + .media-modal-close { + top: 2px; + } + + .media-frame-router { + top: 44px; + } + + .media-frame-content { + top: 78px; + } + + .attachments-browser .attachments { + top: 2px; + } + + /* Prevent unnecessary scrolling on title input */ + .embed-link-settings { + overflow: visible; + } +} + +@media only screen and (max-width: 680px) { + .media-frame-content .media-toolbar .search, + .media-frame-content .media-toolbar .attachment-filters { + max-width: 85px; + } +} + +/** + * HiDPI Displays + */ +@media print, + (-o-min-device-pixel-ratio: 5/4), + (-webkit-min-device-pixel-ratio: 1.25), + (min-resolution: 120dpi) { + + .media-modal-icon { + background-image: url(../images/uploader-icons-2x.png); + -webkit-background-size: 134px 15px; + background-size: 134px 15px; + } + + .media-frame .spinner { + background-image: url(../images/spinner-2x.gif); + } +} diff --git a/wp-includes/css/media-views.min.css b/wp-includes/css/media-views.min.css new file mode 100644 index 0000000..5e20ea5 --- /dev/null +++ b/wp-includes/css/media-views.min.css @@ -0,0 +1 @@ +.media-modal *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.media-frame,.media-modal{font-family:"Open Sans",sans-serif;font-size:12px}.media-frame input,.media-frame textarea{padding:6px 8px;line-height:16px}.media-frame select,.wp-admin .media-frame select{line-height:28px;margin-top:3px}.media-frame a{border-bottom:0;color:#21759b}.media-frame a:hover{color:#d54e21}.media-frame a.button{color:#333}.media-frame a.button:hover{color:#222}.media-frame a.button-primary,.media-frame a.button-primary:hover{color:#fff}.media-frame input[type=email],.media-frame input[type=number],.media-frame input[type=password],.media-frame input[type=search],.media-frame input[type=text],.media-frame input[type=url],.media-frame select,.media-frame textarea{font-family:"Open Sans",sans-serif;font-size:12px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border-width:1px;border-style:solid;border-color:#dfdfdf}.media-frame select{height:24px;padding:2px}.media-frame input:disabled,.media-frame input[readonly],.media-frame textarea:disabled,.media-frame textarea[readonly]{background-color:#eee}.media-frame input[type=search]{-webkit-appearance:textfield}.media-frame :-moz-placeholder{color:#a9a9a9}.media-frame .hidden{display:none}.ui-draggable,.ui-sortable{-ms-touch-action:none;touch-action:none}.meta-box-sortables.ui-sortable{-ms-touch-action:auto;touch-action:auto}.meta-box-sortables.ui-sortable .hndle{-ms-touch-action:none;touch-action:none}.media-modal{position:fixed;top:30px;left:30px;right:30px;bottom:30px;z-index:160000}.wp-customizer .media-modal{z-index:560000}.media-modal-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:159900}.wp-customizer .media-modal-backdrop{z-index:559900}.media-modal-close{position:absolute;text-decoration:none;top:5px;right:10px;width:30px;height:30px;z-index:1000}.media-modal-close span.media-modal-icon{display:block;margin:8px auto 0;width:15px;height:15px;background-image:none}.media-modal-close .media-modal-icon:before{content:'\f158';font:400 20px/1 dashicons;speak:none;vertical-align:middle;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#666}.media-modal-close:hover .media-modal-icon:before{color:#2ea2cc}.media-modal-close:active{outline:0}.media-modal-content{position:absolute;top:0;left:0;right:0;bottom:0;overflow:auto;min-height:300px;-webkit-box-shadow:0 5px 15px rgba(0,0,0,.7);box-shadow:0 5px 15px rgba(0,0,0,.7);background:#fcfcfc;-webkit-font-smoothing:subpixel-antialiased}.media-modal-icon{background-image:url(../images/uploader-icons.png);background-repeat:no-repeat}.media-toolbar{position:absolute;top:0;left:0;right:0;z-index:100;height:60px;padding:0 16px;border:0 solid #dfdfdf;overflow:hidden}.media-toolbar-primary{float:right;height:100%}.media-toolbar-secondary{float:left;height:100%}.media-toolbar-primary>.media-button,.media-toolbar-primary>.media-button-group{margin-left:10px;float:left;margin-top:15px}.media-toolbar-secondary>.media-button,.media-toolbar-secondary>.media-button-group{margin-right:10px;float:left;margin-top:15px}.media-sidebar{position:absolute;top:0;right:0;bottom:0;width:267px;padding:0 16px 24px;z-index:75;background:#f3f3f3;border-left:1px solid #ddd;overflow:auto;-webkit-overflow-scrolling:touch}.hide-toolbar .media-sidebar{bottom:0}.media-sidebar .sidebar-title{font-size:20px;margin:0;padding:12px 10px 10px;line-height:28px}.media-sidebar .sidebar-content{padding:0 10px;margin-bottom:130px}.media-sidebar .search{display:block;width:100%}.image-details h3,.media-sidebar h3{position:relative;font-weight:700;text-transform:uppercase;font-size:12px;color:#666;margin:24px 0 8px}.media-sidebar .setting{display:block;float:left;width:100%;margin:1px 0}.media-sidebar .setting label{display:block}.media-sidebar .setting .link-to-custom{margin:3px 0}.media-sidebar .setting span{min-width:30%;margin-right:4%;font-size:12px}.media-sidebar .setting select{max-width:65%}.media-sidebar .field input[type=checkbox],.media-sidebar .setting input[type=checkbox]{width:16px;float:none;margin:8px 3px 0;padding:0}.compat-item label span,.media-sidebar .setting span{float:left;min-height:22px;padding-top:8px;line-height:16px;text-align:right;font-weight:400;color:#666}.media-sidebar .setting input,.media-sidebar .setting textarea{margin:1px;width:65%;float:right}.compat-item .field textarea,.media-sidebar .setting textarea{height:62px;resize:vertical}.media-sidebar select{margin-top:3px}.compat-item{float:left;width:100%;overflow:hidden}.compat-item table{width:100%;table-layout:fixed;border-spacing:0;border:0}.compat-item tr{padding:2px 0;display:block;overflow:hidden}.compat-item .field,.compat-item .label{display:block;margin:0;padding:0}.compat-item .label{min-width:30%;margin-right:4%;float:left;text-align:right}.compat-item .label span{display:block;width:100%}.compat-item .field{float:right;width:66%}.compat-item .field input{width:100%;margin:0}.media-menu{position:absolute;top:0;left:0;right:0;bottom:0;margin:0;padding:16px 0;background:#f3f3f3;border-right-width:1px;border-right-style:solid;border-right-color:#ccc;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.media-menu>a{display:block;position:relative;padding:8px 20px;margin:0;line-height:18px;font-size:14px;color:#0074a2;text-decoration:none}.media-menu>a:hover{color:#21759B;background:rgba(0,0,0,.04)}.media-menu>a:active{outline:0}.media-menu .active,.media-menu .active:hover{color:#222;font-weight:700}.media-menu .separator{height:0;margin:12px 20px;padding:0;border-top:1px solid #ddd}.media-router{position:relative;padding:0 6px;margin:0;clear:both;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.media-router a{-webkit-transition:none;transition:none}.media-router>a{position:relative;float:left;padding:8px 10px 9px;margin:0;height:18px;line-height:18px;font-size:14px;text-decoration:none}.media-router>a:last-child{border-right:0}.media-router>a:active,.media-router>a:focus{outline:0}.media-router .active,.media-router .active:hover{color:#333}.media-router .active,.media-router>a.active:last-child{margin:-1px -1px 0;background:#fff;border:1px solid #ddd;border-bottom:0}.media-router .active:after{display:none}.media-frame{overflow:hidden;position:absolute;top:0;left:0;right:0;bottom:0}.media-frame-menu{position:absolute;top:0;left:0;bottom:0;width:200px;z-index:150}.media-frame-title{position:absolute;top:0;left:200px;right:0;height:56px;z-index:200}.media-frame-router{position:absolute;top:56px;left:200px;right:0;height:36px;z-index:200}.media-frame-content{position:absolute;top:90px;left:200px;right:0;bottom:61px;height:auto;width:auto;margin:0;overflow:auto;background:#fff;border-top:1px solid #ddd;border-bottom:1px solid #ddd}.media-frame-toolbar{position:absolute;left:200px;right:0;bottom:0;height:60px;z-index:100}.media-frame.hide-menu .media-frame-content,.media-frame.hide-menu .media-frame-router,.media-frame.hide-menu .media-frame-title,.media-frame.hide-menu .media-frame-toolbar{left:0}.media-frame.hide-menu .media-frame-menu{left:-200px}.media-frame.hide-toolbar .media-frame-content{bottom:0}.media-frame.hide-toolbar .media-frame-toolbar{bottom:-61px}.media-frame.hide-router .media-frame-content{top:56px}.media-frame.hide-router .media-frame-router{display:none}.media-frame.hide-router .media-frame-title{border-bottom:1px solid #dfdfdf;-webkit-box-shadow:0 4px 4px -4px rgba(0,0,0,.1);box-shadow:0 4px 4px -4px rgba(0,0,0,.1)}.media-frame-title h1{padding:0 16px;font-size:22px;line-height:60px;margin:0}.media-frame-title .suggested-dimensions{font-size:14px;float:right;margin-right:20px}.media-frame-content .crop-content{height:100%}.media-frame-content .crop-content .crop-image{display:block;margin:auto;max-width:100%;max-height:100%}.media-frame-content .crop-content .upload-errors{position:absolute;width:300px;top:50%;left:50%;margin-left:-150px;margin-right:-150px;z-index:600000}.media-frame .media-iframe{overflow:hidden}.media-frame .media-iframe,.media-frame .media-iframe iframe{height:100%;width:100%;border:0}.media-frame select.attachment-filters{margin-top:11px;margin-right:10px}.media-frame .search{margin-top:11px;padding:4px;line-height:18px;font-size:13px;color:#464646;font-family:"Open Sans",sans-serif;-webkit-appearance:none}.media-toolbar-secondary .search{margin-right:16px}.attachments{margin:0;padding-right:16px;-webkit-overflow-scrolling:touch}.attachment{position:relative;float:left;padding:0;margin:0 10px 20px;color:#464646;list-style:none;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.selected.attachment{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #ccc;box-shadow:0 0 0 1px #fff,0 0 0 3px #ccc}.attachment-preview{position:relative;width:199px;height:199px;-webkit-box-shadow:inset 0 0 15px rgba(0,0,0,.1),inset 0 0 0 1px rgba(0,0,0,.05);box-shadow:inset 0 0 15px rgba(0,0,0,.1),inset 0 0 0 1px rgba(0,0,0,.05);background:#eee;cursor:pointer}.attachment .icon{margin:0 auto;overflow:hidden;padding-top:20%}.attachment .thumbnail{display:block;position:absolute;top:0;left:0;margin:0 auto;overflow:hidden;max-width:100%;max-height:100%}.attachment-preview .thumbnail:after{content:'';display:block;position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);overflow:hidden}.attachment .thumbnail img{top:0;left:0}.attachment .thumbnail .centered{position:absolute;top:0;left:0;width:100%;height:100%;-webkit-transform:translate(50%,50%);-ms-transform:translate(50%,50%);transform:translate(50%,50%)}.attachment .thumbnail .centered img{-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.attachment .filename{position:absolute;left:0;right:0;bottom:0;overflow:hidden;max-height:100%;word-wrap:break-word;text-align:center;font-weight:700;background:rgba(255,255,255,.8);-webkit-box-shadow:inset 0 0 0 1px rgba(0,0,0,.15);box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}.attachment .filename div{padding:5px 10px}.attachment-preview .thumbnail{width:199px;height:199px}.attachment .thumbnail img{position:absolute}.attachment .close{display:none;position:absolute;top:5px;right:5px;height:22px;width:22px;padding:0;font-size:20px;line-height:20px;text-align:center;text-decoration:none;color:#464646;background-color:#fff;background-position:-96px 4px;border-width:0;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.3);box-shadow:0 0 0 1px rgba(0,0,0,.3)}.attachment .close:hover{-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.6);box-shadow:0 0 0 1px rgba(0,0,0,.6)}.attachment:hover .close{display:block}.attachment .check{display:none;height:24px;width:24px;position:absolute;top:-6px;right:-6px;outline:0;background:#eee;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px rgba(0,0,0,.4);box-shadow:0 0 0 1px #fff,0 0 0 2px rgba(0,0,0,.4)}.attachment .check div{background-position:-1px 0;height:15px;width:15px;margin:5px}.attachment .check:hover div{background-position:-40px 0}.attachment.selected .check{display:block}.attachment.details{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 5px #1e8cbe;box-shadow:0 0 0 1px #fff,0 0 0 5px #1e8cbe}.attachment.details .check{background-color:#1e8cbe;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #1e8cbe;box-shadow:0 0 0 1px #fff,0 0 0 2px #1e8cbe}.attachment.details .check div{background-position:-21px 0}.attachment.details .check:hover div{background-position:-60px 0}.media-frame .attachment .describe{position:relative;display:block;width:100%;margin:-1px 0 0;padding:8px;font-size:12px;-webkit-border-radius:0;border-radius:0}.media-frame .attachments-browser{position:relative;width:100%;height:100%;overflow:hidden}.attachments-browser .media-toolbar{right:300px;height:50px}.attachments-browser .media-toolbar-primary>.media-button,.attachments-browser .media-toolbar-primary>.media-button-group,.attachments-browser .media-toolbar-secondary>.media-button,.attachments-browser .media-toolbar-secondary>.media-button-group{margin-top:10px}.attachments-browser .attachments,.attachments-browser .uploader-inline{position:absolute;top:50px;left:0;right:300px;bottom:0;overflow:auto}.attachments-browser .instructions{display:inline-block;margin-top:16px;line-height:18px;font-size:13px;color:#666;margin-right:.5em}.media-progress-bar{position:relative;height:10px;width:70%;margin:10px auto;-webkit-border-radius:10px;border-radius:10px;background:#dfdfdf;background:rgba(0,0,0,.1)}.media-progress-bar div{height:10px;min-width:20px;width:0;background:#1e8cbe;-webkit-border-radius:10px;border-radius:10px;-webkit-transition:width 300ms;transition:width 300ms}.media-uploader-status .media-progress-bar{display:none;width:100%}.uploading.media-uploader-status .media-progress-bar{display:block}.attachment-preview .media-progress-bar{position:absolute;top:50%;left:15%;width:70%;margin:-5px 0 0 0}.media-uploader-status{position:relative;margin:0 auto;padding-bottom:10px;max-width:400px}.media-sidebar .media-uploader-status{border-bottom:1px solid #dfdfdf;-webkit-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff}.uploader-inline .media-uploader-status h3{display:none}.media-uploader-status .upload-details{display:none;font-size:12px;color:#666}.uploading.media-uploader-status .upload-details{display:block}.media-uploader-status .upload-detail-separator{padding:0 4px}.media-uploader-status .upload-count{color:#464646}.media-uploader-status .upload-dismiss-errors,.media-uploader-status .upload-errors{display:none}.errors.media-uploader-status .upload-dismiss-errors,.errors.media-uploader-status .upload-errors{display:block}.media-uploader-status .upload-dismiss-errors{text-decoration:none}.media-sidebar .media-uploader-status .upload-dismiss-errors{position:absolute;top:0;right:0}.upload-errors .upload-error{margin:8px auto 0;padding:8px;border:1px #c00 solid;background:#ffebe8;-webkit-border-radius:3px;border-radius:3px}.upload-errors .upload-error-label{padding:2px 4px;margin-right:8px;font-weight:700;color:#fff;background:#e00;background-image:-webkit-gradient(linear,left top,left bottom,from(#e00),to(#a00));background-image:-webkit-linear-gradient(top,#e00,#a00);background-image:linear-gradient(to bottom,#e00,#a00);-webkit-border-radius:3px;border-radius:3px}.upload-errors .upload-error-message{display:block;padding-top:8px;color:#b44;word-wrap:break-word}.uploader-window{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,86,132,.9);z-index:250000;display:none;text-align:center;opacity:0;-webkit-transition:opacity 250ms;transition:opacity 250ms}.uploader-window-content{position:absolute;top:10px;left:10px;right:10px;bottom:10px;border:1px dashed #fff}.uploader-window h3{margin:-.5em 0 0;position:absolute;top:50%;left:0;right:0;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);font-size:40px;color:#fff;padding:0}.uploader-window .media-progress-bar{margin-top:20px;max-width:300px;background:0 0;border-color:#fff;display:none}.uploader-window .media-progress-bar div{background:#fff}.uploading .uploader-window .media-progress-bar{display:block}.media-frame .uploader-inline{margin:20px;padding:20px;text-align:center}.uploader-inline-content{position:absolute;top:30%;left:0;right:0}.uploader-inline-content .upload-ui{margin:4em 0}.uploader-inline-content .post-upload-ui{margin-bottom:2em}.uploader-inline .has-upload-message .upload-ui{margin:0 0 4em}.uploader-inline h3{font-size:20px;line-height:28px;font-weight:400;margin-bottom:1.6em}.uploader-inline .has-upload-message .upload-instructions{font-size:14px;color:#464646;font-weight:400}.uploader-inline .drop-instructions{display:none}.supports-drag-drop .uploader-inline .drop-instructions{display:block}.uploader-inline p{font-size:12px}.uploader-inline .media-progress-bar{display:none}.uploading.uploader-inline .media-progress-bar{display:block}.uploader-inline .browser{display:inline-block!important}.media-selection{position:absolute;top:0;left:0;right:350px;height:60px;padding:0 0 0 16px;overflow:hidden;white-space:nowrap}.media-selection .selection-info{display:inline-block;font-size:12px;height:60px;margin-right:10px;vertical-align:top}.media-selection.editing,.media-selection.empty,.media-selection.one .edit-selection{display:none}.media-selection .count{display:block;padding-top:12px;font-size:14px;line-height:20px;font-weight:700}.media-selection .selection-info a{display:block;float:left;padding:1px 8px;margin:1px 8px 1px -8px;line-height:16px;text-decoration:none;border-right:1px solid #dfdfdf;color:#21759B}.media-selection .selection-info a:hover{background:#21759B;color:#fff;border-color:transparent}.media-selection .selection-info a:last-child{border-right:0;margin-right:0}.media-selection .selection-info .clear-selection{color:red}.media-selection .selection-info .clear-selection:hover{background:red}.media-selection .selection-view{display:inline-block;vertical-align:top}.media-selection .attachments{display:inline-block;height:48px;margin-top:5px;overflow:hidden;vertical-align:top}.media-selection .attachment .icon{width:50%}.attachment.selection.selected{-webkit-box-shadow:none;box-shadow:none}.attachment.selection.details{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 4px #1e8cbe;box-shadow:0 0 0 1px #fff,0 0 0 4px #1e8cbe}.media-selection .attachment.selection.details{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #1e8cbe;box-shadow:0 0 0 1px #fff,0 0 0 3px #1e8cbe}.media-selection:after{content:'';display:block;position:absolute;top:0;right:0;bottom:0;width:25px;background-image:-webkit-gradient(linear,right top,left top,from(rgba(255,255,255,1)),to(rgba(255,255,255,0)));background-image:-webkit-linear-gradient(right,rgba(255,255,255,1),rgba(255,255,255,0));background-image:linear-gradient(to left,rgba(255,255,255,1),rgba(255,255,255,0))}.media-selection .attachment .filename{display:none}.media-frame .spinner{background:url(../images/spinner.gif) no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px;display:none;opacity:.7;filter:alpha(opacity=70);width:20px;height:20px;margin:0}.media-toolbar .spinner{margin-top:14px}.media-sidebar .settings-save-status{background:#f5f5f5;float:right;text-transform:none;z-index:10}.media-sidebar .settings-save-status .spinner{margin:0 5px}.media-sidebar .settings-save-status .saved{float:right;display:none}.media-sidebar .save-complete .settings-save-status .saved,.media-sidebar .save-waiting .settings-save-status .spinner{display:block}.attachment-details{position:relative;overflow:auto}.attachment-info{overflow:hidden;min-height:60px;margin-bottom:16px;line-height:18px;color:#666;border-bottom:1px solid #ddd;padding-bottom:11px}.attachment-info .filename{font-weight:700;color:#464646;word-wrap:break-word}.attachment-info .thumbnail{position:relative;float:left;max-width:120px;max-height:120px;margin-top:5px;margin-right:10px;margin-bottom:5px}.uploading .attachment-info .thumbnail{width:120px;height:80px;-webkit-box-shadow:inset 0 0 15px rgba(0,0,0,.1);box-shadow:inset 0 0 15px rgba(0,0,0,.1)}.uploading .attachment-info .media-progress-bar{margin-top:35px}.attachment-info .thumbnail:after{content:'';display:block;position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:inset 0 0 0 1px rgba(0,0,0,.15);box-shadow:inset 0 0 0 1px rgba(0,0,0,.15);overflow:hidden}.attachment-info .thumbnail img{display:block;max-width:120px;max-height:120px;margin:0 auto}.attachment-info .details{float:left;font-size:12px;max-width:100%}.attachment-info .delete-attachment,.attachment-info .edit-attachment,.attachment-info .refresh-attachment,.attachment-info .trash-attachment{display:block;text-decoration:none;white-space:nowrap}.attachment-details.needs-refresh .attachment-info .edit-attachment,.attachment-info .refresh-attachment{display:none}.attachment-details.needs-refresh .attachment-info .refresh-attachment,.attachment-info .edit-attachment{display:block}.attachment-info .delete-attachment,.attachment-info .trash-attachment{color:#bc0b0b}.attachment-info .delete-attachment:hover,.attachment-info .trash-attachment:hover{color:red}.attachment-display-settings{width:100%;float:left;overflow:hidden}.attachment-display-settings h4{margin:1.4em 0 .4em}.collection-settings{overflow:hidden}.collection-settings .setting input[type=checkbox]{float:left;margin-right:8px}.collection-settings .setting span{min-width:inherit}.media-frame .imgedit-wrap{position:static}.media-frame .imgedit-wait{height:auto!important;right:0;bottom:0;left:0}.media-frame .imgedit-wrap .imgedit-panel-content{padding:16px;position:absolute;top:0;right:282px;bottom:0;left:0;overflow:auto}.media-frame .imgedit-wrap .imgedit-settings{background:#f3f3f3;border-left:1px solid #ddd;padding:0 16px 16px;position:absolute;top:0;right:0;bottom:0;width:250px;overflow:auto}.media-frame .imgedit-group{background:0 0;border:0;border-bottom:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none;margin:0;margin-bottom:16px;padding:0;padding-bottom:16px}.media-frame .imgedit-group:last-of-type{border:0;margin:0;padding:0}.media-frame .imgedit-group-top h3{text-transform:uppercase;font-size:12px;color:#666;margin:0;margin-top:24px}.media-frame .imgedit-group-top h3 a{text-decoration:none;color:#666}.media-frame .imgedit-help-toggle{margin-top:-2px;cursor:pointer;color:#666}.media-frame .imgedit-help-toggled span.dashicons:before{content:'\f142'}.media-frame .imgedit-group img{margin-top:5px}.media-frame .imgedit-wrap div.updated{margin:0;margin-bottom:16px}.embed-url{display:block;position:relative;padding:16px;margin:0;z-index:250;background:#fff;font-size:18px}.media-frame .embed-url input{font-size:18px;padding:12px 14px;width:100%;min-width:200px;-webkit-box-shadow:inset 2px 2px 4px -2px rgba(0,0,0,.1);box-shadow:inset 2px 2px 4px -2px rgba(0,0,0,.1)}.media-frame .embed-url .spinner{position:absolute;top:16px;right:26px}.media-frame .embed-loading .embed-url .spinner{display:block}.embed-link-settings,.embed-media-settings{position:absolute;top:60px;left:0;right:0;bottom:0;padding:16px 16px 32px;overflow:auto}.image-details .media-modal{left:140px;right:140px}.image-details .media-frame-menu{display:none}.image-details .media-frame-content,.image-details .media-frame-router,.image-details .media-frame-title{left:0}.image-details .embed-media-settings{top:0;overflow:visible;padding:0}.image-details .column-settings{background:#f3f3f3;border-right:1px solid #ddd;min-height:100%;width:52%;position:absolute;top:0;left:0}.image-details .column-settings h3{margin:20px;padding-top:20px;border-top:1px solid #ddd}.image-details .column-image{width:48%;position:absolute;left:52%;top:0}.image-details .image{margin:20px}.image-details .image img{max-width:100%;max-height:500px}.image-details .advanced-toggle{color:#666;text-decoration:none;display:block}.image-details .advanced-toggle::after{font:400 20px/1 dashicons;speak:none;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:'\f140';display:inline-block;margin-top:-2px}.image-details .advanced-visible .advanced-toggle::after{content:'\f142';margin-top:0}.image-details .embed-media-settings .size{margin-bottom:4px}.image-details .custom-size span{display:block}.image-details .custom-size label{display:block;float:left}.image-details .custom-size span small{color:#999;font-size:inherit}.image-details .custom-size input{width:5em}.image-details .custom-size .sep{float:left;margin:26px 6px 0}.image-details .custom-size::after{content:'';display:table;clear:both}.media-embed .thumbnail{max-width:100%;max-height:200px;position:relative;float:left}.media-embed .thumbnail img{max-height:200px;display:block}.media-embed .thumbnail:after{content:'';display:block;position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);overflow:hidden}.media-embed .setting{width:100%;margin:10px 0;float:left;display:block;clear:both}.image-details .embed-media-settings .setting{float:none;width:auto}.image-details .actions{margin:10px 0}.image-details .hidden{display:none}.media-embed .setting input[type=text],.media-embed .setting textarea{display:block;width:100%;max-width:400px;margin:1px 0}.image-details .embed-media-settings .setting input[type=text],.image-details .embed-media-settings .setting textarea{max-width:inherit;width:70%}.image-details .embed-media-settings .custom-size,.image-details .embed-media-settings .link-target,.image-details .embed-media-settings .setting input.link-to-custom{margin-left:27%;width:70%}.image-details .embed-media-settings .link-target{margin-top:24px}.media-embed .setting input.hidden,.media-embed .setting textarea.hidden{display:none}.media-embed .setting span{display:block;width:200px;font-size:13px;line-height:24px;color:#666}.image-details .embed-media-settings .setting span{float:left;width:25%;text-align:right;margin:8px 1% 0;line-height:1.1}.media-embed .setting .button-group{margin:2px 0}.media-embed-sidebar{position:absolute;top:0;left:440px}.advanced-section,.link-settings{margin-top:10px}#wp-fullscreen-body .uploader-editor,.wp-editor-wrap .uploader-editor{background:rgba(150,150,150,.9);position:absolute;top:0;left:0;width:100%;height:100%;z-index:99998;display:none;text-align:center}#wp-fullscreen-body .uploader-editor{background:rgba(0,86,132,.9);position:fixed;z-index:100050}.wp-editor-wrap.wp-fullscreen-wrap .uploader-editor{opacity:0}#wp-fullscreen-body .uploader-editor-content,.wp-editor-wrap .uploader-editor-content{border:1px dashed #fff;position:absolute;top:10px;left:10px;right:10px;bottom:10px}#wp-fullscreen-body .uploader-editor .uploader-editor-title,.wp-editor-wrap .uploader-editor .uploader-editor-title{position:absolute;top:50%;left:0;right:0;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);font-size:3em;line-height:1.3;font-weight:700;color:#fff;padding:0;margin:0;display:none}.wp-editor-wrap .uploader-editor.droppable{background:rgba(0,86,132,.9)}#wp-fullscreen-body .uploader-editor .uploader-editor-title,.wp-editor-wrap .uploader-editor.droppable .uploader-editor-title{display:block}.ie7 .media-frame .attachments-browser{position:static}.ie7 .media-frame .embed-url input{margin-top:4px;width:90%}.ie7 .compat-item{width:99%}.ie7 .attachment-display-settings{width:auto}.ie7 .attachment-preview,.ie7 .attachment-preview .thumbnail{width:120px;height:120px}.ie7 .media-frame .attachment .describe{width:102px}.ie7 .media-sidebar .setting select{max-width:55%}.ie7 .media-sidebar .setting input,.ie7 .media-sidebar .setting textarea{width:55%}.ie7 .media-sidebar .setting .link-to-custom{float:left}.rtl .media-frame,.rtl .media-frame .search,.rtl .media-frame input[type=email],.rtl .media-frame input[type=number],.rtl .media-frame input[type=password],.rtl .media-frame input[type=search],.rtl .media-frame input[type=text],.rtl .media-frame input[type=url],.rtl .media-frame select,.rtl .media-frame textarea,.rtl .media-modal{font-family:Tahoma,sans-serif}:lang(he-il) .rtl .media-frame,:lang(he-il) .rtl .media-frame .search,:lang(he-il) .rtl .media-frame input[type=email],:lang(he-il) .rtl .media-frame input[type=number],:lang(he-il) .rtl .media-frame input[type=password],:lang(he-il) .rtl .media-frame input[type=search],:lang(he-il) .rtl .media-frame input[type=text],:lang(he-il) .rtl .media-frame input[type=url],:lang(he-il) .rtl .media-frame select,:lang(he-il) .rtl .media-frame textarea,:lang(he-il) .rtl .media-modal{font-family:Arial,sans-serif}@media only screen and (max-width:960px){.media-frame-content .media-toolbar-primary .search,.media-frame-content .media-toolbar-secondary .attachment-filters{max-width:120px}}@media only screen and (max-width:900px){.media-frame-menu{width:139px}.media-menu>a{padding:4px 5px}.media-frame-content,.media-frame-router,.media-frame-title,.media-frame-toolbar{left:140px}.media-sidebar{width:159px;padding:0 10px 24px}.attachments-browser .attachments,.attachments-browser .media-toolbar,.attachments-browser .uploader-inline{right:180px}.compat-item label span,.media-sidebar .setting input,.media-sidebar .setting span,.media-sidebar .setting textarea{float:none}.compat-item label span,.media-sidebar .setting span{text-align:inherit;display:block;min-height:16px;margin:0;padding:8px 2px 0}.media-sidebar .setting input,.media-sidebar .setting select,.media-sidebar .setting textarea{width:98%;max-width:none}.media-sidebar .setting select.columns{width:auto}.media-frame .search,.media-frame input,.media-frame textarea{padding:3px 6px}.media-frame-content .attachment .icon{top:40%}.image-details .media-modal{left:30px;right:30px}.image-details .embed-media-settings .setting{margin:20px}.image-details .embed-media-settings .setting span{float:none;text-align:left;width:100%;margin-bottom:4px}.image-details .embed-media-settings .setting input.link-to-custom,.image-details .embed-media-settings .setting input[type=text],.image-details .embed-media-settings .setting textarea{width:100%;margin-left:0}.image-details .embed-media-settings .custom-size{margin-left:20px}.media-selection{min-width:120px}.media-selection:after{background:0 0}.media-selection .attachments{display:none}.media-menu .separator{margin:12px 10px}.media-modal-close{right:10px}.media-frame input[type=email],.media-frame input[type=number],.media-frame input[type=password],.media-frame input[type=search],.media-frame input[type=text],.media-frame input[type=url],.media-frame select,.media-frame textarea{font-size:16px}}@media only screen and (max-width:640px),screen and (max-height:400px){.media-frame-content .media-toolbar .instructions{display:none}.media-frame-menu{width:auto;bottom:auto;right:0;height:60px}.media-menu{border-right:0;position:relative;border-bottom:1px solid #ddd;overflow:hidden;padding:10px 0 10px 10px}.media-menu a{float:left;width:42%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.media-frame-title{display:none}.image-details .media-frame-title{display:block;top:0;font-size:14px}.media-frame-toolbar{position:absolute;bottom:0;left:0;right:0;background:#FFF;border-top:1px solid #DEDEDE}.media-toolbar{position:relative}.media-frame{overflow:hidden}.attachments-browser .attachments{top:42px}.attachment-details h3{margin-top:45px}.media-menu a:last-child,.media-menu a:nth-child(2){width:40%}.media-menu .separator{display:none}.media-frame-title{top:72px;left:auto;height:auto}.media-frame-title h1{line-height:3;font-size:18px}.media-frame-router{top:84px;left:0}.media-frame-content{left:0;top:118px}.image-details .media-frame.hide-router .media-frame-content{top:40px}.media-frame .attachments-browser{padding-bottom:300px}.media-sidebar{border-bottom:1px solid #ddd}.media-modal{width:auto}.media-toolbar-primary,.media-toolbar-secondary{height:auto}.uploader-inline h3{margin:0 0 .8em}.uploader-inline-content{top:auto}.uploader-inline-content .upload-ui{margin:0}.attachments-browser .attachments,.attachments-browser .uploader-inline{position:relative;margin-right:180px}.image-details .media-modal,.media-modal{position:fixed;top:0;left:0;right:0;bottom:0}.media-modal-backdrop{position:fixed}.attachments-browser .attachment,.attachments-browser .attachment-preview{max-width:100%}.attachments-browser .media-toolbar-primary input.search{max-width:150px}.uploader-inline-content{position:relative}.media-sidebar .field input[type=checkbox],.media-sidebar .setting input[type=checkbox]{width:25px}.embed-link-settings,.embed-media-settings{padding-bottom:52px}.image-details .column-image,.image-details .column-settings{position:relative;padding:10px 0 20px;left:0;width:100%;min-height:inherit}.media-frame.hide-router .media-frame-content{top:73px;border-top:0}.collection-settings h3{margin-top:45px}}@media screen and (max-height:400px){.media-menu{padding:0 0 0 10px}.media-menu a{float:left;width:21%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;padding:10px inherit}.media-menu a:last-child,.media-menu a:nth-child(2){width:21%}.media-modal-close{top:2px}.media-frame-router{top:44px}.media-frame-content{top:78px}.attachments-browser .attachments{top:2px}.embed-link-settings{overflow:visible}}@media only screen and (max-width:680px){.media-frame-content .media-toolbar .attachment-filters,.media-frame-content .media-toolbar .search{max-width:85px}}@media print,(-o-min-device-pixel-ratio:5/4),(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.media-modal-icon{background-image:url(../images/uploader-icons-2x.png);-webkit-background-size:134px 15px;background-size:134px 15px}.media-frame .spinner{background-image:url(../images/spinner-2x.gif)}} \ No newline at end of file diff --git a/wp-includes/css/wp-auth-check-rtl.css b/wp-includes/css/wp-auth-check-rtl.css new file mode 100644 index 0000000..568fa74 --- /dev/null +++ b/wp-includes/css/wp-auth-check-rtl.css @@ -0,0 +1,100 @@ +/*------------------------------------------------------------------------------ + Interim login dialog +------------------------------------------------------------------------------*/ + +#wp-auth-check-wrap.hidden { + display: none; +} + +#wp-auth-check-wrap #wp-auth-check-bg { + position: fixed; + top: 0; + bottom: 0; + right: 0; + left: 0; + background: #000; + opacity: 0.7; + filter: alpha(opacity=70); + z-index: 1000010; /* needs to appear above .notification-dialog */ +} + +#wp-auth-check-wrap #wp-auth-check { + position: fixed; + right: 50%; + overflow: hidden; + top: 40px; + bottom: 20px; + max-height: 415px; + width: 380px; + margin: 0 -190px 0 0; + padding: 30px 0 0; + background-color: #eee; + z-index: 1000011; /* needs to appear above #wp-auth-check-bg */ + -webkit-box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); + box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); +} + +#wp-auth-check-wrap.fallback #wp-auth-check { + max-height: 180px; + overflow: auto; +} + +#wp-auth-check-wrap #wp-auth-check-form { + background: url(../images/wpspin-2x.gif) no-repeat center center; + -webkit-background-size: 16px 16px; + background-size: 16px 16px; + height: 100%; +} + +#wp-auth-check-wrap #wp-auth-check-form iframe { + height: 100%; + width: 100%; + overflow: auto; +} + +#wp-auth-check-wrap .wp-auth-check-close { + position: absolute; + top: 8px; + left: 8px; + height: 22px; + width: 22px; + cursor: pointer; +} + +#wp-auth-check-wrap .wp-auth-check-close:before { + content: '\f158'; + display: block !important; + font: normal 20px/1 'dashicons'; + speak: none; + height: 22px; + margin: 2px 0; + text-align: center; + width: 22px; + color: #777; + -webkit-font-smoothing: antialiased !important; + -moz-osx-font-smoothing: grayscale; +} + +#wp-auth-check-wrap .wp-auth-check-close:hover:before { + color: #0074a2; +} + +#wp-auth-check-wrap .wp-auth-check-close:focus { + outline: 1px dotted #888; +} + +#wp-auth-check-wrap .wp-auth-fallback-expired { + outline: 0; +} + +#wp-auth-check-wrap .wp-auth-fallback { + font-size: 14px; + line-height: 21px; + padding: 0 25px; + display: none; +} + +#wp-auth-check-wrap.fallback .wp-auth-fallback, +#wp-auth-check-wrap.fallback .wp-auth-check-close { + display: block; +} diff --git a/wp-includes/css/wp-auth-check-rtl.min.css b/wp-includes/css/wp-auth-check-rtl.min.css new file mode 100644 index 0000000..fc2e393 --- /dev/null +++ b/wp-includes/css/wp-auth-check-rtl.min.css @@ -0,0 +1 @@ +#wp-auth-check-wrap.hidden{display:none}#wp-auth-check-wrap #wp-auth-check-bg{position:fixed;top:0;bottom:0;right:0;left:0;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:1000010}#wp-auth-check-wrap #wp-auth-check{position:fixed;right:50%;overflow:hidden;top:40px;bottom:20px;max-height:415px;width:380px;margin:0 -190px 0 0;padding:30px 0 0;background-color:#eee;z-index:1000011;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3)}#wp-auth-check-wrap.fallback #wp-auth-check{max-height:180px;overflow:auto}#wp-auth-check-wrap #wp-auth-check-form{background:url(../images/wpspin-2x.gif) no-repeat center center;-webkit-background-size:16px 16px;background-size:16px 16px;height:100%}#wp-auth-check-wrap #wp-auth-check-form iframe{height:100%;width:100%;overflow:auto}#wp-auth-check-wrap .wp-auth-check-close{position:absolute;top:8px;left:8px;height:22px;width:22px;cursor:pointer}#wp-auth-check-wrap .wp-auth-check-close:before{content:'\f158';display:block!important;font:400 20px/1 dashicons;speak:none;height:22px;margin:2px 0;text-align:center;width:22px;color:#777;-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale}#wp-auth-check-wrap .wp-auth-check-close:hover:before{color:#0074a2}#wp-auth-check-wrap .wp-auth-check-close:focus{outline:1px dotted #888}#wp-auth-check-wrap .wp-auth-fallback-expired{outline:0}#wp-auth-check-wrap .wp-auth-fallback{font-size:14px;line-height:21px;padding:0 25px;display:none}#wp-auth-check-wrap.fallback .wp-auth-check-close,#wp-auth-check-wrap.fallback .wp-auth-fallback{display:block} \ No newline at end of file diff --git a/wp-includes/css/wp-auth-check.css b/wp-includes/css/wp-auth-check.css new file mode 100644 index 0000000..cd42ed9 --- /dev/null +++ b/wp-includes/css/wp-auth-check.css @@ -0,0 +1,100 @@ +/*------------------------------------------------------------------------------ + Interim login dialog +------------------------------------------------------------------------------*/ + +#wp-auth-check-wrap.hidden { + display: none; +} + +#wp-auth-check-wrap #wp-auth-check-bg { + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; + background: #000; + opacity: 0.7; + filter: alpha(opacity=70); + z-index: 1000010; /* needs to appear above .notification-dialog */ +} + +#wp-auth-check-wrap #wp-auth-check { + position: fixed; + left: 50%; + overflow: hidden; + top: 40px; + bottom: 20px; + max-height: 415px; + width: 380px; + margin: 0 0 0 -190px; + padding: 30px 0 0; + background-color: #eee; + z-index: 1000011; /* needs to appear above #wp-auth-check-bg */ + -webkit-box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); + box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); +} + +#wp-auth-check-wrap.fallback #wp-auth-check { + max-height: 180px; + overflow: auto; +} + +#wp-auth-check-wrap #wp-auth-check-form { + background: url(../images/wpspin-2x.gif) no-repeat center center; + -webkit-background-size: 16px 16px; + background-size: 16px 16px; + height: 100%; +} + +#wp-auth-check-wrap #wp-auth-check-form iframe { + height: 100%; + width: 100%; + overflow: auto; +} + +#wp-auth-check-wrap .wp-auth-check-close { + position: absolute; + top: 8px; + right: 8px; + height: 22px; + width: 22px; + cursor: pointer; +} + +#wp-auth-check-wrap .wp-auth-check-close:before { + content: '\f158'; + display: block !important; + font: normal 20px/1 'dashicons'; + speak: none; + height: 22px; + margin: 2px 0; + text-align: center; + width: 22px; + color: #777; + -webkit-font-smoothing: antialiased !important; + -moz-osx-font-smoothing: grayscale; +} + +#wp-auth-check-wrap .wp-auth-check-close:hover:before { + color: #0074a2; +} + +#wp-auth-check-wrap .wp-auth-check-close:focus { + outline: 1px dotted #888; +} + +#wp-auth-check-wrap .wp-auth-fallback-expired { + outline: 0; +} + +#wp-auth-check-wrap .wp-auth-fallback { + font-size: 14px; + line-height: 21px; + padding: 0 25px; + display: none; +} + +#wp-auth-check-wrap.fallback .wp-auth-fallback, +#wp-auth-check-wrap.fallback .wp-auth-check-close { + display: block; +} diff --git a/wp-includes/css/wp-auth-check.min.css b/wp-includes/css/wp-auth-check.min.css new file mode 100644 index 0000000..2b01fbb --- /dev/null +++ b/wp-includes/css/wp-auth-check.min.css @@ -0,0 +1 @@ +#wp-auth-check-wrap.hidden{display:none}#wp-auth-check-wrap #wp-auth-check-bg{position:fixed;top:0;bottom:0;left:0;right:0;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:1000010}#wp-auth-check-wrap #wp-auth-check{position:fixed;left:50%;overflow:hidden;top:40px;bottom:20px;max-height:415px;width:380px;margin:0 0 0 -190px;padding:30px 0 0;background-color:#eee;z-index:1000011;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3)}#wp-auth-check-wrap.fallback #wp-auth-check{max-height:180px;overflow:auto}#wp-auth-check-wrap #wp-auth-check-form{background:url(../images/wpspin-2x.gif) no-repeat center center;-webkit-background-size:16px 16px;background-size:16px 16px;height:100%}#wp-auth-check-wrap #wp-auth-check-form iframe{height:100%;width:100%;overflow:auto}#wp-auth-check-wrap .wp-auth-check-close{position:absolute;top:8px;right:8px;height:22px;width:22px;cursor:pointer}#wp-auth-check-wrap .wp-auth-check-close:before{content:'\f158';display:block!important;font:400 20px/1 dashicons;speak:none;height:22px;margin:2px 0;text-align:center;width:22px;color:#777;-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale}#wp-auth-check-wrap .wp-auth-check-close:hover:before{color:#0074a2}#wp-auth-check-wrap .wp-auth-check-close:focus{outline:1px dotted #888}#wp-auth-check-wrap .wp-auth-fallback-expired{outline:0}#wp-auth-check-wrap .wp-auth-fallback{font-size:14px;line-height:21px;padding:0 25px;display:none}#wp-auth-check-wrap.fallback .wp-auth-check-close,#wp-auth-check-wrap.fallback .wp-auth-fallback{display:block} \ No newline at end of file diff --git a/wp-includes/css/wp-pointer-rtl.css b/wp-includes/css/wp-pointer-rtl.css new file mode 100644 index 0000000..10cf6a2 --- /dev/null +++ b/wp-includes/css/wp-pointer-rtl.css @@ -0,0 +1,210 @@ +.wp-pointer-content { + padding: 0 0 10px; + position: relative; + font-size: 13px; + background: #fff; + border: 1px solid #dfdfdf; + -webkit-box-shadow: 0 3px 6px rgba(0,0,0,0.075); + box-shadow: 0 3px 6px rgba(0,0,0,0.075); +} + +.wp-pointer-content h3 { + position: relative; + margin: -1px -1px 5px; + padding: 15px 60px 14px 18px; + border: 1px solid #3592b6; + border-bottom: none; + line-height: 1.4em; + font-size: 14px; + color: #fff; + background: #2ea2cc; +} + +.wp-pointer-content h3:before { + background: #fff; + -webkit-border-radius: 50%; + border-radius: 50%; + color: #2ea2cc; + content: '\f227'; + font: normal 20px/1.6 'dashicons'; + position: absolute; + top: 8px; + right: 15px; + speak: none; + text-align: center; + width: 32px; + height: 32px; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.wp-pointer-content p { + padding: 0 15px; +} + +.wp-pointer-buttons { + margin: 0; + padding: 5px 15px; + overflow: auto; +} + +.wp-pointer-buttons a { + float: left; + display: inline-block; + text-decoration: none; +} + +.wp-pointer-buttons a.close { + padding-right: 3px; + position: relative; +} + +.wp-pointer-buttons a.close:before { + background: none; + color: #bbb; + content: '\f153'; + display: block !important; + font: normal 13px/1 'dashicons'; + speak: none; + margin: 1px 0; + text-align: center; + -webkit-font-smoothing: antialiased !important; + width: 10px; + height: 100%; + position: absolute; + right: -12px; + top: 1px; +} + +.wp-pointer-buttons a.close:hover:before { + color: #c00; +} + +/* The arrow base class must take up no space, even with transparent borders. */ +.wp-pointer-arrow, +.wp-pointer-arrow-inner { + position: absolute; + width: 0; + height: 0; +} + +.wp-pointer-arrow { + z-index: 10; + width: 0; + height: 0; + border: 0 solid transparent; +} + +.wp-pointer-arrow-inner { + z-index: 20; +} + +/* Make Room for the Arrow! */ +.wp-pointer-top, +.wp-pointer-undefined { + padding-top: 13px; +} + +.wp-pointer-bottom { + padding-bottom: 13px; +} + +/* @noflip */ +.wp-pointer-left { + padding-left: 13px; +} +/* @noflip */ +.wp-pointer-right { + padding-right: 13px; +} + +/* Base Size & Positioning */ +.wp-pointer-top .wp-pointer-arrow, +.wp-pointer-bottom .wp-pointer-arrow, +.wp-pointer-undefined .wp-pointer-arrow { + right: 50px; +} + +.wp-pointer-left .wp-pointer-arrow, +.wp-pointer-right .wp-pointer-arrow { + top: 50%; + margin-top: -15px; +} + +/* Arrow Sprite */ +.wp-pointer-top .wp-pointer-arrow, +.wp-pointer-undefined .wp-pointer-arrow { + top: 0; + border-width: 0 13px 13px 13px; + border-bottom-color: #3592b6; +} + +.wp-pointer-top .wp-pointer-arrow:before, +.wp-pointer-undefined .wp-pointer-arrow:before { + margin-right: -13px; + margin-top: -11px; + border: 13px solid transparent; + border-bottom-color: #2ea2cc; + display: block; + content: ' '; +} + +.wp-pointer-bottom .wp-pointer-arrow { + bottom: 0; + border-width: 13px 13px 0 13px; + border-top-color: #ccc; +} + +.wp-pointer-bottom .wp-pointer-arrow:before { + margin-right: -13px; + margin-top: -14px; + border: 13px solid transparent; + border-top-color: #fff; + display: block; + content: ' '; +} + +/* @noflip */ +.wp-pointer-left .wp-pointer-arrow { + left: 0; + border-width: 13px 13px 13px 0; + border-right-color: #ccc; +} + +.wp-pointer-left .wp-pointer-arrow:before { + margin-right: -12px; + margin-top: -13px; + border: 13px solid transparent; + border-left-color: #fff; + display: block; + content: ' '; +} + +/* @noflip */ +.wp-pointer-right .wp-pointer-arrow { + right:0; + border-width: 13px 0 13px 13px; + border-left-color: #ccc; +} + +.wp-pointer-right .wp-pointer-arrow:before { + margin-right: -12px; + margin-top: -13px; + border: 13px solid transparent; + border-right-color: #fff; + display: block; + content: ' '; +} + +.rtl .wp-pointer-arrow:before { + -webkit-transform: rotateY(180deg); + -ms-transform: rotateY(180deg); + transform: rotateY(180deg); +} + +/* Disable pointers at responsive sizes */ +@media screen and ( max-width: 782px ) { + .wp-pointer { + display: none; + } +} diff --git a/wp-includes/css/wp-pointer-rtl.min.css b/wp-includes/css/wp-pointer-rtl.min.css new file mode 100644 index 0000000..b5fbcdb --- /dev/null +++ b/wp-includes/css/wp-pointer-rtl.min.css @@ -0,0 +1 @@ +.wp-pointer-content{padding:0 0 10px;position:relative;font-size:13px;background:#fff;border:1px solid #dfdfdf;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.075);box-shadow:0 3px 6px rgba(0,0,0,.075)}.wp-pointer-content h3{position:relative;margin:-1px -1px 5px;padding:15px 60px 14px 18px;border:1px solid #3592b6;border-bottom:0;line-height:1.4em;font-size:14px;color:#fff;background:#2ea2cc}.wp-pointer-content h3:before{background:#fff;-webkit-border-radius:50%;border-radius:50%;color:#2ea2cc;content:'\f227';font:400 20px/1.6 dashicons;position:absolute;top:8px;right:15px;speak:none;text-align:center;width:32px;height:32px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wp-pointer-content p{padding:0 15px}.wp-pointer-buttons{margin:0;padding:5px 15px;overflow:auto}.wp-pointer-buttons a{float:left;display:inline-block;text-decoration:none}.wp-pointer-buttons a.close{padding-right:3px;position:relative}.wp-pointer-buttons a.close:before{background:0 0;color:#bbb;content:'\f153';display:block!important;font:400 13px/1 dashicons;speak:none;margin:1px 0;text-align:center;-webkit-font-smoothing:antialiased!important;width:10px;height:100%;position:absolute;right:-12px;top:1px}.wp-pointer-buttons a.close:hover:before{color:#c00}.wp-pointer-arrow,.wp-pointer-arrow-inner{position:absolute;width:0;height:0}.wp-pointer-arrow{z-index:10;width:0;height:0;border:0 solid transparent}.wp-pointer-arrow-inner{z-index:20}.wp-pointer-top,.wp-pointer-undefined{padding-top:13px}.wp-pointer-bottom{padding-bottom:13px}.wp-pointer-left{padding-left:13px}.wp-pointer-right{padding-right:13px}.wp-pointer-bottom .wp-pointer-arrow,.wp-pointer-top .wp-pointer-arrow,.wp-pointer-undefined .wp-pointer-arrow{right:50px}.wp-pointer-left .wp-pointer-arrow,.wp-pointer-right .wp-pointer-arrow{top:50%;margin-top:-15px}.wp-pointer-top .wp-pointer-arrow,.wp-pointer-undefined .wp-pointer-arrow{top:0;border-width:0 13px 13px;border-bottom-color:#3592b6}.wp-pointer-top .wp-pointer-arrow:before,.wp-pointer-undefined .wp-pointer-arrow:before{margin-right:-13px;margin-top:-11px;border:13px solid transparent;border-bottom-color:#2ea2cc;display:block;content:' '}.wp-pointer-bottom .wp-pointer-arrow{bottom:0;border-width:13px 13px 0;border-top-color:#ccc}.wp-pointer-bottom .wp-pointer-arrow:before{margin-right:-13px;margin-top:-14px;border:13px solid transparent;border-top-color:#fff;display:block;content:' '}.wp-pointer-left .wp-pointer-arrow{left:0;border-width:13px 13px 13px 0;border-right-color:#ccc}.wp-pointer-left .wp-pointer-arrow:before{margin-right:-12px;margin-top:-13px;border:13px solid transparent;border-left-color:#fff;display:block;content:' '}.wp-pointer-right .wp-pointer-arrow{right:0;border-width:13px 0 13px 13px;border-left-color:#ccc}.wp-pointer-right .wp-pointer-arrow:before{margin-right:-12px;margin-top:-13px;border:13px solid transparent;border-right-color:#fff;display:block;content:' '}.rtl .wp-pointer-arrow:before{-webkit-transform:rotateY(180deg);-ms-transform:rotateY(180deg);transform:rotateY(180deg)}@media screen and (max-width:782px){.wp-pointer{display:none}} \ No newline at end of file diff --git a/wp-includes/css/wp-pointer.css b/wp-includes/css/wp-pointer.css new file mode 100644 index 0000000..dbf09b6 --- /dev/null +++ b/wp-includes/css/wp-pointer.css @@ -0,0 +1,210 @@ +.wp-pointer-content { + padding: 0 0 10px; + position: relative; + font-size: 13px; + background: #fff; + border: 1px solid #dfdfdf; + -webkit-box-shadow: 0 3px 6px rgba(0,0,0,0.075); + box-shadow: 0 3px 6px rgba(0,0,0,0.075); +} + +.wp-pointer-content h3 { + position: relative; + margin: -1px -1px 5px; + padding: 15px 18px 14px 60px; + border: 1px solid #3592b6; + border-bottom: none; + line-height: 1.4em; + font-size: 14px; + color: #fff; + background: #2ea2cc; +} + +.wp-pointer-content h3:before { + background: #fff; + -webkit-border-radius: 50%; + border-radius: 50%; + color: #2ea2cc; + content: '\f227'; + font: normal 20px/1.6 'dashicons'; + position: absolute; + top: 8px; + left: 15px; + speak: none; + text-align: center; + width: 32px; + height: 32px; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.wp-pointer-content p { + padding: 0 15px; +} + +.wp-pointer-buttons { + margin: 0; + padding: 5px 15px; + overflow: auto; +} + +.wp-pointer-buttons a { + float: right; + display: inline-block; + text-decoration: none; +} + +.wp-pointer-buttons a.close { + padding-left: 3px; + position: relative; +} + +.wp-pointer-buttons a.close:before { + background: none; + color: #bbb; + content: '\f153'; + display: block !important; + font: normal 13px/1 'dashicons'; + speak: none; + margin: 1px 0; + text-align: center; + -webkit-font-smoothing: antialiased !important; + width: 10px; + height: 100%; + position: absolute; + left: -12px; + top: 1px; +} + +.wp-pointer-buttons a.close:hover:before { + color: #c00; +} + +/* The arrow base class must take up no space, even with transparent borders. */ +.wp-pointer-arrow, +.wp-pointer-arrow-inner { + position: absolute; + width: 0; + height: 0; +} + +.wp-pointer-arrow { + z-index: 10; + width: 0; + height: 0; + border: 0 solid transparent; +} + +.wp-pointer-arrow-inner { + z-index: 20; +} + +/* Make Room for the Arrow! */ +.wp-pointer-top, +.wp-pointer-undefined { + padding-top: 13px; +} + +.wp-pointer-bottom { + padding-bottom: 13px; +} + +/* @noflip */ +.wp-pointer-left { + padding-left: 13px; +} +/* @noflip */ +.wp-pointer-right { + padding-right: 13px; +} + +/* Base Size & Positioning */ +.wp-pointer-top .wp-pointer-arrow, +.wp-pointer-bottom .wp-pointer-arrow, +.wp-pointer-undefined .wp-pointer-arrow { + left: 50px; +} + +.wp-pointer-left .wp-pointer-arrow, +.wp-pointer-right .wp-pointer-arrow { + top: 50%; + margin-top: -15px; +} + +/* Arrow Sprite */ +.wp-pointer-top .wp-pointer-arrow, +.wp-pointer-undefined .wp-pointer-arrow { + top: 0; + border-width: 0 13px 13px 13px; + border-bottom-color: #3592b6; +} + +.wp-pointer-top .wp-pointer-arrow:before, +.wp-pointer-undefined .wp-pointer-arrow:before { + margin-left: -13px; + margin-top: -11px; + border: 13px solid transparent; + border-bottom-color: #2ea2cc; + display: block; + content: ' '; +} + +.wp-pointer-bottom .wp-pointer-arrow { + bottom: 0; + border-width: 13px 13px 0 13px; + border-top-color: #ccc; +} + +.wp-pointer-bottom .wp-pointer-arrow:before { + margin-left: -13px; + margin-top: -14px; + border: 13px solid transparent; + border-top-color: #fff; + display: block; + content: ' '; +} + +/* @noflip */ +.wp-pointer-left .wp-pointer-arrow { + left: 0; + border-width: 13px 13px 13px 0; + border-right-color: #ccc; +} + +.wp-pointer-left .wp-pointer-arrow:before { + margin-left: -12px; + margin-top: -13px; + border: 13px solid transparent; + border-right-color: #fff; + display: block; + content: ' '; +} + +/* @noflip */ +.wp-pointer-right .wp-pointer-arrow { + right:0; + border-width: 13px 0 13px 13px; + border-left-color: #ccc; +} + +.wp-pointer-right .wp-pointer-arrow:before { + margin-left: -12px; + margin-top: -13px; + border: 13px solid transparent; + border-left-color: #fff; + display: block; + content: ' '; +} + +.rtl .wp-pointer-arrow:before { + -webkit-transform: rotateY(180deg); + -ms-transform: rotateY(180deg); + transform: rotateY(180deg); +} + +/* Disable pointers at responsive sizes */ +@media screen and ( max-width: 782px ) { + .wp-pointer { + display: none; + } +} diff --git a/wp-includes/css/wp-pointer.min.css b/wp-includes/css/wp-pointer.min.css new file mode 100644 index 0000000..5e07975 --- /dev/null +++ b/wp-includes/css/wp-pointer.min.css @@ -0,0 +1 @@ +.wp-pointer-content{padding:0 0 10px;position:relative;font-size:13px;background:#fff;border:1px solid #dfdfdf;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.075);box-shadow:0 3px 6px rgba(0,0,0,.075)}.wp-pointer-content h3{position:relative;margin:-1px -1px 5px;padding:15px 18px 14px 60px;border:1px solid #3592b6;border-bottom:0;line-height:1.4em;font-size:14px;color:#fff;background:#2ea2cc}.wp-pointer-content h3:before{background:#fff;-webkit-border-radius:50%;border-radius:50%;color:#2ea2cc;content:'\f227';font:400 20px/1.6 dashicons;position:absolute;top:8px;left:15px;speak:none;text-align:center;width:32px;height:32px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wp-pointer-content p{padding:0 15px}.wp-pointer-buttons{margin:0;padding:5px 15px;overflow:auto}.wp-pointer-buttons a{float:right;display:inline-block;text-decoration:none}.wp-pointer-buttons a.close{padding-left:3px;position:relative}.wp-pointer-buttons a.close:before{background:0 0;color:#bbb;content:'\f153';display:block!important;font:400 13px/1 dashicons;speak:none;margin:1px 0;text-align:center;-webkit-font-smoothing:antialiased!important;width:10px;height:100%;position:absolute;left:-12px;top:1px}.wp-pointer-buttons a.close:hover:before{color:#c00}.wp-pointer-arrow,.wp-pointer-arrow-inner{position:absolute;width:0;height:0}.wp-pointer-arrow{z-index:10;width:0;height:0;border:0 solid transparent}.wp-pointer-arrow-inner{z-index:20}.wp-pointer-top,.wp-pointer-undefined{padding-top:13px}.wp-pointer-bottom{padding-bottom:13px}.wp-pointer-left{padding-left:13px}.wp-pointer-right{padding-right:13px}.wp-pointer-bottom .wp-pointer-arrow,.wp-pointer-top .wp-pointer-arrow,.wp-pointer-undefined .wp-pointer-arrow{left:50px}.wp-pointer-left .wp-pointer-arrow,.wp-pointer-right .wp-pointer-arrow{top:50%;margin-top:-15px}.wp-pointer-top .wp-pointer-arrow,.wp-pointer-undefined .wp-pointer-arrow{top:0;border-width:0 13px 13px;border-bottom-color:#3592b6}.wp-pointer-top .wp-pointer-arrow:before,.wp-pointer-undefined .wp-pointer-arrow:before{margin-left:-13px;margin-top:-11px;border:13px solid transparent;border-bottom-color:#2ea2cc;display:block;content:' '}.wp-pointer-bottom .wp-pointer-arrow{bottom:0;border-width:13px 13px 0;border-top-color:#ccc}.wp-pointer-bottom .wp-pointer-arrow:before{margin-left:-13px;margin-top:-14px;border:13px solid transparent;border-top-color:#fff;display:block;content:' '}.wp-pointer-left .wp-pointer-arrow{left:0;border-width:13px 13px 13px 0;border-right-color:#ccc}.wp-pointer-left .wp-pointer-arrow:before{margin-left:-12px;margin-top:-13px;border:13px solid transparent;border-right-color:#fff;display:block;content:' '}.wp-pointer-right .wp-pointer-arrow{right:0;border-width:13px 0 13px 13px;border-left-color:#ccc}.wp-pointer-right .wp-pointer-arrow:before{margin-left:-12px;margin-top:-13px;border:13px solid transparent;border-left-color:#fff;display:block;content:' '}.rtl .wp-pointer-arrow:before{-webkit-transform:rotateY(180deg);-ms-transform:rotateY(180deg);transform:rotateY(180deg)}@media screen and (max-width:782px){.wp-pointer{display:none}} \ No newline at end of file diff --git a/wp-includes/date.php b/wp-includes/date.php new file mode 100644 index 0000000..99bbb4e --- /dev/null +++ b/wp-includes/date.php @@ -0,0 +1,449 @@ +', '>=', '<', '<=', 'IN', 'NOT IN', + * 'BETWEEN', 'NOT BETWEEN'. + * @type string $relation Optional. The boolean relationship between the date queryies. + * Default 'OR'. Accepts 'OR', 'AND'. + * @type array { + * @type string|array $before Optional. Date to retrieve posts before. Accepts strtotime()-compatible + * string, or array of 'year', 'month', 'day' values. { + * + * @type string $year The four-digit year. Default empty. Accepts any four-digit year. + * @type string $month Optional when passing array.The month of the year. + * Default (string:empty)|(array:1). Accepts numbers 1-12. + * @type string $day Optional when passing array.The day of the month. + * Default (string:empty)|(array:1). Accepts numbers 1-31. + * } + * @type string|array $after Optional. Date to retrieve posts after. Accepts strtotime()-compatible + * string, or array of 'year', 'month', 'day' values. { + * + * @type string $year The four-digit year. Default empty. Accepts any four-digit year. + * @type string $month Optional when passing array.The month of the year. + * Default (string:empty)|(array:12). Accepts numbers 1-12. + * @type string $day Optional when passing array.The day of the month. + * Default (string:empty)|(array:last day of month). Accepts numbers 1-31. + * } + * @type string $column Optional. Used to add a clause comparing a column other than the column + * specified in the top-level $column paramater. Default is the value + * of top-level $column. Accepts 'post_date', 'post_date_gmt', + * 'post_modified', 'post_modified_gmt', 'comment_date', 'comment_date_gmt'. + * @type string $compare Optional. The comparison operator. Default '='. Accepts '=', '!=', + * '>', '>=', '<', '<=', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN'. + * @type bool $inclusive Optional. Include results from dates specified in 'before' or 'after'. + * Default. Accepts. + * @type int $year Optional. The four-digit year number. Default empty. Accepts any + * four-digit year. + * @type int $month Optional. The two-digit month number. Default empty. Accepts numbers 1-12. + * @type int $week Optional. The week number of the year. Default empty. Accepts numbers 0-53. + * @type int $dayofyear Optional. The day number of the year. Default empty. Accepts numbers 1-366. + * @type int $day Optional. The day of the month. Default empty. Accepts numbers 1-31. + * @type int $dayofweek Optional. The day number of the week. Default empty. Accepts numbers 1-7. + * @type int $hour Optional. The hour of the day. Default empty. Accepts numbers 0-23. + * @type int $minute Optional. The minute of the hour. Default empty. Accepts numbers 0-60. + * @type int $second Optional. The second of the minute. Default empty. Accepts numbers 0-60. + * } + * } + * } + * @param array $default_column Optional. Default column to query against. Default 'post_date'. + * Accepts 'post_date', 'post_date_gmt', 'post_modified', 'post_modified_gmt', + * 'comment_date', 'comment_date_gmt'. + */ + function __construct( $date_query, $default_column = 'post_date' ) { + if ( empty( $date_query ) || ! is_array( $date_query ) ) + return; + + if ( isset( $date_query['relation'] ) && strtoupper( $date_query['relation'] ) == 'OR' ) + $this->relation = 'OR'; + else + $this->relation = 'AND'; + + if ( ! empty( $date_query['column'] ) ) + $this->column = esc_sql( $date_query['column'] ); + else + $this->column = esc_sql( $default_column ); + + $this->column = $this->validate_column( $this->column ); + + $this->compare = $this->get_compare( $date_query ); + + // If an array of arrays wasn't passed, fix it + if ( ! isset( $date_query[0] ) ) + $date_query = array( $date_query ); + + $this->queries = array(); + foreach ( $date_query as $key => $query ) { + if ( ! is_array( $query ) ) + continue; + + $this->queries[$key] = $query; + } + } + + /** + * Determines and validates what comparison operator to use. + * + * @since 3.7.0 + * @access public + * + * @param array $query A date query or a date subquery + * @return string The comparison operator + */ + public function get_compare( $query ) { + if ( ! empty( $query['compare'] ) && in_array( $query['compare'], array( '=', '!=', '>', '>=', '<', '<=', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN' ) ) ) + return strtoupper( $query['compare'] ); + + return $this->compare; + } + + /** + * Validates a column name parameter. + * + * @since 3.7.0 + * @access public + * + * @param string $column The user-supplied column name. + * @return string A validated column name value. + */ + public function validate_column( $column ) { + $valid_columns = array( + 'post_date', 'post_date_gmt', 'post_modified', + 'post_modified_gmt', 'comment_date', 'comment_date_gmt' + ); + /** + * Filter the list of valid date query columns. + * + * @since 3.7.0 + * + * @param array $valid_columns An array of valid date query columns. Defaults are 'post_date', 'post_date_gmt', + * 'post_modified', 'post_modified_gmt', 'comment_date', 'comment_date_gmt' + */ + if ( ! in_array( $column, apply_filters( 'date_query_valid_columns', $valid_columns ) ) ) + $column = 'post_date'; + + return $column; + } + + /** + * Turns an array of date query parameters into a MySQL string. + * + * @since 3.7.0 + * @access public + * + * @return string MySQL WHERE parameters + */ + public function get_sql() { + // The parts of the final query + $where = array(); + + foreach ( $this->queries as $key => $query ) { + $where_parts = $this->get_sql_for_subquery( $query ); + if ( $where_parts ) { + // Combine the parts of this subquery into a single string + $where[ $key ] = '( ' . implode( ' AND ', $where_parts ) . ' )'; + } + } + + // Combine the subquery strings into a single string + if ( $where ) + $where = ' AND ( ' . implode( " {$this->relation} ", $where ) . ' )'; + else + $where = ''; + + /** + * Filter the date query WHERE clause. + * + * @since 3.7.0 + * + * @param string $where WHERE clause of the date query. + * @param WP_Date_Query $this The WP_Date_Query instance. + */ + return apply_filters( 'get_date_sql', $where, $this ); + } + + /** + * Turns a single date subquery into pieces for a WHERE clause. + * + * @since 3.7.0 + * return array + */ + protected function get_sql_for_subquery( $query ) { + global $wpdb; + + // The sub-parts of a $where part + $where_parts = array(); + + $column = ( ! empty( $query['column'] ) ) ? esc_sql( $query['column'] ) : $this->column; + + $column = $this->validate_column( $column ); + + $compare = $this->get_compare( $query ); + + $lt = '<'; + $gt = '>'; + if ( ! empty( $query['inclusive'] ) ) { + $lt .= '='; + $gt .= '='; + } + + // Range queries + if ( ! empty( $query['after'] ) ) + $where_parts[] = $wpdb->prepare( "$column $gt %s", $this->build_mysql_datetime( $query['after'], true ) ); + + if ( ! empty( $query['before'] ) ) + $where_parts[] = $wpdb->prepare( "$column $lt %s", $this->build_mysql_datetime( $query['before'], false ) ); + + // Specific value queries + + if ( isset( $query['year'] ) && $value = $this->build_value( $compare, $query['year'] ) ) + $where_parts[] = "YEAR( $column ) $compare $value"; + + if ( isset( $query['month'] ) && $value = $this->build_value( $compare, $query['month'] ) ) + $where_parts[] = "MONTH( $column ) $compare $value"; + + // Legacy + if ( isset( $query['monthnum'] ) && $value = $this->build_value( $compare, $query['monthnum'] ) ) + $where_parts[] = "MONTH( $column ) $compare $value"; + + if ( isset( $query['week'] ) && false !== ( $value = $this->build_value( $compare, $query['week'] ) ) ) + $where_parts[] = _wp_mysql_week( $column ) . " $compare $value"; + + // Legacy + if ( isset( $query['w'] ) && false !== ( $value = $this->build_value( $compare, $query['w'] ) ) ) + $where_parts[] = _wp_mysql_week( $column ) . " $compare $value"; + + if ( isset( $query['dayofyear'] ) && $value = $this->build_value( $compare, $query['dayofyear'] ) ) + $where_parts[] = "DAYOFYEAR( $column ) $compare $value"; + + if ( isset( $query['day'] ) && $value = $this->build_value( $compare, $query['day'] ) ) + $where_parts[] = "DAYOFMONTH( $column ) $compare $value"; + + if ( isset( $query['dayofweek'] ) && $value = $this->build_value( $compare, $query['dayofweek'] ) ) + $where_parts[] = "DAYOFWEEK( $column ) $compare $value"; + + if ( isset( $query['hour'] ) || isset( $query['minute'] ) || isset( $query['second'] ) ) { + // Avoid notices + foreach ( array( 'hour', 'minute', 'second' ) as $unit ) { + if ( ! isset( $query[$unit] ) ) { + $query[$unit] = null; + } + } + + if ( $time_query = $this->build_time_query( $column, $compare, $query['hour'], $query['minute'], $query['second'] ) ) { + $where_parts[] = $time_query; + } + } + + return $where_parts; + } + + /** + * Builds and validates a value string based on the comparison operator. + * + * @since 3.7.0 + * @access public + * + * @param string $compare The compare operator to use + * @param string|array $value The value + * @return string|int|false The value to be used in SQL or false on error. + */ + public function build_value( $compare, $value ) { + if ( ! isset( $value ) ) + return false; + + switch ( $compare ) { + case 'IN': + case 'NOT IN': + return '(' . implode( ',', array_map( 'intval', (array) $value ) ) . ')'; + + case 'BETWEEN': + case 'NOT BETWEEN': + if ( ! is_array( $value ) || 2 != count( $value ) || ! isset( $value[0] ) || ! isset( $value[1] ) ) + $value = array( $value, $value ); + + $value = array_map( 'intval', $value ); + + return $value[0] . ' AND ' . $value[1]; + + default; + return (int) $value; + } + } + + /** + * Builds a MySQL format date/time based on some query parameters. + * + * You can pass an array of values (year, month, etc.) with missing parameter values being defaulted to + * either the maximum or minimum values (controlled by the $default_to parameter). Alternatively you can + * pass a string that that will be run through strtotime(). + * + * @since 3.7.0 + * @access public + * + * @param string|array $datetime An array of parameters or a strotime() string + * @param string $default_to Controls what values default to if they are missing from $datetime. Pass "min" or "max". + * @return string|false A MySQL format date/time or false on failure + */ + public function build_mysql_datetime( $datetime, $default_to_max = false ) { + $now = current_time( 'timestamp' ); + + if ( ! is_array( $datetime ) ) { + // @todo Timezone issues here possibly + return gmdate( 'Y-m-d H:i:s', strtotime( $datetime, $now ) ); + } + + $datetime = array_map( 'absint', $datetime ); + + if ( ! isset( $datetime['year'] ) ) + $datetime['year'] = gmdate( 'Y', $now ); + + if ( ! isset( $datetime['month'] ) ) + $datetime['month'] = ( $default_to_max ) ? 12 : 1; + + if ( ! isset( $datetime['day'] ) ) + $datetime['day'] = ( $default_to_max ) ? (int) date( 't', mktime( 0, 0, 0, $datetime['month'], 1, $datetime['year'] ) ) : 1; + + if ( ! isset( $datetime['hour'] ) ) + $datetime['hour'] = ( $default_to_max ) ? 23 : 0; + + if ( ! isset( $datetime['minute'] ) ) + $datetime['minute'] = ( $default_to_max ) ? 59 : 0; + + if ( ! isset( $datetime['second'] ) ) + $datetime['second'] = ( $default_to_max ) ? 59 : 0; + + return sprintf( '%04d-%02d-%02d %02d:%02d:%02d', $datetime['year'], $datetime['month'], $datetime['day'], $datetime['hour'], $datetime['minute'], $datetime['second'] ); + } + + /** + * Builds a query string for comparing time values (hour, minute, second). + * + * If just hour, minute, or second is set than a normal comparison will be done. + * However if multiple values are passed, a pseudo-decimal time will be created + * in order to be able to accurately compare against. + * + * @since 3.7.0 + * @access public + * + * @param string $column The column to query against. Needs to be pre-validated! + * @param string $compare The comparison operator. Needs to be pre-validated! + * @param int|null $hour Optional. An hour value (0-23). + * @param int|null $minute Optional. A minute value (0-59). + * @param int|null $second Optional. A second value (0-59). + * @return string|false A query part or false on failure. + */ + public function build_time_query( $column, $compare, $hour = null, $minute = null, $second = null ) { + global $wpdb; + + // Have to have at least one + if ( ! isset( $hour ) && ! isset( $minute ) && ! isset( $second ) ) + return false; + + // Complex combined queries aren't supported for multi-value queries + if ( in_array( $compare, array( 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN' ) ) ) { + $return = array(); + + if ( isset( $hour ) && false !== ( $value = $this->build_value( $compare, $hour ) ) ) + $return[] = "HOUR( $column ) $compare $value"; + + if ( isset( $minute ) && false !== ( $value = $this->build_value( $compare, $minute ) ) ) + $return[] = "MINUTE( $column ) $compare $value"; + + if ( isset( $second ) && false !== ( $value = $this->build_value( $compare, $second ) ) ) + $return[] = "SECOND( $column ) $compare $value"; + + return implode( ' AND ', $return ); + } + + // Cases where just one unit is set + if ( isset( $hour ) && ! isset( $minute ) && ! isset( $second ) && false !== ( $value = $this->build_value( $compare, $hour ) ) ) { + return "HOUR( $column ) $compare $value"; + } elseif ( ! isset( $hour ) && isset( $minute ) && ! isset( $second ) && false !== ( $value = $this->build_value( $compare, $minute ) ) ) { + return "MINUTE( $column ) $compare $value"; + } elseif ( ! isset( $hour ) && ! isset( $minute ) && isset( $second ) && false !== ( $value = $this->build_value( $compare, $second ) ) ) { + return "SECOND( $column ) $compare $value"; + } + + // Single units were already handled. Since hour & second isn't allowed, minute must to be set. + if ( ! isset( $minute ) ) + return false; + + $format = $time = ''; + + // Hour + if ( $hour ) { + $format .= '%H.'; + $time .= sprintf( '%02d', $hour ) . '.'; + } else { + $format .= '0.'; + $time .= '0.'; + } + + // Minute + $format .= '%i'; + $time .= sprintf( '%02d', $minute ); + + if ( isset( $second ) ) { + $format .= '%s'; + $time .= sprintf( '%02d', $second ); + } + + return $wpdb->prepare( "DATE_FORMAT( $column, %s ) $compare %f", $format, $time ); + } +} diff --git a/wp-includes/default-constants.php b/wp-includes/default-constants.php new file mode 100644 index 0000000..6be5dd0 --- /dev/null +++ b/wp-includes/default-constants.php @@ -0,0 +1,317 @@ + 'widget_pages', 'description' => __( 'A list of your site’s Pages.') ); + parent::__construct('pages', __('Pages'), $widget_ops); + } + + function widget( $args, $instance ) { + extract( $args ); + + /** + * Filter the widget title. + * + * @since 2.6.0 + * + * @param string $title The widget title. Default 'Pages'. + * @param array $instance An array of the widget's settings. + * @param mixed $id_base The widget ID. + */ + $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Pages' ) : $instance['title'], $instance, $this->id_base ); + + $sortby = empty( $instance['sortby'] ) ? 'menu_order' : $instance['sortby']; + $exclude = empty( $instance['exclude'] ) ? '' : $instance['exclude']; + + if ( $sortby == 'menu_order' ) + $sortby = 'menu_order, post_title'; + + /** + * Filter the arguments for the Pages widget. + * + * @since 2.8.0 + * + * @see wp_list_pages() + * + * @param array $args An array of arguments to retrieve the pages list. + */ + $out = wp_list_pages( apply_filters( 'widget_pages_args', array( + 'title_li' => '', + 'echo' => 0, + 'sort_column' => $sortby, + 'exclude' => $exclude + ) ) ); + + if ( !empty( $out ) ) { + echo $before_widget; + if ( $title) + echo $before_title . $title . $after_title; + ?> +
              + +
            + 'post_title', 'title' => '', 'exclude' => '') ); + $title = esc_attr( $instance['title'] ); + $exclude = esc_attr( $instance['exclude'] ); + ?> +

            +

            + + +

            +

            + +
            + +

            + __( "Your blogroll" ) ); + parent::__construct('links', __('Links'), $widget_ops); + } + + function widget( $args, $instance ) { + extract($args, EXTR_SKIP); + + $show_description = isset($instance['description']) ? $instance['description'] : false; + $show_name = isset($instance['name']) ? $instance['name'] : false; + $show_rating = isset($instance['rating']) ? $instance['rating'] : false; + $show_images = isset($instance['images']) ? $instance['images'] : true; + $category = isset($instance['category']) ? $instance['category'] : false; + $orderby = isset( $instance['orderby'] ) ? $instance['orderby'] : 'name'; + $order = $orderby == 'rating' ? 'DESC' : 'ASC'; + $limit = isset( $instance['limit'] ) ? $instance['limit'] : -1; + + $before_widget = preg_replace('/id="[^"]*"/','id="%id"', $before_widget); + + /** + * Filter the arguments for the Links widget. + * + * @since 2.6.0 + * + * @see wp_list_bookmarks() + * + * @param array $args An array of arguments to retrieve the links list. + */ + wp_list_bookmarks( apply_filters( 'widget_links_args', array( + 'title_before' => $before_title, 'title_after' => $after_title, + 'category_before' => $before_widget, 'category_after' => $after_widget, + 'show_images' => $show_images, 'show_description' => $show_description, + 'show_name' => $show_name, 'show_rating' => $show_rating, + 'category' => $category, 'class' => 'linkcat widget', + 'orderby' => $orderby, 'order' => $order, + 'limit' => $limit, + ) ) ); + } + + function update( $new_instance, $old_instance ) { + $new_instance = (array) $new_instance; + $instance = array( 'images' => 0, 'name' => 0, 'description' => 0, 'rating' => 0 ); + foreach ( $instance as $field => $val ) { + if ( isset($new_instance[$field]) ) + $instance[$field] = 1; + } + + $instance['orderby'] = 'name'; + if ( in_array( $new_instance['orderby'], array( 'name', 'rating', 'id', 'rand' ) ) ) + $instance['orderby'] = $new_instance['orderby']; + + $instance['category'] = intval( $new_instance['category'] ); + $instance['limit'] = ! empty( $new_instance['limit'] ) ? intval( $new_instance['limit'] ) : -1; + + return $instance; + } + + function form( $instance ) { + + //Defaults + $instance = wp_parse_args( (array) $instance, array( 'images' => true, 'name' => true, 'description' => false, 'rating' => false, 'category' => false, 'orderby' => 'name', 'limit' => -1 ) ); + $link_cats = get_terms( 'link_category' ); + if ( ! $limit = intval( $instance['limit'] ) ) + $limit = -1; +?> +

            + + + + +

            +

            + id="get_field_id('images'); ?>" name="get_field_name('images'); ?>" /> +
            + id="get_field_id('name'); ?>" name="get_field_name('name'); ?>" /> +
            + id="get_field_id('description'); ?>" name="get_field_name('description'); ?>" /> +
            + id="get_field_id('rating'); ?>" name="get_field_name('rating'); ?>" /> + +

            +

            + + +

            + 'widget_search', 'description' => __( "A search form for your site.") ); + parent::__construct( 'search', _x( 'Search', 'Search widget' ), $widget_ops ); + } + + function widget( $args, $instance ) { + extract($args); + + /** This filter is documented in wp-includes/default-widgets.php */ + $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base ); + + echo $before_widget; + if ( $title ) + echo $before_title . $title . $after_title; + + // Use current theme search form if it exists + get_search_form(); + + echo $after_widget; + } + + function form( $instance ) { + $instance = wp_parse_args( (array) $instance, array( 'title' => '') ); + $title = $instance['title']; +?> +

            + '')); + $instance['title'] = strip_tags($new_instance['title']); + return $instance; + } + +} + +/** + * Archives widget class + * + * @since 2.8.0 + */ +class WP_Widget_Archives extends WP_Widget { + + function __construct() { + $widget_ops = array('classname' => 'widget_archive', 'description' => __( 'A monthly archive of your site’s Posts.') ); + parent::__construct('archives', __('Archives'), $widget_ops); + } + + function widget( $args, $instance ) { + extract($args); + $c = ! empty( $instance['count'] ) ? '1' : '0'; + $d = ! empty( $instance['dropdown'] ) ? '1' : '0'; + + /** This filter is documented in wp-includes/default-widgets.php */ + $title = apply_filters( 'widget_title', empty($instance['title'] ) ? __( 'Archives' ) : $instance['title'], $instance, $this->id_base ); + + echo $before_widget; + if ( $title ) + echo $before_title . $title . $after_title; + + if ( $d ) { +?> + + +
              + 'monthly', + 'show_post_count' => $c + ) ) ); +?> +
            + '', 'count' => 0, 'dropdown' => '') ); + $instance['title'] = strip_tags($new_instance['title']); + $instance['count'] = $new_instance['count'] ? 1 : 0; + $instance['dropdown'] = $new_instance['dropdown'] ? 1 : 0; + + return $instance; + } + + function form( $instance ) { + $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'count' => 0, 'dropdown' => '') ); + $title = strip_tags($instance['title']); + $count = $instance['count'] ? 'checked="checked"' : ''; + $dropdown = $instance['dropdown'] ? 'checked="checked"' : ''; +?> +

            +

            + id="get_field_id('dropdown'); ?>" name="get_field_name('dropdown'); ?>" /> +
            + id="get_field_id('count'); ?>" name="get_field_name('count'); ?>" /> +

            + 'widget_meta', 'description' => __( "Login, RSS, & WordPress.org links.") ); + parent::__construct('meta', __('Meta'), $widget_ops); + } + + function widget( $args, $instance ) { + extract($args); + + /** This filter is documented in wp-includes/default-widgets.php */ + $title = apply_filters( 'widget_title', empty($instance['title']) ? __( 'Meta' ) : $instance['title'], $instance, $this->id_base ); + + echo $before_widget; + if ( $title ) + echo $before_title . $title . $after_title; +?> +
              + +
            • +
            • RSS'); ?>
            • +
            • RSS'); ?>
            • +%s', + esc_url( __( 'https://wordpress.org/' ) ), + esc_attr__( 'Powered by WordPress, state-of-the-art semantic personal publishing platform.' ), + _x( 'WordPress.org', 'meta widget link text' ) + ) ); + + wp_meta(); +?> +
            + '' ) ); + $title = strip_tags($instance['title']); +?> +

            + 'widget_calendar', 'description' => __( 'A calendar of your site’s Posts.') ); + parent::__construct('calendar', __('Calendar'), $widget_ops); + } + + function widget( $args, $instance ) { + extract($args); + + /** This filter is documented in wp-includes/default-widgets.php */ + $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base ); + + echo $before_widget; + if ( $title ) + echo $before_title . $title . $after_title; + echo '
            '; + get_calendar(); + echo '
            '; + echo $after_widget; + } + + function update( $new_instance, $old_instance ) { + $instance = $old_instance; + $instance['title'] = strip_tags($new_instance['title']); + + return $instance; + } + + function form( $instance ) { + $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) ); + $title = strip_tags($instance['title']); +?> +

            +

            + 'widget_text', 'description' => __('Arbitrary text or HTML.')); + $control_ops = array('width' => 400, 'height' => 350); + parent::__construct('text', __('Text'), $widget_ops, $control_ops); + } + + function widget( $args, $instance ) { + extract($args); + + /** This filter is documented in wp-includes/default-widgets.php */ + $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base ); + + /** + * Filter the content of the Text widget. + * + * @since 2.3.0 + * + * @param string $widget_text The widget content. + * @param WP_Widget $instance WP_Widget instance. + */ + $text = apply_filters( 'widget_text', empty( $instance['text'] ) ? '' : $instance['text'], $instance ); + echo $before_widget; + if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?> +
            + '', 'text' => '' ) ); + $title = strip_tags($instance['title']); + $text = esc_textarea($instance['text']); +?> +

            +

            + + + +

            /> 

            + 'widget_categories', 'description' => __( "A list or dropdown of categories." ) ); + parent::__construct('categories', __('Categories'), $widget_ops); + } + + function widget( $args, $instance ) { + extract( $args ); + + /** This filter is documented in wp-includes/default-widgets.php */ + $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Categories' ) : $instance['title'], $instance, $this->id_base ); + + $c = ! empty( $instance['count'] ) ? '1' : '0'; + $h = ! empty( $instance['hierarchical'] ) ? '1' : '0'; + $d = ! empty( $instance['dropdown'] ) ? '1' : '0'; + + echo $before_widget; + if ( $title ) + echo $before_title . $title . $after_title; + + $cat_args = array('orderby' => 'name', 'show_count' => $c, 'hierarchical' => $h); + + if ( $d ) { + $cat_args['show_option_none'] = __('Select Category'); + + /** + * Filter the arguments for the Categories widget drop-down. + * + * @since 2.8.0 + * + * @see wp_dropdown_categories() + * + * @param array $cat_args An array of Categories widget drop-down arguments. + */ + wp_dropdown_categories( apply_filters( 'widget_categories_dropdown_args', $cat_args ) ); +?> + + + + +
              + +
            + '') ); + $title = esc_attr( $instance['title'] ); + $count = isset($instance['count']) ? (bool) $instance['count'] :false; + $hierarchical = isset( $instance['hierarchical'] ) ? (bool) $instance['hierarchical'] : false; + $dropdown = isset( $instance['dropdown'] ) ? (bool) $instance['dropdown'] : false; +?> +

            +

            + +

            /> +
            + + /> +
            + + /> +

            + 'widget_recent_entries', 'description' => __( "Your site’s most recent Posts.") ); + parent::__construct('recent-posts', __('Recent Posts'), $widget_ops); + $this->alt_option_name = 'widget_recent_entries'; + + add_action( 'save_post', array($this, 'flush_widget_cache') ); + add_action( 'deleted_post', array($this, 'flush_widget_cache') ); + add_action( 'switch_theme', array($this, 'flush_widget_cache') ); + } + + function widget($args, $instance) { + $cache = array(); + if ( ! $this->is_preview() ) { + $cache = wp_cache_get( 'widget_recent_posts', 'widget' ); + } + + if ( ! is_array( $cache ) ) { + $cache = array(); + } + + if ( ! isset( $args['widget_id'] ) ) { + $args['widget_id'] = $this->id; + } + + if ( isset( $cache[ $args['widget_id'] ] ) ) { + echo $cache[ $args['widget_id'] ]; + return; + } + + ob_start(); + extract($args); + + $title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : __( 'Recent Posts' ); + + /** This filter is documented in wp-includes/default-widgets.php */ + $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); + + $number = ( ! empty( $instance['number'] ) ) ? absint( $instance['number'] ) : 5; + if ( ! $number ) + $number = 5; + $show_date = isset( $instance['show_date'] ) ? $instance['show_date'] : false; + + /** + * Filter the arguments for the Recent Posts widget. + * + * @since 3.4.0 + * + * @see WP_Query::get_posts() + * + * @param array $args An array of arguments used to retrieve the recent posts. + */ + $r = new WP_Query( apply_filters( 'widget_posts_args', array( + 'posts_per_page' => $number, + 'no_found_rows' => true, + 'post_status' => 'publish', + 'ignore_sticky_posts' => true + ) ) ); + + if ($r->have_posts()) : +?> + + +
              + have_posts() ) : $r->the_post(); ?> +
            • + + + + +
            • + +
            + +is_preview() ) { + $cache[ $args['widget_id'] ] = ob_get_flush(); + wp_cache_set( 'widget_recent_posts', $cache, 'widget' ); + } else { + ob_end_flush(); + } + } + + function update( $new_instance, $old_instance ) { + $instance = $old_instance; + $instance['title'] = strip_tags($new_instance['title']); + $instance['number'] = (int) $new_instance['number']; + $instance['show_date'] = isset( $new_instance['show_date'] ) ? (bool) $new_instance['show_date'] : false; + $this->flush_widget_cache(); + + $alloptions = wp_cache_get( 'alloptions', 'options' ); + if ( isset($alloptions['widget_recent_entries']) ) + delete_option('widget_recent_entries'); + + return $instance; + } + + function flush_widget_cache() { + wp_cache_delete('widget_recent_posts', 'widget'); + } + + function form( $instance ) { + $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : ''; + $number = isset( $instance['number'] ) ? absint( $instance['number'] ) : 5; + $show_date = isset( $instance['show_date'] ) ? (bool) $instance['show_date'] : false; +?> +

            +

            + +

            +

            + +

            id="get_field_id( 'show_date' ); ?>" name="get_field_name( 'show_date' ); ?>" /> +

            + 'widget_recent_comments', 'description' => __( 'Your site’s most recent comments.' ) ); + parent::__construct('recent-comments', __('Recent Comments'), $widget_ops); + $this->alt_option_name = 'widget_recent_comments'; + + if ( is_active_widget(false, false, $this->id_base) ) + add_action( 'wp_head', array($this, 'recent_comments_style') ); + + add_action( 'comment_post', array($this, 'flush_widget_cache') ); + add_action( 'edit_comment', array($this, 'flush_widget_cache') ); + add_action( 'transition_comment_status', array($this, 'flush_widget_cache') ); + } + + function recent_comments_style() { + + /** + * Filter the Recent Comments default widget styles. + * + * @since 3.1.0 + * + * @param bool $active Whether the widget is active. Default true. + * @param string $id_base The widget ID. + */ + if ( ! current_theme_supports( 'widgets' ) // Temp hack #14876 + || ! apply_filters( 'show_recent_comments_widget_style', true, $this->id_base ) ) + return; + ?> + +is_preview() ) { + $cache = wp_cache_get('widget_recent_comments', 'widget'); + } + if ( ! is_array( $cache ) ) { + $cache = array(); + } + + if ( ! isset( $args['widget_id'] ) ) + $args['widget_id'] = $this->id; + + if ( isset( $cache[ $args['widget_id'] ] ) ) { + echo $cache[ $args['widget_id'] ]; + return; + } + + extract($args, EXTR_SKIP); + $output = ''; + + $title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : __( 'Recent Comments' ); + + /** This filter is documented in wp-includes/default-widgets.php */ + $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); + + $number = ( ! empty( $instance['number'] ) ) ? absint( $instance['number'] ) : 5; + if ( ! $number ) + $number = 5; + + /** + * Filter the arguments for the Recent Comments widget. + * + * @since 3.4.0 + * + * @see get_comments() + * + * @param array $comment_args An array of arguments used to retrieve the recent comments. + */ + $comments = get_comments( apply_filters( 'widget_comments_args', array( + 'number' => $number, + 'status' => 'approve', + 'post_status' => 'publish' + ) ) ); + + $output .= $before_widget; + if ( $title ) + $output .= $before_title . $title . $after_title; + + $output .= '
              '; + if ( $comments ) { + // Prime cache for associated posts. (Prime post term cache if we need it for permalinks.) + $post_ids = array_unique( wp_list_pluck( $comments, 'comment_post_ID' ) ); + _prime_post_caches( $post_ids, strpos( get_option( 'permalink_structure' ), '%category%' ), false ); + + foreach ( (array) $comments as $comment) { + $output .= '
            • ' . /* translators: comments widget: 1: comment author, 2: post link */ sprintf(_x('%1$s on %2$s', 'widgets'), get_comment_author_link(), '' . get_the_title($comment->comment_post_ID) . '') . '
            • '; + } + } + $output .= '
            '; + $output .= $after_widget; + + echo $output; + + if ( ! $this->is_preview() ) { + $cache[ $args['widget_id'] ] = $output; + wp_cache_set( 'widget_recent_comments', $cache, 'widget' ); + } + } + + function update( $new_instance, $old_instance ) { + $instance = $old_instance; + $instance['title'] = strip_tags($new_instance['title']); + $instance['number'] = absint( $new_instance['number'] ); + $this->flush_widget_cache(); + + $alloptions = wp_cache_get( 'alloptions', 'options' ); + if ( isset($alloptions['widget_recent_comments']) ) + delete_option('widget_recent_comments'); + + return $instance; + } + + function form( $instance ) { + $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : ''; + $number = isset( $instance['number'] ) ? absint( $instance['number'] ) : 5; +?> +

            +

            + +

            +

            + __('Entries from any RSS or Atom feed.') ); + $control_ops = array( 'width' => 400, 'height' => 200 ); + parent::__construct( 'rss', __('RSS'), $widget_ops, $control_ops ); + } + + function widget($args, $instance) { + + if ( isset($instance['error']) && $instance['error'] ) + return; + + extract($args, EXTR_SKIP); + + $url = ! empty( $instance['url'] ) ? $instance['url'] : ''; + while ( stristr($url, 'http') != $url ) + $url = substr($url, 1); + + if ( empty($url) ) + return; + + // self-url destruction sequence + if ( in_array( untrailingslashit( $url ), array( site_url(), home_url() ) ) ) + return; + + $rss = fetch_feed($url); + $title = $instance['title']; + $desc = ''; + $link = ''; + + if ( ! is_wp_error($rss) ) { + $desc = esc_attr(strip_tags(@html_entity_decode($rss->get_description(), ENT_QUOTES, get_option('blog_charset')))); + if ( empty($title) ) + $title = esc_html(strip_tags($rss->get_title())); + $link = esc_url(strip_tags($rss->get_permalink())); + while ( stristr($link, 'http') != $link ) + $link = substr($link, 1); + } + + if ( empty($title) ) + $title = empty($desc) ? __('Unknown Feed') : $desc; + + /** This filter is documented in wp-includes/default-widgets.php */ + $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); + + $url = esc_url(strip_tags($url)); + $icon = includes_url('images/rss.png'); + if ( $title ) + $title = "RSS $title"; + + echo $before_widget; + if ( $title ) + echo $before_title . $title . $after_title; + wp_widget_rss_output( $rss, $instance ); + echo $after_widget; + + if ( ! is_wp_error($rss) ) + $rss->__destruct(); + unset($rss); + } + + function update($new_instance, $old_instance) { + $testurl = ( isset( $new_instance['url'] ) && ( !isset( $old_instance['url'] ) || ( $new_instance['url'] != $old_instance['url'] ) ) ); + return wp_widget_rss_process( $new_instance, $testurl ); + } + + function form($instance) { + + if ( empty($instance) ) + $instance = array( 'title' => '', 'url' => '', 'items' => 10, 'error' => false, 'show_summary' => 0, 'show_author' => 0, 'show_date' => 0 ); + $instance['number'] = $this->number; + + wp_widget_rss_form( $instance ); + } +} + +/** + * Display the RSS entries in a list. + * + * @since 2.5.0 + * + * @param string|array|object $rss RSS url. + * @param array $args Widget arguments. + */ +function wp_widget_rss_output( $rss, $args = array() ) { + if ( is_string( $rss ) ) { + $rss = fetch_feed($rss); + } elseif ( is_array($rss) && isset($rss['url']) ) { + $args = $rss; + $rss = fetch_feed($rss['url']); + } elseif ( !is_object($rss) ) { + return; + } + + if ( is_wp_error($rss) ) { + if ( is_admin() || current_user_can('manage_options') ) + echo '

            ' . sprintf( __('RSS Error: %s'), $rss->get_error_message() ) . '

            '; + return; + } + + $default_args = array( 'show_author' => 0, 'show_date' => 0, 'show_summary' => 0 ); + $args = wp_parse_args( $args, $default_args ); + extract( $args, EXTR_SKIP ); + + $items = (int) $items; + if ( $items < 1 || 20 < $items ) + $items = 10; + $show_summary = (int) $show_summary; + $show_author = (int) $show_author; + $show_date = (int) $show_date; + + if ( !$rss->get_item_quantity() ) { + echo '
            • ' . __( 'An error has occurred, which probably means the feed is down. Try again later.' ) . '
            '; + $rss->__destruct(); + unset($rss); + return; + } + + echo '
              '; + foreach ( $rss->get_items(0, $items) as $item ) { + $link = $item->get_link(); + while ( stristr($link, 'http') != $link ) + $link = substr($link, 1); + $link = esc_url(strip_tags($link)); + $title = esc_attr(strip_tags($item->get_title())); + if ( empty($title) ) + $title = __('Untitled'); + + $desc = @html_entity_decode( $item->get_description(), ENT_QUOTES, get_option( 'blog_charset' ) ); + $desc = esc_attr( strip_tags( $desc ) ); + $desc = trim( str_replace( array( "\n", "\r" ), ' ', $desc ) ); + $desc = wp_html_excerpt( $desc, 360 ); + + $summary = ''; + if ( $show_summary ) { + $summary = $desc; + + // Append ellipsis. Change existing [...] to […]. + if ( '[...]' == substr( $summary, -5 ) ) { + $summary = substr( $summary, 0, -5 ) . '[…]'; + } elseif ( '[…]' != substr( $summary, -10 ) && $desc !== $summary ) { + $summary .= ' […]'; + } + + $summary = '
              ' . esc_html( $summary ) . '
              '; + } + + $date = ''; + if ( $show_date ) { + $date = $item->get_date( 'U' ); + + if ( $date ) { + $date = ' ' . date_i18n( get_option( 'date_format' ), $date ) . ''; + } + } + + $author = ''; + if ( $show_author ) { + $author = $item->get_author(); + if ( is_object($author) ) { + $author = $author->get_name(); + $author = ' ' . esc_html( strip_tags( $author ) ) . ''; + } + } + + if ( $link == '' ) { + echo "
            • $title{$date}{$summary}{$author}
            • "; + } elseif ( $show_summary ) { + echo "
            • $title{$date}{$summary}{$author}
            • "; + } else { + echo "
            • $title{$date}{$author}
            • "; + } + } + echo '
            '; + $rss->__destruct(); + unset($rss); +} + +/** + * Display RSS widget options form. + * + * The options for what fields are displayed for the RSS form are all booleans + * and are as follows: 'url', 'title', 'items', 'show_summary', 'show_author', + * 'show_date'. + * + * @since 2.5.0 + * + * @param array|string $args Values for input fields. + * @param array $inputs Override default display options. + */ +function wp_widget_rss_form( $args, $inputs = null ) { + + $default_inputs = array( 'url' => true, 'title' => true, 'items' => true, 'show_summary' => true, 'show_author' => true, 'show_date' => true ); + $inputs = wp_parse_args( $inputs, $default_inputs ); + extract( $args ); + extract( $inputs, EXTR_SKIP ); + + $number = esc_attr( $number ); + $title = esc_attr( $title ); + $url = esc_url( $url ); + $items = (int) $items; + if ( $items < 1 || 20 < $items ) + $items = 10; + $show_summary = (int) $show_summary; + $show_author = (int) $show_author; + $show_date = (int) $show_date; + + if ( !empty($error) ) + echo '

            ' . sprintf( __('RSS Error: %s'), $error) . '

            '; + + if ( $inputs['url'] ) : +?> +

            +

            + +

            +

            + +

            +

            + +

            /> +

            + +

            /> +

            + +

            /> +

            + + +get_error_message(); + } else { + $link = esc_url(strip_tags($rss->get_permalink())); + while ( stristr($link, 'http') != $link ) + $link = substr($link, 1); + + $rss->__destruct(); + unset($rss); + } + } + + return compact( 'title', 'url', 'link', 'items', 'error', 'show_summary', 'show_author', 'show_date' ); +} + +/** + * Tag cloud widget class + * + * @since 2.8.0 + */ +class WP_Widget_Tag_Cloud extends WP_Widget { + + function __construct() { + $widget_ops = array( 'description' => __( "A cloud of your most used tags.") ); + parent::__construct('tag_cloud', __('Tag Cloud'), $widget_ops); + } + + function widget( $args, $instance ) { + extract($args); + $current_taxonomy = $this->_get_current_taxonomy($instance); + if ( !empty($instance['title']) ) { + $title = $instance['title']; + } else { + if ( 'post_tag' == $current_taxonomy ) { + $title = __('Tags'); + } else { + $tax = get_taxonomy($current_taxonomy); + $title = $tax->labels->name; + } + } + + /** This filter is documented in wp-includes/default-widgets.php */ + $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); + + echo $before_widget; + if ( $title ) + echo $before_title . $title . $after_title; + echo '
            '; + + /** + * Filter the taxonomy used in the Tag Cloud widget. + * + * @since 2.8.0 + * @since 3.0.0 Added taxonomy drop-down. + * + * @see wp_tag_cloud() + * + * @param array $current_taxonomy The taxonomy to use in the tag cloud. Default 'tags'. + */ + wp_tag_cloud( apply_filters( 'widget_tag_cloud_args', array( + 'taxonomy' => $current_taxonomy + ) ) ); + + echo "
            \n"; + echo $after_widget; + } + + function update( $new_instance, $old_instance ) { + $instance['title'] = strip_tags(stripslashes($new_instance['title'])); + $instance['taxonomy'] = stripslashes($new_instance['taxonomy']); + return $instance; + } + + function form( $instance ) { + $current_taxonomy = $this->_get_current_taxonomy($instance); +?> +

            +

            +

            +

            __('Add a custom menu to your sidebar.') ); + parent::__construct( 'nav_menu', __('Custom Menu'), $widget_ops ); + } + + function widget($args, $instance) { + // Get menu + $nav_menu = ! empty( $instance['nav_menu'] ) ? wp_get_nav_menu_object( $instance['nav_menu'] ) : false; + + if ( !$nav_menu ) + return; + + /** This filter is documented in wp-includes/default-widgets.php */ + $instance['title'] = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base ); + + echo $args['before_widget']; + + if ( !empty($instance['title']) ) + echo $args['before_title'] . $instance['title'] . $args['after_title']; + + wp_nav_menu( array( 'fallback_cb' => '', 'menu' => $nav_menu ) ); + + echo $args['after_widget']; + } + + function update( $new_instance, $old_instance ) { + $instance['title'] = strip_tags( stripslashes($new_instance['title']) ); + $instance['nav_menu'] = (int) $new_instance['nav_menu']; + return $instance; + } + + function form( $instance ) { + $title = isset( $instance['title'] ) ? $instance['title'] : ''; + $nav_menu = isset( $instance['nav_menu'] ) ? $instance['nav_menu'] : ''; + + // Get menus + $menus = wp_get_nav_menus( array( 'orderby' => 'name' ) ); + + // If no menus exists, direct the user to go and create some. + if ( !$menus ) { + echo '

            '. sprintf( __('No menus have been created yet. Create some.'), admin_url('nav-menus.php') ) .'

            '; + return; + } + ?> +

            + + +

            +

            + + +

            + $post->ID, + 'Author_ID' => $post->post_author, + 'Date' => $post->post_date, + 'Content' => $post->post_content, + 'Excerpt' => $post->post_excerpt, + 'Title' => $post->post_title, + 'Category' => $post->post_category, + 'post_status' => $post->post_status, + 'comment_status' => $post->comment_status, + 'ping_status' => $post->ping_status, + 'post_password' => $post->post_password, + 'to_ping' => $post->to_ping, + 'pinged' => $post->pinged, + 'post_type' => $post->post_type, + 'post_name' => $post->post_name + ); + + return $postdata; +} + +/** + * Sets up the WordPress Loop. + * + * @since 1.0.1 + * @deprecated 1.5.0 + * @deprecated Use The Loop - {@link http://codex.wordpress.org/The_Loop Use new WordPress Loop} + */ +function start_wp() { + global $wp_query; + + _deprecated_function( __FUNCTION__, '1.5', __('new WordPress Loop') ); + + // Since the old style loop is being used, advance the query iterator here. + $wp_query->next_post(); + + setup_postdata( get_post() ); +} + +/** + * Return or Print Category ID. + * + * @since 0.71 + * @deprecated 0.71 + * @deprecated use get_the_category() + * @see get_the_category() + * + * @param bool $echo + * @return null|int + */ +function the_category_ID($echo = true) { + _deprecated_function( __FUNCTION__, '0.71', 'get_the_category()' ); + + // Grab the first cat in the list. + $categories = get_the_category(); + $cat = $categories[0]->term_id; + + if ( $echo ) + echo $cat; + + return $cat; +} + +/** + * Print category with optional text before and after. + * + * @since 0.71 + * @deprecated 0.71 + * @deprecated use get_the_category_by_ID() + * @see get_the_category_by_ID() + * + * @param string $before + * @param string $after + */ +function the_category_head($before='', $after='') { + global $currentcat, $previouscat; + + _deprecated_function( __FUNCTION__, '0.71', 'get_the_category_by_ID()' ); + + // Grab the first cat in the list. + $categories = get_the_category(); + $currentcat = $categories[0]->category_id; + if ( $currentcat != $previouscat ) { + echo $before; + echo get_the_category_by_ID($currentcat); + echo $after; + $previouscat = $currentcat; + } +} + +/** + * Prints link to the previous post. + * + * @since 1.5.0 + * @deprecated 2.0.0 + * @deprecated Use previous_post_link() + * @see previous_post_link() + * + * @param string $format + * @param string $previous + * @param string $title + * @param string $in_same_cat + * @param int $limitprev + * @param string $excluded_categories + */ +function previous_post($format='%', $previous='previous post: ', $title='yes', $in_same_cat='no', $limitprev=1, $excluded_categories='') { + + _deprecated_function( __FUNCTION__, '2.0', 'previous_post_link()' ); + + if ( empty($in_same_cat) || 'no' == $in_same_cat ) + $in_same_cat = false; + else + $in_same_cat = true; + + $post = get_previous_post($in_same_cat, $excluded_categories); + + if ( !$post ) + return; + + $string = ''.$previous; + if ( 'yes' == $title ) + $string .= apply_filters('the_title', $post->post_title, $post->ID); + $string .= ''; + $format = str_replace('%', $string, $format); + echo $format; +} + +/** + * Prints link to the next post. + * + * @since 0.71 + * @deprecated 2.0.0 + * @deprecated Use next_post_link() + * @see next_post_link() + * + * @param string $format + * @param string $next + * @param string $title + * @param string $in_same_cat + * @param int $limitnext + * @param string $excluded_categories + */ +function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat='no', $limitnext=1, $excluded_categories='') { + _deprecated_function( __FUNCTION__, '2.0', 'next_post_link()' ); + + if ( empty($in_same_cat) || 'no' == $in_same_cat ) + $in_same_cat = false; + else + $in_same_cat = true; + + $post = get_next_post($in_same_cat, $excluded_categories); + + if ( !$post ) + return; + + $string = ''.$next; + if ( 'yes' == $title ) + $string .= apply_filters('the_title', $post->post_title, $post->ID); + $string .= ''; + $format = str_replace('%', $string, $format); + echo $format; +} + +/** + * Whether user can create a post. + * + * @since 1.5.0 + * @deprecated 2.0.0 + * @deprecated Use current_user_can() + * @see current_user_can() + * + * @param int $user_id + * @param int $blog_id Not Used + * @param int $category_id Not Used + * @return bool + */ +function user_can_create_post($user_id, $blog_id = 1, $category_id = 'None') { + _deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' ); + + $author_data = get_userdata($user_id); + return ($author_data->user_level > 1); +} + +/** + * Whether user can create a post. + * + * @since 1.5.0 + * @deprecated 2.0.0 + * @deprecated Use current_user_can() + * @see current_user_can() + * + * @param int $user_id + * @param int $blog_id Not Used + * @param int $category_id Not Used + * @return bool + */ +function user_can_create_draft($user_id, $blog_id = 1, $category_id = 'None') { + _deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' ); + + $author_data = get_userdata($user_id); + return ($author_data->user_level >= 1); +} + +/** + * Whether user can edit a post. + * + * @since 1.5.0 + * @deprecated 2.0.0 + * @deprecated Use current_user_can() + * @see current_user_can() + * + * @param int $user_id + * @param int $post_id + * @param int $blog_id Not Used + * @return bool + */ +function user_can_edit_post($user_id, $post_id, $blog_id = 1) { + _deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' ); + + $author_data = get_userdata($user_id); + $post = get_post($post_id); + $post_author_data = get_userdata($post->post_author); + + if ( (($user_id == $post_author_data->ID) && !($post->post_status == 'publish' && $author_data->user_level < 2)) + || ($author_data->user_level > $post_author_data->user_level) + || ($author_data->user_level >= 10) ) { + return true; + } else { + return false; + } +} + +/** + * Whether user can delete a post. + * + * @since 1.5.0 + * @deprecated 2.0.0 + * @deprecated Use current_user_can() + * @see current_user_can() + * + * @param int $user_id + * @param int $post_id + * @param int $blog_id Not Used + * @return bool + */ +function user_can_delete_post($user_id, $post_id, $blog_id = 1) { + _deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' ); + + // right now if one can edit, one can delete + return user_can_edit_post($user_id, $post_id, $blog_id); +} + +/** + * Whether user can set new posts' dates. + * + * @since 1.5.0 + * @deprecated 2.0.0 + * @deprecated Use current_user_can() + * @see current_user_can() + * + * @param int $user_id + * @param int $blog_id Not Used + * @param int $category_id Not Used + * @return bool + */ +function user_can_set_post_date($user_id, $blog_id = 1, $category_id = 'None') { + _deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' ); + + $author_data = get_userdata($user_id); + return (($author_data->user_level > 4) && user_can_create_post($user_id, $blog_id, $category_id)); +} + +/** + * Whether user can delete a post. + * + * @since 1.5.0 + * @deprecated 2.0.0 + * @deprecated Use current_user_can() + * @see current_user_can() + * + * @param int $user_id + * @param int $post_id + * @param int $blog_id Not Used + * @return bool returns true if $user_id can edit $post_id's date + */ +function user_can_edit_post_date($user_id, $post_id, $blog_id = 1) { + _deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' ); + + $author_data = get_userdata($user_id); + return (($author_data->user_level > 4) && user_can_edit_post($user_id, $post_id, $blog_id)); +} + +/** + * Whether user can delete a post. + * + * @since 1.5.0 + * @deprecated 2.0.0 + * @deprecated Use current_user_can() + * @see current_user_can() + * + * @param int $user_id + * @param int $post_id + * @param int $blog_id Not Used + * @return bool returns true if $user_id can edit $post_id's comments + */ +function user_can_edit_post_comments($user_id, $post_id, $blog_id = 1) { + _deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' ); + + // right now if one can edit a post, one can edit comments made on it + return user_can_edit_post($user_id, $post_id, $blog_id); +} + +/** + * Whether user can delete a post. + * + * @since 1.5.0 + * @deprecated 2.0.0 + * @deprecated Use current_user_can() + * @see current_user_can() + * + * @param int $user_id + * @param int $post_id + * @param int $blog_id Not Used + * @return bool returns true if $user_id can delete $post_id's comments + */ +function user_can_delete_post_comments($user_id, $post_id, $blog_id = 1) { + _deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' ); + + // right now if one can edit comments, one can delete comments + return user_can_edit_post_comments($user_id, $post_id, $blog_id); +} + +/** + * Can user can edit other user. + * + * @since 1.5.0 + * @deprecated 2.0.0 + * @deprecated Use current_user_can() + * @see current_user_can() + * + * @param int $user_id + * @param int $other_user + * @return bool + */ +function user_can_edit_user($user_id, $other_user) { + _deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' ); + + $user = get_userdata($user_id); + $other = get_userdata($other_user); + if ( $user->user_level > $other->user_level || $user->user_level > 8 || $user->ID == $other->ID ) + return true; + else + return false; +} + +/** + * Gets the links associated with category $cat_name. + * + * @since 0.71 + * @deprecated 2.1.0 + * @deprecated Use get_bookmarks() + * @see get_bookmarks() + * + * @param string $cat_name Optional. The category name to use. If no match is found uses all. + * @param string $before Optional. The html to output before the link. + * @param string $after Optional. The html to output after the link. + * @param string $between Optional. The html to output between the link/image and its description. Not used if no image or $show_images is true. + * @param bool $show_images Optional. Whether to show images (if defined). + * @param string $orderby Optional. The order to output the links. E.g. 'id', 'name', 'url', 'description' or 'rating'. Or maybe owner. + * If you start the name with an underscore the order will be reversed. You can also specify 'rand' as the order which will return links in a + * random order. + * @param bool $show_description Optional. Whether to show the description if show_images=false/not defined. + * @param bool $show_rating Optional. Show rating stars/chars. + * @param int $limit Optional. Limit to X entries. If not specified, all entries are shown. + * @param int $show_updated Optional. Whether to show last updated timestamp + */ +function get_linksbyname($cat_name = "noname", $before = '', $after = '
            ', $between = " ", $show_images = true, $orderby = 'id', + $show_description = true, $show_rating = false, + $limit = -1, $show_updated = 0) { + _deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' ); + + $cat_id = -1; + $cat = get_term_by('name', $cat_name, 'link_category'); + if ( $cat ) + $cat_id = $cat->term_id; + + get_links($cat_id, $before, $after, $between, $show_images, $orderby, $show_description, $show_rating, $limit, $show_updated); +} + +/** + * Gets the links associated with the named category. + * + * @since 1.0.1 + * @deprecated 2.1.0 + * @deprecated Use wp_list_bookmarks() + * @see wp_list_bookmarks() + * + * @param string $category The category to use. + * @param string $args + * @return bool|null + */ +function wp_get_linksbyname($category, $args = '') { + _deprecated_function(__FUNCTION__, '2.1', 'wp_list_bookmarks()'); + + $defaults = array( + 'after' => '
            ', + 'before' => '', + 'categorize' => 0, + 'category_after' => '', + 'category_before' => '', + 'category_name' => $category, + 'show_description' => 1, + 'title_li' => '', + ); + + $r = wp_parse_args( $args, $defaults ); + + return wp_list_bookmarks($r); +} + +/** + * Gets an array of link objects associated with category $cat_name. + * + * + * $links = get_linkobjectsbyname('fred'); + * foreach ($links as $link) { + * echo '
          8. '.$link->link_name.'
          9. '; + * } + *
            + * + * @since 1.0.1 + * @deprecated 2.1.0 + * @deprecated Use get_bookmarks() + * @see get_bookmarks() + * + * @param string $cat_name The category name to use. If no match is found uses all. + * @param string $orderby The order to output the links. E.g. 'id', 'name', 'url', 'description', or 'rating'. + * Or maybe owner. If you start the name with an underscore the order will be reversed. You can also + * specify 'rand' as the order which will return links in a random order. + * @param int $limit Limit to X entries. If not specified, all entries are shown. + * @return unknown + */ +function get_linkobjectsbyname($cat_name = "noname" , $orderby = 'name', $limit = -1) { + _deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' ); + + $cat_id = -1; + $cat = get_term_by('name', $cat_name, 'link_category'); + if ( $cat ) + $cat_id = $cat->term_id; + + return get_linkobjects($cat_id, $orderby, $limit); +} + +/** + * Gets an array of link objects associated with category n. + * + * Usage: + * + * $links = get_linkobjects(1); + * if ($links) { + * foreach ($links as $link) { + * echo '
          10. '.$link->link_name.'
            '.$link->link_description.'
          11. '; + * } + * } + *
            + * + * Fields are: + *
              + *
            1. link_id
            2. + *
            3. link_url
            4. + *
            5. link_name
            6. + *
            7. link_image
            8. + *
            9. link_target
            10. + *
            11. link_category
            12. + *
            13. link_description
            14. + *
            15. link_visible
            16. + *
            17. link_owner
            18. + *
            19. link_rating
            20. + *
            21. link_updated
            22. + *
            23. link_rel
            24. + *
            25. link_notes
            26. + *
            + * + * @since 1.0.1 + * @deprecated 2.1.0 + * @deprecated Use get_bookmarks() + * @see get_bookmarks() + * + * @param int $category The category to use. If no category supplied uses all + * @param string $orderby the order to output the links. E.g. 'id', 'name', 'url', + * 'description', or 'rating'. Or maybe owner. If you start the name with an + * underscore the order will be reversed. You can also specify 'rand' as the + * order which will return links in a random order. + * @param int $limit Limit to X entries. If not specified, all entries are shown. + * @return unknown + */ +function get_linkobjects($category = 0, $orderby = 'name', $limit = 0) { + _deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' ); + + $links = get_bookmarks( array( 'category' => $category, 'orderby' => $orderby, 'limit' => $limit ) ) ; + + $links_array = array(); + foreach ($links as $link) + $links_array[] = $link; + + return $links_array; +} + +/** + * Gets the links associated with category 'cat_name' and display rating stars/chars. + * + * @since 0.71 + * @deprecated 2.1.0 + * @deprecated Use get_bookmarks() + * @see get_bookmarks() + * + * @param string $cat_name The category name to use. If no match is found uses all + * @param string $before The html to output before the link + * @param string $after The html to output after the link + * @param string $between The html to output between the link/image and its description. Not used if no image or show_images is true + * @param bool $show_images Whether to show images (if defined). + * @param string $orderby the order to output the links. E.g. 'id', 'name', 'url', + * 'description', or 'rating'. Or maybe owner. If you start the name with an + * underscore the order will be reversed. You can also specify 'rand' as the + * order which will return links in a random order. + * @param bool $show_description Whether to show the description if show_images=false/not defined + * @param int $limit Limit to X entries. If not specified, all entries are shown. + * @param int $show_updated Whether to show last updated timestamp + */ +function get_linksbyname_withrating($cat_name = "noname", $before = '', $after = '
            ', $between = " ", + $show_images = true, $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) { + _deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' ); + + get_linksbyname($cat_name, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated); +} + +/** + * Gets the links associated with category n and display rating stars/chars. + * + * @since 0.71 + * @deprecated 2.1.0 + * @deprecated Use get_bookmarks() + * @see get_bookmarks() + * + * @param int $category The category to use. If no category supplied uses all + * @param string $before The html to output before the link + * @param string $after The html to output after the link + * @param string $between The html to output between the link/image and its description. Not used if no image or show_images == true + * @param bool $show_images Whether to show images (if defined). + * @param string $orderby The order to output the links. E.g. 'id', 'name', 'url', + * 'description', or 'rating'. Or maybe owner. If you start the name with an + * underscore the order will be reversed. You can also specify 'rand' as the + * order which will return links in a random order. + * @param bool $show_description Whether to show the description if show_images=false/not defined. + * @param string $limit Limit to X entries. If not specified, all entries are shown. + * @param int $show_updated Whether to show last updated timestamp + */ +function get_links_withrating($category = -1, $before = '', $after = '
            ', $between = " ", $show_images = true, + $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) { + _deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' ); + + get_links($category, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated); +} + +/** + * Gets the auto_toggle setting. + * + * @since 0.71 + * @deprecated 2.1.0 + * @deprecated No alternative function available + * + * @param int $id The category to get. If no category supplied uses 0 + * @return int Only returns 0. + */ +function get_autotoggle($id = 0) { + _deprecated_function( __FUNCTION__, '2.1' ); + return 0; +} + +/** + * @since 0.71 + * @deprecated 2.1.0 + * @deprecated Use wp_list_categories() + * @see wp_list_categories() + * + * @param int $optionall + * @param string $all + * @param string $sort_column + * @param string $sort_order + * @param string $file + * @param bool $list + * @param int $optiondates + * @param int $optioncount + * @param int $hide_empty + * @param int $use_desc_for_title + * @param bool $children + * @param int $child_of + * @param int $categories + * @param int $recurse + * @param string $feed + * @param string $feed_image + * @param string $exclude + * @param bool $hierarchical + * @return unknown + */ +function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0, + $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=false, $child_of=0, $categories=0, + $recurse=0, $feed = '', $feed_image = '', $exclude = '', $hierarchical=false) { + _deprecated_function( __FUNCTION__, '2.1', 'wp_list_categories()' ); + + $query = compact('optionall', 'all', 'sort_column', 'sort_order', 'file', 'list', 'optiondates', 'optioncount', 'hide_empty', 'use_desc_for_title', 'children', + 'child_of', 'categories', 'recurse', 'feed', 'feed_image', 'exclude', 'hierarchical'); + return wp_list_cats($query); +} + +/** + * @since 1.2.0 + * @deprecated 2.1.0 + * @deprecated Use wp_list_categories() + * @see wp_list_categories() + * + * @param string|array $args + * @return unknown + */ +function wp_list_cats($args = '') { + _deprecated_function( __FUNCTION__, '2.1', 'wp_list_categories()' ); + + $r = wp_parse_args( $args ); + + // Map to new names. + if ( isset($r['optionall']) && isset($r['all'])) + $r['show_option_all'] = $r['all']; + if ( isset($r['sort_column']) ) + $r['orderby'] = $r['sort_column']; + if ( isset($r['sort_order']) ) + $r['order'] = $r['sort_order']; + if ( isset($r['optiondates']) ) + $r['show_last_update'] = $r['optiondates']; + if ( isset($r['optioncount']) ) + $r['show_count'] = $r['optioncount']; + if ( isset($r['list']) ) + $r['style'] = $r['list'] ? 'list' : 'break'; + $r['title_li'] = ''; + + return wp_list_categories($r); +} + +/** + * @since 0.71 + * @deprecated 2.1.0 + * @deprecated Use wp_dropdown_categories() + * @see wp_dropdown_categories() + * + * @param int $optionall + * @param string $all + * @param string $orderby + * @param string $order + * @param int $show_last_update + * @param int $show_count + * @param int $hide_empty + * @param bool $optionnone + * @param int $selected + * @param int $exclude + * @return unknown + */ +function dropdown_cats($optionall = 1, $all = 'All', $orderby = 'ID', $order = 'asc', + $show_last_update = 0, $show_count = 0, $hide_empty = 1, $optionnone = false, + $selected = 0, $exclude = 0) { + _deprecated_function( __FUNCTION__, '2.1', 'wp_dropdown_categories()' ); + + $show_option_all = ''; + if ( $optionall ) + $show_option_all = $all; + + $show_option_none = ''; + if ( $optionnone ) + $show_option_none = __('None'); + + $vars = compact('show_option_all', 'show_option_none', 'orderby', 'order', + 'show_last_update', 'show_count', 'hide_empty', 'selected', 'exclude'); + $query = add_query_arg($vars, ''); + return wp_dropdown_categories($query); +} + +/** + * List authors. + * + * @since 1.2.0 + * @deprecated 2.1.0 + * @deprecated Use wp_list_authors() + * @see wp_list_authors() + * + * @param bool $optioncount + * @param bool $exclude_admin + * @param bool $show_fullname + * @param bool $hide_empty + * @param string $feed + * @param string $feed_image + * @return unknown + */ +function list_authors($optioncount = false, $exclude_admin = true, $show_fullname = false, $hide_empty = true, $feed = '', $feed_image = '') { + _deprecated_function( __FUNCTION__, '2.1', 'wp_list_authors()' ); + + $args = compact('optioncount', 'exclude_admin', 'show_fullname', 'hide_empty', 'feed', 'feed_image'); + return wp_list_authors($args); +} + +/** + * @since 1.0.1 + * @deprecated 2.1.0 + * @deprecated Use wp_get_post_categories() + * @see wp_get_post_categories() + * + * @param int $blogid Not Used + * @param int $post_ID + * @return unknown + */ +function wp_get_post_cats($blogid = '1', $post_ID = 0) { + _deprecated_function( __FUNCTION__, '2.1', 'wp_get_post_categories()' ); + return wp_get_post_categories($post_ID); +} + +/** + * Sets the categories that the post id belongs to. + * + * @since 1.0.1 + * @deprecated 2.1.0 + * @deprecated Use wp_set_post_categories() + * @see wp_set_post_categories() + * + * @param int $blogid Not used + * @param int $post_ID + * @param array $post_categories + * @return unknown + */ +function wp_set_post_cats($blogid = '1', $post_ID = 0, $post_categories = array()) { + _deprecated_function( __FUNCTION__, '2.1', 'wp_set_post_categories()' ); + return wp_set_post_categories($post_ID, $post_categories); +} + +/** + * @since 0.71 + * @deprecated 2.1.0 + * @deprecated Use wp_get_archives() + * @see wp_get_archives() + * + * @param string $type + * @param string $limit + * @param string $format + * @param string $before + * @param string $after + * @param bool $show_post_count + * @return unknown + */ +function get_archives($type='', $limit='', $format='html', $before = '', $after = '', $show_post_count = false) { + _deprecated_function( __FUNCTION__, '2.1', 'wp_get_archives()' ); + $args = compact('type', 'limit', 'format', 'before', 'after', 'show_post_count'); + return wp_get_archives($args); +} + +/** + * Returns or Prints link to the author's posts. + * + * @since 1.2.0 + * @deprecated 2.1.0 + * @deprecated Use get_author_posts_url() + * @see get_author_posts_url() + * + * @param bool $echo + * @param int $author_id + * @param string $author_nicename Optional. + * @return string|null + */ +function get_author_link($echo, $author_id, $author_nicename = '') { + _deprecated_function( __FUNCTION__, '2.1', 'get_author_posts_url()' ); + + $link = get_author_posts_url($author_id, $author_nicename); + + if ( $echo ) + echo $link; + return $link; +} + +/** + * Print list of pages based on arguments. + * + * @since 0.71 + * @deprecated 2.1.0 + * @deprecated Use wp_link_pages() + * @see wp_link_pages() + * + * @param string $before + * @param string $after + * @param string $next_or_number + * @param string $nextpagelink + * @param string $previouspagelink + * @param string $pagelink + * @param string $more_file + * @return string + */ +function link_pages($before='
            ', $after='
            ', $next_or_number='number', $nextpagelink='next page', $previouspagelink='previous page', + $pagelink='%', $more_file='') { + _deprecated_function( __FUNCTION__, '2.1', 'wp_link_pages()' ); + + $args = compact('before', 'after', 'next_or_number', 'nextpagelink', 'previouspagelink', 'pagelink', 'more_file'); + return wp_link_pages($args); +} + +/** + * Get value based on option. + * + * @since 0.71 + * @deprecated 2.1.0 + * @deprecated Use get_option() + * @see get_option() + * + * @param string $option + * @return string + */ +function get_settings($option) { + _deprecated_function( __FUNCTION__, '2.1', 'get_option()' ); + + return get_option($option); +} + +/** + * Print the permalink of the current post in the loop. + * + * @since 0.71 + * @deprecated 1.2.0 + * @deprecated Use the_permalink() + * @see the_permalink() + */ +function permalink_link() { + _deprecated_function( __FUNCTION__, '1.2', 'the_permalink()' ); + the_permalink(); +} + +/** + * Print the permalink to the RSS feed. + * + * @since 0.71 + * @deprecated 2.3.0 + * @deprecated Use the_permalink_rss() + * @see the_permalink_rss() + * + * @param string $deprecated + */ +function permalink_single_rss($deprecated = '') { + _deprecated_function( __FUNCTION__, '2.3', 'the_permalink_rss()' ); + the_permalink_rss(); +} + +/** + * Gets the links associated with category. + * + * @see get_links() for argument information that can be used in $args + * @since 1.0.1 + * @deprecated 2.1.0 + * @deprecated Use wp_list_bookmarks() + * @see wp_list_bookmarks() + * + * @param string $args a query string + * @return null|string + */ +function wp_get_links($args = '') { + _deprecated_function( __FUNCTION__, '2.1', 'wp_list_bookmarks()' ); + + if ( strpos( $args, '=' ) === false ) { + $cat_id = $args; + $args = add_query_arg( 'category', $cat_id, $args ); + } + + $defaults = array( + 'after' => '
            ', + 'before' => '', + 'between' => ' ', + 'categorize' => 0, + 'category' => '', + 'echo' => true, + 'limit' => -1, + 'orderby' => 'name', + 'show_description' => true, + 'show_images' => true, + 'show_rating' => false, + 'show_updated' => true, + 'title_li' => '', + ); + + $r = wp_parse_args( $args, $defaults ); + + return wp_list_bookmarks($r); +} + +/** + * Gets the links associated with category by id. + * + * @since 0.71 + * @deprecated 2.1.0 + * @deprecated Use get_bookmarks() + * @see get_bookmarks() + * + * @param int $category The category to use. If no category supplied uses all + * @param string $before the html to output before the link + * @param string $after the html to output after the link + * @param string $between the html to output between the link/image and its description. + * Not used if no image or show_images == true + * @param bool $show_images whether to show images (if defined). + * @param string $orderby the order to output the links. E.g. 'id', 'name', 'url', + * 'description', or 'rating'. Or maybe owner. If you start the name with an + * underscore the order will be reversed. You can also specify 'rand' as the order + * which will return links in a random order. + * @param bool $show_description whether to show the description if show_images=false/not defined. + * @param bool $show_rating show rating stars/chars + * @param int $limit Limit to X entries. If not specified, all entries are shown. + * @param int $show_updated whether to show last updated timestamp + * @param bool $echo whether to echo the results, or return them instead + * @return null|string + */ +function get_links($category = -1, $before = '', $after = '
            ', $between = ' ', $show_images = true, $orderby = 'name', + $show_description = true, $show_rating = false, $limit = -1, $show_updated = 1, $echo = true) { + _deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' ); + + $order = 'ASC'; + if ( substr($orderby, 0, 1) == '_' ) { + $order = 'DESC'; + $orderby = substr($orderby, 1); + } + + if ( $category == -1 ) //get_bookmarks uses '' to signify all categories + $category = ''; + + $results = get_bookmarks(array('category' => $category, 'orderby' => $orderby, 'order' => $order, 'show_updated' => $show_updated, 'limit' => $limit)); + + if ( !$results ) + return; + + $output = ''; + + foreach ( (array) $results as $row ) { + if ( !isset($row->recently_updated) ) + $row->recently_updated = false; + $output .= $before; + if ( $show_updated && $row->recently_updated ) + $output .= get_option('links_recently_updated_prepend'); + $the_link = '#'; + if ( !empty($row->link_url) ) + $the_link = esc_url($row->link_url); + $rel = $row->link_rel; + if ( '' != $rel ) + $rel = ' rel="' . $rel . '"'; + + $desc = esc_attr(sanitize_bookmark_field('link_description', $row->link_description, $row->link_id, 'display')); + $name = esc_attr(sanitize_bookmark_field('link_name', $row->link_name, $row->link_id, 'display')); + $title = $desc; + + if ( $show_updated ) + if (substr($row->link_updated_f, 0, 2) != '00') + $title .= ' ('.__('Last updated') . ' ' . date(get_option('links_updated_date_format'), $row->link_updated_f + (get_option('gmt_offset') * HOUR_IN_SECONDS)) . ')'; + + if ( '' != $title ) + $title = ' title="' . $title . '"'; + + $alt = ' alt="' . $name . '"'; + + $target = $row->link_target; + if ( '' != $target ) + $target = ' target="' . $target . '"'; + + $output .= ''; + + if ( $row->link_image != null && $show_images ) { + if ( strpos($row->link_image, 'http') !== false ) + $output .= "link_image\" $alt $title />"; + else // If it's a relative path + $output .= "link_image\" $alt $title />"; + } else { + $output .= $name; + } + + $output .= ''; + + if ( $show_updated && $row->recently_updated ) + $output .= get_option('links_recently_updated_append'); + + if ( $show_description && '' != $desc ) + $output .= $between . $desc; + + if ($show_rating) { + $output .= $between . get_linkrating($row); + } + + $output .= "$after\n"; + } // end while + + if ( !$echo ) + return $output; + echo $output; +} + +/** + * Output entire list of links by category. + * + * Output a list of all links, listed by category, using the settings in + * $wpdb->linkcategories and output it as a nested HTML unordered list. + * + * @since 1.0.1 + * @deprecated 2.1.0 + * @deprecated Use wp_list_bookmarks() + * @see wp_list_bookmarks() + * + * @param string $order Sort link categories by 'name' or 'id' + */ +function get_links_list($order = 'name') { + _deprecated_function( __FUNCTION__, '2.1', 'wp_list_bookmarks()' ); + + $order = strtolower($order); + + // Handle link category sorting + $direction = 'ASC'; + if ( '_' == substr($order,0,1) ) { + $direction = 'DESC'; + $order = substr($order,1); + } + + if ( !isset($direction) ) + $direction = ''; + + $cats = get_categories(array('type' => 'link', 'orderby' => $order, 'order' => $direction, 'hierarchical' => 0)); + + // Display each category + if ( $cats ) { + foreach ( (array) $cats as $cat ) { + // Handle each category. + + // Display the category name + echo '
          12. ' . apply_filters('link_category', $cat->name ) . "

            \n\t
              \n"; + // Call get_links() with all the appropriate params + get_links($cat->term_id, '
            • ', "
            • ", "\n", true, 'name', false); + + // Close the last category + echo "\n\t
            \n
          13. \n"; + } + } +} + +/** + * Show the link to the links popup and the number of links. + * + * @since 0.71 + * @deprecated 2.1.0 + * @deprecated {@internal Use function instead is unknown}} + * + * @param string $text the text of the link + * @param int $width the width of the popup window + * @param int $height the height of the popup window + * @param string $file the page to open in the popup window + * @param bool $count the number of links in the db + */ +function links_popup_script($text = 'Links', $width=400, $height=400, $file='links.all.php', $count = true) { + _deprecated_function( __FUNCTION__, '2.1' ); +} + +/** + * @since 1.0.1 + * @deprecated 2.1.0 + * @deprecated Use sanitize_bookmark_field() + * @see sanitize_bookmark_field() + * + * @param object $link + * @return unknown + */ +function get_linkrating($link) { + _deprecated_function( __FUNCTION__, '2.1', 'sanitize_bookmark_field()' ); + return sanitize_bookmark_field('link_rating', $link->link_rating, $link->link_id, 'display'); +} + +/** + * Gets the name of category by id. + * + * @since 0.71 + * @deprecated 2.1.0 + * @deprecated Use get_category() + * @see get_category() + * + * @param int $id The category to get. If no category supplied uses 0 + * @return string + */ +function get_linkcatname($id = 0) { + _deprecated_function( __FUNCTION__, '2.1', 'get_category()' ); + + $id = (int) $id; + + if ( empty($id) ) + return ''; + + $cats = wp_get_link_cats($id); + + if ( empty($cats) || ! is_array($cats) ) + return ''; + + $cat_id = (int) $cats[0]; // Take the first cat. + + $cat = get_category($cat_id); + return $cat->name; +} + +/** + * Print RSS comment feed link. + * + * @since 1.0.1 + * @deprecated 2.5.0 + * @deprecated Use post_comments_feed_link() + * @see post_comments_feed_link() + * + * @param string $link_text + */ +function comments_rss_link($link_text = 'Comments RSS') { + _deprecated_function( __FUNCTION__, '2.5', 'post_comments_feed_link()' ); + post_comments_feed_link($link_text); +} + +/** + * Print/Return link to category RSS2 feed. + * + * @since 1.2.0 + * @deprecated 2.5.0 + * @deprecated Use get_category_feed_link() + * @see get_category_feed_link() + * + * @param bool $echo + * @param int $cat_ID + * @return string|null + */ +function get_category_rss_link($echo = false, $cat_ID = 1) { + _deprecated_function( __FUNCTION__, '2.5', 'get_category_feed_link()' ); + + $link = get_category_feed_link($cat_ID, 'rss2'); + + if ( $echo ) + echo $link; + return $link; +} + +/** + * Print/Return link to author RSS feed. + * + * @since 1.2.0 + * @deprecated 2.5.0 + * @deprecated Use get_author_feed_link() + * @see get_author_feed_link() + * + * @param bool $echo + * @param int $author_id + * @return string|null + */ +function get_author_rss_link($echo = false, $author_id = 1) { + _deprecated_function( __FUNCTION__, '2.5', 'get_author_feed_link()' ); + + $link = get_author_feed_link($author_id); + if ( $echo ) + echo $link; + return $link; +} + +/** + * Return link to the post RSS feed. + * + * @since 1.5.0 + * @deprecated 2.2.0 + * @deprecated Use get_post_comments_feed_link() + * @see get_post_comments_feed_link() + * + * @return string + */ +function comments_rss() { + _deprecated_function( __FUNCTION__, '2.2', 'get_post_comments_feed_link()' ); + return esc_url( get_post_comments_feed_link() ); +} + +/** + * An alias of wp_create_user(). + * + * @since 2.0.0 + * @deprecated 2.0.0 + * @deprecated Use wp_create_user() + * @see wp_create_user() + * + * @param string $username The user's username. + * @param string $password The user's password. + * @param string $email The user's email (optional). + * @return int The new user's ID. + */ +function create_user($username, $password, $email) { + _deprecated_function( __FUNCTION__, '2.0', 'wp_create_user()' ); + return wp_create_user($username, $password, $email); +} + +/** + * Unused function. + * + * @deprecated 2.5.0 +*/ +function gzip_compression() { + _deprecated_function( __FUNCTION__, '2.5' ); + return false; +} + +/** + * Retrieve an array of comment data about comment $comment_ID. + * + * @since 0.71 + * @deprecated 2.7.0 + * @deprecated Use get_comment() + * @see get_comment() + * + * @param int $comment_ID The ID of the comment + * @param int $no_cache Whether to use the cache (cast to bool) + * @param bool $include_unapproved Whether to include unapproved comments + * @return array The comment data + */ +function get_commentdata( $comment_ID, $no_cache = 0, $include_unapproved = false ) { + _deprecated_function( __FUNCTION__, '2.7', 'get_comment()' ); + return get_comment($comment_ID, ARRAY_A); +} + +/** + * Retrieve the category name by the category ID. + * + * @since 0.71 + * @deprecated 2.8.0 + * @deprecated Use get_cat_name() + * @see get_cat_name() + * + * @param int $cat_ID Category ID + * @return string category name + */ +function get_catname( $cat_ID ) { + _deprecated_function( __FUNCTION__, '2.8', 'get_cat_name()' ); + return get_cat_name( $cat_ID ); +} + +/** + * Retrieve category children list separated before and after the term IDs. + * + * @since 1.2.0 + * @deprecated 2.8.0 + * @deprecated Use get_term_children() + * @see get_term_children() + * + * @param int $id Category ID to retrieve children. + * @param string $before Optional. Prepend before category term ID. + * @param string $after Optional, default is empty string. Append after category term ID. + * @param array $visited Optional. Category Term IDs that have already been added. + * @return string + */ +function get_category_children( $id, $before = '/', $after = '', $visited = array() ) { + _deprecated_function( __FUNCTION__, '2.8', 'get_term_children()' ); + if ( 0 == $id ) + return ''; + + $chain = ''; + /** TODO: consult hierarchy */ + $cat_ids = get_all_category_ids(); + foreach ( (array) $cat_ids as $cat_id ) { + if ( $cat_id == $id ) + continue; + + $category = get_category( $cat_id ); + if ( is_wp_error( $category ) ) + return $category; + if ( $category->parent == $id && !in_array( $category->term_id, $visited ) ) { + $visited[] = $category->term_id; + $chain .= $before.$category->term_id.$after; + $chain .= get_category_children( $category->term_id, $before, $after ); + } + } + return $chain; +} + +/** + * Retrieve the description of the author of the current post. + * + * @since 1.5.0 + * @deprecated 2.8.0 + * @deprecated Use get_the_author_meta('description') + * @see get_the_author_meta() + * + * @return string The author's description. + */ +function get_the_author_description() { + _deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'description\')' ); + return get_the_author_meta('description'); +} + +/** + * Display the description of the author of the current post. + * + * @since 1.0.0 + * @deprecated 2.8.0 + * @deprecated Use the_author_meta('description') + * @see the_author_meta() + */ +function the_author_description() { + _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'description\')' ); + the_author_meta('description'); +} + +/** + * Retrieve the login name of the author of the current post. + * + * @since 1.5.0 + * @deprecated 2.8.0 + * @deprecated Use get_the_author_meta('login') + * @see get_the_author_meta() + * + * @return string The author's login name (username). + */ +function get_the_author_login() { + _deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'login\')' ); + return get_the_author_meta('login'); +} + +/** + * Display the login name of the author of the current post. + * + * @since 0.71 + * @deprecated 2.8.0 + * @deprecated Use the_author_meta('login') + * @see the_author_meta() + */ +function the_author_login() { + _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'login\')' ); + the_author_meta('login'); +} + +/** + * Retrieve the first name of the author of the current post. + * + * @since 1.5.0 + * @deprecated 2.8.0 + * @deprecated Use get_the_author_meta('first_name') + * @see get_the_author_meta() + * + * @return string The author's first name. + */ +function get_the_author_firstname() { + _deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'first_name\')' ); + return get_the_author_meta('first_name'); +} + +/** + * Display the first name of the author of the current post. + * + * @since 0.71 + * @deprecated 2.8.0 + * @deprecated Use the_author_meta('first_name') + * @see the_author_meta() + */ +function the_author_firstname() { + _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'first_name\')' ); + the_author_meta('first_name'); +} + +/** + * Retrieve the last name of the author of the current post. + * + * @since 1.5.0 + * @deprecated 2.8.0 + * @deprecated Use get_the_author_meta('last_name') + * @see get_the_author_meta() + * + * @return string The author's last name. + */ +function get_the_author_lastname() { + _deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'last_name\')' ); + return get_the_author_meta('last_name'); +} + +/** + * Display the last name of the author of the current post. + * + * @since 0.71 + * @deprecated 2.8.0 + * @deprecated Use the_author_meta('last_name') + * @see the_author_meta() + */ +function the_author_lastname() { + _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'last_name\')' ); + the_author_meta('last_name'); +} + +/** + * Retrieve the nickname of the author of the current post. + * + * @since 1.5.0 + * @deprecated 2.8.0 + * @deprecated Use get_the_author_meta('nickname') + * @see get_the_author_meta() + * + * @return string The author's nickname. + */ +function get_the_author_nickname() { + _deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'nickname\')' ); + return get_the_author_meta('nickname'); +} + +/** + * Display the nickname of the author of the current post. + * + * @since 0.71 + * @deprecated 2.8.0 + * @deprecated Use the_author_meta('nickname') + * @see the_author_meta() + */ +function the_author_nickname() { + _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'nickname\')' ); + the_author_meta('nickname'); +} + +/** + * Retrieve the email of the author of the current post. + * + * @since 1.5.0 + * @deprecated 2.8.0 + * @deprecated Use get_the_author_meta('email') + * @see get_the_author_meta() + * + * @return string The author's username. + */ +function get_the_author_email() { + _deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'email\')' ); + return get_the_author_meta('email'); +} + +/** + * Display the email of the author of the current post. + * + * @since 0.71 + * @deprecated 2.8.0 + * @deprecated Use the_author_meta('email') + * @see the_author_meta() + */ +function the_author_email() { + _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'email\')' ); + the_author_meta('email'); +} + +/** + * Retrieve the ICQ number of the author of the current post. + * + * @since 1.5.0 + * @deprecated 2.8.0 + * @deprecated Use get_the_author_meta('icq') + * @see get_the_author_meta() + * + * @return string The author's ICQ number. + */ +function get_the_author_icq() { + _deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'icq\')' ); + return get_the_author_meta('icq'); +} + +/** + * Display the ICQ number of the author of the current post. + * + * @since 0.71 + * @deprecated 2.8.0 + * @deprecated Use the_author_meta('icq') + * @see the_author_meta() + */ +function the_author_icq() { + _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'icq\')' ); + the_author_meta('icq'); +} + +/** + * Retrieve the Yahoo! IM name of the author of the current post. + * + * @since 1.5.0 + * @deprecated 2.8.0 + * @deprecated Use get_the_author_meta('yim') + * @see get_the_author_meta() + * + * @return string The author's Yahoo! IM name. + */ +function get_the_author_yim() { + _deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'yim\')' ); + return get_the_author_meta('yim'); +} + +/** + * Display the Yahoo! IM name of the author of the current post. + * + * @since 0.71 + * @deprecated 2.8.0 + * @deprecated Use the_author_meta('yim') + * @see the_author_meta() + */ +function the_author_yim() { + _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'yim\')' ); + the_author_meta('yim'); +} + +/** + * Retrieve the MSN address of the author of the current post. + * + * @since 1.5.0 + * @deprecated 2.8.0 + * @deprecated Use get_the_author_meta('msn') + * @see get_the_author_meta() + * + * @return string The author's MSN address. + */ +function get_the_author_msn() { + _deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'msn\')' ); + return get_the_author_meta('msn'); +} + +/** + * Display the MSN address of the author of the current post. + * + * @since 0.71 + * @deprecated 2.8.0 + * @deprecated Use the_author_meta('msn') + * @see the_author_meta() + */ +function the_author_msn() { + _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'msn\')' ); + the_author_meta('msn'); +} + +/** + * Retrieve the AIM address of the author of the current post. + * + * @since 1.5.0 + * @deprecated 2.8.0 + * @deprecated Use get_the_author_meta('aim') + * @see get_the_author_meta() + * + * @return string The author's AIM address. + */ +function get_the_author_aim() { + _deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'aim\')' ); + return get_the_author_meta('aim'); +} + +/** + * Display the AIM address of the author of the current post. + * + * @since 0.71 + * @see the_author_meta() + * @deprecated 2.8.0 + * @deprecated Use the_author_meta('aim') + */ +function the_author_aim() { + _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'aim\')' ); + the_author_meta('aim'); +} + +/** + * Retrieve the specified author's preferred display name. + * + * @since 1.0.0 + * @deprecated 2.8.0 + * @deprecated Use get_the_author_meta('display_name') + * @see get_the_author_meta() + * + * @param int $auth_id The ID of the author. + * @return string The author's display name. + */ +function get_author_name( $auth_id = false ) { + _deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'display_name\')' ); + return get_the_author_meta('display_name', $auth_id); +} + +/** + * Retrieve the URL to the home page of the author of the current post. + * + * @since 1.5.0 + * @deprecated 2.8.0 + * @deprecated Use get_the_author_meta('url') + * @see get_the_author_meta() + * + * @return string The URL to the author's page. + */ +function get_the_author_url() { + _deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'url\')' ); + return get_the_author_meta('url'); +} + +/** + * Display the URL to the home page of the author of the current post. + * + * @since 0.71 + * @deprecated 2.8.0 + * @deprecated Use the_author_meta('url') + * @see the_author_meta() + */ +function the_author_url() { + _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'url\')' ); + the_author_meta('url'); +} + +/** + * Retrieve the ID of the author of the current post. + * + * @since 1.5.0 + * @deprecated 2.8.0 + * @deprecated Use get_the_author_meta('ID') + * @see get_the_author_meta() + * + * @return int The author's ID. + */ +function get_the_author_ID() { + _deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'ID\')' ); + return get_the_author_meta('ID'); +} + +/** + * Display the ID of the author of the current post. + * + * @since 0.71 + * @deprecated 2.8.0 + * @deprecated Use the_author_meta('ID') + * @see the_author_meta() +*/ +function the_author_ID() { + _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'ID\')' ); + the_author_meta('ID'); +} + +/** + * Display the post content for the feed. + * + * For encoding the html or the $encode_html parameter, there are three possible + * values. '0' will make urls footnotes and use make_url_footnote(). '1' will + * encode special characters and automatically display all of the content. The + * value of '2' will strip all HTML tags from the content. + * + * Also note that you cannot set the amount of words and not set the html + * encoding. If that is the case, then the html encoding will default to 2, + * which will strip all HTML tags. + * + * To restrict the amount of words of the content, you can use the cut + * parameter. If the content is less than the amount, then there won't be any + * dots added to the end. If there is content left over, then dots will be added + * and the rest of the content will be removed. + * + * @since 0.71 + * @uses apply_filters() Calls 'the_content_rss' on the content before processing. + * + * @deprecated 2.9.0 + * @deprecated Use the_content_feed() + * @see the_content_feed() + * + * @param string $more_link_text Optional. Text to display when more content is available but not displayed. + * @param int|bool $stripteaser Optional. Default is 0. + * @param string $more_file Optional. + * @param int $cut Optional. Amount of words to keep for the content. + * @param int $encode_html Optional. How to encode the content. + */ +function the_content_rss($more_link_text='(more...)', $stripteaser=0, $more_file='', $cut = 0, $encode_html = 0) { + _deprecated_function( __FUNCTION__, '2.9', 'the_content_feed' ); + $content = get_the_content($more_link_text, $stripteaser); + $content = apply_filters('the_content_rss', $content); + if ( $cut && !$encode_html ) + $encode_html = 2; + if ( 1== $encode_html ) { + $content = esc_html($content); + $cut = 0; + } elseif ( 0 == $encode_html ) { + $content = make_url_footnote($content); + } elseif ( 2 == $encode_html ) { + $content = strip_tags($content); + } + if ( $cut ) { + $blah = explode(' ', $content); + if ( count($blah) > $cut ) { + $k = $cut; + $use_dotdotdot = 1; + } else { + $k = count($blah); + $use_dotdotdot = 0; + } + + /** @todo Check performance, might be faster to use array slice instead. */ + for ( $i=0; $i<$k; $i++ ) + $excerpt .= $blah[$i].' '; + $excerpt .= ($use_dotdotdot) ? '...' : ''; + $content = $excerpt; + } + $content = str_replace(']]>', ']]>', $content); + echo $content; +} + +/** + * Strip HTML and put links at the bottom of stripped content. + * + * Searches for all of the links, strips them out of the content, and places + * them at the bottom of the content with numbers. + * + * @since 0.71 + * @deprecated 2.9.0 + * + * @param string $content Content to get links + * @return string HTML stripped out of content with links at the bottom. + */ +function make_url_footnote( $content ) { + _deprecated_function( __FUNCTION__, '2.9', '' ); + preg_match_all( '/(.+?)<\/a>/', $content, $matches ); + $links_summary = "\n"; + for ( $i=0; $ipost_type) || !$url = wp_get_attachment_url($_post->ID) ) + return __('Missing Attachment'); + + if ( $permalink ) + $url = get_attachment_link($_post->ID); + + $post_title = esc_attr($_post->post_title); + + $innerHTML = get_attachment_innerHTML($_post->ID, $fullsize, $max_dims); + return "$innerHTML"; +} + +/** + * Retrieve icon URL and Path. + * + * @since 2.1.0 + * @deprecated 2.5.0 + * @deprecated Use wp_get_attachment_image_src() + * @see wp_get_attachment_image_src() + * + * @param int $id Optional. Post ID. + * @param bool $fullsize Optional, default to false. Whether to have full image. + * @return array Icon URL and full path to file, respectively. + */ +function get_attachment_icon_src( $id = 0, $fullsize = false ) { + _deprecated_function( __FUNCTION__, '2.5', 'wp_get_attachment_image_src()' ); + $id = (int) $id; + if ( !$post = get_post($id) ) + return false; + + $file = get_attached_file( $post->ID ); + + if ( !$fullsize && $src = wp_get_attachment_thumb_url( $post->ID ) ) { + // We have a thumbnail desired, specified and existing + + $src_file = basename($src); + $class = 'attachmentthumb'; + } elseif ( wp_attachment_is_image( $post->ID ) ) { + // We have an image without a thumbnail + + $src = wp_get_attachment_url( $post->ID ); + $src_file = & $file; + $class = 'attachmentimage'; + } elseif ( $src = wp_mime_type_icon( $post->ID ) ) { + // No thumb, no image. We'll look for a mime-related icon instead. + + $icon_dir = apply_filters( 'icon_dir', get_template_directory() . '/images' ); + $src_file = $icon_dir . '/' . basename($src); + } + + if ( !isset($src) || !$src ) + return false; + + return array($src, $src_file); +} + +/** + * Retrieve HTML content of icon attachment image element. + * + * @since 2.0.0 + * @deprecated 2.5.0 + * @deprecated Use wp_get_attachment_image() + * @see wp_get_attachment_image() + * + * @param int $id Optional. Post ID. + * @param bool $fullsize Optional, default to false. Whether to have full size image. + * @param array $max_dims Optional. Dimensions of image. + * @return string HTML content. + */ +function get_attachment_icon( $id = 0, $fullsize = false, $max_dims = false ) { + _deprecated_function( __FUNCTION__, '2.5', 'wp_get_attachment_image()' ); + $id = (int) $id; + if ( !$post = get_post($id) ) + return false; + + if ( !$src = get_attachment_icon_src( $post->ID, $fullsize ) ) + return false; + + list($src, $src_file) = $src; + + // Do we need to constrain the image? + if ( ($max_dims = apply_filters('attachment_max_dims', $max_dims)) && file_exists($src_file) ) { + + $imagesize = getimagesize($src_file); + + if (($imagesize[0] > $max_dims[0]) || $imagesize[1] > $max_dims[1] ) { + $actual_aspect = $imagesize[0] / $imagesize[1]; + $desired_aspect = $max_dims[0] / $max_dims[1]; + + if ( $actual_aspect >= $desired_aspect ) { + $height = $actual_aspect * $max_dims[0]; + $constraint = "width='{$max_dims[0]}' "; + $post->iconsize = array($max_dims[0], $height); + } else { + $width = $max_dims[1] / $actual_aspect; + $constraint = "height='{$max_dims[1]}' "; + $post->iconsize = array($width, $max_dims[1]); + } + } else { + $post->iconsize = array($imagesize[0], $imagesize[1]); + $constraint = ''; + } + } else { + $constraint = ''; + } + + $post_title = esc_attr($post->post_title); + + $icon = "$post_title"; + + return apply_filters( 'attachment_icon', $icon, $post->ID ); +} + +/** + * Retrieve HTML content of image element. + * + * @since 2.0.0 + * @deprecated 2.5.0 + * @deprecated Use wp_get_attachment_image() + * @see wp_get_attachment_image() + * + * @param int $id Optional. Post ID. + * @param bool $fullsize Optional, default to false. Whether to have full size image. + * @param array $max_dims Optional. Dimensions of image. + * @return string + */ +function get_attachment_innerHTML($id = 0, $fullsize = false, $max_dims = false) { + _deprecated_function( __FUNCTION__, '2.5', 'wp_get_attachment_image()' ); + $id = (int) $id; + if ( !$post = get_post($id) ) + return false; + + if ( $innerHTML = get_attachment_icon($post->ID, $fullsize, $max_dims)) + return $innerHTML; + + $innerHTML = esc_attr($post->post_title); + + return apply_filters('attachment_innerHTML', $innerHTML, $post->ID); +} + +/** + * Retrieve bookmark data based on ID. + * + * @since 2.0.0 + * @deprecated 2.1.0 + * @deprecated Use get_bookmark() + * @see get_bookmark() + * + * @param int $bookmark_id ID of link + * @param string $output OBJECT, ARRAY_N, or ARRAY_A + * @return object|array + */ +function get_link($bookmark_id, $output = OBJECT, $filter = 'raw') { + _deprecated_function( __FUNCTION__, '2.1', 'get_bookmark()' ); + return get_bookmark($bookmark_id, $output, $filter); +} + +/** + * Performs esc_url() for database or redirect usage. + * + * @since 2.3.1 + * @deprecated 2.8.0 + * @deprecated Use esc_url_raw() + * @see esc_url_raw() + * + * @param string $url The URL to be cleaned. + * @param array $protocols An array of acceptable protocols. + * @return string The cleaned URL. + */ +function sanitize_url( $url, $protocols = null ) { + _deprecated_function( __FUNCTION__, '2.8', 'esc_url_raw()' ); + return esc_url_raw( $url, $protocols ); +} + +/** + * Checks and cleans a URL. + * + * A number of characters are removed from the URL. If the URL is for displaying + * (the default behaviour) ampersands are also replaced. The 'clean_url' filter + * is applied to the returned cleaned URL. + * + * @since 1.2.0 + * @deprecated 3.0.0 + * @deprecated Use esc_url() + * @see Alias for esc_url() + * + * @param string $url The URL to be cleaned. + * @param array $protocols Optional. An array of acceptable protocols. + * @param string $context Optional. How the URL will be used. Default is 'display'. + * @return string The cleaned $url after the 'clean_url' filter is applied. + */ +function clean_url( $url, $protocols = null, $context = 'display' ) { + if ( $context == 'db' ) + _deprecated_function( 'clean_url( $context = \'db\' )', '3.0', 'esc_url_raw()' ); + else + _deprecated_function( __FUNCTION__, '3.0', 'esc_url()' ); + return esc_url( $url, $protocols, $context ); +} + +/** + * Escape single quotes, specialchar double quotes, and fix line endings. + * + * The filter 'js_escape' is also applied by esc_js() + * + * @since 2.0.4 + * @deprecated 2.8.0 + * @deprecated Use esc_js() + * @see esc_js() + * + * @param string $text The text to be escaped. + * @return string Escaped text. + */ +function js_escape( $text ) { + _deprecated_function( __FUNCTION__, '2.8', 'esc_js()' ); + return esc_js( $text ); +} + +/** + * Escaping for HTML blocks. + * + * @deprecated 2.8.0 + * @deprecated Use esc_html() + * @see esc_html() + */ +function wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) { + _deprecated_function( __FUNCTION__, '2.8', 'esc_html()' ); + if ( func_num_args() > 1 ) { // Maintain backwards compat for people passing additional args + $args = func_get_args(); + return call_user_func_array( '_wp_specialchars', $args ); + } else { + return esc_html( $string ); + } +} + +/** + * Escaping for HTML attributes. + * + * @since 2.0.6 + * @deprecated 2.8.0 + * @deprecated Use esc_attr() + * @see esc_attr() + * + * @param string $text + * @return string + */ +function attribute_escape( $text ) { + _deprecated_function( __FUNCTION__, '2.8', 'esc_attr()' ); + return esc_attr( $text ); +} + +/** + * Register widget for sidebar with backwards compatibility. + * + * Allows $name to be an array that accepts either three elements to grab the + * first element and the third for the name or just uses the first element of + * the array for the name. + * + * Passes to {@link wp_register_sidebar_widget()} after argument list and + * backwards compatibility is complete. + * + * @since 2.2.0 + * @deprecated 2.8.0 + * @deprecated Use wp_register_sidebar_widget() + * @see wp_register_sidebar_widget() + * + * @param string|int $name Widget ID. + * @param callback $output_callback Run when widget is called. + * @param string $classname Classname widget option. + * @param mixed $params,... Widget parameters. + */ +function register_sidebar_widget($name, $output_callback, $classname = '') { + _deprecated_function( __FUNCTION__, '2.8', 'wp_register_sidebar_widget()' ); + // Compat + if ( is_array($name) ) { + if ( count($name) == 3 ) + $name = sprintf($name[0], $name[2]); + else + $name = $name[0]; + } + + $id = sanitize_title($name); + $options = array(); + if ( !empty($classname) && is_string($classname) ) + $options['classname'] = $classname; + $params = array_slice(func_get_args(), 2); + $args = array($id, $name, $output_callback, $options); + if ( !empty($params) ) + $args = array_merge($args, $params); + + call_user_func_array('wp_register_sidebar_widget', $args); +} + +/** + * Alias of {@link wp_unregister_sidebar_widget()}. + * + * @since 2.2.0 + * @deprecated 2.8.0 + * @deprecated Use wp_unregister_sidebar_widget() + * @see wp_unregister_sidebar_widget() + * + * @param int|string $id Widget ID. + */ +function unregister_sidebar_widget($id) { + _deprecated_function( __FUNCTION__, '2.8', 'wp_unregister_sidebar_widget()' ); + return wp_unregister_sidebar_widget($id); +} + +/** + * Registers widget control callback for customizing options. + * + * Allows $name to be an array that accepts either three elements to grab the + * first element and the third for the name or just uses the first element of + * the array for the name. + * + * Passes to {@link wp_register_widget_control()} after the argument list has + * been compiled. + * + * @since 2.2.0 + * @deprecated 2.8.0 + * @deprecated Use wp_register_widget_control() + * @see wp_register_widget_control() + * + * @param int|string $name Sidebar ID. + * @param callback $control_callback Widget control callback to display and process form. + * @param int $width Widget width. + * @param int $height Widget height. + */ +function register_widget_control($name, $control_callback, $width = '', $height = '') { + _deprecated_function( __FUNCTION__, '2.8', 'wp_register_widget_control()' ); + // Compat + if ( is_array($name) ) { + if ( count($name) == 3 ) + $name = sprintf($name[0], $name[2]); + else + $name = $name[0]; + } + + $id = sanitize_title($name); + $options = array(); + if ( !empty($width) ) + $options['width'] = $width; + if ( !empty($height) ) + $options['height'] = $height; + $params = array_slice(func_get_args(), 4); + $args = array($id, $name, $control_callback, $options); + if ( !empty($params) ) + $args = array_merge($args, $params); + + call_user_func_array('wp_register_widget_control', $args); +} + +/** + * Alias of {@link wp_unregister_widget_control()}. + * + * @since 2.2.0 + * @deprecated 2.8.0 + * @deprecated Use wp_unregister_widget_control() + * @see wp_unregister_widget_control() + * + * @param int|string $id Widget ID. + */ +function unregister_widget_control($id) { + _deprecated_function( __FUNCTION__, '2.8', 'wp_unregister_widget_control()' ); + return wp_unregister_widget_control($id); +} + +/** + * Remove user meta data. + * + * @since 2.0.0 + * @deprecated 3.0.0 + * @deprecated Use delete_user_meta() + * @see delete_user_meta() + * + * @param int $user_id User ID. + * @param string $meta_key Metadata key. + * @param mixed $meta_value Metadata value. + * @return bool True deletion completed and false if user_id is not a number. + */ +function delete_usermeta( $user_id, $meta_key, $meta_value = '' ) { + _deprecated_function( __FUNCTION__, '3.0', 'delete_user_meta()' ); + global $wpdb; + if ( !is_numeric( $user_id ) ) + return false; + $meta_key = preg_replace('|[^a-z0-9_]|i', '', $meta_key); + + if ( is_array($meta_value) || is_object($meta_value) ) + $meta_value = serialize($meta_value); + $meta_value = trim( $meta_value ); + + $cur = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s", $user_id, $meta_key) ); + + if ( $cur && $cur->umeta_id ) + do_action( 'delete_usermeta', $cur->umeta_id, $user_id, $meta_key, $meta_value ); + + if ( ! empty($meta_value) ) + $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s AND meta_value = %s", $user_id, $meta_key, $meta_value) ); + else + $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s", $user_id, $meta_key) ); + + clean_user_cache( $user_id ); + wp_cache_delete( $user_id, 'user_meta' ); + + if ( $cur && $cur->umeta_id ) + do_action( 'deleted_usermeta', $cur->umeta_id, $user_id, $meta_key, $meta_value ); + + return true; +} + +/** + * Retrieve user metadata. + * + * If $user_id is not a number, then the function will fail over with a 'false' + * boolean return value. Other returned values depend on whether there is only + * one item to be returned, which be that single item type. If there is more + * than one metadata value, then it will be list of metadata values. + * + * @since 2.0.0 + * @deprecated 3.0.0 + * @deprecated Use get_user_meta() + * @see get_user_meta() + * + * @param int $user_id User ID + * @param string $meta_key Optional. Metadata key. + * @return mixed + */ +function get_usermeta( $user_id, $meta_key = '' ) { + _deprecated_function( __FUNCTION__, '3.0', 'get_user_meta()' ); + global $wpdb; + $user_id = (int) $user_id; + + if ( !$user_id ) + return false; + + if ( !empty($meta_key) ) { + $meta_key = preg_replace('|[^a-z0-9_]|i', '', $meta_key); + $user = wp_cache_get($user_id, 'users'); + // Check the cached user object + if ( false !== $user && isset($user->$meta_key) ) + $metas = array($user->$meta_key); + else + $metas = $wpdb->get_col( $wpdb->prepare("SELECT meta_value FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s", $user_id, $meta_key) ); + } else { + $metas = $wpdb->get_col( $wpdb->prepare("SELECT meta_value FROM $wpdb->usermeta WHERE user_id = %d", $user_id) ); + } + + if ( empty($metas) ) { + if ( empty($meta_key) ) + return array(); + else + return ''; + } + + $metas = array_map('maybe_unserialize', $metas); + + if ( count($metas) == 1 ) + return $metas[0]; + else + return $metas; +} + +/** + * Update metadata of user. + * + * There is no need to serialize values, they will be serialized if it is + * needed. The metadata key can only be a string with underscores. All else will + * be removed. + * + * Will remove the metadata, if the meta value is empty. + * + * @since 2.0.0 + * @deprecated 3.0.0 + * @deprecated Use update_user_meta() + * @see update_user_meta() + * + * @param int $user_id User ID + * @param string $meta_key Metadata key. + * @param mixed $meta_value Metadata value. + * @return bool True on successful update, false on failure. + */ +function update_usermeta( $user_id, $meta_key, $meta_value ) { + _deprecated_function( __FUNCTION__, '3.0', 'update_user_meta()' ); + global $wpdb; + if ( !is_numeric( $user_id ) ) + return false; + $meta_key = preg_replace('|[^a-z0-9_]|i', '', $meta_key); + + /** @todo Might need fix because usermeta data is assumed to be already escaped */ + if ( is_string($meta_value) ) + $meta_value = stripslashes($meta_value); + $meta_value = maybe_serialize($meta_value); + + if (empty($meta_value)) { + return delete_usermeta($user_id, $meta_key); + } + + $cur = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s", $user_id, $meta_key) ); + + if ( $cur ) + do_action( 'update_usermeta', $cur->umeta_id, $user_id, $meta_key, $meta_value ); + + if ( !$cur ) + $wpdb->insert($wpdb->usermeta, compact('user_id', 'meta_key', 'meta_value') ); + else if ( $cur->meta_value != $meta_value ) + $wpdb->update($wpdb->usermeta, compact('meta_value'), compact('user_id', 'meta_key') ); + else + return false; + + clean_user_cache( $user_id ); + wp_cache_delete( $user_id, 'user_meta' ); + + if ( !$cur ) + do_action( 'added_usermeta', $wpdb->insert_id, $user_id, $meta_key, $meta_value ); + else + do_action( 'updated_usermeta', $cur->umeta_id, $user_id, $meta_key, $meta_value ); + + return true; +} + +/** + * Get users for the blog. + * + * For setups that use the multi-blog feature. Can be used outside of the + * multi-blog feature. + * + * @since 2.2.0 + * @deprecated 3.1.0 + * @uses $wpdb WordPress database object for queries + * @uses $blog_id The Blog id of the blog for those that use more than one blog + * + * @param int $id Blog ID. + * @return array List of users that are part of that Blog ID + */ +function get_users_of_blog( $id = '' ) { + _deprecated_function( __FUNCTION__, '3.1', 'get_users()' ); + + global $wpdb, $blog_id; + if ( empty($id) ) + $id = (int) $blog_id; + $blog_prefix = $wpdb->get_blog_prefix($id); + $users = $wpdb->get_results( "SELECT user_id, user_id AS ID, user_login, display_name, user_email, meta_value FROM $wpdb->users, $wpdb->usermeta WHERE {$wpdb->users}.ID = {$wpdb->usermeta}.user_id AND meta_key = '{$blog_prefix}capabilities' ORDER BY {$wpdb->usermeta}.user_id" ); + return $users; +} + +/** + * Enable/disable automatic general feed link outputting. + * + * @since 2.8.0 + * @deprecated 3.0.0 + * @deprecated Use add_theme_support( 'automatic-feed-links' ) + * + * @param boolean $add Optional, default is true. Add or remove links. Defaults to true. + */ +function automatic_feed_links( $add = true ) { + _deprecated_function( __FUNCTION__, '3.0', "add_theme_support( 'automatic-feed-links' )" ); + + if ( $add ) + add_theme_support( 'automatic-feed-links' ); + else + remove_action( 'wp_head', 'feed_links_extra', 3 ); // Just do this yourself in 3.0+ +} + +/** + * Retrieve user data based on field. + * + * @since 1.5.0 + * @deprecated 3.0.0 + * @deprecated Use get_the_author_meta() + * @see get_the_author_meta() + */ +function get_profile( $field, $user = false ) { + _deprecated_function( __FUNCTION__, '3.0', 'get_the_author_meta()' ); + if ( $user ) { + $user = get_user_by( 'login', $user ); + $user = $user->ID; + } + return get_the_author_meta( $field, $user ); +} + +/** + * Number of posts user has written. + * + * @since 0.71 + * @deprecated 3.0.0 + * @deprecated Use count_user_posts() + * @see count_user_posts() + */ +function get_usernumposts( $userid ) { + _deprecated_function( __FUNCTION__, '3.0', 'count_user_posts()' ); + return count_user_posts( $userid ); +} + +/** + * Callback used to change %uXXXX to &#YYY; syntax + * + * @since 2.8.0 + * @access private + * @deprecated 3.0.0 + * + * @param array $matches Single Match + * @return string An HTML entity + */ +function funky_javascript_callback($matches) { + return "&#".base_convert($matches[1],16,10).";"; +} + +/** + * Fixes javascript bugs in browsers. + * + * Converts unicode characters to HTML numbered entities. + * + * @since 1.5.0 + * @uses $is_macIE + * @uses $is_winIE + * @deprecated 3.0.0 + * + * @param string $text Text to be made safe. + * @return string Fixed text. + */ +function funky_javascript_fix($text) { + _deprecated_function( __FUNCTION__, '3.0' ); + // Fixes for browsers' javascript bugs + global $is_macIE, $is_winIE; + + if ( $is_winIE || $is_macIE ) + $text = preg_replace_callback("/\%u([0-9A-F]{4,4})/", + "funky_javascript_callback", + $text); + + return $text; +} + +/** + * Checks that the taxonomy name exists. + * + * @since 2.3.0 + * @deprecated 3.0.0 + * @deprecated Use taxonomy_exists() + * @see taxonomy_exists() + * + * @param string $taxonomy Name of taxonomy object + * @return bool Whether the taxonomy exists. + */ +function is_taxonomy( $taxonomy ) { + _deprecated_function( __FUNCTION__, '3.0', 'taxonomy_exists()' ); + return taxonomy_exists( $taxonomy ); +} + +/** + * Check if Term exists. + * + * @since 2.3.0 + * @deprecated 3.0.0 + * @deprecated Use term_exists() + * @see term_exists() + * + * @param int|string $term The term to check + * @param string $taxonomy The taxonomy name to use + * @param int $parent ID of parent term under which to confine the exists search. + * @return mixed Get the term id or Term Object, if exists. + */ +function is_term( $term, $taxonomy = '', $parent = 0 ) { + _deprecated_function( __FUNCTION__, '3.0', 'term_exists()' ); + return term_exists( $term, $taxonomy, $parent ); +} + +/** + * Is the current admin page generated by a plugin? + * + * @since 1.5.0 + * @deprecated 3.1.0 + * @deprecated Use global $plugin_page and/or get_plugin_page_hookname() hooks. + * + * @global $plugin_page + * + * @return bool + */ +function is_plugin_page() { + _deprecated_function( __FUNCTION__, '3.1' ); + + global $plugin_page; + + if ( isset($plugin_page) ) + return true; + + return false; +} + +/** + * Update the categories cache. + * + * This function does not appear to be used anymore or does not appear to be + * needed. It might be a legacy function left over from when there was a need + * for updating the category cache. + * + * @since 1.5.0 + * @deprecated 3.1.0 + * + * @return bool Always return True + */ +function update_category_cache() { + _deprecated_function( __FUNCTION__, '3.1' ); + + return true; +} + +/** + * Check for PHP timezone support + * + * @since 2.9.0 + * @deprecated 3.2.0 + * + * @return bool + */ +function wp_timezone_supported() { + _deprecated_function( __FUNCTION__, '3.2' ); + + return true; +} + +/** + * Display editor: TinyMCE, HTML, or both. + * + * @since 2.1.0 + * @deprecated 3.3.0 + * @deprecated Use wp_editor() + * @see wp_editor() + * + * @param string $content Textarea content. + * @param string $id Optional, default is 'content'. HTML ID attribute value. + * @param string $prev_id Optional, not used + * @param bool $media_buttons Optional, default is true. Whether to display media buttons. + * @param int $tab_index Optional, not used + */ +function the_editor($content, $id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2, $extended = true) { + _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' ); + + wp_editor( $content, $id, array( 'media_buttons' => $media_buttons ) ); + return; +} + +/** + * Perform the query to get the $metavalues array(s) needed by _fill_user and _fill_many_users + * + * @since 3.0.0 + * @deprecated 3.3.0 + * + * @param array $ids User ID numbers list. + * @return array of arrays. The array is indexed by user_id, containing $metavalues object arrays. + */ +function get_user_metavalues($ids) { + _deprecated_function( __FUNCTION__, '3.3' ); + + $objects = array(); + + $ids = array_map('intval', $ids); + foreach ( $ids as $id ) + $objects[$id] = array(); + + $metas = update_meta_cache('user', $ids); + + foreach ( $metas as $id => $meta ) { + foreach ( $meta as $key => $metavalues ) { + foreach ( $metavalues as $value ) { + $objects[$id][] = (object)array( 'user_id' => $id, 'meta_key' => $key, 'meta_value' => $value); + } + } + } + + return $objects; +} + +/** + * Sanitize every user field. + * + * If the context is 'raw', then the user object or array will get minimal santization of the int fields. + * + * @since 2.3.0 + * @deprecated 3.3.0 + * + * @param object|array $user The User Object or Array + * @param string $context Optional, default is 'display'. How to sanitize user fields. + * @return object|array The now sanitized User Object or Array (will be the same type as $user) + */ +function sanitize_user_object($user, $context = 'display') { + _deprecated_function( __FUNCTION__, '3.3' ); + + if ( is_object($user) ) { + if ( !isset($user->ID) ) + $user->ID = 0; + if ( !is_a( $user, 'WP_User' ) ) { + $vars = get_object_vars($user); + foreach ( array_keys($vars) as $field ) { + if ( is_string($user->$field) || is_numeric($user->$field) ) + $user->$field = sanitize_user_field($field, $user->$field, $user->ID, $context); + } + } + $user->filter = $context; + } else { + if ( !isset($user['ID']) ) + $user['ID'] = 0; + foreach ( array_keys($user) as $field ) + $user[$field] = sanitize_user_field($field, $user[$field], $user['ID'], $context); + $user['filter'] = $context; + } + + return $user; +} + +/** + * Get boundary post relational link. + * + * Can either be start or end post relational link. + * + * @since 2.8.0 + * @deprecated 3.3.0 + * + * @param string $title Optional. Link title format. + * @param bool $in_same_cat Optional. Whether link should be in a same category. + * @param string $excluded_categories Optional. Excluded categories IDs. + * @param bool $start Optional, default is true. Whether to display link to first or last post. + * @return string + */ +function get_boundary_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '', $start = true) { + _deprecated_function( __FUNCTION__, '3.3' ); + + $posts = get_boundary_post($in_same_cat, $excluded_categories, $start); + // If there is no post stop. + if ( empty($posts) ) + return; + + // Even though we limited get_posts to return only 1 item it still returns an array of objects. + $post = $posts[0]; + + if ( empty($post->post_title) ) + $post->post_title = $start ? __('First Post') : __('Last Post'); + + $date = mysql2date(get_option('date_format'), $post->post_date); + + $title = str_replace('%title', $post->post_title, $title); + $title = str_replace('%date', $date, $title); + $title = apply_filters('the_title', $title, $post->ID); + + $link = $start ? "\n"; + + $boundary = $start ? 'start' : 'end'; + return apply_filters( "{$boundary}_post_rel_link", $link ); +} + +/** + * Display relational link for the first post. + * + * @since 2.8.0 + * @deprecated 3.3.0 + * + * @param string $title Optional. Link title format. + * @param bool $in_same_cat Optional. Whether link should be in a same category. + * @param string $excluded_categories Optional. Excluded categories IDs. + */ +function start_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '') { + _deprecated_function( __FUNCTION__, '3.3' ); + + echo get_boundary_post_rel_link($title, $in_same_cat, $excluded_categories, true); +} + +/** + * Get site index relational link. + * + * @since 2.8.0 + * @deprecated 3.3.0 + * + * @return string + */ +function get_index_rel_link() { + _deprecated_function( __FUNCTION__, '3.3' ); + + $link = "\n"; + return apply_filters( "index_rel_link", $link ); +} + +/** + * Display relational link for the site index. + * + * @since 2.8.0 + * @deprecated 3.3.0 + */ +function index_rel_link() { + _deprecated_function( __FUNCTION__, '3.3' ); + + echo get_index_rel_link(); +} + +/** + * Get parent post relational link. + * + * @since 2.8.0 + * @deprecated 3.3.0 + * + * @param string $title Optional. Link title format. + * @return string + */ +function get_parent_post_rel_link($title = '%title') { + _deprecated_function( __FUNCTION__, '3.3' ); + + if ( ! empty( $GLOBALS['post'] ) && ! empty( $GLOBALS['post']->post_parent ) ) + $post = get_post($GLOBALS['post']->post_parent); + + if ( empty($post) ) + return; + + $date = mysql2date(get_option('date_format'), $post->post_date); + + $title = str_replace('%title', $post->post_title, $title); + $title = str_replace('%date', $date, $title); + $title = apply_filters('the_title', $title, $post->ID); + + $link = "\n"; + + return apply_filters( "parent_post_rel_link", $link ); +} + +/** + * Display relational link for parent item + * + * @since 2.8.0 + * @deprecated 3.3.0 + */ +function parent_post_rel_link($title = '%title') { + _deprecated_function( __FUNCTION__, '3.3' ); + + echo get_parent_post_rel_link($title); +} + +/** + * Add the "Dashboard"/"Visit Site" menu. + * + * @since 3.2.0 + * @deprecated 3.3.0 + */ +function wp_admin_bar_dashboard_view_site_menu( $wp_admin_bar ) { + _deprecated_function( __FUNCTION__, '3.3' ); + + $user_id = get_current_user_id(); + + if ( 0 != $user_id ) { + if ( is_admin() ) + $wp_admin_bar->add_menu( array( 'id' => 'view-site', 'title' => __( 'Visit Site' ), 'href' => home_url() ) ); + elseif ( is_multisite() ) + $wp_admin_bar->add_menu( array( 'id' => 'dashboard', 'title' => __( 'Dashboard' ), 'href' => get_dashboard_url( $user_id ) ) ); + else + $wp_admin_bar->add_menu( array( 'id' => 'dashboard', 'title' => __( 'Dashboard' ), 'href' => admin_url() ) ); + } +} + +/** + * Checks if the current user belong to a given blog. + * + * @since MU + * @deprecated 3.3.0 + * @deprecated Use is_user_member_of_blog() + * @see is_user_member_of_blog() + * + * @param int $blog_id Blog ID + * @return bool True if the current users belong to $blog_id, false if not. + */ +function is_blog_user( $blog_id = 0 ) { + _deprecated_function( __FUNCTION__, '3.3', 'is_user_member_of_blog()' ); + + return is_user_member_of_blog( get_current_user_id(), $blog_id ); +} + +/** + * Open the file handle for debugging. + * + * @since 0.71 + * @deprecated Use error_log() + * @link http://www.php.net/manual/en/function.error-log.php + * @deprecated 3.4.0 + */ +function debug_fopen( $filename, $mode ) { + _deprecated_function( __FUNCTION__, 'error_log()' ); + return false; +} + +/** + * Write contents to the file used for debugging. + * + * @since 0.71 + * @deprecated Use error_log() instead. + * @link http://www.php.net/manual/en/function.error-log.php + * @deprecated 3.4.0 + */ +function debug_fwrite( $fp, $string ) { + _deprecated_function( __FUNCTION__, 'error_log()' ); + if ( ! empty( $GLOBALS['debug'] ) ) + error_log( $string ); +} + +/** + * Close the debugging file handle. + * + * @since 0.71 + * @deprecated Use error_log() + * @link http://www.php.net/manual/en/function.error-log.php + * @deprecated 3.4.0 + */ +function debug_fclose( $fp ) { + _deprecated_function( __FUNCTION__, 'error_log()' ); +} + +/** + * 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. + * + * @since 1.5.0 + * @deprecated 3.4.0 + * @deprecated Use wp_get_themes() + * @see wp_get_themes() + * + * @return array Theme list with theme data. + */ +function get_themes() { + _deprecated_function( __FUNCTION__, '3.4', 'wp_get_themes()' ); + + global $wp_themes; + if ( isset( $wp_themes ) ) + return $wp_themes; + + $themes = wp_get_themes(); + $wp_themes = array(); + + foreach ( $themes as $theme ) { + $name = $theme->get('Name'); + if ( isset( $wp_themes[ $name ] ) ) + $wp_themes[ $name . '/' . $theme->get_stylesheet() ] = $theme; + else + $wp_themes[ $name ] = $theme; + } + + return $wp_themes; +} + +/** + * Retrieve theme data. + * + * @since 1.5.0 + * @deprecated 3.4.0 + * @deprecated Use wp_get_theme() + * @see wp_get_theme() + * + * @param string $theme Theme name. + * @return array|null Null, if theme name does not exist. Theme data, if exists. + */ +function get_theme( $theme ) { + _deprecated_function( __FUNCTION__, '3.4', 'wp_get_theme( $stylesheet )' ); + + $themes = get_themes(); + if ( is_array( $themes ) && array_key_exists( $theme, $themes ) ) + return $themes[ $theme ]; + return null; +} + +/** + * Retrieve current theme name. + * + * @since 1.5.0 + * @deprecated 3.4.0 + * @deprecated Use (string) wp_get_theme() + * @see wp_get_theme() + * + * @return string + */ +function get_current_theme() { + _deprecated_function( __FUNCTION__, '3.4', 'wp_get_theme()' ); + + if ( $theme = get_option( 'current_theme' ) ) + return $theme; + + return wp_get_theme()->get('Name'); +} + +/** + * Accepts matches array from preg_replace_callback in wpautop() or a string. + * + * Ensures that the contents of a <
            >...<
            > HTML block are not + * converted into paragraphs or line-breaks. + * + * @since 1.2.0 + * @deprecated 3.4.0 + * + * @param array|string $matches The array or string + * @return string The pre block without paragraph/line-break conversion. + */ +function clean_pre($matches) { + _deprecated_function( __FUNCTION__, '3.4' ); + + if ( is_array($matches) ) + $text = $matches[1] . $matches[2] . "
            "; + else + $text = $matches; + + $text = str_replace(array('
            ', '
            ', '
            '), array('', '', ''), $text); + $text = str_replace('

            ', "\n", $text); + $text = str_replace('

            ', '', $text); + + return $text; +} + + +/** + * Add callbacks for image header display. + * + * @since 2.1.0 + * @deprecated 3.4.0 + * @deprecated Use add_theme_support('custom-header', $args) + * @see add_theme_support() + * + * @param callback $wp_head_callback Call on 'wp_head' action. + * @param callback $admin_head_callback Call on custom header administration screen. + * @param callback $admin_preview_callback Output a custom header image div on the custom header administration screen. Optional. + */ +function add_custom_image_header( $wp_head_callback, $admin_head_callback, $admin_preview_callback = '' ) { + _deprecated_function( __FUNCTION__, '3.4', 'add_theme_support( \'custom-header\', $args )' ); + $args = array( + 'wp-head-callback' => $wp_head_callback, + 'admin-head-callback' => $admin_head_callback, + ); + if ( $admin_preview_callback ) + $args['admin-preview-callback'] = $admin_preview_callback; + return add_theme_support( 'custom-header', $args ); +} + +/** + * Remove image header support. + * + * @since 3.1.0 + * @deprecated 3.4.0 + * @deprecated Use remove_theme_support('custom-header') + * @see remove_theme_support() + * + * @return bool Whether support was removed. + */ +function remove_custom_image_header() { + _deprecated_function( __FUNCTION__, '3.4', 'remove_theme_support( \'custom-header\' )' ); + return remove_theme_support( 'custom-header' ); +} + +/** + * Add callbacks for background image display. + * + * @since 3.0.0 + * @deprecated 3.4.0 + * @deprecated Use add_theme_support('custom-background, $args) + * @see add_theme_support() + * + * @param callback $wp_head_callback Call on 'wp_head' action. + * @param callback $admin_head_callback Call on custom background administration screen. + * @param callback $admin_preview_callback Output a custom background image div on the custom background administration screen. Optional. + */ +function add_custom_background( $wp_head_callback = '', $admin_head_callback = '', $admin_preview_callback = '' ) { + _deprecated_function( __FUNCTION__, '3.4', 'add_theme_support( \'custom-background\', $args )' ); + $args = array(); + if ( $wp_head_callback ) + $args['wp-head-callback'] = $wp_head_callback; + if ( $admin_head_callback ) + $args['admin-head-callback'] = $admin_head_callback; + if ( $admin_preview_callback ) + $args['admin-preview-callback'] = $admin_preview_callback; + return add_theme_support( 'custom-background', $args ); +} + +/** + * Remove custom background support. + * + * @since 3.1.0 + * @see add_custom_background() + * + * @return bool Whether support was removed. + */ +function remove_custom_background() { + _deprecated_function( __FUNCTION__, '3.4', 'remove_theme_support( \'custom-background\' )' ); + return remove_theme_support( 'custom-background' ); +} + +/** + * Retrieve theme data from parsed theme file. + * + * @since 1.5.0 + * @deprecated 3.4.0 + * @deprecated Use wp_get_theme() + * @see wp_get_theme() + * + * @param string $theme_file Theme file path. + * @return array Theme data. + */ +function get_theme_data( $theme_file ) { + _deprecated_function( __FUNCTION__, '3.4', 'wp_get_theme()' ); + $theme = new WP_Theme( basename( dirname( $theme_file ) ), dirname( dirname( $theme_file ) ) ); + + $theme_data = array( + 'Name' => $theme->get('Name'), + 'URI' => $theme->display('ThemeURI', true, false), + 'Description' => $theme->display('Description', true, false), + 'Author' => $theme->display('Author', true, false), + 'AuthorURI' => $theme->display('AuthorURI', true, false), + 'Version' => $theme->get('Version'), + 'Template' => $theme->get('Template'), + 'Status' => $theme->get('Status'), + 'Tags' => $theme->get('Tags'), + 'Title' => $theme->get('Name'), + 'AuthorName' => $theme->get('Author'), + ); + + foreach ( apply_filters( 'extra_theme_headers', array() ) as $extra_header ) { + if ( ! isset( $theme_data[ $extra_header ] ) ) + $theme_data[ $extra_header ] = $theme->get( $extra_header ); + } + + return $theme_data; +} + +/** + * Alias of update_post_cache(). + * + * @see update_post_cache() Posts and pages are the same, alias is intentional + * + * @since 1.5.1 + * @deprecated 3.4.0 + * + * @param array $pages list of page objects + */ +function update_page_cache( &$pages ) { + _deprecated_function( __FUNCTION__, '3.4', 'update_post_cache()' ); + + update_post_cache( $pages ); +} + +/** + * Will clean the page in the cache. + * + * Clean (read: delete) page from cache that matches $id. Will also clean cache + * associated with 'all_page_ids' and 'get_pages'. + * + * @since 2.0.0 + * @deprecated 3.4.0 + * + * @uses do_action() Will call the 'clean_page_cache' hook action. + * + * @param int $id Page ID to clean + */ +function clean_page_cache( $id ) { + _deprecated_function( __FUNCTION__, '3.4', 'clean_post_cache()' ); + + clean_post_cache( $id ); +} + +/** + * Retrieve nonce action "Are you sure" message. + * + * Deprecated in 3.4.1 and 3.5.0. Backported to 3.3.3. + * + * @since 2.0.4 + * @deprecated 3.4.1 + * @deprecated Use wp_nonce_ays() + * @see wp_nonce_ays() + * + * @param string $action Nonce action. + * @return string Are you sure message. + */ +function wp_explain_nonce( $action ) { + _deprecated_function( __FUNCTION__, '3.4.1', 'wp_nonce_ays()' ); + return __( 'Are you sure you want to do this?' ); +} + +/** + * Display "sticky" CSS class, if a post is sticky. + * + * @since 2.7.0 + * @deprecated 3.5.0 + * @deprecated Use post_class() + * @see post_class() + * + * @param int $post_id An optional post ID. + */ +function sticky_class( $post_id = null ) { + _deprecated_function( __FUNCTION__, '3.5', 'post_class()' ); + if ( is_sticky( $post_id ) ) + echo ' sticky'; +} + +/** + * Retrieve post ancestors. + * + * This is no longer needed as WP_Post lazy-loads the ancestors + * property with get_post_ancestors(). + * + * @since 2.3.4 + * @deprecated 3.5.0 + * @see get_post_ancestors() + */ +function _get_post_ancestors( &$post ) { + _deprecated_function( __FUNCTION__, '3.5' ); +} + +/** + * Load an image from a string, if PHP supports it. + * + * @since 2.1.0 + * @deprecated 3.5.0 + * @see wp_get_image_editor() + * + * @param string $file Filename of the image to load. + * @return resource The resulting image resource on success, Error string on failure. + */ +function wp_load_image( $file ) { + _deprecated_function( __FUNCTION__, '3.5', 'wp_get_image_editor()' ); + + if ( is_numeric( $file ) ) + $file = get_attached_file( $file ); + + if ( ! is_file( $file ) ) + return sprintf(__('File “%s” doesn’t exist?'), $file); + + if ( ! function_exists('imagecreatefromstring') ) + return __('The GD image library is not installed.'); + + // Set artificially high because GD uses uncompressed images in memory + @ini_set( 'memory_limit', apply_filters( 'image_memory_limit', WP_MAX_MEMORY_LIMIT ) ); + $image = imagecreatefromstring( file_get_contents( $file ) ); + + if ( !is_resource( $image ) ) + return sprintf(__('File “%s” is not an image.'), $file); + + return $image; +} + +/** + * Scale down an image to fit a particular size and save a new copy of the image. + * + * The PNG transparency will be preserved using the function, as well as the + * image type. If the file going in is PNG, then the resized image is going to + * be PNG. The only supported image types are PNG, GIF, and JPEG. + * + * Some functionality requires API to exist, so some PHP version may lose out + * support. This is not the fault of WordPress (where functionality is + * downgraded, not actual defects), but of your PHP version. + * + * @since 2.5.0 + * @deprecated 3.5.0 + * @see wp_get_image_editor() + * + * @param string $file Image file path. + * @param int $max_w Maximum width to resize to. + * @param int $max_h Maximum height to resize to. + * @param bool $crop Optional. Whether to crop image or resize. + * @param string $suffix Optional. File suffix. + * @param string $dest_path Optional. New image file path. + * @param int $jpeg_quality Optional, default is 90. Image quality percentage. + * @return mixed WP_Error on failure. String with new destination path. + */ +function image_resize( $file, $max_w, $max_h, $crop = false, $suffix = null, $dest_path = null, $jpeg_quality = 90 ) { + _deprecated_function( __FUNCTION__, '3.5', 'wp_get_image_editor()' ); + + $editor = wp_get_image_editor( $file ); + if ( is_wp_error( $editor ) ) + return $editor; + $editor->set_quality( $jpeg_quality ); + + $resized = $editor->resize( $max_w, $max_h, $crop ); + if ( is_wp_error( $resized ) ) + return $resized; + + $dest_file = $editor->generate_filename( $suffix, $dest_path ); + $saved = $editor->save( $dest_file ); + + if ( is_wp_error( $saved ) ) + return $saved; + + return $dest_file; +} + +/** + * Retrieve a single post, based on post ID. + * + * Has categories in 'post_category' property or key. Has tags in 'tags_input' + * property or key. + * + * @since 1.0.0 + * @deprecated 3.5.0 + * @see get_post() + * + * @param int $postid Post ID. + * @param string $mode How to return result, either OBJECT, ARRAY_N, or ARRAY_A. + * @return object|array Post object or array holding post contents and information + */ +function wp_get_single_post( $postid = 0, $mode = OBJECT ) { + _deprecated_function( __FUNCTION__, '3.5', 'get_post()' ); + return get_post( $postid, $mode ); +} + +/** + * Check that the user login name and password is correct. + * + * @since 0.71 + * @deprecated 3.5.0 + * @deprecated Use wp_authenticate() + * @see wp_authenticate() + * + * @param string $user_login User name. + * @param string $user_pass User password. + * @return bool False if does not authenticate, true if username and password authenticates. + */ +function user_pass_ok($user_login, $user_pass) { + _deprecated_function( __FUNCTION__, '3.5', 'wp_authenticate()' ); + $user = wp_authenticate( $user_login, $user_pass ); + if ( is_wp_error( $user ) ) + return false; + + return true; +} + +/** + * Callback formerly fired on the save_post hook. No longer needed. + * + * @since 2.3.0 + * @deprecated 3.5.0 + */ +function _save_post_hook() {} + +/** + * Check if the installed version of GD supports particular image type + * + * @since 2.9.0 + * @deprecated 3.5.0 + * @see wp_image_editor_supports() + * + * @param string $mime_type + * @return bool + */ +function gd_edit_image_support($mime_type) { + _deprecated_function( __FUNCTION__, '3.5', 'wp_image_editor_supports()' ); + + if ( function_exists('imagetypes') ) { + switch( $mime_type ) { + case 'image/jpeg': + return (imagetypes() & IMG_JPG) != 0; + case 'image/png': + return (imagetypes() & IMG_PNG) != 0; + case 'image/gif': + return (imagetypes() & IMG_GIF) != 0; + } + } else { + switch( $mime_type ) { + case 'image/jpeg': + return function_exists('imagecreatefromjpeg'); + case 'image/png': + return function_exists('imagecreatefrompng'); + case 'image/gif': + return function_exists('imagecreatefromgif'); + } + } + return false; +} + +/** + * Converts an integer byte value to a shorthand byte value. + * + * @since 2.3.0 + * @deprecated 3.6.0 + * @deprecated Use size_format() + * + * @param int $bytes An integer byte value. + * @return string A shorthand byte value. + */ +function wp_convert_bytes_to_hr( $bytes ) { + _deprecated_function( __FUNCTION__, '3.6', 'size_format()' ); + + $units = array( 0 => 'B', 1 => 'kB', 2 => 'MB', 3 => 'GB', 4 => 'TB' ); + $log = log( $bytes, 1024 ); + $power = (int) $log; + $size = pow( 1024, $log - $power ); + + if ( ! is_nan( $size ) && array_key_exists( $power, $units ) ) { + $unit = $units[ $power ]; + } else { + $size = $bytes; + $unit = $units[0]; + } + + return $size . $unit; +} + +/** + * Formerly used internally to tidy up the search terms. + * + * @access private + * @since 2.9.0 + * @deprecated 3.7.0 + */ +function _search_terms_tidy( $t ) { + _deprecated_function( __FUNCTION__, '3.7' ); + return trim( $t, "\"'\n\r " ); +} + +/** + * Determine if TinyMCE is available. + * + * Checks to see if the user has deleted the tinymce files to slim down + * their WordPress install. + * + * @since 2.1.0 + * @deprecated 3.9.0 + * + * @return bool Whether TinyMCE exists. + */ +function rich_edit_exists() { + global $wp_rich_edit_exists; + _deprecated_function( __FUNCTION__, '3.9' ); + + if ( ! isset( $wp_rich_edit_exists ) ) + $wp_rich_edit_exists = file_exists( ABSPATH . WPINC . '/js/tinymce/tinymce.js' ); + + return $wp_rich_edit_exists; +} + +/** + * Old callback for tag link tooltips. + * + * @since 2.7.0 + * @deprecated 3.9.0 + * @access private + */ +function default_topic_count_text( $count ) { + return $count; +} + +/** + * Formerly used to escape strings before inserting into the DB. + * + * Has not performed this function for many, many years. Use wpdb::prepare() instead. + * + * @since 0.71 + * @deprecated 3.9.0 + * + * @param string $content The text to format. + * @return string The very same text. + */ +function format_to_post( $content ) { + _deprecated_function( __FUNCTION__, '3.9' ); + return $content; +} diff --git a/wp-includes/feed-atom-comments.php b/wp-includes/feed-atom-comments.php new file mode 100644 index 0000000..13a55a2 --- /dev/null +++ b/wp-includes/feed-atom-comments.php @@ -0,0 +1,112 @@ +'; +?> + +> + <?php + if ( is_singular() ) + printf( ent2ncr( __( 'Comments on %s' ) ), get_the_title_rss() ); + elseif ( is_search() ) + printf( ent2ncr( __( 'Comments for %1$s searching on %2$s' ) ), get_bloginfo_rss( 'name' ), get_search_query() ); + else + printf( ent2ncr( __( 'Comments for %s' ) ), get_bloginfo_rss( 'name' ) . get_wp_title_rss() ); + ?> + + + + + + + + + + + + + + + + + + +comment_post_ID ); +?> + + <?php + if ( !is_singular() ) { + $title = get_the_title($comment_post->ID); + /** This filter is documented in wp-includes/feed.php */ + $title = apply_filters( 'the_title_rss', $title ); + printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss()); + } else { + printf(ent2ncr(__('By: %s')), get_comment_author_rss()); + } + ?> + + + + + ' . get_comment_author_url() . ''; ?> + + + + + + + + ]]> + + ]]> +comment_parent == 0 ) : // This comment is top level ?> + +comment_parent); + // The rel attribute below and the id tag above should be GUIDs, but WP doesn't create them for comments (unlike posts). Either way, it's more important that they both use the same system +?> + +comment_ID, $comment_post->ID ); +?> + + + diff --git a/wp-includes/feed-atom.php b/wp-includes/feed-atom.php new file mode 100644 index 0000000..666b52d --- /dev/null +++ b/wp-includes/feed-atom.php @@ -0,0 +1,83 @@ +'; ?> + + > + <?php bloginfo_rss('name'); wp_title_rss(); ?> + + + + + + + + + + + + + + + + + <![CDATA[<?php the_title_rss() ?>]]> + + + + + + ]]> + + ]]> + + + + + + + + diff --git a/wp-includes/feed-rdf.php b/wp-includes/feed-rdf.php new file mode 100644 index 0000000..d3503af --- /dev/null +++ b/wp-includes/feed-rdf.php @@ -0,0 +1,77 @@ +'; ?> + +> +"> + <?php bloginfo_rss('name'); wp_title_rss(); ?> + + + + + + + + 2000-01-01T12:00+00:00 + + + + + + + + + + + + <?php the_title_rss() ?> + + post_date_gmt, false); ?> + ]]> + + + ]]> + + ]]> + ]]> + + + + + diff --git a/wp-includes/feed-rss.php b/wp-includes/feed-rss.php new file mode 100644 index 0000000..1650434 --- /dev/null +++ b/wp-includes/feed-rss.php @@ -0,0 +1,46 @@ +'; ?> + + + <?php bloginfo_rss('name'); wp_title_rss(); ?> + + + + http://backend.userland.com/rss092 + + + + + + + <?php the_title_rss() ?> + ]]> + + + + + + diff --git a/wp-includes/feed-rss2-comments.php b/wp-includes/feed-rss2-comments.php new file mode 100644 index 0000000..a8a1c13 --- /dev/null +++ b/wp-includes/feed-rss2-comments.php @@ -0,0 +1,94 @@ +'; +?> + + + +> + + <?php + if ( is_singular() ) + printf( ent2ncr( __( 'Comments on: %s' ) ), get_the_title_rss() ); + elseif ( is_search() ) + printf( ent2ncr( __( 'Comments for %1$s searching on %2$s' ) ), get_bloginfo_rss( 'name' ), get_search_query() ); + else + printf( ent2ncr( __( 'Comments for %s' ) ), get_bloginfo_rss( 'name' ) . get_wp_title_rss() ); + ?> + + + + + + + + + comment_post_ID ); + ?> + + <?php + if ( !is_singular() ) { + $title = get_the_title($comment_post->ID); + /** This filter is documented in wp-includes/feed.php */ + $title = apply_filters( 'the_title_rss', $title ); + printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss()); + } else { + printf(ent2ncr(__('By: %s')), get_comment_author_rss()); + } + ?> + + ]]> + + + + + ]]> + + ]]> + ]]> +comment_ID The ID of the comment being displayed. + * @param int $comment_post->ID The ID of the post the comment is connected to. + */ + do_action( 'commentrss2_item', $comment->comment_ID, $comment_post->ID ); +?> + + + + diff --git a/wp-includes/feed-rss2.php b/wp-includes/feed-rss2.php new file mode 100644 index 0000000..0ce4e6b --- /dev/null +++ b/wp-includes/feed-rss2.php @@ -0,0 +1,105 @@ +'; ?> + + +> + + + <?php bloginfo_rss('name'); wp_title_rss(); ?> + + + + + + + + + + + + <?php the_title_rss() ?> + + + + ]]> + + + + + ]]> + + ]]> + + 0 ) : ?> + ]]> + + ]]> + + + + + + + + + + diff --git a/wp-includes/feed.php b/wp-includes/feed.php new file mode 100644 index 0000000..c77abd5 --- /dev/null +++ b/wp-includes/feed.php @@ -0,0 +1,653 @@ +get_error_message(); + /** + * Filter the blog title for use as the feed title. + * + * @since 2.2.0 + * + * @param string $title The current blog title. + * @param string $sep Separator used by wp_title(). + */ + $title = apply_filters( 'get_wp_title_rss', $title, $sep ); + return $title; +} + +/** + * Display the blog title for display of the feed title. + * + * @since 2.2.0 + * @see wp_title() $sep parameter usage. + * + * @param string $sep Optional. + */ +function wp_title_rss( $sep = '»' ) { + /** + * Filter the blog title for display of the feed title. + * + * @since 2.2.0 + * + * @see get_wp_title_rss() + * + * @param string $wp_title The current blog title. + * @param string $sep Separator used by wp_title(). + */ + echo apply_filters( 'wp_title_rss', get_wp_title_rss( $sep ), $sep ); +} + +/** + * Retrieve the current post title for the feed. + * + * @since 2.0.0 + * + * @return string Current post title. + */ +function get_the_title_rss() { + $title = get_the_title(); + /** + * Filter the post title for use in a feed. + * + * @since 1.2.0 + * + * @param string $title The current post title. + */ + $title = apply_filters( 'the_title_rss', $title ); + return $title; +} + +/** + * Display the post title in the feed. + * + * @since 0.71 + * @uses get_the_title_rss() Used to retrieve current post title. + */ +function the_title_rss() { + echo get_the_title_rss(); +} + +/** + * Retrieve the post content for feeds. + * + * @since 2.9.0 + * @see get_the_content() + * + * @param string $feed_type The type of feed. rss2 | atom | rss | rdf + * @return string The filtered content. + */ +function get_the_content_feed($feed_type = null) { + if ( !$feed_type ) + $feed_type = get_default_feed(); + + /** This filter is documented in wp-admin/post-template.php */ + $content = apply_filters( 'the_content', get_the_content() ); + $content = str_replace(']]>', ']]>', $content); + /** + * Filter the post content for use in feeds. + * + * @since 2.9.0 + * + * @param string $content The current post content. + * @param string $feed_type Type of feed. Possible values include 'rss2', 'atom'. + * Default 'rss2'. + */ + return apply_filters( 'the_content_feed', $content, $feed_type ); +} + +/** + * Display the post content for feeds. + * + * @since 2.9.0 + * @uses apply_filters() Calls 'the_content_feed' on the content before processing. + * @see get_the_content() + * + * @param string $feed_type The type of feed. rss2 | atom | rss | rdf + */ +function the_content_feed($feed_type = null) { + echo get_the_content_feed($feed_type); +} + +/** + * Display the post excerpt for the feed. + * + * @since 0.71 + */ +function the_excerpt_rss() { + $output = get_the_excerpt(); + /** + * Filter the post excerpt for a feed. + * + * @since 1.2.0 + * + * @param string $output The current post excerpt. + */ + echo apply_filters( 'the_excerpt_rss', $output ); +} + +/** + * Display the permalink to the post for use in feeds. + * + * @since 2.3.0 + */ +function the_permalink_rss() { + /** + * Filter the permalink to the post for use in feeds. + * + * @since 2.3.0 + * + * @param string $post_permalink The current post permalink. + */ + echo esc_url( apply_filters( 'the_permalink_rss', get_permalink() ) ); +} + +/** + * Outputs the link to the comments for the current post in an xml safe way + * + * @since 3.0.0 + * @return none + */ +function comments_link_feed() { + /** + * Filter the comments permalink for the current post. + * + * @since 3.6.0 + * + * @param string $comment_permalink The current comment permalink with + * '#comments' appended. + */ + echo esc_url( apply_filters( 'comments_link_feed', get_comments_link() ) ); +} + +/** + * Display the feed GUID for the current comment. + * + * @since 2.5.0 + * + * @param int|object $comment_id Optional comment object or id. Defaults to global comment object. + */ +function comment_guid($comment_id = null) { + echo esc_url( get_comment_guid($comment_id) ); +} + +/** + * Retrieve the feed GUID for the current comment. + * + * @since 2.5.0 + * + * @param int|object $comment_id Optional comment object or id. Defaults to global comment object. + * @return bool|string false on failure or guid for comment on success. + */ +function get_comment_guid($comment_id = null) { + $comment = get_comment($comment_id); + + if ( !is_object($comment) ) + return false; + + return get_the_guid($comment->comment_post_ID) . '#comment-' . $comment->comment_ID; +} + +/** + * Display the link to the comments. + * + * @since 1.5.0 + */ +function comment_link() { + /** + * Filter the current comment's permalink. + * + * @since 3.6.0 + * + * @see get_comment_link() + * + * @param string $comment_permalink The current comment permalink. + */ + echo esc_url( apply_filters( 'comment_link', get_comment_link() ) ); +} + +/** + * Retrieve the current comment author for use in the feeds. + * + * @since 2.0.0 + * @uses get_comment_author() + * + * @return string Comment Author + */ +function get_comment_author_rss() { + /** + * Filter the current comment author for use in a feed. + * + * @since 1.5.0 + * + * @see get_comment_author() + * + * @param string $comment_author The current comment author. + */ + return apply_filters( 'comment_author_rss', get_comment_author() ); +} + +/** + * Display the current comment author in the feed. + * + * @since 1.0.0 + */ +function comment_author_rss() { + echo get_comment_author_rss(); +} + +/** + * Display the current comment content for use in the feeds. + * + * @since 1.0.0 + * @uses get_comment_text() + */ +function comment_text_rss() { + $comment_text = get_comment_text(); + /** + * Filter the current comment content for use in a feed. + * + * @since 1.5.0 + * + * @param string $comment_text The content of the current comment. + */ + $comment_text = apply_filters( 'comment_text_rss', $comment_text ); + echo $comment_text; +} + +/** + * Retrieve all of the post categories, formatted for use in feeds. + * + * All of the categories for the current post in the feed loop, will be + * retrieved and have feed markup added, so that they can easily be added to the + * RSS2, Atom, or RSS1 and RSS0.91 RDF feeds. + * + * @since 2.1.0 + * + * @param string $type Optional, default is the type returned by get_default_feed(). + * @return string All of the post categories for displaying in the feed. + */ +function get_the_category_rss($type = null) { + if ( empty($type) ) + $type = get_default_feed(); + $categories = get_the_category(); + $tags = get_the_tags(); + $the_list = ''; + $cat_names = array(); + + $filter = 'rss'; + if ( 'atom' == $type ) + $filter = 'raw'; + + if ( !empty($categories) ) foreach ( (array) $categories as $category ) { + $cat_names[] = sanitize_term_field('name', $category->name, $category->term_id, 'category', $filter); + } + + if ( !empty($tags) ) foreach ( (array) $tags as $tag ) { + $cat_names[] = sanitize_term_field('name', $tag->name, $tag->term_id, 'post_tag', $filter); + } + + $cat_names = array_unique($cat_names); + + foreach ( $cat_names as $cat_name ) { + if ( 'rdf' == $type ) + $the_list .= "\t\t\n"; + elseif ( 'atom' == $type ) + /** This filter is documented in wp-includes/feed.php */ + $the_list .= sprintf( '', esc_attr( apply_filters( 'get_bloginfo_rss', get_bloginfo( 'url' ) ) ), esc_attr( $cat_name ) ); + else + $the_list .= "\t\t\n"; + } + + /** + * Filter all of the post categories for display in a feed. + * + * @since 1.2.0 + * + * @param string $the_list All of the RSS post categories. + * @param string $type Type of feed. Possible values include 'rss2', 'atom'. + * Default 'rss2'. + */ + return apply_filters( 'the_category_rss', $the_list, $type ); +} + +/** + * Display the post categories in the feed. + * + * @since 0.71 + * @see get_the_category_rss() For better explanation. + * + * @param string $type Optional, default is the type returned by get_default_feed(). + */ +function the_category_rss($type = null) { + echo get_the_category_rss($type); +} + +/** + * Display the HTML type based on the blog setting. + * + * The two possible values are either 'xhtml' or 'html'. + * + * @since 2.2.0 + */ +function html_type_rss() { + $type = get_bloginfo('html_type'); + if (strpos($type, 'xhtml') !== false) + $type = 'xhtml'; + else + $type = 'html'; + echo $type; +} + +/** + * Display the rss enclosure for the current post. + * + * Uses the global $post to check whether the post requires a password and if + * the user has the password for the post. If not then it will return before + * displaying. + * + * Also uses the function get_post_custom() to get the post's 'enclosure' + * metadata field and parses the value to display the enclosure(s). The + * enclosure(s) consist of enclosure HTML tag(s) with a URI and other + * attributes. + * + * @since 1.5.0 + * @uses get_post_custom() To get the current post enclosure metadata. + */ +function rss_enclosure() { + if ( post_password_required() ) + return; + + foreach ( (array) get_post_custom() as $key => $val) { + if ($key == 'enclosure') { + foreach ( (array) $val as $enc ) { + $enclosure = explode("\n", $enc); + + // only get the first element, e.g. audio/mpeg from 'audio/mpeg mpga mp2 mp3' + $t = preg_split('/[ \t]/', trim($enclosure[2]) ); + $type = $t[0]; + + /** + * Filter the RSS enclosure HTML link tag for the current post. + * + * @since 2.2.0 + * + * @param string $html_link_tag The HTML link tag with a URI and other attributes. + */ + echo apply_filters( 'rss_enclosure', '' . "\n" ); + } + } + } +} + +/** + * Display the atom enclosure for the current post. + * + * Uses the global $post to check whether the post requires a password and if + * the user has the password for the post. If not then it will return before + * displaying. + * + * Also uses the function get_post_custom() to get the post's 'enclosure' + * metadata field and parses the value to display the enclosure(s). The + * enclosure(s) consist of link HTML tag(s) with a URI and other attributes. + * + * @since 2.2.0 + * @uses get_post_custom() To get the current post enclosure metadata. + */ +function atom_enclosure() { + if ( post_password_required() ) + return; + + foreach ( (array) get_post_custom() as $key => $val ) { + if ($key == 'enclosure') { + foreach ( (array) $val as $enc ) { + $enclosure = explode("\n", $enc); + /** + * Filter the atom enclosure HTML link tag for the current post. + * + * @since 2.2.0 + * + * @param string $html_link_tag The HTML link tag with a URI and other attributes. + */ + echo apply_filters( 'atom_enclosure', '' . "\n" ); + } + } + } +} + +/** + * Determine the type of a string of data with the data formatted. + * + * Tell whether the type is text, html, or xhtml, per RFC 4287 section 3.1. + * + * In the case of WordPress, text is defined as containing no markup, + * xhtml is defined as "well formed", and html as tag soup (i.e., the rest). + * + * Container div tags are added to xhtml values, per section 3.1.1.3. + * + * @link http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rfc.section.3.1 + * + * @since 2.5.0 + * + * @param string $data Input string + * @return array array(type, value) + */ +function prep_atom_text_construct($data) { + if (strpos($data, '<') === false && strpos($data, '&') === false) { + return array('text', $data); + } + + $parser = xml_parser_create(); + xml_parse($parser, '
            ' . $data . '
            ', true); + $code = xml_get_error_code($parser); + xml_parser_free($parser); + + if (!$code) { + if (strpos($data, '<') === false) { + return array('text', $data); + } else { + $data = "
            $data
            "; + return array('xhtml', $data); + } + } + + if (strpos($data, ']]>') == false) { + return array('html', ""); + } else { + return array('html', htmlspecialchars($data)); + } +} + +/** + * Display the link for the currently displayed feed in a XSS safe way. + * + * Generate a correct link for the atom:self element. + * + * @since 2.5.0 + */ +function self_link() { + $host = @parse_url(home_url()); + /** + * Filter the current feed URL. + * + * @since 3.6.0 + * + * @see set_url_scheme() + * @see wp_unslash() + * + * @param string $feed_link The link for the feed with set URL scheme. + */ + echo esc_url( apply_filters( 'self_link', set_url_scheme( 'http://' . $host['host'] . wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) ); +} + +/** + * Return the content type for specified feed type. + * + * @since 2.8.0 + */ +function feed_content_type( $type = '' ) { + if ( empty($type) ) + $type = get_default_feed(); + + $types = array( + 'rss' => 'application/rss+xml', + 'rss2' => 'application/rss+xml', + 'rss-http' => 'text/xml', + 'atom' => 'application/atom+xml', + 'rdf' => 'application/rdf+xml' + ); + + $content_type = ( !empty($types[$type]) ) ? $types[$type] : 'application/octet-stream'; + + /** + * Filter the content type for a specific feed type. + * + * @since 2.8.0 + * + * @param string $content_type Content type indicating the type of data that a feed contains. + * @param string $type Type of feed. Possible values include 'rss2', 'atom'. + * Default 'rss2'. + */ + return apply_filters( 'feed_content_type', $content_type, $type ); +} + +/** + * Build SimplePie object based on RSS or Atom feed from URL. + * + * @since 2.8.0 + * + * @param mixed $url URL of feed to retrieve. If an array of URLs, the feeds are merged + * using SimplePie's multifeed feature. + * See also {@link ​http://simplepie.org/wiki/faq/typical_multifeed_gotchas} + * + * @return WP_Error|SimplePie WP_Error object on failure or SimplePie object on success + */ +function fetch_feed( $url ) { + require_once( ABSPATH . WPINC . '/class-feed.php' ); + + $feed = new SimplePie(); + + $feed->set_sanitize_class( 'WP_SimplePie_Sanitize_KSES' ); + // We must manually overwrite $feed->sanitize because SimplePie's + // constructor sets it before we have a chance to set the sanitization class + $feed->sanitize = new WP_SimplePie_Sanitize_KSES(); + + $feed->set_cache_class( 'WP_Feed_Cache' ); + $feed->set_file_class( 'WP_SimplePie_File' ); + + $feed->set_feed_url( $url ); + /** This filter is documented in wp-includes/class-feed.php */ + $feed->set_cache_duration( apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $url ) ); + /** + * Fires just before processing the SimplePie feed object. + * + * @since 3.0.0 + * + * @param object &$feed SimplePie feed object, passed by reference. + * @param mixed $url URL of feed to retrieve. If an array of URLs, the feeds are merged. + */ + do_action_ref_array( 'wp_feed_options', array( &$feed, $url ) ); + $feed->init(); + $feed->handle_content_type(); + + if ( $feed->error() ) + return new WP_Error( 'simplepie-error', $feed->error() ); + + return $feed; +} diff --git a/wp-includes/fonts/dashicons.eot b/wp-includes/fonts/dashicons.eot new file mode 100644 index 0000000..69a8a5e Binary files /dev/null and b/wp-includes/fonts/dashicons.eot differ diff --git a/wp-includes/fonts/dashicons.svg b/wp-includes/fonts/dashicons.svg new file mode 100644 index 0000000..369d0c6 --- /dev/null +++ b/wp-includes/fonts/dashicons.svg @@ -0,0 +1,246 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/wp-includes/fonts/dashicons.ttf b/wp-includes/fonts/dashicons.ttf new file mode 100644 index 0000000..515e640 Binary files /dev/null and b/wp-includes/fonts/dashicons.ttf differ diff --git a/wp-includes/fonts/dashicons.woff b/wp-includes/fonts/dashicons.woff new file mode 100644 index 0000000..6aeca79 Binary files /dev/null and b/wp-includes/fonts/dashicons.woff differ diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php new file mode 100644 index 0000000..5efe0cd --- /dev/null +++ b/wp-includes/formatting.php @@ -0,0 +1,3827 @@ + + * 'cause today's effort makes it worth tomorrow's "holiday"... + * + * Becomes: + * + * ’cause today’s effort makes it worth tomorrow’s “holiday”… + * + * Code within certain html blocks are skipped. + * + * @since 0.71 + * @uses $wp_cockneyreplace Array of formatted entities for certain common phrases + * + * @param string $text The text to be formatted + * @return string The string replaced with html entities + */ +function wptexturize($text) { + global $wp_cockneyreplace; + static $static_characters, $static_replacements, $dynamic_characters, $dynamic_replacements, + $default_no_texturize_tags, $default_no_texturize_shortcodes; + + // No need to set up these static variables more than once + if ( ! isset( $static_characters ) ) { + /* translators: opening curly double quote */ + $opening_quote = _x( '“', 'opening curly double quote' ); + /* translators: closing curly double quote */ + $closing_quote = _x( '”', 'closing curly double quote' ); + + /* translators: apostrophe, for example in 'cause or can't */ + $apos = _x( '’', 'apostrophe' ); + + /* translators: prime, for example in 9' (nine feet) */ + $prime = _x( '′', 'prime' ); + /* translators: double prime, for example in 9" (nine inches) */ + $double_prime = _x( '″', 'double prime' ); + + /* translators: opening curly single quote */ + $opening_single_quote = _x( '‘', 'opening curly single quote' ); + /* translators: closing curly single quote */ + $closing_single_quote = _x( '’', 'closing curly single quote' ); + + /* translators: en dash */ + $en_dash = _x( '–', 'en dash' ); + /* translators: em dash */ + $em_dash = _x( '—', 'em dash' ); + + $default_no_texturize_tags = array('pre', 'code', 'kbd', 'style', 'script', 'tt'); + $default_no_texturize_shortcodes = array('code'); + + // if a plugin has provided an autocorrect array, use it + if ( isset($wp_cockneyreplace) ) { + $cockney = array_keys($wp_cockneyreplace); + $cockneyreplace = array_values($wp_cockneyreplace); + } elseif ( "'" != $apos ) { // Only bother if we're doing a replacement. + $cockney = array( "'tain't", "'twere", "'twas", "'tis", "'twill", "'til", "'bout", "'nuff", "'round", "'cause" ); + $cockneyreplace = array( $apos . "tain" . $apos . "t", $apos . "twere", $apos . "twas", $apos . "tis", $apos . "twill", $apos . "til", $apos . "bout", $apos . "nuff", $apos . "round", $apos . "cause" ); + } else { + $cockney = $cockneyreplace = array(); + } + + $static_characters = array_merge( array( '---', ' -- ', '--', ' - ', 'xn–', '...', '``', '\'\'', ' (tm)' ), $cockney ); + $static_replacements = array_merge( array( $em_dash, ' ' . $em_dash . ' ', $en_dash, ' ' . $en_dash . ' ', 'xn--', '…', $opening_quote, $closing_quote, ' ™' ), $cockneyreplace ); + + /* + * Regex for common whitespace characters. + * + * By default, spaces include new lines, tabs, nbsp entities, and the UTF-8 nbsp. + * This is designed to replace the PCRE \s sequence. In #WP22692, that sequence + * was found to be unreliable due to random inclusion of the A0 byte. + */ + $spaces = '[\r\n\t ]|\xC2\xA0| '; + + + // Pattern-based replacements of characters. + $dynamic = array(); + + // '99 '99s '99's (apostrophe) + if ( "'" !== $apos ) { + $dynamic[ '/\'(?=\d)/' ] = $apos; + } + + // Single quote at start, or preceded by (, {, <, [, ", or spaces. + if ( "'" !== $opening_single_quote ) { + $dynamic[ '/(?<=\A|[([{<"]|' . $spaces . ')\'/' ] = $opening_single_quote; + } + + // 9" (double prime) + if ( '"' !== $double_prime ) { + $dynamic[ '/(?<=\d)"/' ] = $double_prime; + } + + // 9' (prime) + if ( "'" !== $prime ) { + $dynamic[ '/(?<=\d)\'/' ] = $prime; + } + + // Apostrophe in a word. No spaces or double primes. + if ( "'" !== $apos ) { + $dynamic[ '/(?|\[.*\])/Us', $text, -1, PREG_SPLIT_DELIM_CAPTURE); + + foreach ( $textarr as &$curl ) { + if ( empty( $curl ) ) { + continue; + } + + // Only call _wptexturize_pushpop_element if first char is correct tag opening + $first = $curl[0]; + if ( '<' === $first ) { + _wptexturize_pushpop_element($curl, $no_texturize_tags_stack, $no_texturize_tags, '<', '>'); + } elseif ( '[' === $first ) { + _wptexturize_pushpop_element($curl, $no_texturize_shortcodes_stack, $no_texturize_shortcodes, '[', ']'); + } elseif ( empty($no_texturize_shortcodes_stack) && empty($no_texturize_tags_stack) ) { + + // This is not a tag, nor is the texturization disabled static strings + $curl = str_replace($static_characters, $static_replacements, $curl); + + // regular expressions + $curl = preg_replace($dynamic_characters, $dynamic_replacements, $curl); + + // 9x9 (times) + if ( 1 === preg_match( '/(?<=\d)x\d/', $text ) ) { + // Searching for a digit is 10 times more expensive than for the x, so we avoid doing this one! + $curl = preg_replace( '/\b(\d+)x(\d+)\b/', '$1×$2', $curl ); + } + } + + // Replace each & with & unless it already looks like an entity. + $curl = preg_replace('/&([^#])(?![a-zA-Z1-4]{1,8};)/', '&$1', $curl); + } + return implode( '', $textarr ); +} + +/** + * Search for disabled element tags. Push element to stack on tag open and pop + * on tag close. Assumes first character of $text is tag opening. + * + * @since 2.9.0 + * @access private + * + * @param string $text Text to check. First character is assumed to be $opening + * @param array $stack Array used as stack of opened tag elements + * @param string $disabled_elements Tags to match against formatted as regexp sub-expression + * @param string $opening Tag opening character, assumed to be 1 character long + * @param string $closing Tag closing character + */ +function _wptexturize_pushpop_element($text, &$stack, $disabled_elements, $opening = '<', $closing = '>') { + // Check if it is a closing tag -- otherwise assume opening tag + if (strncmp($opening . '/', $text, 2)) { + // Opening? Check $text+1 against disabled elements + if (preg_match('/^' . $disabled_elements . '\b/', substr($text, 1), $matches)) { + /* + * This disables texturize until we find a closing tag of our type + * (e.g.
            ) even if there was invalid nesting before that
            +			 *
            +			 * Example: in the case 
            sadsadasd"baba"
            + * "baba" won't be texturize + */ + + array_push($stack, $matches[1]); + } + } else { + // Closing? Check $text+2 against disabled elements + $c = preg_quote($closing, '/'); + if (preg_match('/^' . $disabled_elements . $c . '/', substr($text, 2), $matches)) { + $last = array_pop($stack); + + // Make sure it matches the opening tag + if ( $last != $matches[1] ) { + array_push( $stack, $last ); + } + } + } +} + +/** + * Replaces double line-breaks with paragraph elements. + * + * A group of regex replaces used to identify text formatted with newlines and + * replace double line-breaks with HTML paragraph tags. The remaining + * line-breaks after conversion become <
            > tags, unless $br is set to '0' + * or 'false'. + * + * @since 0.71 + * + * @param string $pee The text which has to be formatted. + * @param bool $br Optional. If set, this will convert all remaining line-breaks after paragraphing. Default true. + * @return string Text which has been converted into correct paragraph tags. + */ +function wpautop($pee, $br = true) { + $pre_tags = array(); + + if ( trim($pee) === '' ) + return ''; + + $pee = $pee . "\n"; // just to make things a little easier, pad the end + + if ( strpos($pee, '', $pee ); + $last_pee = array_pop($pee_parts); + $pee = ''; + $i = 0; + + foreach ( $pee_parts as $pee_part ) { + $start = strpos($pee_part, ''; + + $pee .= substr( $pee_part, 0, $start ) . $name; + $i++; + } + + $pee .= $last_pee; + } + + $pee = preg_replace('|
            \s*
            |', "\n\n", $pee); + // Space things out a little + $allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|noscript|legend|section|article|aside|hgroup|header|footer|nav|figure|details|menu|summary)'; + $pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', "\n$1", $pee); + $pee = preg_replace('!()!', "$1\n\n", $pee); + $pee = str_replace(array("\r\n", "\r"), "\n", $pee); // cross-platform newlines + + if ( strpos( $pee, '' ) !== false ) { + // no P/BR around param and embed + $pee = preg_replace( '|(]*>)\s*|', '$1', $pee ); + $pee = preg_replace( '|\s*|', '', $pee ); + $pee = preg_replace( '%\s*(]*>)\s*%', '$1', $pee ); + } + + if ( strpos( $pee, '\]]*[>\]])\s*%', '$1', $pee ); + $pee = preg_replace( '%\s*([<\[]/(?:audio|video)[>\]])%', '$1', $pee ); + $pee = preg_replace( '%\s*(<(?:source|track)[^>]*>)\s*%', '$1', $pee ); + } + + $pee = preg_replace("/\n\n+/", "\n\n", $pee); // take care of duplicates + // make paragraphs, including one at the end + $pees = preg_split('/\n\s*\n/', $pee, -1, PREG_SPLIT_NO_EMPTY); + $pee = ''; + + foreach ( $pees as $tinkle ) { + $pee .= '

            ' . trim($tinkle, "\n") . "

            \n"; + } + + $pee = preg_replace('|

            \s*

            |', '', $pee); // under certain strange conditions it could create a P of entirely whitespace + $pee = preg_replace('!

            ([^<]+)!', "

            $1

            ", $pee); + $pee = preg_replace('!

            \s*(]*>)\s*

            !', "$1", $pee); // don't pee all over a tag + $pee = preg_replace("|

            (|", "$1", $pee); // problem with nested lists + $pee = preg_replace('|

            ]*)>|i', "

            ", $pee); + $pee = str_replace('

            ', '

            ', $pee); + $pee = preg_replace('!

            \s*(]*>)!', "$1", $pee); + $pee = preg_replace('!(]*>)\s*

            !', "$1", $pee); + + if ( $br ) { + $pee = preg_replace_callback('/<(script|style).*?<\/\\1>/s', '_autop_newline_preservation_helper', $pee); + $pee = preg_replace('|(?)\s*\n|', "
            \n", $pee); // optionally make line breaks + $pee = str_replace('', "\n", $pee); + } + + $pee = preg_replace('!(]*>)\s*
            !', "$1", $pee); + $pee = preg_replace('!
            (\s*]*>)!', '$1', $pee); + $pee = preg_replace( "|\n

            $|", '

            ', $pee ); + + if ( !empty($pre_tags) ) + $pee = str_replace(array_keys($pre_tags), array_values($pre_tags), $pee); + + return $pee; +} + +/** + * Newline preservation help function for wpautop + * + * @since 3.1.0 + * @access private + * + * @param array $matches preg_replace_callback matches array + * @return string + */ +function _autop_newline_preservation_helper( $matches ) { + return str_replace("\n", "", $matches[0]); +} + +/** + * Don't auto-p wrap shortcodes that stand alone + * + * Ensures that shortcodes are not wrapped in <

            >...<

            >. + * + * @since 2.9.0 + * + * @param string $pee The content. + * @return string The filtered content. + */ +function shortcode_unautop( $pee ) { + global $shortcode_tags; + + if ( empty( $shortcode_tags ) || !is_array( $shortcode_tags ) ) { + return $pee; + } + + $tagregexp = join( '|', array_map( 'preg_quote', array_keys( $shortcode_tags ) ) ); + + $pattern = + '/' + . '

            ' // Opening paragraph + . '\\s*+' // Optional leading whitespace + . '(' // 1: The shortcode + . '\\[' // Opening bracket + . "($tagregexp)" // 2: Shortcode name + . '(?![\\w-])' // Not followed by word character or hyphen + // Unroll the loop: Inside the opening shortcode tag + . '[^\\]\\/]*' // Not a closing bracket or forward slash + . '(?:' + . '\\/(?!\\])' // A forward slash not followed by a closing bracket + . '[^\\]\\/]*' // Not a closing bracket or forward slash + . ')*?' + . '(?:' + . '\\/\\]' // Self closing tag and closing bracket + . '|' + . '\\]' // Closing bracket + . '(?:' // Unroll the loop: Optionally, anything between the opening and closing shortcode tags + . '[^\\[]*+' // Not an opening bracket + . '(?:' + . '\\[(?!\\/\\2\\])' // An opening bracket not followed by the closing shortcode tag + . '[^\\[]*+' // Not an opening bracket + . ')*+' + . '\\[\\/\\2\\]' // Closing shortcode tag + . ')?' + . ')' + . ')' + . '\\s*+' // optional trailing whitespace + . '<\\/p>' // closing paragraph + . '/s'; + + return preg_replace( $pattern, '$1', $pee ); +} + +/** + * Checks to see if a string is utf8 encoded. + * + * NOTE: This function checks for 5-Byte sequences, UTF8 + * has Bytes Sequences with a maximum length of 4. + * + * @author bmorel at ssi dot fr (modified) + * @since 1.2.1 + * + * @param string $str The string to be checked + * @return bool True if $str fits a UTF-8 model, false otherwise. + */ +function seems_utf8($str) { + $length = strlen($str); + for ($i=0; $i < $length; $i++) { + $c = ord($str[$i]); + if ($c < 0x80) $n = 0; # 0bbbbbbb + elseif (($c & 0xE0) == 0xC0) $n=1; # 110bbbbb + elseif (($c & 0xF0) == 0xE0) $n=2; # 1110bbbb + elseif (($c & 0xF8) == 0xF0) $n=3; # 11110bbb + elseif (($c & 0xFC) == 0xF8) $n=4; # 111110bb + elseif (($c & 0xFE) == 0xFC) $n=5; # 1111110b + else return false; # Does not match any model + for ($j=0; $j<$n; $j++) { # n bytes matching 10bbbbbb follow ? + if ((++$i == $length) || ((ord($str[$i]) & 0xC0) != 0x80)) + return false; + } + } + return true; +} + +/** + * Converts a number of special characters into their HTML entities. + * + * Specifically deals with: &, <, >, ", and '. + * + * $quote_style can be set to ENT_COMPAT to encode " to + * ", or ENT_QUOTES to do both. Default is ENT_NOQUOTES where no quotes are encoded. + * + * @since 1.2.2 + * @access private + * + * @param string $string The text which is to be encoded. + * @param mixed $quote_style Optional. Converts double quotes if set to ENT_COMPAT, both single and double if set to ENT_QUOTES or none if set to ENT_NOQUOTES. Also compatible with old values; converting single quotes if set to 'single', double if set to 'double' or both if otherwise set. Default is ENT_NOQUOTES. + * @param string $charset Optional. The character encoding of the string. Default is false. + * @param boolean $double_encode Optional. Whether to encode existing html entities. Default is false. + * @return string The encoded text with HTML entities. + */ +function _wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) { + $string = (string) $string; + + if ( 0 === strlen( $string ) ) + return ''; + + // Don't bother if there are no specialchars - saves some processing + if ( ! preg_match( '/[&<>"\']/', $string ) ) + return $string; + + // Account for the previous behaviour of the function when the $quote_style is not an accepted value + if ( empty( $quote_style ) ) + $quote_style = ENT_NOQUOTES; + elseif ( ! in_array( $quote_style, array( 0, 2, 3, 'single', 'double' ), true ) ) + $quote_style = ENT_QUOTES; + + // Store the site charset as a static to avoid multiple calls to wp_load_alloptions() + if ( ! $charset ) { + static $_charset; + if ( ! isset( $_charset ) ) { + $alloptions = wp_load_alloptions(); + $_charset = isset( $alloptions['blog_charset'] ) ? $alloptions['blog_charset'] : ''; + } + $charset = $_charset; + } + + if ( in_array( $charset, array( 'utf8', 'utf-8', 'UTF8' ) ) ) + $charset = 'UTF-8'; + + $_quote_style = $quote_style; + + if ( $quote_style === 'double' ) { + $quote_style = ENT_COMPAT; + $_quote_style = ENT_COMPAT; + } elseif ( $quote_style === 'single' ) { + $quote_style = ENT_NOQUOTES; + } + + // Handle double encoding ourselves + if ( $double_encode ) { + $string = @htmlspecialchars( $string, $quote_style, $charset ); + } else { + // Decode & into & + $string = wp_specialchars_decode( $string, $_quote_style ); + + // Guarantee every &entity; is valid or re-encode the & + $string = wp_kses_normalize_entities( $string ); + + // Now re-encode everything except &entity; + $string = preg_split( '/(&#?x?[0-9a-z]+;)/i', $string, -1, PREG_SPLIT_DELIM_CAPTURE ); + + for ( $i = 0; $i < count( $string ); $i += 2 ) + $string[$i] = @htmlspecialchars( $string[$i], $quote_style, $charset ); + + $string = implode( '', $string ); + } + + // Backwards compatibility + if ( 'single' === $_quote_style ) + $string = str_replace( "'", ''', $string ); + + return $string; +} + +/** + * Converts a number of HTML entities into their special characters. + * + * Specifically deals with: &, <, >, ", and '. + * + * $quote_style can be set to ENT_COMPAT to decode " entities, + * or ENT_QUOTES to do both " and '. Default is ENT_NOQUOTES where no quotes are decoded. + * + * @since 2.8.0 + * + * @param string $string The text which is to be decoded. + * @param mixed $quote_style Optional. Converts double quotes if set to ENT_COMPAT, both single and double if set to ENT_QUOTES or none if set to ENT_NOQUOTES. Also compatible with old _wp_specialchars() values; converting single quotes if set to 'single', double if set to 'double' or both if otherwise set. Default is ENT_NOQUOTES. + * @return string The decoded text without HTML entities. + */ +function wp_specialchars_decode( $string, $quote_style = ENT_NOQUOTES ) { + $string = (string) $string; + + if ( 0 === strlen( $string ) ) { + return ''; + } + + // Don't bother if there are no entities - saves a lot of processing + if ( strpos( $string, '&' ) === false ) { + return $string; + } + + // Match the previous behaviour of _wp_specialchars() when the $quote_style is not an accepted value + if ( empty( $quote_style ) ) { + $quote_style = ENT_NOQUOTES; + } elseif ( !in_array( $quote_style, array( 0, 2, 3, 'single', 'double' ), true ) ) { + $quote_style = ENT_QUOTES; + } + + // More complete than get_html_translation_table( HTML_SPECIALCHARS ) + $single = array( ''' => '\'', ''' => '\'' ); + $single_preg = array( '/�*39;/' => ''', '/�*27;/i' => ''' ); + $double = array( '"' => '"', '"' => '"', '"' => '"' ); + $double_preg = array( '/�*34;/' => '"', '/�*22;/i' => '"' ); + $others = array( '<' => '<', '<' => '<', '>' => '>', '>' => '>', '&' => '&', '&' => '&', '&' => '&' ); + $others_preg = array( '/�*60;/' => '<', '/�*62;/' => '>', '/�*38;/' => '&', '/�*26;/i' => '&' ); + + if ( $quote_style === ENT_QUOTES ) { + $translation = array_merge( $single, $double, $others ); + $translation_preg = array_merge( $single_preg, $double_preg, $others_preg ); + } elseif ( $quote_style === ENT_COMPAT || $quote_style === 'double' ) { + $translation = array_merge( $double, $others ); + $translation_preg = array_merge( $double_preg, $others_preg ); + } elseif ( $quote_style === 'single' ) { + $translation = array_merge( $single, $others ); + $translation_preg = array_merge( $single_preg, $others_preg ); + } elseif ( $quote_style === ENT_NOQUOTES ) { + $translation = $others; + $translation_preg = $others_preg; + } + + // Remove zero padding on numeric entities + $string = preg_replace( array_keys( $translation_preg ), array_values( $translation_preg ), $string ); + + // Replace characters according to translation table + return strtr( $string, $translation ); +} + +/** + * Checks for invalid UTF8 in a string. + * + * @since 2.8.0 + * + * @param string $string The text which is to be checked. + * @param boolean $strip Optional. Whether to attempt to strip out invalid UTF8. Default is false. + * @return string The checked text. + */ +function wp_check_invalid_utf8( $string, $strip = false ) { + $string = (string) $string; + + if ( 0 === strlen( $string ) ) { + return ''; + } + + // Store the site charset as a static to avoid multiple calls to get_option() + static $is_utf8; + if ( !isset( $is_utf8 ) ) { + $is_utf8 = in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ); + } + if ( !$is_utf8 ) { + return $string; + } + + // Check for support for utf8 in the installed PCRE library once and store the result in a static + static $utf8_pcre; + if ( !isset( $utf8_pcre ) ) { + $utf8_pcre = @preg_match( '/^./u', 'a' ); + } + // We can't demand utf8 in the PCRE installation, so just return the string in those cases + if ( !$utf8_pcre ) { + return $string; + } + + // preg_match fails when it encounters invalid UTF8 in $string + if ( 1 === @preg_match( '/^./us', $string ) ) { + return $string; + } + + // Attempt to strip the bad chars if requested (not recommended) + if ( $strip && function_exists( 'iconv' ) ) { + return iconv( 'utf-8', 'utf-8', $string ); + } + + return ''; +} + +/** + * Encode the Unicode values to be used in the URI. + * + * @since 1.5.0 + * + * @param string $utf8_string + * @param int $length Max length of the string + * @return string String with Unicode encoded for URI. + */ +function utf8_uri_encode( $utf8_string, $length = 0 ) { + $unicode = ''; + $values = array(); + $num_octets = 1; + $unicode_length = 0; + + $string_length = strlen( $utf8_string ); + for ($i = 0; $i < $string_length; $i++ ) { + + $value = ord( $utf8_string[ $i ] ); + + if ( $value < 128 ) { + if ( $length && ( $unicode_length >= $length ) ) + break; + $unicode .= chr($value); + $unicode_length++; + } else { + if ( count( $values ) == 0 ) $num_octets = ( $value < 224 ) ? 2 : 3; + + $values[] = $value; + + if ( $length && ( $unicode_length + ($num_octets * 3) ) > $length ) + break; + if ( count( $values ) == $num_octets ) { + if ($num_octets == 3) { + $unicode .= '%' . dechex($values[0]) . '%' . dechex($values[1]) . '%' . dechex($values[2]); + $unicode_length += 9; + } else { + $unicode .= '%' . dechex($values[0]) . '%' . dechex($values[1]); + $unicode_length += 6; + } + + $values = array(); + $num_octets = 1; + } + } + } + + return $unicode; +} + +/** + * Converts all accent characters to ASCII characters. + * + * If there are no accent characters, then the string given is just returned. + * + * @since 1.2.1 + * + * @param string $string Text that might have accent characters + * @return string Filtered string with replaced "nice" characters. + */ +function remove_accents($string) { + if ( !preg_match('/[\x80-\xff]/', $string) ) + return $string; + + if (seems_utf8($string)) { + $chars = array( + // Decompositions for Latin-1 Supplement + chr(194).chr(170) => 'a', chr(194).chr(186) => 'o', + chr(195).chr(128) => 'A', chr(195).chr(129) => 'A', + chr(195).chr(130) => 'A', chr(195).chr(131) => 'A', + chr(195).chr(132) => 'A', chr(195).chr(133) => 'A', + chr(195).chr(134) => 'AE',chr(195).chr(135) => 'C', + chr(195).chr(136) => 'E', chr(195).chr(137) => 'E', + chr(195).chr(138) => 'E', chr(195).chr(139) => 'E', + chr(195).chr(140) => 'I', chr(195).chr(141) => 'I', + chr(195).chr(142) => 'I', chr(195).chr(143) => 'I', + chr(195).chr(144) => 'D', chr(195).chr(145) => 'N', + chr(195).chr(146) => 'O', chr(195).chr(147) => 'O', + chr(195).chr(148) => 'O', chr(195).chr(149) => 'O', + chr(195).chr(150) => 'O', chr(195).chr(153) => 'U', + chr(195).chr(154) => 'U', chr(195).chr(155) => 'U', + chr(195).chr(156) => 'U', chr(195).chr(157) => 'Y', + chr(195).chr(158) => 'TH',chr(195).chr(159) => 's', + chr(195).chr(160) => 'a', chr(195).chr(161) => 'a', + chr(195).chr(162) => 'a', chr(195).chr(163) => 'a', + chr(195).chr(164) => 'a', chr(195).chr(165) => 'a', + chr(195).chr(166) => 'ae',chr(195).chr(167) => 'c', + chr(195).chr(168) => 'e', chr(195).chr(169) => 'e', + chr(195).chr(170) => 'e', chr(195).chr(171) => 'e', + chr(195).chr(172) => 'i', chr(195).chr(173) => 'i', + chr(195).chr(174) => 'i', chr(195).chr(175) => 'i', + chr(195).chr(176) => 'd', chr(195).chr(177) => 'n', + chr(195).chr(178) => 'o', chr(195).chr(179) => 'o', + chr(195).chr(180) => 'o', chr(195).chr(181) => 'o', + chr(195).chr(182) => 'o', chr(195).chr(184) => 'o', + chr(195).chr(185) => 'u', chr(195).chr(186) => 'u', + chr(195).chr(187) => 'u', chr(195).chr(188) => 'u', + chr(195).chr(189) => 'y', chr(195).chr(190) => 'th', + chr(195).chr(191) => 'y', chr(195).chr(152) => 'O', + // Decompositions for Latin Extended-A + chr(196).chr(128) => 'A', chr(196).chr(129) => 'a', + chr(196).chr(130) => 'A', chr(196).chr(131) => 'a', + chr(196).chr(132) => 'A', chr(196).chr(133) => 'a', + chr(196).chr(134) => 'C', chr(196).chr(135) => 'c', + chr(196).chr(136) => 'C', chr(196).chr(137) => 'c', + chr(196).chr(138) => 'C', chr(196).chr(139) => 'c', + chr(196).chr(140) => 'C', chr(196).chr(141) => 'c', + chr(196).chr(142) => 'D', chr(196).chr(143) => 'd', + chr(196).chr(144) => 'D', chr(196).chr(145) => 'd', + chr(196).chr(146) => 'E', chr(196).chr(147) => 'e', + chr(196).chr(148) => 'E', chr(196).chr(149) => 'e', + chr(196).chr(150) => 'E', chr(196).chr(151) => 'e', + chr(196).chr(152) => 'E', chr(196).chr(153) => 'e', + chr(196).chr(154) => 'E', chr(196).chr(155) => 'e', + chr(196).chr(156) => 'G', chr(196).chr(157) => 'g', + chr(196).chr(158) => 'G', chr(196).chr(159) => 'g', + chr(196).chr(160) => 'G', chr(196).chr(161) => 'g', + chr(196).chr(162) => 'G', chr(196).chr(163) => 'g', + chr(196).chr(164) => 'H', chr(196).chr(165) => 'h', + chr(196).chr(166) => 'H', chr(196).chr(167) => 'h', + chr(196).chr(168) => 'I', chr(196).chr(169) => 'i', + chr(196).chr(170) => 'I', chr(196).chr(171) => 'i', + chr(196).chr(172) => 'I', chr(196).chr(173) => 'i', + chr(196).chr(174) => 'I', chr(196).chr(175) => 'i', + chr(196).chr(176) => 'I', chr(196).chr(177) => 'i', + chr(196).chr(178) => 'IJ',chr(196).chr(179) => 'ij', + chr(196).chr(180) => 'J', chr(196).chr(181) => 'j', + chr(196).chr(182) => 'K', chr(196).chr(183) => 'k', + chr(196).chr(184) => 'k', chr(196).chr(185) => 'L', + chr(196).chr(186) => 'l', chr(196).chr(187) => 'L', + chr(196).chr(188) => 'l', chr(196).chr(189) => 'L', + chr(196).chr(190) => 'l', chr(196).chr(191) => 'L', + chr(197).chr(128) => 'l', chr(197).chr(129) => 'L', + chr(197).chr(130) => 'l', chr(197).chr(131) => 'N', + chr(197).chr(132) => 'n', chr(197).chr(133) => 'N', + chr(197).chr(134) => 'n', chr(197).chr(135) => 'N', + chr(197).chr(136) => 'n', chr(197).chr(137) => 'N', + chr(197).chr(138) => 'n', chr(197).chr(139) => 'N', + chr(197).chr(140) => 'O', chr(197).chr(141) => 'o', + chr(197).chr(142) => 'O', chr(197).chr(143) => 'o', + chr(197).chr(144) => 'O', chr(197).chr(145) => 'o', + chr(197).chr(146) => 'OE',chr(197).chr(147) => 'oe', + chr(197).chr(148) => 'R',chr(197).chr(149) => 'r', + chr(197).chr(150) => 'R',chr(197).chr(151) => 'r', + chr(197).chr(152) => 'R',chr(197).chr(153) => 'r', + chr(197).chr(154) => 'S',chr(197).chr(155) => 's', + chr(197).chr(156) => 'S',chr(197).chr(157) => 's', + chr(197).chr(158) => 'S',chr(197).chr(159) => 's', + chr(197).chr(160) => 'S', chr(197).chr(161) => 's', + chr(197).chr(162) => 'T', chr(197).chr(163) => 't', + chr(197).chr(164) => 'T', chr(197).chr(165) => 't', + chr(197).chr(166) => 'T', chr(197).chr(167) => 't', + chr(197).chr(168) => 'U', chr(197).chr(169) => 'u', + chr(197).chr(170) => 'U', chr(197).chr(171) => 'u', + chr(197).chr(172) => 'U', chr(197).chr(173) => 'u', + chr(197).chr(174) => 'U', chr(197).chr(175) => 'u', + chr(197).chr(176) => 'U', chr(197).chr(177) => 'u', + chr(197).chr(178) => 'U', chr(197).chr(179) => 'u', + chr(197).chr(180) => 'W', chr(197).chr(181) => 'w', + chr(197).chr(182) => 'Y', chr(197).chr(183) => 'y', + chr(197).chr(184) => 'Y', chr(197).chr(185) => 'Z', + chr(197).chr(186) => 'z', chr(197).chr(187) => 'Z', + chr(197).chr(188) => 'z', chr(197).chr(189) => 'Z', + chr(197).chr(190) => 'z', chr(197).chr(191) => 's', + // Decompositions for Latin Extended-B + chr(200).chr(152) => 'S', chr(200).chr(153) => 's', + chr(200).chr(154) => 'T', chr(200).chr(155) => 't', + // Euro Sign + chr(226).chr(130).chr(172) => 'E', + // GBP (Pound) Sign + chr(194).chr(163) => '', + // Vowels with diacritic (Vietnamese) + // unmarked + chr(198).chr(160) => 'O', chr(198).chr(161) => 'o', + chr(198).chr(175) => 'U', chr(198).chr(176) => 'u', + // grave accent + chr(225).chr(186).chr(166) => 'A', chr(225).chr(186).chr(167) => 'a', + chr(225).chr(186).chr(176) => 'A', chr(225).chr(186).chr(177) => 'a', + chr(225).chr(187).chr(128) => 'E', chr(225).chr(187).chr(129) => 'e', + chr(225).chr(187).chr(146) => 'O', chr(225).chr(187).chr(147) => 'o', + chr(225).chr(187).chr(156) => 'O', chr(225).chr(187).chr(157) => 'o', + chr(225).chr(187).chr(170) => 'U', chr(225).chr(187).chr(171) => 'u', + chr(225).chr(187).chr(178) => 'Y', chr(225).chr(187).chr(179) => 'y', + // hook + chr(225).chr(186).chr(162) => 'A', chr(225).chr(186).chr(163) => 'a', + chr(225).chr(186).chr(168) => 'A', chr(225).chr(186).chr(169) => 'a', + chr(225).chr(186).chr(178) => 'A', chr(225).chr(186).chr(179) => 'a', + chr(225).chr(186).chr(186) => 'E', chr(225).chr(186).chr(187) => 'e', + chr(225).chr(187).chr(130) => 'E', chr(225).chr(187).chr(131) => 'e', + chr(225).chr(187).chr(136) => 'I', chr(225).chr(187).chr(137) => 'i', + chr(225).chr(187).chr(142) => 'O', chr(225).chr(187).chr(143) => 'o', + chr(225).chr(187).chr(148) => 'O', chr(225).chr(187).chr(149) => 'o', + chr(225).chr(187).chr(158) => 'O', chr(225).chr(187).chr(159) => 'o', + chr(225).chr(187).chr(166) => 'U', chr(225).chr(187).chr(167) => 'u', + chr(225).chr(187).chr(172) => 'U', chr(225).chr(187).chr(173) => 'u', + chr(225).chr(187).chr(182) => 'Y', chr(225).chr(187).chr(183) => 'y', + // tilde + chr(225).chr(186).chr(170) => 'A', chr(225).chr(186).chr(171) => 'a', + chr(225).chr(186).chr(180) => 'A', chr(225).chr(186).chr(181) => 'a', + chr(225).chr(186).chr(188) => 'E', chr(225).chr(186).chr(189) => 'e', + chr(225).chr(187).chr(132) => 'E', chr(225).chr(187).chr(133) => 'e', + chr(225).chr(187).chr(150) => 'O', chr(225).chr(187).chr(151) => 'o', + chr(225).chr(187).chr(160) => 'O', chr(225).chr(187).chr(161) => 'o', + chr(225).chr(187).chr(174) => 'U', chr(225).chr(187).chr(175) => 'u', + chr(225).chr(187).chr(184) => 'Y', chr(225).chr(187).chr(185) => 'y', + // acute accent + chr(225).chr(186).chr(164) => 'A', chr(225).chr(186).chr(165) => 'a', + chr(225).chr(186).chr(174) => 'A', chr(225).chr(186).chr(175) => 'a', + chr(225).chr(186).chr(190) => 'E', chr(225).chr(186).chr(191) => 'e', + chr(225).chr(187).chr(144) => 'O', chr(225).chr(187).chr(145) => 'o', + chr(225).chr(187).chr(154) => 'O', chr(225).chr(187).chr(155) => 'o', + chr(225).chr(187).chr(168) => 'U', chr(225).chr(187).chr(169) => 'u', + // dot below + chr(225).chr(186).chr(160) => 'A', chr(225).chr(186).chr(161) => 'a', + chr(225).chr(186).chr(172) => 'A', chr(225).chr(186).chr(173) => 'a', + chr(225).chr(186).chr(182) => 'A', chr(225).chr(186).chr(183) => 'a', + chr(225).chr(186).chr(184) => 'E', chr(225).chr(186).chr(185) => 'e', + chr(225).chr(187).chr(134) => 'E', chr(225).chr(187).chr(135) => 'e', + chr(225).chr(187).chr(138) => 'I', chr(225).chr(187).chr(139) => 'i', + chr(225).chr(187).chr(140) => 'O', chr(225).chr(187).chr(141) => 'o', + chr(225).chr(187).chr(152) => 'O', chr(225).chr(187).chr(153) => 'o', + chr(225).chr(187).chr(162) => 'O', chr(225).chr(187).chr(163) => 'o', + chr(225).chr(187).chr(164) => 'U', chr(225).chr(187).chr(165) => 'u', + chr(225).chr(187).chr(176) => 'U', chr(225).chr(187).chr(177) => 'u', + chr(225).chr(187).chr(180) => 'Y', chr(225).chr(187).chr(181) => 'y', + // Vowels with diacritic (Chinese, Hanyu Pinyin) + chr(201).chr(145) => 'a', + // macron + chr(199).chr(149) => 'U', chr(199).chr(150) => 'u', + // acute accent + chr(199).chr(151) => 'U', chr(199).chr(152) => 'u', + // caron + chr(199).chr(141) => 'A', chr(199).chr(142) => 'a', + chr(199).chr(143) => 'I', chr(199).chr(144) => 'i', + chr(199).chr(145) => 'O', chr(199).chr(146) => 'o', + chr(199).chr(147) => 'U', chr(199).chr(148) => 'u', + chr(199).chr(153) => 'U', chr(199).chr(154) => 'u', + // grave accent + chr(199).chr(155) => 'U', chr(199).chr(156) => 'u', + ); + + // Used for locale-specific rules + $locale = get_locale(); + + if ( 'de_DE' == $locale ) { + $chars[ chr(195).chr(132) ] = 'Ae'; + $chars[ chr(195).chr(164) ] = 'ae'; + $chars[ chr(195).chr(150) ] = 'Oe'; + $chars[ chr(195).chr(182) ] = 'oe'; + $chars[ chr(195).chr(156) ] = 'Ue'; + $chars[ chr(195).chr(188) ] = 'ue'; + $chars[ chr(195).chr(159) ] = 'ss'; + } elseif ( 'da_DK' === $locale ) { + $chars[ chr(195).chr(134) ] = 'Ae'; + $chars[ chr(195).chr(166) ] = 'ae'; + $chars[ chr(195).chr(152) ] = 'Oe'; + $chars[ chr(195).chr(184) ] = 'oe'; + $chars[ chr(195).chr(133) ] = 'Aa'; + $chars[ chr(195).chr(165) ] = 'aa'; + } + + $string = strtr($string, $chars); + } else { + // Assume ISO-8859-1 if not UTF-8 + $chars['in'] = chr(128).chr(131).chr(138).chr(142).chr(154).chr(158) + .chr(159).chr(162).chr(165).chr(181).chr(192).chr(193).chr(194) + .chr(195).chr(196).chr(197).chr(199).chr(200).chr(201).chr(202) + .chr(203).chr(204).chr(205).chr(206).chr(207).chr(209).chr(210) + .chr(211).chr(212).chr(213).chr(214).chr(216).chr(217).chr(218) + .chr(219).chr(220).chr(221).chr(224).chr(225).chr(226).chr(227) + .chr(228).chr(229).chr(231).chr(232).chr(233).chr(234).chr(235) + .chr(236).chr(237).chr(238).chr(239).chr(241).chr(242).chr(243) + .chr(244).chr(245).chr(246).chr(248).chr(249).chr(250).chr(251) + .chr(252).chr(253).chr(255); + + $chars['out'] = "EfSZszYcYuAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy"; + + $string = strtr($string, $chars['in'], $chars['out']); + $double_chars['in'] = array(chr(140), chr(156), chr(198), chr(208), chr(222), chr(223), chr(230), chr(240), chr(254)); + $double_chars['out'] = array('OE', 'oe', 'AE', 'DH', 'TH', 'ss', 'ae', 'dh', 'th'); + $string = str_replace($double_chars['in'], $double_chars['out'], $string); + } + + return $string; +} + +/** + * Sanitizes a filename, replacing whitespace with dashes. + * + * Removes special characters that are illegal in filenames on certain + * operating systems and special characters requiring special escaping + * to manipulate at the command line. Replaces spaces and consecutive + * dashes with a single dash. Trims period, dash and underscore from beginning + * and end of filename. + * + * @since 2.1.0 + * + * @param string $filename The filename to be sanitized + * @return string The sanitized filename + */ +function sanitize_file_name( $filename ) { + $filename_raw = $filename; + $special_chars = array("?", "[", "]", "/", "\\", "=", "<", ">", ":", ";", ",", "'", "\"", "&", "$", "#", "*", "(", ")", "|", "~", "`", "!", "{", "}", chr(0)); + /** + * Filter the list of characters to remove from a filename. + * + * @since 2.8.0 + * + * @param array $special_chars Characters to remove. + * @param string $filename_raw Filename as it was passed into sanitize_file_name(). + */ + $special_chars = apply_filters( 'sanitize_file_name_chars', $special_chars, $filename_raw ); + $filename = preg_replace( "#\x{00a0}#siu", ' ', $filename ); + $filename = str_replace($special_chars, '', $filename); + $filename = preg_replace('/[\s-]+/', '-', $filename); + $filename = trim($filename, '.-_'); + + // Split the filename into a base and extension[s] + $parts = explode('.', $filename); + + // Return if only one extension + if ( count( $parts ) <= 2 ) { + /** + * Filter a sanitized filename string. + * + * @since 2.8.0 + * + * @param string $filename Sanitized filename. + * @param string $filename_raw The filename prior to sanitization. + */ + return apply_filters( 'sanitize_file_name', $filename, $filename_raw ); + } + + // Process multiple extensions + $filename = array_shift($parts); + $extension = array_pop($parts); + $mimes = get_allowed_mime_types(); + + /* + * Loop over any intermediate extensions. Postfix them with a trailing underscore + * if they are a 2 - 5 character long alpha string not in the extension whitelist. + */ + foreach ( (array) $parts as $part) { + $filename .= '.' . $part; + + if ( preg_match("/^[a-zA-Z]{2,5}\d?$/", $part) ) { + $allowed = false; + foreach ( $mimes as $ext_preg => $mime_match ) { + $ext_preg = '!^(' . $ext_preg . ')$!i'; + if ( preg_match( $ext_preg, $part ) ) { + $allowed = true; + break; + } + } + if ( !$allowed ) + $filename .= '_'; + } + } + $filename .= '.' . $extension; + /** This filter is documented in wp-includes/formatting.php */ + return apply_filters('sanitize_file_name', $filename, $filename_raw); +} + +/** + * Sanitizes a username, stripping out unsafe characters. + * + * Removes tags, octets, entities, and if strict is enabled, will only keep + * alphanumeric, _, space, ., -, @. After sanitizing, it passes the username, + * raw username (the username in the parameter), and the value of $strict as + * parameters for the 'sanitize_user' filter. + * + * @since 2.0.0 + * + * @param string $username The username to be sanitized. + * @param bool $strict If set limits $username to specific characters. Default false. + * @return string The sanitized username, after passing through filters. + */ +function sanitize_user( $username, $strict = false ) { + $raw_username = $username; + $username = wp_strip_all_tags( $username ); + $username = remove_accents( $username ); + // Kill octets + $username = preg_replace( '|%([a-fA-F0-9][a-fA-F0-9])|', '', $username ); + $username = preg_replace( '/&.+?;/', '', $username ); // Kill entities + + // If strict, reduce to ASCII for max portability. + if ( $strict ) + $username = preg_replace( '|[^a-z0-9 _.\-@]|i', '', $username ); + + $username = trim( $username ); + // Consolidate contiguous whitespace + $username = preg_replace( '|\s+|', ' ', $username ); + + /** + * Filter a sanitized username string. + * + * @since 2.0.1 + * + * @param string $username Sanitized username. + * @param string $raw_username The username prior to sanitization. + * @param bool $strict Whether to limit the sanitization to specific characters. Default false. + */ + return apply_filters( 'sanitize_user', $username, $raw_username, $strict ); +} + +/** + * Sanitizes a string key. + * + * Keys are used as internal identifiers. Lowercase alphanumeric characters, dashes and underscores are allowed. + * + * @since 3.0.0 + * + * @param string $key String key + * @return string Sanitized key + */ +function sanitize_key( $key ) { + $raw_key = $key; + $key = strtolower( $key ); + $key = preg_replace( '/[^a-z0-9_\-]/', '', $key ); + + /** + * Filter a sanitized key string. + * + * @since 3.0.0 + * + * @param string $key Sanitized key. + * @param string $raw_key The key prior to sanitization. + */ + return apply_filters( 'sanitize_key', $key, $raw_key ); +} + +/** + * Sanitizes a title, or returns a fallback title. + * + * Specifically, HTML and PHP tags are stripped. Further actions can be added + * via the plugin API. If $title is empty and $fallback_title is set, the latter + * will be used. + * + * @since 1.0.0 + * + * @param string $title The string to be sanitized. + * @param string $fallback_title Optional. A title to use if $title is empty. + * @param string $context Optional. The operation for which the string is sanitized + * @return string The sanitized string. + */ +function sanitize_title( $title, $fallback_title = '', $context = 'save' ) { + $raw_title = $title; + + if ( 'save' == $context ) + $title = remove_accents($title); + + /** + * Filter a sanitized title string. + * + * @since 1.2.0 + * + * @param string $title Sanitized title. + * @param string $raw_title The title prior to sanitization. + * @param string $context The context for which the title is being sanitized. + */ + $title = apply_filters( 'sanitize_title', $title, $raw_title, $context ); + + if ( '' === $title || false === $title ) + $title = $fallback_title; + + return $title; +} + +/** + * Sanitizes a title with the 'query' context. + * + * Used for querying the database for a value from URL. + * + * @since 3.1.0 + * @uses sanitize_title() + * + * @param string $title The string to be sanitized. + * @return string The sanitized string. + */ +function sanitize_title_for_query( $title ) { + return sanitize_title( $title, '', 'query' ); +} + +/** + * Sanitizes a title, replacing whitespace and a few other characters with dashes. + * + * Limits the output to alphanumeric characters, underscore (_) and dash (-). + * Whitespace becomes a dash. + * + * @since 1.2.0 + * + * @param string $title The title to be sanitized. + * @param string $raw_title Optional. Not used. + * @param string $context Optional. The operation for which the string is sanitized. + * @return string The sanitized title. + */ +function sanitize_title_with_dashes( $title, $raw_title = '', $context = 'display' ) { + $title = strip_tags($title); + // Preserve escaped octets. + $title = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $title); + // Remove percent signs that are not part of an octet. + $title = str_replace('%', '', $title); + // Restore octets. + $title = preg_replace('|---([a-fA-F0-9][a-fA-F0-9])---|', '%$1', $title); + + if (seems_utf8($title)) { + if (function_exists('mb_strtolower')) { + $title = mb_strtolower($title, 'UTF-8'); + } + $title = utf8_uri_encode($title, 200); + } + + $title = strtolower($title); + $title = preg_replace('/&.+?;/', '', $title); // kill entities + $title = str_replace('.', '-', $title); + + if ( 'save' == $context ) { + // Convert nbsp, ndash and mdash to hyphens + $title = str_replace( array( '%c2%a0', '%e2%80%93', '%e2%80%94' ), '-', $title ); + + // Strip these characters entirely + $title = str_replace( array( + // iexcl and iquest + '%c2%a1', '%c2%bf', + // angle quotes + '%c2%ab', '%c2%bb', '%e2%80%b9', '%e2%80%ba', + // curly quotes + '%e2%80%98', '%e2%80%99', '%e2%80%9c', '%e2%80%9d', + '%e2%80%9a', '%e2%80%9b', '%e2%80%9e', '%e2%80%9f', + // copy, reg, deg, hellip and trade + '%c2%a9', '%c2%ae', '%c2%b0', '%e2%80%a6', '%e2%84%a2', + // acute accents + '%c2%b4', '%cb%8a', '%cc%81', '%cd%81', + // grave accent, macron, caron + '%cc%80', '%cc%84', '%cc%8c', + ), '', $title ); + + // Convert times to x + $title = str_replace( '%c3%97', 'x', $title ); + } + + $title = preg_replace('/[^%a-z0-9 _-]/', '', $title); + $title = preg_replace('/\s+/', '-', $title); + $title = preg_replace('|-+|', '-', $title); + $title = trim($title, '-'); + + return $title; +} + +/** + * Ensures a string is a valid SQL order by clause. + * + * Accepts one or more columns, with or without ASC/DESC, and also accepts + * RAND(). + * + * @since 2.5.1 + * + * @param string $orderby Order by string to be checked. + * @return string|bool Returns the order by clause if it is a match, false otherwise. + */ +function sanitize_sql_orderby( $orderby ){ + preg_match('/^\s*([a-z0-9_]+(\s+(ASC|DESC))?(\s*,\s*|\s*$))+|^\s*RAND\(\s*\)\s*$/i', $orderby, $obmatches); + if ( !$obmatches ) + return false; + return $orderby; +} + +/** + * Sanitizes an HTML classname to ensure it only contains valid characters. + * + * Strips the string down to A-Z,a-z,0-9,_,-. If this results in an empty + * string then it will return the alternative value supplied. + * + * @todo Expand to support the full range of CDATA that a class attribute can contain. + * + * @since 2.8.0 + * + * @param string $class The classname to be sanitized + * @param string $fallback Optional. The value to return if the sanitization end's up as an empty string. + * Defaults to an empty string. + * @return string The sanitized value + */ +function sanitize_html_class( $class, $fallback = '' ) { + //Strip out any % encoded octets + $sanitized = preg_replace( '|%[a-fA-F0-9][a-fA-F0-9]|', '', $class ); + + //Limit to A-Z,a-z,0-9,_,- + $sanitized = preg_replace( '/[^A-Za-z0-9_-]/', '', $sanitized ); + + if ( '' == $sanitized ) + $sanitized = $fallback; + + /** + * Filter a sanitized HTML class string. + * + * @since 2.8.0 + * + * @param string $sanitized The sanitized HTML class. + * @param string $class HTML class before sanitization. + * @param string $fallback The fallback string. + */ + return apply_filters( 'sanitize_html_class', $sanitized, $class, $fallback ); +} + +/** + * Converts a number of characters from a string. + * + * Metadata tags <> and <<category>> are removed, <<br>> and <<hr>> are + * converted into correct XHTML and Unicode characters are converted to the + * valid range. + * + * @since 0.71 + * + * @param string $content String of characters to be converted. + * @param string $deprecated Not used. + * @return string Converted string. + */ +function convert_chars($content, $deprecated = '') { + if ( !empty( $deprecated ) ) + _deprecated_argument( __FUNCTION__, '0.71' ); + + // Translation of invalid Unicode references range to valid range + $wp_htmltranswinuni = array( + '€' => '€', // the Euro sign + '' => '', + '‚' => '‚', // these are Windows CP1252 specific characters + 'ƒ' => 'ƒ', // they would look weird on non-Windows browsers + '„' => '„', + '…' => '…', + '†' => '†', + '‡' => '‡', + 'ˆ' => 'ˆ', + '‰' => '‰', + 'Š' => 'Š', + '‹' => '‹', + 'Œ' => 'Œ', + '' => '', + 'Ž' => 'Ž', + '' => '', + '' => '', + '‘' => '‘', + '’' => '’', + '“' => '“', + '”' => '”', + '•' => '•', + '–' => '–', + '—' => '—', + '˜' => '˜', + '™' => '™', + 'š' => 'š', + '›' => '›', + 'œ' => 'œ', + '' => '', + 'ž' => 'ž', + 'Ÿ' => 'Ÿ' + ); + + // Remove metadata tags + $content = preg_replace('/<title>(.+?)<\/title>/','',$content); + $content = preg_replace('/<category>(.+?)<\/category>/','',$content); + + // Converts lone & characters into & (a.k.a. &) + $content = preg_replace('/&([^#])(?![a-z1-4]{1,8};)/i', '&$1', $content); + + // Fix Word pasting + $content = strtr($content, $wp_htmltranswinuni); + + // Just a little XHTML help + $content = str_replace('<br>', '<br />', $content); + $content = str_replace('<hr>', '<hr />', $content); + + return $content; +} + +/** + * Balances tags if forced to, or if the 'use_balanceTags' option is set to true. + * + * @since 0.71 + * + * @param string $text Text to be balanced + * @param bool $force If true, forces balancing, ignoring the value of the option. Default false. + * @return string Balanced text + */ +function balanceTags( $text, $force = false ) { + if ( $force || get_option('use_balanceTags') == 1 ) { + return force_balance_tags( $text ); + } else { + return $text; + } +} + +/** + * Balances tags of string using a modified stack. + * + * @since 2.0.4 + * + * @author Leonard Lin <leonard@acm.org> + * @license GPL + * @copyright November 4, 2001 + * @version 1.1 + * @todo Make better - change loop condition to $text in 1.2 + * @internal Modified by Scott Reilly (coffee2code) 02 Aug 2004 + * 1.1 Fixed handling of append/stack pop order of end text + * Added Cleaning Hooks + * 1.0 First Version + * + * @param string $text Text to be balanced. + * @return string Balanced text. + */ +function force_balance_tags( $text ) { + $tagstack = array(); + $stacksize = 0; + $tagqueue = ''; + $newtext = ''; + // Known single-entity/self-closing tags + $single_tags = array( 'area', 'base', 'basefont', 'br', 'col', 'command', 'embed', 'frame', 'hr', 'img', 'input', 'isindex', 'link', 'meta', 'param', 'source' ); + // Tags that can be immediately nested within themselves + $nestable_tags = array( 'blockquote', 'div', 'object', 'q', 'span' ); + + // WP bug fix for comments - in case you REALLY meant to type '< !--' + $text = str_replace('< !--', '< !--', $text); + // WP bug fix for LOVE <3 (and other situations with '<' before a number) + $text = preg_replace('#<([0-9]{1})#', '<$1', $text); + + while ( preg_match("/<(\/?[\w:]*)\s*([^>]*)>/", $text, $regex) ) { + $newtext .= $tagqueue; + + $i = strpos($text, $regex[0]); + $l = strlen($regex[0]); + + // clear the shifter + $tagqueue = ''; + // Pop or Push + if ( isset($regex[1][0]) && '/' == $regex[1][0] ) { // End Tag + $tag = strtolower(substr($regex[1],1)); + // if too many closing tags + if( $stacksize <= 0 ) { + $tag = ''; + // or close to be safe $tag = '/' . $tag; + } + // if stacktop value = tag close value then pop + else if ( $tagstack[$stacksize - 1] == $tag ) { // found closing tag + $tag = '</' . $tag . '>'; // Close Tag + // Pop + array_pop( $tagstack ); + $stacksize--; + } else { // closing tag not at top, search for it + for ( $j = $stacksize-1; $j >= 0; $j-- ) { + if ( $tagstack[$j] == $tag ) { + // add tag to tagqueue + for ( $k = $stacksize-1; $k >= $j; $k--) { + $tagqueue .= '</' . array_pop( $tagstack ) . '>'; + $stacksize--; + } + break; + } + } + $tag = ''; + } + } else { // Begin Tag + $tag = strtolower($regex[1]); + + // Tag Cleaning + + // If it's an empty tag "< >", do nothing + if ( '' == $tag ) { + // do nothing + } + // ElseIf it presents itself as a self-closing tag... + elseif ( substr( $regex[2], -1 ) == '/' ) { + // ...but it isn't a known single-entity self-closing tag, then don't let it be treated as such and + // immediately close it with a closing tag (the tag will encapsulate no text as a result) + if ( ! in_array( $tag, $single_tags ) ) + $regex[2] = trim( substr( $regex[2], 0, -1 ) ) . "></$tag"; + } + // ElseIf it's a known single-entity tag but it doesn't close itself, do so + elseif ( in_array($tag, $single_tags) ) { + $regex[2] .= '/'; + } + // Else it's not a single-entity tag + else { + // If the top of the stack is the same as the tag we want to push, close previous tag + if ( $stacksize > 0 && !in_array($tag, $nestable_tags) && $tagstack[$stacksize - 1] == $tag ) { + $tagqueue = '</' . array_pop( $tagstack ) . '>'; + $stacksize--; + } + $stacksize = array_push( $tagstack, $tag ); + } + + // Attributes + $attributes = $regex[2]; + if( ! empty( $attributes ) && $attributes[0] != '>' ) + $attributes = ' ' . $attributes; + + $tag = '<' . $tag . $attributes . '>'; + //If already queuing a close tag, then put this tag on, too + if ( !empty($tagqueue) ) { + $tagqueue .= $tag; + $tag = ''; + } + } + $newtext .= substr($text, 0, $i) . $tag; + $text = substr($text, $i + $l); + } + + // Clear Tag Queue + $newtext .= $tagqueue; + + // Add Remaining text + $newtext .= $text; + + // Empty Stack + while( $x = array_pop($tagstack) ) + $newtext .= '</' . $x . '>'; // Add remaining tags to close + + // WP fix for the bug with HTML comments + $newtext = str_replace("< !--","<!--",$newtext); + $newtext = str_replace("< !--","< !--",$newtext); + + return $newtext; +} + +/** + * Acts on text which is about to be edited. + * + * The $content is run through esc_textarea(), which uses htmlspecialchars() + * to convert special characters to HTML entities. If $richedit is set to true, + * it is simply a holder for the 'format_to_edit' filter. + * + * @since 0.71 + * + * @param string $content The text about to be edited. + * @param bool $richedit Whether the $content should not pass through htmlspecialchars(). Default false (meaning it will be passed). + * @return string The text after the filter (and possibly htmlspecialchars()) has been run. + */ +function format_to_edit( $content, $richedit = false ) { + /** + * Filter the text to be formatted for editing. + * + * @since 1.2.0 + * + * @param string $content The text, prior to formatting for editing. + */ + $content = apply_filters( 'format_to_edit', $content ); + if ( ! $richedit ) + $content = esc_textarea( $content ); + return $content; +} + +/** + * Add leading zeros when necessary. + * + * If you set the threshold to '4' and the number is '10', then you will get + * back '0010'. If you set the threshold to '4' and the number is '5000', then you + * will get back '5000'. + * + * Uses sprintf to append the amount of zeros based on the $threshold parameter + * and the size of the number. If the number is large enough, then no zeros will + * be appended. + * + * @since 0.71 + * + * @param mixed $number Number to append zeros to if not greater than threshold. + * @param int $threshold Digit places number needs to be to not have zeros added. + * @return string Adds leading zeros to number if needed. + */ +function zeroise($number, $threshold) { + return sprintf('%0'.$threshold.'s', $number); +} + +/** + * Adds backslashes before letters and before a number at the start of a string. + * + * @since 0.71 + * + * @param string $string Value to which backslashes will be added. + * @return string String with backslashes inserted. + */ +function backslashit($string) { + if ( isset( $string[0] ) && $string[0] >= '0' && $string[0] <= '9' ) + $string = '\\\\' . $string; + return addcslashes( $string, 'A..Za..z' ); +} + +/** + * Appends a trailing slash. + * + * Will remove trailing forward and backslashes if it exists already before adding + * a trailing forward slash. This prevents double slashing a string or path. + * + * The primary use of this is for paths and thus should be used for paths. It is + * not restricted to paths and offers no specific path support. + * + * @since 1.2.0 + * + * @param string $string What to add the trailing slash to. + * @return string String with trailing slash added. + */ +function trailingslashit( $string ) { + return untrailingslashit( $string ) . '/'; +} + +/** + * Removes trailing forward slashes and backslashes if they exist. + * + * The primary use of this is for paths and thus should be used for paths. It is + * not restricted to paths and offers no specific path support. + * + * @since 2.2.0 + * + * @param string $string What to remove the trailing slashes from. + * @return string String without the trailing slashes. + */ +function untrailingslashit( $string ) { + return rtrim( $string, '/\\' ); +} + +/** + * Adds slashes to escape strings. + * + * Slashes will first be removed if magic_quotes_gpc is set, see {@link + * http://www.php.net/magic_quotes} for more details. + * + * @since 0.71 + * + * @param string $gpc The string returned from HTTP request data. + * @return string Returns a string escaped with slashes. + */ +function addslashes_gpc($gpc) { + if ( get_magic_quotes_gpc() ) + $gpc = stripslashes($gpc); + + return wp_slash($gpc); +} + +/** + * Navigates through an array and removes slashes from the values. + * + * If an array is passed, the array_map() function causes a callback to pass the + * value back to the function. The slashes from this value will removed. + * + * @since 2.0.0 + * + * @param mixed $value The value to be stripped. + * @return mixed Stripped value. + */ +function stripslashes_deep($value) { + if ( is_array($value) ) { + $value = array_map('stripslashes_deep', $value); + } elseif ( is_object($value) ) { + $vars = get_object_vars( $value ); + foreach ($vars as $key=>$data) { + $value->{$key} = stripslashes_deep( $data ); + } + } elseif ( is_string( $value ) ) { + $value = stripslashes($value); + } + + return $value; +} + +/** + * Navigates through an array and encodes the values to be used in a URL. + * + * + * @since 2.2.0 + * + * @param array|string $value The array or string to be encoded. + * @return array|string $value The encoded array (or string from the callback). + */ +function urlencode_deep($value) { + $value = is_array($value) ? array_map('urlencode_deep', $value) : urlencode($value); + return $value; +} + +/** + * Navigates through an array and raw encodes the values to be used in a URL. + * + * @since 3.4.0 + * + * @param array|string $value The array or string to be encoded. + * @return array|string $value The encoded array (or string from the callback). + */ +function rawurlencode_deep( $value ) { + return is_array( $value ) ? array_map( 'rawurlencode_deep', $value ) : rawurlencode( $value ); +} + +/** + * Converts email addresses characters to HTML entities to block spam bots. + * + * @since 0.71 + * + * @param string $email_address Email address. + * @param int $hex_encoding Optional. Set to 1 to enable hex encoding. + * @return string Converted email address. + */ +function antispambot( $email_address, $hex_encoding = 0 ) { + $email_no_spam_address = ''; + for ( $i = 0; $i < strlen( $email_address ); $i++ ) { + $j = rand( 0, 1 + $hex_encoding ); + if ( $j == 0 ) { + $email_no_spam_address .= '&#' . ord( $email_address[$i] ) . ';'; + } elseif ( $j == 1 ) { + $email_no_spam_address .= $email_address[$i]; + } elseif ( $j == 2 ) { + $email_no_spam_address .= '%' . zeroise( dechex( ord( $email_address[$i] ) ), 2 ); + } + } + + $email_no_spam_address = str_replace( '@', '@', $email_no_spam_address ); + + return $email_no_spam_address; +} + +/** + * Callback to convert URI match to HTML A element. + * + * This function was backported from 2.5.0 to 2.3.2. Regex callback for {@link + * make_clickable()}. + * + * @since 2.3.2 + * @access private + * + * @param array $matches Single Regex Match. + * @return string HTML A element with URI address. + */ +function _make_url_clickable_cb($matches) { + $url = $matches[2]; + + if ( ')' == $matches[3] && strpos( $url, '(' ) ) { + // If the trailing character is a closing parethesis, and the URL has an opening parenthesis in it, add the closing parenthesis to the URL. + // Then we can let the parenthesis balancer do its thing below. + $url .= $matches[3]; + $suffix = ''; + } else { + $suffix = $matches[3]; + } + + // Include parentheses in the URL only if paired + while ( substr_count( $url, '(' ) < substr_count( $url, ')' ) ) { + $suffix = strrchr( $url, ')' ) . $suffix; + $url = substr( $url, 0, strrpos( $url, ')' ) ); + } + + $url = esc_url($url); + if ( empty($url) ) + return $matches[0]; + + return $matches[1] . "<a href=\"$url\" rel=\"nofollow\">$url</a>" . $suffix; +} + +/** + * Callback to convert URL match to HTML A element. + * + * This function was backported from 2.5.0 to 2.3.2. Regex callback for {@link + * make_clickable()}. + * + * @since 2.3.2 + * @access private + * + * @param array $matches Single Regex Match. + * @return string HTML A element with URL address. + */ +function _make_web_ftp_clickable_cb($matches) { + $ret = ''; + $dest = $matches[2]; + $dest = 'http://' . $dest; + $dest = esc_url($dest); + if ( empty($dest) ) + return $matches[0]; + + // removed trailing [.,;:)] from URL + if ( in_array( substr($dest, -1), array('.', ',', ';', ':', ')') ) === true ) { + $ret = substr($dest, -1); + $dest = substr($dest, 0, strlen($dest)-1); + } + return $matches[1] . "<a href=\"$dest\" rel=\"nofollow\">$dest</a>$ret"; +} + +/** + * Callback to convert email address match to HTML A element. + * + * This function was backported from 2.5.0 to 2.3.2. Regex callback for {@link + * make_clickable()}. + * + * @since 2.3.2 + * @access private + * + * @param array $matches Single Regex Match. + * @return string HTML A element with email address. + */ +function _make_email_clickable_cb($matches) { + $email = $matches[2] . '@' . $matches[3]; + return $matches[1] . "<a href=\"mailto:$email\">$email</a>"; +} + +/** + * Convert plaintext URI to HTML links. + * + * Converts URI, www and ftp, and email addresses. Finishes by fixing links + * within links. + * + * @since 0.71 + * + * @param string $text Content to convert URIs. + * @return string Content with converted URIs. + */ +function make_clickable( $text ) { + $r = ''; + $textarr = preg_split( '/(<[^<>]+>)/', $text, -1, PREG_SPLIT_DELIM_CAPTURE ); // split out HTML tags + $nested_code_pre = 0; // Keep track of how many levels link is nested inside <pre> or <code> + foreach ( $textarr as $piece ) { + + if ( preg_match( '|^<code[\s>]|i', $piece ) || preg_match( '|^<pre[\s>]|i', $piece ) ) + $nested_code_pre++; + elseif ( ( '</code>' === strtolower( $piece ) || '</pre>' === strtolower( $piece ) ) && $nested_code_pre ) + $nested_code_pre--; + + if ( $nested_code_pre || empty( $piece ) || ( $piece[0] === '<' && ! preg_match( '|^<\s*[\w]{1,20}+://|', $piece ) ) ) { + $r .= $piece; + continue; + } + + // Long strings might contain expensive edge cases ... + if ( 10000 < strlen( $piece ) ) { + // ... break it up + foreach ( _split_str_by_whitespace( $piece, 2100 ) as $chunk ) { // 2100: Extra room for scheme and leading and trailing paretheses + if ( 2101 < strlen( $chunk ) ) { + $r .= $chunk; // Too big, no whitespace: bail. + } else { + $r .= make_clickable( $chunk ); + } + } + } else { + $ret = " $piece "; // Pad with whitespace to simplify the regexes + + $url_clickable = '~ + ([\\s(<.,;:!?]) # 1: Leading whitespace, or punctuation + ( # 2: URL + [\\w]{1,20}+:// # Scheme and hier-part prefix + (?=\S{1,2000}\s) # Limit to URLs less than about 2000 characters long + [\\w\\x80-\\xff#%\\~/@\\[\\]*(+=&$-]*+ # Non-punctuation URL character + (?: # Unroll the Loop: Only allow puctuation URL character if followed by a non-punctuation URL character + [\'.,;:!?)] # Punctuation URL character + [\\w\\x80-\\xff#%\\~/@\\[\\]*(+=&$-]++ # Non-punctuation URL character + )* + ) + (\)?) # 3: Trailing closing parenthesis (for parethesis balancing post processing) + ~xS'; // The regex is a non-anchored pattern and does not have a single fixed starting character. + // Tell PCRE to spend more time optimizing since, when used on a page load, it will probably be used several times. + + $ret = preg_replace_callback( $url_clickable, '_make_url_clickable_cb', $ret ); + + $ret = preg_replace_callback( '#([\s>])((www|ftp)\.[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\]+]+)#is', '_make_web_ftp_clickable_cb', $ret ); + $ret = preg_replace_callback( '#([\s>])([.0-9a-z_+-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})#i', '_make_email_clickable_cb', $ret ); + + $ret = substr( $ret, 1, -1 ); // Remove our whitespace padding. + $r .= $ret; + } + } + + // Cleanup of accidental links within links + $r = preg_replace( '#(<a([ \r\n\t]+[^>]+?>|>))<a [^>]+?>([^>]+?)</a></a>#i', "$1$3</a>", $r ); + return $r; +} + +/** + * Breaks a string into chunks by splitting at whitespace characters. + * The length of each returned chunk is as close to the specified length goal as possible, + * with the caveat that each chunk includes its trailing delimiter. + * Chunks longer than the goal are guaranteed to not have any inner whitespace. + * + * Joining the returned chunks with empty delimiters reconstructs the input string losslessly. + * + * Input string must have no null characters (or eventual transformations on output chunks must not care about null characters) + * + * <code> + * _split_str_by_whitespace( "1234 67890 1234 67890a cd 1234 890 123456789 1234567890a 45678 1 3 5 7 90 ", 10 ) == + * array ( + * 0 => '1234 67890 ', // 11 characters: Perfect split + * 1 => '1234 ', // 5 characters: '1234 67890a' was too long + * 2 => '67890a cd ', // 10 characters: '67890a cd 1234' was too long + * 3 => '1234 890 ', // 11 characters: Perfect split + * 4 => '123456789 ', // 10 characters: '123456789 1234567890a' was too long + * 5 => '1234567890a ', // 12 characters: Too long, but no inner whitespace on which to split + * 6 => ' 45678 ', // 11 characters: Perfect split + * 7 => '1 3 5 7 9', // 9 characters: End of $string + * ); + * </code> + * + * @since 3.4.0 + * @access private + * + * @param string $string The string to split. + * @param int $goal The desired chunk length. + * @return array Numeric array of chunks. + */ +function _split_str_by_whitespace( $string, $goal ) { + $chunks = array(); + + $string_nullspace = strtr( $string, "\r\n\t\v\f ", "\000\000\000\000\000\000" ); + + while ( $goal < strlen( $string_nullspace ) ) { + $pos = strrpos( substr( $string_nullspace, 0, $goal + 1 ), "\000" ); + + if ( false === $pos ) { + $pos = strpos( $string_nullspace, "\000", $goal + 1 ); + if ( false === $pos ) { + break; + } + } + + $chunks[] = substr( $string, 0, $pos + 1 ); + $string = substr( $string, $pos + 1 ); + $string_nullspace = substr( $string_nullspace, $pos + 1 ); + } + + if ( $string ) { + $chunks[] = $string; + } + + return $chunks; +} + +/** + * Adds rel nofollow string to all HTML A elements in content. + * + * @since 1.5.0 + * + * @param string $text Content that may contain HTML A elements. + * @return string Converted content. + */ +function wp_rel_nofollow( $text ) { + // This is a pre save filter, so text is already escaped. + $text = stripslashes($text); + $text = preg_replace_callback('|<a (.+?)>|i', 'wp_rel_nofollow_callback', $text); + $text = wp_slash($text); + return $text; +} + +/** + * Callback to add rel=nofollow string to HTML A element. + * + * Will remove already existing rel="nofollow" and rel='nofollow' from the + * string to prevent from invalidating (X)HTML. + * + * @since 2.3.0 + * + * @param array $matches Single Match + * @return string HTML A Element with rel nofollow. + */ +function wp_rel_nofollow_callback( $matches ) { + $text = $matches[1]; + $text = str_replace(array(' rel="nofollow"', " rel='nofollow'"), '', $text); + return "<a $text rel=\"nofollow\">"; +} + +/** + * Convert one smiley code to the icon graphic file equivalent. + * + * Callback handler for {@link convert_smilies()}. + * Looks up one smiley code in the $wpsmiliestrans global array and returns an + * <img> string for that smiley. + * + * @global array $wpsmiliestrans + * @since 2.8.0 + * + * @param array $matches Single match. Smiley code to convert to image. + * @return string Image string for smiley. + */ +function translate_smiley( $matches ) { + global $wpsmiliestrans; + + if ( count( $matches ) == 0 ) + return ''; + + $smiley = trim( reset( $matches ) ); + $img = $wpsmiliestrans[ $smiley ]; + + /** + * Filter the Smiley image URL before it's used in the image element. + * + * @since 2.9.0 + * + * @param string $smiley_url URL for the smiley image. + * @param string $img Filename for the smiley image. + * @param string $site_url Site URL, as returned by site_url(). + */ + $src_url = apply_filters( 'smilies_src', includes_url( "images/smilies/$img" ), $img, site_url() ); + + return sprintf( ' <img src="%s" alt="%s" class="wp-smiley" /> ', esc_url( $src_url ), esc_attr( $smiley ) ); +} + +/** + * Convert text equivalent of smilies to images. + * + * Will only convert smilies if the option 'use_smilies' is true and the global + * used in the function isn't empty. + * + * @since 0.71 + * @uses $wp_smiliessearch + * + * @param string $text Content to convert smilies from text. + * @return string Converted content with text smilies replaced with images. + */ +function convert_smilies( $text ) { + global $wp_smiliessearch; + $output = ''; + if ( get_option( 'use_smilies' ) && ! empty( $wp_smiliessearch ) ) { + // HTML loop taken from texturize function, could possible be consolidated + $textarr = preg_split( '/(<.*>)/U', $text, -1, PREG_SPLIT_DELIM_CAPTURE ); // capture the tags as well as in between + $stop = count( $textarr );// loop stuff + + // Ignore proessing of specific tags + $tags_to_ignore = 'code|pre|style|script|textarea'; + $ignore_block_element = ''; + + for ( $i = 0; $i < $stop; $i++ ) { + $content = $textarr[$i]; + + // If we're in an ignore block, wait until we find its closing tag + if ( '' == $ignore_block_element && preg_match( '/^<(' . $tags_to_ignore . ')>/', $content, $matches ) ) { + $ignore_block_element = $matches[1]; + } + + // If it's not a tag and not in ignore block + if ( '' == $ignore_block_element && strlen( $content ) > 0 && '<' != $content[0] ) { + $content = preg_replace_callback( $wp_smiliessearch, 'translate_smiley', $content ); + } + + // did we exit ignore block + if ( '' != $ignore_block_element && '</' . $ignore_block_element . '>' == $content ) { + $ignore_block_element = ''; + } + + $output .= $content; + } + } else { + // return default text. + $output = $text; + } + return $output; +} + +/** + * Verifies that an email is valid. + * + * Does not grok i18n domains. Not RFC compliant. + * + * @since 0.71 + * + * @param string $email Email address to verify. + * @param boolean $deprecated Deprecated. + * @return string|bool Either false or the valid email address. + */ +function is_email( $email, $deprecated = false ) { + if ( ! empty( $deprecated ) ) + _deprecated_argument( __FUNCTION__, '3.0' ); + + // Test for the minimum length the email can be + if ( strlen( $email ) < 3 ) { + /** + * Filter whether an email address is valid. + * + * This filter is evaluated under several different contexts, such as 'email_too_short', + * 'email_no_at', 'local_invalid_chars', 'domain_period_sequence', 'domain_period_limits', + * 'domain_no_periods', 'sub_hyphen_limits', 'sub_invalid_chars', or no specific context. + * + * @since 2.8.0 + * + * @param bool $is_email Whether the email address has passed the is_email() checks. Default false. + * @param string $email The email address being checked. + * @param string $message An explanatory message to the user. + * @param string $context Context under which the email was tested. + */ + return apply_filters( 'is_email', false, $email, 'email_too_short' ); + } + + // Test for an @ character after the first position + if ( strpos( $email, '@', 1 ) === false ) { + /** This filter is documented in wp-includes/formatting.php */ + return apply_filters( 'is_email', false, $email, 'email_no_at' ); + } + + // Split out the local and domain parts + list( $local, $domain ) = explode( '@', $email, 2 ); + + // LOCAL PART + // Test for invalid characters + if ( !preg_match( '/^[a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]+$/', $local ) ) { + /** This filter is documented in wp-includes/formatting.php */ + return apply_filters( 'is_email', false, $email, 'local_invalid_chars' ); + } + + // DOMAIN PART + // Test for sequences of periods + if ( preg_match( '/\.{2,}/', $domain ) ) { + /** This filter is documented in wp-includes/formatting.php */ + return apply_filters( 'is_email', false, $email, 'domain_period_sequence' ); + } + + // Test for leading and trailing periods and whitespace + if ( trim( $domain, " \t\n\r\0\x0B." ) !== $domain ) { + /** This filter is documented in wp-includes/formatting.php */ + return apply_filters( 'is_email', false, $email, 'domain_period_limits' ); + } + + // Split the domain into subs + $subs = explode( '.', $domain ); + + // Assume the domain will have at least two subs + if ( 2 > count( $subs ) ) { + /** This filter is documented in wp-includes/formatting.php */ + return apply_filters( 'is_email', false, $email, 'domain_no_periods' ); + } + + // Loop through each sub + foreach ( $subs as $sub ) { + // Test for leading and trailing hyphens and whitespace + if ( trim( $sub, " \t\n\r\0\x0B-" ) !== $sub ) { + /** This filter is documented in wp-includes/formatting.php */ + return apply_filters( 'is_email', false, $email, 'sub_hyphen_limits' ); + } + + // Test for invalid characters + if ( !preg_match('/^[a-z0-9-]+$/i', $sub ) ) { + /** This filter is documented in wp-includes/formatting.php */ + return apply_filters( 'is_email', false, $email, 'sub_invalid_chars' ); + } + } + + // Congratulations your email made it! + /** This filter is documented in wp-includes/formatting.php */ + return apply_filters( 'is_email', $email, $email, null ); +} + +/** + * Convert to ASCII from email subjects. + * + * @since 1.2.0 + * + * @param string $string Subject line + * @return string Converted string to ASCII + */ +function wp_iso_descrambler($string) { + /* this may only work with iso-8859-1, I'm afraid */ + if (!preg_match('#\=\?(.+)\?Q\?(.+)\?\=#i', $string, $matches)) { + return $string; + } else { + $subject = str_replace('_', ' ', $matches[2]); + $subject = preg_replace_callback('#\=([0-9a-f]{2})#i', '_wp_iso_convert', $subject); + return $subject; + } +} + +/** + * Helper function to convert hex encoded chars to ASCII + * + * @since 3.1.0 + * @access private + * + * @param array $match The preg_replace_callback matches array + * @return array Converted chars + */ +function _wp_iso_convert( $match ) { + return chr( hexdec( strtolower( $match[1] ) ) ); +} + +/** + * Returns a date in the GMT equivalent. + * + * Requires and returns a date in the Y-m-d H:i:s format. If there is a + * timezone_string available, the date is assumed to be in that timezone, + * otherwise it simply subtracts the value of the 'gmt_offset' option. Return + * format can be overridden using the $format parameter. + * + * @since 1.2.0 + * + * @uses get_option() to retrieve the value of 'gmt_offset'. + * @param string $string The date to be converted. + * @param string $format The format string for the returned date (default is Y-m-d H:i:s) + * @return string GMT version of the date provided. + */ +function get_gmt_from_date( $string, $format = 'Y-m-d H:i:s' ) { + $tz = get_option( 'timezone_string' ); + if ( $tz ) { + $datetime = date_create( $string, new DateTimeZone( $tz ) ); + if ( ! $datetime ) + return gmdate( $format, 0 ); + $datetime->setTimezone( new DateTimeZone( 'UTC' ) ); + $string_gmt = $datetime->format( $format ); + } else { + if ( ! preg_match( '#([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})#', $string, $matches ) ) + return gmdate( $format, 0 ); + $string_time = gmmktime( $matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1] ); + $string_gmt = gmdate( $format, $string_time - get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ); + } + return $string_gmt; +} + +/** + * Converts a GMT date into the correct format for the blog. + * + * Requires and returns a date in the Y-m-d H:i:s format. If there is a + * timezone_string available, the returned date is in that timezone, otherwise + * it simply adds the value of gmt_offset. Return format can be overridden + * using the $format parameter + * + * @since 1.2.0 + * + * @param string $string The date to be converted. + * @param string $format The format string for the returned date (default is Y-m-d H:i:s) + * @return string Formatted date relative to the timezone / GMT offset. + */ +function get_date_from_gmt( $string, $format = 'Y-m-d H:i:s' ) { + $tz = get_option( 'timezone_string' ); + if ( $tz ) { + $datetime = date_create( $string, new DateTimeZone( 'UTC' ) ); + if ( ! $datetime ) + return date( $format, 0 ); + $datetime->setTimezone( new DateTimeZone( $tz ) ); + $string_localtime = $datetime->format( $format ); + } else { + if ( ! preg_match('#([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})#', $string, $matches) ) + return date( $format, 0 ); + $string_time = gmmktime( $matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1] ); + $string_localtime = gmdate( $format, $string_time + get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ); + } + return $string_localtime; +} + +/** + * Computes an offset in seconds from an iso8601 timezone. + * + * @since 1.5.0 + * + * @param string $timezone Either 'Z' for 0 offset or '±hhmm'. + * @return int|float The offset in seconds. + */ +function iso8601_timezone_to_offset($timezone) { + // $timezone is either 'Z' or '[+|-]hhmm' + if ($timezone == 'Z') { + $offset = 0; + } else { + $sign = (substr($timezone, 0, 1) == '+') ? 1 : -1; + $hours = intval(substr($timezone, 1, 2)); + $minutes = intval(substr($timezone, 3, 4)) / 60; + $offset = $sign * HOUR_IN_SECONDS * ($hours + $minutes); + } + return $offset; +} + +/** + * Converts an iso8601 date to MySQL DateTime format used by post_date[_gmt]. + * + * @since 1.5.0 + * + * @param string $date_string Date and time in ISO 8601 format {@link http://en.wikipedia.org/wiki/ISO_8601}. + * @param string $timezone Optional. If set to GMT returns the time minus gmt_offset. Default is 'user'. + * @return string The date and time in MySQL DateTime format - Y-m-d H:i:s. + */ +function iso8601_to_datetime($date_string, $timezone = 'user') { + $timezone = strtolower($timezone); + + if ($timezone == 'gmt') { + + preg_match('#([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(Z|[\+|\-][0-9]{2,4}){0,1}#', $date_string, $date_bits); + + if (!empty($date_bits[7])) { // we have a timezone, so let's compute an offset + $offset = iso8601_timezone_to_offset($date_bits[7]); + } else { // we don't have a timezone, so we assume user local timezone (not server's!) + $offset = HOUR_IN_SECONDS * get_option('gmt_offset'); + } + + $timestamp = gmmktime($date_bits[4], $date_bits[5], $date_bits[6], $date_bits[2], $date_bits[3], $date_bits[1]); + $timestamp -= $offset; + + return gmdate('Y-m-d H:i:s', $timestamp); + + } else if ($timezone == 'user') { + return preg_replace('#([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(Z|[\+|\-][0-9]{2,4}){0,1}#', '$1-$2-$3 $4:$5:$6', $date_string); + } +} + +/** + * Adds a element attributes to open links in new windows. + * + * Comment text in popup windows should be filtered through this. Right now it's + * a moderately dumb function, ideally it would detect whether a target or rel + * attribute was already there and adjust its actions accordingly. + * + * @since 0.71 + * + * @param string $text Content to replace links to open in a new window. + * @return string Content that has filtered links. + */ +function popuplinks($text) { + $text = preg_replace('/<a (.+?)>/i', "<a $1 target='_blank' rel='external'>", $text); + return $text; +} + +/** + * Strips out all characters that are not allowable in an email. + * + * @since 1.5.0 + * + * @param string $email Email address to filter. + * @return string Filtered email address. + */ +function sanitize_email( $email ) { + // Test for the minimum length the email can be + if ( strlen( $email ) < 3 ) { + /** + * Filter a sanitized email address. + * + * This filter is evaluated under several contexts, including 'email_too_short', + * 'email_no_at', 'local_invalid_chars', 'domain_period_sequence', 'domain_period_limits', + * 'domain_no_periods', 'domain_no_valid_subs', or no context. + * + * @since 2.8.0 + * + * @param string $email The sanitized email address. + * @param string $email The email address, as provided to sanitize_email(). + * @param string $message A message to pass to the user. + */ + return apply_filters( 'sanitize_email', '', $email, 'email_too_short' ); + } + + // Test for an @ character after the first position + if ( strpos( $email, '@', 1 ) === false ) { + /** This filter is documented in wp-includes/formatting.php */ + return apply_filters( 'sanitize_email', '', $email, 'email_no_at' ); + } + + // Split out the local and domain parts + list( $local, $domain ) = explode( '@', $email, 2 ); + + // LOCAL PART + // Test for invalid characters + $local = preg_replace( '/[^a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]/', '', $local ); + if ( '' === $local ) { + /** This filter is documented in wp-includes/formatting.php */ + return apply_filters( 'sanitize_email', '', $email, 'local_invalid_chars' ); + } + + // DOMAIN PART + // Test for sequences of periods + $domain = preg_replace( '/\.{2,}/', '', $domain ); + if ( '' === $domain ) { + /** This filter is documented in wp-includes/formatting.php */ + return apply_filters( 'sanitize_email', '', $email, 'domain_period_sequence' ); + } + + // Test for leading and trailing periods and whitespace + $domain = trim( $domain, " \t\n\r\0\x0B." ); + if ( '' === $domain ) { + /** This filter is documented in wp-includes/formatting.php */ + return apply_filters( 'sanitize_email', '', $email, 'domain_period_limits' ); + } + + // Split the domain into subs + $subs = explode( '.', $domain ); + + // Assume the domain will have at least two subs + if ( 2 > count( $subs ) ) { + /** This filter is documented in wp-includes/formatting.php */ + return apply_filters( 'sanitize_email', '', $email, 'domain_no_periods' ); + } + + // Create an array that will contain valid subs + $new_subs = array(); + + // Loop through each sub + foreach ( $subs as $sub ) { + // Test for leading and trailing hyphens + $sub = trim( $sub, " \t\n\r\0\x0B-" ); + + // Test for invalid characters + $sub = preg_replace( '/[^a-z0-9-]+/i', '', $sub ); + + // If there's anything left, add it to the valid subs + if ( '' !== $sub ) { + $new_subs[] = $sub; + } + } + + // If there aren't 2 or more valid subs + if ( 2 > count( $new_subs ) ) { + /** This filter is documented in wp-includes/formatting.php */ + return apply_filters( 'sanitize_email', '', $email, 'domain_no_valid_subs' ); + } + + // Join valid subs into the new domain + $domain = join( '.', $new_subs ); + + // Put the email back together + $email = $local . '@' . $domain; + + // Congratulations your email made it! + /** This filter is documented in wp-includes/formatting.php */ + return apply_filters( 'sanitize_email', $email, $email, null ); +} + +/** + * Determines the difference between two timestamps. + * + * The difference is returned in a human readable format such as "1 hour", + * "5 mins", "2 days". + * + * @since 1.5.0 + * + * @param int $from Unix timestamp from which the difference begins. + * @param int $to Optional. Unix timestamp to end the time difference. Default becomes time() if not set. + * @return string Human readable time difference. + */ +function human_time_diff( $from, $to = '' ) { + if ( empty( $to ) ) + $to = time(); + + $diff = (int) abs( $to - $from ); + + if ( $diff < HOUR_IN_SECONDS ) { + $mins = round( $diff / MINUTE_IN_SECONDS ); + if ( $mins <= 1 ) + $mins = 1; + /* translators: min=minute */ + $since = sprintf( _n( '%s min', '%s mins', $mins ), $mins ); + } elseif ( $diff < DAY_IN_SECONDS && $diff >= HOUR_IN_SECONDS ) { + $hours = round( $diff / HOUR_IN_SECONDS ); + if ( $hours <= 1 ) + $hours = 1; + $since = sprintf( _n( '%s hour', '%s hours', $hours ), $hours ); + } elseif ( $diff < WEEK_IN_SECONDS && $diff >= DAY_IN_SECONDS ) { + $days = round( $diff / DAY_IN_SECONDS ); + if ( $days <= 1 ) + $days = 1; + $since = sprintf( _n( '%s day', '%s days', $days ), $days ); + } elseif ( $diff < 30 * DAY_IN_SECONDS && $diff >= WEEK_IN_SECONDS ) { + $weeks = round( $diff / WEEK_IN_SECONDS ); + if ( $weeks <= 1 ) + $weeks = 1; + $since = sprintf( _n( '%s week', '%s weeks', $weeks ), $weeks ); + } elseif ( $diff < YEAR_IN_SECONDS && $diff >= 30 * DAY_IN_SECONDS ) { + $months = round( $diff / ( 30 * DAY_IN_SECONDS ) ); + if ( $months <= 1 ) + $months = 1; + $since = sprintf( _n( '%s month', '%s months', $months ), $months ); + } elseif ( $diff >= YEAR_IN_SECONDS ) { + $years = round( $diff / YEAR_IN_SECONDS ); + if ( $years <= 1 ) + $years = 1; + $since = sprintf( _n( '%s year', '%s years', $years ), $years ); + } + + return $since; +} + +/** + * Generates an excerpt from the content, if needed. + * + * The excerpt word amount will be 55 words and if the amount is greater than + * that, then the string ' […]' will be appended to the excerpt. If the string + * is less than 55 words, then the content will be returned as is. + * + * The 55 word limit can be modified by plugins/themes using the excerpt_length filter + * The ' […]' string can be modified by plugins/themes using the excerpt_more filter + * + * @since 1.5.0 + * + * @param string $text Optional. The excerpt. If set to empty, an excerpt is generated. + * @return string The excerpt. + */ +function wp_trim_excerpt($text = '') { + $raw_excerpt = $text; + if ( '' == $text ) { + $text = get_the_content(''); + + $text = strip_shortcodes( $text ); + + /** This filter is documented in wp-includes/post-template.php */ + $text = apply_filters( 'the_content', $text ); + $text = str_replace(']]>', ']]>', $text); + + /** + * Filter the number of words in an excerpt. + * + * @since 2.7.0 + * + * @param int $number The number of words. Default 55. + */ + $excerpt_length = apply_filters( 'excerpt_length', 55 ); + /** + * Filter the string in the "more" link displayed after a trimmed excerpt. + * + * @since 2.9.0 + * + * @param string $more_string The string shown within the more link. + */ + $excerpt_more = apply_filters( 'excerpt_more', ' ' . '[…]' ); + $text = wp_trim_words( $text, $excerpt_length, $excerpt_more ); + } + /** + * Filter the trimmed excerpt string. + * + * @since 2.8.0 + * + * @param string $text The trimmed text. + * @param string $raw_excerpt The text prior to trimming. + */ + return apply_filters( 'wp_trim_excerpt', $text, $raw_excerpt ); +} + +/** + * Trims text to a certain number of words. + * + * This function is localized. For languages that count 'words' by the individual + * character (such as East Asian languages), the $num_words argument will apply + * to the number of individual characters. + * + * @since 3.3.0 + * + * @param string $text Text to trim. + * @param int $num_words Number of words. Default 55. + * @param string $more Optional. What to append if $text needs to be trimmed. Default '…'. + * @return string Trimmed text. + */ +function wp_trim_words( $text, $num_words = 55, $more = null ) { + if ( null === $more ) + $more = __( '…' ); + $original_text = $text; + $text = wp_strip_all_tags( $text ); + /* translators: If your word count is based on single characters (East Asian characters), + enter 'characters'. Otherwise, enter 'words'. Do not translate into your own language. */ + if ( 'characters' == _x( 'words', 'word count: words or characters?' ) && preg_match( '/^utf\-?8$/i', get_option( 'blog_charset' ) ) ) { + $text = trim( preg_replace( "/[\n\r\t ]+/", ' ', $text ), ' ' ); + preg_match_all( '/./u', $text, $words_array ); + $words_array = array_slice( $words_array[0], 0, $num_words + 1 ); + $sep = ''; + } else { + $words_array = preg_split( "/[\n\r\t ]+/", $text, $num_words + 1, PREG_SPLIT_NO_EMPTY ); + $sep = ' '; + } + if ( count( $words_array ) > $num_words ) { + array_pop( $words_array ); + $text = implode( $sep, $words_array ); + $text = $text . $more; + } else { + $text = implode( $sep, $words_array ); + } + /** + * Filter the text content after words have been trimmed. + * + * @since 3.3.0 + * + * @param string $text The trimmed text. + * @param int $num_words The number of words to trim the text to. Default 5. + * @param string $more An optional string to append to the end of the trimmed text, e.g. …. + * @param string $original_text The text before it was trimmed. + */ + return apply_filters( 'wp_trim_words', $text, $num_words, $more, $original_text ); +} + +/** + * Converts named entities into numbered entities. + * + * @since 1.5.1 + * + * @param string $text The text within which entities will be converted. + * @return string Text with converted entities. + */ +function ent2ncr($text) { + + /** + * Filter text before named entities are converted into numbered entities. + * + * A non-null string must be returned for the filter to be evaluated. + * + * @since 3.3.0 + * + * @param null $converted_text The text to be converted. Default null. + * @param string $text The text prior to entity conversion. + */ + $filtered = apply_filters( 'pre_ent2ncr', null, $text ); + if( null !== $filtered ) + return $filtered; + + $to_ncr = array( + '"' => '"', + '&' => '&', + '<' => '<', + '>' => '>', + '|' => '|', + ' ' => ' ', + '¡' => '¡', + '¢' => '¢', + '£' => '£', + '¤' => '¤', + '¥' => '¥', + '¦' => '¦', + '&brkbar;' => '¦', + '§' => '§', + '¨' => '¨', + '¨' => '¨', + '©' => '©', + 'ª' => 'ª', + '«' => '«', + '¬' => '¬', + '­' => '­', + '®' => '®', + '¯' => '¯', + '&hibar;' => '¯', + '°' => '°', + '±' => '±', + '²' => '²', + '³' => '³', + '´' => '´', + 'µ' => 'µ', + '¶' => '¶', + '·' => '·', + '¸' => '¸', + '¹' => '¹', + 'º' => 'º', + '»' => '»', + '¼' => '¼', + '½' => '½', + '¾' => '¾', + '¿' => '¿', + 'À' => 'À', + 'Á' => 'Á', + 'Â' => 'Â', + 'Ã' => 'Ã', + 'Ä' => 'Ä', + 'Å' => 'Å', + 'Æ' => 'Æ', + 'Ç' => 'Ç', + 'È' => 'È', + 'É' => 'É', + 'Ê' => 'Ê', + 'Ë' => 'Ë', + 'Ì' => 'Ì', + 'Í' => 'Í', + 'Î' => 'Î', + 'Ï' => 'Ï', + 'Ð' => 'Ð', + 'Ñ' => 'Ñ', + 'Ò' => 'Ò', + 'Ó' => 'Ó', + 'Ô' => 'Ô', + 'Õ' => 'Õ', + 'Ö' => 'Ö', + '×' => '×', + 'Ø' => 'Ø', + 'Ù' => 'Ù', + 'Ú' => 'Ú', + 'Û' => 'Û', + 'Ü' => 'Ü', + 'Ý' => 'Ý', + 'Þ' => 'Þ', + 'ß' => 'ß', + 'à' => 'à', + 'á' => 'á', + 'â' => 'â', + 'ã' => 'ã', + 'ä' => 'ä', + 'å' => 'å', + 'æ' => 'æ', + 'ç' => 'ç', + 'è' => 'è', + 'é' => 'é', + 'ê' => 'ê', + 'ë' => 'ë', + 'ì' => 'ì', + 'í' => 'í', + 'î' => 'î', + 'ï' => 'ï', + 'ð' => 'ð', + 'ñ' => 'ñ', + 'ò' => 'ò', + 'ó' => 'ó', + 'ô' => 'ô', + 'õ' => 'õ', + 'ö' => 'ö', + '÷' => '÷', + 'ø' => 'ø', + 'ù' => 'ù', + 'ú' => 'ú', + 'û' => 'û', + 'ü' => 'ü', + 'ý' => 'ý', + 'þ' => 'þ', + 'ÿ' => 'ÿ', + 'Œ' => 'Œ', + 'œ' => 'œ', + 'Š' => 'Š', + 'š' => 'š', + 'Ÿ' => 'Ÿ', + 'ƒ' => 'ƒ', + 'ˆ' => 'ˆ', + '˜' => '˜', + 'Α' => 'Α', + 'Β' => 'Β', + 'Γ' => 'Γ', + 'Δ' => 'Δ', + 'Ε' => 'Ε', + 'Ζ' => 'Ζ', + 'Η' => 'Η', + 'Θ' => 'Θ', + 'Ι' => 'Ι', + 'Κ' => 'Κ', + 'Λ' => 'Λ', + 'Μ' => 'Μ', + 'Ν' => 'Ν', + 'Ξ' => 'Ξ', + 'Ο' => 'Ο', + 'Π' => 'Π', + 'Ρ' => 'Ρ', + 'Σ' => 'Σ', + 'Τ' => 'Τ', + 'Υ' => 'Υ', + 'Φ' => 'Φ', + 'Χ' => 'Χ', + 'Ψ' => 'Ψ', + 'Ω' => 'Ω', + 'α' => 'α', + 'β' => 'β', + 'γ' => 'γ', + 'δ' => 'δ', + 'ε' => 'ε', + 'ζ' => 'ζ', + 'η' => 'η', + 'θ' => 'θ', + 'ι' => 'ι', + 'κ' => 'κ', + 'λ' => 'λ', + 'μ' => 'μ', + 'ν' => 'ν', + 'ξ' => 'ξ', + 'ο' => 'ο', + 'π' => 'π', + 'ρ' => 'ρ', + 'ς' => 'ς', + 'σ' => 'σ', + 'τ' => 'τ', + 'υ' => 'υ', + 'φ' => 'φ', + 'χ' => 'χ', + 'ψ' => 'ψ', + 'ω' => 'ω', + 'ϑ' => 'ϑ', + 'ϒ' => 'ϒ', + 'ϖ' => 'ϖ', + ' ' => ' ', + ' ' => ' ', + ' ' => ' ', + '‌' => '‌', + '‍' => '‍', + '‎' => '‎', + '‏' => '‏', + '–' => '–', + '—' => '—', + '‘' => '‘', + '’' => '’', + '‚' => '‚', + '“' => '“', + '”' => '”', + '„' => '„', + '†' => '†', + '‡' => '‡', + '•' => '•', + '…' => '…', + '‰' => '‰', + '′' => '′', + '″' => '″', + '‹' => '‹', + '›' => '›', + '‾' => '‾', + '⁄' => '⁄', + '€' => '€', + 'ℑ' => 'ℑ', + '℘' => '℘', + 'ℜ' => 'ℜ', + '™' => '™', + 'ℵ' => 'ℵ', + '↵' => '↵', + '⇐' => '⇐', + '⇑' => '⇑', + '⇒' => '⇒', + '⇓' => '⇓', + '⇔' => '⇔', + '∀' => '∀', + '∂' => '∂', + '∃' => '∃', + '∅' => '∅', + '∇' => '∇', + '∈' => '∈', + '∉' => '∉', + '∋' => '∋', + '∏' => '∏', + '∑' => '∑', + '−' => '−', + '∗' => '∗', + '√' => '√', + '∝' => '∝', + '∞' => '∞', + '∠' => '∠', + '∧' => '∧', + '∨' => '∨', + '∩' => '∩', + '∪' => '∪', + '∫' => '∫', + '∴' => '∴', + '∼' => '∼', + '≅' => '≅', + '≈' => '≈', + '≠' => '≠', + '≡' => '≡', + '≤' => '≤', + '≥' => '≥', + '⊂' => '⊂', + '⊃' => '⊃', + '⊄' => '⊄', + '⊆' => '⊆', + '⊇' => '⊇', + '⊕' => '⊕', + '⊗' => '⊗', + '⊥' => '⊥', + '⋅' => '⋅', + '⌈' => '⌈', + '⌉' => '⌉', + '⌊' => '⌊', + '⌋' => '⌋', + '⟨' => '〈', + '⟩' => '〉', + '←' => '←', + '↑' => '↑', + '→' => '→', + '↓' => '↓', + '↔' => '↔', + '◊' => '◊', + '♠' => '♠', + '♣' => '♣', + '♥' => '♥', + '♦' => '♦' + ); + + return str_replace( array_keys($to_ncr), array_values($to_ncr), $text ); +} + +/** + * Formats text for the rich text editor. + * + * The filter 'richedit_pre' is applied here. If $text is empty the filter will + * be applied to an empty string. + * + * @since 2.0.0 + * + * @param string $text The text to be formatted. + * @return string The formatted text after filter is applied. + */ +function wp_richedit_pre($text) { + if ( empty( $text ) ) { + /** + * Filter text returned for the rich text editor. + * + * This filter is first evaluated, and the value returned, if an empty string + * is passed to wp_richedit_pre(). If an empty string is passed, it results + * in a break tag and line feed. + * + * If a non-empty string is passed, the filter is evaluated on the wp_richedit_pre() + * return after being formatted. + * + * @since 2.0.0 + * + * @param string $output Text for the rich text editor. + */ + return apply_filters( 'richedit_pre', '' ); + } + + $output = convert_chars($text); + $output = wpautop($output); + $output = htmlspecialchars($output, ENT_NOQUOTES, get_option( 'blog_charset' ) ); + + /** This filter is documented in wp-includes/formatting.php */ + return apply_filters( 'richedit_pre', $output ); +} + +/** + * Formats text for the HTML editor. + * + * Unless $output is empty it will pass through htmlspecialchars before the + * 'htmledit_pre' filter is applied. + * + * @since 2.5.0 + * + * @param string $output The text to be formatted. + * @return string Formatted text after filter applied. + */ +function wp_htmledit_pre($output) { + if ( !empty($output) ) + $output = htmlspecialchars($output, ENT_NOQUOTES, get_option( 'blog_charset' ) ); // convert only < > & + + /** + * Filter the text before it is formatted for the HTML editor. + * + * @since 2.5.0 + * + * @param string $output The HTML-formatted text. + */ + return apply_filters( 'htmledit_pre', $output ); +} + +/** + * Perform a deep string replace operation to ensure the values in $search are no longer present + * + * Repeats the replacement operation until it no longer replaces anything so as to remove "nested" values + * e.g. $subject = '%0%0%0DDD', $search ='%0D', $result ='' rather than the '%0%0DD' that + * str_replace would return + * + * @since 2.8.1 + * @access private + * + * @param string|array $search The value being searched for, otherwise known as the needle. An array may be used to designate multiple needles. + * @param string $subject The string being searched and replaced on, otherwise known as the haystack. + * @return string The string with the replaced svalues. + */ +function _deep_replace( $search, $subject ) { + $subject = (string) $subject; + + $count = 1; + while ( $count ) { + $subject = str_replace( $search, '', $subject, $count ); + } + + return $subject; +} + +/** + * Escapes data for use in a MySQL query. + * + * Usually you should prepare queries using wpdb::prepare(). + * Sometimes, spot-escaping is required or useful. One example + * is preparing an array for use in an IN clause. + * + * @since 2.8.0 + * @param string|array $data Unescaped data + * @return string|array Escaped data + */ +function esc_sql( $data ) { + global $wpdb; + return $wpdb->_escape( $data ); +} + +/** + * Checks and cleans a URL. + * + * A number of characters are removed from the URL. If the URL is for displaying + * (the default behaviour) ampersands are also replaced. The 'clean_url' filter + * is applied to the returned cleaned URL. + * + * @since 2.8.0 + * @uses wp_kses_bad_protocol() To only permit protocols in the URL set + * via $protocols or the common ones set in the function. + * + * @param string $url The URL to be cleaned. + * @param array $protocols Optional. An array of acceptable protocols. + * Defaults to 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn' if not set. + * @param string $_context Private. Use esc_url_raw() for database usage. + * @return string The cleaned $url after the 'clean_url' filter is applied. + */ +function esc_url( $url, $protocols = null, $_context = 'display' ) { + $original_url = $url; + + if ( '' == $url ) + return $url; + $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\|*\'()\\x80-\\xff]|i', '', $url); + $strip = array('%0d', '%0a', '%0D', '%0A'); + $url = _deep_replace($strip, $url); + $url = str_replace(';//', '://', $url); + /* If the URL doesn't appear to contain a scheme, we + * presume it needs http:// appended (unless a relative + * link starting with /, # or ? or a php file). + */ + if ( strpos($url, ':') === false && ! in_array( $url[0], array( '/', '#', '?' ) ) && + ! preg_match('/^[a-z0-9-]+?\.php/i', $url) ) + $url = 'http://' . $url; + + // Replace ampersands and single quotes only when displaying. + if ( 'display' == $_context ) { + $url = wp_kses_normalize_entities( $url ); + $url = str_replace( '&', '&', $url ); + $url = str_replace( "'", ''', $url ); + } + + if ( '/' === $url[0] ) { + $good_protocol_url = $url; + } else { + if ( ! is_array( $protocols ) ) + $protocols = wp_allowed_protocols(); + $good_protocol_url = wp_kses_bad_protocol( $url, $protocols ); + if ( strtolower( $good_protocol_url ) != strtolower( $url ) ) + return ''; + } + + /** + * Filter a string cleaned and escaped for output as a URL. + * + * @since 2.3.0 + * + * @param string $good_protocol_url The cleaned URL to be returned. + * @param string $original_url The URL prior to cleaning. + * @param string $_context If 'display', replace ampersands and single quotes only. + */ + return apply_filters( 'clean_url', $good_protocol_url, $original_url, $_context ); +} + +/** + * Performs esc_url() for database usage. + * + * @since 2.8.0 + * @uses esc_url() + * + * @param string $url The URL to be cleaned. + * @param array $protocols An array of acceptable protocols. + * @return string The cleaned URL. + */ +function esc_url_raw( $url, $protocols = null ) { + return esc_url( $url, $protocols, 'db' ); +} + +/** + * Convert entities, while preserving already-encoded entities. + * + * @link http://www.php.net/htmlentities Borrowed from the PHP Manual user notes. + * + * @since 1.2.2 + * + * @param string $myHTML The text to be converted. + * @return string Converted text. + */ +function htmlentities2($myHTML) { + $translation_table = get_html_translation_table( HTML_ENTITIES, ENT_QUOTES ); + $translation_table[chr(38)] = '&'; + return preg_replace( "/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/", "&", strtr($myHTML, $translation_table) ); +} + +/** + * Escape single quotes, htmlspecialchar " < > &, and fix line endings. + * + * Escapes text strings for echoing in JS. It is intended to be used for inline JS + * (in a tag attribute, for example onclick="..."). Note that the strings have to + * be in single quotes. The filter 'js_escape' is also applied here. + * + * @since 2.8.0 + * + * @param string $text The text to be escaped. + * @return string Escaped text. + */ +function esc_js( $text ) { + $safe_text = wp_check_invalid_utf8( $text ); + $safe_text = _wp_specialchars( $safe_text, ENT_COMPAT ); + $safe_text = preg_replace( '/&#(x)?0*(?(1)27|39);?/i', "'", stripslashes( $safe_text ) ); + $safe_text = str_replace( "\r", '', $safe_text ); + $safe_text = str_replace( "\n", '\\n', addslashes( $safe_text ) ); + /** + * Filter a string cleaned and escaped for output in JavaScript. + * + * Text passed to esc_js() is stripped of invalid or special characters, + * and properly slashed for output. + * + * @since 2.0.6 + * + * @param string $safe_text The text after it has been escaped. + * @param string $text The text prior to being escaped. + */ + return apply_filters( 'js_escape', $safe_text, $text ); +} + +/** + * Escaping for HTML blocks. + * + * @since 2.8.0 + * + * @param string $text + * @return string + */ +function esc_html( $text ) { + $safe_text = wp_check_invalid_utf8( $text ); + $safe_text = _wp_specialchars( $safe_text, ENT_QUOTES ); + /** + * Filter a string cleaned and escaped for output in HTML. + * + * Text passed to esc_html() is stripped of invalid or special characters + * before output. + * + * @since 2.8.0 + * + * @param string $safe_text The text after it has been escaped. + * @param string $text The text prior to being escaped. + */ + return apply_filters( 'esc_html', $safe_text, $text ); +} + +/** + * Escaping for HTML attributes. + * + * @since 2.8.0 + * + * @param string $text + * @return string + */ +function esc_attr( $text ) { + $safe_text = wp_check_invalid_utf8( $text ); + $safe_text = _wp_specialchars( $safe_text, ENT_QUOTES ); + /** + * Filter a string cleaned and escaped for output in an HTML attribute. + * + * Text passed to esc_attr() is stripped of invalid or special characters + * before output. + * + * @since 2.0.6 + * + * @param string $safe_text The text after it has been escaped. + * @param string $text The text prior to being escaped. + */ + return apply_filters( 'attribute_escape', $safe_text, $text ); +} + +/** + * Escaping for textarea values. + * + * @since 3.1.0 + * + * @param string $text + * @return string + */ +function esc_textarea( $text ) { + $safe_text = htmlspecialchars( $text, ENT_QUOTES, get_option( 'blog_charset' ) ); + /** + * Filter a string cleaned and escaped for output in a textarea element. + * + * @since 3.1.0 + * + * @param string $safe_text The text after it has been escaped. + * @param string $text The text prior to being escaped. + */ + return apply_filters( 'esc_textarea', $safe_text, $text ); +} + +/** + * Escape an HTML tag name. + * + * @since 2.5.0 + * + * @param string $tag_name + * @return string + */ +function tag_escape($tag_name) { + $safe_tag = strtolower( preg_replace('/[^a-zA-Z0-9_:]/', '', $tag_name) ); + /** + * Filter a string cleaned and escaped for output as an HTML tag. + * + * @since 2.8.0 + * + * @param string $safe_tag The tag name after it has been escaped. + * @param string $tag_name The text before it was escaped. + */ + return apply_filters( 'tag_escape', $safe_tag, $tag_name ); +} + +/** + * Escapes text for SQL LIKE special characters % and _. + * + * @since 2.5.0 + * + * @param string $text The text to be escaped. + * @return string text, safe for inclusion in LIKE query. + */ +function like_escape($text) { + return str_replace(array("%", "_"), array("\\%", "\\_"), $text); +} + +/** + * Convert full URL paths to absolute paths. + * + * Removes the http or https protocols and the domain. Keeps the path '/' at the + * beginning, so it isn't a true relative link, but from the web root base. + * + * @since 2.1.0 + * + * @param string $link Full URL path. + * @return string Absolute path. + */ +function wp_make_link_relative( $link ) { + return preg_replace( '|https?://[^/]+(/.*)|i', '$1', $link ); +} + +/** + * Sanitises various option values based on the nature of the option. + * + * This is basically a switch statement which will pass $value through a number + * of functions depending on the $option. + * + * @since 2.0.5 + * + * @param string $option The name of the option. + * @param string $value The unsanitised value. + * @return string Sanitized value. + */ +function sanitize_option($option, $value) { + + switch ( $option ) { + case 'admin_email' : + case 'new_admin_email' : + $value = sanitize_email( $value ); + if ( ! is_email( $value ) ) { + $value = get_option( $option ); // Resets option to stored value in the case of failed sanitization + if ( function_exists( 'add_settings_error' ) ) + add_settings_error( $option, 'invalid_admin_email', __( 'The email address entered did not appear to be a valid email address. Please enter a valid email address.' ) ); + } + break; + + case 'thumbnail_size_w': + case 'thumbnail_size_h': + case 'medium_size_w': + case 'medium_size_h': + case 'large_size_w': + case 'large_size_h': + case 'mailserver_port': + case 'comment_max_links': + case 'page_on_front': + case 'page_for_posts': + case 'rss_excerpt_length': + case 'default_category': + case 'default_email_category': + case 'default_link_category': + case 'close_comments_days_old': + case 'comments_per_page': + case 'thread_comments_depth': + case 'users_can_register': + case 'start_of_week': + $value = absint( $value ); + break; + + case 'posts_per_page': + case 'posts_per_rss': + $value = (int) $value; + if ( empty($value) ) + $value = 1; + if ( $value < -1 ) + $value = abs($value); + break; + + case 'default_ping_status': + case 'default_comment_status': + // Options that if not there have 0 value but need to be something like "closed" + if ( $value == '0' || $value == '') + $value = 'closed'; + break; + + case 'blogdescription': + case 'blogname': + $value = wp_kses_post( $value ); + $value = esc_html( $value ); + break; + + case 'blog_charset': + $value = preg_replace('/[^a-zA-Z0-9_-]/', '', $value); // strips slashes + break; + + case 'blog_public': + // This is the value if the settings checkbox is not checked on POST. Don't rely on this. + if ( null === $value ) + $value = 1; + else + $value = intval( $value ); + break; + + case 'date_format': + case 'time_format': + case 'mailserver_url': + case 'mailserver_login': + case 'mailserver_pass': + case 'upload_path': + $value = strip_tags( $value ); + $value = wp_kses_data( $value ); + break; + + case 'ping_sites': + $value = explode( "\n", $value ); + $value = array_filter( array_map( 'trim', $value ) ); + $value = array_filter( array_map( 'esc_url_raw', $value ) ); + $value = implode( "\n", $value ); + break; + + case 'gmt_offset': + $value = preg_replace('/[^0-9:.-]/', '', $value); // strips slashes + break; + + case 'siteurl': + if ( (bool)preg_match( '#http(s?)://(.+)#i', $value) ) { + $value = esc_url_raw($value); + } else { + $value = get_option( $option ); // Resets option to stored value in the case of failed sanitization + if ( function_exists('add_settings_error') ) + add_settings_error('siteurl', 'invalid_siteurl', __('The WordPress address you entered did not appear to be a valid URL. Please enter a valid URL.')); + } + break; + + case 'home': + if ( (bool)preg_match( '#http(s?)://(.+)#i', $value) ) { + $value = esc_url_raw($value); + } else { + $value = get_option( $option ); // Resets option to stored value in the case of failed sanitization + if ( function_exists('add_settings_error') ) + add_settings_error('home', 'invalid_home', __('The Site address you entered did not appear to be a valid URL. Please enter a valid URL.')); + } + break; + + case 'WPLANG': + $allowed = get_available_languages(); + if ( ! in_array( $value, $allowed ) && ! empty( $value ) ) + $value = get_option( $option ); + break; + + case 'illegal_names': + if ( ! is_array( $value ) ) + $value = explode( ' ', $value ); + + $value = array_values( array_filter( array_map( 'trim', $value ) ) ); + + if ( ! $value ) + $value = ''; + break; + + case 'limited_email_domains': + case 'banned_email_domains': + if ( ! is_array( $value ) ) + $value = explode( "\n", $value ); + + $domains = array_values( array_filter( array_map( 'trim', $value ) ) ); + $value = array(); + + foreach ( $domains as $domain ) { + if ( ! preg_match( '/(--|\.\.)/', $domain ) && preg_match( '|^([a-zA-Z0-9-\.])+$|', $domain ) ) + $value[] = $domain; + } + if ( ! $value ) + $value = ''; + break; + + case 'timezone_string': + $allowed_zones = timezone_identifiers_list(); + if ( ! in_array( $value, $allowed_zones ) && ! empty( $value ) ) { + $value = get_option( $option ); // Resets option to stored value in the case of failed sanitization + if ( function_exists('add_settings_error') ) + add_settings_error('timezone_string', 'invalid_timezone_string', __('The timezone you have entered is not valid. Please select a valid timezone.') ); + } + break; + + case 'permalink_structure': + case 'category_base': + case 'tag_base': + $value = esc_url_raw( $value ); + $value = str_replace( 'http://', '', $value ); + break; + + case 'default_role' : + if ( ! get_role( $value ) && get_role( 'subscriber' ) ) + $value = 'subscriber'; + break; + } + + /** + * Filter an option value following sanitization. + * + * @since 2.3.0 + * + * @param string $value The sanitized option value. + * @param string $option The option name. + */ + $value = apply_filters( "sanitize_option_{$option}", $value, $option ); + + return $value; +} + +/** + * Parses a string into variables to be stored in an array. + * + * Uses {@link http://www.php.net/parse_str parse_str()} and stripslashes if + * {@link http://www.php.net/magic_quotes magic_quotes_gpc} is on. + * + * @since 2.2.1 + * + * @param string $string The string to be parsed. + * @param array $array Variables will be stored in this array. + */ +function wp_parse_str( $string, &$array ) { + parse_str( $string, $array ); + if ( get_magic_quotes_gpc() ) + $array = stripslashes_deep( $array ); + /** + * Filter the array of variables derived from a parsed string. + * + * @since 2.3.0 + * + * @param array $array The array populated with variables. + */ + $array = apply_filters( 'wp_parse_str', $array ); +} + +/** + * Convert lone less than signs. + * + * KSES already converts lone greater than signs. + * + * @uses wp_pre_kses_less_than_callback in the callback function. + * @since 2.3.0 + * + * @param string $text Text to be converted. + * @return string Converted text. + */ +function wp_pre_kses_less_than( $text ) { + return preg_replace_callback('%<[^>]*?((?=<)|>|$)%', 'wp_pre_kses_less_than_callback', $text); +} + +/** + * Callback function used by preg_replace. + * + * @uses esc_html to format the $matches text. + * @since 2.3.0 + * + * @param array $matches Populated by matches to preg_replace. + * @return string The text returned after esc_html if needed. + */ +function wp_pre_kses_less_than_callback( $matches ) { + if ( false === strpos($matches[0], '>') ) + return esc_html($matches[0]); + return $matches[0]; +} + +/** + * WordPress implementation of PHP sprintf() with filters. + * + * @since 2.5.0 + * @link http://www.php.net/sprintf + * + * @param string $pattern The string which formatted args are inserted. + * @param mixed $args,... Arguments to be formatted into the $pattern string. + * @return string The formatted string. + */ +function wp_sprintf( $pattern ) { + $args = func_get_args(); + $len = strlen($pattern); + $start = 0; + $result = ''; + $arg_index = 0; + while ( $len > $start ) { + // Last character: append and break + if ( strlen($pattern) - 1 == $start ) { + $result .= substr($pattern, -1); + break; + } + + // Literal %: append and continue + if ( substr($pattern, $start, 2) == '%%' ) { + $start += 2; + $result .= '%'; + continue; + } + + // Get fragment before next % + $end = strpos($pattern, '%', $start + 1); + if ( false === $end ) + $end = $len; + $fragment = substr($pattern, $start, $end - $start); + + // Fragment has a specifier + if ( $pattern[$start] == '%' ) { + // Find numbered arguments or take the next one in order + if ( preg_match('/^%(\d+)\$/', $fragment, $matches) ) { + $arg = isset($args[$matches[1]]) ? $args[$matches[1]] : ''; + $fragment = str_replace("%{$matches[1]}$", '%', $fragment); + } else { + ++$arg_index; + $arg = isset($args[$arg_index]) ? $args[$arg_index] : ''; + } + + /** + * Filter a fragment from the pattern passed to wp_sprintf(). + * + * If the fragment is unchanged, then sprintf() will be run on the fragment. + * + * @since 2.5.0 + * + * @param string $fragment A fragment from the pattern. + * @param string $arg The argument. + */ + $_fragment = apply_filters( 'wp_sprintf', $fragment, $arg ); + if ( $_fragment != $fragment ) + $fragment = $_fragment; + else + $fragment = sprintf($fragment, strval($arg) ); + } + + // Append to result and move to next fragment + $result .= $fragment; + $start = $end; + } + return $result; +} + +/** + * Localize list items before the rest of the content. + * + * The '%l' must be at the first characters can then contain the rest of the + * content. The list items will have ', ', ', and', and ' and ' added depending + * on the amount of list items in the $args parameter. + * + * @since 2.5.0 + * + * @param string $pattern Content containing '%l' at the beginning. + * @param array $args List items to prepend to the content and replace '%l'. + * @return string Localized list items and rest of the content. + */ +function wp_sprintf_l($pattern, $args) { + // Not a match + if ( substr($pattern, 0, 2) != '%l' ) + return $pattern; + + // Nothing to work with + if ( empty($args) ) + return ''; + + /** + * Filter the translated delimiters used by wp_sprintf_l(). + * Placeholders (%s) are included to assist translators and then + * removed before the array of strings reaches the filter. + * + * Please note: Ampersands and entities should be avoided here. + * + * @since 2.5.0 + * + * @param array $delimiters An array of translated delimiters. + */ + $l = apply_filters( 'wp_sprintf_l', array( + /* translators: used to join items in a list with more than 2 items */ + 'between' => sprintf( __('%s, %s'), '', '' ), + /* translators: used to join last two items in a list with more than 2 times */ + 'between_last_two' => sprintf( __('%s, and %s'), '', '' ), + /* translators: used to join items in a list with only 2 items */ + 'between_only_two' => sprintf( __('%s and %s'), '', '' ), + ) ); + + $args = (array) $args; + $result = array_shift($args); + if ( count($args) == 1 ) + $result .= $l['between_only_two'] . array_shift($args); + // Loop when more than two args + $i = count($args); + while ( $i ) { + $arg = array_shift($args); + $i--; + if ( 0 == $i ) + $result .= $l['between_last_two'] . $arg; + else + $result .= $l['between'] . $arg; + } + return $result . substr($pattern, 2); +} + +/** + * Safely extracts not more than the first $count characters from html string. + * + * UTF-8, tags and entities safe prefix extraction. Entities inside will *NOT* + * be counted as one character. For example & will be counted as 4, < as + * 3, etc. + * + * @since 2.5.0 + * + * @param string $str String to get the excerpt from. + * @param integer $count Maximum number of characters to take. + * @param string $more Optional. What to append if $str needs to be trimmed. Defaults to empty string. + * @return string The excerpt. + */ +function wp_html_excerpt( $str, $count, $more = null ) { + if ( null === $more ) + $more = ''; + $str = wp_strip_all_tags( $str, true ); + $excerpt = mb_substr( $str, 0, $count ); + // remove part of an entity at the end + $excerpt = preg_replace( '/&[^;\s]{0,6}$/', '', $excerpt ); + if ( $str != $excerpt ) + $excerpt = trim( $excerpt ) . $more; + return $excerpt; +} + +/** + * Add a Base url to relative links in passed content. + * + * By default it supports the 'src' and 'href' attributes. However this can be + * changed via the 3rd param. + * + * @since 2.7.0 + * + * @param string $content String to search for links in. + * @param string $base The base URL to prefix to links. + * @param array $attrs The attributes which should be processed. + * @return string The processed content. + */ +function links_add_base_url( $content, $base, $attrs = array('src', 'href') ) { + global $_links_add_base; + $_links_add_base = $base; + $attrs = implode('|', (array)$attrs); + return preg_replace_callback( "!($attrs)=(['\"])(.+?)\\2!i", '_links_add_base', $content ); +} + +/** + * Callback to add a base url to relative links in passed content. + * + * @since 2.7.0 + * @access private + * + * @param string $m The matched link. + * @return string The processed link. + */ +function _links_add_base($m) { + global $_links_add_base; + //1 = attribute name 2 = quotation mark 3 = URL + return $m[1] . '=' . $m[2] . + ( preg_match( '#^(\w{1,20}):#', $m[3], $protocol ) && in_array( $protocol[1], wp_allowed_protocols() ) ? + $m[3] : + path_join( $_links_add_base, $m[3] ) ) + . $m[2]; +} + +/** + * Adds a Target attribute to all links in passed content. + * + * This function by default only applies to <a> tags, however this can be + * modified by the 3rd param. + * + * <b>NOTE:</b> Any current target attributed will be stripped and replaced. + * + * @since 2.7.0 + * + * @param string $content String to search for links in. + * @param string $target The Target to add to the links. + * @param array $tags An array of tags to apply to. + * @return string The processed content. + */ +function links_add_target( $content, $target = '_blank', $tags = array('a') ) { + global $_links_add_target; + $_links_add_target = $target; + $tags = implode('|', (array)$tags); + return preg_replace_callback( "!<($tags)([^>]*)>!i", '_links_add_target', $content ); +} + +/** + * Callback to add a target attribute to all links in passed content. + * + * @since 2.7.0 + * @access private + * + * @param string $m The matched link. + * @return string The processed link. + */ +function _links_add_target( $m ) { + global $_links_add_target; + $tag = $m[1]; + $link = preg_replace('|( target=([\'"])(.*?)\2)|i', '', $m[2]); + return '<' . $tag . $link . ' target="' . esc_attr( $_links_add_target ) . '">'; +} + +/** + * Normalize EOL characters and strip duplicate whitespace. + * + * @since 2.7.0 + * + * @param string $str The string to normalize. + * @return string The normalized string. + */ +function normalize_whitespace( $str ) { + $str = trim( $str ); + $str = str_replace( "\r", "\n", $str ); + $str = preg_replace( array( '/\n+/', '/[ \t]+/' ), array( "\n", ' ' ), $str ); + return $str; +} + +/** + * Properly strip all HTML tags including script and style + * + * This differs from strip_tags() because it removes the contents of + * the <script> and <style> tags. E.g. strip_tags( '<script>something</script>' ) + * will return 'something'. wp_strip_all_tags will return '' + * + * @since 2.9.0 + * + * @param string $string String containing HTML tags + * @param bool $remove_breaks optional Whether to remove left over line breaks and white space chars + * @return string The processed string. + */ +function wp_strip_all_tags($string, $remove_breaks = false) { + $string = preg_replace( '@<(script|style)[^>]*?>.*?</\\1>@si', '', $string ); + $string = strip_tags($string); + + if ( $remove_breaks ) + $string = preg_replace('/[\r\n\t ]+/', ' ', $string); + + return trim( $string ); +} + +/** + * Sanitize a string from user input or from the db + * + * check for invalid UTF-8, + * Convert single < characters to entity, + * strip all tags, + * remove line breaks, tabs and extra white space, + * strip octets. + * + * @since 2.9.0 + * + * @param string $str + * @return string + */ +function sanitize_text_field($str) { + $filtered = wp_check_invalid_utf8( $str ); + + if ( strpos($filtered, '<') !== false ) { + $filtered = wp_pre_kses_less_than( $filtered ); + // This will strip extra whitespace for us. + $filtered = wp_strip_all_tags( $filtered, true ); + } else { + $filtered = trim( preg_replace('/[\r\n\t ]+/', ' ', $filtered) ); + } + + $found = false; + while ( preg_match('/%[a-f0-9]{2}/i', $filtered, $match) ) { + $filtered = str_replace($match[0], '', $filtered); + $found = true; + } + + if ( $found ) { + // Strip out the whitespace that may now exist after removing the octets. + $filtered = trim( preg_replace('/ +/', ' ', $filtered) ); + } + + /** + * Filter a sanitized text field string. + * + * @since 2.9.0 + * + * @param string $filtered The sanitized string. + * @param string $str The string prior to being sanitized. + */ + return apply_filters( 'sanitize_text_field', $filtered, $str ); +} + +/** + * i18n friendly version of basename() + * + * @since 3.1.0 + * + * @param string $path A path. + * @param string $suffix If the filename ends in suffix this will also be cut off. + * @return string + */ +function wp_basename( $path, $suffix = '' ) { + return urldecode( basename( str_replace( array( '%2F', '%5C' ), '/', urlencode( $path ) ), $suffix ) ); +} + +/** + * Forever eliminate "Wordpress" from the planet (or at least the little bit we can influence). + * + * Violating our coding standards for a good function name. + * + * @since 3.0.0 + */ +function capital_P_dangit( $text ) { + // Simple replacement for titles + $current_filter = current_filter(); + if ( 'the_title' === $current_filter || 'wp_title' === $current_filter ) + return str_replace( 'Wordpress', 'WordPress', $text ); + // Still here? Use the more judicious replacement + static $dblq = false; + if ( false === $dblq ) + $dblq = _x( '“', 'opening curly double quote' ); + return str_replace( + array( ' Wordpress', '‘Wordpress', $dblq . 'Wordpress', '>Wordpress', '(Wordpress' ), + array( ' WordPress', '‘WordPress', $dblq . 'WordPress', '>WordPress', '(WordPress' ), + $text ); + +} + +/** + * Sanitize a mime type + * + * @since 3.1.3 + * + * @param string $mime_type Mime type + * @return string Sanitized mime type + */ +function sanitize_mime_type( $mime_type ) { + $sani_mime_type = preg_replace( '/[^-+*.a-zA-Z0-9\/]/', '', $mime_type ); + /** + * Filter a mime type following sanitization. + * + * @since 3.1.3 + * + * @param string $sani_mime_type The sanitized mime type. + * @param string $mime_type The mime type prior to sanitization. + */ + return apply_filters( 'sanitize_mime_type', $sani_mime_type, $mime_type ); +} + +/** + * Sanitize space or carriage return separated URLs that are used to send trackbacks. + * + * @since 3.4.0 + * + * @param string $to_ping Space or carriage return separated URLs + * @return string URLs starting with the http or https protocol, separated by a carriage return. + */ +function sanitize_trackback_urls( $to_ping ) { + $urls_to_ping = preg_split( '/[\r\n\t ]/', trim( $to_ping ), -1, PREG_SPLIT_NO_EMPTY ); + foreach ( $urls_to_ping as $k => $url ) { + if ( !preg_match( '#^https?://.#i', $url ) ) + unset( $urls_to_ping[$k] ); + } + $urls_to_ping = array_map( 'esc_url_raw', $urls_to_ping ); + $urls_to_ping = implode( "\n", $urls_to_ping ); + /** + * Filter a list of trackback URLs following sanitization. + * + * The string returned here consists of a space or carriage return-delimited list + * of trackback URLs. + * + * @since 3.4.0 + * + * @param string $urls_to_ping Sanitized space or carriage return separated URLs. + * @param string $to_ping Space or carriage return separated URLs before sanitization. + */ + return apply_filters( 'sanitize_trackback_urls', $urls_to_ping, $to_ping ); +} + +/** + * Add slashes to a string or array of strings. + * + * This should be used when preparing data for core API that expects slashed data. + * This should not be used to escape data going directly into an SQL query. + * + * @since 3.6.0 + * + * @param string|array $value String or array of strings to slash. + * @return string|array Slashed $value + */ +function wp_slash( $value ) { + if ( is_array( $value ) ) { + foreach ( $value as $k => $v ) { + if ( is_array( $v ) ) { + $value[$k] = wp_slash( $v ); + } else { + $value[$k] = addslashes( $v ); + } + } + } else { + $value = addslashes( $value ); + } + + return $value; +} + +/** + * Remove slashes from a string or array of strings. + * + * This should be used to remove slashes from data passed to core API that + * expects data to be unslashed. + * + * @since 3.6.0 + * + * @param string|array $value String or array of strings to unslash. + * @return string|array Unslashed $value + */ +function wp_unslash( $value ) { + return stripslashes_deep( $value ); +} + +/** + * Extract and return the first URL from passed content. + * + * @since 3.6.0 + * + * @param string $content A string which might contain a URL. + * @return string The found URL. + */ +function get_url_in_content( $content ) { + if ( empty( $content ) ) { + return false; + } + + if ( preg_match( '/<a\s[^>]*?href=([\'"])(.+?)\1/is', $content, $matches ) ) { + return esc_url_raw( $matches[2] ); + } + + return false; +} diff --git a/wp-includes/functions.php b/wp-includes/functions.php new file mode 100644 index 0000000..88e59fb --- /dev/null +++ b/wp-includes/functions.php @@ -0,0 +1,4446 @@ +<?php +/** + * Main WordPress API + * + * @package WordPress + */ + +require( ABSPATH . WPINC . '/option.php' ); + +/** + * Converts given date string into a different format. + * + * $format should be either a PHP date format string, e.g. 'U' for a Unix + * timestamp, or 'G' for a Unix timestamp assuming that $date is GMT. + * + * If $translate is true then the given date and format string will + * be passed to date_i18n() for translation. + * + * @since 0.71 + * + * @param string $format Format of the date to return. + * @param string $date Date string to convert. + * @param bool $translate Whether the return date should be translated. Default is true. + * @return string|int Formatted date string, or Unix timestamp. + */ +function mysql2date( $format, $date, $translate = true ) { + if ( empty( $date ) ) + return false; + + if ( 'G' == $format ) + return strtotime( $date . ' +0000' ); + + $i = strtotime( $date ); + + if ( 'U' == $format ) + return $i; + + if ( $translate ) + return date_i18n( $format, $i ); + else + return date( $format, $i ); +} + +/** + * Retrieve the current time based on specified type. + * + * The 'mysql' type will return the time in the format for MySQL DATETIME field. + * The 'timestamp' type will return the current timestamp. + * Other strings will be interpreted as PHP date formats (e.g. 'Y-m-d'). + * + * If $gmt is set to either '1' or 'true', then both types will use GMT time. + * if $gmt is false, the output is adjusted with the GMT offset in the WordPress option. + * + * @since 1.0.0 + * + * @param string $type 'mysql', 'timestamp', or PHP date format string (e.g. 'Y-m-d'). + * @param int|bool $gmt Optional. Whether to use GMT timezone. Default is false. + * @return int|string String if $type is 'gmt', int if $type is 'timestamp'. + */ +function current_time( $type, $gmt = 0 ) { + switch ( $type ) { + case 'mysql': + return ( $gmt ) ? gmdate( 'Y-m-d H:i:s' ) : gmdate( 'Y-m-d H:i:s', ( time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ) ); + break; + case 'timestamp': + return ( $gmt ) ? time() : time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ); + break; + default: + return ( $gmt ) ? date( $type ) : date( $type, time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ); + break; + } +} + +/** + * Retrieve the date in localized format, based on timestamp. + * + * If the locale specifies the locale month and weekday, then the locale will + * take over the format for the date. If it isn't, then the date format string + * will be used instead. + * + * @since 0.71 + * + * @param string $dateformatstring Format to display the date. + * @param int $unixtimestamp Optional. Unix timestamp. + * @param bool $gmt Optional, default is false. Whether to convert to GMT for time. + * @return string The date, translated if locale specifies it. + */ +function date_i18n( $dateformatstring, $unixtimestamp = false, $gmt = false ) { + global $wp_locale; + $i = $unixtimestamp; + + if ( false === $i ) { + if ( ! $gmt ) + $i = current_time( 'timestamp' ); + else + $i = time(); + // we should not let date() interfere with our + // specially computed timestamp + $gmt = true; + } + + // store original value for language with untypical grammars + // see http://core.trac.wordpress.org/ticket/9396 + $req_format = $dateformatstring; + + $datefunc = $gmt? 'gmdate' : 'date'; + + if ( ( !empty( $wp_locale->month ) ) && ( !empty( $wp_locale->weekday ) ) ) { + $datemonth = $wp_locale->get_month( $datefunc( 'm', $i ) ); + $datemonth_abbrev = $wp_locale->get_month_abbrev( $datemonth ); + $dateweekday = $wp_locale->get_weekday( $datefunc( 'w', $i ) ); + $dateweekday_abbrev = $wp_locale->get_weekday_abbrev( $dateweekday ); + $datemeridiem = $wp_locale->get_meridiem( $datefunc( 'a', $i ) ); + $datemeridiem_capital = $wp_locale->get_meridiem( $datefunc( 'A', $i ) ); + $dateformatstring = ' '.$dateformatstring; + $dateformatstring = preg_replace( "/([^\\\])D/", "\\1" . backslashit( $dateweekday_abbrev ), $dateformatstring ); + $dateformatstring = preg_replace( "/([^\\\])F/", "\\1" . backslashit( $datemonth ), $dateformatstring ); + $dateformatstring = preg_replace( "/([^\\\])l/", "\\1" . backslashit( $dateweekday ), $dateformatstring ); + $dateformatstring = preg_replace( "/([^\\\])M/", "\\1" . backslashit( $datemonth_abbrev ), $dateformatstring ); + $dateformatstring = preg_replace( "/([^\\\])a/", "\\1" . backslashit( $datemeridiem ), $dateformatstring ); + $dateformatstring = preg_replace( "/([^\\\])A/", "\\1" . backslashit( $datemeridiem_capital ), $dateformatstring ); + + $dateformatstring = substr( $dateformatstring, 1, strlen( $dateformatstring ) -1 ); + } + $timezone_formats = array( 'P', 'I', 'O', 'T', 'Z', 'e' ); + $timezone_formats_re = implode( '|', $timezone_formats ); + if ( preg_match( "/$timezone_formats_re/", $dateformatstring ) ) { + $timezone_string = get_option( 'timezone_string' ); + if ( $timezone_string ) { + $timezone_object = timezone_open( $timezone_string ); + $date_object = date_create( null, $timezone_object ); + foreach( $timezone_formats as $timezone_format ) { + if ( false !== strpos( $dateformatstring, $timezone_format ) ) { + $formatted = date_format( $date_object, $timezone_format ); + $dateformatstring = ' '.$dateformatstring; + $dateformatstring = preg_replace( "/([^\\\])$timezone_format/", "\\1" . backslashit( $formatted ), $dateformatstring ); + $dateformatstring = substr( $dateformatstring, 1, strlen( $dateformatstring ) -1 ); + } + } + } + } + $j = @$datefunc( $dateformatstring, $i ); + + /** + * Filter the date formatted based on the locale. + * + * @since 2.8.0 + * + * @param string $j Formatted date string. + * @param string $req_format Format to display the date. + * @param int $i Unix timestamp. + * @param bool $gmt Whether to convert to GMT for time. Default false. + */ + $j = apply_filters( 'date_i18n', $j, $req_format, $i, $gmt ); + return $j; +} + +/** + * Convert integer number to format based on the locale. + * + * @since 2.3.0 + * + * @param int $number The number to convert based on locale. + * @param int $decimals Precision of the number of decimal places. + * @return string Converted number in string format. + */ +function number_format_i18n( $number, $decimals = 0 ) { + global $wp_locale; + $formatted = number_format( $number, absint( $decimals ), $wp_locale->number_format['decimal_point'], $wp_locale->number_format['thousands_sep'] ); + + /** + * Filter the number formatted based on the locale. + * + * @since 2.8.0 + * + * @param string $formatted Converted number in string format. + */ + return apply_filters( 'number_format_i18n', $formatted ); +} + +/** + * Convert number of bytes largest unit bytes will fit into. + * + * It is easier to read 1kB than 1024 bytes and 1MB than 1048576 bytes. Converts + * number of bytes to human readable number by taking the number of that unit + * that the bytes will go into it. Supports TB value. + * + * Please note that integers in PHP are limited to 32 bits, unless they are on + * 64 bit architecture, then they have 64 bit size. If you need to place the + * larger size then what PHP integer type will hold, then use a string. It will + * be converted to a double, which should always have 64 bit length. + * + * Technically the correct unit names for powers of 1024 are KiB, MiB etc. + * @link http://en.wikipedia.org/wiki/Byte + * + * @since 2.3.0 + * + * @param int|string $bytes Number of bytes. Note max integer size for integers. + * @param int $decimals Precision of number of decimal places. Deprecated. + * @return bool|string False on failure. Number string on success. + */ +function size_format( $bytes, $decimals = 0 ) { + $quant = array( + // ========================= Origin ==== + 'TB' => 1099511627776, // pow( 1024, 4) + 'GB' => 1073741824, // pow( 1024, 3) + 'MB' => 1048576, // pow( 1024, 2) + 'kB' => 1024, // pow( 1024, 1) + 'B ' => 1, // pow( 1024, 0) + ); + foreach ( $quant as $unit => $mag ) + if ( doubleval($bytes) >= $mag ) + return number_format_i18n( $bytes / $mag, $decimals ) . ' ' . $unit; + + return false; +} + +/** + * Get the week start and end from the datetime or date string from mysql. + * + * @since 0.71 + * + * @param string $mysqlstring Date or datetime field type from mysql. + * @param int $start_of_week Optional. Start of the week as an integer. + * @return array Keys are 'start' and 'end'. + */ +function get_weekstartend( $mysqlstring, $start_of_week = '' ) { + $my = substr( $mysqlstring, 0, 4 ); // Mysql string Year + $mm = substr( $mysqlstring, 8, 2 ); // Mysql string Month + $md = substr( $mysqlstring, 5, 2 ); // Mysql string day + $day = mktime( 0, 0, 0, $md, $mm, $my ); // The timestamp for mysqlstring day. + $weekday = date( 'w', $day ); // The day of the week from the timestamp + if ( !is_numeric($start_of_week) ) + $start_of_week = get_option( 'start_of_week' ); + + if ( $weekday < $start_of_week ) + $weekday += 7; + + $start = $day - DAY_IN_SECONDS * ( $weekday - $start_of_week ); // The most recent week start day on or before $day + $end = $start + 7 * DAY_IN_SECONDS - 1; // $start + 7 days - 1 second + return compact( 'start', 'end' ); +} + +/** + * Unserialize value only if it was serialized. + * + * @since 2.0.0 + * + * @param string $original Maybe unserialized original, if is needed. + * @return mixed Unserialized data can be any type. + */ +function maybe_unserialize( $original ) { + if ( is_serialized( $original ) ) // don't attempt to unserialize data that wasn't serialized going in + return @unserialize( $original ); + return $original; +} + +/** + * Check value to find if it was serialized. + * + * If $data is not an string, then returned value will always be false. + * Serialized data is always a string. + * + * @since 2.0.5 + * + * @param mixed $data Value to check to see if was serialized. + * @param bool $strict Optional. Whether to be strict about the end of the string. Defaults true. + * @return bool False if not serialized and true if it was. + */ +function is_serialized( $data, $strict = true ) { + // if it isn't a string, it isn't serialized + if ( ! is_string( $data ) ) { + return false; + } + $data = trim( $data ); + if ( 'N;' == $data ) { + return true; + } + if ( strlen( $data ) < 4 ) { + return false; + } + if ( ':' !== $data[1] ) { + return false; + } + if ( $strict ) { + $lastc = substr( $data, -1 ); + if ( ';' !== $lastc && '}' !== $lastc ) { + return false; + } + } else { + $semicolon = strpos( $data, ';' ); + $brace = strpos( $data, '}' ); + // Either ; or } must exist. + if ( false === $semicolon && false === $brace ) + return false; + // But neither must be in the first X characters. + if ( false !== $semicolon && $semicolon < 3 ) + return false; + if ( false !== $brace && $brace < 4 ) + return false; + } + $token = $data[0]; + switch ( $token ) { + case 's' : + if ( $strict ) { + if ( '"' !== substr( $data, -2, 1 ) ) { + return false; + } + } elseif ( false === strpos( $data, '"' ) ) { + return false; + } + // or else fall through + case 'a' : + case 'O' : + return (bool) preg_match( "/^{$token}:[0-9]+:/s", $data ); + case 'b' : + case 'i' : + case 'd' : + $end = $strict ? '$' : ''; + return (bool) preg_match( "/^{$token}:[0-9.E-]+;$end/", $data ); + } + return false; +} + +/** + * Check whether serialized data is of string type. + * + * @since 2.0.5 + * + * @param mixed $data Serialized data + * @return bool False if not a serialized string, true if it is. + */ +function is_serialized_string( $data ) { + // if it isn't a string, it isn't a serialized string + if ( ! is_string( $data ) ) { + return false; + } + $data = trim( $data ); + if ( strlen( $data ) < 4 ) { + return false; + } elseif ( ':' !== $data[1] ) { + return false; + } elseif ( ';' !== substr( $data, -1 ) ) { + return false; + } elseif ( $data[0] !== 's' ) { + return false; + } elseif ( '"' !== substr( $data, -2, 1 ) ) { + return false; + } else { + return true; + } +} + +/** + * Serialize data, if needed. + * + * @since 2.0.5 + * + * @param mixed $data Data that might be serialized. + * @return mixed A scalar data + */ +function maybe_serialize( $data ) { + if ( is_array( $data ) || is_object( $data ) ) + return serialize( $data ); + + // Double serialization is required for backward compatibility. + // See http://core.trac.wordpress.org/ticket/12930 + if ( is_serialized( $data, false ) ) + return serialize( $data ); + + return $data; +} + +/** + * Retrieve post title from XMLRPC XML. + * + * If the title element is not part of the XML, then the default post title from + * the $post_default_title will be used instead. + * + * @since 0.71 + * + * @global string $post_default_title Default XMLRPC post title. + * + * @param string $content XMLRPC XML Request content + * @return string Post title + */ +function xmlrpc_getposttitle( $content ) { + global $post_default_title; + if ( preg_match( '/<title>(.+?)<\/title>/is', $content, $matchtitle ) ) { + $post_title = $matchtitle[1]; + } else { + $post_title = $post_default_title; + } + return $post_title; +} + +/** + * Retrieve the post category or categories from XMLRPC XML. + * + * If the category element is not found, then the default post category will be + * used. The return type then would be what $post_default_category. If the + * category is found, then it will always be an array. + * + * @since 0.71 + * + * @global string $post_default_category Default XMLRPC post category. + * + * @param string $content XMLRPC XML Request content + * @return string|array List of categories or category name. + */ +function xmlrpc_getpostcategory( $content ) { + global $post_default_category; + if ( preg_match( '/<category>(.+?)<\/category>/is', $content, $matchcat ) ) { + $post_category = trim( $matchcat[1], ',' ); + $post_category = explode( ',', $post_category ); + } else { + $post_category = $post_default_category; + } + return $post_category; +} + +/** + * XMLRPC XML content without title and category elements. + * + * @since 0.71 + * + * @param string $content XMLRPC XML Request content + * @return string XMLRPC XML Request content without title and category elements. + */ +function xmlrpc_removepostdata( $content ) { + $content = preg_replace( '/<title>(.+?)<\/title>/si', '', $content ); + $content = preg_replace( '/<category>(.+?)<\/category>/si', '', $content ); + $content = trim( $content ); + return $content; +} + +/** + * Use RegEx to extract URLs from arbitrary content + * + * @since 3.7.0 + * + * @param string $content + * @return array URLs found in passed string + */ +function wp_extract_urls( $content ) { + preg_match_all( + "#((?:[\w-]+://?|[\w\d]+[.])[^\s()<>]+[.](?:\([\w\d]+\)|(?:[^`!()\[\]{};:'\".,<>?«»“”‘’\s]|(?:[:]\d+)?/?)+))#", + $content, + $post_links + ); + + $post_links = array_unique( array_map( 'html_entity_decode', $post_links[0] ) ); + + return array_values( $post_links ); +} + +/** + * Check content for video and audio links to add as enclosures. + * + * Will not add enclosures that have already been added and will + * remove enclosures that are no longer in the post. This is called as + * pingbacks and trackbacks. + * + * @since 1.5.0 + * + * @uses $wpdb + * + * @param string $content Post Content + * @param int $post_ID Post ID + */ +function do_enclose( $content, $post_ID ) { + global $wpdb; + + //TODO: Tidy this ghetto code up and make the debug code optional + include_once( ABSPATH . WPINC . '/class-IXR.php' ); + + $post_links = array(); + + $pung = get_enclosed( $post_ID ); + + $post_links_temp = wp_extract_urls( $content ); + + foreach ( $pung as $link_test ) { + if ( ! in_array( $link_test, $post_links_temp ) ) { // link no longer in post + $mids = $wpdb->get_col( $wpdb->prepare("SELECT meta_id FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = 'enclosure' AND meta_value LIKE (%s)", $post_ID, like_escape( $link_test ) . '%') ); + foreach ( $mids as $mid ) + delete_metadata_by_mid( 'post', $mid ); + } + } + + foreach ( (array) $post_links_temp as $link_test ) { + if ( !in_array( $link_test, $pung ) ) { // If we haven't pung it already + $test = @parse_url( $link_test ); + if ( false === $test ) + continue; + if ( isset( $test['query'] ) ) + $post_links[] = $link_test; + elseif ( isset($test['path']) && ( $test['path'] != '/' ) && ($test['path'] != '' ) ) + $post_links[] = $link_test; + } + } + + foreach ( (array) $post_links as $url ) { + if ( $url != '' && !$wpdb->get_var( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = 'enclosure' AND meta_value LIKE (%s)", $post_ID, like_escape( $url ) . '%' ) ) ) { + + if ( $headers = wp_get_http_headers( $url) ) { + $len = isset( $headers['content-length'] ) ? (int) $headers['content-length'] : 0; + $type = isset( $headers['content-type'] ) ? $headers['content-type'] : ''; + $allowed_types = array( 'video', 'audio' ); + + // Check to see if we can figure out the mime type from + // the extension + $url_parts = @parse_url( $url ); + if ( false !== $url_parts ) { + $extension = pathinfo( $url_parts['path'], PATHINFO_EXTENSION ); + if ( !empty( $extension ) ) { + foreach ( wp_get_mime_types() as $exts => $mime ) { + if ( preg_match( '!^(' . $exts . ')$!i', $extension ) ) { + $type = $mime; + break; + } + } + } + } + + if ( in_array( substr( $type, 0, strpos( $type, "/" ) ), $allowed_types ) ) { + add_post_meta( $post_ID, 'enclosure', "$url\n$len\n$mime\n" ); + } + } + } + } +} + +/** + * Perform a HTTP HEAD or GET request. + * + * If $file_path is a writable filename, this will do a GET request and write + * the file to that path. + * + * @since 2.5.0 + * + * @param string $url URL to fetch. + * @param string|bool $file_path Optional. File path to write request to. + * @param int $red (private) The number of Redirects followed, Upon 5 being hit, returns false. + * @return bool|string False on failure and string of headers if HEAD request. + */ +function wp_get_http( $url, $file_path = false, $red = 1 ) { + @set_time_limit( 60 ); + + if ( $red > 5 ) + return false; + + $options = array(); + $options['redirection'] = 5; + + if ( false == $file_path ) + $options['method'] = 'HEAD'; + else + $options['method'] = 'GET'; + + $response = wp_safe_remote_request( $url, $options ); + + if ( is_wp_error( $response ) ) + return false; + + $headers = wp_remote_retrieve_headers( $response ); + $headers['response'] = wp_remote_retrieve_response_code( $response ); + + // WP_HTTP no longer follows redirects for HEAD requests. + if ( 'HEAD' == $options['method'] && in_array($headers['response'], array(301, 302)) && isset( $headers['location'] ) ) { + return wp_get_http( $headers['location'], $file_path, ++$red ); + } + + if ( false == $file_path ) + return $headers; + + // GET request - write it to the supplied filename + $out_fp = fopen($file_path, 'w'); + if ( !$out_fp ) + return $headers; + + fwrite( $out_fp, wp_remote_retrieve_body( $response ) ); + fclose($out_fp); + clearstatcache(); + + return $headers; +} + +/** + * Retrieve HTTP Headers from URL. + * + * @since 1.5.1 + * + * @param string $url + * @param bool $deprecated Not Used. + * @return bool|string False on failure, headers on success. + */ +function wp_get_http_headers( $url, $deprecated = false ) { + if ( !empty( $deprecated ) ) + _deprecated_argument( __FUNCTION__, '2.7' ); + + $response = wp_safe_remote_head( $url ); + + if ( is_wp_error( $response ) ) + return false; + + return wp_remote_retrieve_headers( $response ); +} + +/** + * Whether today is a new day. + * + * @since 0.71 + * @uses $day Today + * @uses $previousday Previous day + * + * @return int 1 when new day, 0 if not a new day. + */ +function is_new_day() { + global $currentday, $previousday; + if ( $currentday != $previousday ) + return 1; + else + return 0; +} + +/** + * Build URL query based on an associative and, or indexed array. + * + * This is a convenient function for easily building url queries. It sets the + * separator to '&' and uses _http_build_query() function. + * + * @see _http_build_query() Used to build the query + * @link http://us2.php.net/manual/en/function.http-build-query.php more on what + * http_build_query() does. + * + * @since 2.3.0 + * + * @param array $data URL-encode key/value pairs. + * @return string URL encoded string + */ +function build_query( $data ) { + return _http_build_query( $data, null, '&', '', false ); +} + +// from php.net (modified by Mark Jaquith to behave like the native PHP5 function) +function _http_build_query($data, $prefix=null, $sep=null, $key='', $urlencode=true) { + $ret = array(); + + foreach ( (array) $data as $k => $v ) { + if ( $urlencode) + $k = urlencode($k); + if ( is_int($k) && $prefix != null ) + $k = $prefix.$k; + if ( !empty($key) ) + $k = $key . '%5B' . $k . '%5D'; + if ( $v === null ) + continue; + elseif ( $v === FALSE ) + $v = '0'; + + if ( is_array($v) || is_object($v) ) + array_push($ret,_http_build_query($v, '', $sep, $k, $urlencode)); + elseif ( $urlencode ) + array_push($ret, $k.'='.urlencode($v)); + else + array_push($ret, $k.'='.$v); + } + + if ( null === $sep ) + $sep = ini_get('arg_separator.output'); + + return implode($sep, $ret); +} + +/** + * Retrieve a modified URL query string. + * + * You can rebuild the URL and append a new query variable to the URL query by + * using this function. You can also retrieve the full URL with query data. + * + * Adding a single key & value or an associative array. Setting a key value to + * an empty string removes the key. Omitting oldquery_or_uri uses the $_SERVER + * value. Additional values provided are expected to be encoded appropriately + * with urlencode() or rawurlencode(). + * + * @since 1.5.0 + * + * @param mixed $param1 Either newkey or an associative_array + * @param mixed $param2 Either newvalue or oldquery or uri + * @param mixed $param3 Optional. Old query or uri + * @return string New URL query string. + */ +function add_query_arg() { + $ret = ''; + $args = func_get_args(); + if ( is_array( $args[0] ) ) { + if ( count( $args ) < 2 || false === $args[1] ) + $uri = $_SERVER['REQUEST_URI']; + else + $uri = $args[1]; + } else { + if ( count( $args ) < 3 || false === $args[2] ) + $uri = $_SERVER['REQUEST_URI']; + else + $uri = $args[2]; + } + + if ( $frag = strstr( $uri, '#' ) ) + $uri = substr( $uri, 0, -strlen( $frag ) ); + else + $frag = ''; + + if ( 0 === stripos( $uri, 'http://' ) ) { + $protocol = 'http://'; + $uri = substr( $uri, 7 ); + } elseif ( 0 === stripos( $uri, 'https://' ) ) { + $protocol = 'https://'; + $uri = substr( $uri, 8 ); + } else { + $protocol = ''; + } + + if ( strpos( $uri, '?' ) !== false ) { + list( $base, $query ) = explode( '?', $uri, 2 ); + $base .= '?'; + } elseif ( $protocol || strpos( $uri, '=' ) === false ) { + $base = $uri . '?'; + $query = ''; + } else { + $base = ''; + $query = $uri; + } + + wp_parse_str( $query, $qs ); + $qs = urlencode_deep( $qs ); // this re-URL-encodes things that were already in the query string + if ( is_array( $args[0] ) ) { + $kayvees = $args[0]; + $qs = array_merge( $qs, $kayvees ); + } else { + $qs[ $args[0] ] = $args[1]; + } + + foreach ( $qs as $k => $v ) { + if ( $v === false ) + unset( $qs[$k] ); + } + + $ret = build_query( $qs ); + $ret = trim( $ret, '?' ); + $ret = preg_replace( '#=(&|$)#', '$1', $ret ); + $ret = $protocol . $base . $ret . $frag; + $ret = rtrim( $ret, '?' ); + return $ret; +} + +/** + * Removes an item or list from the query string. + * + * @since 1.5.0 + * + * @param string|array $key Query key or keys to remove. + * @param bool $query When false uses the $_SERVER value. + * @return string New URL query string. + */ +function remove_query_arg( $key, $query=false ) { + if ( is_array( $key ) ) { // removing multiple keys + foreach ( $key as $k ) + $query = add_query_arg( $k, false, $query ); + return $query; + } + return add_query_arg( $key, false, $query ); +} + +/** + * Walks the array while sanitizing the contents. + * + * @since 0.71 + * + * @param array $array Array to walk while sanitizing contents. + * @return array Sanitized $array. + */ +function add_magic_quotes( $array ) { + foreach ( (array) $array as $k => $v ) { + if ( is_array( $v ) ) { + $array[$k] = add_magic_quotes( $v ); + } else { + $array[$k] = addslashes( $v ); + } + } + return $array; +} + +/** + * HTTP request for URI to retrieve content. + * + * @since 1.5.1 + * @uses wp_remote_get() + * + * @param string $uri URI/URL of web page to retrieve. + * @return bool|string HTTP content. False on failure. + */ +function wp_remote_fopen( $uri ) { + $parsed_url = @parse_url( $uri ); + + if ( !$parsed_url || !is_array( $parsed_url ) ) + return false; + + $options = array(); + $options['timeout'] = 10; + + $response = wp_safe_remote_get( $uri, $options ); + + if ( is_wp_error( $response ) ) + return false; + + return wp_remote_retrieve_body( $response ); +} + +/** + * Set up the WordPress query. + * + * @since 2.0.0 + * + * @param string $query_vars Default WP_Query arguments. + */ +function wp( $query_vars = '' ) { + global $wp, $wp_query, $wp_the_query; + $wp->main( $query_vars ); + + if ( !isset($wp_the_query) ) + $wp_the_query = $wp_query; +} + +/** + * Retrieve the description for the HTTP status. + * + * @since 2.3.0 + * + * @param int $code HTTP status code. + * @return string Empty string if not found, or description if found. + */ +function get_status_header_desc( $code ) { + global $wp_header_to_desc; + + $code = absint( $code ); + + if ( !isset( $wp_header_to_desc ) ) { + $wp_header_to_desc = array( + 100 => 'Continue', + 101 => 'Switching Protocols', + 102 => 'Processing', + + 200 => 'OK', + 201 => 'Created', + 202 => 'Accepted', + 203 => 'Non-Authoritative Information', + 204 => 'No Content', + 205 => 'Reset Content', + 206 => 'Partial Content', + 207 => 'Multi-Status', + 226 => 'IM Used', + + 300 => 'Multiple Choices', + 301 => 'Moved Permanently', + 302 => 'Found', + 303 => 'See Other', + 304 => 'Not Modified', + 305 => 'Use Proxy', + 306 => 'Reserved', + 307 => 'Temporary Redirect', + + 400 => 'Bad Request', + 401 => 'Unauthorized', + 402 => 'Payment Required', + 403 => 'Forbidden', + 404 => 'Not Found', + 405 => 'Method Not Allowed', + 406 => 'Not Acceptable', + 407 => 'Proxy Authentication Required', + 408 => 'Request Timeout', + 409 => 'Conflict', + 410 => 'Gone', + 411 => 'Length Required', + 412 => 'Precondition Failed', + 413 => 'Request Entity Too Large', + 414 => 'Request-URI Too Long', + 415 => 'Unsupported Media Type', + 416 => 'Requested Range Not Satisfiable', + 417 => 'Expectation Failed', + 418 => 'I\'m a teapot', + 422 => 'Unprocessable Entity', + 423 => 'Locked', + 424 => 'Failed Dependency', + 426 => 'Upgrade Required', + 428 => 'Precondition Required', + 429 => 'Too Many Requests', + 431 => 'Request Header Fields Too Large', + + 500 => 'Internal Server Error', + 501 => 'Not Implemented', + 502 => 'Bad Gateway', + 503 => 'Service Unavailable', + 504 => 'Gateway Timeout', + 505 => 'HTTP Version Not Supported', + 506 => 'Variant Also Negotiates', + 507 => 'Insufficient Storage', + 510 => 'Not Extended', + 511 => 'Network Authentication Required', + ); + } + + if ( isset( $wp_header_to_desc[$code] ) ) + return $wp_header_to_desc[$code]; + else + return ''; +} + +/** + * Set HTTP status header. + * + * @since 2.0.0 + * @see get_status_header_desc() + * + * @param int $code HTTP status code. + */ +function status_header( $code ) { + $description = get_status_header_desc( $code ); + + if ( empty( $description ) ) + return; + + $protocol = $_SERVER['SERVER_PROTOCOL']; + if ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol ) + $protocol = 'HTTP/1.0'; + $status_header = "$protocol $code $description"; + if ( function_exists( 'apply_filters' ) ) + + /** + * Filter an HTTP status header. + * + * @since 2.2.0 + * + * @param string $status_header HTTP status header. + * @param int $code HTTP status code. + * @param string $description Description for the status code. + * @param string $protocol Server protocol. + */ + $status_header = apply_filters( 'status_header', $status_header, $code, $description, $protocol ); + + @header( $status_header, true, $code ); +} + +/** + * Gets the header information to prevent caching. + * + * The several different headers cover the different ways cache prevention is handled + * by different browsers + * + * @since 2.8.0 + * + * @return array The associative array of header names and field values. + */ +function wp_get_nocache_headers() { + $headers = array( + 'Expires' => 'Wed, 11 Jan 1984 05:00:00 GMT', + 'Cache-Control' => 'no-cache, must-revalidate, max-age=0', + 'Pragma' => 'no-cache', + ); + + if ( function_exists('apply_filters') ) { + /** + * Filter the cache-controlling headers. + * + * @since 2.8.0 + * + * @param array $headers { + * Header names and field values. + * + * @type string $Expires Expires header. + * @type string $Cache-Control Cache-Control header. + * @type string $Pragma Pragma header. + * } + */ + $headers = (array) apply_filters( 'nocache_headers', $headers ); + } + $headers['Last-Modified'] = false; + return $headers; +} + +/** + * Sets the headers to prevent caching for the different browsers. + * + * Different browsers support different nocache headers, so several headers must + * be sent so that all of them get the point that no caching should occur. + * + * @since 2.0.0 + * @see wp_get_nocache_headers() + */ +function nocache_headers() { + $headers = wp_get_nocache_headers(); + + unset( $headers['Last-Modified'] ); + + // In PHP 5.3+, make sure we are not sending a Last-Modified header. + if ( function_exists( 'header_remove' ) ) { + @header_remove( 'Last-Modified' ); + } else { + // In PHP 5.2, send an empty Last-Modified header, but only as a + // last resort to override a header already sent. #WP23021 + foreach ( headers_list() as $header ) { + if ( 0 === stripos( $header, 'Last-Modified' ) ) { + $headers['Last-Modified'] = ''; + break; + } + } + } + + foreach( $headers as $name => $field_value ) + @header("{$name}: {$field_value}"); +} + +/** + * Set the headers for caching for 10 days with JavaScript content type. + * + * @since 2.1.0 + */ +function cache_javascript_headers() { + $expiresOffset = 10 * DAY_IN_SECONDS; + header( "Content-Type: text/javascript; charset=" . get_bloginfo( 'charset' ) ); + header( "Vary: Accept-Encoding" ); // Handle proxies + header( "Expires: " . gmdate( "D, d M Y H:i:s", time() + $expiresOffset ) . " GMT" ); +} + +/** + * Retrieve the number of database queries during the WordPress execution. + * + * @since 2.0.0 + * + * @return int Number of database queries + */ +function get_num_queries() { + global $wpdb; + return $wpdb->num_queries; +} + +/** + * Whether input is yes or no. Must be 'y' to be true. + * + * @since 1.0.0 + * + * @param string $yn Character string containing either 'y' or 'n' + * @return bool True if yes, false on anything else + */ +function bool_from_yn( $yn ) { + return ( strtolower( $yn ) == 'y' ); +} + +/** + * Loads the feed template from the use of an action hook. + * + * If the feed action does not have a hook, then the function will die with a + * message telling the visitor that the feed is not valid. + * + * It is better to only have one hook for each feed. + * + * @since 2.1.0 + * + * @uses $wp_query Used to tell if the use a comment feed. + */ +function do_feed() { + global $wp_query; + + $feed = get_query_var( 'feed' ); + + // Remove the pad, if present. + $feed = preg_replace( '/^_+/', '', $feed ); + + if ( $feed == '' || $feed == 'feed' ) + $feed = get_default_feed(); + + $hook = 'do_feed_' . $feed; + if ( ! has_action( $hook ) ) + wp_die( __( 'ERROR: This is not a valid feed template.' ), '', array( 'response' => 404 ) ); + + /** + * Fires once the given feed is loaded. + * + * The dynamic hook name, $hook, refers to the feed name. + * + * @since 2.1.0 + * + * @param bool $is_comment_feed Whether the feed is a comment feed. + */ + do_action( $hook, $wp_query->is_comment_feed ); +} + +/** + * Load the RDF RSS 0.91 Feed template. + * + * @since 2.1.0 + */ +function do_feed_rdf() { + load_template( ABSPATH . WPINC . '/feed-rdf.php' ); +} + +/** + * Load the RSS 1.0 Feed Template. + * + * @since 2.1.0 + */ +function do_feed_rss() { + load_template( ABSPATH . WPINC . '/feed-rss.php' ); +} + +/** + * Load either the RSS2 comment feed or the RSS2 posts feed. + * + * @since 2.1.0 + * + * @param bool $for_comments True for the comment feed, false for normal feed. + */ +function do_feed_rss2( $for_comments ) { + if ( $for_comments ) + load_template( ABSPATH . WPINC . '/feed-rss2-comments.php' ); + else + load_template( ABSPATH . WPINC . '/feed-rss2.php' ); +} + +/** + * Load either Atom comment feed or Atom posts feed. + * + * @since 2.1.0 + * + * @param bool $for_comments True for the comment feed, false for normal feed. + */ +function do_feed_atom( $for_comments ) { + if ($for_comments) + load_template( ABSPATH . WPINC . '/feed-atom-comments.php'); + else + load_template( ABSPATH . WPINC . '/feed-atom.php' ); +} + +/** + * Display the robots.txt file content. + * + * The echo content should be with usage of the permalinks or for creating the + * robots.txt file. + * + * @since 2.1.0 + */ +function do_robots() { + header( 'Content-Type: text/plain; charset=utf-8' ); + + /** + * Fires when displaying the robots.txt file. + * + * @since 2.1.0 + */ + do_action( 'do_robotstxt' ); + + $output = "User-agent: *\n"; + $public = get_option( 'blog_public' ); + if ( '0' == $public ) { + $output .= "Disallow: /\n"; + } else { + $site_url = parse_url( site_url() ); + $path = ( !empty( $site_url['path'] ) ) ? $site_url['path'] : ''; + $output .= "Disallow: $path/wp-admin/\n"; + $output .= "Disallow: $path/wp-includes/\n"; + } + + /** + * Filter the robots.txt output. + * + * @since 3.0.0 + * + * @param string $output Robots.txt output. + * @param bool $public Whether the site is considered "public". + */ + echo apply_filters( 'robots_txt', $output, $public ); +} + +/** + * Test whether blog is already installed. + * + * The cache will be checked first. If you have a cache plugin, which saves the + * cache values, then this will work. If you use the default WordPress cache, + * and the database goes away, then you might have problems. + * + * Checks for the option siteurl for whether WordPress is installed. + * + * @since 2.1.0 + * @uses $wpdb + * + * @return bool Whether blog is already installed. + */ +function is_blog_installed() { + global $wpdb; + + // Check cache first. If options table goes away and we have true cached, oh well. + if ( wp_cache_get( 'is_blog_installed' ) ) + return true; + + $suppress = $wpdb->suppress_errors(); + if ( ! defined( 'WP_INSTALLING' ) ) { + $alloptions = wp_load_alloptions(); + } + // If siteurl is not set to autoload, check it specifically + if ( !isset( $alloptions['siteurl'] ) ) + $installed = $wpdb->get_var( "SELECT option_value FROM $wpdb->options WHERE option_name = 'siteurl'" ); + else + $installed = $alloptions['siteurl']; + $wpdb->suppress_errors( $suppress ); + + $installed = !empty( $installed ); + wp_cache_set( 'is_blog_installed', $installed ); + + if ( $installed ) + return true; + + // If visiting repair.php, return true and let it take over. + if ( defined( 'WP_REPAIRING' ) ) + return true; + + $suppress = $wpdb->suppress_errors(); + + // Loop over the WP tables. If none exist, then scratch install is allowed. + // If one or more exist, suggest table repair since we got here because the options + // table could not be accessed. + $wp_tables = $wpdb->tables(); + foreach ( $wp_tables as $table ) { + // The existence of custom user tables shouldn't suggest an insane state or prevent a clean install. + if ( defined( 'CUSTOM_USER_TABLE' ) && CUSTOM_USER_TABLE == $table ) + continue; + if ( defined( 'CUSTOM_USER_META_TABLE' ) && CUSTOM_USER_META_TABLE == $table ) + continue; + + if ( ! $wpdb->get_results( "DESCRIBE $table;" ) ) + continue; + + // One or more tables exist. We are insane. + + wp_load_translations_early(); + + // Die with a DB error. + $wpdb->error = sprintf( __( 'One or more database tables are unavailable. The database may need to be <a href="%s">repaired</a>.' ), 'maint/repair.php?referrer=is_blog_installed' ); + dead_db(); + } + + $wpdb->suppress_errors( $suppress ); + + wp_cache_set( 'is_blog_installed', false ); + + return false; +} + +/** + * Retrieve URL with nonce added to URL query. + * + * @since 2.0.4 + * + * @param string $actionurl URL to add nonce action. + * @param string $action Optional. Nonce action name. + * @param string $name Optional. Nonce name. + * @return string Escaped URL with nonce action added. + */ +function wp_nonce_url( $actionurl, $action = -1, $name = '_wpnonce' ) { + $actionurl = str_replace( '&', '&', $actionurl ); + return esc_html( add_query_arg( $name, wp_create_nonce( $action ), $actionurl ) ); +} + +/** + * Retrieve or display nonce hidden field for forms. + * + * The nonce field is used to validate that the contents of the form came from + * the location on the current site and not somewhere else. The nonce does not + * offer absolute protection, but should protect against most cases. It is very + * important to use nonce field in forms. + * + * The $action and $name are optional, but if you want to have better security, + * it is strongly suggested to set those two parameters. It is easier to just + * call the function without any parameters, because validation of the nonce + * doesn't require any parameters, but since crackers know what the default is + * it won't be difficult for them to find a way around your nonce and cause + * damage. + * + * The input name will be whatever $name value you gave. The input value will be + * the nonce creation value. + * + * @since 2.0.4 + * + * @param string $action Optional. Action name. + * @param string $name Optional. Nonce name. + * @param bool $referer Optional, default true. Whether to set the referer field for validation. + * @param bool $echo Optional, default true. Whether to display or return hidden form field. + * @return string Nonce field. + */ +function wp_nonce_field( $action = -1, $name = "_wpnonce", $referer = true , $echo = true ) { + $name = esc_attr( $name ); + $nonce_field = '<input type="hidden" id="' . $name . '" name="' . $name . '" value="' . wp_create_nonce( $action ) . '" />'; + + if ( $referer ) + $nonce_field .= wp_referer_field( false ); + + if ( $echo ) + echo $nonce_field; + + return $nonce_field; +} + +/** + * Retrieve or display referer hidden field for forms. + * + * The referer link is the current Request URI from the server super global. The + * input name is '_wp_http_referer', in case you wanted to check manually. + * + * @since 2.0.4 + * + * @param bool $echo Whether to echo or return the referer field. + * @return string Referer field. + */ +function wp_referer_field( $echo = true ) { + $referer_field = '<input type="hidden" name="_wp_http_referer" value="'. esc_attr( wp_unslash( $_SERVER['REQUEST_URI'] ) ) . '" />'; + + if ( $echo ) + echo $referer_field; + return $referer_field; +} + +/** + * Retrieve or display original referer hidden field for forms. + * + * The input name is '_wp_original_http_referer' and will be either the same + * value of {@link wp_referer_field()}, if that was posted already or it will + * be the current page, if it doesn't exist. + * + * @since 2.0.4 + * + * @param bool $echo Whether to echo the original http referer + * @param string $jump_back_to Optional, default is 'current'. Can be 'previous' or page you want to jump back to. + * @return string Original referer field. + */ +function wp_original_referer_field( $echo = true, $jump_back_to = 'current' ) { + if ( ! $ref = wp_get_original_referer() ) { + $ref = 'previous' == $jump_back_to ? wp_get_referer() : wp_unslash( $_SERVER['REQUEST_URI'] ); + } + $orig_referer_field = '<input type="hidden" name="_wp_original_http_referer" value="' . esc_attr( $ref ) . '" />'; + if ( $echo ) + echo $orig_referer_field; + return $orig_referer_field; +} + +/** + * Retrieve referer from '_wp_http_referer' or HTTP referer. If it's the same + * as the current request URL, will return false. + * + * @since 2.0.4 + * + * @return string|bool False on failure. Referer URL on success. + */ +function wp_get_referer() { + if ( ! function_exists( 'wp_validate_redirect' ) ) + return false; + $ref = false; + if ( ! empty( $_REQUEST['_wp_http_referer'] ) ) + $ref = wp_unslash( $_REQUEST['_wp_http_referer'] ); + else if ( ! empty( $_SERVER['HTTP_REFERER'] ) ) + $ref = wp_unslash( $_SERVER['HTTP_REFERER'] ); + + if ( $ref && $ref !== wp_unslash( $_SERVER['REQUEST_URI'] ) ) + return wp_validate_redirect( $ref, false ); + return false; +} + +/** + * Retrieve original referer that was posted, if it exists. + * + * @since 2.0.4 + * + * @return string|bool False if no original referer or original referer if set. + */ +function wp_get_original_referer() { + if ( ! empty( $_REQUEST['_wp_original_http_referer'] ) && function_exists( 'wp_validate_redirect' ) ) + return wp_validate_redirect( wp_unslash( $_REQUEST['_wp_original_http_referer'] ), false ); + return false; +} + +/** + * Recursive directory creation based on full path. + * + * Will attempt to set permissions on folders. + * + * @since 2.0.1 + * + * @param string $target Full path to attempt to create. + * @return bool Whether the path was created. True if path already exists. + */ +function wp_mkdir_p( $target ) { + $wrapper = null; + + // strip the protocol + if( wp_is_stream( $target ) ) { + list( $wrapper, $target ) = explode( '://', $target, 2 ); + } + + // from php.net/mkdir user contributed notes + $target = str_replace( '//', '/', $target ); + + // put the wrapper back on the target + if( $wrapper !== null ) { + $target = $wrapper . '://' . $target; + } + + // safe mode fails with a trailing slash under certain PHP versions. + $target = rtrim($target, '/'); // Use rtrim() instead of untrailingslashit to avoid formatting.php dependency. + if ( empty($target) ) + $target = '/'; + + if ( file_exists( $target ) ) + return @is_dir( $target ); + + // We need to find the permissions of the parent folder that exists and inherit that. + $target_parent = dirname( $target ); + while ( '.' != $target_parent && ! is_dir( $target_parent ) ) { + $target_parent = dirname( $target_parent ); + } + + // Get the permission bits. + $dir_perms = false; + if ( $stat = @stat( $target_parent ) ) { + $dir_perms = $stat['mode'] & 0007777; + } else { + $dir_perms = 0777; + } + + if ( @mkdir( $target, $dir_perms, true ) ) { + + // If a umask is set that modifies $dir_perms, we'll have to re-set the $dir_perms correctly with chmod() + if ( $dir_perms != ( $dir_perms & ~umask() ) ) { + $folder_parts = explode( '/', substr( $target, strlen( $target_parent ) + 1 ) ); + for ( $i = 1; $i <= count( $folder_parts ); $i++ ) { + @chmod( $target_parent . '/' . implode( '/', array_slice( $folder_parts, 0, $i ) ), $dir_perms ); + } + } + + return true; + } + + return false; +} + +/** + * Test if a give filesystem path is absolute ('/foo/bar', 'c:\windows'). + * + * @since 2.5.0 + * + * @param string $path File path + * @return bool True if path is absolute, false is not absolute. + */ +function path_is_absolute( $path ) { + // this is definitive if true but fails if $path does not exist or contains a symbolic link + if ( realpath($path) == $path ) + return true; + + if ( strlen($path) == 0 || $path[0] == '.' ) + return false; + + // windows allows absolute paths like this + if ( preg_match('#^[a-zA-Z]:\\\\#', $path) ) + return true; + + // a path starting with / or \ is absolute; anything else is relative + return ( $path[0] == '/' || $path[0] == '\\' ); +} + +/** + * Join two filesystem paths together (e.g. 'give me $path relative to $base'). + * + * If the $path is absolute, then it the full path is returned. + * + * @since 2.5.0 + * + * @param string $base + * @param string $path + * @return string The path with the base or absolute path. + */ +function path_join( $base, $path ) { + if ( path_is_absolute($path) ) + return $path; + + return rtrim($base, '/') . '/' . ltrim($path, '/'); +} + +/** + * Normalize a filesystem path. + * + * Replaces backslashes with forward slashes for Windows systems, + * and ensures no duplicate slashes exist. + * + * @since 3.9.0 + * + * @param string $path Path to normalize. + * @return string Normalized path. + */ +function wp_normalize_path( $path ) { + $path = str_replace( '\\', '/', $path ); + $path = preg_replace( '|/+|','/', $path ); + return $path; +} + +/** + * Determines a writable directory for temporary files. + * Function's preference is the return value of <code>sys_get_temp_dir()</code>, + * followed by your PHP temporary upload directory, followed by WP_CONTENT_DIR, + * before finally defaulting to /tmp/ + * + * In the event that this function does not find a writable location, + * It may be overridden by the <code>WP_TEMP_DIR</code> constant in + * your <code>wp-config.php</code> file. + * + * @since 2.5.0 + * + * @return string Writable temporary directory + */ +function get_temp_dir() { + static $temp; + if ( defined('WP_TEMP_DIR') ) + return trailingslashit(WP_TEMP_DIR); + + if ( $temp ) + return trailingslashit( $temp ); + + if ( function_exists('sys_get_temp_dir') ) { + $temp = sys_get_temp_dir(); + if ( @is_dir( $temp ) && wp_is_writable( $temp ) ) + return trailingslashit( $temp ); + } + + $temp = ini_get('upload_tmp_dir'); + if ( @is_dir( $temp ) && wp_is_writable( $temp ) ) + return trailingslashit( $temp ); + + $temp = WP_CONTENT_DIR . '/'; + if ( is_dir( $temp ) && wp_is_writable( $temp ) ) + return $temp; + + $temp = '/tmp/'; + return $temp; +} + +/** + * Determine if a directory is writable. + * + * This function is used to work around certain ACL issues + * in PHP primarily affecting Windows Servers. + * + * @see win_is_writable() + * + * @since 3.6.0 + * + * @param string $path + * @return bool + */ +function wp_is_writable( $path ) { + if ( 'WIN' === strtoupper( substr( PHP_OS, 0, 3 ) ) ) + return win_is_writable( $path ); + else + return @is_writable( $path ); +} + +/** + * Workaround for Windows bug in is_writable() function + * + * PHP has issues with Windows ACL's for determine if a + * directory is writable or not, this works around them by + * checking the ability to open files rather than relying + * upon PHP to interprate the OS ACL. + * + * @link http://bugs.php.net/bug.php?id=27609 + * @link http://bugs.php.net/bug.php?id=30931 + * + * @since 2.8.0 + * + * @param string $path + * @return bool + */ +function win_is_writable( $path ) { + + if ( $path[strlen( $path ) - 1] == '/' ) // if it looks like a directory, check a random file within the directory + return win_is_writable( $path . uniqid( mt_rand() ) . '.tmp'); + else if ( is_dir( $path ) ) // If it's a directory (and not a file) check a random file within the directory + return win_is_writable( $path . '/' . uniqid( mt_rand() ) . '.tmp' ); + + // check tmp file for read/write capabilities + $should_delete_tmp_file = !file_exists( $path ); + $f = @fopen( $path, 'a' ); + if ( $f === false ) + return false; + fclose( $f ); + if ( $should_delete_tmp_file ) + unlink( $path ); + return true; +} + +/** + * Get an array containing the current upload directory's path and url. + * + * Checks the 'upload_path' option, which should be from the web root folder, + * and if it isn't empty it will be used. If it is empty, then the path will be + * 'WP_CONTENT_DIR/uploads'. If the 'UPLOADS' constant is defined, then it will + * override the 'upload_path' option and 'WP_CONTENT_DIR/uploads' path. + * + * The upload URL path is set either by the 'upload_url_path' option or by using + * the 'WP_CONTENT_URL' constant and appending '/uploads' to the path. + * + * If the 'uploads_use_yearmonth_folders' is set to true (checkbox if checked in + * the administration settings panel), then the time will be used. The format + * will be year first and then month. + * + * If the path couldn't be created, then an error will be returned with the key + * 'error' containing the error message. The error suggests that the parent + * directory is not writable by the server. + * + * On success, the returned array will have many indices: + * 'path' - base directory and sub directory or full path to upload directory. + * 'url' - base url and sub directory or absolute URL to upload directory. + * 'subdir' - sub directory if uploads use year/month folders option is on. + * 'basedir' - path without subdir. + * 'baseurl' - URL path without subdir. + * 'error' - set to false. + * + * @since 2.0.0 + * + * @param string $time Optional. Time formatted in 'yyyy/mm'. + * @return array See above for description. + */ +function wp_upload_dir( $time = null ) { + $siteurl = get_option( 'siteurl' ); + $upload_path = trim( get_option( 'upload_path' ) ); + + if ( empty( $upload_path ) || 'wp-content/uploads' == $upload_path ) { + $dir = WP_CONTENT_DIR . '/uploads'; + } elseif ( 0 !== strpos( $upload_path, ABSPATH ) ) { + // $dir is absolute, $upload_path is (maybe) relative to ABSPATH + $dir = path_join( ABSPATH, $upload_path ); + } else { + $dir = $upload_path; + } + + if ( !$url = get_option( 'upload_url_path' ) ) { + if ( empty($upload_path) || ( 'wp-content/uploads' == $upload_path ) || ( $upload_path == $dir ) ) + $url = WP_CONTENT_URL . '/uploads'; + else + $url = trailingslashit( $siteurl ) . $upload_path; + } + + // Obey the value of UPLOADS. This happens as long as ms-files rewriting is disabled. + // We also sometimes obey UPLOADS when rewriting is enabled -- see the next block. + if ( defined( 'UPLOADS' ) && ! ( is_multisite() && get_site_option( 'ms_files_rewriting' ) ) ) { + $dir = ABSPATH . UPLOADS; + $url = trailingslashit( $siteurl ) . UPLOADS; + } + + // If multisite (and if not the main site in a post-MU network) + if ( is_multisite() && ! ( is_main_network() && is_main_site() && defined( 'MULTISITE' ) ) ) { + + if ( ! get_site_option( 'ms_files_rewriting' ) ) { + // If ms-files rewriting is disabled (networks created post-3.5), it is fairly straightforward: + // Append sites/%d if we're not on the main site (for post-MU networks). (The extra directory + // prevents a four-digit ID from conflicting with a year-based directory for the main site. + // But if a MU-era network has disabled ms-files rewriting manually, they don't need the extra + // directory, as they never had wp-content/uploads for the main site.) + + if ( defined( 'MULTISITE' ) ) + $ms_dir = '/sites/' . get_current_blog_id(); + else + $ms_dir = '/' . get_current_blog_id(); + + $dir .= $ms_dir; + $url .= $ms_dir; + + } elseif ( defined( 'UPLOADS' ) && ! ms_is_switched() ) { + // Handle the old-form ms-files.php rewriting if the network still has that enabled. + // When ms-files rewriting is enabled, then we only listen to UPLOADS when: + // 1) we are not on the main site in a post-MU network, + // as wp-content/uploads is used there, and + // 2) we are not switched, as ms_upload_constants() hardcodes + // these constants to reflect the original blog ID. + // + // Rather than UPLOADS, we actually use BLOGUPLOADDIR if it is set, as it is absolute. + // (And it will be set, see ms_upload_constants().) Otherwise, UPLOADS can be used, as + // as it is relative to ABSPATH. For the final piece: when UPLOADS is used with ms-files + // rewriting in multisite, the resulting URL is /files. (#WP22702 for background.) + + if ( defined( 'BLOGUPLOADDIR' ) ) + $dir = untrailingslashit( BLOGUPLOADDIR ); + else + $dir = ABSPATH . UPLOADS; + $url = trailingslashit( $siteurl ) . 'files'; + } + } + + $basedir = $dir; + $baseurl = $url; + + $subdir = ''; + if ( get_option( 'uploads_use_yearmonth_folders' ) ) { + // Generate the yearly and monthly dirs + if ( !$time ) + $time = current_time( 'mysql' ); + $y = substr( $time, 0, 4 ); + $m = substr( $time, 5, 2 ); + $subdir = "/$y/$m"; + } + + $dir .= $subdir; + $url .= $subdir; + + /** + * Filter the uploads directory data. + * + * @since 2.0.0 + * + * @param array $uploads Array of upload directory data with keys of 'path', + * 'url', 'subdir, 'basedir', and 'error'. + */ + $uploads = apply_filters( 'upload_dir', + array( + 'path' => $dir, + 'url' => $url, + 'subdir' => $subdir, + 'basedir' => $basedir, + 'baseurl' => $baseurl, + 'error' => false, + ) ); + + // Make sure we have an uploads dir + if ( ! wp_mkdir_p( $uploads['path'] ) ) { + if ( 0 === strpos( $uploads['basedir'], ABSPATH ) ) + $error_path = str_replace( ABSPATH, '', $uploads['basedir'] ) . $uploads['subdir']; + else + $error_path = basename( $uploads['basedir'] ) . $uploads['subdir']; + + $message = sprintf( __( 'Unable to create directory %s. Is its parent directory writable by the server?' ), $error_path ); + $uploads['error'] = $message; + } + + return $uploads; +} + +/** + * Get a filename that is sanitized and unique for the given directory. + * + * If the filename is not unique, then a number will be added to the filename + * before the extension, and will continue adding numbers until the filename is + * unique. + * + * The callback is passed three parameters, the first one is the directory, the + * second is the filename, and the third is the extension. + * + * @since 2.5.0 + * + * @param string $dir + * @param string $filename + * @param mixed $unique_filename_callback Callback. + * @return string New filename, if given wasn't unique. + */ +function wp_unique_filename( $dir, $filename, $unique_filename_callback = null ) { + // sanitize the file name before we begin processing + $filename = sanitize_file_name($filename); + + // separate the filename into a name and extension + $info = pathinfo($filename); + $ext = !empty($info['extension']) ? '.' . $info['extension'] : ''; + $name = basename($filename, $ext); + + // edge case: if file is named '.ext', treat as an empty name + if ( $name === $ext ) + $name = ''; + + // Increment the file number until we have a unique file to save in $dir. Use callback if supplied. + if ( $unique_filename_callback && is_callable( $unique_filename_callback ) ) { + $filename = call_user_func( $unique_filename_callback, $dir, $name, $ext ); + } else { + $number = ''; + + // change '.ext' to lower case + if ( $ext && strtolower($ext) != $ext ) { + $ext2 = strtolower($ext); + $filename2 = preg_replace( '|' . preg_quote($ext) . '$|', $ext2, $filename ); + + // check for both lower and upper case extension or image sub-sizes may be overwritten + while ( file_exists($dir . "/$filename") || file_exists($dir . "/$filename2") ) { + $new_number = $number + 1; + $filename = str_replace( "$number$ext", "$new_number$ext", $filename ); + $filename2 = str_replace( "$number$ext2", "$new_number$ext2", $filename2 ); + $number = $new_number; + } + return $filename2; + } + + while ( file_exists( $dir . "/$filename" ) ) { + if ( '' == "$number$ext" ) + $filename = $filename . ++$number . $ext; + else + $filename = str_replace( "$number$ext", ++$number . $ext, $filename ); + } + } + + return $filename; +} + +/** + * Create a file in the upload folder with given content. + * + * If there is an error, then the key 'error' will exist with the error message. + * If success, then the key 'file' will have the unique file path, the 'url' key + * will have the link to the new file. and the 'error' key will be set to false. + * + * This function will not move an uploaded file to the upload folder. It will + * create a new file with the content in $bits parameter. If you move the upload + * file, read the content of the uploaded file, and then you can give the + * filename and content to this function, which will add it to the upload + * folder. + * + * The permissions will be set on the new file automatically by this function. + * + * @since 2.0.0 + * + * @param string $name + * @param null $deprecated Never used. Set to null. + * @param mixed $bits File content + * @param string $time Optional. Time formatted in 'yyyy/mm'. + * @return array + */ +function wp_upload_bits( $name, $deprecated, $bits, $time = null ) { + if ( !empty( $deprecated ) ) + _deprecated_argument( __FUNCTION__, '2.0' ); + + if ( empty( $name ) ) + return array( 'error' => __( 'Empty filename' ) ); + + $wp_filetype = wp_check_filetype( $name ); + if ( ! $wp_filetype['ext'] && ! current_user_can( 'unfiltered_upload' ) ) + return array( 'error' => __( 'Invalid file type' ) ); + + $upload = wp_upload_dir( $time ); + + if ( $upload['error'] !== false ) + return $upload; + + /** + * Filter whether to treat the upload bits as an error. + * + * Passing a non-array to the filter will effectively short-circuit preparing + * the upload bits, returning that value instead. + * + * @since 3.0.0 + * + * @param mixed $upload_bits_error An array of upload bits data, or a non-array error to return. + */ + $upload_bits_error = apply_filters( 'wp_upload_bits', array( 'name' => $name, 'bits' => $bits, 'time' => $time ) ); + if ( !is_array( $upload_bits_error ) ) { + $upload[ 'error' ] = $upload_bits_error; + return $upload; + } + + $filename = wp_unique_filename( $upload['path'], $name ); + + $new_file = $upload['path'] . "/$filename"; + if ( ! wp_mkdir_p( dirname( $new_file ) ) ) { + if ( 0 === strpos( $upload['basedir'], ABSPATH ) ) + $error_path = str_replace( ABSPATH, '', $upload['basedir'] ) . $upload['subdir']; + else + $error_path = basename( $upload['basedir'] ) . $upload['subdir']; + + $message = sprintf( __( 'Unable to create directory %s. Is its parent directory writable by the server?' ), $error_path ); + return array( 'error' => $message ); + } + + $ifp = @ fopen( $new_file, 'wb' ); + if ( ! $ifp ) + return array( 'error' => sprintf( __( 'Could not write file %s' ), $new_file ) ); + + @fwrite( $ifp, $bits ); + fclose( $ifp ); + clearstatcache(); + + // Set correct file permissions + $stat = @ stat( dirname( $new_file ) ); + $perms = $stat['mode'] & 0007777; + $perms = $perms & 0000666; + @ chmod( $new_file, $perms ); + clearstatcache(); + + // Compute the URL + $url = $upload['url'] . "/$filename"; + + return array( 'file' => $new_file, 'url' => $url, 'error' => false ); +} + +/** + * Retrieve the file type based on the extension name. + * + * @since 2.5.0 + * + * @param string $ext The extension to search. + * @return string|null The file type, example: audio, video, document, spreadsheet, etc. + * Null if not found. + */ +function wp_ext2type( $ext ) { + $ext = strtolower( $ext ); + + /** + * Filter file type based on the extension name. + * + * @since 2.5.0 + * + * @see wp_ext2type() + * + * @param array $ext2type Multi-dimensional array with extensions for a default set + * of file types. + */ + $ext2type = apply_filters( 'ext2type', array( + 'image' => array( 'jpg', 'jpeg', 'jpe', 'gif', 'png', 'bmp', 'tif', 'tiff', 'ico' ), + 'audio' => array( 'aac', 'ac3', 'aif', 'aiff', 'm3a', 'm4a', 'm4b', 'mka', 'mp1', 'mp2', 'mp3', 'ogg', 'oga', 'ram', 'wav', 'wma' ), + 'video' => array( 'asf', 'avi', 'divx', 'dv', 'flv', 'm4v', 'mkv', 'mov', 'mp4', 'mpeg', 'mpg', 'mpv', 'ogm', 'ogv', 'qt', 'rm', 'vob', 'wmv' ), + 'document' => array( 'doc', 'docx', 'docm', 'dotm', 'odt', 'pages', 'pdf', 'rtf', 'wp', 'wpd' ), + 'spreadsheet' => array( 'numbers', 'ods', 'xls', 'xlsx', 'xlsm', 'xlsb' ), + 'interactive' => array( 'swf', 'key', 'ppt', 'pptx', 'pptm', 'pps', 'ppsx', 'ppsm', 'sldx', 'sldm', 'odp' ), + 'text' => array( 'asc', 'csv', 'tsv', 'txt' ), + 'archive' => array( 'bz2', 'cab', 'dmg', 'gz', 'rar', 'sea', 'sit', 'sqx', 'tar', 'tgz', 'zip', '7z' ), + 'code' => array( 'css', 'htm', 'html', 'php', 'js' ), + ) ); + + foreach ( $ext2type as $type => $exts ) + if ( in_array( $ext, $exts ) ) + return $type; + + return null; +} + +/** + * Retrieve the file type from the file name. + * + * You can optionally define the mime array, if needed. + * + * @since 2.0.4 + * + * @param string $filename File name or path. + * @param array $mimes Optional. Key is the file extension with value as the mime type. + * @return array Values with extension first and mime type. + */ +function wp_check_filetype( $filename, $mimes = null ) { + if ( empty($mimes) ) + $mimes = get_allowed_mime_types(); + $type = false; + $ext = false; + + foreach ( $mimes as $ext_preg => $mime_match ) { + $ext_preg = '!\.(' . $ext_preg . ')$!i'; + if ( preg_match( $ext_preg, $filename, $ext_matches ) ) { + $type = $mime_match; + $ext = $ext_matches[1]; + break; + } + } + + return compact( 'ext', 'type' ); +} + +/** + * Attempt to determine the real file type of a file. + * If unable to, the file name extension will be used to determine type. + * + * If it's determined that the extension does not match the file's real type, + * then the "proper_filename" value will be set with a proper filename and extension. + * + * Currently this function only supports validating images known to getimagesize(). + * + * @since 3.0.0 + * + * @param string $file Full path to the file. + * @param string $filename The name of the file (may differ from $file due to $file being in a tmp directory) + * @param array $mimes Optional. Key is the file extension with value as the mime type. + * @return array Values for the extension, MIME, and either a corrected filename or false if original $filename is valid + */ +function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) { + + $proper_filename = false; + + // Do basic extension validation and MIME mapping + $wp_filetype = wp_check_filetype( $filename, $mimes ); + extract( $wp_filetype ); + + // We can't do any further validation without a file to work with + if ( ! file_exists( $file ) ) + return compact( 'ext', 'type', 'proper_filename' ); + + // We're able to validate images using GD + if ( $type && 0 === strpos( $type, 'image/' ) && function_exists('getimagesize') ) { + + // Attempt to figure out what type of image it actually is + $imgstats = @getimagesize( $file ); + + // If getimagesize() knows what kind of image it really is and if the real MIME doesn't match the claimed MIME + if ( !empty($imgstats['mime']) && $imgstats['mime'] != $type ) { + /** + * Filter the list mapping image mime types to their respective extensions. + * + * @since 3.0.0 + * + * @param array $mime_to_ext Array of image mime types and their matching extensions. + */ + $mime_to_ext = apply_filters( 'getimagesize_mimes_to_exts', array( + 'image/jpeg' => 'jpg', + 'image/png' => 'png', + 'image/gif' => 'gif', + 'image/bmp' => 'bmp', + 'image/tiff' => 'tif', + ) ); + + // Replace whatever is after the last period in the filename with the correct extension + if ( ! empty( $mime_to_ext[ $imgstats['mime'] ] ) ) { + $filename_parts = explode( '.', $filename ); + array_pop( $filename_parts ); + $filename_parts[] = $mime_to_ext[ $imgstats['mime'] ]; + $new_filename = implode( '.', $filename_parts ); + + if ( $new_filename != $filename ) + $proper_filename = $new_filename; // Mark that it changed + + // Redefine the extension / MIME + $wp_filetype = wp_check_filetype( $new_filename, $mimes ); + extract( $wp_filetype ); + } + } + } + + /** + * Filter the "real" file type of the given file. + * + * @since 3.0.0 + * + * @param array $wp_check_filetype_and_ext File data array containing 'ext', 'type', and + * 'proper_filename' keys. + * @param string $file Full path to the file. + * @param string $filename The name of the file (may differ from $file due to + * $file being in a tmp directory). + * @param array $mimes Key is the file extension with value as the mime type. + */ + return apply_filters( 'wp_check_filetype_and_ext', compact( 'ext', 'type', 'proper_filename' ), $file, $filename, $mimes ); +} + +/** + * Retrieve list of mime types and file extensions. + * + * @since 3.5.0 + * + * @return array Array of mime types keyed by the file extension regex corresponding to those types. + */ +function wp_get_mime_types() { + /** + * Filter the list of mime types and file extensions. + * + * This filter should be used to add, not remove, mime types. To remove + * mime types, use the 'upload_mimes' filter. + * + * @since 3.5.0 + * + * @param array $wp_get_mime_types Mime types keyed by the file extension regex + * corresponding to those types. + */ + return apply_filters( 'mime_types', array( + // Image formats + 'jpg|jpeg|jpe' => 'image/jpeg', + 'gif' => 'image/gif', + 'png' => 'image/png', + 'bmp' => 'image/bmp', + 'tif|tiff' => 'image/tiff', + 'ico' => 'image/x-icon', + // Video formats + 'asf|asx' => 'video/x-ms-asf', + 'wmv' => 'video/x-ms-wmv', + 'wmx' => 'video/x-ms-wmx', + 'wm' => 'video/x-ms-wm', + 'avi' => 'video/avi', + 'divx' => 'video/divx', + 'flv' => 'video/x-flv', + 'mov|qt' => 'video/quicktime', + 'mpeg|mpg|mpe' => 'video/mpeg', + 'mp4|m4v' => 'video/mp4', + 'ogv' => 'video/ogg', + 'webm' => 'video/webm', + 'mkv' => 'video/x-matroska', + // Text formats + 'txt|asc|c|cc|h' => 'text/plain', + 'csv' => 'text/csv', + 'tsv' => 'text/tab-separated-values', + 'ics' => 'text/calendar', + 'rtx' => 'text/richtext', + 'css' => 'text/css', + 'htm|html' => 'text/html', + 'vtt' => 'text/vtt', + // Audio formats + 'mp3|m4a|m4b' => 'audio/mpeg', + 'ra|ram' => 'audio/x-realaudio', + 'wav' => 'audio/wav', + 'ogg|oga' => 'audio/ogg', + 'mid|midi' => 'audio/midi', + 'wma' => 'audio/x-ms-wma', + 'wax' => 'audio/x-ms-wax', + 'mka' => 'audio/x-matroska', + // Misc application formats + 'rtf' => 'application/rtf', + 'js' => 'application/javascript', + 'pdf' => 'application/pdf', + 'swf' => 'application/x-shockwave-flash', + 'class' => 'application/java', + 'tar' => 'application/x-tar', + 'zip' => 'application/zip', + 'gz|gzip' => 'application/x-gzip', + 'rar' => 'application/rar', + '7z' => 'application/x-7z-compressed', + 'exe' => 'application/x-msdownload', + // MS Office formats + 'doc' => 'application/msword', + 'pot|pps|ppt' => 'application/vnd.ms-powerpoint', + 'wri' => 'application/vnd.ms-write', + 'xla|xls|xlt|xlw' => 'application/vnd.ms-excel', + 'mdb' => 'application/vnd.ms-access', + 'mpp' => 'application/vnd.ms-project', + 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'docm' => 'application/vnd.ms-word.document.macroEnabled.12', + 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', + 'dotm' => 'application/vnd.ms-word.template.macroEnabled.12', + 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12', + 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12', + 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', + 'xltm' => 'application/vnd.ms-excel.template.macroEnabled.12', + 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12', + 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', + 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12', + 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', + 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12', + 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template', + 'potm' => 'application/vnd.ms-powerpoint.template.macroEnabled.12', + 'ppam' => 'application/vnd.ms-powerpoint.addin.macroEnabled.12', + 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide', + 'sldm' => 'application/vnd.ms-powerpoint.slide.macroEnabled.12', + 'onetoc|onetoc2|onetmp|onepkg' => 'application/onenote', + // OpenOffice formats + 'odt' => 'application/vnd.oasis.opendocument.text', + 'odp' => 'application/vnd.oasis.opendocument.presentation', + 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', + 'odg' => 'application/vnd.oasis.opendocument.graphics', + 'odc' => 'application/vnd.oasis.opendocument.chart', + 'odb' => 'application/vnd.oasis.opendocument.database', + 'odf' => 'application/vnd.oasis.opendocument.formula', + // WordPerfect formats + 'wp|wpd' => 'application/wordperfect', + // iWork formats + 'key' => 'application/vnd.apple.keynote', + 'numbers' => 'application/vnd.apple.numbers', + 'pages' => 'application/vnd.apple.pages', + ) ); +} +/** + * Retrieve list of allowed mime types and file extensions. + * + * @since 2.8.6 + * + * @uses wp_get_upload_mime_types() to fetch the list of mime types + * + * @param int|WP_User $user Optional. User to check. Defaults to current user. + * @return array Array of mime types keyed by the file extension regex corresponding to those types. + */ +function get_allowed_mime_types( $user = null ) { + $t = wp_get_mime_types(); + + unset( $t['swf'], $t['exe'] ); + if ( function_exists( 'current_user_can' ) ) + $unfiltered = $user ? user_can( $user, 'unfiltered_html' ) : current_user_can( 'unfiltered_html' ); + + if ( empty( $unfiltered ) ) + unset( $t['htm|html'] ); + + /** + * Filter list of allowed mime types and file extensions. + * + * @since 2.0.0 + * + * @param array $t Mime types keyed by the file extension regex corresponding to + * those types. 'swf' and 'exe' removed from full list. 'htm|html' also + * removed depending on '$user' capabilities. + * @param int|WP_User|null $user User ID, User object or null if not provided (indicates current user). + */ + return apply_filters( 'upload_mimes', $t, $user ); +} + +/** + * Display "Are You Sure" message to confirm the action being taken. + * + * If the action has the nonce explain message, then it will be displayed along + * with the "Are you sure?" message. + * + * @since 2.0.4 + * + * @param string $action The nonce action. + */ +function wp_nonce_ays( $action ) { + $title = __( 'WordPress Failure Notice' ); + if ( 'log-out' == $action ) { + $html = sprintf( __( 'You are attempting to log out of %s' ), get_bloginfo( 'name' ) ) . '</p><p>'; + $redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : ''; + $html .= sprintf( __( "Do you really want to <a href='%s'>log out</a>?"), wp_logout_url( $redirect_to ) ); + } else { + $html = __( 'Are you sure you want to do this?' ); + if ( wp_get_referer() ) + $html .= "</p><p><a href='" . esc_url( remove_query_arg( 'updated', wp_get_referer() ) ) . "'>" . __( 'Please try again.' ) . "</a>"; + } + + wp_die( $html, $title, array('response' => 403) ); +} + +/** + * Kill WordPress execution and display HTML message with error message. + * + * This function complements the die() PHP function. The difference is that + * HTML will be displayed to the user. It is recommended to use this function + * only, when the execution should not continue any further. It is not + * recommended to call this function very often and try to handle as many errors + * as possible silently. + * + * @since 2.0.4 + * + * @param string $message Error message. + * @param string $title Error title. + * @param string|array $args Optional arguments to control behavior. + */ +function wp_die( $message = '', $title = '', $args = array() ) { + if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) { + /** + * Filter callback for killing WordPress execution for AJAX requests. + * + * @since 3.4.0 + * + * @param callback $function Callback function name. + */ + $function = apply_filters( 'wp_die_ajax_handler', '_ajax_wp_die_handler' ); + } elseif ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST ) { + /** + * Filter callback for killing WordPress execution for XML-RPC requests. + * + * @since 3.4.0 + * + * @param callback $function Callback function name. + */ + $function = apply_filters( 'wp_die_xmlrpc_handler', '_xmlrpc_wp_die_handler' ); + } else { + /** + * Filter callback for killing WordPress execution for all non-AJAX, non-XML-RPC requests. + * + * @since 3.0.0 + * + * @param callback $function Callback function name. + */ + $function = apply_filters( 'wp_die_handler', '_default_wp_die_handler' ); + } + + call_user_func( $function, $message, $title, $args ); +} + +/** + * Kill WordPress execution and display HTML message with error message. + * + * This is the default handler for wp_die if you want a custom one for your + * site then you can overload using the wp_die_handler filter in wp_die + * + * @since 3.0.0 + * @access private + * + * @param string $message Error message. + * @param string $title Error title. + * @param string|array $args Optional arguments to control behavior. + */ +function _default_wp_die_handler( $message, $title = '', $args = array() ) { + $defaults = array( 'response' => 500 ); + $r = wp_parse_args($args, $defaults); + + $have_gettext = function_exists('__'); + + if ( function_exists( 'is_wp_error' ) && is_wp_error( $message ) ) { + if ( empty( $title ) ) { + $error_data = $message->get_error_data(); + if ( is_array( $error_data ) && isset( $error_data['title'] ) ) + $title = $error_data['title']; + } + $errors = $message->get_error_messages(); + switch ( count( $errors ) ) : + case 0 : + $message = ''; + break; + case 1 : + $message = "<p>{$errors[0]}</p>"; + break; + default : + $message = "<ul>\n\t\t<li>" . join( "</li>\n\t\t<li>", $errors ) . "</li>\n\t</ul>"; + break; + endswitch; + } elseif ( is_string( $message ) ) { + $message = "<p>$message</p>"; + } + + if ( isset( $r['back_link'] ) && $r['back_link'] ) { + $back_text = $have_gettext? __('« Back') : '« Back'; + $message .= "\n<p><a href='javascript:history.back()'>$back_text</a></p>"; + } + + if ( ! did_action( 'admin_head' ) ) : + if ( !headers_sent() ) { + status_header( $r['response'] ); + nocache_headers(); + header( 'Content-Type: text/html; charset=utf-8' ); + } + + if ( empty($title) ) + $title = $have_gettext ? __('WordPress › Error') : 'WordPress › Error'; + + $text_direction = 'ltr'; + if ( isset($r['text_direction']) && 'rtl' == $r['text_direction'] ) + $text_direction = 'rtl'; + elseif ( function_exists( 'is_rtl' ) && is_rtl() ) + $text_direction = 'rtl'; +?> +<!DOCTYPE html> +<!-- Ticket #11289, IE bug fix: always pad the error page with enough characters such that it is greater than 512 bytes, even after gzip compression abcdefghijklmnopqrstuvwxyz1234567890aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz11223344556677889900abacbcbdcdcededfefegfgfhghgihihjijikjkjlklkmlmlnmnmononpopoqpqprqrqsrsrtstsubcbcdcdedefefgfabcadefbghicjkldmnoepqrfstugvwxhyz1i234j567k890laabmbccnddeoeffpgghqhiirjjksklltmmnunoovppqwqrrxsstytuuzvvw0wxx1yyz2z113223434455666777889890091abc2def3ghi4jkl5mno6pqr7stu8vwx9yz11aab2bcc3dd4ee5ff6gg7hh8ii9j0jk1kl2lmm3nnoo4p5pq6qrr7ss8tt9uuvv0wwx1x2yyzz13aba4cbcb5dcdc6dedfef8egf9gfh0ghg1ihi2hji3jik4jkj5lkl6kml7mln8mnm9ono +--> +<html xmlns="http://www.w3.org/1999/xhtml" <?php if ( function_exists( 'language_attributes' ) && function_exists( 'is_rtl' ) ) language_attributes(); else echo "dir='$text_direction'"; ?>> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <title><?php echo $title ?> + + + + + + + + 500 ); + + $r = wp_parse_args($args, $defaults); + + if ( $wp_xmlrpc_server ) { + $error = new IXR_Error( $r['response'] , $message); + $wp_xmlrpc_server->output( $error->getXml() ); + } + die(); +} + +/** + * Kill WordPress ajax execution. + * + * This is the handler for wp_die when processing Ajax requests. + * + * @since 3.4.0 + * @access private + * + * @param string $message Optional. Response to print. + */ +function _ajax_wp_die_handler( $message = '' ) { + if ( is_scalar( $message ) ) + die( (string) $message ); + die( '0' ); +} + +/** + * Kill WordPress execution. + * + * This is the handler for wp_die when processing APP requests. + * + * @since 3.4.0 + * @access private + * + * @param string $message Optional. Response to print. + */ +function _scalar_wp_die_handler( $message = '' ) { + if ( is_scalar( $message ) ) + die( (string) $message ); + die(); +} + +/** + * Send a JSON response back to an Ajax request. + * + * @since 3.5.0 + * + * @param mixed $response Variable (usually an array or object) to encode as JSON, then print and die. + */ +function wp_send_json( $response ) { + @header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) ); + echo json_encode( $response ); + if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) + wp_die(); + else + die; +} + +/** + * Send a JSON response back to an Ajax request, indicating success. + * + * @since 3.5.0 + * + * @param mixed $data Data to encode as JSON, then print and die. + */ +function wp_send_json_success( $data = null ) { + $response = array( 'success' => true ); + + if ( isset( $data ) ) + $response['data'] = $data; + + wp_send_json( $response ); +} + +/** + * Send a JSON response back to an Ajax request, indicating failure. + * + * @since 3.5.0 + * + * @param mixed $data Data to encode as JSON, then print and die. + */ +function wp_send_json_error( $data = null ) { + $response = array( 'success' => false ); + + if ( isset( $data ) ) + $response['data'] = $data; + + wp_send_json( $response ); +} + +/** + * Retrieve the WordPress home page URL. + * + * If the constant named 'WP_HOME' exists, then it will be used and returned by + * the function. This can be used to counter the redirection on your local + * development environment. + * + * @access private + * @since 2.2.0 + * + * @param string $url URL for the home location + * @return string Homepage location. + */ +function _config_wp_home( $url = '' ) { + if ( defined( 'WP_HOME' ) ) + return untrailingslashit( WP_HOME ); + return $url; +} + +/** + * Retrieve the WordPress site URL. + * + * If the constant named 'WP_SITEURL' is defined, then the value in that + * constant will always be returned. This can be used for debugging a site on + * your localhost while not having to change the database to your URL. + * + * @access private + * @since 2.2.0 + * + * @param string $url URL to set the WordPress site location. + * @return string The WordPress Site URL + */ +function _config_wp_siteurl( $url = '' ) { + if ( defined( 'WP_SITEURL' ) ) + return untrailingslashit( WP_SITEURL ); + return $url; +} + +/** + * Set the localized direction for MCE plugin. + * + * Will only set the direction to 'rtl', if the WordPress locale has the text + * direction set to 'rtl'. + * + * Fills in the 'directionality' setting, enables the 'directionality' plugin, + * and adds the 'ltr' button to 'toolbar1', formerly 'theme_advanced_buttons1' array + * keys. These keys are then returned in the $input (TinyMCE settings) array. + * + * @access private + * @since 2.1.0 + * + * @param array $input MCE settings array. + * @return array Direction set for 'rtl', if needed by locale. + */ +function _mce_set_direction( $input ) { + if ( is_rtl() ) { + $input['directionality'] = 'rtl'; + $input['plugins'] .= ',directionality'; + $input['toolbar1'] .= ',ltr'; + } + + return $input; +} + + +/** + * Convert smiley code to the icon graphic file equivalent. + * + * You can turn off smilies, by going to the write setting screen and unchecking + * the box, or by setting 'use_smilies' option to false or removing the option. + * + * Plugins may override the default smiley list by setting the $wpsmiliestrans + * to an array, with the key the code the blogger types in and the value the + * image file. + * + * The $wp_smiliessearch global is for the regular expression and is set each + * time the function is called. + * + * The full list of smilies can be found in the function and won't be listed in + * the description. Probably should create a Codex page for it, so that it is + * available. + * + * @global array $wpsmiliestrans + * @global array $wp_smiliessearch + * @since 2.2.0 + */ +function smilies_init() { + global $wpsmiliestrans, $wp_smiliessearch; + + // don't bother setting up smilies if they are disabled + if ( !get_option( 'use_smilies' ) ) + return; + + if ( !isset( $wpsmiliestrans ) ) { + $wpsmiliestrans = array( + ':mrgreen:' => 'icon_mrgreen.gif', + ':neutral:' => 'icon_neutral.gif', + ':twisted:' => 'icon_twisted.gif', + ':arrow:' => 'icon_arrow.gif', + ':shock:' => 'icon_eek.gif', + ':smile:' => 'icon_smile.gif', + ':???:' => 'icon_confused.gif', + ':cool:' => 'icon_cool.gif', + ':evil:' => 'icon_evil.gif', + ':grin:' => 'icon_biggrin.gif', + ':idea:' => 'icon_idea.gif', + ':oops:' => 'icon_redface.gif', + ':razz:' => 'icon_razz.gif', + ':roll:' => 'icon_rolleyes.gif', + ':wink:' => 'icon_wink.gif', + ':cry:' => 'icon_cry.gif', + ':eek:' => 'icon_surprised.gif', + ':lol:' => 'icon_lol.gif', + ':mad:' => 'icon_mad.gif', + ':sad:' => 'icon_sad.gif', + '8-)' => 'icon_cool.gif', + '8-O' => 'icon_eek.gif', + ':-(' => 'icon_sad.gif', + ':-)' => 'icon_smile.gif', + ':-?' => 'icon_confused.gif', + ':-D' => 'icon_biggrin.gif', + ':-P' => 'icon_razz.gif', + ':-o' => 'icon_surprised.gif', + ':-x' => 'icon_mad.gif', + ':-|' => 'icon_neutral.gif', + ';-)' => 'icon_wink.gif', + // This one transformation breaks regular text with frequency. + // '8)' => 'icon_cool.gif', + '8O' => 'icon_eek.gif', + ':(' => 'icon_sad.gif', + ':)' => 'icon_smile.gif', + ':?' => 'icon_confused.gif', + ':D' => 'icon_biggrin.gif', + ':P' => 'icon_razz.gif', + ':o' => 'icon_surprised.gif', + ':x' => 'icon_mad.gif', + ':|' => 'icon_neutral.gif', + ';)' => 'icon_wink.gif', + ':!:' => 'icon_exclaim.gif', + ':?:' => 'icon_question.gif', + ); + } + + if (count($wpsmiliestrans) == 0) { + return; + } + + /* + * NOTE: we sort the smilies in reverse key order. This is to make sure + * we match the longest possible smilie (:???: vs :?) as the regular + * expression used below is first-match + */ + krsort($wpsmiliestrans); + + $wp_smiliessearch = '/((?:\s|^)'; + + $subchar = ''; + foreach ( (array) $wpsmiliestrans as $smiley => $img ) { + $firstchar = substr($smiley, 0, 1); + $rest = substr($smiley, 1); + + // new subpattern? + if ($firstchar != $subchar) { + if ($subchar != '') { + $wp_smiliessearch .= ')(?=\s|$))|((?:\s|^)'; ; + } + $subchar = $firstchar; + $wp_smiliessearch .= preg_quote($firstchar, '/') . '(?:'; + } else { + $wp_smiliessearch .= '|'; + } + $wp_smiliessearch .= preg_quote($rest, '/'); + } + + $wp_smiliessearch .= ')(?=\s|$))/m'; + +} + +/** + * Merge user defined arguments into defaults array. + * + * This function is used throughout WordPress to allow for both string or array + * to be merged into another array. + * + * @since 2.2.0 + * + * @param string|array $args Value to merge with $defaults + * @param array $defaults Array that serves as the defaults. + * @return array Merged user defined values with defaults. + */ +function wp_parse_args( $args, $defaults = '' ) { + if ( is_object( $args ) ) + $r = get_object_vars( $args ); + elseif ( is_array( $args ) ) + $r =& $args; + else + wp_parse_str( $args, $r ); + + if ( is_array( $defaults ) ) + return array_merge( $defaults, $r ); + return $r; +} + +/** + * Clean up an array, comma- or space-separated list of IDs. + * + * @since 3.0.0 + * + * @param array|string $list + * @return array Sanitized array of IDs + */ +function wp_parse_id_list( $list ) { + if ( !is_array($list) ) + $list = preg_split('/[\s,]+/', $list); + + return array_unique(array_map('absint', $list)); +} + +/** + * Extract a slice of an array, given a list of keys. + * + * @since 3.1.0 + * + * @param array $array The original array + * @param array $keys The list of keys + * @return array The array slice + */ +function wp_array_slice_assoc( $array, $keys ) { + $slice = array(); + foreach ( $keys as $key ) + if ( isset( $array[ $key ] ) ) + $slice[ $key ] = $array[ $key ]; + + return $slice; +} + +/** + * Filters a list of objects, based on a set of key => value arguments. + * + * @since 3.0.0 + * + * @param array $list An array of objects to filter + * @param array $args An array of key => value arguments to match against each object + * @param string $operator The logical operation to perform. 'or' means only one element + * from the array needs to match; 'and' means all elements must match. The default is 'and'. + * @param bool|string $field A field from the object to place instead of the entire object + * @return array A list of objects or object fields + */ +function wp_filter_object_list( $list, $args = array(), $operator = 'and', $field = false ) { + if ( ! is_array( $list ) ) + return array(); + + $list = wp_list_filter( $list, $args, $operator ); + + if ( $field ) + $list = wp_list_pluck( $list, $field ); + + return $list; +} + +/** + * Filters a list of objects, based on a set of key => value arguments. + * + * @since 3.1.0 + * + * @param array $list An array of objects to filter + * @param array $args An array of key => value arguments to match against each object + * @param string $operator The logical operation to perform: + * 'AND' means all elements from the array must match; + * 'OR' means only one element needs to match; + * 'NOT' means no elements may match. + * The default is 'AND'. + * @return array + */ +function wp_list_filter( $list, $args = array(), $operator = 'AND' ) { + if ( ! is_array( $list ) ) + return array(); + + if ( empty( $args ) ) + return $list; + + $operator = strtoupper( $operator ); + $count = count( $args ); + $filtered = array(); + + foreach ( $list as $key => $obj ) { + $to_match = (array) $obj; + + $matched = 0; + foreach ( $args as $m_key => $m_value ) { + if ( array_key_exists( $m_key, $to_match ) && $m_value == $to_match[ $m_key ] ) + $matched++; + } + + if ( ( 'AND' == $operator && $matched == $count ) + || ( 'OR' == $operator && $matched > 0 ) + || ( 'NOT' == $operator && 0 == $matched ) ) { + $filtered[$key] = $obj; + } + } + + return $filtered; +} + +/** + * Pluck a certain field out of each object in a list. + * + * @since 3.1.0 + * + * @param array $list A list of objects or arrays + * @param int|string $field A field from the object to place instead of the entire object + * @return array + */ +function wp_list_pluck( $list, $field ) { + foreach ( $list as $key => $value ) { + if ( is_object( $value ) ) + $list[ $key ] = $value->$field; + else + $list[ $key ] = $value[ $field ]; + } + + return $list; +} + +/** + * Determines if Widgets library should be loaded. + * + * Checks to make sure that the widgets library hasn't already been loaded. If + * it hasn't, then it will load the widgets library and run an action hook. + * + * @since 2.2.0 + * @uses add_action() Calls '_admin_menu' hook with 'wp_widgets_add_menu' value. + */ +function wp_maybe_load_widgets() { + /** + * Filter whether to load the Widgets library. + * + * @since 2.8.0 + * + * @param bool $wp_maybe_load_widgets Whether to load the Widgets library. + * Default true. + */ + if ( ! apply_filters( 'load_default_widgets', true ) ) { + return; + } + require_once( ABSPATH . WPINC . '/default-widgets.php' ); + add_action( '_admin_menu', 'wp_widgets_add_menu' ); +} + +/** + * Append the Widgets menu to the themes main menu. + * + * @since 2.2.0 + * @uses $submenu The administration submenu list. + */ +function wp_widgets_add_menu() { + global $submenu; + + if ( ! current_theme_supports( 'widgets' ) ) + return; + + $submenu['themes.php'][7] = array( __( 'Widgets' ), 'edit_theme_options', 'widgets.php' ); + ksort( $submenu['themes.php'], SORT_NUMERIC ); +} + +/** + * Flush all output buffers for PHP 5.2. + * + * Make sure all output buffers are flushed before our singletons our destroyed. + * + * @since 2.2.0 + */ +function wp_ob_end_flush_all() { + $levels = ob_get_level(); + for ($i=0; $i<$levels; $i++) + ob_end_flush(); +} + +/** + * Load custom DB error or display WordPress DB error. + * + * If a file exists in the wp-content directory named db-error.php, then it will + * be loaded instead of displaying the WordPress DB error. If it is not found, + * then the WordPress DB error will be displayed instead. + * + * The WordPress DB error sets the HTTP status header to 500 to try to prevent + * search engines from caching the message. Custom DB messages should do the + * same. + * + * This function was backported to WordPress 2.3.2, but originally was added + * in WordPress 2.5.0. + * + * @since 2.3.2 + * @uses $wpdb + */ +function dead_db() { + global $wpdb; + + wp_load_translations_early(); + + // Load custom DB error template, if present. + if ( file_exists( WP_CONTENT_DIR . '/db-error.php' ) ) { + require_once( WP_CONTENT_DIR . '/db-error.php' ); + die(); + } + + // If installing or in the admin, provide the verbose message. + if ( defined('WP_INSTALLING') || defined('WP_ADMIN') ) + wp_die($wpdb->error); + + // Otherwise, be terse. + status_header( 500 ); + nocache_headers(); + header( 'Content-Type: text/html; charset=utf-8' ); +?> + +> + + + <?php _e( 'Database Error' ); ?> + + + +

            + + +deprecated since version %2$s! Use %3$s instead.'), $function, $version, $replacement ) ); + else + trigger_error( sprintf( __('%1$s is deprecated since version %2$s with no alternative available.'), $function, $version ) ); + } else { + if ( ! is_null( $replacement ) ) + trigger_error( sprintf( '%1$s is deprecated since version %2$s! Use %3$s instead.', $function, $version, $replacement ) ); + else + trigger_error( sprintf( '%1$s is deprecated since version %2$s with no alternative available.', $function, $version ) ); + } + } +} + +/** + * Marks a file as deprecated and informs when it has been used. + * + * There is a hook deprecated_file_included that will be called that can be used + * to get the backtrace up to what file and function included the deprecated + * file. + * + * The current behavior is to trigger a user error if WP_DEBUG is true. + * + * This function is to be used in every file that is deprecated. + * + * @since 2.5.0 + * @access private + * + * @param string $file The file that was included + * @param string $version The version of WordPress that deprecated the file + * @param string $replacement Optional. The file that should have been included based on ABSPATH + * @param string $message Optional. A message regarding the change + */ +function _deprecated_file( $file, $version, $replacement = null, $message = '' ) { + + /** + * Fires when a deprecated file is called. + * + * @since 2.5.0 + * + * @param string $file The file that was called. + * @param string $replacement The file that should have been included based on ABSPATH. + * @param string $version The version of WordPress that deprecated the file. + * @param string $message A message regarding the change. + */ + do_action( 'deprecated_file_included', $file, $replacement, $version, $message ); + + /** + * Filter whether to trigger an error for deprecated files. + * + * @since 2.5.0 + * + * @param bool $trigger Whether to trigger the error for deprecated files. Default true. + */ + if ( WP_DEBUG && apply_filters( 'deprecated_file_trigger_error', true ) ) { + $message = empty( $message ) ? '' : ' ' . $message; + if ( function_exists( '__' ) ) { + if ( ! is_null( $replacement ) ) + trigger_error( sprintf( __('%1$s is deprecated since version %2$s! Use %3$s instead.'), $file, $version, $replacement ) . $message ); + else + trigger_error( sprintf( __('%1$s is deprecated since version %2$s with no alternative available.'), $file, $version ) . $message ); + } else { + if ( ! is_null( $replacement ) ) + trigger_error( sprintf( '%1$s is deprecated since version %2$s! Use %3$s instead.', $file, $version, $replacement ) . $message ); + else + trigger_error( sprintf( '%1$s is deprecated since version %2$s with no alternative available.', $file, $version ) . $message ); + } + } +} +/** + * Marks a function argument as deprecated and informs when it has been used. + * + * This function is to be used whenever a deprecated function argument is used. + * Before this function is called, the argument must be checked for whether it was + * used by comparing it to its default value or evaluating whether it is empty. + * For example: + * + * if ( !empty($deprecated) ) + * _deprecated_argument( __FUNCTION__, '3.0' ); + * + * + * There is a hook deprecated_argument_run that will be called that can be used + * to get the backtrace up to what file and function used the deprecated + * argument. + * + * The current behavior is to trigger a user error if WP_DEBUG is true. + * + * @since 3.0.0 + * @access private + * + * @param string $function The function that was called + * @param string $version The version of WordPress that deprecated the argument used + * @param string $message Optional. A message regarding the change. + */ +function _deprecated_argument( $function, $version, $message = null ) { + + /** + * Fires when a deprecated argument is called. + * + * @since 3.0.0 + * + * @param string $function The function that was called. + * @param string $message A message regarding the change. + * @param string $version The version of WordPress that deprecated the argument used. + */ + do_action( 'deprecated_argument_run', $function, $message, $version ); + + /** + * Filter whether to trigger an error for deprecated arguments. + * + * @since 3.0.0 + * + * @param bool $trigger Whether to trigger the error for deprecated arguments. Default true. + */ + if ( WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) { + if ( function_exists( '__' ) ) { + if ( ! is_null( $message ) ) + trigger_error( sprintf( __('%1$s was called with an argument that is deprecated since version %2$s! %3$s'), $function, $version, $message ) ); + else + trigger_error( sprintf( __('%1$s was called with an argument that is deprecated since version %2$s with no alternative available.'), $function, $version ) ); + } else { + if ( ! is_null( $message ) ) + trigger_error( sprintf( '%1$s was called with an argument that is deprecated since version %2$s! %3$s', $function, $version, $message ) ); + else + trigger_error( sprintf( '%1$s was called with an argument that is deprecated since version %2$s with no alternative available.', $function, $version ) ); + } + } +} + +/** + * Marks something as being incorrectly called. + * + * There is a hook doing_it_wrong_run that will be called that can be used + * to get the backtrace up to what file and function called the deprecated + * function. + * + * The current behavior is to trigger a user error if WP_DEBUG is true. + * + * @since 3.1.0 + * @access private + * + * @param string $function The function that was called. + * @param string $message A message explaining what has been done incorrectly. + * @param string $version The version of WordPress where the message was added. + */ +function _doing_it_wrong( $function, $message, $version ) { + + /** + * Fires when the given function is being used incorrectly. + * + * @since 3.1.0 + * + * @param string $function The function that was called. + * @param string $message A message explaining what has been done incorrectly. + * @param string $version The version of WordPress where the message was added. + */ + do_action( 'doing_it_wrong_run', $function, $message, $version ); + + /** + * Filter whether to trigger an error for _doing_it_wrong() calls. + * + * @since 3.1.0 + * + * @param bool $trigger Whether to trigger the error for _doing_it_wrong() calls. Default true. + */ + if ( WP_DEBUG && apply_filters( 'doing_it_wrong_trigger_error', true ) ) { + if ( function_exists( '__' ) ) { + $version = is_null( $version ) ? '' : sprintf( __( '(This message was added in version %s.)' ), $version ); + $message .= ' ' . __( 'Please see Debugging in WordPress for more information.' ); + trigger_error( sprintf( __( '%1$s was called incorrectly. %2$s %3$s' ), $function, $message, $version ) ); + } else { + $version = is_null( $version ) ? '' : sprintf( '(This message was added in version %s.)', $version ); + $message .= ' Please see Debugging in WordPress for more information.'; + trigger_error( sprintf( '%1$s was called incorrectly. %2$s %3$s', $function, $message, $version ) ); + } + } +} + +/** + * Is the server running earlier than 1.5.0 version of lighttpd? + * + * @since 2.5.0 + * + * @return bool Whether the server is running lighttpd < 1.5.0 + */ +function is_lighttpd_before_150() { + $server_parts = explode( '/', isset( $_SERVER['SERVER_SOFTWARE'] )? $_SERVER['SERVER_SOFTWARE'] : '' ); + $server_parts[1] = isset( $server_parts[1] )? $server_parts[1] : ''; + return 'lighttpd' == $server_parts[0] && -1 == version_compare( $server_parts[1], '1.5.0' ); +} + +/** + * Does the specified module exist in the Apache config? + * + * @since 2.5.0 + * + * @param string $mod e.g. mod_rewrite + * @param bool $default The default return value if the module is not found + * @return bool + */ +function apache_mod_loaded($mod, $default = false) { + global $is_apache; + + if ( !$is_apache ) + return false; + + if ( function_exists('apache_get_modules') ) { + $mods = apache_get_modules(); + if ( in_array($mod, $mods) ) + return true; + } elseif ( function_exists('phpinfo') ) { + ob_start(); + phpinfo(8); + $phpinfo = ob_get_clean(); + if ( false !== strpos($phpinfo, $mod) ) + return true; + } + return $default; +} + +/** + * Check if IIS 7+ supports pretty permalinks. + * + * @since 2.8.0 + * + * @return bool + */ +function iis7_supports_permalinks() { + global $is_iis7; + + $supports_permalinks = false; + if ( $is_iis7 ) { + /* First we check if the DOMDocument class exists. If it does not exist, then we cannot + * easily update the xml configuration file, hence we just bail out and tell user that + * pretty permalinks cannot be used. + * + * Next we check if the URL Rewrite Module 1.1 is loaded and enabled for the web site. When + * URL Rewrite 1.1 is loaded it always sets a server variable called 'IIS_UrlRewriteModule'. + * Lastly we make sure that PHP is running via FastCGI. This is important because if it runs + * via ISAPI then pretty permalinks will not work. + */ + $supports_permalinks = class_exists('DOMDocument') && isset($_SERVER['IIS_UrlRewriteModule']) && ( php_sapi_name() == 'cgi-fcgi' ); + } + + /** + * Filter whether IIS 7+ supports pretty permalinks. + * + * @since 2.8.0 + * + * @param bool $supports_permalinks Whether IIS7 supports permalinks. Default false. + */ + return apply_filters( 'iis7_supports_permalinks', $supports_permalinks ); +} + +/** + * File validates against allowed set of defined rules. + * + * A return value of '1' means that the $file contains either '..' or './'. A + * return value of '2' means that the $file contains ':' after the first + * character. A return value of '3' means that the file is not in the allowed + * files list. + * + * @since 1.2.0 + * + * @param string $file File path. + * @param array $allowed_files List of allowed files. + * @return int 0 means nothing is wrong, greater than 0 means something was wrong. + */ +function validate_file( $file, $allowed_files = '' ) { + if ( false !== strpos( $file, '..' ) ) + return 1; + + if ( false !== strpos( $file, './' ) ) + return 1; + + if ( ! empty( $allowed_files ) && ! in_array( $file, $allowed_files ) ) + return 3; + + if (':' == substr( $file, 1, 1 ) ) + return 2; + + return 0; +} + +/** + * Determine if SSL is used. + * + * @since 2.6.0 + * + * @return bool True if SSL, false if not used. + */ +function is_ssl() { + if ( isset($_SERVER['HTTPS']) ) { + if ( 'on' == strtolower($_SERVER['HTTPS']) ) + return true; + if ( '1' == $_SERVER['HTTPS'] ) + return true; + } elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) { + return true; + } + return false; +} + +/** + * Whether SSL login should be forced. + * + * @since 2.6.0 + * + * @param string|bool $force Optional. + * @return bool True if forced, false if not forced. + */ +function force_ssl_login( $force = null ) { + static $forced = false; + + if ( !is_null( $force ) ) { + $old_forced = $forced; + $forced = $force; + return $old_forced; + } + + return $forced; +} + +/** + * Whether to force SSL used for the Administration Screens. + * + * @since 2.6.0 + * + * @param string|bool $force + * @return bool True if forced, false if not forced. + */ +function force_ssl_admin( $force = null ) { + static $forced = false; + + if ( !is_null( $force ) ) { + $old_forced = $forced; + $forced = $force; + return $old_forced; + } + + return $forced; +} + +/** + * Guess the URL for the site. + * + * Will remove wp-admin links to retrieve only return URLs not in the wp-admin + * directory. + * + * @since 2.6.0 + * + * @return string + */ +function wp_guess_url() { + if ( defined('WP_SITEURL') && '' != WP_SITEURL ) { + $url = WP_SITEURL; + } else { + $abspath_fix = str_replace( '\\', '/', ABSPATH ); + $script_filename_dir = dirname( $_SERVER['SCRIPT_FILENAME'] ); + + // The request is for the admin + if ( strpos( $_SERVER['REQUEST_URI'], 'wp-admin' ) !== false || strpos( $_SERVER['REQUEST_URI'], 'wp-login.php' ) !== false ) { + $path = preg_replace( '#/(wp-admin/.*|wp-login.php)#i', '', $_SERVER['REQUEST_URI'] ); + + // The request is for a file in ABSPATH + } elseif ( $script_filename_dir . '/' == $abspath_fix ) { + // Strip off any file/query params in the path + $path = preg_replace( '#/[^/]*$#i', '', $_SERVER['PHP_SELF'] ); + + } else { + if ( false !== strpos( $_SERVER['SCRIPT_FILENAME'], $abspath_fix ) ) { + // Request is hitting a file inside ABSPATH + $directory = str_replace( ABSPATH, '', $script_filename_dir ); + // Strip off the sub directory, and any file/query paramss + $path = preg_replace( '#/' . preg_quote( $directory, '#' ) . '/[^/]*$#i', '' , $_SERVER['REQUEST_URI'] ); + } elseif ( false !== strpos( $abspath_fix, $script_filename_dir ) ) { + // Request is hitting a file above ABSPATH + $subdirectory = substr( $abspath_fix, strpos( $abspath_fix, $script_filename_dir ) + strlen( $script_filename_dir ) ); + // Strip off any file/query params from the path, appending the sub directory to the install + $path = preg_replace( '#/[^/]*$#i', '' , $_SERVER['REQUEST_URI'] ) . $subdirectory; + } else { + $path = $_SERVER['REQUEST_URI']; + } + } + + $schema = is_ssl() ? 'https://' : 'http://'; // set_url_scheme() is not defined yet + $url = $schema . $_SERVER['HTTP_HOST'] . $path; + } + + return rtrim($url, '/'); +} + +/** + * Temporarily suspend cache additions. + * + * Stops more data being added to the cache, but still allows cache retrieval. + * This is useful for actions, such as imports, when a lot of data would otherwise + * be almost uselessly added to the cache. + * + * Suspension lasts for a single page load at most. Remember to call this + * function again if you wish to re-enable cache adds earlier. + * + * @since 3.3.0 + * + * @param bool $suspend Optional. Suspends additions if true, re-enables them if false. + * @return bool The current suspend setting + */ +function wp_suspend_cache_addition( $suspend = null ) { + static $_suspend = false; + + if ( is_bool( $suspend ) ) + $_suspend = $suspend; + + return $_suspend; +} + +/** + * Suspend cache invalidation. + * + * Turns cache invalidation on and off. Useful during imports where you don't wont to do invalidations + * every time a post is inserted. Callers must be sure that what they are doing won't lead to an inconsistent + * cache when invalidation is suspended. + * + * @since 2.7.0 + * + * @param bool $suspend Whether to suspend or enable cache invalidation + * @return bool The current suspend setting + */ +function wp_suspend_cache_invalidation($suspend = true) { + global $_wp_suspend_cache_invalidation; + + $current_suspend = $_wp_suspend_cache_invalidation; + $_wp_suspend_cache_invalidation = $suspend; + return $current_suspend; +} + +/** + * Whether a site is the main site of the current network. + * + * @since 3.0.0 + * + * @param int $site_id Optional. Site ID to test. Defaults to current site. + * @return bool True if $site_id is the main site of the network, or if not running multisite. + */ +function is_main_site( $site_id = null ) { + // This is the current network's information; 'site' is old terminology. + global $current_site; + + if ( ! is_multisite() ) + return true; + + if ( ! $site_id ) + $site_id = get_current_blog_id(); + + return (int) $site_id === (int) $current_site->blog_id; +} + +/** + * Whether a network is the main network of the multisite install. + * + * @since 3.7.0 + * + * @param int $network_id Optional. Network ID to test. Defaults to current network. + * @return bool True if $network_id is the main network, or if not running multisite. + */ +function is_main_network( $network_id = null ) { + global $wpdb; + + if ( ! is_multisite() ) + return true; + + $current_network_id = (int) get_current_site()->id; + + if ( ! $network_id ) + $network_id = $current_network_id; + $network_id = (int) $network_id; + + if ( defined( 'PRIMARY_NETWORK_ID' ) ) + return $network_id === (int) PRIMARY_NETWORK_ID; + + if ( 1 === $current_network_id ) + return $network_id === $current_network_id; + + $primary_network_id = (int) wp_cache_get( 'primary_network_id', 'site-options' ); + + if ( $primary_network_id ) + return $network_id === $primary_network_id; + + $primary_network_id = (int) $wpdb->get_var( "SELECT id FROM $wpdb->site ORDER BY id LIMIT 1" ); + wp_cache_add( 'primary_network_id', $primary_network_id, 'site-options' ); + + return $network_id === $primary_network_id; +} + +/** + * Whether global terms are enabled. + * + * + * @since 3.0.0 + * + * @return bool True if multisite and global terms enabled + */ +function global_terms_enabled() { + if ( ! is_multisite() ) + return false; + + static $global_terms = null; + if ( is_null( $global_terms ) ) { + + /** + * Filter whether global terms are enabled. + * + * Passing a non-null value to the filter will effectively short-circuit the function, + * returning the value of the 'global_terms_enabled' site option instead. + * + * @since 3.0.0 + * + * @param null $anbled Whether global terms are enabled. + */ + $filter = apply_filters( 'global_terms_enabled', null ); + if ( ! is_null( $filter ) ) + $global_terms = (bool) $filter; + else + $global_terms = (bool) get_site_option( 'global_terms_enabled', false ); + } + return $global_terms; +} + +/** + * gmt_offset modification for smart timezone handling. + * + * Overrides the gmt_offset option if we have a timezone_string available. + * + * @since 2.8.0 + * + * @return float|bool + */ +function wp_timezone_override_offset() { + if ( !$timezone_string = get_option( 'timezone_string' ) ) { + return false; + } + + $timezone_object = timezone_open( $timezone_string ); + $datetime_object = date_create(); + if ( false === $timezone_object || false === $datetime_object ) { + return false; + } + return round( timezone_offset_get( $timezone_object, $datetime_object ) / HOUR_IN_SECONDS, 2 ); +} + +/** + * Sort-helper for timezones. + * + * @since 2.9.0 + * + * @param array $a + * @param array $b + * @return int + */ +function _wp_timezone_choice_usort_callback( $a, $b ) { + // Don't use translated versions of Etc + if ( 'Etc' === $a['continent'] && 'Etc' === $b['continent'] ) { + // Make the order of these more like the old dropdown + if ( 'GMT+' === substr( $a['city'], 0, 4 ) && 'GMT+' === substr( $b['city'], 0, 4 ) ) { + return -1 * ( strnatcasecmp( $a['city'], $b['city'] ) ); + } + if ( 'UTC' === $a['city'] ) { + if ( 'GMT+' === substr( $b['city'], 0, 4 ) ) { + return 1; + } + return -1; + } + if ( 'UTC' === $b['city'] ) { + if ( 'GMT+' === substr( $a['city'], 0, 4 ) ) { + return -1; + } + return 1; + } + return strnatcasecmp( $a['city'], $b['city'] ); + } + if ( $a['t_continent'] == $b['t_continent'] ) { + if ( $a['t_city'] == $b['t_city'] ) { + return strnatcasecmp( $a['t_subcity'], $b['t_subcity'] ); + } + return strnatcasecmp( $a['t_city'], $b['t_city'] ); + } else { + // Force Etc to the bottom of the list + if ( 'Etc' === $a['continent'] ) { + return 1; + } + if ( 'Etc' === $b['continent'] ) { + return -1; + } + return strnatcasecmp( $a['t_continent'], $b['t_continent'] ); + } +} + +/** + * Gives a nicely formatted list of timezone strings. + * + * @since 2.9.0 + * + * @param string $selected_zone Selected Zone + * @return string + */ +function wp_timezone_choice( $selected_zone ) { + static $mo_loaded = false; + + $continents = array( 'Africa', 'America', 'Antarctica', 'Arctic', 'Asia', 'Atlantic', 'Australia', 'Europe', 'Indian', 'Pacific'); + + // Load translations for continents and cities + if ( !$mo_loaded ) { + $locale = get_locale(); + $mofile = WP_LANG_DIR . '/continents-cities-' . $locale . '.mo'; + load_textdomain( 'continents-cities', $mofile ); + $mo_loaded = true; + } + + $zonen = array(); + foreach ( timezone_identifiers_list() as $zone ) { + $zone = explode( '/', $zone ); + if ( !in_array( $zone[0], $continents ) ) { + continue; + } + + // This determines what gets set and translated - we don't translate Etc/* strings here, they are done later + $exists = array( + 0 => ( isset( $zone[0] ) && $zone[0] ), + 1 => ( isset( $zone[1] ) && $zone[1] ), + 2 => ( isset( $zone[2] ) && $zone[2] ), + ); + $exists[3] = ( $exists[0] && 'Etc' !== $zone[0] ); + $exists[4] = ( $exists[1] && $exists[3] ); + $exists[5] = ( $exists[2] && $exists[3] ); + + $zonen[] = array( + 'continent' => ( $exists[0] ? $zone[0] : '' ), + 'city' => ( $exists[1] ? $zone[1] : '' ), + 'subcity' => ( $exists[2] ? $zone[2] : '' ), + 't_continent' => ( $exists[3] ? translate( str_replace( '_', ' ', $zone[0] ), 'continents-cities' ) : '' ), + 't_city' => ( $exists[4] ? translate( str_replace( '_', ' ', $zone[1] ), 'continents-cities' ) : '' ), + 't_subcity' => ( $exists[5] ? translate( str_replace( '_', ' ', $zone[2] ), 'continents-cities' ) : '' ) + ); + } + usort( $zonen, '_wp_timezone_choice_usort_callback' ); + + $structure = array(); + + if ( empty( $selected_zone ) ) { + $structure[] = ''; + } + + foreach ( $zonen as $key => $zone ) { + // Build value in an array to join later + $value = array( $zone['continent'] ); + + if ( empty( $zone['city'] ) ) { + // It's at the continent level (generally won't happen) + $display = $zone['t_continent']; + } else { + // It's inside a continent group + + // Continent optgroup + if ( !isset( $zonen[$key - 1] ) || $zonen[$key - 1]['continent'] !== $zone['continent'] ) { + $label = $zone['t_continent']; + $structure[] = ''; + } + + // Add the city to the value + $value[] = $zone['city']; + + $display = $zone['t_city']; + if ( !empty( $zone['subcity'] ) ) { + // Add the subcity to the value + $value[] = $zone['subcity']; + $display .= ' - ' . $zone['t_subcity']; + } + } + + // Build the value + $value = join( '/', $value ); + $selected = ''; + if ( $value === $selected_zone ) { + $selected = 'selected="selected" '; + } + $structure[] = '"; + + // Close continent optgroup + if ( !empty( $zone['city'] ) && ( !isset($zonen[$key + 1]) || (isset( $zonen[$key + 1] ) && $zonen[$key + 1]['continent'] !== $zone['continent']) ) ) { + $structure[] = ''; + } + } + + // Do UTC + $structure[] = ''; + $selected = ''; + if ( 'UTC' === $selected_zone ) + $selected = 'selected="selected" '; + $structure[] = ''; + $structure[] = ''; + + // Do manual UTC offsets + $structure[] = ''; + $offset_range = array (-12, -11.5, -11, -10.5, -10, -9.5, -9, -8.5, -8, -7.5, -7, -6.5, -6, -5.5, -5, -4.5, -4, -3.5, -3, -2.5, -2, -1.5, -1, -0.5, + 0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 5.75, 6, 6.5, 7, 7.5, 8, 8.5, 8.75, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.75, 13, 13.75, 14); + foreach ( $offset_range as $offset ) { + if ( 0 <= $offset ) + $offset_name = '+' . $offset; + else + $offset_name = (string) $offset; + + $offset_value = $offset_name; + $offset_name = str_replace(array('.25','.5','.75'), array(':15',':30',':45'), $offset_name); + $offset_name = 'UTC' . $offset_name; + $offset_value = 'UTC' . $offset_value; + $selected = ''; + if ( $offset_value === $selected_zone ) + $selected = 'selected="selected" '; + $structure[] = '"; + + } + $structure[] = ''; + + return join( "\n", $structure ); +} + +/** + * Strip close comment and close php tags from file headers used by WP. + * See http://core.trac.wordpress.org/ticket/8497 + * + * @since 2.8.0 + * + * @param string $str + * @return string + */ +function _cleanup_header_comment($str) { + return trim(preg_replace("/\s*(?:\*\/|\?>).*/", '', $str)); +} + +/** + * Permanently deletes posts, pages, attachments, and comments which have been in the trash for EMPTY_TRASH_DAYS. + * + * @since 2.9.0 + */ +function wp_scheduled_delete() { + global $wpdb; + + $delete_timestamp = time() - ( DAY_IN_SECONDS * EMPTY_TRASH_DAYS ); + + $posts_to_delete = $wpdb->get_results($wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_wp_trash_meta_time' AND meta_value < '%d'", $delete_timestamp), ARRAY_A); + + foreach ( (array) $posts_to_delete as $post ) { + $post_id = (int) $post['post_id']; + if ( !$post_id ) + continue; + + $del_post = get_post($post_id); + + if ( !$del_post || 'trash' != $del_post->post_status ) { + delete_post_meta($post_id, '_wp_trash_meta_status'); + delete_post_meta($post_id, '_wp_trash_meta_time'); + } else { + wp_delete_post($post_id); + } + } + + $comments_to_delete = $wpdb->get_results($wpdb->prepare("SELECT comment_id FROM $wpdb->commentmeta WHERE meta_key = '_wp_trash_meta_time' AND meta_value < '%d'", $delete_timestamp), ARRAY_A); + + foreach ( (array) $comments_to_delete as $comment ) { + $comment_id = (int) $comment['comment_id']; + if ( !$comment_id ) + continue; + + $del_comment = get_comment($comment_id); + + if ( !$del_comment || 'trash' != $del_comment->comment_approved ) { + delete_comment_meta($comment_id, '_wp_trash_meta_time'); + delete_comment_meta($comment_id, '_wp_trash_meta_status'); + } else { + wp_delete_comment($comment_id); + } + } +} + +/** + * Retrieve metadata from a file. + * + * Searches for metadata in the first 8kiB of a file, such as a plugin or theme. + * Each piece of metadata must be on its own line. Fields can not span multiple + * lines, the value will get cut at the end of the first line. + * + * If the file data is not within that first 8kiB, then the author should correct + * their plugin file and move the data headers to the top. + * + * @see http://codex.wordpress.org/File_Header + * + * @since 2.9.0 + * @param string $file Path to the file + * @param array $default_headers List of headers, in the format array('HeaderKey' => 'Header Name') + * @param string $context If specified adds filter hook "extra_{$context}_headers" + */ +function get_file_data( $file, $default_headers, $context = '' ) { + // We don't need to write to the file, so just open for reading. + $fp = fopen( $file, 'r' ); + + // Pull only the first 8kiB of the file in. + $file_data = fread( $fp, 8192 ); + + // PHP will close file handle, but we are good citizens. + fclose( $fp ); + + // Make sure we catch CR-only line endings. + $file_data = str_replace( "\r", "\n", $file_data ); + + /** + * Filter extra file headers by context. + * + * The dynamic portion of the hook name, $context, refers to the context + * where extra headers might be loaded. + * + * @since 2.9.0 + * + * @param array $extra_context_headers Empty array by default. + */ + if ( $context && $extra_headers = apply_filters( "extra_{$context}_headers", array() ) ) { + $extra_headers = array_combine( $extra_headers, $extra_headers ); // keys equal values + $all_headers = array_merge( $extra_headers, (array) $default_headers ); + } else { + $all_headers = $default_headers; + } + + foreach ( $all_headers as $field => $regex ) { + if ( preg_match( '/^[ \t\/*#@]*' . preg_quote( $regex, '/' ) . ':(.*)$/mi', $file_data, $match ) && $match[1] ) + $all_headers[ $field ] = _cleanup_header_comment( $match[1] ); + else + $all_headers[ $field ] = ''; + } + + return $all_headers; +} + +/** + * Returns true. + * + * Useful for returning true to filters easily. + * + * @since 3.0.0 + * @see __return_false() + * @return bool true + */ +function __return_true() { + return true; +} + +/** + * Returns false. + * + * Useful for returning false to filters easily. + * + * @since 3.0.0 + * @see __return_true() + * @return bool false + */ +function __return_false() { + return false; +} + +/** + * Returns 0. + * + * Useful for returning 0 to filters easily. + * + * @since 3.0.0 + * @return int 0 + */ +function __return_zero() { + return 0; +} + +/** + * Returns an empty array. + * + * Useful for returning an empty array to filters easily. + * + * @since 3.0.0 + * @return array Empty array + */ +function __return_empty_array() { + return array(); +} + +/** + * Returns null. + * + * Useful for returning null to filters easily. + * + * @since 3.4.0 + * @return null + */ +function __return_null() { + return null; +} + +/** + * Returns an empty string. + * + * Useful for returning an empty string to filters easily. + * + * @since 3.7.0 + * @see __return_null() + * @return string Empty string + */ +function __return_empty_string() { + return ''; +} + +/** + * Send a HTTP header to disable content type sniffing in browsers which support it. + * + * @link http://blogs.msdn.com/ie/archive/2008/07/02/ie8-security-part-v-comprehensive-protection.aspx + * @link http://src.chromium.org/viewvc/chrome?view=rev&revision=6985 + * + * @since 3.0.0 + * @return none + */ +function send_nosniff_header() { + @header( 'X-Content-Type-Options: nosniff' ); +} + +/** + * Returns a MySQL expression for selecting the week number based on the start_of_week option. + * + * @internal + * @since 3.0.0 + * @param string $column + * @return string + */ +function _wp_mysql_week( $column ) { + switch ( $start_of_week = (int) get_option( 'start_of_week' ) ) { + default : + case 0 : + return "WEEK( $column, 0 )"; + case 1 : + return "WEEK( $column, 1 )"; + case 2 : + case 3 : + case 4 : + case 5 : + case 6 : + return "WEEK( DATE_SUB( $column, INTERVAL $start_of_week DAY ), 0 )"; + } +} + +/** + * Finds hierarchy loops using a callback function that maps object IDs to parent IDs. + * + * @since 3.1.0 + * @access private + * + * @param callback $callback function that accepts ( ID, $callback_args ) and outputs parent_ID + * @param int $start The ID to start the loop check at + * @param int $start_parent the parent_ID of $start to use instead of calling $callback( $start ). Use null to always use $callback + * @param array $callback_args optional additional arguments to send to $callback + * @return array IDs of all members of loop + */ +function wp_find_hierarchy_loop( $callback, $start, $start_parent, $callback_args = array() ) { + $override = is_null( $start_parent ) ? array() : array( $start => $start_parent ); + + if ( !$arbitrary_loop_member = wp_find_hierarchy_loop_tortoise_hare( $callback, $start, $override, $callback_args ) ) + return array(); + + return wp_find_hierarchy_loop_tortoise_hare( $callback, $arbitrary_loop_member, $override, $callback_args, true ); +} + +/** + * Uses the "The Tortoise and the Hare" algorithm to detect loops. + * + * For every step of the algorithm, the hare takes two steps and the tortoise one. + * If the hare ever laps the tortoise, there must be a loop. + * + * @since 3.1.0 + * @access private + * + * @param callback $callback function that accepts ( ID, callback_arg, ... ) and outputs parent_ID + * @param int $start The ID to start the loop check at + * @param array $override an array of ( ID => parent_ID, ... ) to use instead of $callback + * @param array $callback_args optional additional arguments to send to $callback + * @param bool $_return_loop Return loop members or just detect presence of loop? + * Only set to true if you already know the given $start is part of a loop + * (otherwise the returned array might include branches) + * @return mixed scalar ID of some arbitrary member of the loop, or array of IDs of all members of loop if $_return_loop + */ +function wp_find_hierarchy_loop_tortoise_hare( $callback, $start, $override = array(), $callback_args = array(), $_return_loop = false ) { + $tortoise = $hare = $evanescent_hare = $start; + $return = array(); + + // Set evanescent_hare to one past hare + // Increment hare two steps + while ( + $tortoise + && + ( $evanescent_hare = isset( $override[$hare] ) ? $override[$hare] : call_user_func_array( $callback, array_merge( array( $hare ), $callback_args ) ) ) + && + ( $hare = isset( $override[$evanescent_hare] ) ? $override[$evanescent_hare] : call_user_func_array( $callback, array_merge( array( $evanescent_hare ), $callback_args ) ) ) + ) { + if ( $_return_loop ) + $return[$tortoise] = $return[$evanescent_hare] = $return[$hare] = true; + + // tortoise got lapped - must be a loop + if ( $tortoise == $evanescent_hare || $tortoise == $hare ) + return $_return_loop ? $return : $tortoise; + + // Increment tortoise by one step + $tortoise = isset( $override[$tortoise] ) ? $override[$tortoise] : call_user_func_array( $callback, array_merge( array( $tortoise ), $callback_args ) ); + } + + return false; +} + +/** + * Send a HTTP header to limit rendering of pages to same origin iframes. + * + * @link https://developer.mozilla.org/en/the_x-frame-options_response_header + * + * @since 3.1.3 + * @return none + */ +function send_frame_options_header() { + @header( 'X-Frame-Options: SAMEORIGIN' ); +} + +/** + * Retrieve a list of protocols to allow in HTML attributes. + * + * @since 3.3.0 + * @see wp_kses() + * @see esc_url() + * + * @return array Array of allowed protocols + */ +function wp_allowed_protocols() { + static $protocols; + + if ( empty( $protocols ) ) { + $protocols = array( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp' ); + + /** + * Filter the list of protocols allowed in HTML attributes. + * + * @since 3.0.0 + * + * @param array $protocols Array of allowed protocols e.g. 'http', 'ftp', 'tel', and more. + */ + $protocols = apply_filters( 'kses_allowed_protocols', $protocols ); + } + + return $protocols; +} + +/** + * Return a comma separated string of functions that have been called to get to the current point in code. + * + * @link http://core.trac.wordpress.org/ticket/19589 + * @since 3.4.0 + * + * @param string $ignore_class A class to ignore all function calls within - useful when you want to just give info about the callee + * @param int $skip_frames A number of stack frames to skip - useful for unwinding back to the source of the issue + * @param bool $pretty Whether or not you want a comma separated string or raw array returned + * @return string|array Either a string containing a reversed comma separated trace or an array of individual calls. + */ +function wp_debug_backtrace_summary( $ignore_class = null, $skip_frames = 0, $pretty = true ) { + if ( version_compare( PHP_VERSION, '5.2.5', '>=' ) ) + $trace = debug_backtrace( false ); + else + $trace = debug_backtrace(); + + $caller = array(); + $check_class = ! is_null( $ignore_class ); + $skip_frames++; // skip this function + + foreach ( $trace as $call ) { + if ( $skip_frames > 0 ) { + $skip_frames--; + } elseif ( isset( $call['class'] ) ) { + if ( $check_class && $ignore_class == $call['class'] ) + continue; // Filter out calls + + $caller[] = "{$call['class']}{$call['type']}{$call['function']}"; + } else { + if ( in_array( $call['function'], array( 'do_action', 'apply_filters' ) ) ) { + $caller[] = "{$call['function']}('{$call['args'][0]}')"; + } elseif ( in_array( $call['function'], array( 'include', 'include_once', 'require', 'require_once' ) ) ) { + $caller[] = $call['function'] . "('" . str_replace( array( WP_CONTENT_DIR, ABSPATH ) , '', $call['args'][0] ) . "')"; + } else { + $caller[] = $call['function']; + } + } + } + if ( $pretty ) + return join( ', ', array_reverse( $caller ) ); + else + return $caller; +} + +/** + * Retrieve ids that are not already present in the cache + * + * @since 3.4.0 + * + * @param array $object_ids ID list + * @param string $cache_key The cache bucket to check against + * + * @return array + */ +function _get_non_cached_ids( $object_ids, $cache_key ) { + $clean = array(); + foreach ( $object_ids as $id ) { + $id = (int) $id; + if ( !wp_cache_get( $id, $cache_key ) ) { + $clean[] = $id; + } + } + + return $clean; +} + +/** + * Test if the current device has the capability to upload files. + * + * @since 3.4.0 + * @access private + * + * @return bool true|false + */ +function _device_can_upload() { + if ( ! wp_is_mobile() ) + return true; + + $ua = $_SERVER['HTTP_USER_AGENT']; + + if ( strpos($ua, 'iPhone') !== false + || strpos($ua, 'iPad') !== false + || strpos($ua, 'iPod') !== false ) { + return preg_match( '#OS ([\d_]+) like Mac OS X#', $ua, $version ) && version_compare( $version[1], '6', '>=' ); + } + + return true; +} + +/** + * Test if a given path is a stream URL + * + * @param string $path The resource path or URL + * @return bool True if the path is a stream URL + */ +function wp_is_stream( $path ) { + $wrappers = stream_get_wrappers(); + $wrappers_re = '(' . join('|', $wrappers) . ')'; + + return preg_match( "!^$wrappers_re://!", $path ) === 1; +} + +/** + * Test if the supplied date is valid for the Gregorian calendar + * + * @since 3.5.0 + * + * @return bool true|false + */ +function wp_checkdate( $month, $day, $year, $source_date ) { + /** + * Filter whether the given date is valid for the Gregorian calendar. + * + * @since 3.5.0 + * + * @param bool $checkdate Whether the given date is valid. + * @param string $source_date Date to check. + */ + return apply_filters( 'wp_checkdate', checkdate( $month, $day, $year ), $source_date ); +} + +/** + * Load the auth check for monitoring whether the user is still logged in. + * + * Can be disabled with remove_action( 'admin_enqueue_scripts', 'wp_auth_check_load' ); + * + * This is disabled for certain screens where a login screen could cause an + * inconvenient interruption. A filter called wp_auth_check_load can be used + * for fine-grained control. + * + * @since 3.6.0 + */ +function wp_auth_check_load() { + if ( ! is_admin() && ! is_user_logged_in() ) + return; + + if ( defined( 'IFRAME_REQUEST' ) ) + return; + + $screen = get_current_screen(); + $hidden = array( 'update', 'update-network', 'update-core', 'update-core-network', 'upgrade', 'upgrade-network', 'network' ); + $show = ! in_array( $screen->id, $hidden ); + + /** + * Filter whether to load the authentication check. + * + * @since 3.6.0 + * + * @param bool $show Whether to load the authentication check. + * @param WP_Screen $screen The current screen object. + */ + if ( apply_filters( 'wp_auth_check_load', $show, $screen ) ) { + wp_enqueue_style( 'wp-auth-check' ); + wp_enqueue_script( 'wp-auth-check' ); + + add_action( 'admin_print_footer_scripts', 'wp_auth_check_html', 5 ); + add_action( 'wp_print_footer_scripts', 'wp_auth_check_html', 5 ); + } +} + +/** + * Output the HTML that shows the wp-login dialog when the user is no longer logged in. + * + * @since 3.6.0 + */ +function wp_auth_check_html() { + $login_url = wp_login_url(); + $current_domain = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST']; + $same_domain = ( strpos( $login_url, $current_domain ) === 0 ); + + if ( $same_domain && force_ssl_login() && ! force_ssl_admin() ) + $same_domain = false; + + /** + * Filter whether the authentication check originated at the same domain. + * + * @since 3.6.0 + * + * @param bool $same_domain Whether the authentication check originated at the same domain. + */ + $same_domain = apply_filters( 'wp_auth_check_same_domain', $same_domain ); + $wrap_class = $same_domain ? 'hidden' : 'hidden fallback'; + + ?> +
            +
            +
            +
            + +
            + +
            +

            +

            +

            +
            +
            +
            + [\s\S]*<\/%1$s>|\s*\/>)', tag_escape( $tag ) ); +} + +/** + * Return a canonical form of the provided charset appropriate for passing to PHP + * functions such as htmlspecialchars() and charset html attributes. + * + * @link http://core.trac.wordpress.org/ticket/23688 + * @since 3.6.0 + * + * @param string A charset name + * @return string The canonical form of the charset + */ +function _canonical_charset( $charset ) { + if ( 'UTF-8' === $charset || 'utf-8' === $charset || 'utf8' === $charset || + 'UTF8' === $charset ) + return 'UTF-8'; + + if ( 'ISO-8859-1' === $charset || 'iso-8859-1' === $charset || + 'iso8859-1' === $charset || 'ISO8859-1' === $charset ) + return 'ISO-8859-1'; + + return $charset; +} + +/** + * Sets the mbstring internal encoding to a binary safe encoding whne func_overload is enabled. + * + * When mbstring.func_overload is in use for multi-byte encodings, the results from strlen() and + * similar functions respect the utf8 characters, causing binary data to return incorrect lengths. + * + * This function overrides the mbstring encoding to a binary-safe encoding, and resets it to the + * users expected encoding afterwards through the `reset_mbstring_encoding` function. + * + * It is safe to recursively call this function, however each `mbstring_binary_safe_encoding()` + * call must be followed up with an equal number of `reset_mbstring_encoding()` calls. + * + * @see reset_mbstring_encoding() + * + * @since 3.7.0 + * + * @param bool $reset Whether to reset the encoding back to a previously-set encoding. + */ +function mbstring_binary_safe_encoding( $reset = false ) { + static $encodings = array(); + static $overloaded = null; + + if ( is_null( $overloaded ) ) + $overloaded = function_exists( 'mb_internal_encoding' ) && ( ini_get( 'mbstring.func_overload' ) & 2 ); + + if ( false === $overloaded ) + return; + + if ( ! $reset ) { + $encoding = mb_internal_encoding(); + array_push( $encodings, $encoding ); + mb_internal_encoding( 'ISO-8859-1' ); + } + + if ( $reset && $encodings ) { + $encoding = array_pop( $encodings ); + mb_internal_encoding( $encoding ); + } +} + +/** + * Resets the mbstring internal encoding to a users previously set encoding. + * + * @see mbstring_binary_safe_encoding() + * + * @since 3.7.0 + */ +function reset_mbstring_encoding() { + mbstring_binary_safe_encoding( true ); +} diff --git a/wp-includes/functions.wp-scripts.php b/wp-includes/functions.wp-scripts.php new file mode 100644 index 0000000..ea719df --- /dev/null +++ b/wp-includes/functions.wp-scripts.php @@ -0,0 +1,258 @@ +wp_enqueue_scripts', 'admin_enqueue_scripts', 'login_enqueue_scripts' ), '3.3' ); + + if ( !$handles ) + return array(); // No need to instantiate if nothing is there. + else + $wp_scripts = new WP_Scripts(); + } + + return $wp_scripts->do_items( $handles ); +} + +/** + * Register a new script. + * + * Registers a script to be linked later using the wp_enqueue_script() function. + * + * @see WP_Dependencies::add(), WP_Dependencies::add_data() + * @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts. + * + * @since 2.6.0 + * + * @param string $handle Name of the script. Should be unique. + * @param string $src Path to the script from the WordPress root directory. Example: '/js/myscript.js'. + * @param array $deps Optional. An array of registered script handles this script depends on. Set to false if there + * are no dependencies. Default empty array. + * @param string|bool $ver Optional. String specifying script version number, if it has one, which is concatenated + * to end of path as a query string. If no version is specified or set to false, a version + * number is automatically added equal to current installed WordPress version. + * If set to null, no version is added. Default 'false'. Accepts 'false', 'null', or 'string'. + * @param bool $in_footer Optional. Whether to enqueue the script before or before . + * Default 'false'. Accepts 'false' or 'true'. + */ +function wp_register_script( $handle, $src, $deps = array(), $ver = false, $in_footer = false ) { + global $wp_scripts; + if ( ! is_a( $wp_scripts, 'WP_Scripts' ) ) { + if ( ! did_action( 'init' ) ) + _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ), + 'wp_enqueue_scripts', 'admin_enqueue_scripts', 'login_enqueue_scripts' ), '3.3' ); + $wp_scripts = new WP_Scripts(); + } + + $wp_scripts->add( $handle, $src, $deps, $ver ); + if ( $in_footer ) + $wp_scripts->add_data( $handle, 'group', 1 ); +} + +/** + * Localize a script. + * + * Works only if the script has already been added. + * + * Accepts an associative array $l10n and creates a JavaScript object: + * + * "$object_name" = { + * key: value, + * key: value, + * ... + * } + * + * + * @see WP_Dependencies::localize() + * @link http://core.trac.wordpress.org/ticket/11520 + * @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts. + * + * @since 2.6.0 + * + * @param string $handle Script handle the data will be attached to. + * @param string $object_name Name for the JavaScript object. Passed directly, so it should be qualified JS variable. + * Example: '/[a-zA-Z0-9_]+/'. + * @param array $l10n The data itself. The data can be either a single or multi-dimensional array. + * @return bool True if the script was successfully localized, false otherwise. + */ +function wp_localize_script( $handle, $object_name, $l10n ) { + global $wp_scripts; + if ( ! is_a( $wp_scripts, 'WP_Scripts' ) ) { + if ( ! did_action( 'init' ) ) + _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ), + 'wp_enqueue_scripts', 'admin_enqueue_scripts', 'login_enqueue_scripts' ), '3.3' ); + + return false; + } + + return $wp_scripts->localize( $handle, $object_name, $l10n ); +} + +/** + * Remove a registered script. + * + * Note: there are intentional safeguards in place to prevent critical admin scripts, + * such as jQuery core, from being unregistered. + * + * @see WP_Dependencies::remove() + * @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts. + * + * @since 2.6.0 + * + * @param string $handle Name of the script to be removed. + */ +function wp_deregister_script( $handle ) { + global $wp_scripts; + if ( ! is_a( $wp_scripts, 'WP_Scripts' ) ) { + if ( ! did_action( 'init' ) ) + _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ), + 'wp_enqueue_scripts', 'admin_enqueue_scripts', 'login_enqueue_scripts' ), '3.3' ); + $wp_scripts = new WP_Scripts(); + } + + /** + * Do not allow accidental or negligent de-registering of critical scripts in the admin. + * Show minimal remorse if the correct hook is used. + */ + $current_filter = current_filter(); + if ( ( is_admin() && 'admin_enqueue_scripts' !== $current_filter ) || + ( 'wp-login.php' === $GLOBALS['pagenow'] && 'login_enqueue_scripts' !== $current_filter ) + ) { + $no = array( + 'jquery', 'jquery-core', 'jquery-migrate', 'jquery-ui-core', 'jquery-ui-accordion', + 'jquery-ui-autocomplete', 'jquery-ui-button', 'jquery-ui-datepicker', 'jquery-ui-dialog', + 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-menu', 'jquery-ui-mouse', + 'jquery-ui-position', 'jquery-ui-progressbar', 'jquery-ui-resizable', 'jquery-ui-selectable', + 'jquery-ui-slider', 'jquery-ui-sortable', 'jquery-ui-spinner', 'jquery-ui-tabs', + 'jquery-ui-tooltip', 'jquery-ui-widget', 'underscore', 'backbone', + ); + + if ( in_array( $handle, $no ) ) { + $message = sprintf( __( 'Do not deregister the %1$s script in the administration area. To target the frontend theme, use the %2$s hook.' ), + "$handle", 'wp_enqueue_scripts' ); + _doing_it_wrong( __FUNCTION__, $message, '3.6' ); + return; + } + } + + $wp_scripts->remove( $handle ); +} + +/** + * Enqueue a script. + * + * Registers the script if $src provided (does NOT overwrite), and enqueues it. + * + * @see WP_Dependencies::add(), WP_Dependencies::add_data(), WP_Dependencies::enqueue() + * @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts. + * + * @since 2.6.0 + + * @param string $handle Name of the script. + * @param string|bool $src Path to the script from the root directory of WordPress. Example: '/js/myscript.js'. + * @param array $deps An array of registered handles this script depends on. Default empty array. + * @param string|bool $ver Optional. String specifying the script version number, if it has one. This parameter + * is used to ensure that the correct version is sent to the client regardless of caching, + * and so should be included if a version number is available and makes sense for the script. + * @param bool $in_footer Optional. Whether to enqueue the script before or before . + * Default 'false'. Accepts 'false' or 'true'. + */ +function wp_enqueue_script( $handle, $src = false, $deps = array(), $ver = false, $in_footer = false ) { + global $wp_scripts; + if ( ! is_a( $wp_scripts, 'WP_Scripts' ) ) { + if ( ! did_action( 'init' ) ) + _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ), + 'wp_enqueue_scripts', 'admin_enqueue_scripts', 'login_enqueue_scripts' ), '3.3' ); + $wp_scripts = new WP_Scripts(); + } + + if ( $src ) { + $_handle = explode('?', $handle); + $wp_scripts->add( $_handle[0], $src, $deps, $ver ); + if ( $in_footer ) + $wp_scripts->add_data( $_handle[0], 'group', 1 ); + } + $wp_scripts->enqueue( $handle ); +} + +/** + * Remove a previously enqueued script. + * + * @see WP_Dependencies::dequeue() + * @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts. + * + * @since 3.1.0 + * + * @param string $handle Name of the script to be removed. + */ +function wp_dequeue_script( $handle ) { + global $wp_scripts; + if ( ! is_a( $wp_scripts, 'WP_Scripts' ) ) { + if ( ! did_action( 'init' ) ) + _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ), + 'wp_enqueue_scripts', 'admin_enqueue_scripts', 'login_enqueue_scripts' ), '3.3' ); + $wp_scripts = new WP_Scripts(); + } + + $wp_scripts->dequeue( $handle ); +} + +/** + * Check whether a script has been added to the queue. + * + * @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts. + * + * @since 2.8.0 + * @since 3.5.0 'enqueued' added as an alias of the 'queue' list. + * + * @param string $handle Name of the script. + * @param string $list Optional. Status of the script to check. Default 'enqueued'. + * Accepts 'enqueued', 'registered', 'queue', 'to_do', and 'done'. + * @return bool Whether the script script is queued. + */ +function wp_script_is( $handle, $list = 'enqueued' ) { + global $wp_scripts; + if ( ! is_a( $wp_scripts, 'WP_Scripts' ) ) { + if ( ! did_action( 'init' ) ) + _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ), + 'wp_enqueue_scripts', 'admin_enqueue_scripts', 'login_enqueue_scripts' ), '3.3' ); + $wp_scripts = new WP_Scripts(); + } + + return (bool) $wp_scripts->query( $handle, $list ); +} diff --git a/wp-includes/functions.wp-styles.php b/wp-includes/functions.wp-styles.php new file mode 100644 index 0000000..a582f5c --- /dev/null +++ b/wp-includes/functions.wp-styles.php @@ -0,0 +1,245 @@ +wp_enqueue_scripts', 'admin_enqueue_scripts', 'login_enqueue_scripts' ), '3.3' ); + + if ( !$handles ) + return array(); // No need to instantiate if nothing is there. + else + $wp_styles = new WP_Styles(); + } + + return $wp_styles->do_items( $handles ); +} + +/** + * Add extra CSS styles to a registered stylesheet. + * + * Styles will only be added if the stylesheet in already in the queue. + * Accepts a string $data containing the CSS. If two or more CSS code blocks + * are added to the same stylesheet $handle, they will be printed in the order + * they were added, i.e. the latter added styles can redeclare the previous. + * + * @see WP_Styles::add_inline_style() + * @global WP_Styles $wp_styles The WP_Styles object for printing styles. + * + * @since 3.3.0 + * + * @param string $handle Name of the stylesheet to add the extra styles to. Must be lowercase. + * @param string $data String containing the CSS styles to be added. + * @return bool True on success, false on failure. + */ +function wp_add_inline_style( $handle, $data ) { + global $wp_styles; + if ( ! is_a( $wp_styles, 'WP_Styles' ) ) { + if ( ! did_action( 'init' ) ) + _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ), + 'wp_enqueue_scripts', 'admin_enqueue_scripts', 'login_enqueue_scripts' ), '3.3' ); + $wp_styles = new WP_Styles(); + } + + if ( false !== stripos( $data, '' ) ) { + _doing_it_wrong( __FUNCTION__, 'Do not pass style tags to wp_add_inline_style().', '3.7' ); + $data = trim( preg_replace( '#]*>(.*)#is', '$1', $data ) ); + } + + return $wp_styles->add_inline_style( $handle, $data ); +} + +/** + * Register a CSS stylesheet. + * + * @see WP_Dependencies::add() + * @link http://www.w3.org/TR/CSS2/media.html#media-types List of CSS media types. + * @global WP_Styles $wp_styles The WP_Styles object for printing styles. + * + * @since 2.6.0 + * + * @param string $handle Name of the stylesheet. + * @param string|bool $src Path to the stylesheet from the WordPress root directory. Example: '/css/mystyle.css'. + * @param array $deps An array of registered style handles this stylesheet depends on. Default empty array. + * @param string|bool $ver String specifying the stylesheet version number. Used to ensure that the correct version + * is sent to the client regardless of caching. Default 'false'. Accepts 'false', 'null', or 'string'. + * @param string $media Optional. The media for which this stylesheet has been defined. + * Default 'all'. Accepts 'all', 'aural', 'braille', 'handheld', 'projection', 'print', + * 'screen', 'tty', or 'tv'. + */ +function wp_register_style( $handle, $src, $deps = array(), $ver = false, $media = 'all' ) { + global $wp_styles; + if ( ! is_a( $wp_styles, 'WP_Styles' ) ) { + if ( ! did_action( 'init' ) ) + _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ), + 'wp_enqueue_scripts', 'admin_enqueue_scripts', 'login_enqueue_scripts' ), '3.3' ); + $wp_styles = new WP_Styles(); + } + + $wp_styles->add( $handle, $src, $deps, $ver, $media ); +} + +/** + * Remove a registered stylesheet. + * + * @see WP_Dependencies::remove() + * @global WP_Styles $wp_styles The WP_Styles object for printing styles. + * + * @since 2.1.0 + * + * @param string $handle Name of the stylesheet to be removed. + */ +function wp_deregister_style( $handle ) { + global $wp_styles; + if ( ! is_a( $wp_styles, 'WP_Styles' ) ) { + if ( ! did_action( 'init' ) ) + _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ), + 'wp_enqueue_scripts', 'admin_enqueue_scripts', 'login_enqueue_scripts' ), '3.3' ); + $wp_styles = new WP_Styles(); + } + + $wp_styles->remove( $handle ); +} + +/** + * Enqueue a CSS stylesheet. + * + * Registers the style if source provided (does NOT overwrite) and enqueues. + * + * @see WP_Dependencies::add(), WP_Dependencies::enqueue() + * @link http://www.w3.org/TR/CSS2/media.html#media-types List of CSS media types. + * @global WP_Styles $wp_styles The WP_Styles object for printing styles. + * + * @since 2.6.0 + * + * @param string $handle Name of the stylesheet. + * @param string|bool $src Path to the stylesheet from the root directory of WordPress. Example: '/css/mystyle.css'. + * @param array $deps An array of registered style handles this stylesheet depends on. Default empty array. + * @param string|bool $ver String specifying the stylesheet version number, if it has one. This parameter is used + * to ensure that the correct version is sent to the client regardless of caching, and so + * should be included if a version number is available and makes sense for the stylesheet. + * @param string $media Optional. The media for which this stylesheet has been defined. + * Default 'all'. Accepts 'all', 'aural', 'braille', 'handheld', 'projection', 'print', + * 'screen', 'tty', or 'tv'. + */ +function wp_enqueue_style( $handle, $src = false, $deps = array(), $ver = false, $media = 'all' ) { + global $wp_styles; + if ( ! is_a( $wp_styles, 'WP_Styles' ) ) { + if ( ! did_action( 'init' ) ) + _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ), + 'wp_enqueue_scripts', 'admin_enqueue_scripts', 'login_enqueue_scripts' ), '3.3' ); + $wp_styles = new WP_Styles(); + } + + if ( $src ) { + $_handle = explode('?', $handle); + $wp_styles->add( $_handle[0], $src, $deps, $ver, $media ); + } + $wp_styles->enqueue( $handle ); +} + +/** + * Remove a previously enqueued CSS stylesheet. + * + * @see WP_Dependencies::dequeue() + * @global WP_Styles $wp_styles The WP_Styles object for printing styles. + * + * @since 3.1.0 + * + * @param string $handle Name of the stylesheet to be removed. + */ +function wp_dequeue_style( $handle ) { + global $wp_styles; + if ( ! is_a( $wp_styles, 'WP_Styles' ) ) { + if ( ! did_action( 'init' ) ) + _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ), + 'wp_enqueue_scripts', 'admin_enqueue_scripts', 'login_enqueue_scripts' ), '3.3' ); + $wp_styles = new WP_Styles(); + } + + $wp_styles->dequeue( $handle ); +} + +/** + * Check whether a CSS stylesheet has been added to the queue. + * + * @global WP_Styles $wp_styles The WP_Styles object for printing styles. + * + * @since 2.8.0 + * + * @param string $handle Name of the stylesheet. + * @param string $list Optional. Status of the stylesheet to check. Default 'enqueued'. + * Accepts 'enqueued', 'registered', 'queue', 'to_do', and 'done'. + * @return bool Whether style is queued. + */ +function wp_style_is( $handle, $list = 'enqueued' ) { + global $wp_styles; + if ( ! is_a( $wp_styles, 'WP_Styles' ) ) { + if ( ! did_action( 'init' ) ) + _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ), + 'wp_enqueue_scripts', 'admin_enqueue_scripts', 'login_enqueue_scripts' ), '3.3' ); + $wp_styles = new WP_Styles(); + } + + return (bool) $wp_styles->query( $handle, $list ); +} + +/** + * Add metadata to a CSS stylesheet. + * + * Works only if the stylesheet has already been added. + * + * Possible values for $key and $value: + * 'conditional' string Comments for IE 6, lte IE 7 etc. + * 'rtl' bool|string To declare an RTL stylesheet. + * 'suffix' string Optional suffix, used in combination with RTL. + * 'alt' bool For rel="alternate stylesheet". + * 'title' string For preferred/alternate stylesheets. + * + * @see WP_Dependency::add_data() + * + * @since 3.6.0 + * + * @param string $handle Name of the stylesheet. + * @param string $key Name of data point for which we're storing a value. + * Accepts 'conditional', 'rtl' and 'suffix', 'alt' and 'title'. + * @param mixed $data String containing the CSS data to be added. + * @return bool True on success, false on failure. + */ +function wp_style_add_data( $handle, $key, $value ) { + global $wp_styles; + return $wp_styles->add_data( $handle, $key, $value ); +} diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php new file mode 100644 index 0000000..f4d6f37 --- /dev/null +++ b/wp-includes/general-template.php @@ -0,0 +1,2924 @@ + + + + '; + } else { + $form = ''; + } + } + + /** + * Filter the HTML output of the search form. + * + * @since 2.7.0 + * + * @param string $form The search form HTML output. + */ + $result = apply_filters( 'get_search_form', $form ); + + if ( null === $result ) + $result = $form; + + if ( $echo ) + echo $result; + else + return $result; +} + +/** + * Display the Log In/Out link. + * + * Displays a link, which allows users to navigate to the Log In page to log in + * or log out depending on whether they are currently logged in. + * + * @since 1.5.0 + * + * @param string $redirect Optional path to redirect to on login/logout. + * @param boolean $echo Default to echo and not return the link. + * @return string|null String when retrieving, null when displaying. + */ +function wp_loginout($redirect = '', $echo = true) { + if ( ! is_user_logged_in() ) + $link = '' . __('Log in') . ''; + else + $link = '' . __('Log out') . ''; + + if ( $echo ) { + /** + * Filter the HTML output for the Log In/Log Out link. + * + * @since 1.5.0 + * + * @param string $link The HTML link content. + */ + echo apply_filters( 'loginout', $link ); + } else { + /** This filter is documented in wp-includes/general-template.php */ + return apply_filters( 'loginout', $link ); + } +} + +/** + * Returns the Log Out URL. + * + * Returns the URL that allows the user to log out of the site. + * + * @since 2.7.0 + * + * @uses wp_nonce_url() To protect against CSRF. + * @uses site_url() To generate the log out URL. + * + * @param string $redirect Path to redirect to on logout. + * @return string A log out URL. + */ +function wp_logout_url($redirect = '') { + $args = array( 'action' => 'logout' ); + if ( !empty($redirect) ) { + $args['redirect_to'] = urlencode( $redirect ); + } + + $logout_url = add_query_arg($args, site_url('wp-login.php', 'login')); + $logout_url = wp_nonce_url( $logout_url, 'log-out' ); + + /** + * Filter the logout URL. + * + * @since 2.8.0 + * + * @param string $logout_url The Log Out URL. + * @param string $redirect Path to redirect to on logout. + */ + return apply_filters( 'logout_url', $logout_url, $redirect ); +} + +/** + * Returns the Log In URL. + * + * Returns the URL that allows the user to log in to the site. + * + * @since 2.7.0 + * + * @uses site_url() To generate the log in URL. + * + * @param string $redirect Path to redirect to on login. + * @param bool $force_reauth Whether to force reauthorization, even if a cookie is present. Default is false. + * @return string A log in URL. + */ +function wp_login_url($redirect = '', $force_reauth = false) { + $login_url = site_url('wp-login.php', 'login'); + + if ( !empty($redirect) ) + $login_url = add_query_arg('redirect_to', urlencode($redirect), $login_url); + + if ( $force_reauth ) + $login_url = add_query_arg('reauth', '1', $login_url); + + /** + * Filter the login URL. + * + * @since 2.8.0 + * + * @param string $login_url The login URL. + * @param string $redirect The path to redirect to on login, if supplied. + */ + return apply_filters( 'login_url', $login_url, $redirect ); +} + +/** + * Returns the user registration URL. + * + * Returns the URL that allows the user to register on the site. + * + * @since 3.6.0 + * + * @uses site_url() To generate the registration URL. + * + * @return string User registration URL. + */ +function wp_registration_url() { + /** + * Filter the user registration URL. + * + * @since 3.6.0 + * + * @param string $register The user registration URL. + */ + return apply_filters( 'register_url', site_url( 'wp-login.php?action=register', 'login' ) ); +} + +/** + * Provides a simple login form for use anywhere within WordPress. By default, it echoes + * the HTML immediately. Pass array('echo'=>false) to return the string instead. + * + * @since 3.0.0 + * + * @param array $args Configuration options to modify the form output. + * @return string|null String when retrieving, null when displaying. + */ +function wp_login_form( $args = array() ) { + $defaults = array( + 'echo' => true, + 'redirect' => ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], // Default redirect is back to the current page + 'form_id' => 'loginform', + 'label_username' => __( 'Username' ), + 'label_password' => __( 'Password' ), + 'label_remember' => __( 'Remember Me' ), + 'label_log_in' => __( 'Log In' ), + 'id_username' => 'user_login', + 'id_password' => 'user_pass', + 'id_remember' => 'rememberme', + 'id_submit' => 'wp-submit', + 'remember' => true, + 'value_username' => '', + 'value_remember' => false, // Set this to true to default the "Remember me" checkbox to checked + ); + + /** + * Filter the default login form output arguments. + * + * @since 3.0.0 + * + * @see wp_login_form() + * + * @param array $defaults An array of default login form arguments. + */ + $args = wp_parse_args( $args, apply_filters( 'login_form_defaults', $defaults ) ); + + /** + * Filter content to display at the top of the login form. + * + * The filter evaluates just following the opening form tag element. + * + * @since 3.0.0 + * + * @param string $content Content to display. Default empty. + * @param array $args Array of login form arguments. + */ + $login_form_top = apply_filters( 'login_form_top', '', $args ); + + /** + * Filter content to display in the middle of the login form. + * + * The filter evaluates just following the location where the 'login-password' + * field is displayed. + * + * @since 3.0.0 + * + * @param string $content Content to display. Default empty. + * @param array $args Array of login form arguments. + */ + $login_form_middle = apply_filters( 'login_form_middle', '', $args ); + + /** + * Filter content to display at the bottom of the login form. + * + * The filter evaluates just preceding the closing form tag element. + * + * @since 3.0.0 + * + * @param string $content Content to display. Default empty. + * @param array $args Array of login form arguments. + */ + $login_form_bottom = apply_filters( 'login_form_bottom', '', $args ); + + $form = ' +
            + ' . $login_form_top . ' + + + ' . $login_form_middle . ' + ' . ( $args['remember'] ? '' : '' ) . ' + + ' . $login_form_bottom . ' +
            '; + + if ( $args['echo'] ) + echo $form; + else + return $form; +} + +/** + * Returns the Lost Password URL. + * + * Returns the URL that allows the user to retrieve the lost password + * + * @since 2.8.0 + * + * @uses site_url() To generate the lost password URL + * + * @param string $redirect Path to redirect to on login. + * @return string Lost password URL. + */ +function wp_lostpassword_url( $redirect = '' ) { + $args = array( 'action' => 'lostpassword' ); + if ( !empty($redirect) ) { + $args['redirect_to'] = $redirect; + } + + $lostpassword_url = add_query_arg( $args, network_site_url('wp-login.php', 'login') ); + + /** + * Filter the Lost Password URL. + * + * @since 2.8.0 + * + * @param string $lostpassword_url The lost password page URL. + * @param string $redirect The path to redirect to on login. + */ + return apply_filters( 'lostpassword_url', $lostpassword_url, $redirect ); +} + +/** + * Display the Registration or Admin link. + * + * Display a link which allows the user to navigate to the registration page if + * not logged in and registration is enabled or to the dashboard if logged in. + * + * @since 1.5.0 + * + * @param string $before Text to output before the link (defaults to
          14. ). + * @param string $after Text to output after the link (defaults to
          15. ). + * @param boolean $echo Default to echo and not return the link. + * @return string|null String when retrieving, null when displaying. + */ +function wp_register( $before = '
          16. ', $after = '
          17. ', $echo = true ) { + + if ( ! is_user_logged_in() ) { + if ( get_option('users_can_register') ) + $link = $before . '' . __('Register') . '' . $after; + else + $link = ''; + } else { + $link = $before . '' . __('Site Admin') . '' . $after; + } + + if ( $echo ) { + /** + * Filter the HTML link to the Registration or Admin page. + * + * Users are sent to the admin page if logged-in, or the registration page + * if enabled and logged-out. + * + * @since 1.5.0 + * + * @param string $link The HTML code for the link to the Registration or Admin page. + */ + echo apply_filters( 'register', $link ); + } else { + /** This filter is documented in wp-includes/general-template.php */ + return apply_filters( 'register', $link ); + } +} + +/** + * Theme container function for the 'wp_meta' action. + * + * The 'wp_meta' action can have several purposes, depending on how you use it, + * but one purpose might have been to allow for theme switching. + * + * @since 1.5.0 + * + * @link http://trac.wordpress.org/ticket/1458 Explanation of 'wp_meta' action. + */ +function wp_meta() { + /** + * Fires before displaying echoed content in the sidebar. + * + * @since 1.5.0 + */ + do_action( 'wp_meta' ); +} + +/** + * Display information about the blog. + * + * @see get_bloginfo() For possible values for the parameter. + * @since 0.71 + * + * @param string $show What to display. + */ +function bloginfo( $show='' ) { + echo get_bloginfo( $show, 'display' ); +} + +/** + * Retrieve information about the blog. + * + * Some show parameter values are deprecated and will be removed in future + * versions. These options will trigger the _deprecated_argument() function. + * The deprecated blog info options are listed in the function contents. + * + * The possible values for the 'show' parameter are listed below. + *
              + *
            1. url - Blog URI to homepage.
            2. + *
            3. wpurl - Blog URI path to WordPress.
            4. + *
            5. description - Secondary title
            6. + *
            + * + * The feed URL options can be retrieved from 'rdf_url' (RSS 0.91), + * 'rss_url' (RSS 1.0), 'rss2_url' (RSS 2.0), or 'atom_url' (Atom feed). The + * comment feeds can be retrieved from the 'comments_atom_url' (Atom comment + * feed) or 'comments_rss2_url' (RSS 2.0 comment feed). + * + * @since 0.71 + * + * @param string $show Blog info to retrieve. + * @param string $filter How to filter what is retrieved. + * @return string Mostly string values, might be empty. + */ +function get_bloginfo( $show = '', $filter = 'raw' ) { + + switch( $show ) { + case 'home' : // DEPRECATED + case 'siteurl' : // DEPRECATED + _deprecated_argument( __FUNCTION__, '2.2', sprintf( __('The %s option is deprecated for the family of bloginfo() functions.' ), $show ) . ' ' . sprintf( __( 'Use the %s option instead.' ), 'url' ) ); + case 'url' : + $output = home_url(); + break; + case 'wpurl' : + $output = site_url(); + break; + case 'description': + $output = get_option('blogdescription'); + break; + case 'rdf_url': + $output = get_feed_link('rdf'); + break; + case 'rss_url': + $output = get_feed_link('rss'); + break; + case 'rss2_url': + $output = get_feed_link('rss2'); + break; + case 'atom_url': + $output = get_feed_link('atom'); + break; + case 'comments_atom_url': + $output = get_feed_link('comments_atom'); + break; + case 'comments_rss2_url': + $output = get_feed_link('comments_rss2'); + break; + case 'pingback_url': + $output = site_url( 'xmlrpc.php' ); + break; + case 'stylesheet_url': + $output = get_stylesheet_uri(); + break; + case 'stylesheet_directory': + $output = get_stylesheet_directory_uri(); + break; + case 'template_directory': + case 'template_url': + $output = get_template_directory_uri(); + break; + case 'admin_email': + $output = get_option('admin_email'); + break; + case 'charset': + $output = get_option('blog_charset'); + if ('' == $output) $output = 'UTF-8'; + break; + case 'html_type' : + $output = get_option('html_type'); + break; + case 'version': + global $wp_version; + $output = $wp_version; + break; + case 'language': + $output = get_locale(); + $output = str_replace('_', '-', $output); + break; + case 'text_direction': + //_deprecated_argument( __FUNCTION__, '2.2', sprintf( __('The %s option is deprecated for the family of bloginfo() functions.' ), $show ) . ' ' . sprintf( __( 'Use the %s function instead.' ), 'is_rtl()' ) ); + if ( function_exists( 'is_rtl' ) ) { + $output = is_rtl() ? 'rtl' : 'ltr'; + } else { + $output = 'ltr'; + } + break; + case 'name': + default: + $output = get_option('blogname'); + break; + } + + $url = true; + if (strpos($show, 'url') === false && + strpos($show, 'directory') === false && + strpos($show, 'home') === false) + $url = false; + + if ( 'display' == $filter ) { + if ( $url ) { + /** + * Filter the URL returned by get_bloginfo(). + * + * @since 2.0.5 + * + * @param mixed $output The URL returned by bloginfo(). + * @param mixed $show Type of information requested. + */ + $output = apply_filters( 'bloginfo_url', $output, $show ); + } else { + /** + * Filter the site information returned by get_bloginfo(). + * + * @since 0.71 + * + * @param mixed $output The requested non-URL site information. + * @param mixed $show Type of information requested. + */ + $output = apply_filters( 'bloginfo', $output, $show ); + } + } + + return $output; +} + +/** + * Display or retrieve page title for all areas of blog. + * + * By default, the page title will display the separator before the page title, + * so that the blog title will be before the page title. This is not good for + * title display, since the blog title shows up on most tabs and not what is + * important, which is the page that the user is looking at. + * + * There are also SEO benefits to having the blog title after or to the 'right' + * or the page title. However, it is mostly common sense to have the blog title + * to the right with most browsers supporting tabs. You can achieve this by + * using the seplocation parameter and setting the value to 'right'. This change + * was introduced around 2.5.0, in case backwards compatibility of themes is + * important. + * + * @since 1.0.0 + * + * @param string $sep Optional, default is '»'. How to separate the various items within the page title. + * @param bool $display Optional, default is true. Whether to display or retrieve title. + * @param string $seplocation Optional. Direction to display title, 'right'. + * @return string|null String on retrieve, null when displaying. + */ +function wp_title($sep = '»', $display = true, $seplocation = '') { + global $wpdb, $wp_locale; + + $m = get_query_var('m'); + $year = get_query_var('year'); + $monthnum = get_query_var('monthnum'); + $day = get_query_var('day'); + $search = get_query_var('s'); + $title = ''; + + $t_sep = '%WP_TITILE_SEP%'; // Temporary separator, for accurate flipping, if necessary + + // If there is a post + if ( is_single() || ( is_home() && !is_front_page() ) || ( is_page() && !is_front_page() ) ) { + $title = single_post_title( '', false ); + } + + // If there's a post type archive + if ( is_post_type_archive() ) { + $post_type = get_query_var( 'post_type' ); + if ( is_array( $post_type ) ) + $post_type = reset( $post_type ); + $post_type_object = get_post_type_object( $post_type ); + if ( ! $post_type_object->has_archive ) + $title = post_type_archive_title( '', false ); + } + + // If there's a category or tag + if ( is_category() || is_tag() ) { + $title = single_term_title( '', false ); + } + + // If there's a taxonomy + if ( is_tax() ) { + $term = get_queried_object(); + if ( $term ) { + $tax = get_taxonomy( $term->taxonomy ); + $title = single_term_title( $tax->labels->name . $t_sep, false ); + } + } + + // If there's an author + if ( is_author() ) { + $author = get_queried_object(); + if ( $author ) + $title = $author->display_name; + } + + // Post type archives with has_archive should override terms. + if ( is_post_type_archive() && $post_type_object->has_archive ) + $title = post_type_archive_title( '', false ); + + // If there's a month + if ( is_archive() && !empty($m) ) { + $my_year = substr($m, 0, 4); + $my_month = $wp_locale->get_month(substr($m, 4, 2)); + $my_day = intval(substr($m, 6, 2)); + $title = $my_year . ( $my_month ? $t_sep . $my_month : '' ) . ( $my_day ? $t_sep . $my_day : '' ); + } + + // If there's a year + if ( is_archive() && !empty($year) ) { + $title = $year; + if ( !empty($monthnum) ) + $title .= $t_sep . $wp_locale->get_month($monthnum); + if ( !empty($day) ) + $title .= $t_sep . zeroise($day, 2); + } + + // If it's a search + if ( is_search() ) { + /* translators: 1: separator, 2: search phrase */ + $title = sprintf(__('Search Results %1$s %2$s'), $t_sep, strip_tags($search)); + } + + // If it's a 404 page + if ( is_404() ) { + $title = __('Page not found'); + } + + $prefix = ''; + if ( !empty($title) ) + $prefix = " $sep "; + + // Determines position of the separator and direction of the breadcrumb + if ( 'right' == $seplocation ) { // sep on right, so reverse the order + $title_array = explode( $t_sep, $title ); + $title_array = array_reverse( $title_array ); + $title = implode( " $sep ", $title_array ) . $prefix; + } else { + $title_array = explode( $t_sep, $title ); + $title = $prefix . implode( " $sep ", $title_array ); + } + + /** + * Filter the text of the page title. + * + * @since 2.0.0 + * + * @param string $title Page title. + * @param string $sep Title separator. + * @param string $seplocation Location of the separator (left or right). + */ + $title = apply_filters( 'wp_title', $title, $sep, $seplocation ); + + // Send it out + if ( $display ) + echo $title; + else + return $title; + +} + +/** + * Display or retrieve page title for post. + * + * This is optimized for single.php template file for displaying the post title. + * + * It does not support placing the separator after the title, but by leaving the + * prefix parameter empty, you can set the title separator manually. The prefix + * does not automatically place a space between the prefix, so if there should + * be a space, the parameter value will need to have it at the end. + * + * @since 0.71 + * + * @param string $prefix Optional. What to display before the title. + * @param bool $display Optional, default is true. Whether to display or retrieve title. + * @return string|null Title when retrieving, null when displaying or failure. + */ +function single_post_title($prefix = '', $display = true) { + $_post = get_queried_object(); + + if ( !isset($_post->post_title) ) + return; + + /** + * Filter the page title for a single post. + * + * @since 0.71 + * + * @param string $_post_title The single post page title. + * @param object $_post The current queried object as returned by get_queried_object(). + */ + $title = apply_filters( 'single_post_title', $_post->post_title, $_post ); + if ( $display ) + echo $prefix . $title; + else + return $prefix . $title; +} + +/** + * Display or retrieve title for a post type archive. + * + * This is optimized for archive.php and archive-{$post_type}.php template files + * for displaying the title of the post type. + * + * @since 3.1.0 + * + * @param string $prefix Optional. What to display before the title. + * @param bool $display Optional, default is true. Whether to display or retrieve title. + * @return string|null Title when retrieving, null when displaying or failure. + */ +function post_type_archive_title( $prefix = '', $display = true ) { + if ( ! is_post_type_archive() ) + return; + + $post_type = get_query_var( 'post_type' ); + if ( is_array( $post_type ) ) + $post_type = reset( $post_type ); + + $post_type_obj = get_post_type_object( $post_type ); + + /** + * Filter the post type archive title. + * + * @since 3.1.0 + * + * @param string $post_type_name Post type 'name' label. + * @param string $post_type Post type. + */ + $title = apply_filters( 'post_type_archive_title', $post_type_obj->labels->name, $post_type ); + + if ( $display ) + echo $prefix . $title; + else + return $prefix . $title; +} + +/** + * Display or retrieve page title for category archive. + * + * This is useful for category template file or files, because it is optimized + * for category page title and with less overhead than {@link wp_title()}. + * + * It does not support placing the separator after the title, but by leaving the + * prefix parameter empty, you can set the title separator manually. The prefix + * does not automatically place a space between the prefix, so if there should + * be a space, the parameter value will need to have it at the end. + * + * @since 0.71 + * + * @param string $prefix Optional. What to display before the title. + * @param bool $display Optional, default is true. Whether to display or retrieve title. + * @return string|null Title when retrieving, null when displaying or failure. + */ +function single_cat_title( $prefix = '', $display = true ) { + return single_term_title( $prefix, $display ); +} + +/** + * Display or retrieve page title for tag post archive. + * + * Useful for tag template files for displaying the tag page title. It has less + * overhead than {@link wp_title()}, because of its limited implementation. + * + * It does not support placing the separator after the title, but by leaving the + * prefix parameter empty, you can set the title separator manually. The prefix + * does not automatically place a space between the prefix, so if there should + * be a space, the parameter value will need to have it at the end. + * + * @since 2.3.0 + * + * @param string $prefix Optional. What to display before the title. + * @param bool $display Optional, default is true. Whether to display or retrieve title. + * @return string|null Title when retrieving, null when displaying or failure. + */ +function single_tag_title( $prefix = '', $display = true ) { + return single_term_title( $prefix, $display ); +} + +/** + * Display or retrieve page title for taxonomy term archive. + * + * Useful for taxonomy term template files for displaying the taxonomy term page title. + * It has less overhead than {@link wp_title()}, because of its limited implementation. + * + * It does not support placing the separator after the title, but by leaving the + * prefix parameter empty, you can set the title separator manually. The prefix + * does not automatically place a space between the prefix, so if there should + * be a space, the parameter value will need to have it at the end. + * + * @since 3.1.0 + * + * @param string $prefix Optional. What to display before the title. + * @param bool $display Optional, default is true. Whether to display or retrieve title. + * @return string|null Title when retrieving, null when displaying or failure. + */ +function single_term_title( $prefix = '', $display = true ) { + $term = get_queried_object(); + + if ( !$term ) + return; + + if ( is_category() ) { + /** + * Filter the category archive page title. + * + * @since 2.0.10 + * + * @param string $term_name Category name for archive being displayed. + */ + $term_name = apply_filters( 'single_cat_title', $term->name ); + } elseif ( is_tag() ) { + /** + * Filter the tag archive page title. + * + * @since 2.3.0 + * + * @param string $term_name Tag name for archive being displayed. + */ + $term_name = apply_filters( 'single_tag_title', $term->name ); + } elseif ( is_tax() ) { + /** + * Filter the custom taxonomy archive page title. + * + * @since 3.1.0 + * + * @param string $term_name Term name for archive being displayed. + */ + $term_name = apply_filters( 'single_term_title', $term->name ); + } else { + return; + } + + if ( empty( $term_name ) ) + return; + + if ( $display ) + echo $prefix . $term_name; + else + return $prefix . $term_name; +} + +/** + * Display or retrieve page title for post archive based on date. + * + * Useful for when the template only needs to display the month and year, if + * either are available. Optimized for just this purpose, so if it is all that + * is needed, should be better than {@link wp_title()}. + * + * It does not support placing the separator after the title, but by leaving the + * prefix parameter empty, you can set the title separator manually. The prefix + * does not automatically place a space between the prefix, so if there should + * be a space, the parameter value will need to have it at the end. + * + * @since 0.71 + * + * @param string $prefix Optional. What to display before the title. + * @param bool $display Optional, default is true. Whether to display or retrieve title. + * @return string|null Title when retrieving, null when displaying or failure. + */ +function single_month_title($prefix = '', $display = true ) { + global $wp_locale; + + $m = get_query_var('m'); + $year = get_query_var('year'); + $monthnum = get_query_var('monthnum'); + + if ( !empty($monthnum) && !empty($year) ) { + $my_year = $year; + $my_month = $wp_locale->get_month($monthnum); + } elseif ( !empty($m) ) { + $my_year = substr($m, 0, 4); + $my_month = $wp_locale->get_month(substr($m, 4, 2)); + } + + if ( empty($my_month) ) + return false; + + $result = $prefix . $my_month . $prefix . $my_year; + + if ( !$display ) + return $result; + echo $result; +} + +/** + * Retrieve archive link content based on predefined or custom code. + * + * The format can be one of four styles. The 'link' for head element, 'option' + * for use in the select element, 'html' for use in list (either ol or ul HTML + * elements). Custom content is also supported using the before and after + * parameters. + * + * The 'link' format uses the link HTML element with the archives + * relationship. The before and after parameters are not used. The text + * parameter is used to describe the link. + * + * The 'option' format uses the option HTML element for use in select element. + * The value is the url parameter and the before and after parameters are used + * between the text description. + * + * The 'html' format, which is the default, uses the li HTML element for use in + * the list HTML elements. The before parameter is before the link and the after + * parameter is after the closing link. + * + * The custom format uses the before parameter before the link ('a' HTML + * element) and the after parameter after the closing link tag. If the above + * three values for the format are not used, then custom format is assumed. + * + * @since 1.0.0 + * + * @param string $url URL to archive. + * @param string $text Archive text description. + * @param string $format Optional, default is 'html'. Can be 'link', 'option', 'html', or custom. + * @param string $before Optional. + * @param string $after Optional. + * @return string HTML link content for archive. + */ +function get_archives_link($url, $text, $format = 'html', $before = '', $after = '') { + $text = wptexturize($text); + $url = esc_url($url); + + if ('link' == $format) + $link_html = "\t\n"; + elseif ('option' == $format) + $link_html = "\t\n"; + elseif ('html' == $format) + $link_html = "\t
          18. $before$text$after
          19. \n"; + else // custom + $link_html = "\t$before$text$after\n"; + + /** + * Filter the archive link content. + * + * @since 2.6.0 + * + * @param string $link_html The archive HTML link content. + */ + $link_html = apply_filters( 'get_archives_link', $link_html ); + + return $link_html; +} + +/** + * Display archive links based on type and format. + * + * The 'type' argument offers a few choices and by default will display monthly + * archive links. The other options for values are 'daily', 'weekly', 'monthly', + * 'yearly', 'postbypost' or 'alpha'. Both 'postbypost' and 'alpha' display the + * same archive link list, the difference between the two is that 'alpha' + * will order by post title and 'postbypost' will order by post date. + * + * The date archives will logically display dates with links to the archive post + * page. The 'postbypost' and 'alpha' values for 'type' argument will display + * the post titles. + * + * The 'limit' argument will only display a limited amount of links, specified + * by the 'limit' integer value. By default, there is no limit. The + * 'show_post_count' argument will show how many posts are within the archive. + * By default, the 'show_post_count' argument is set to false. + * + * For the 'format', 'before', and 'after' arguments, see {@link + * get_archives_link()}. The values of these arguments have to do with that + * function. + * + * @since 1.2.0 + * + * @param string|array $args Optional. Override defaults. + * @return string|null String when retrieving, null when displaying. + */ +function wp_get_archives($args = '') { + global $wpdb, $wp_locale; + + $defaults = array( + 'type' => 'monthly', 'limit' => '', + 'format' => 'html', 'before' => '', + 'after' => '', 'show_post_count' => false, + 'echo' => 1, 'order' => 'DESC', + ); + + $r = wp_parse_args( $args, $defaults ); + extract( $r, EXTR_SKIP ); + + if ( '' == $type ) + $type = 'monthly'; + + if ( '' != $limit ) { + $limit = absint($limit); + $limit = ' LIMIT '.$limit; + } + + $order = strtoupper( $order ); + if ( $order !== 'ASC' ) + $order = 'DESC'; + + // this is what will separate dates on weekly archive links + $archive_week_separator = '–'; + + // over-ride general date format ? 0 = no: use the date format set in Options, 1 = yes: over-ride + $archive_date_format_over_ride = 0; + + // options for daily archive (only if you over-ride the general date format) + $archive_day_date_format = 'Y/m/d'; + + // options for weekly archive (only if you over-ride the general date format) + $archive_week_start_date_format = 'Y/m/d'; + $archive_week_end_date_format = 'Y/m/d'; + + if ( !$archive_date_format_over_ride ) { + $archive_day_date_format = get_option('date_format'); + $archive_week_start_date_format = get_option('date_format'); + $archive_week_end_date_format = get_option('date_format'); + } + + /** + * Filter the SQL WHERE clause for retrieving archives. + * + * @since 2.2.0 + * + * @param string $sql_where Portion of SQL query containing the WHERE clause. + * @param array $r An array of default arguments. + */ + $where = apply_filters( 'getarchives_where', "WHERE post_type = 'post' AND post_status = 'publish'", $r ); + + /** + * Filter the SQL JOIN clause for retrieving archives. + * + * @since 2.2.0 + * + * @param string $sql_join Portion of SQL query containing JOIN clause. + * @param array $r An array of default arguments. + */ + $join = apply_filters( 'getarchives_join', '', $r ); + + $output = ''; + + $last_changed = wp_cache_get( 'last_changed', 'posts' ); + if ( ! $last_changed ) { + $last_changed = microtime(); + wp_cache_set( 'last_changed', $last_changed, 'posts' ); + } + + if ( 'monthly' == $type ) { + $query = "SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date $order $limit"; + $key = md5( $query ); + $key = "wp_get_archives:$key:$last_changed"; + if ( ! $results = wp_cache_get( $key, 'posts' ) ) { + $results = $wpdb->get_results( $query ); + wp_cache_set( $key, $results, 'posts' ); + } + if ( $results ) { + $afterafter = $after; + foreach ( (array) $results as $result ) { + $url = get_month_link( $result->year, $result->month ); + /* translators: 1: month name, 2: 4-digit year */ + $text = sprintf(__('%1$s %2$d'), $wp_locale->get_month($result->month), $result->year); + if ( $show_post_count ) + $after = ' ('.$result->posts.')' . $afterafter; + $output .= get_archives_link($url, $text, $format, $before, $after); + } + } + } elseif ('yearly' == $type) { + $query = "SELECT YEAR(post_date) AS `year`, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY YEAR(post_date) ORDER BY post_date $order $limit"; + $key = md5( $query ); + $key = "wp_get_archives:$key:$last_changed"; + if ( ! $results = wp_cache_get( $key, 'posts' ) ) { + $results = $wpdb->get_results( $query ); + wp_cache_set( $key, $results, 'posts' ); + } + if ( $results ) { + $afterafter = $after; + foreach ( (array) $results as $result) { + $url = get_year_link($result->year); + $text = sprintf('%d', $result->year); + if ($show_post_count) + $after = ' ('.$result->posts.')' . $afterafter; + $output .= get_archives_link($url, $text, $format, $before, $after); + } + } + } elseif ( 'daily' == $type ) { + $query = "SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, DAYOFMONTH(post_date) AS `dayofmonth`, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY YEAR(post_date), MONTH(post_date), DAYOFMONTH(post_date) ORDER BY post_date $order $limit"; + $key = md5( $query ); + $key = "wp_get_archives:$key:$last_changed"; + if ( ! $results = wp_cache_get( $key, 'posts' ) ) { + $results = $wpdb->get_results( $query ); + $cache[ $key ] = $results; + wp_cache_set( $key, $results, 'posts' ); + } + if ( $results ) { + $afterafter = $after; + foreach ( (array) $results as $result ) { + $url = get_day_link($result->year, $result->month, $result->dayofmonth); + $date = sprintf('%1$d-%2$02d-%3$02d 00:00:00', $result->year, $result->month, $result->dayofmonth); + $text = mysql2date($archive_day_date_format, $date); + if ($show_post_count) + $after = ' ('.$result->posts.')'.$afterafter; + $output .= get_archives_link($url, $text, $format, $before, $after); + } + } + } elseif ( 'weekly' == $type ) { + $week = _wp_mysql_week( '`post_date`' ); + $query = "SELECT DISTINCT $week AS `week`, YEAR( `post_date` ) AS `yr`, DATE_FORMAT( `post_date`, '%Y-%m-%d' ) AS `yyyymmdd`, count( `ID` ) AS `posts` FROM `$wpdb->posts` $join $where GROUP BY $week, YEAR( `post_date` ) ORDER BY `post_date` $order $limit"; + $key = md5( $query ); + $key = "wp_get_archives:$key:$last_changed"; + if ( ! $results = wp_cache_get( $key, 'posts' ) ) { + $results = $wpdb->get_results( $query ); + wp_cache_set( $key, $results, 'posts' ); + } + $arc_w_last = ''; + $afterafter = $after; + if ( $results ) { + foreach ( (array) $results as $result ) { + if ( $result->week != $arc_w_last ) { + $arc_year = $result->yr; + $arc_w_last = $result->week; + $arc_week = get_weekstartend($result->yyyymmdd, get_option('start_of_week')); + $arc_week_start = date_i18n($archive_week_start_date_format, $arc_week['start']); + $arc_week_end = date_i18n($archive_week_end_date_format, $arc_week['end']); + $url = sprintf('%1$s/%2$s%3$sm%4$s%5$s%6$sw%7$s%8$d', home_url(), '', '?', '=', $arc_year, '&', '=', $result->week); + $text = $arc_week_start . $archive_week_separator . $arc_week_end; + if ($show_post_count) + $after = ' ('.$result->posts.')'.$afterafter; + $output .= get_archives_link($url, $text, $format, $before, $after); + } + } + } + } elseif ( ( 'postbypost' == $type ) || ('alpha' == $type) ) { + $orderby = ('alpha' == $type) ? 'post_title ASC ' : 'post_date DESC '; + $query = "SELECT * FROM $wpdb->posts $join $where ORDER BY $orderby $limit"; + $key = md5( $query ); + $key = "wp_get_archives:$key:$last_changed"; + if ( ! $results = wp_cache_get( $key, 'posts' ) ) { + $results = $wpdb->get_results( $query ); + wp_cache_set( $key, $results, 'posts' ); + } + if ( $results ) { + foreach ( (array) $results as $result ) { + if ( $result->post_date != '0000-00-00 00:00:00' ) { + $url = get_permalink( $result ); + if ( $result->post_title ) { + /** This filter is documented in wp-includes/post-template.php */ + $text = strip_tags( apply_filters( 'the_title', $result->post_title, $result->ID ) ); + } else { + $text = $result->ID; + } + $output .= get_archives_link($url, $text, $format, $before, $after); + } + } + } + } + if ( $echo ) + echo $output; + else + return $output; +} + +/** + * Get number of days since the start of the week. + * + * @since 1.5.0 + * + * @param int $num Number of day. + * @return int Days since the start of the week. + */ +function calendar_week_mod($num) { + $base = 7; + return ($num - $base*floor($num/$base)); +} + +/** + * Display calendar with days that have posts as links. + * + * The calendar is cached, which will be retrieved, if it exists. If there are + * no posts for the month, then it will not be displayed. + * + * @since 1.0.0 + * @uses calendar_week_mod() + * + * @param bool $initial Optional, default is true. Use initial calendar names. + * @param bool $echo Optional, default is true. Set to false for return. + * @return string|null String when retrieving, null when displaying. + */ +function get_calendar($initial = true, $echo = true) { + global $wpdb, $m, $monthnum, $year, $wp_locale, $posts; + + $cache = array(); + $key = md5( $m . $monthnum . $year ); + if ( $cache = wp_cache_get( 'get_calendar', 'calendar' ) ) { + if ( is_array($cache) && isset( $cache[ $key ] ) ) { + if ( $echo ) { + /** This filter is documented in wp-includes/general-template.php */ + echo apply_filters( 'get_calendar', $cache[$key] ); + return; + } else { + /** This filter is documented in wp-includes/general-template.php */ + return apply_filters( 'get_calendar', $cache[$key] ); + } + } + } + + if ( !is_array($cache) ) + $cache = array(); + + // Quick check. If we have no posts at all, abort! + if ( !$posts ) { + $gotsome = $wpdb->get_var("SELECT 1 as test FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' LIMIT 1"); + if ( !$gotsome ) { + $cache[ $key ] = ''; + wp_cache_set( 'get_calendar', $cache, 'calendar' ); + return; + } + } + + if ( isset($_GET['w']) ) + $w = ''.intval($_GET['w']); + + // week_begins = 0 stands for Sunday + $week_begins = intval(get_option('start_of_week')); + + // Let's figure out when we are + if ( !empty($monthnum) && !empty($year) ) { + $thismonth = ''.zeroise(intval($monthnum), 2); + $thisyear = ''.intval($year); + } elseif ( !empty($w) ) { + // We need to get the month from MySQL + $thisyear = ''.intval(substr($m, 0, 4)); + $d = (($w - 1) * 7) + 6; //it seems MySQL's weeks disagree with PHP's + $thismonth = $wpdb->get_var("SELECT DATE_FORMAT((DATE_ADD('{$thisyear}0101', INTERVAL $d DAY) ), '%m')"); + } elseif ( !empty($m) ) { + $thisyear = ''.intval(substr($m, 0, 4)); + if ( strlen($m) < 6 ) + $thismonth = '01'; + else + $thismonth = ''.zeroise(intval(substr($m, 4, 2)), 2); + } else { + $thisyear = gmdate('Y', current_time('timestamp')); + $thismonth = gmdate('m', current_time('timestamp')); + } + + $unixmonth = mktime(0, 0 , 0, $thismonth, 1, $thisyear); + $last_day = date('t', $unixmonth); + + // Get the next and previous month and year with at least one post + $previous = $wpdb->get_row("SELECT MONTH(post_date) AS month, YEAR(post_date) AS year + FROM $wpdb->posts + WHERE post_date < '$thisyear-$thismonth-01' + AND post_type = 'post' AND post_status = 'publish' + ORDER BY post_date DESC + LIMIT 1"); + $next = $wpdb->get_row("SELECT MONTH(post_date) AS month, YEAR(post_date) AS year + FROM $wpdb->posts + WHERE post_date > '$thisyear-$thismonth-{$last_day} 23:59:59' + AND post_type = 'post' AND post_status = 'publish' + ORDER BY post_date ASC + LIMIT 1"); + + /* translators: Calendar caption: 1: month name, 2: 4-digit year */ + $calendar_caption = _x('%1$s %2$s', 'calendar caption'); + $calendar_output = ' + + + '; + + $myweek = array(); + + for ( $wdcount=0; $wdcount<=6; $wdcount++ ) { + $myweek[] = $wp_locale->get_weekday(($wdcount+$week_begins)%7); + } + + foreach ( $myweek as $wd ) { + $day_name = (true == $initial) ? $wp_locale->get_weekday_initial($wd) : $wp_locale->get_weekday_abbrev($wd); + $wd = esc_attr($wd); + $calendar_output .= "\n\t\t"; + } + + $calendar_output .= ' + + + + + '; + + if ( $previous ) { + $calendar_output .= "\n\t\t".''; + } else { + $calendar_output .= "\n\t\t".''; + } + + $calendar_output .= "\n\t\t".''; + + if ( $next ) { + $calendar_output .= "\n\t\t".''; + } else { + $calendar_output .= "\n\t\t".''; + } + + $calendar_output .= ' + + + + + '; + + // Get days with posts + $dayswithposts = $wpdb->get_results("SELECT DISTINCT DAYOFMONTH(post_date) + FROM $wpdb->posts WHERE post_date >= '{$thisyear}-{$thismonth}-01 00:00:00' + AND post_type = 'post' AND post_status = 'publish' + AND post_date <= '{$thisyear}-{$thismonth}-{$last_day} 23:59:59'", ARRAY_N); + if ( $dayswithposts ) { + foreach ( (array) $dayswithposts as $daywith ) { + $daywithpost[] = $daywith[0]; + } + } else { + $daywithpost = array(); + } + + if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false || stripos($_SERVER['HTTP_USER_AGENT'], 'camino') !== false || stripos($_SERVER['HTTP_USER_AGENT'], 'safari') !== false) + $ak_title_separator = "\n"; + else + $ak_title_separator = ', '; + + $ak_titles_for_day = array(); + $ak_post_titles = $wpdb->get_results("SELECT ID, post_title, DAYOFMONTH(post_date) as dom " + ."FROM $wpdb->posts " + ."WHERE post_date >= '{$thisyear}-{$thismonth}-01 00:00:00' " + ."AND post_date <= '{$thisyear}-{$thismonth}-{$last_day} 23:59:59' " + ."AND post_type = 'post' AND post_status = 'publish'" + ); + if ( $ak_post_titles ) { + foreach ( (array) $ak_post_titles as $ak_post_title ) { + + /** This filter is documented in wp-includes/post-template.php */ + $post_title = esc_attr( apply_filters( 'the_title', $ak_post_title->post_title, $ak_post_title->ID ) ); + + if ( empty($ak_titles_for_day['day_'.$ak_post_title->dom]) ) + $ak_titles_for_day['day_'.$ak_post_title->dom] = ''; + if ( empty($ak_titles_for_day["$ak_post_title->dom"]) ) // first one + $ak_titles_for_day["$ak_post_title->dom"] = $post_title; + else + $ak_titles_for_day["$ak_post_title->dom"] .= $ak_title_separator . $post_title; + } + } + + // See how much we should pad in the beginning + $pad = calendar_week_mod(date('w', $unixmonth)-$week_begins); + if ( 0 != $pad ) + $calendar_output .= "\n\t\t".''; + + $daysinmonth = intval(date('t', $unixmonth)); + for ( $day = 1; $day <= $daysinmonth; ++$day ) { + if ( isset($newrow) && $newrow ) + $calendar_output .= "\n\t\n\t\n\t\t"; + $newrow = false; + + if ( $day == gmdate('j', current_time('timestamp')) && $thismonth == gmdate('m', current_time('timestamp')) && $thisyear == gmdate('Y', current_time('timestamp')) ) + $calendar_output .= ''; + + if ( 6 == calendar_week_mod(date('w', mktime(0, 0 , 0, $thismonth, $day, $thisyear))-$week_begins) ) + $newrow = true; + } + + $pad = 7 - calendar_week_mod(date('w', mktime(0, 0 , 0, $thismonth, $day, $thisyear))-$week_begins); + if ( $pad != 0 && $pad != 7 ) + $calendar_output .= "\n\t\t".''; + + $calendar_output .= "\n\t\n\t\n\t
            ' . sprintf($calendar_caption, $wp_locale->get_month($thismonth), date('Y', $unixmonth)) . '
            $day_name
            « ' . $wp_locale->get_month_abbrev($wp_locale->get_month($previous->month)) . '  ' . $wp_locale->get_month_abbrev($wp_locale->get_month($next->month)) . ' » 
             
            '; + else + $calendar_output .= ''; + + if ( in_array($day, $daywithpost) ) // any posts today? + $calendar_output .= '$day"; + else + $calendar_output .= $day; + $calendar_output .= ' 
            "; + + $cache[ $key ] = $calendar_output; + wp_cache_set( 'get_calendar', $cache, 'calendar' ); + + if ( $echo ) { + /** + * Filter the HTML calendar output. + * + * @since 3.0.0 + * + * @param string $calendar_output HTML output of the calendar. + */ + echo apply_filters( 'get_calendar', $calendar_output ); + } else { + /** This filter is documented in wp-includes/general-template.php */ + return apply_filters( 'get_calendar', $calendar_output ); + } + +} + +/** + * Purge the cached results of get_calendar. + * + * @see get_calendar + * @since 2.1.0 + */ +function delete_get_calendar_cache() { + wp_cache_delete( 'get_calendar', 'calendar' ); +} +add_action( 'save_post', 'delete_get_calendar_cache' ); +add_action( 'delete_post', 'delete_get_calendar_cache' ); +add_action( 'update_option_start_of_week', 'delete_get_calendar_cache' ); +add_action( 'update_option_gmt_offset', 'delete_get_calendar_cache' ); + +/** + * Display all of the allowed tags in HTML format with attributes. + * + * This is useful for displaying in the comment area, which elements and + * attributes are supported. As well as any plugins which want to display it. + * + * @since 1.0.1 + * @uses $allowedtags + * + * @return string HTML allowed tags entity encoded. + */ +function allowed_tags() { + global $allowedtags; + $allowed = ''; + foreach ( (array) $allowedtags as $tag => $attributes ) { + $allowed .= '<'.$tag; + if ( 0 < count($attributes) ) { + foreach ( $attributes as $attribute => $limits ) { + $allowed .= ' '.$attribute.'=""'; + } + } + $allowed .= '> '; + } + return htmlentities($allowed); +} + +/***** Date/Time tags *****/ + +/** + * Outputs the date in iso8601 format for xml files. + * + * @since 1.0.0 + */ +function the_date_xml() { + echo mysql2date( 'Y-m-d', get_post()->post_date, false ); +} + +/** + * Display or Retrieve the date the current post was written (once per date) + * + * Will only output the date if the current post's date is different from the + * previous one output. + * + * i.e. Only one date listing will show per day worth of posts shown in the loop, even if the + * function is called several times for each post. + * + * HTML output can be filtered with 'the_date'. + * Date string output can be filtered with 'get_the_date'. + * + * @since 0.71 + * + * @uses get_the_date() + * @param string $d Optional. PHP date format defaults to the date_format option if not specified. + * @param string $before Optional. Output before the date. + * @param string $after Optional. Output after the date. + * @param bool $echo Optional, default is display. Whether to echo the date or return it. + * @return string|null Null if displaying, string if retrieving. + */ +function the_date( $d = '', $before = '', $after = '', $echo = true ) { + global $currentday, $previousday; + + if ( $currentday != $previousday ) { + $the_date = $before . get_the_date( $d ) . $after; + $previousday = $currentday; + + /** + * Filter the date a post was published for display. + * + * @since 0.71 + * + * @param string $the_date The formatted date string. + * @param string $d PHP date format. Defaults to 'date_format' option + * if not specified. + * @param string $before HTML output before the date. + * @param string $after HTML output after the date. + */ + $the_date = apply_filters( 'the_date', $the_date, $d, $before, $after ); + + if ( $echo ) + echo $the_date; + else + return $the_date; + } + + return null; +} + +/** + * Retrieve the date on which the post was written. + * + * Unlike the_date() this function will always return the date. + * Modify output with 'get_the_date' filter. + * + * @since 3.0.0 + * + * @param string $d Optional. PHP date format defaults to the date_format option if not specified. + * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default current post. + * @return string Date the current post was written. + */ +function get_the_date( $d = '', $post = null ) { + $post = get_post( $post ); + + if ( '' == $d ) { + $the_date = mysql2date( get_option( 'date_format' ), $post->post_date ); + } else { + $the_date = mysql2date( $d, $post->post_date ); + } + + /** + * Filter the date a post was published. + * + * @since 3.0.0 + * + * @param string $the_date The formatted date. + * @param string $d PHP date format. Defaults to 'date_format' option + * if not specified. + * @param int|WP_Post $post The post object or ID. + */ + return apply_filters( 'get_the_date', $the_date, $d, $post ); +} + +/** + * Display the date on which the post was last modified. + * + * @since 2.1.0 + * + * @param string $d Optional. PHP date format defaults to the date_format option if not specified. + * @param string $before Optional. Output before the date. + * @param string $after Optional. Output after the date. + * @param bool $echo Optional, default is display. Whether to echo the date or return it. + * @return string|null Null if displaying, string if retrieving. + */ +function the_modified_date($d = '', $before='', $after='', $echo = true) { + + $the_modified_date = $before . get_the_modified_date($d) . $after; + + /** + * Filter the date a post was last modified for display. + * + * @since 2.1.0 + * + * @param string $the_modified_date The last modified date. + * @param string $d PHP date format. Defaults to 'date_format' option + * if not specified. + * @param string $before HTML output before the date. + * @param string $after HTML output after the date. + */ + $the_modified_date = apply_filters( 'the_modified_date', $the_modified_date, $d, $before, $after ); + + if ( $echo ) + echo $the_modified_date; + else + return $the_modified_date; + +} + +/** + * Retrieve the date on which the post was last modified. + * + * @since 2.1.0 + * + * @param string $d Optional. PHP date format. Defaults to the "date_format" option + * @return string + */ +function get_the_modified_date($d = '') { + if ( '' == $d ) + $the_time = get_post_modified_time(get_option('date_format'), null, null, true); + else + $the_time = get_post_modified_time($d, null, null, true); + + /** + * Filter the date a post was last modified. + * + * @since 2.1.0 + * + * @param string $the_time The formatted date. + * @param string $d PHP date format. Defaults to value specified in + * 'date_format' option. + */ + return apply_filters( 'get_the_modified_date', $the_time, $d ); +} + +/** + * Display the time at which the post was written. + * + * @since 0.71 + * + * @param string $d Either 'G', 'U', or php date format. + */ +function the_time( $d = '' ) { + /** + * Filter the time a post was written for display. + * + * @since 0.71 + * + * @param string $get_the_time The formatted time. + * @param string $d The time format. Accepts 'G', 'U', + * or php date format. + */ + echo apply_filters( 'the_time', get_the_time( $d ), $d ); +} + +/** + * Retrieve the time at which the post was written. + * + * @since 1.5.0 + * + * @param string $d Optional. Format to use for retrieving the time the post + * was written. Either 'G', 'U', or php date format defaults + * to the value specified in the time_format option. Default empty. + * @param int|WP_Post $post WP_Post object or ID. Default is global $post object. + * @return string|int Formatted date string, or Unix timestamp. + */ +function get_the_time( $d = '', $post = null ) { + $post = get_post($post); + + if ( '' == $d ) + $the_time = get_post_time(get_option('time_format'), false, $post, true); + else + $the_time = get_post_time($d, false, $post, true); + + /** + * Filter the time a post was written. + * + * @since 1.5.0 + * + * @param string $the_time The formatted time. + * @param string $d Format to use for retrieving the time the post was written. + * Accepts 'G', 'U', or php date format value specified + * in 'time_format' option. Default empty. + * @param int|WP_Post $post WP_Post object or ID. + */ + return apply_filters( 'get_the_time', $the_time, $d, $post ); +} + +/** + * Retrieve the time at which the post was written. + * + * @since 2.0.0 + * + * @param string $d Optional. Format to use for retrieving the time the post + * was written. Either 'G', 'U', or php date format. Default 'U'. + * @param bool $gmt Optional. Whether to retrieve the GMT time. Default false. + * @param int|WP_Post $post WP_Post object or ID. Default is global $post object. + * @param bool $translate Whether to translate the time string. Default false. + * @return string|int Formatted date string, or Unix timestamp. + */ +function get_post_time( $d = 'U', $gmt = false, $post = null, $translate = false ) { + $post = get_post($post); + + if ( $gmt ) + $time = $post->post_date_gmt; + else + $time = $post->post_date; + + $time = mysql2date($d, $time, $translate); + + /** + * Filter the localized time a post was written. + * + * @since 2.6.0 + * + * @param string $time The formatted time. + * @param string $d Format to use for retrieving the time the post was written. + * Accepts 'G', 'U', or php date format. Default 'U'. + * @param bool $gmt Whether to retrieve the GMT time. Default false. + */ + return apply_filters( 'get_post_time', $time, $d, $gmt ); +} + +/** + * Display the time at which the post was last modified. + * + * @since 2.0.0 + * + * @param string $d Optional Either 'G', 'U', or php date format defaults to the value specified in the time_format option. + */ +function the_modified_time($d = '') { + /** + * Filter the localized time a post was last modified, for display. + * + * @since 2.0.0 + * + * @param string $get_the_modified_time The formatted time. + * @param string $d The time format. Accepts 'G', 'U', + * or php date format. Defaults to value + * specified in 'time_format' option. + */ + echo apply_filters( 'the_modified_time', get_the_modified_time($d), $d ); +} + +/** + * Retrieve the time at which the post was last modified. + * + * @since 2.0.0 + * + * @param string $d Optional Either 'G', 'U', or php date format defaults to the value specified in the time_format option. + * @return string + */ +function get_the_modified_time($d = '') { + if ( '' == $d ) + $the_time = get_post_modified_time(get_option('time_format'), null, null, true); + else + $the_time = get_post_modified_time($d, null, null, true); + + /** + * Filter the localized time a post was last modified. + * + * @since 2.0.0 + * + * @param string $the_time The formatted time. + * @param string $d Format to use for retrieving the time the post was + * written. Accepts 'G', 'U', or php date format. Defaults + * to value specified in 'time_format' option. + */ + return apply_filters( 'get_the_modified_time', $the_time, $d ); +} + +/** + * Retrieve the time at which the post was last modified. + * + * @since 2.0.0 + * + * @param string $d Optional, default is 'U'. Either 'G', 'U', or php date format. + * @param bool $gmt Optional, default is false. Whether to return the gmt time. + * @param int|object $post Optional, default is global post object. A post_id or post object + * @param bool $translate Optional, default is false. Whether to translate the result + * @return string Returns timestamp + */ +function get_post_modified_time( $d = 'U', $gmt = false, $post = null, $translate = false ) { + $post = get_post($post); + + if ( $gmt ) + $time = $post->post_modified_gmt; + else + $time = $post->post_modified; + $time = mysql2date($d, $time, $translate); + + /** + * Filter the localized time a post was last modified. + * + * @since 2.8.0 + * + * @param string $time The formatted time. + * @param string $d The date format. Accepts 'G', 'U', or php date format. Default 'U'. + * @param bool $gmt Whether to return the GMT time. Default false. + */ + return apply_filters( 'get_post_modified_time', $time, $d, $gmt ); +} + +/** + * Display the weekday on which the post was written. + * + * @since 0.71 + * @uses $wp_locale + * @uses $post + */ +function the_weekday() { + global $wp_locale; + $the_weekday = $wp_locale->get_weekday( mysql2date( 'w', get_post()->post_date, false ) ); + + /** + * Filter the weekday on which the post was written, for display. + * + * @since 0.71 + * + * @param string $the_weekday + */ + $the_weekday = apply_filters( 'the_weekday', $the_weekday ); + echo $the_weekday; +} + +/** + * Display the weekday on which the post was written. + * + * Will only output the weekday if the current post's weekday is different from + * the previous one output. + * + * @since 0.71 + * + * @param string $before Optional Output before the date. + * @param string $after Optional Output after the date. + */ +function the_weekday_date($before='',$after='') { + global $wp_locale, $currentday, $previousweekday; + $the_weekday_date = ''; + if ( $currentday != $previousweekday ) { + $the_weekday_date .= $before; + $the_weekday_date .= $wp_locale->get_weekday( mysql2date( 'w', get_post()->post_date, false ) ); + $the_weekday_date .= $after; + $previousweekday = $currentday; + } + + /** + * Filter the localized date on which the post was written, for display. + * + * @since 0.71 + * + * @param string $the_weekday_date + * @param string $before The HTML to output before the date. + * @param string $after The HTML to output after the date. + */ + $the_weekday_date = apply_filters( 'the_weekday_date', $the_weekday_date, $before, $after ); + echo $the_weekday_date; +} + +/** + * Fire the wp_head action + * + * @since 1.2.0 + */ +function wp_head() { + /** + * Print scripts or data in the head tag on the front end. + * + * @since 1.5.0 + */ + do_action( 'wp_head' ); +} + +/** + * Fire the wp_footer action + * + * @since 1.5.1 + */ +function wp_footer() { + /** + * Print scripts or data before the closing body tag on the front end. + * + * @since 1.5.1 + */ + do_action( 'wp_footer' ); +} + +/** + * Display the links to the general feeds. + * + * @since 2.8.0 + * + * @param array $args Optional arguments. + */ +function feed_links( $args = array() ) { + if ( !current_theme_supports('automatic-feed-links') ) + return; + + $defaults = array( + /* translators: Separator between blog name and feed type in feed links */ + 'separator' => _x('»', 'feed link'), + /* translators: 1: blog title, 2: separator (raquo) */ + 'feedtitle' => __('%1$s %2$s Feed'), + /* translators: 1: blog title, 2: separator (raquo) */ + 'comstitle' => __('%1$s %2$s Comments Feed'), + ); + + $args = wp_parse_args( $args, $defaults ); + + echo '\n"; + echo '\n"; +} + +/** + * Display the links to the extra feeds such as category feeds. + * + * @since 2.8.0 + * + * @param array $args Optional arguments. + */ +function feed_links_extra( $args = array() ) { + $defaults = array( + /* translators: Separator between blog name and feed type in feed links */ + 'separator' => _x('»', 'feed link'), + /* translators: 1: blog name, 2: separator(raquo), 3: post title */ + 'singletitle' => __('%1$s %2$s %3$s Comments Feed'), + /* translators: 1: blog name, 2: separator(raquo), 3: category name */ + 'cattitle' => __('%1$s %2$s %3$s Category Feed'), + /* translators: 1: blog name, 2: separator(raquo), 3: tag name */ + 'tagtitle' => __('%1$s %2$s %3$s Tag Feed'), + /* translators: 1: blog name, 2: separator(raquo), 3: author name */ + 'authortitle' => __('%1$s %2$s Posts by %3$s Feed'), + /* translators: 1: blog name, 2: separator(raquo), 3: search phrase */ + 'searchtitle' => __('%1$s %2$s Search Results for “%3$s” Feed'), + /* translators: 1: blog name, 2: separator(raquo), 3: post type name */ + 'posttypetitle' => __('%1$s %2$s %3$s Feed'), + ); + + $args = wp_parse_args( $args, $defaults ); + + if ( is_singular() ) { + $id = 0; + $post = get_post( $id ); + + if ( comments_open() || pings_open() || $post->comment_count > 0 ) { + $title = sprintf( $args['singletitle'], get_bloginfo('name'), $args['separator'], the_title_attribute( array( 'echo' => false ) ) ); + $href = get_post_comments_feed_link( $post->ID ); + } + } elseif ( is_post_type_archive() ) { + $post_type = get_query_var( 'post_type' ); + if ( is_array( $post_type ) ) + $post_type = reset( $post_type ); + + $post_type_obj = get_post_type_object( $post_type ); + $title = sprintf( $args['posttypetitle'], get_bloginfo( 'name' ), $args['separator'], $post_type_obj->labels->name ); + $href = get_post_type_archive_feed_link( $post_type_obj->name ); + } elseif ( is_category() ) { + $term = get_queried_object(); + + if ( $term ) { + $title = sprintf( $args['cattitle'], get_bloginfo('name'), $args['separator'], $term->name ); + $href = get_category_feed_link( $term->term_id ); + } + } elseif ( is_tag() ) { + $term = get_queried_object(); + + if ( $term ) { + $title = sprintf( $args['tagtitle'], get_bloginfo('name'), $args['separator'], $term->name ); + $href = get_tag_feed_link( $term->term_id ); + } + } elseif ( is_author() ) { + $author_id = intval( get_query_var('author') ); + + $title = sprintf( $args['authortitle'], get_bloginfo('name'), $args['separator'], get_the_author_meta( 'display_name', $author_id ) ); + $href = get_author_feed_link( $author_id ); + } elseif ( is_search() ) { + $title = sprintf( $args['searchtitle'], get_bloginfo('name'), $args['separator'], get_search_query( false ) ); + $href = get_search_feed_link(); + } elseif ( is_post_type_archive() ) { + $title = sprintf( $args['posttypetitle'], get_bloginfo('name'), $args['separator'], post_type_archive_title( '', false ) ); + $post_type_obj = get_queried_object(); + if ( $post_type_obj ) + $href = get_post_type_archive_feed_link( $post_type_obj->name ); + } + + if ( isset($title) && isset($href) ) + echo '' . "\n"; +} + +/** + * Display the link to the Really Simple Discovery service endpoint. + * + * @link http://archipelago.phrasewise.com/rsd + * @since 2.0.0 + */ +function rsd_link() { + echo '\n"; +} + +/** + * Display the link to the Windows Live Writer manifest file. + * + * @link http://msdn.microsoft.com/en-us/library/bb463265.aspx + * @since 2.3.1 + */ +function wlwmanifest_link() { + echo ' ' . "\n"; +} + +/** + * Display a noindex meta tag if required by the blog configuration. + * + * If a blog is marked as not being public then the noindex meta tag will be + * output to tell web robots not to index the page content. Add this to the wp_head action. + * Typical usage is as a wp_head callback. add_action( 'wp_head', 'noindex' ); + * + * @see wp_no_robots + * + * @since 2.1.0 + */ +function noindex() { + // If the blog is not public, tell robots to go away. + if ( '0' == get_option('blog_public') ) + wp_no_robots(); +} + +/** + * Display a noindex meta tag. + * + * Outputs a noindex meta tag that tells web robots not to index the page content. + * Typical usage is as a wp_head callback. add_action( 'wp_head', 'wp_no_robots' ); + * + * @since 3.3.0 + */ +function wp_no_robots() { + echo "\n"; +} + +/** + * Whether the user should have a WYSIWIG editor. + * + * Checks that the user requires a WYSIWIG editor and that the editor is + * supported in the users browser. + * + * @since 2.0.0 + * + * @return bool + */ +function user_can_richedit() { + global $wp_rich_edit, $is_gecko, $is_opera, $is_safari, $is_chrome, $is_IE; + + if ( !isset($wp_rich_edit) ) { + $wp_rich_edit = false; + + if ( get_user_option( 'rich_editing' ) == 'true' || ! is_user_logged_in() ) { // default to 'true' for logged out users + if ( $is_safari ) { + $wp_rich_edit = ! wp_is_mobile() || ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval( $match[1] ) >= 534 ); + } elseif ( $is_gecko || $is_chrome || $is_IE || ( $is_opera && !wp_is_mobile() ) ) { + $wp_rich_edit = true; + } + } + } + + /** + * Filter whether the user can access the rich (Visual) editor. + * + * @since 2.1.0 + * + * @param bool $wp_rich_edit Whether the user can access to the rich (Visual) editor. + */ + return apply_filters( 'user_can_richedit', $wp_rich_edit ); +} + +/** + * Find out which editor should be displayed by default. + * + * Works out which of the two editors to display as the current editor for a + * user. The 'html' setting is for the "Text" editor tab. + * + * @since 2.5.0 + * + * @return string Either 'tinymce', or 'html', or 'test' + */ +function wp_default_editor() { + $r = user_can_richedit() ? 'tinymce' : 'html'; // defaults + if ( $user = wp_get_current_user() ) { // look for cookie + $ed = get_user_setting('editor', 'tinymce'); + $r = ( in_array($ed, array('tinymce', 'html', 'test') ) ) ? $ed : $r; + } + + /** + * Filter which editor should be displayed by default. + * + * @since 2.5.0 + * + * @param array $r An array of editors. Accepts 'tinymce', 'html', 'test'. + */ + return apply_filters( 'wp_default_editor', $r ); +} + +/** + * Renders an editor. + * + * Using this function is the proper way to output all needed components for both TinyMCE and Quicktags. + * _WP_Editors should not be used directly. See http://core.trac.wordpress.org/ticket/17144. + * + * NOTE: Once initialized the TinyMCE editor cannot be safely moved in the DOM. For that reason + * running wp_editor() inside of a metabox is not a good idea unless only Quicktags is used. + * On the post edit screen several actions can be used to include additional editors + * containing TinyMCE: 'edit_page_form', 'edit_form_advanced' and 'dbx_post_sidebar'. + * See http://core.trac.wordpress.org/ticket/19173 for more information. + * + * @see wp-includes/class-wp-editor.php + * @since 3.3.0 + * + * @param string $content Initial content for the editor. + * @param string $editor_id HTML ID attribute value for the textarea and TinyMCE. Can only be /[a-z]+/. + * @param array $settings See _WP_Editors::editor(). + */ +function wp_editor( $content, $editor_id, $settings = array() ) { + if ( ! class_exists( '_WP_Editors' ) ) + require( ABSPATH . WPINC . '/class-wp-editor.php' ); + + _WP_Editors::editor($content, $editor_id, $settings); +} + +/** + * Retrieve the contents of the search WordPress query variable. + * + * The search query string is passed through {@link esc_attr()} + * to ensure that it is safe for placing in an html attribute. + * + * @since 2.3.0 + * @uses esc_attr() + * + * @param bool $escaped Whether the result is escaped. Default true. + * Only use when you are later escaping it. Do not use unescaped. + * @return string + */ +function get_search_query( $escaped = true ) { + /** + * Filter the contents of the search query variable. + * + * @since 2.3.0 + * + * @param mixed $search Contents of the search query variable. + */ + $query = apply_filters( 'get_search_query', get_query_var( 's' ) ); + + if ( $escaped ) + $query = esc_attr( $query ); + return $query; +} + +/** + * Display the contents of the search query variable. + * + * The search query string is passed through {@link esc_attr()} + * to ensure that it is safe for placing in an html attribute. + * + * @uses esc_attr() + * @since 2.1.0 + */ +function the_search_query() { + /** + * Filter the contents of the search query variable for display. + * + * @since 2.3.0 + * + * @param mixed $search Contents of the search query variable. + */ + echo esc_attr( apply_filters( 'the_search_query', get_search_query( false ) ) ); +} + +/** + * Display the language attributes for the html tag. + * + * Builds up a set of html attributes containing the text direction and language + * information for the page. + * + * @since 2.1.0 + * + * @param string $doctype The type of html document (xhtml|html). + */ +function language_attributes($doctype = 'html') { + $attributes = array(); + $output = ''; + + if ( function_exists( 'is_rtl' ) && is_rtl() ) + $attributes[] = 'dir="rtl"'; + + if ( $lang = get_bloginfo('language') ) { + if ( get_option('html_type') == 'text/html' || $doctype == 'html' ) + $attributes[] = "lang=\"$lang\""; + + if ( get_option('html_type') != 'text/html' || $doctype == 'xhtml' ) + $attributes[] = "xml:lang=\"$lang\""; + } + + $output = implode(' ', $attributes); + + /** + * Filter the language attributes for display in the html tag. + * + * @since 2.5.0 + * + * @param string $output A space-separated list of language attributes. + */ + echo apply_filters( 'language_attributes', $output ); +} + +/** + * Retrieve paginated link for archive post pages. + * + * Technically, the function can be used to create paginated link list for any + * area. The 'base' argument is used to reference the url, which will be used to + * create the paginated links. The 'format' argument is then used for replacing + * the page number. It is however, most likely and by default, to be used on the + * archive post pages. + * + * The 'type' argument controls format of the returned value. The default is + * 'plain', which is just a string with the links separated by a newline + * character. The other possible values are either 'array' or 'list'. The + * 'array' value will return an array of the paginated link list to offer full + * control of display. The 'list' value will place all of the paginated links in + * an unordered HTML list. + * + * The 'total' argument is the total amount of pages and is an integer. The + * 'current' argument is the current page number and is also an integer. + * + * An example of the 'base' argument is "http://example.com/all_posts.php%_%" + * and the '%_%' is required. The '%_%' will be replaced by the contents of in + * the 'format' argument. An example for the 'format' argument is "?page=%#%" + * and the '%#%' is also required. The '%#%' will be replaced with the page + * number. + * + * You can include the previous and next links in the list by setting the + * 'prev_next' argument to true, which it is by default. You can set the + * previous text, by using the 'prev_text' argument. You can set the next text + * by setting the 'next_text' argument. + * + * If the 'show_all' argument is set to true, then it will show all of the pages + * instead of a short list of the pages near the current page. By default, the + * 'show_all' is set to false and controlled by the 'end_size' and 'mid_size' + * arguments. The 'end_size' argument is how many numbers on either the start + * and the end list edges, by default is 1. The 'mid_size' argument is how many + * numbers to either side of current page, but not including current page. + * + * It is possible to add query vars to the link by using the 'add_args' argument + * and see {@link add_query_arg()} for more information. + * + * The 'before_page_number' and 'after_page_number' arguments allow users to + * augment the links themselves. Typically this might be to add context to the + * numbered links so that screen reader users understand what the links are for. + * The text strings are added before and after the page number - within the + * anchor tag. + * + * @since 2.1.0 + * + * @param string|array $args Optional. Override defaults. + * @return array|string String of page links or array of page links. + */ +function paginate_links( $args = '' ) { + $defaults = array( + 'base' => '%_%', // http://example.com/all_posts.php%_% : %_% is replaced by format (below) + 'format' => '?page=%#%', // ?page=%#% : %#% is replaced by the page number + 'total' => 1, + 'current' => 0, + 'show_all' => false, + 'prev_next' => true, + 'prev_text' => __('« Previous'), + 'next_text' => __('Next »'), + 'end_size' => 1, + 'mid_size' => 2, + 'type' => 'plain', + 'add_args' => false, // array of query args to add + 'add_fragment' => '', + 'before_page_number' => '', + 'after_page_number' => '' + ); + + $args = wp_parse_args( $args, $defaults ); + extract($args, EXTR_SKIP); + + // Who knows what else people pass in $args + $total = (int) $total; + if ( $total < 2 ) + return; + $current = (int) $current; + $end_size = 0 < (int) $end_size ? (int) $end_size : 1; // Out of bounds? Make it the default. + $mid_size = 0 <= (int) $mid_size ? (int) $mid_size : 2; + $add_args = is_array($add_args) ? $add_args : false; + $r = ''; + $page_links = array(); + $n = 0; + $dots = false; + + if ( $prev_next && $current && 1 < $current ) : + $link = str_replace('%_%', 2 == $current ? '' : $format, $base); + $link = str_replace('%#%', $current - 1, $link); + if ( $add_args ) + $link = add_query_arg( $add_args, $link ); + $link .= $add_fragment; + + /** + * Filter the paginated links for the given archive pages. + * + * @since 3.0.0 + * + * @param string $link The paginated link URL. + */ + $page_links[] = ''; + endif; + for ( $n = 1; $n <= $total; $n++ ) : + if ( $n == $current ) : + $page_links[] = "" . $before_page_number . number_format_i18n( $n ) . $after_page_number . ""; + $dots = true; + else : + if ( $show_all || ( $n <= $end_size || ( $current && $n >= $current - $mid_size && $n <= $current + $mid_size ) || $n > $total - $end_size ) ) : + $link = str_replace('%_%', 1 == $n ? '' : $format, $base); + $link = str_replace('%#%', $n, $link); + if ( $add_args ) + $link = add_query_arg( $add_args, $link ); + $link .= $add_fragment; + + /** This filter is documented in wp-includes/general-template.php */ + $page_links[] = "" . $before_page_number . number_format_i18n( $n ) . $after_page_number . ""; + $dots = true; + elseif ( $dots && !$show_all ) : + $page_links[] = '' . __( '…' ) . ''; + $dots = false; + endif; + endif; + endfor; + if ( $prev_next && $current && ( $current < $total || -1 == $total ) ) : + $link = str_replace('%_%', $format, $base); + $link = str_replace('%#%', $current + 1, $link); + if ( $add_args ) + $link = add_query_arg( $add_args, $link ); + $link .= $add_fragment; + + /** This filter is documented in wp-includes/general-template.php */ + $page_links[] = ''; + endif; + switch ( $type ) : + case 'array' : + return $page_links; + break; + case 'list' : + $r .= "
              \n\t
            • "; + $r .= join("
            • \n\t
            • ", $page_links); + $r .= "
            • \n
            \n"; + break; + default : + $r = join("\n", $page_links); + break; + endswitch; + return $r; +} + +/** + * Registers an admin colour scheme css file. + * + * Allows a plugin to register a new admin colour scheme. For example: + * + * wp_admin_css_color('classic', __('Classic'), admin_url("css/colors-classic.css"), + * array('#07273E', '#14568A', '#D54E21', '#2683AE')); + * + * + * @since 2.5.0 + * + * @param string $key The unique key for this theme. + * @param string $name The name of the theme. + * @param string $url The url of the css file containing the colour scheme. + * @param array $colors Optional An array of CSS color definitions which are used to give the user a feel for the theme. + * @param array $icons Optional An array of CSS color definitions used to color any SVG icons + */ +function wp_admin_css_color( $key, $name, $url, $colors = array(), $icons = array() ) { + global $_wp_admin_css_colors; + + if ( !isset($_wp_admin_css_colors) ) + $_wp_admin_css_colors = array(); + + $_wp_admin_css_colors[$key] = (object) array( + 'name' => $name, + 'url' => $url, + 'colors' => $colors, + 'icon_colors' => $icons, + ); +} + +/** + * Registers the default Admin color schemes + * + * @since 3.0.0 + */ +function register_admin_color_schemes() { + $suffix = is_rtl() ? '-rtl' : ''; + $suffix .= defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + + wp_admin_css_color( 'fresh', _x( 'Default', 'admin color scheme' ), + false, + array( '#222', '#333', '#0074a2', '#2ea2cc' ), + array( 'base' => '#999', 'focus' => '#2ea2cc', 'current' => '#fff' ) + ); + + // Other color schemes are not available when running out of src + if ( false !== strpos( $GLOBALS['wp_version'], '-src' ) ) + return; + + wp_admin_css_color( 'light', _x( 'Light', 'admin color scheme' ), + admin_url( "css/colors/light/colors$suffix.css" ), + array( '#e5e5e5', '#999', '#d64e07', '#04a4cc' ), + array( 'base' => '#999', 'focus' => '#ccc', 'current' => '#ccc' ) + ); + + wp_admin_css_color( 'blue', _x( 'Blue', 'admin color scheme' ), + admin_url( "css/colors/blue/colors$suffix.css" ), + array( '#096484', '#4796b3', '#52accc', '#74B6CE' ), + array( 'base' => '#e5f8ff', 'focus' => '#fff', 'current' => '#fff' ) + ); + + wp_admin_css_color( 'midnight', _x( 'Midnight', 'admin color scheme' ), + admin_url( "css/colors/midnight/colors$suffix.css" ), + array( '#25282b', '#363b3f', '#69a8bb', '#e14d43' ), + array( 'base' => '#f1f2f3', 'focus' => '#fff', 'current' => '#fff' ) + ); + + wp_admin_css_color( 'sunrise', _x( 'Sunrise', 'admin color scheme' ), + admin_url( "css/colors/sunrise/colors$suffix.css" ), + array( '#b43c38', '#cf4944', '#dd823b', '#ccaf0b' ), + array( 'base' => '#f3f1f1', 'focus' => '#fff', 'current' => '#fff' ) + ); + + wp_admin_css_color( 'ectoplasm', _x( 'Ectoplasm', 'admin color scheme' ), + admin_url( "css/colors/ectoplasm/colors$suffix.css" ), + array( '#413256', '#523f6d', '#a3b745', '#d46f15' ), + array( 'base' => '#ece6f6', 'focus' => '#fff', 'current' => '#fff' ) + ); + + wp_admin_css_color( 'ocean', _x( 'Ocean', 'admin color scheme' ), + admin_url( "css/colors/ocean/colors$suffix.css" ), + array( '#627c83', '#738e96', '#9ebaa0', '#aa9d88' ), + array( 'base' => '#f2fcff', 'focus' => '#fff', 'current' => '#fff' ) + ); + + wp_admin_css_color( 'coffee', _x( 'Coffee', 'admin color scheme' ), + admin_url( "css/colors/coffee/colors$suffix.css" ), + array( '#46403c', '#59524c', '#c7a589', '#9ea476' ), + array( 'base' => '#f3f2f1', 'focus' => '#fff', 'current' => '#fff' ) + ); + +} + +/** + * Display the URL of a WordPress admin CSS file. + * + * @see WP_Styles::_css_href and its style_loader_src filter. + * + * @since 2.3.0 + * + * @param string $file file relative to wp-admin/ without its ".css" extension. + */ +function wp_admin_css_uri( $file = 'wp-admin' ) { + if ( defined('WP_INSTALLING') ) { + $_file = "./$file.css"; + } else { + $_file = admin_url("$file.css"); + } + $_file = add_query_arg( 'version', get_bloginfo( 'version' ), $_file ); + + /** + * Filter the URI of a WordPress admin CSS file. + * + * @since 2.3.0 + * + * @param string $_file Relative path to the file with query arguments attached. + * @param string $file Relative path to the file, minus its ".css" extension. + */ + return apply_filters( 'wp_admin_css_uri', $_file, $file ); +} + +/** + * Enqueues or directly prints a stylesheet link to the specified CSS file. + * + * "Intelligently" decides to enqueue or to print the CSS file. If the + * 'wp_print_styles' action has *not* yet been called, the CSS file will be + * enqueued. If the wp_print_styles action *has* been called, the CSS link will + * be printed. Printing may be forced by passing true as the $force_echo + * (second) parameter. + * + * For backward compatibility with WordPress 2.3 calling method: If the $file + * (first) parameter does not correspond to a registered CSS file, we assume + * $file is a file relative to wp-admin/ without its ".css" extension. A + * stylesheet link to that generated URL is printed. + * + * @since 2.3.0 + * @uses $wp_styles WordPress Styles Object + * + * @param string $file Optional. Style handle name or file name (without ".css" extension) relative + * to wp-admin/. Defaults to 'wp-admin'. + * @param bool $force_echo Optional. Force the stylesheet link to be printed rather than enqueued. + */ +function wp_admin_css( $file = 'wp-admin', $force_echo = false ) { + global $wp_styles; + if ( !is_a($wp_styles, 'WP_Styles') ) + $wp_styles = new WP_Styles(); + + // For backward compatibility + $handle = 0 === strpos( $file, 'css/' ) ? substr( $file, 4 ) : $file; + + if ( $wp_styles->query( $handle ) ) { + if ( $force_echo || did_action( 'wp_print_styles' ) ) // we already printed the style queue. Print this one immediately + wp_print_styles( $handle ); + else // Add to style queue + wp_enqueue_style( $handle ); + return; + } + + /** + * Filter the stylesheet link to the specified CSS file. + * + * If the site is set to display right-to-left, the RTL stylesheet link + * will be used instead. + * + * @since 2.3.0 + * + * @param string $file Style handle name or filename (without ".css" extension) + * relative to wp-admin/. Defaults to 'wp-admin'. + */ + echo apply_filters( 'wp_admin_css', "\n", $file ); + + if ( function_exists( 'is_rtl' ) && is_rtl() ) { + /** This filter is documented in wp-includes/general-template.php */ + echo apply_filters( 'wp_admin_css', "\n", "$file-rtl" ); + } +} + +/** + * Enqueues the default ThickBox js and css. + * + * If any of the settings need to be changed, this can be done with another js + * file similar to media-upload.js. That file should + * require array('thickbox') to ensure it is loaded after. + * + * @since 2.5.0 + */ +function add_thickbox() { + wp_enqueue_script( 'thickbox' ); + wp_enqueue_style( 'thickbox' ); + + if ( is_network_admin() ) + add_action( 'admin_head', '_thickbox_path_admin_subfolder' ); +} + +/** + * Display the XHTML generator that is generated on the wp_head hook. + * + * @since 2.5.0 + */ +function wp_generator() { + /** + * Filter the output of the XHTML generator tag. + * + * @since 2.5.0 + * + * @param string $generator_type The XHTML generator. + */ + the_generator( apply_filters( 'wp_generator_type', 'xhtml' ) ); +} + +/** + * Display the generator XML or Comment for RSS, ATOM, etc. + * + * Returns the correct generator type for the requested output format. Allows + * for a plugin to filter generators overall the the_generator filter. + * + * @since 2.5.0 + * + * @param string $type The type of generator to output - (html|xhtml|atom|rss2|rdf|comment|export). + */ +function the_generator( $type ) { + /** + * Filter the output of the XHTML generator tag for display. + * + * @since 2.5.0 + * + * @param string $generator_type The generator output. + * @param string $type The type of generator to output. Accepts 'html', + * 'xhtml', 'atom', 'rss2', 'rdf', 'comment', 'export'. + */ + echo apply_filters( 'the_generator', get_the_generator($type), $type ) . "\n"; +} + +/** + * Creates the generator XML or Comment for RSS, ATOM, etc. + * + * Returns the correct generator type for the requested output format. Allows + * for a plugin to filter generators on an individual basis using the + * 'get_the_generator_{$type}' filter. + * + * @since 2.5.0 + * + * @param string $type The type of generator to return - (html|xhtml|atom|rss2|rdf|comment|export). + * @return string The HTML content for the generator. + */ +function get_the_generator( $type = '' ) { + if ( empty( $type ) ) { + + $current_filter = current_filter(); + if ( empty( $current_filter ) ) + return; + + switch ( $current_filter ) { + case 'rss2_head' : + case 'commentsrss2_head' : + $type = 'rss2'; + break; + case 'rss_head' : + case 'opml_head' : + $type = 'comment'; + break; + case 'rdf_header' : + $type = 'rdf'; + break; + case 'atom_head' : + case 'comments_atom_head' : + case 'app_head' : + $type = 'atom'; + break; + } + } + + switch ( $type ) { + case 'html': + $gen = ''; + break; + case 'xhtml': + $gen = ''; + break; + case 'atom': + $gen = 'WordPress'; + break; + case 'rss2': + $gen = 'http://wordpress.org/?v=' . get_bloginfo_rss( 'version' ) . ''; + break; + case 'rdf': + $gen = ''; + break; + case 'comment': + $gen = ''; + break; + case 'export': + $gen = ''; + break; + } + + /** + * Filter the HTML for the retrieved generator type. + * + * The dynamic portion of the hook name, $type, refers to the generator type. + * + * @since 2.5.0 + * + * @param string $gen The HTML markup output to 'wp_head()'. + * @param string $type The type of generator. Accepts 'html', 'xhtml', 'atom', + * 'rss2', 'rdf', 'comment', 'export'. + */ + return apply_filters( "get_the_generator_{$type}", $gen, $type ); +} + +/** + * Outputs the html checked attribute. + * + * Compares the first two arguments and if identical marks as checked + * + * @since 1.0.0 + * + * @param mixed $checked One of the values to compare + * @param mixed $current (true) The other value to compare if not just true + * @param bool $echo Whether to echo or just return the string + * @return string html attribute or empty string + */ +function checked( $checked, $current = true, $echo = true ) { + return __checked_selected_helper( $checked, $current, $echo, 'checked' ); +} + +/** + * Outputs the html selected attribute. + * + * Compares the first two arguments and if identical marks as selected + * + * @since 1.0.0 + * + * @param mixed $selected One of the values to compare + * @param mixed $current (true) The other value to compare if not just true + * @param bool $echo Whether to echo or just return the string + * @return string html attribute or empty string + */ +function selected( $selected, $current = true, $echo = true ) { + return __checked_selected_helper( $selected, $current, $echo, 'selected' ); +} + +/** + * Outputs the html disabled attribute. + * + * Compares the first two arguments and if identical marks as disabled + * + * @since 3.0.0 + * + * @param mixed $disabled One of the values to compare + * @param mixed $current (true) The other value to compare if not just true + * @param bool $echo Whether to echo or just return the string + * @return string html attribute or empty string + */ +function disabled( $disabled, $current = true, $echo = true ) { + return __checked_selected_helper( $disabled, $current, $echo, 'disabled' ); +} + +/** + * Private helper function for checked, selected, and disabled. + * + * Compares the first two arguments and if identical marks as $type + * + * @since 2.8.0 + * @access private + * + * @param mixed $helper One of the values to compare + * @param mixed $current (true) The other value to compare if not just true + * @param bool $echo Whether to echo or just return the string + * @param string $type The type of checked|selected|disabled we are doing + * @return string html attribute or empty string + */ +function __checked_selected_helper( $helper, $current, $echo, $type ) { + if ( (string) $helper === (string) $current ) + $result = " $type='$type'"; + else + $result = ''; + + if ( $echo ) + echo $result; + + return $result; +} + +/** + * Default settings for heartbeat + * + * Outputs the nonce used in the heartbeat XHR + * + * @since 3.6.0 + * + * @param array $settings + * @return array $settings + */ +function wp_heartbeat_settings( $settings ) { + if ( ! is_admin() ) + $settings['ajaxurl'] = admin_url( 'admin-ajax.php', 'relative' ); + + if ( is_user_logged_in() ) + $settings['nonce'] = wp_create_nonce( 'heartbeat-nonce' ); + + return $settings; +} diff --git a/wp-includes/http.php b/wp-includes/http.php new file mode 100644 index 0000000..57746ff --- /dev/null +++ b/wp-includes/http.php @@ -0,0 +1,558 @@ +request( $url, $args ); +} + +/** + * Retrieve the raw response from a safe HTTP request using the GET method. + * + * This function is ideal when the HTTP request is being made to an arbitrary + * URL. The URL is validated to avoid redirection and request forgery attacks. + * + * @see wp_remote_request() For more information on the response array format + * and default arguments. + * + * @since 3.6.0 + * + * @param string $url Site URL to retrieve. + * @param array $args Optional. Override the defaults. + * @return WP_Error|array The response or WP_Error on failure. + */ +function wp_safe_remote_get( $url, $args = array() ) { + $args['reject_unsafe_urls'] = true; + $http = _wp_http_get_object(); + return $http->get( $url, $args ); +} + +/** + * Retrieve the raw response from a safe HTTP request using the POST method. + * + * This function is ideal when the HTTP request is being made to an arbitrary + * URL. The URL is validated to avoid redirection and request forgery attacks. + * + * @see wp_remote_request() For more information on the response array format + * and default arguments. + * + * @since 3.6.0 + * + * @param string $url Site URL to retrieve. + * @param array $args Optional. Override the defaults. + * @return WP_Error|array The response or WP_Error on failure. + */ +function wp_safe_remote_post( $url, $args = array() ) { + $args['reject_unsafe_urls'] = true; + $http = _wp_http_get_object(); + return $http->post( $url, $args ); +} + +/** + * Retrieve the raw response from a safe HTTP request using the HEAD method. + * + * This function is ideal when the HTTP request is being made to an arbitrary + * URL. The URL is validated to avoid redirection and request forgery attacks. + * + * @see wp_remote_request() For more information on the response array format + * and default arguments. + * + * @since 3.6.0 + * + * @param string $url Site URL to retrieve. + * @param array $args Optional. Override the defaults. + * @return WP_Error|array The response or WP_Error on failure. + */ +function wp_safe_remote_head( $url, $args = array() ) { + $args['reject_unsafe_urls'] = true; + $http = _wp_http_get_object(); + return $http->head( $url, $args ); +} + +/** + * Retrieve the raw response from the HTTP request. + * + * The array structure is a little complex. + * + * + * $res = array( 'headers' => array(), 'response' => array('code' => int, 'message' => string) ); + * + * + * All of the headers in $res['headers'] are with the name as the key and the + * value as the value. So to get the User-Agent, you would do the following. + * + * + * $user_agent = $res['headers']['user-agent']; + * + * + * The body is the raw response content and can be retrieved from $res['body']. + * + * This function is called first to make the request and there are other API + * functions to abstract out the above convoluted setup. + * + * List of default arguments: + * 'method' => 'GET' + * - Default 'GET' for wp_remote_get() + * - Default 'POST' for wp_remote_post() + * - Default 'HEAD' for wp_remote_head() + * 'timeout' => 5 + * 'redirection' => 5 + * 'httpversion' => '1.0' + * 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ) + * 'blocking' => true + * 'headers' => array() + * 'cookies' => array() + * 'body' => null + * 'compress' => false, + * 'decompress' => true, + * 'sslverify' => true, + * 'stream' => false, + * 'filename' => null + * + * @since 2.7.0 + * + * @param string $url Site URL to retrieve. + * @param array $args Optional. Override the defaults. + * @return WP_Error|array The response or WP_Error on failure. + */ +function wp_remote_request($url, $args = array()) { + $objFetchSite = _wp_http_get_object(); + return $objFetchSite->request($url, $args); +} + +/** + * Retrieve the raw response from the HTTP request using the GET method. + * + * @see wp_remote_request() For more information on the response array format and default arguments. + * + * @since 2.7.0 + * + * @param string $url Site URL to retrieve. + * @param array $args Optional. Override the defaults. + * @return WP_Error|array The response or WP_Error on failure. + */ +function wp_remote_get($url, $args = array()) { + $objFetchSite = _wp_http_get_object(); + return $objFetchSite->get($url, $args); +} + +/** + * Retrieve the raw response from the HTTP request using the POST method. + * + * @see wp_remote_request() For more information on the response array format and default arguments. + * + * @since 2.7.0 + * + * @param string $url Site URL to retrieve. + * @param array $args Optional. Override the defaults. + * @return WP_Error|array The response or WP_Error on failure. + */ +function wp_remote_post($url, $args = array()) { + $objFetchSite = _wp_http_get_object(); + return $objFetchSite->post($url, $args); +} + +/** + * Retrieve the raw response from the HTTP request using the HEAD method. + * + * @see wp_remote_request() For more information on the response array format and default arguments. + * + * @since 2.7.0 + * + * @param string $url Site URL to retrieve. + * @param array $args Optional. Override the defaults. + * @return WP_Error|array The response or WP_Error on failure. + */ +function wp_remote_head($url, $args = array()) { + $objFetchSite = _wp_http_get_object(); + return $objFetchSite->head($url, $args); +} + +/** + * Retrieve only the headers from the raw response. + * + * @since 2.7.0 + * + * @param array $response HTTP response. + * @return array The headers of the response. Empty array if incorrect parameter given. + */ +function wp_remote_retrieve_headers(&$response) { + if ( is_wp_error($response) || ! isset($response['headers']) || ! is_array($response['headers'])) + return array(); + + return $response['headers']; +} + +/** + * Retrieve a single header by name from the raw response. + * + * @since 2.7.0 + * + * @param array $response + * @param string $header Header name to retrieve value from. + * @return string The header value. Empty string on if incorrect parameter given, or if the header doesn't exist. + */ +function wp_remote_retrieve_header(&$response, $header) { + if ( is_wp_error($response) || ! isset($response['headers']) || ! is_array($response['headers'])) + return ''; + + if ( array_key_exists($header, $response['headers']) ) + return $response['headers'][$header]; + + return ''; +} + +/** + * Retrieve only the response code from the raw response. + * + * Will return an empty array if incorrect parameter value is given. + * + * @since 2.7.0 + * + * @param array $response HTTP response. + * @return string the response code. Empty string on incorrect parameter given. + */ +function wp_remote_retrieve_response_code(&$response) { + if ( is_wp_error($response) || ! isset($response['response']) || ! is_array($response['response'])) + return ''; + + return $response['response']['code']; +} + +/** + * Retrieve only the response message from the raw response. + * + * Will return an empty array if incorrect parameter value is given. + * + * @since 2.7.0 + * + * @param array $response HTTP response. + * @return string The response message. Empty string on incorrect parameter given. + */ +function wp_remote_retrieve_response_message(&$response) { + if ( is_wp_error($response) || ! isset($response['response']) || ! is_array($response['response'])) + return ''; + + return $response['response']['message']; +} + +/** + * Retrieve only the body from the raw response. + * + * @since 2.7.0 + * + * @param array $response HTTP response. + * @return string The body of the response. Empty string if no body or incorrect parameter given. + */ +function wp_remote_retrieve_body(&$response) { + if ( is_wp_error($response) || ! isset($response['body']) ) + return ''; + + return $response['body']; +} + +/** + * Determines if there is an HTTP Transport that can process this request. + * + * @since 3.2.0 + * + * @param array $capabilities Array of capabilities to test or a wp_remote_request() $args array. + * @param string $url Optional. If given, will check if the URL requires SSL and adds that requirement to the capabilities array. + * + * @return bool + */ +function wp_http_supports( $capabilities = array(), $url = null ) { + $objFetchSite = _wp_http_get_object(); + + $capabilities = wp_parse_args( $capabilities ); + + $count = count( $capabilities ); + + // If we have a numeric $capabilities array, spoof a wp_remote_request() associative $args array + if ( $count && count( array_filter( array_keys( $capabilities ), 'is_numeric' ) ) == $count ) { + $capabilities = array_combine( array_values( $capabilities ), array_fill( 0, $count, true ) ); + } + + if ( $url && !isset( $capabilities['ssl'] ) ) { + $scheme = parse_url( $url, PHP_URL_SCHEME ); + if ( 'https' == $scheme || 'ssl' == $scheme ) { + $capabilities['ssl'] = true; + } + } + + return (bool) $objFetchSite->_get_first_available_transport( $capabilities ); +} + +/** + * Get the HTTP Origin of the current request. + * + * @since 3.4.0 + * + * @return string URL of the origin. Empty string if no origin. + */ +function get_http_origin() { + $origin = ''; + if ( ! empty ( $_SERVER[ 'HTTP_ORIGIN' ] ) ) + $origin = $_SERVER[ 'HTTP_ORIGIN' ]; + + /** + * Change the origin of an HTTP request. + * + * @since 3.4.0 + * + * @param string $origin The original origin for the request. + */ + return apply_filters( 'http_origin', $origin ); +} + +/** + * Retrieve list of allowed HTTP origins. + * + * @since 3.4.0 + * + * @return array Array of origin URLs. + */ +function get_allowed_http_origins() { + $admin_origin = parse_url( admin_url() ); + $home_origin = parse_url( home_url() ); + + // @todo preserve port? + $allowed_origins = array_unique( array( + 'http://' . $admin_origin[ 'host' ], + 'https://' . $admin_origin[ 'host' ], + 'http://' . $home_origin[ 'host' ], + 'https://' . $home_origin[ 'host' ], + ) ); + + /** + * Change the origin types allowed for HTTP requests. + * + * @since 3.4.0 + * + * @param array $allowed_origins { + * Default allowed HTTP origins. + * @type string Non-secure URL for admin origin. + * @type string Secure URL for admin origin. + * @type string Non-secure URL for home origin. + * @type string Secure URL for home origin. + * } + */ + return apply_filters( 'allowed_http_origins' , $allowed_origins ); +} + +/** + * Determines if the HTTP origin is an authorized one. + * + * @since 3.4.0 + * + * @param string Origin URL. If not provided, the value of get_http_origin() is used. + * @return bool True if the origin is allowed. False otherwise. + */ +function is_allowed_http_origin( $origin = null ) { + $origin_arg = $origin; + + if ( null === $origin ) + $origin = get_http_origin(); + + if ( $origin && ! in_array( $origin, get_allowed_http_origins() ) ) + $origin = ''; + + /** + * Change the allowed HTTP origin result. + * + * @since 3.4.0 + * + * @param string $origin Result of check for allowed origin. + * @param string $origin_arg original origin string passed into is_allowed_http_origin function. + */ + return apply_filters( 'allowed_http_origin', $origin, $origin_arg ); +} + +/** + * Send Access-Control-Allow-Origin and related headers if the current request + * is from an allowed origin. + * + * If the request is an OPTIONS request, the script exits with either access + * control headers sent, or a 403 response if the origin is not allowed. For + * other request methods, you will receive a return value. + * + * @since 3.4.0 + * + * @return bool|string Returns the origin URL if headers are sent. Returns false + * if headers are not sent. + */ +function send_origin_headers() { + $origin = get_http_origin(); + + if ( is_allowed_http_origin( $origin ) ) { + @header( 'Access-Control-Allow-Origin: ' . $origin ); + @header( 'Access-Control-Allow-Credentials: true' ); + if ( 'OPTIONS' === $_SERVER['REQUEST_METHOD'] ) + exit; + return $origin; + } + + if ( 'OPTIONS' === $_SERVER['REQUEST_METHOD'] ) { + status_header( 403 ); + exit; + } + + return false; +} + +/** + * Validate a URL for safe use in the HTTP API. + * + * @since 3.5.2 + * + * @return mixed URL or false on failure. + */ +function wp_http_validate_url( $url ) { + $url = wp_kses_bad_protocol( $url, array( 'http', 'https' ) ); + if ( ! $url ) + return false; + + $parsed_url = @parse_url( $url ); + if ( ! $parsed_url || empty( $parsed_url['host'] ) ) + return false; + + if ( isset( $parsed_url['user'] ) || isset( $parsed_url['pass'] ) ) + return false; + + if ( false !== strpos( $parsed_url['host'], ':' ) ) + return false; + + $parsed_home = @parse_url( get_option( 'home' ) ); + + $same_host = strtolower( $parsed_home['host'] ) === strtolower( $parsed_url['host'] ); + + if ( ! $same_host ) { + $host = trim( $parsed_url['host'], '.' ); + if ( preg_match( '#^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$#', $host ) ) { + $ip = $host; + } else { + $ip = gethostbyname( $host ); + if ( $ip === $host ) // Error condition for gethostbyname() + $ip = false; + } + if ( $ip ) { + $parts = array_map( 'intval', explode( '.', $ip ) ); + if ( '127.0.0.1' === $ip + || ( 10 === $parts[0] ) + || ( 172 === $parts[0] && 16 <= $parts[1] && 31 >= $parts[1] ) + || ( 192 === $parts[0] && 168 === $parts[1] ) + ) { + // If host appears local, reject unless specifically allowed. + /** + * Check if HTTP request is external or not. + * + * Allows to change and allow external requests for the HTTP request. + * + * @since 3.6.0 + * + * @param bool false Whether HTTP request is external or not. + * @param string $host IP of the requested host. + * @param string $url URL of the requested host. + */ + if ( ! apply_filters( 'http_request_host_is_external', false, $host, $url ) ) + return false; + } + } + } + + if ( empty( $parsed_url['port'] ) ) + return $url; + + $port = $parsed_url['port']; + if ( 80 === $port || 443 === $port || 8080 === $port ) + return $url; + + if ( $parsed_home && $same_host && isset( $parsed_home['port'] ) && $parsed_home['port'] === $port ) + return $url; + + return false; +} + +/** + * Whitelists allowed redirect hosts for safe HTTP requests as well. + * + * Attached to the http_request_host_is_external filter. + * + * @since 3.6.0 + * + * @param bool $is_external + * @param string $host + * @return bool + */ +function allowed_http_request_hosts( $is_external, $host ) { + if ( ! $is_external && wp_validate_redirect( 'http://' . $host ) ) + $is_external = true; + return $is_external; +} + +/** + * Whitelists any domain in a multisite installation for safe HTTP requests. + * + * Attached to the http_request_host_is_external filter. + * + * @since 3.6.0 + * + * @param bool $is_external + * @param string $host + * @return bool + */ +function ms_allowed_http_request_hosts( $is_external, $host ) { + global $wpdb; + static $queried = array(); + if ( $is_external ) + return $is_external; + if ( $host === get_current_site()->domain ) + return true; + if ( isset( $queried[ $host ] ) ) + return $queried[ $host ]; + $queried[ $host ] = (bool) $wpdb->get_var( $wpdb->prepare( "SELECT domain FROM $wpdb->blogs WHERE domain = %s LIMIT 1", $host ) ); + return $queried[ $host ]; +} diff --git a/wp-includes/images/admin-bar-sprite-2x.png b/wp-includes/images/admin-bar-sprite-2x.png new file mode 100644 index 0000000..a850651 Binary files /dev/null and b/wp-includes/images/admin-bar-sprite-2x.png differ diff --git a/wp-includes/images/admin-bar-sprite.png b/wp-includes/images/admin-bar-sprite.png new file mode 100644 index 0000000..ad2d02c Binary files /dev/null and b/wp-includes/images/admin-bar-sprite.png differ diff --git a/wp-includes/images/arrow-pointer-blue-2x.png b/wp-includes/images/arrow-pointer-blue-2x.png new file mode 100644 index 0000000..d84755b Binary files /dev/null and b/wp-includes/images/arrow-pointer-blue-2x.png differ diff --git a/wp-includes/images/arrow-pointer-blue.png b/wp-includes/images/arrow-pointer-blue.png new file mode 100644 index 0000000..65b42fe Binary files /dev/null and b/wp-includes/images/arrow-pointer-blue.png differ diff --git a/wp-includes/images/blank.gif b/wp-includes/images/blank.gif new file mode 100644 index 0000000..ef1e9ec Binary files /dev/null and b/wp-includes/images/blank.gif differ diff --git a/wp-includes/images/crystal/archive.png b/wp-includes/images/crystal/archive.png new file mode 100644 index 0000000..2fe9fec Binary files /dev/null and b/wp-includes/images/crystal/archive.png differ diff --git a/wp-includes/images/crystal/audio.png b/wp-includes/images/crystal/audio.png new file mode 100644 index 0000000..1d347bc Binary files /dev/null and b/wp-includes/images/crystal/audio.png differ diff --git a/wp-includes/images/crystal/code.png b/wp-includes/images/crystal/code.png new file mode 100644 index 0000000..2fa9608 Binary files /dev/null and b/wp-includes/images/crystal/code.png differ diff --git a/wp-includes/images/crystal/default.png b/wp-includes/images/crystal/default.png new file mode 100644 index 0000000..a3ca7c6 Binary files /dev/null and b/wp-includes/images/crystal/default.png differ diff --git a/wp-includes/images/crystal/document.png b/wp-includes/images/crystal/document.png new file mode 100644 index 0000000..a6342cf Binary files /dev/null and b/wp-includes/images/crystal/document.png differ diff --git a/wp-includes/images/crystal/interactive.png b/wp-includes/images/crystal/interactive.png new file mode 100644 index 0000000..687248b Binary files /dev/null and b/wp-includes/images/crystal/interactive.png differ diff --git a/wp-includes/images/crystal/license.txt b/wp-includes/images/crystal/license.txt new file mode 100644 index 0000000..d53f9bf --- /dev/null +++ b/wp-includes/images/crystal/license.txt @@ -0,0 +1,9 @@ +Crystal Project Icons +by Everaldo Coelho +http://everaldo.com + +Released under LGPL + +Modified February 2008 +for WordPress +https://wordpress.org \ No newline at end of file diff --git a/wp-includes/images/crystal/spreadsheet.png b/wp-includes/images/crystal/spreadsheet.png new file mode 100644 index 0000000..402b259 Binary files /dev/null and b/wp-includes/images/crystal/spreadsheet.png differ diff --git a/wp-includes/images/crystal/text.png b/wp-includes/images/crystal/text.png new file mode 100644 index 0000000..51d464e Binary files /dev/null and b/wp-includes/images/crystal/text.png differ diff --git a/wp-includes/images/crystal/video.png b/wp-includes/images/crystal/video.png new file mode 100644 index 0000000..bd58b9b Binary files /dev/null and b/wp-includes/images/crystal/video.png differ diff --git a/wp-includes/images/down_arrow-2x.gif b/wp-includes/images/down_arrow-2x.gif new file mode 100644 index 0000000..d4b0ae3 Binary files /dev/null and b/wp-includes/images/down_arrow-2x.gif differ diff --git a/wp-includes/images/down_arrow.gif b/wp-includes/images/down_arrow.gif new file mode 100644 index 0000000..f339a21 Binary files /dev/null and b/wp-includes/images/down_arrow.gif differ diff --git a/wp-includes/images/icon-pointer-flag-2x.png b/wp-includes/images/icon-pointer-flag-2x.png new file mode 100644 index 0000000..99a2c2a Binary files /dev/null and b/wp-includes/images/icon-pointer-flag-2x.png differ diff --git a/wp-includes/images/icon-pointer-flag.png b/wp-includes/images/icon-pointer-flag.png new file mode 100644 index 0000000..6bb48c0 Binary files /dev/null and b/wp-includes/images/icon-pointer-flag.png differ diff --git a/wp-includes/images/media/archive.png b/wp-includes/images/media/archive.png new file mode 100644 index 0000000..2864901 Binary files /dev/null and b/wp-includes/images/media/archive.png differ diff --git a/wp-includes/images/media/audio.png b/wp-includes/images/media/audio.png new file mode 100644 index 0000000..455d9f2 Binary files /dev/null and b/wp-includes/images/media/audio.png differ diff --git a/wp-includes/images/media/code.png b/wp-includes/images/media/code.png new file mode 100644 index 0000000..2b1b919 Binary files /dev/null and b/wp-includes/images/media/code.png differ diff --git a/wp-includes/images/media/default.png b/wp-includes/images/media/default.png new file mode 100644 index 0000000..fd80a9e Binary files /dev/null and b/wp-includes/images/media/default.png differ diff --git a/wp-includes/images/media/document.png b/wp-includes/images/media/document.png new file mode 100644 index 0000000..4f04cca Binary files /dev/null and b/wp-includes/images/media/document.png differ diff --git a/wp-includes/images/media/interactive.png b/wp-includes/images/media/interactive.png new file mode 100644 index 0000000..a09b413 Binary files /dev/null and b/wp-includes/images/media/interactive.png differ diff --git a/wp-includes/images/media/spreadsheet.png b/wp-includes/images/media/spreadsheet.png new file mode 100644 index 0000000..db60df2 Binary files /dev/null and b/wp-includes/images/media/spreadsheet.png differ diff --git a/wp-includes/images/media/text.png b/wp-includes/images/media/text.png new file mode 100644 index 0000000..d1bc265 Binary files /dev/null and b/wp-includes/images/media/text.png differ diff --git a/wp-includes/images/media/video.png b/wp-includes/images/media/video.png new file mode 100644 index 0000000..01441cc Binary files /dev/null and b/wp-includes/images/media/video.png differ diff --git a/wp-includes/images/rss-2x.png b/wp-includes/images/rss-2x.png new file mode 100644 index 0000000..7b525cf Binary files /dev/null and b/wp-includes/images/rss-2x.png differ diff --git a/wp-includes/images/rss.png b/wp-includes/images/rss.png new file mode 100644 index 0000000..9707305 Binary files /dev/null and b/wp-includes/images/rss.png differ diff --git a/wp-includes/images/smilies/icon_arrow.gif b/wp-includes/images/smilies/icon_arrow.gif new file mode 100644 index 0000000..cca76aa Binary files /dev/null and b/wp-includes/images/smilies/icon_arrow.gif differ diff --git a/wp-includes/images/smilies/icon_biggrin.gif b/wp-includes/images/smilies/icon_biggrin.gif new file mode 100644 index 0000000..c0d95fb Binary files /dev/null and b/wp-includes/images/smilies/icon_biggrin.gif differ diff --git a/wp-includes/images/smilies/icon_confused.gif b/wp-includes/images/smilies/icon_confused.gif new file mode 100644 index 0000000..1ffd05a Binary files /dev/null and b/wp-includes/images/smilies/icon_confused.gif differ diff --git a/wp-includes/images/smilies/icon_cool.gif b/wp-includes/images/smilies/icon_cool.gif new file mode 100644 index 0000000..83aa60b Binary files /dev/null and b/wp-includes/images/smilies/icon_cool.gif differ diff --git a/wp-includes/images/smilies/icon_cry.gif b/wp-includes/images/smilies/icon_cry.gif new file mode 100644 index 0000000..0163d6d Binary files /dev/null and b/wp-includes/images/smilies/icon_cry.gif differ diff --git a/wp-includes/images/smilies/icon_eek.gif b/wp-includes/images/smilies/icon_eek.gif new file mode 100644 index 0000000..63c4284 Binary files /dev/null and b/wp-includes/images/smilies/icon_eek.gif differ diff --git a/wp-includes/images/smilies/icon_evil.gif b/wp-includes/images/smilies/icon_evil.gif new file mode 100644 index 0000000..2c48528 Binary files /dev/null and b/wp-includes/images/smilies/icon_evil.gif differ diff --git a/wp-includes/images/smilies/icon_exclaim.gif b/wp-includes/images/smilies/icon_exclaim.gif new file mode 100644 index 0000000..7ff8e75 Binary files /dev/null and b/wp-includes/images/smilies/icon_exclaim.gif differ diff --git a/wp-includes/images/smilies/icon_idea.gif b/wp-includes/images/smilies/icon_idea.gif new file mode 100644 index 0000000..df37e04 Binary files /dev/null and b/wp-includes/images/smilies/icon_idea.gif differ diff --git a/wp-includes/images/smilies/icon_lol.gif b/wp-includes/images/smilies/icon_lol.gif new file mode 100644 index 0000000..accd41c Binary files /dev/null and b/wp-includes/images/smilies/icon_lol.gif differ diff --git a/wp-includes/images/smilies/icon_mad.gif b/wp-includes/images/smilies/icon_mad.gif new file mode 100644 index 0000000..23d4162 Binary files /dev/null and b/wp-includes/images/smilies/icon_mad.gif differ diff --git a/wp-includes/images/smilies/icon_mrgreen.gif b/wp-includes/images/smilies/icon_mrgreen.gif new file mode 100644 index 0000000..59f1064 Binary files /dev/null and b/wp-includes/images/smilies/icon_mrgreen.gif differ diff --git a/wp-includes/images/smilies/icon_neutral.gif b/wp-includes/images/smilies/icon_neutral.gif new file mode 100644 index 0000000..f5e5302 Binary files /dev/null and b/wp-includes/images/smilies/icon_neutral.gif differ diff --git a/wp-includes/images/smilies/icon_question.gif b/wp-includes/images/smilies/icon_question.gif new file mode 100644 index 0000000..7f6e3aa Binary files /dev/null and b/wp-includes/images/smilies/icon_question.gif differ diff --git a/wp-includes/images/smilies/icon_razz.gif b/wp-includes/images/smilies/icon_razz.gif new file mode 100644 index 0000000..1af7355 Binary files /dev/null and b/wp-includes/images/smilies/icon_razz.gif differ diff --git a/wp-includes/images/smilies/icon_redface.gif b/wp-includes/images/smilies/icon_redface.gif new file mode 100644 index 0000000..fd79d9f Binary files /dev/null and b/wp-includes/images/smilies/icon_redface.gif differ diff --git a/wp-includes/images/smilies/icon_rolleyes.gif b/wp-includes/images/smilies/icon_rolleyes.gif new file mode 100644 index 0000000..a4c11bd Binary files /dev/null and b/wp-includes/images/smilies/icon_rolleyes.gif differ diff --git a/wp-includes/images/smilies/icon_sad.gif b/wp-includes/images/smilies/icon_sad.gif new file mode 100644 index 0000000..c593536 Binary files /dev/null and b/wp-includes/images/smilies/icon_sad.gif differ diff --git a/wp-includes/images/smilies/icon_smile.gif b/wp-includes/images/smilies/icon_smile.gif new file mode 100644 index 0000000..650e35e Binary files /dev/null and b/wp-includes/images/smilies/icon_smile.gif differ diff --git a/wp-includes/images/smilies/icon_surprised.gif b/wp-includes/images/smilies/icon_surprised.gif new file mode 100644 index 0000000..b6d2be3 Binary files /dev/null and b/wp-includes/images/smilies/icon_surprised.gif differ diff --git a/wp-includes/images/smilies/icon_twisted.gif b/wp-includes/images/smilies/icon_twisted.gif new file mode 100644 index 0000000..fcdba35 Binary files /dev/null and b/wp-includes/images/smilies/icon_twisted.gif differ diff --git a/wp-includes/images/smilies/icon_wink.gif b/wp-includes/images/smilies/icon_wink.gif new file mode 100644 index 0000000..d830848 Binary files /dev/null and b/wp-includes/images/smilies/icon_wink.gif differ diff --git a/wp-includes/images/spinner-2x.gif b/wp-includes/images/spinner-2x.gif new file mode 100644 index 0000000..9593f3d Binary files /dev/null and b/wp-includes/images/spinner-2x.gif differ diff --git a/wp-includes/images/spinner.gif b/wp-includes/images/spinner.gif new file mode 100644 index 0000000..c15632f Binary files /dev/null and b/wp-includes/images/spinner.gif differ diff --git a/wp-includes/images/toggle-arrow-2x.png b/wp-includes/images/toggle-arrow-2x.png new file mode 100644 index 0000000..a282075 Binary files /dev/null and b/wp-includes/images/toggle-arrow-2x.png differ diff --git a/wp-includes/images/toggle-arrow.png b/wp-includes/images/toggle-arrow.png new file mode 100644 index 0000000..bfb6494 Binary files /dev/null and b/wp-includes/images/toggle-arrow.png differ diff --git a/wp-includes/images/uploader-icons-2x.png b/wp-includes/images/uploader-icons-2x.png new file mode 100644 index 0000000..077dd9d Binary files /dev/null and b/wp-includes/images/uploader-icons-2x.png differ diff --git a/wp-includes/images/uploader-icons.png b/wp-includes/images/uploader-icons.png new file mode 100644 index 0000000..f9e999d Binary files /dev/null and b/wp-includes/images/uploader-icons.png differ diff --git a/wp-includes/images/wlw/wp-comments.png b/wp-includes/images/wlw/wp-comments.png new file mode 100644 index 0000000..6bc3d52 Binary files /dev/null and b/wp-includes/images/wlw/wp-comments.png differ diff --git a/wp-includes/images/wlw/wp-icon.png b/wp-includes/images/wlw/wp-icon.png new file mode 100644 index 0000000..c352383 Binary files /dev/null and b/wp-includes/images/wlw/wp-icon.png differ diff --git a/wp-includes/images/wlw/wp-watermark.png b/wp-includes/images/wlw/wp-watermark.png new file mode 100644 index 0000000..79607ed Binary files /dev/null and b/wp-includes/images/wlw/wp-watermark.png differ diff --git a/wp-includes/images/wpicons-2x.png b/wp-includes/images/wpicons-2x.png new file mode 100644 index 0000000..28a19af Binary files /dev/null and b/wp-includes/images/wpicons-2x.png differ diff --git a/wp-includes/images/wpicons.png b/wp-includes/images/wpicons.png new file mode 100644 index 0000000..05607e1 Binary files /dev/null and b/wp-includes/images/wpicons.png differ diff --git a/wp-includes/images/wpspin-2x.gif b/wp-includes/images/wpspin-2x.gif new file mode 100644 index 0000000..fe2d5c0 Binary files /dev/null and b/wp-includes/images/wpspin-2x.gif differ diff --git a/wp-includes/images/wpspin.gif b/wp-includes/images/wpspin.gif new file mode 100644 index 0000000..7f71727 Binary files /dev/null and b/wp-includes/images/wpspin.gif differ diff --git a/wp-includes/images/xit-2x.gif b/wp-includes/images/xit-2x.gif new file mode 100644 index 0000000..b5ce86b Binary files /dev/null and b/wp-includes/images/xit-2x.gif differ diff --git a/wp-includes/images/xit.gif b/wp-includes/images/xit.gif new file mode 100644 index 0000000..64cb854 Binary files /dev/null and b/wp-includes/images/xit.gif differ diff --git a/wp-includes/js/admin-bar.js b/wp-includes/js/admin-bar.js new file mode 100644 index 0000000..912485c --- /dev/null +++ b/wp-includes/js/admin-bar.js @@ -0,0 +1,365 @@ +/* jshint loopfunc: true */ +// use jQuery and hoverIntent if loaded +if ( typeof(jQuery) != 'undefined' ) { + if ( typeof(jQuery.fn.hoverIntent) == 'undefined' ) { + /* jshint ignore:start */ + // hoverIntent r6 - Copy of wp-includes/js/hoverIntent.min.js + (function(a){a.fn.hoverIntent=function(m,d,h){var j={interval:100,sensitivity:7,timeout:0};if(typeof m==="object"){j=a.extend(j,m)}else{if(a.isFunction(d)){j=a.extend(j,{over:m,out:d,selector:h})}else{j=a.extend(j,{over:m,out:m,selector:d})}}var l,k,g,f;var e=function(n){l=n.pageX;k=n.pageY};var c=function(o,n){n.hoverIntent_t=clearTimeout(n.hoverIntent_t);if((Math.abs(g-l)+Math.abs(f-k)) .ab-item').bind('keydown.adminbar', function(e){ + if ( e.which != 13 ) + return; + + var target = $(e.target), wrap = target.closest('ab-sub-wrapper'); + + e.stopPropagation(); + e.preventDefault(); + + if ( !wrap.length ) + wrap = $('#wpadminbar .quicklinks'); + + wrap.find('.menupop').removeClass('hover'); + target.parent().toggleClass('hover'); + target.siblings('.ab-sub-wrapper').find('.ab-item').each(refresh); + }).each(refresh); + + $('#wpadminbar .ab-item').bind('keydown.adminbar', function(e){ + if ( e.which != 27 ) + return; + + var target = $(e.target); + + e.stopPropagation(); + e.preventDefault(); + + target.closest('.hover').removeClass('hover').children('.ab-item').focus(); + target.siblings('.ab-sub-wrapper').find('.ab-item').each(refresh); + }); + + $('#wpadminbar').click( function(e) { + if ( e.target.id != 'wpadminbar' && e.target.id != 'wp-admin-bar-top-secondary' ) + return; + + e.preventDefault(); + $('html, body').animate({ scrollTop: 0 }, 'fast'); + }); + + // fix focus bug in WebKit + $('.screen-reader-shortcut').keydown( function(e) { + var id, ua; + + if ( 13 != e.which ) + return; + + id = $( this ).attr( 'href' ); + + ua = navigator.userAgent.toLowerCase(); + + if ( ua.indexOf('applewebkit') != -1 && id && id.charAt(0) == '#' ) { + setTimeout(function () { + $(id).focus(); + }, 100); + } + }); + + // Empty sessionStorage on logging out + if ( 'sessionStorage' in window ) { + $('#wp-admin-bar-logout a').click( function() { + try { + for ( var key in sessionStorage ) { + if ( key.indexOf('wp-autosave-') != -1 ) + sessionStorage.removeItem(key); + } + } catch(e) {} + }); + } + + if ( navigator.userAgent && document.body.className.indexOf( 'no-font-face' ) === -1 && + /Android (1.0|1.1|1.5|1.6|2.0|2.1)|Nokia|Opera Mini|w(eb)?OSBrowser|webOS|UCWEB|Windows Phone OS 7|XBLWP7|ZuneWP7|MSIE 7/.test( navigator.userAgent ) ) { + + document.body.className += ' no-font-face'; + } + }); +} else { + (function(d, w) { + var addEvent = function( obj, type, fn ) { + if ( obj.addEventListener ) + obj.addEventListener(type, fn, false); + else if ( obj.attachEvent ) + obj.attachEvent('on' + type, function() { return fn.call(obj, window.event);}); + }, + + aB, hc = new RegExp('\\bhover\\b', 'g'), q = [], + rselected = new RegExp('\\bselected\\b', 'g'), + + /** + * Get the timeout ID of the given element + */ + getTOID = function(el) { + var i = q.length; + while ( i-- ) { + if ( q[i] && el == q[i][1] ) + return q[i][0]; + } + return false; + }, + + addHoverClass = function(t) { + var i, id, inA, hovering, ul, li, + ancestors = [], + ancestorLength = 0; + + while ( t && t != aB && t != d ) { + if ( 'LI' == t.nodeName.toUpperCase() ) { + ancestors[ ancestors.length ] = t; + id = getTOID(t); + if ( id ) + clearTimeout( id ); + t.className = t.className ? ( t.className.replace(hc, '') + ' hover' ) : 'hover'; + hovering = t; + } + t = t.parentNode; + } + + // Remove any selected classes. + if ( hovering && hovering.parentNode ) { + ul = hovering.parentNode; + if ( ul && 'UL' == ul.nodeName.toUpperCase() ) { + i = ul.childNodes.length; + while ( i-- ) { + li = ul.childNodes[i]; + if ( li != hovering ) + li.className = li.className ? li.className.replace( rselected, '' ) : ''; + } + } + } + + /* remove the hover class for any objects not in the immediate element's ancestry */ + i = q.length; + while ( i-- ) { + inA = false; + ancestorLength = ancestors.length; + while( ancestorLength-- ) { + if ( ancestors[ ancestorLength ] == q[i][1] ) + inA = true; + } + + if ( ! inA ) + q[i][1].className = q[i][1].className ? q[i][1].className.replace(hc, '') : ''; + } + }, + + removeHoverClass = function(t) { + while ( t && t != aB && t != d ) { + if ( 'LI' == t.nodeName.toUpperCase() ) { + (function(t) { + var to = setTimeout(function() { + t.className = t.className ? t.className.replace(hc, '') : ''; + }, 500); + q[q.length] = [to, t]; + })(t); + } + t = t.parentNode; + } + }, + + clickShortlink = function(e) { + var i, l, node, + t = e.target || e.srcElement; + + // Make t the shortlink menu item, or return. + while ( true ) { + // Check if we've gone past the shortlink node, + // or if the user is clicking on the input. + if ( ! t || t == d || t == aB ) + return; + // Check if we've found the shortlink node. + if ( t.id && t.id == 'wp-admin-bar-get-shortlink' ) + break; + t = t.parentNode; + } + + // IE doesn't support preventDefault, and does support returnValue + if ( e.preventDefault ) + e.preventDefault(); + e.returnValue = false; + + if ( -1 == t.className.indexOf('selected') ) + t.className += ' selected'; + + for ( i = 0, l = t.childNodes.length; i < l; i++ ) { + node = t.childNodes[i]; + if ( node.className && -1 != node.className.indexOf('shortlink-input') ) { + node.focus(); + node.select(); + node.onblur = function() { + t.className = t.className ? t.className.replace( rselected, '' ) : ''; + }; + break; + } + } + return false; + }, + + scrollToTop = function(t) { + var distance, speed, step, steps, timer, speed_step; + + // Ensure that the #wpadminbar was the target of the click. + if ( t.id != 'wpadminbar' && t.id != 'wp-admin-bar-top-secondary' ) + return; + + distance = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0; + + if ( distance < 1 ) + return; + + speed_step = distance > 800 ? 130 : 100; + speed = Math.min( 12, Math.round( distance / speed_step ) ); + step = distance > 800 ? Math.round( distance / 30 ) : Math.round( distance / 20 ); + steps = []; + timer = 0; + + // Animate scrolling to the top of the page by generating steps to + // the top of the page and shifting to each step at a set interval. + while ( distance ) { + distance -= step; + if ( distance < 0 ) + distance = 0; + steps.push( distance ); + + setTimeout( function() { + window.scrollTo( 0, steps.shift() ); + }, timer * speed ); + + timer++; + } + }; + + addEvent(w, 'load', function() { + aB = d.getElementById('wpadminbar'); + + if ( d.body && aB ) { + d.body.appendChild( aB ); + + if ( aB.className ) + aB.className = aB.className.replace(/nojs/, ''); + + addEvent(aB, 'mouseover', function(e) { + addHoverClass( e.target || e.srcElement ); + }); + + addEvent(aB, 'mouseout', function(e) { + removeHoverClass( e.target || e.srcElement ); + }); + + addEvent(aB, 'click', clickShortlink ); + + addEvent(aB, 'click', function(e) { + scrollToTop( e.target || e.srcElement ); + }); + + addEvent( document.getElementById('wp-admin-bar-logout'), 'click', function() { + if ( 'sessionStorage' in window ) { + try { + for ( var key in sessionStorage ) { + if ( key.indexOf('wp-autosave-') != -1 ) + sessionStorage.removeItem(key); + } + } catch(e) {} + } + }); + } + + if ( w.location.hash ) + w.scrollBy(0,-32); + + if ( navigator.userAgent && document.body.className.indexOf( 'no-font-face' ) === -1 && + /Android (1.0|1.1|1.5|1.6|2.0|2.1)|Nokia|Opera Mini|w(eb)?OSBrowser|webOS|UCWEB|Windows Phone OS 7|XBLWP7|ZuneWP7|MSIE 7/.test( navigator.userAgent ) ) { + + document.body.className += ' no-font-face'; + } + }); + })(document, window); + +} diff --git a/wp-includes/js/admin-bar.min.js b/wp-includes/js/admin-bar.min.js new file mode 100644 index 0000000..1d43a7c --- /dev/null +++ b/wp-includes/js/admin-bar.min.js @@ -0,0 +1 @@ +"undefined"!=typeof jQuery?("undefined"==typeof jQuery.fn.hoverIntent&&!function(a){a.fn.hoverIntent=function(b,c,d){var e={interval:100,sensitivity:7,timeout:0};e="object"==typeof b?a.extend(e,b):a.isFunction(c)?a.extend(e,{over:b,out:c,selector:d}):a.extend(e,{over:b,out:b,selector:c});var f,g,h,i,j=function(a){f=a.pageX,g=a.pageY},k=function(b,c){return c.hoverIntent_t=clearTimeout(c.hoverIntent_t),Math.abs(h-f)+Math.abs(i-g) .ab-item").bind("keydown.adminbar",function(c){if(13==c.which){var d=a(c.target),e=d.closest("ab-sub-wrapper");c.stopPropagation(),c.preventDefault(),e.length||(e=a("#wpadminbar .quicklinks")),e.find(".menupop").removeClass("hover"),d.parent().toggleClass("hover"),d.siblings(".ab-sub-wrapper").find(".ab-item").each(b)}}).each(b),a("#wpadminbar .ab-item").bind("keydown.adminbar",function(c){if(27==c.which){var d=a(c.target);c.stopPropagation(),c.preventDefault(),d.closest(".hover").removeClass("hover").children(".ab-item").focus(),d.siblings(".ab-sub-wrapper").find(".ab-item").each(b)}}),a("#wpadminbar").click(function(b){("wpadminbar"==b.target.id||"wp-admin-bar-top-secondary"==b.target.id)&&(b.preventDefault(),a("html, body").animate({scrollTop:0},"fast"))}),a(".screen-reader-shortcut").keydown(function(b){var c,d;13==b.which&&(c=a(this).attr("href"),d=navigator.userAgent.toLowerCase(),-1!=d.indexOf("applewebkit")&&c&&"#"==c.charAt(0)&&setTimeout(function(){a(c).focus()},100))}),"sessionStorage"in window&&a("#wp-admin-bar-logout a").click(function(){try{for(var a in sessionStorage)-1!=a.indexOf("wp-autosave-")&&sessionStorage.removeItem(a)}catch(b){}}),navigator.userAgent&&-1===document.body.className.indexOf("no-font-face")&&/Android (1.0|1.1|1.5|1.6|2.0|2.1)|Nokia|Opera Mini|w(eb)?OSBrowser|webOS|UCWEB|Windows Phone OS 7|XBLWP7|ZuneWP7|MSIE 7/.test(navigator.userAgent)&&(document.body.className+=" no-font-face")})):!function(a,b){var c,d=function(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,function(){return c.call(a,window.event)})},e=new RegExp("\\bhover\\b","g"),f=[],g=new RegExp("\\bselected\\b","g"),h=function(a){for(var b=f.length;b--;)if(f[b]&&a==f[b][1])return f[b][0];return!1},i=function(b){for(var d,i,j,k,l,m,n=[],o=0;b&&b!=c&&b!=a;)"LI"==b.nodeName.toUpperCase()&&(n[n.length]=b,i=h(b),i&&clearTimeout(i),b.className=b.className?b.className.replace(e,"")+" hover":"hover",k=b),b=b.parentNode;if(k&&k.parentNode&&(l=k.parentNode,l&&"UL"==l.nodeName.toUpperCase()))for(d=l.childNodes.length;d--;)m=l.childNodes[d],m!=k&&(m.className=m.className?m.className.replace(g,""):"");for(d=f.length;d--;){for(j=!1,o=n.length;o--;)n[o]==f[d][1]&&(j=!0);j||(f[d][1].className=f[d][1].className?f[d][1].className.replace(e,""):"")}},j=function(b){for(;b&&b!=c&&b!=a;)"LI"==b.nodeName.toUpperCase()&&!function(a){var b=setTimeout(function(){a.className=a.className?a.className.replace(e,""):""},500);f[f.length]=[b,a]}(b),b=b.parentNode},k=function(b){for(var d,e,f,h=b.target||b.srcElement;;){if(!h||h==a||h==c)return;if(h.id&&"wp-admin-bar-get-shortlink"==h.id)break;h=h.parentNode}for(b.preventDefault&&b.preventDefault(),b.returnValue=!1,-1==h.className.indexOf("selected")&&(h.className+=" selected"),d=0,e=h.childNodes.length;e>d;d++)if(f=h.childNodes[d],f.className&&-1!=f.className.indexOf("shortlink-input")){f.focus(),f.select(),f.onblur=function(){h.className=h.className?h.className.replace(g,""):""};break}return!1},l=function(a){var b,c,d,e,f,g;if(!("wpadminbar"!=a.id&&"wp-admin-bar-top-secondary"!=a.id||(b=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,1>b)))for(g=b>800?130:100,c=Math.min(12,Math.round(b/g)),d=Math.round(b>800?b/30:b/20),e=[],f=0;b;)b-=d,0>b&&(b=0),e.push(b),setTimeout(function(){window.scrollTo(0,e.shift())},f*c),f++};d(b,"load",function(){c=a.getElementById("wpadminbar"),a.body&&c&&(a.body.appendChild(c),c.className&&(c.className=c.className.replace(/nojs/,"")),d(c,"mouseover",function(a){i(a.target||a.srcElement)}),d(c,"mouseout",function(a){j(a.target||a.srcElement)}),d(c,"click",k),d(c,"click",function(a){l(a.target||a.srcElement)}),d(document.getElementById("wp-admin-bar-logout"),"click",function(){if("sessionStorage"in window)try{for(var a in sessionStorage)-1!=a.indexOf("wp-autosave-")&&sessionStorage.removeItem(a)}catch(b){}})),b.location.hash&&b.scrollBy(0,-32),navigator.userAgent&&-1===document.body.className.indexOf("no-font-face")&&/Android (1.0|1.1|1.5|1.6|2.0|2.1)|Nokia|Opera Mini|w(eb)?OSBrowser|webOS|UCWEB|Windows Phone OS 7|XBLWP7|ZuneWP7|MSIE 7/.test(navigator.userAgent)&&(document.body.className+=" no-font-face")})}(document,window); \ No newline at end of file diff --git a/wp-includes/js/autosave.js b/wp-includes/js/autosave.js new file mode 100644 index 0000000..def5429 --- /dev/null +++ b/wp-includes/js/autosave.js @@ -0,0 +1,599 @@ +/* global tinymce, wpCookies, autosaveL10n, switchEditors */ +// Back-compat +window.autosave = function() { + return true; +}; + +( function( $, window ) { + function autosave() { + var initialCompareString, + lastTriggerSave = 0, + $document = $(document); + + /** + * Returns the data saved in both local and remote autosave + * + * @return object Object containing the post data + */ + function getPostData( type ) { + var post_name, parent_id, data, + time = ( new Date() ).getTime(), + cats = [], + editor = typeof tinymce !== 'undefined' && tinymce.get('content'); + + // Don't run editor.save() more often than every 3 sec. + // It is resource intensive and might slow down typing in long posts on slow devices. + if ( editor && ! editor.isHidden() && time - 3000 > lastTriggerSave ) { + editor.save(); + lastTriggerSave = time; + } + + data = { + post_id: $( '#post_ID' ).val() || 0, + post_type: $( '#post_type' ).val() || '', + post_author: $( '#post_author' ).val() || '', + post_title: $( '#title' ).val() || '', + content: $( '#content' ).val() || '', + excerpt: $( '#excerpt' ).val() || '' + }; + + if ( type === 'local' ) { + return data; + } + + $( 'input[id^="in-category-"]:checked' ).each( function() { + cats.push( this.value ); + }); + data.catslist = cats.join(','); + + if ( post_name = $( '#post_name' ).val() ) { + data.post_name = post_name; + } + + if ( parent_id = $( '#parent_id' ).val() ) { + data.parent_id = parent_id; + } + + if ( $( '#comment_status' ).prop( 'checked' ) ) { + data.comment_status = 'open'; + } + + if ( $( '#ping_status' ).prop( 'checked' ) ) { + data.ping_status = 'open'; + } + + if ( $( '#auto_draft' ).val() === '1' ) { + data.auto_draft = '1'; + } + + return data; + } + + // Concatenate title, content and excerpt. Used to track changes when auto-saving. + function getCompareString( postData ) { + if ( typeof postData === 'object' ) { + return ( postData.post_title || '' ) + '::' + ( postData.content || '' ) + '::' + ( postData.excerpt || '' ); + } + + return ( $('#title').val() || '' ) + '::' + ( $('#content').val() || '' ) + '::' + ( $('#excerpt').val() || '' ); + } + + function disableButtons() { + $document.trigger('autosave-disable-buttons'); + // Re-enable 5 sec later. Just gives autosave a head start to avoid collisions. + setTimeout( enableButtons, 5000 ); + } + + function enableButtons() { + $document.trigger( 'autosave-enable-buttons' ); + } + + // Autosave in localStorage + function autosaveLocal() { + var restorePostData, undoPostData, blog_id, post_id, hasStorage, intervalTimer, + lastCompareString, + isSuspended = false; + + // Check if the browser supports sessionStorage and it's not disabled + function checkStorage() { + var test = Math.random().toString(), + result = false; + + try { + window.sessionStorage.setItem( 'wp-test', test ); + result = window.sessionStorage.getItem( 'wp-test' ) === test; + window.sessionStorage.removeItem( 'wp-test' ); + } catch(e) {} + + hasStorage = result; + return result; + } + + /** + * Initialize the local storage + * + * @return mixed False if no sessionStorage in the browser or an Object containing all postData for this blog + */ + function getStorage() { + var stored_obj = false; + // Separate local storage containers for each blog_id + if ( hasStorage && blog_id ) { + stored_obj = sessionStorage.getItem( 'wp-autosave-' + blog_id ); + + if ( stored_obj ) { + stored_obj = JSON.parse( stored_obj ); + } else { + stored_obj = {}; + } + } + + return stored_obj; + } + + /** + * Set the storage for this blog + * + * Confirms that the data was saved successfully. + * + * @return bool + */ + function setStorage( stored_obj ) { + var key; + + if ( hasStorage && blog_id ) { + key = 'wp-autosave-' + blog_id; + sessionStorage.setItem( key, JSON.stringify( stored_obj ) ); + return sessionStorage.getItem( key ) !== null; + } + + return false; + } + + /** + * Get the saved post data for the current post + * + * @return mixed False if no storage or no data or the postData as an Object + */ + function getSavedPostData() { + var stored = getStorage(); + + if ( ! stored || ! post_id ) { + return false; + } + + return stored[ 'post_' + post_id ] || false; + } + + /** + * Set (save or delete) post data in the storage. + * + * If stored_data evaluates to 'false' the storage key for the current post will be removed + * + * $param stored_data The post data to store or null/false/empty to delete the key + * @return bool + */ + function setData( stored_data ) { + var stored = getStorage(); + + if ( ! stored || ! post_id ) { + return false; + } + + if ( stored_data ) { + stored[ 'post_' + post_id ] = stored_data; + } else if ( stored.hasOwnProperty( 'post_' + post_id ) ) { + delete stored[ 'post_' + post_id ]; + } else { + return false; + } + + return setStorage( stored ); + } + + function suspend() { + isSuspended = true; + } + + function resume() { + isSuspended = false; + } + + /** + * Save post data for the current post + * + * Runs on a 15 sec. interval, saves when there are differences in the post title or content. + * When the optional data is provided, updates the last saved post data. + * + * $param data optional Object The post data for saving, minimum 'post_title' and 'content' + * @return bool + */ + function save( data ) { + var postData, compareString, + result = false; + + if ( isSuspended ) { + return false; + } + + if ( data ) { + postData = getSavedPostData() || {}; + $.extend( postData, data ); + } else { + postData = getPostData('local'); + } + + compareString = getCompareString( postData ); + + if ( typeof lastCompareString === 'undefined' ) { + lastCompareString = initialCompareString; + } + + // If the content, title and excerpt did not change since the last save, don't save again + if ( compareString === lastCompareString ) { + return false; + } + + postData.save_time = ( new Date() ).getTime(); + postData.status = $( '#post_status' ).val() || ''; + result = setData( postData ); + + if ( result ) { + lastCompareString = compareString; + } + + return result; + } + + // Run on DOM ready + function run() { + post_id = $('#post_ID').val() || 0; + + // Check if the local post data is different than the loaded post data. + if ( $( '#wp-content-wrap' ).hasClass( 'tmce-active' ) ) { + // If TinyMCE loads first, check the post 1.5 sec. after it is ready. + // By this time the content has been loaded in the editor and 'saved' to the textarea. + // This prevents false positives. + $document.on( 'tinymce-editor-init.autosave', function() { + window.setTimeout( function() { + checkPost(); + }, 1500 ); + }); + } else { + checkPost(); + } + + // Save every 15 sec. + intervalTimer = window.setInterval( save, 15000 ); + + $( 'form#post' ).on( 'submit.autosave-local', function() { + var editor = typeof tinymce !== 'undefined' && tinymce.get('content'), + post_id = $('#post_ID').val() || 0; + + if ( editor && ! editor.isHidden() ) { + // Last onSubmit event in the editor, needs to run after the content has been moved to the textarea. + editor.on( 'submit', function() { + save({ + post_title: $( '#title' ).val() || '', + content: $( '#content' ).val() || '', + excerpt: $( '#excerpt' ).val() || '' + }); + }); + } else { + save({ + post_title: $( '#title' ).val() || '', + content: $( '#content' ).val() || '', + excerpt: $( '#excerpt' ).val() || '' + }); + } + + wpCookies.set( 'wp-saving-post-' + post_id, 'check' ); + }); + } + + // Strip whitespace and compare two strings + function compare( str1, str2 ) { + function removeSpaces( string ) { + return string.toString().replace(/[\x20\t\r\n\f]+/g, ''); + } + + return ( removeSpaces( str1 || '' ) === removeSpaces( str2 || '' ) ); + } + + /** + * Check if the saved data for the current post (if any) is different than the loaded post data on the screen + * + * Shows a standard message letting the user restore the post data if different. + * + * @return void + */ + function checkPost() { + var content, post_title, excerpt, $notice, + postData = getSavedPostData(), + cookie = wpCookies.get( 'wp-saving-post-' + post_id ); + + if ( ! postData ) { + return; + } + + if ( cookie ) { + wpCookies.remove( 'wp-saving-post-' + post_id ); + + if ( cookie === 'saved' ) { + // The post was saved properly, remove old data and bail + setData( false ); + return; + } + } + + // There is a newer autosave. Don't show two "restore" notices at the same time. + if ( $( '#has-newer-autosave' ).length ) { + return; + } + + content = $( '#content' ).val() || ''; + post_title = $( '#title' ).val() || ''; + excerpt = $( '#excerpt' ).val() || ''; + + // cookie == 'check' means the post was not saved properly, always show #local-storage-notice + if ( cookie !== 'check' && compare( content, postData.content ) && + compare( post_title, postData.post_title ) && compare( excerpt, postData.excerpt ) ) { + + return; + } + + restorePostData = postData; + undoPostData = { + content: content, + post_title: post_title, + excerpt: excerpt + }; + + $notice = $( '#local-storage-notice' ); + $('.wrap h2').first().after( $notice.addClass( 'updated' ).show() ); + + $notice.on( 'click.autosave-local', function( event ) { + var $target = $( event.target ); + + if ( $target.hasClass( 'restore-backup' ) ) { + restorePost( restorePostData ); + $target.parent().hide(); + $(this).find( 'p.undo-restore' ).show(); + } else if ( $target.hasClass( 'undo-restore-backup' ) ) { + restorePost( undoPostData ); + $target.parent().hide(); + $(this).find( 'p.local-restore' ).show(); + } + + event.preventDefault(); + }); + } + + // Restore the current title, content and excerpt from postData. + function restorePost( postData ) { + var editor; + + if ( postData ) { + // Set the last saved data + lastCompareString = getCompareString( postData ); + + if ( $( '#title' ).val() !== postData.post_title ) { + $( '#title' ).focus().val( postData.post_title || '' ); + } + + $( '#excerpt' ).val( postData.excerpt || '' ); + editor = typeof tinymce !== 'undefined' && tinymce.get('content'); + + if ( editor && ! editor.isHidden() && typeof switchEditors !== 'undefined' ) { + // Make sure there's an undo level in the editor + editor.undoManager.add(); + editor.setContent( postData.content ? switchEditors.wpautop( postData.content ) : '' ); + } else { + // Make sure the Text editor is selected + $( '#content-html' ).click(); + $( '#content' ).val( postData.content ); + } + + return true; + } + + return false; + } + + // Initialize and run checkPost() on loading the script (before TinyMCE init) + blog_id = typeof window.autosaveL10n !== 'undefined' && window.autosaveL10n.blog_id; + + // Check if the browser supports sessionStorage and it's not disabled + if ( ! checkStorage() ) { + return; + } + + // Don't run if the post type supports neither 'editor' (textarea#content) nor 'excerpt'. + if ( ! blog_id || ( ! $('#content').length && ! $('#excerpt').length ) ) { + return; + } + + $document.ready( run ); + + return { + hasStorage: hasStorage, + getSavedPostData: getSavedPostData, + save: save, + suspend: suspend, + resume: resume + }; + } + + // Autosave on the server + function autosaveServer() { + var _blockSave, _blockSaveTimer, previousCompareString, lastCompareString, + nextRun = 0, + isSuspended = false; + + // Block saving for the next 10 sec. + function tempBlockSave() { + _blockSave = true; + window.clearTimeout( _blockSaveTimer ); + + _blockSaveTimer = window.setTimeout( function() { + _blockSave = false; + }, 10000 ); + } + + function suspend() { + isSuspended = true; + } + + function resume() { + isSuspended = false; + } + + // Runs on heartbeat-response + function response( data ) { + _schedule(); + _blockSave = false; + lastCompareString = previousCompareString; + previousCompareString = ''; + + $document.trigger( 'after-autosave', [data] ); + enableButtons(); + + if ( data.success ) { + // No longer an auto-draft + $( '#auto_draft' ).val(''); + } + } + + /** + * Save immediately + * + * Resets the timing and tells heartbeat to connect now + * + * @return void + */ + function triggerSave() { + nextRun = 0; + wp.heartbeat.connectNow(); + } + + /** + * Checks if the post content in the textarea has changed since page load. + * + * This also happens when TinyMCE is active and editor.save() is triggered by + * wp.autosave.getPostData(). + * + * @return bool + */ + function postChanged() { + return getCompareString() !== initialCompareString; + } + + // Runs on 'heartbeat-send' + function save() { + var postData, compareString; + + // window.autosave() used for back-compat + if ( isSuspended || _blockSave || ! window.autosave() ) { + return false; + } + + if ( ( new Date() ).getTime() < nextRun ) { + return false; + } + + postData = getPostData(); + compareString = getCompareString( postData ); + + // First check + if ( typeof lastCompareString === 'undefined' ) { + lastCompareString = initialCompareString; + } + + // No change + if ( compareString === lastCompareString ) { + return false; + } + + previousCompareString = compareString; + tempBlockSave(); + disableButtons(); + + $document.trigger( 'wpcountwords', [ postData.content ] ) + .trigger( 'before-autosave', [ postData ] ); + + postData._wpnonce = $( '#_wpnonce' ).val() || ''; + + return postData; + } + + function _schedule() { + nextRun = ( new Date() ).getTime() + ( autosaveL10n.autosaveInterval * 1000 ) || 60000; + } + + $document.on( 'heartbeat-send.autosave', function( event, data ) { + var autosaveData = save(); + + if ( autosaveData ) { + data.wp_autosave = autosaveData; + } + }).on( 'heartbeat-tick.autosave', function( event, data ) { + if ( data.wp_autosave ) { + response( data.wp_autosave ); + } + }).on( 'heartbeat-connection-lost.autosave', function( event, error, status ) { + // When connection is lost, keep user from submitting changes. + if ( 'timeout' === error || 603 === status ) { + var $notice = $('#lost-connection-notice'); + + if ( ! wp.autosave.local.hasStorage ) { + $notice.find('.hide-if-no-sessionstorage').hide(); + } + + $notice.show(); + disableButtons(); + } + }).on( 'heartbeat-connection-restored.autosave', function() { + $('#lost-connection-notice').hide(); + enableButtons(); + }).ready( function() { + _schedule(); + }); + + return { + tempBlockSave: tempBlockSave, + triggerSave: triggerSave, + postChanged: postChanged, + suspend: suspend, + resume: resume + }; + } + + // Wait for TinyMCE to initialize plus 1 sec. for any external css to finish loading, + // then 'save' to the textarea before setting initialCompareString. + // This avoids any insignificant differences between the initial textarea content and the content + // extracted from the editor. + $document.on( 'tinymce-editor-init.autosave', function( event, editor ) { + if ( editor.id === 'content' ) { + window.setTimeout( function() { + editor.save(); + initialCompareString = getCompareString(); + }, 1000 ); + } + }).ready( function() { + // Set the initial compare string in case TinyMCE is not used or not loaded first + initialCompareString = getCompareString(); + }); + + return { + getPostData: getPostData, + getCompareString: getCompareString, + disableButtons: disableButtons, + enableButtons: enableButtons, + local: autosaveLocal(), + server: autosaveServer() + }; + } + + window.wp = window.wp || {}; + window.wp.autosave = autosave(); + +}( jQuery, window )); diff --git a/wp-includes/js/autosave.min.js b/wp-includes/js/autosave.min.js new file mode 100644 index 0000000..45d24f9 --- /dev/null +++ b/wp-includes/js/autosave.min.js @@ -0,0 +1 @@ +window.autosave=function(){return!0},function(a,b){function c(){function c(b){var c,d,e,f=(new Date).getTime(),g=[],h="undefined"!=typeof tinymce&&tinymce.get("content");return h&&!h.isHidden()&&f-3e3>j&&(h.save(),j=f),e={post_id:a("#post_ID").val()||0,post_type:a("#post_type").val()||"",post_author:a("#post_author").val()||"",post_title:a("#title").val()||"",content:a("#content").val()||"",excerpt:a("#excerpt").val()||""},"local"===b?e:(a('input[id^="in-category-"]:checked').each(function(){g.push(this.value)}),e.catslist=g.join(","),(c=a("#post_name").val())&&(e.post_name=c),(d=a("#parent_id").val())&&(e.parent_id=d),a("#comment_status").prop("checked")&&(e.comment_status="open"),a("#ping_status").prop("checked")&&(e.ping_status="open"),"1"===a("#auto_draft").val()&&(e.auto_draft="1"),e)}function d(b){return"object"==typeof b?(b.post_title||"")+"::"+(b.content||"")+"::"+(b.excerpt||""):(a("#title").val()||"")+"::"+(a("#content").val()||"")+"::"+(a("#excerpt").val()||"")}function e(){k.trigger("autosave-disable-buttons"),setTimeout(f,5e3)}function f(){k.trigger("autosave-enable-buttons")}function g(){function e(){var a=Math.random().toString(),c=!1;try{b.sessionStorage.setItem("wp-test",a),c=b.sessionStorage.getItem("wp-test")===a,b.sessionStorage.removeItem("wp-test")}catch(d){}return w=c,c}function f(){var a=!1;return w&&u&&(a=sessionStorage.getItem("wp-autosave-"+u),a=a?JSON.parse(a):{}),a}function g(a){var b;return w&&u?(b="wp-autosave-"+u,sessionStorage.setItem(b,JSON.stringify(a)),null!==sessionStorage.getItem(b)):!1}function h(){var a=f();return a&&v?a["post_"+v]||!1:!1}function j(a){var b=f();if(!b||!v)return!1;if(a)b["post_"+v]=a;else{if(!b.hasOwnProperty("post_"+v))return!1;delete b["post_"+v]}return g(b)}function l(){z=!0}function m(){z=!1}function n(b){var e,f,g=!1;return z?!1:(b?(e=h()||{},a.extend(e,b)):e=c("local"),f=d(e),"undefined"==typeof y&&(y=i),f===y?!1:(e.save_time=(new Date).getTime(),e.status=a("#post_status").val()||"",g=j(e),g&&(y=f),g))}function o(){v=a("#post_ID").val()||0,a("#wp-content-wrap").hasClass("tmce-active")?k.on("tinymce-editor-init.autosave",function(){b.setTimeout(function(){q()},1500)}):q(),x=b.setInterval(n,15e3),a("form#post").on("submit.autosave-local",function(){var b="undefined"!=typeof tinymce&&tinymce.get("content"),c=a("#post_ID").val()||0;b&&!b.isHidden()?b.on("submit",function(){n({post_title:a("#title").val()||"",content:a("#content").val()||"",excerpt:a("#excerpt").val()||""})}):n({post_title:a("#title").val()||"",content:a("#content").val()||"",excerpt:a("#excerpt").val()||""}),wpCookies.set("wp-saving-post-"+c,"check")})}function p(a,b){function c(a){return a.toString().replace(/[\x20\t\r\n\f]+/g,"")}return c(a||"")===c(b||"")}function q(){var b,c,d,e,f=h(),g=wpCookies.get("wp-saving-post-"+v);if(f)return g&&(wpCookies.remove("wp-saving-post-"+v),"saved"===g)?void j(!1):void(a("#has-newer-autosave").length||(b=a("#content").val()||"",c=a("#title").val()||"",d=a("#excerpt").val()||"","check"!==g&&p(b,f.content)&&p(c,f.post_title)&&p(d,f.excerpt)||(s=f,t={content:b,post_title:c,excerpt:d},e=a("#local-storage-notice"),a(".wrap h2").first().after(e.addClass("updated").show()),e.on("click.autosave-local",function(b){var c=a(b.target);c.hasClass("restore-backup")?(r(s),c.parent().hide(),a(this).find("p.undo-restore").show()):c.hasClass("undo-restore-backup")&&(r(t),c.parent().hide(),a(this).find("p.local-restore").show()),b.preventDefault()}))))}function r(b){var c;return b?(y=d(b),a("#title").val()!==b.post_title&&a("#title").focus().val(b.post_title||""),a("#excerpt").val(b.excerpt||""),c="undefined"!=typeof tinymce&&tinymce.get("content"),c&&!c.isHidden()&&"undefined"!=typeof switchEditors?(c.undoManager.add(),c.setContent(b.content?switchEditors.wpautop(b.content):"")):(a("#content-html").click(),a("#content").val(b.content)),!0):!1}var s,t,u,v,w,x,y,z=!1;return u="undefined"!=typeof b.autosaveL10n&&b.autosaveL10n.blog_id,e()&&u&&(a("#content").length||a("#excerpt").length)?(k.ready(o),{hasStorage:w,getSavedPostData:h,save:n,suspend:l,resume:m}):void 0}function h(){function g(){q=!0,b.clearTimeout(r),r=b.setTimeout(function(){q=!1},1e4)}function h(){v=!0}function j(){v=!1}function l(b){p(),q=!1,t=s,s="",k.trigger("after-autosave",[b]),f(),b.success&&a("#auto_draft").val("")}function m(){u=0,wp.heartbeat.connectNow()}function n(){return d()!==i}function o(){var f,h;return v||q||!b.autosave()?!1:(new Date).getTime()i;i++)if(a=h[i],g=this._events[a]){if(this._events[a]=e=[],b||d)for(l=0,m=g.length;m>l;l++)f=g[l],(b&&b!==f.callback&&b!==f.callback._callback||d&&d!==f.context)&&e.push(f);e.length||delete this._events[a]}return this},trigger:function(a){if(!this._events)return this;var b=g.call(arguments,1);if(!j(this,"trigger",a,b))return this;var c=this._events[a],d=this._events.all;return c&&k(c,b),d&&k(d,arguments),this},stopListening:function(a,b,d){var e=this._listeningTo;if(!e)return this;var f=!b&&!d;d||"object"!=typeof b||(d=this),a&&((e={})[a._listenId]=a);for(var g in e)a=e[g],a.off(b,d,this),(f||c.isEmpty(a._events))&&delete this._listeningTo[g];return this}},i=/\s+/,j=function(a,b,c,d){if(!c)return!0;if("object"==typeof c){for(var e in c)a[b].apply(a,[e,c[e]].concat(d));return!1}if(i.test(c)){for(var f=c.split(i),g=0,h=f.length;h>g;g++)a[b].apply(a,[f[g]].concat(d));return!1}return!0},k=function(a,b){var c,d=-1,e=a.length,f=b[0],g=b[1],h=b[2];switch(b.length){case 0:for(;++dm;m++)this.trigger("change:"+h[m],this,l[h[m]],d)}if(j)return this;if(!i)for(;this._pending;)d=this._pending,this._pending=!1,this.trigger("change",this,d);return this._pending=!1,this._changing=!1,this},unset:function(a,b){return this.set(a,void 0,c.extend({},b,{unset:!0}))},clear:function(a){var b={};for(var d in this.attributes)b[d]=void 0;return this.set(b,c.extend({},a,{unset:!0}))},hasChanged:function(a){return null==a?!c.isEmpty(this.changed):c.has(this.changed,a)},changedAttributes:function(a){if(!a)return this.hasChanged()?c.clone(this.changed):!1;var b,d=!1,e=this._changing?this._previousAttributes:this.attributes;for(var f in a)c.isEqual(e[f],b=a[f])||((d||(d={}))[f]=b);return d},previous:function(a){return null!=a&&this._previousAttributes?this._previousAttributes[a]:null},previousAttributes:function(){return c.clone(this._previousAttributes)},fetch:function(a){a=a?c.clone(a):{},void 0===a.parse&&(a.parse=!0);var b=this,d=a.success;return a.success=function(c){return b.set(b.parse(c,a),a)?(d&&d(b,c,a),void b.trigger("sync",b,c,a)):!1},L(this,a),this.sync("read",this,a)},save:function(a,b,d){var e,f,g,h=this.attributes;if(null==a||"object"==typeof a?(e=a,d=b):(e={})[a]=b,d=c.extend({validate:!0},d),e&&!d.wait){if(!this.set(e,d))return!1}else if(!this._validate(e,d))return!1;e&&d.wait&&(this.attributes=c.extend({},h,e)),void 0===d.parse&&(d.parse=!0);var i=this,j=d.success;return d.success=function(a){i.attributes=h;var b=i.parse(a,d);return d.wait&&(b=c.extend(e||{},b)),c.isObject(b)&&!i.set(b,d)?!1:(j&&j(i,a,d),void i.trigger("sync",i,a,d))},L(this,d),f=this.isNew()?"create":d.patch?"patch":"update","patch"===f&&(d.attrs=e),g=this.sync(f,this,d),e&&d.wait&&(this.attributes=h),g},destroy:function(a){a=a?c.clone(a):{};var b=this,d=a.success,e=function(){b.trigger("destroy",b,b.collection,a)};if(a.success=function(c){(a.wait||b.isNew())&&e(),d&&d(b,c,a),b.isNew()||b.trigger("sync",b,c,a)},this.isNew())return a.success(),!1;L(this,a);var f=this.sync("delete",this,a);return a.wait||e(),f},url:function(){var a=c.result(this,"urlRoot")||c.result(this.collection,"url")||K();return this.isNew()?a:a.replace(/([^\/])$/,"$1/")+encodeURIComponent(this.id)},parse:function(a){return a},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(a){return this._validate({},c.extend(a||{},{validate:!0}))},_validate:function(a,b){if(!b.validate||!this.validate)return!0;a=c.extend({},this.attributes,a);var d=this.validationError=this.validate(a,b)||null;return d?(this.trigger("invalid",this,d,c.extend(b,{validationError:d})),!1):!0}});var n=["keys","values","pairs","invert","pick","omit"];c.each(n,function(a){m.prototype[a]=function(){var b=g.call(arguments);return b.unshift(this.attributes),c[a].apply(c,b)}});var o=b.Collection=function(a,b){b||(b={}),b.model&&(this.model=b.model),void 0!==b.comparator&&(this.comparator=b.comparator),this._reset(),this.initialize.apply(this,arguments),a&&this.reset(a,c.extend({silent:!0},b))},p={add:!0,remove:!0,merge:!0},q={add:!0,remove:!1};c.extend(o.prototype,h,{model:m,initialize:function(){},toJSON:function(a){return this.map(function(b){return b.toJSON(a)})},sync:function(){return b.sync.apply(this,arguments)},add:function(a,b){return this.set(a,c.extend({merge:!1},b,q))},remove:function(a,b){var d=!c.isArray(a);a=d?[a]:c.clone(a),b||(b={});var e,f,g,h;for(e=0,f=a.length;f>e;e++)h=a[e]=this.get(a[e]),h&&(delete this._byId[h.id],delete this._byId[h.cid],g=this.indexOf(h),this.models.splice(g,1),this.length--,b.silent||(b.index=g,h.trigger("remove",h,this,b)),this._removeReference(h,b));return d?a[0]:a},set:function(a,b){b=c.defaults({},b,p),b.parse&&(a=this.parse(a,b));var d=!c.isArray(a);a=d?a?[a]:[]:c.clone(a);var e,f,g,h,i,j,k,l=b.at,n=this.model,o=this.comparator&&null==l&&b.sort!==!1,q=c.isString(this.comparator)?this.comparator:null,r=[],s=[],t={},u=b.add,v=b.merge,w=b.remove,x=!o&&u&&w?[]:!1;for(e=0,f=a.length;f>e;e++){if(i=a[e]||{},g=i instanceof m?h=i:i[n.prototype.idAttribute||"id"],j=this.get(g))w&&(t[j.cid]=!0),v&&(i=i===h?h.attributes:i,b.parse&&(i=j.parse(i,b)),j.set(i,b),o&&!k&&j.hasChanged(q)&&(k=!0)),a[e]=j;else if(u){if(h=a[e]=this._prepareModel(i,b),!h)continue;r.push(h),this._addReference(h,b)}h=j||h,!x||!h.isNew()&&t[h.id]||x.push(h),t[h.id]=!0}if(w){for(e=0,f=this.length;f>e;++e)t[(h=this.models[e]).cid]||s.push(h);s.length&&this.remove(s,b)}if(r.length||x&&x.length)if(o&&(k=!0),this.length+=r.length,null!=l)for(e=0,f=r.length;f>e;e++)this.models.splice(l+e,0,r[e]);else{x&&(this.models.length=0);var y=x||r;for(e=0,f=y.length;f>e;e++)this.models.push(y[e])}if(k&&this.sort({silent:!0}),!b.silent){for(e=0,f=r.length;f>e;e++)(h=r[e]).trigger("add",h,this,b);(k||x&&x.length)&&this.trigger("sort",this,b)}return d?a[0]:a},reset:function(a,b){b||(b={});for(var d=0,e=this.models.length;e>d;d++)this._removeReference(this.models[d],b);return b.previousModels=this.models,this._reset(),a=this.add(a,c.extend({silent:!0},b)),b.silent||this.trigger("reset",this,b),a},push:function(a,b){return this.add(a,c.extend({at:this.length},b))},pop:function(a){var b=this.at(this.length-1);return this.remove(b,a),b},unshift:function(a,b){return this.add(a,c.extend({at:0},b))},shift:function(a){var b=this.at(0);return this.remove(b,a),b},slice:function(){return g.apply(this.models,arguments)},get:function(a){return null==a?void 0:this._byId[a]||this._byId[a.id]||this._byId[a.cid]},at:function(a){return this.models[a]},where:function(a,b){return c.isEmpty(a)?b?void 0:[]:this[b?"find":"filter"](function(b){for(var c in a)if(a[c]!==b.get(c))return!1;return!0})},findWhere:function(a){return this.where(a,!0)},sort:function(a){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return a||(a={}),c.isString(this.comparator)||1===this.comparator.length?this.models=this.sortBy(this.comparator,this):this.models.sort(c.bind(this.comparator,this)),a.silent||this.trigger("sort",this,a),this},pluck:function(a){return c.invoke(this.models,"get",a)},fetch:function(a){a=a?c.clone(a):{},void 0===a.parse&&(a.parse=!0);var b=a.success,d=this;return a.success=function(c){var e=a.reset?"reset":"set";d[e](c,a),b&&b(d,c,a),d.trigger("sync",d,c,a)},L(this,a),this.sync("read",this,a)},create:function(a,b){if(b=b?c.clone(b):{},!(a=this._prepareModel(a,b)))return!1;b.wait||this.add(a,b);var d=this,e=b.success;return b.success=function(a,c){b.wait&&d.add(a,b),e&&e(a,c,b)},a.save(null,b),a},parse:function(a){return a},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(a,b){if(a instanceof m)return a;b=b?c.clone(b):{},b.collection=this;var d=new this.model(a,b);return d.validationError?(this.trigger("invalid",this,d.validationError,b),!1):d},_addReference:function(a){this._byId[a.cid]=a,null!=a.id&&(this._byId[a.id]=a),a.collection||(a.collection=this),a.on("all",this._onModelEvent,this)},_removeReference:function(a){this===a.collection&&delete a.collection,a.off("all",this._onModelEvent,this)},_onModelEvent:function(a,b,c,d){("add"!==a&&"remove"!==a||c===this)&&("destroy"===a&&this.remove(b,d),b&&a==="change:"+b.idAttribute&&(delete this._byId[b.previous(b.idAttribute)],null!=b.id&&(this._byId[b.id]=b)),this.trigger.apply(this,arguments))}});var r=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","difference","indexOf","shuffle","lastIndexOf","isEmpty","chain","sample"];c.each(r,function(a){o.prototype[a]=function(){var b=g.call(arguments);return b.unshift(this.models),c[a].apply(c,b)}});var s=["groupBy","countBy","sortBy","indexBy"];c.each(s,function(a){o.prototype[a]=function(b,d){var e=c.isFunction(b)?b:function(a){return a.get(b)};return c[a](this.models,e,d)}});var t=b.View=function(a){this.cid=c.uniqueId("view"),a||(a={}),c.extend(this,c.pick(a,v)),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},u=/^(\S+)\s*(.*)$/,v=["model","collection","el","id","attributes","className","tagName","events"];c.extend(t.prototype,h,{tagName:"div",$:function(a){return this.$el.find(a)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this.stopListening(),this},setElement:function(a,c){return this.$el&&this.undelegateEvents(),this.$el=a instanceof b.$?a:b.$(a),this.el=this.$el[0],c!==!1&&this.delegateEvents(),this},delegateEvents:function(a){if(!a&&!(a=c.result(this,"events")))return this;this.undelegateEvents();for(var b in a){var d=a[b];if(c.isFunction(d)||(d=this[a[b]]),d){var e=b.match(u),f=e[1],g=e[2];d=c.bind(d,this),f+=".delegateEvents"+this.cid,""===g?this.$el.on(f,d):this.$el.on(f,g,d)}}return this},undelegateEvents:function(){return this.$el.off(".delegateEvents"+this.cid),this},_ensureElement:function(){if(this.el)this.setElement(c.result(this,"el"),!1);else{var a=c.extend({},c.result(this,"attributes"));this.id&&(a.id=c.result(this,"id")),this.className&&(a["class"]=c.result(this,"className"));var d=b.$("<"+c.result(this,"tagName")+">").attr(a);this.setElement(d,!1)}}}),b.sync=function(a,d,e){var f=x[a];c.defaults(e||(e={}),{emulateHTTP:b.emulateHTTP,emulateJSON:b.emulateJSON});var g={type:f,dataType:"json"};if(e.url||(g.url=c.result(d,"url")||K()),null!=e.data||!d||"create"!==a&&"update"!==a&&"patch"!==a||(g.contentType="application/json",g.data=JSON.stringify(e.attrs||d.toJSON(e))),e.emulateJSON&&(g.contentType="application/x-www-form-urlencoded",g.data=g.data?{model:g.data}:{}),e.emulateHTTP&&("PUT"===f||"DELETE"===f||"PATCH"===f)){g.type="POST",e.emulateJSON&&(g.data._method=f);var h=e.beforeSend;e.beforeSend=function(a){return a.setRequestHeader("X-HTTP-Method-Override",f),h?h.apply(this,arguments):void 0}}"GET"===g.type||e.emulateJSON||(g.processData=!1),"PATCH"===g.type&&w&&(g.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var i=e.xhr=b.ajax(c.extend(g,e));return d.trigger("request",d,i,e),i};var w=!("undefined"==typeof window||!window.ActiveXObject||window.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent),x={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};b.ajax=function(){return b.$.ajax.apply(b.$,arguments)};var y=b.Router=function(a){a||(a={}),a.routes&&(this.routes=a.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},z=/\((.*?)\)/g,A=/(\(\?)?:\w+/g,B=/\*\w+/g,C=/[\-{}\[\]+?.,\\\^$|#\s]/g;c.extend(y.prototype,h,{initialize:function(){},route:function(a,d,e){c.isRegExp(a)||(a=this._routeToRegExp(a)),c.isFunction(d)&&(e=d,d=""),e||(e=this[d]);var f=this;return b.history.route(a,function(c){var g=f._extractParameters(a,c);f.execute(e,g),f.trigger.apply(f,["route:"+d].concat(g)),f.trigger("route",d,g),b.history.trigger("route",f,d,g)}),this},execute:function(a,b){a&&a.apply(this,b)},navigate:function(a,c){return b.history.navigate(a,c),this},_bindRoutes:function(){if(this.routes){this.routes=c.result(this,"routes");for(var a,b=c.keys(this.routes);null!=(a=b.pop());)this.route(a,this.routes[a])}},_routeToRegExp:function(a){return a=a.replace(C,"\\$&").replace(z,"(?:$1)?").replace(A,function(a,b){return b?a:"([^/?]+)"}).replace(B,"([^?]*?)"),new RegExp("^"+a+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(a,b){var d=a.exec(b).slice(1);return c.map(d,function(a,b){return b===d.length-1?a||null:a?decodeURIComponent(a):null})}});var D=b.History=function(){this.handlers=[],c.bindAll(this,"checkUrl"),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},E=/^[#\/]|\s+$/g,F=/^\/+|\/+$/g,G=/msie [\w.]+/,H=/\/$/,I=/#.*$/;D.started=!1,c.extend(D.prototype,h,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root},getHash:function(a){var b=(a||this).location.href.match(/#(.*)$/);return b?b[1]:""},getFragment:function(a,b){if(null==a)if(this._hasPushState||!this._wantsHashChange||b){a=decodeURI(this.location.pathname+this.location.search);var c=this.root.replace(H,"");a.indexOf(c)||(a=a.slice(c.length))}else a=this.getHash();return a.replace(E,"")},start:function(a){if(D.started)throw new Error("Backbone.history has already been started");D.started=!0,this.options=c.extend({root:"/"},this.options,a),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var d=this.getFragment(),e=document.documentMode,f=G.exec(navigator.userAgent.toLowerCase())&&(!e||7>=e);if(this.root=("/"+this.root+"/").replace(F,"/"),f&&this._wantsHashChange){var g=b.$('';if(typeof $f=="function"){var l=$f(j.childNodes[0]);l.addEvent("ready",function(){function o(n,p,r,s){n={type:r,target:p};if(r=="timeupdate"){p.currentTime=n.currentTime=s.seconds;p.duration=n.duration=s.duration}p.dispatchEvent(n.type,n)}l.playVideo=function(){l.api("play")};l.pauseVideo=function(){l.api("pause")};l.seekTo=function(n){l.api("seekTo",n)};l.addEvent("play",function(){o(l,h,"play");o(l,h,"playing")}); +l.addEvent("pause",function(){o(l,h,"pause")});l.addEvent("finish",function(){o(l,h,"ended")});l.addEvent("playProgress",function(n){o(l,h,"timeupdate",n)});h.pluginApi=l;mejs.MediaPluginBridge.initPlugin(k)})}else console.warn("You need to include froogaloop for vimeo to work")}c.style.display="none";c.removeAttribute("autoplay");return h},updateNative:function(a,b){var c=a.htmlMediaElement,d;for(d in mejs.HtmlMediaElement)c[d]=mejs.HtmlMediaElement[d];b.success(c,c);return c}}; +mejs.YouTubeApi={isIframeStarted:false,isIframeLoaded:false,loadIframeApi:function(){if(!this.isIframeStarted){var a=document.createElement("script");a.src="//www.youtube.com/player_api";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b);this.isIframeStarted=true}},iframeQueue:[],enqueueIframe:function(a){if(this.isLoaded)this.createIframe(a);else{this.loadIframeApi();this.iframeQueue.push(a)}},createIframe:function(a){var b=a.pluginMediaElement,c=new YT.Player(a.containerId, +{height:a.height,width:a.width,videoId:a.videoId,playerVars:{controls:0},events:{onReady:function(){a.pluginMediaElement.pluginApi=c;mejs.MediaPluginBridge.initPlugin(a.pluginId);setInterval(function(){mejs.YouTubeApi.createEvent(c,b,"timeupdate")},250)},onStateChange:function(d){mejs.YouTubeApi.handleStateChange(d.data,c,b)}}})},createEvent:function(a,b,c){c={type:c,target:b};if(a&&a.getDuration){b.currentTime=c.currentTime=a.getCurrentTime();b.duration=c.duration=a.getDuration();c.paused=b.paused; +c.ended=b.ended;c.muted=a.isMuted();c.volume=a.getVolume()/100;c.bytesTotal=a.getVideoBytesTotal();c.bufferedBytes=a.getVideoBytesLoaded();var d=c.bufferedBytes/c.bytesTotal*c.duration;c.target.buffered=c.buffered={start:function(){return 0},end:function(){return d},length:1}}b.dispatchEvent(c.type,c)},iFrameReady:function(){for(this.isIframeLoaded=this.isLoaded=true;this.iframeQueue.length>0;)this.createIframe(this.iframeQueue.pop())},flashPlayers:{},createFlash:function(a){this.flashPlayers[a.pluginId]= +a;var b,c="//www.youtube.com/apiplayer?enablejsapi=1&playerapiid="+a.pluginId+"&version=3&autoplay=0&controls=0&modestbranding=1&loop=0";if(mejs.MediaFeatures.isIE){b=document.createElement("div");a.container.appendChild(b);b.outerHTML=''}else a.container.innerHTML=''},flashReady:function(a){var b=this.flashPlayers[a],c= +document.getElementById(a),d=b.pluginMediaElement;d.pluginApi=d.pluginElement=c;mejs.MediaPluginBridge.initPlugin(a);c.cueVideoById(b.videoId);a=b.containerId+"_callback";window[a]=function(e){mejs.YouTubeApi.handleStateChange(e,c,d)};c.addEventListener("onStateChange",a);setInterval(function(){mejs.YouTubeApi.createEvent(c,d,"timeupdate")},250)},handleStateChange:function(a,b,c){switch(a){case -1:c.paused=true;c.ended=true;mejs.YouTubeApi.createEvent(b,c,"loadedmetadata");break;case 0:c.paused=false; +c.ended=true;mejs.YouTubeApi.createEvent(b,c,"ended");break;case 1:c.paused=false;c.ended=false;mejs.YouTubeApi.createEvent(b,c,"play");mejs.YouTubeApi.createEvent(b,c,"playing");break;case 2:c.paused=true;c.ended=false;mejs.YouTubeApi.createEvent(b,c,"pause");break;case 3:mejs.YouTubeApi.createEvent(b,c,"progress")}}};function onYouTubePlayerAPIReady(){mejs.YouTubeApi.iFrameReady()}function onYouTubePlayerReady(a){mejs.YouTubeApi.flashReady(a)}window.mejs=mejs;window.MediaElement=mejs.MediaElement; +(function(a,b){var c={locale:{language:"",strings:{}},methods:{}};c.getLanguage=function(){return(c.locale.language||window.navigator.userLanguage||window.navigator.language).substr(0,2).toLowerCase()};if(typeof mejsL10n!="undefined")c.locale.language=mejsL10n.language;c.methods.checkPlain=function(d){var e,g,f={"&":"&",'"':""","<":"<",">":">"};d=String(d);for(e in f)if(f.hasOwnProperty(e)){g=RegExp(e,"g");d=d.replace(g,f[e])}return d};c.methods.t=function(d,e){if(c.locale.strings&& +c.locale.strings[e.context]&&c.locale.strings[e.context][d])d=c.locale.strings[e.context][d];return c.methods.checkPlain(d)};c.t=function(d,e){if(typeof d==="string"&&d.length>0){var g=c.getLanguage();e=e||{context:g};return c.methods.t(d,e)}else throw{name:"InvalidArgumentException",message:"First argument is either not a string or empty."};};b.i18n=c})(document,mejs);(function(a){if(typeof mejsL10n!="undefined")a[mejsL10n.language]=mejsL10n.strings})(mejs.i18n.locale.strings); +(function(a){if(typeof a.de==="undefined")a.de={Fullscreen:"Vollbild","Go Fullscreen":"Vollbild an","Turn off Fullscreen":"Vollbild aus",Close:"Schlie\u00dfen"}})(mejs.i18n.locale.strings);(function(a){if(typeof a.zh==="undefined")a.zh={Fullscreen:"\u5168\u87a2\u5e55","Go Fullscreen":"\u5168\u5c4f\u6a21\u5f0f","Turn off Fullscreen":"\u9000\u51fa\u5168\u5c4f\u6a21\u5f0f",Close:"\u95dc\u9589"}})(mejs.i18n.locale.strings); + +/*! + * MediaElementPlayer + * http://mediaelementjs.com/ + * + * Creates a controller bar for HTML5